:root { color-scheme: dark; }

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #34373c;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

body::before {
  position: fixed;
  z-index: -2;
  inset: -18px;
  background: url("https://i.imgur.com/rF0GtTE.jpeg") center / cover no-repeat;
  content: "";
  filter: blur(10px);
}

body[data-page="team"]::before {
  background-image: url("https://i.imgur.com/CinMu8m.jpeg");
}

body[data-page="gallery"]::before {
  background-image: url("https://i.imgur.com/0tkSHIX.jpeg");
}

body[data-page="servers"]::before {
  background-image: url("https://i.imgur.com/BVJF5nP.jpeg");
}

body[data-page="contact"]::before {
  background-image: url("https://i.imgur.com/q2eQFv0.jpeg");
}

body[data-page="apply"]::before {
  background-image: url("https://i.imgur.com/ZUh8HDT.jpeg");
}

body[data-page="hub"]::before {
  background-image: url("https://i.imgur.com/7IaXBBB.jpeg");
}

body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: rgba(13, 16, 21, 0.28);
  content: "";
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 82px;
  padding: 0 4vw;
  background: rgba(16, 19, 24, 0.87);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar,
.hero {
  user-select: none;
}

.brand, .nav-links a { color: #fff; text-decoration: none; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  font-size: clamp(1rem, 1.15vw, 1.25rem);
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand img {
  width: clamp(2rem, 2.1vw, 2.55rem);
  height: clamp(2rem, 2.1vw, 2.55rem);
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.35vw, 1.7rem);
  margin: 0 0 0 2rem;
  padding: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  display: inline-block;
  padding: 0.55rem 0;
  font-size: clamp(0.75rem, 0.83vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.nav-links a::after {
  position: absolute;
  bottom: 0.2rem;
  left: 50%;
  width: 0;
  height: 2px;
  background: currentColor;
  content: "";
  transform: translateX(-50%);
  transition: width 220ms ease;
}

.nav-links a:hover::after, .nav-links a:focus-visible::after { width: 100%; }

.nav-links a:focus-visible, .button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

.hero {
  display: grid;
  min-height: calc(100vh - 82px);
  place-items: center;
  padding: 3rem 1.5rem 6rem;
  text-align: center;
}

.hero-content { max-width: 48rem; }

body:not([data-page="home"]) .hero {
  display: none;
}

.page-view[hidden] {
  display: none;
}

.content-page {
  width: min(1180px, 92vw);
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  padding: 4.5rem 0 6rem;
  user-select: none;
}

.page-heading {
  margin-bottom: 3.75rem;
  text-align: center;
}

.page-heading p {
  margin: 0 0 0.65rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.page-heading h1 {
  font-size: clamp(2.25rem, 4vw, 4.3rem);
}

body[data-page="team"] .content-page {
  max-height: calc(100vh - 82px);
  overflow-y: auto;
}

.team-list {
  width: min(100%, 760px);
  margin: 0 auto;
}

.team-role {
  min-height: 9rem;
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.team-role:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.team-role h1,
.team-role h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  letter-spacing: 0.04em;
}

.org-chart {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.org-level {
  display: flex;
  justify-content: center;
}

.role-card {
  position: relative;
  width: min(100%, 270px);
  padding: 1.25rem;
  background: rgba(16, 19, 24, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
}

.role-card--lead {
  width: min(100%, 290px);
}

.role-card__label {
  display: block;
  margin-bottom: 0.55rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.role-card h2 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.role-card .person-slot {
  margin: 1rem auto 0;
}

.person-slot {
  width: 100%;
  height: 2.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.org-line--vertical {
  width: 1px;
  height: 2.5rem;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.7);
}

.department-connector {
  position: relative;
  width: 66.66%;
  height: 4.1rem;
  margin: 2.5rem auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
}

.department-connector::before {
  position: absolute;
  top: -2.5rem;
  left: 50%;
  width: 1px;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.7);
  content: "";
}

.department-connector::after {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 4.1rem;
  background: rgba(255, 255, 255, 0.7);
  content: none;
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.department {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.department::before {
  position: absolute;
  top: -4.1rem;
  left: 50%;
  width: 1px;
  height: 4.1rem;
  background: rgba(255, 255, 255, 0.7);
  content: "";
}

.member-slots {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.35rem;
}

.member-slots::before {
  position: absolute;
  top: 0;
  left: 25%;
  width: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.52);
  content: "";
}

.member-slots .person-slot {
  position: relative;
}

.member-slots .person-slot::before {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 1px;
  height: 1.35rem;
  background: rgba(255, 255, 255, 0.52);
  content: "";
}

.page-heading--servers {
  margin-bottom: 2.75rem;
}

.contact-page {
  display: grid;
  place-items: center;
}

.hub-page {
  display: grid;
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 82px);
  margin: 0;
  place-items: center;
  padding: 0;
}

.site-notification {
  position: fixed;
  z-index: 30;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: min(24rem, calc(100vw - 2.5rem));
  padding: 1rem 1rem 1rem 1.15rem;
  color: #ffffff;
  background: #202329;
  border-left: 3px solid #e8757c;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 1.5rem));
  transition: opacity 220ms ease, transform 220ms ease;
}

.site-notification.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.site-notification__message {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.site-notification__close {
  margin: -0.2rem -0.2rem 0 0;
  border: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.button-discord {
  background: #5865f2;
  border-color: #5865f2;
}

.button-discord:hover {
  background: #4752c4;
}

body[data-page="drivers"]::before {
  background: #2b3038;
  filter: none;
}

body[data-page="drivers"]::after {
  background: transparent;
}

body[data-page="drivers"] .navbar {
  display: none;
}

.drivers-page {
  display: grid;
  grid-template-rows: 74px 1fr;
  width: 100%;
  min-height: 100vh;
  background: #2b3038;
  color: #ffffff;
  user-select: none;
}

.drivers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.25rem;
  background: #202329;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drivers-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.drivers-brand img {
  width: 2.3rem;
  height: 2.3rem;
  object-fit: contain;
}

.account-menu {
  position: relative;
}

.account-menu__trigger {
  position: relative;
  padding: 0.7rem 0;
  border: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.account-menu__trigger::after {
  position: absolute;
  bottom: 0.35rem;
  left: 50%;
  width: 0;
  height: 2px;
  background: currentColor;
  content: "";
  transform: translateX(-50%);
  transition: width 220ms ease;
}

.account-menu__trigger:hover::after,
.account-menu__trigger:focus-visible::after {
  width: 100%;
}

.account-menu__dropdown {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.55rem);
  right: 0;
  width: 10rem;
  padding: 0.35rem;
  background: #202329;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.28);
}

.account-menu__option {
  width: 100%;
  padding: 0.7rem;
  border: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: left;
}

.account-menu__option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.drivers-content {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 3rem 2.25rem;
}

.drivers-toolbar {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 900px;
  margin-bottom: 1rem;
}

.drivers-refresh {
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.drivers-refresh:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
}

.drivers-refresh:disabled {
  cursor: wait;
  opacity: 0.6;
}

.drivers-table {
  width: 100%;
  max-width: none;
}

.drivers-table__header {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) 10rem;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.drivers-table__row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) 10rem;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.88rem;
}

.drivers-table__row span:last-child {
  font-weight: 700;
  text-transform: capitalize;
}

.drivers-table__message {
  margin: 1.25rem 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.settings-panel {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(11, 14, 18, 0.58);
}

.settings-panel[hidden] {
  display: none;
}

.settings-panel__content {
  position: relative;
  width: min(100%, 26rem);
  padding: 2rem;
  background: #202329;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.settings-panel h2 {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.settings-panel__close {
  position: absolute;
  z-index: 1;
  top: 0.7rem;
  right: 0.85rem;
  border: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.name-form {
  display: grid;
  gap: 0.8rem;
}

.name-form label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.name-form input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
}

.name-form__message {
  margin: 0;
  color: #ffb0b4;
  font-size: 0.8rem;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.server-card {
  padding: 1.25rem 1.35rem 1.35rem;
  background: rgba(16, 19, 24, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.server-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.85rem;
}

.server-card h2 {
  margin: 0;
  overflow: hidden;
  font-size: 0.9rem;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-card h2 span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
}

.server-status {
  color: #77c989;
  font-size: 0.7rem;
  font-weight: 700;
}

.server-status::before {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.35rem;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.player-count {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.server-progress {
  height: 0.45rem;
  margin-top: 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 99px;
}

.server-progress span {
  display: block;
  width: var(--player-percentage, 0%);
  height: 100%;
  background: #74c889;
  border-radius: inherit;
  transition: width 260ms ease, background-color 180ms ease;
}

.server-card--warning .server-progress span { background: #e7a44a; }
.server-card--critical .server-progress span { background: #e65e63; }

@media (max-width: 760px) {
  .content-page { padding-top: 3rem; }
  .department-grid, .server-grid { grid-template-columns: 1fr; }
  .department-connector { display: none; }
  .department { margin-top: 2.5rem; }
  .department:first-child { margin-top: 0; }
  .department::before { top: -2.5rem; height: 2.5rem; }
}

@media (max-width: 480px) {
  .server-card__top { grid-template-columns: 1fr auto; }
  .server-status { grid-column: 1 / -1; grid-row: 2; }
  .contact-actions { align-items: stretch; flex-direction: column; }
  .drivers-header { padding: 0 1.25rem; }
  .drivers-brand { font-size: 0.9rem; }
  .drivers-content { padding: 1.5rem; }
  .drivers-table__header, .drivers-table__row { grid-template-columns: 4rem minmax(0, 1fr) 5rem; }
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6.2vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0.035em;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9.5rem;
  min-height: 3.1rem;
  padding: 0.75rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary { background: #fff; color: #171a20; }
.button-primary:hover { background: #e4e6e9; }
.button-secondary { background: rgba(15, 18, 23, 0.32); }
.button-secondary:hover { background: rgba(255, 255, 255, 0.16); }

@media (max-width: 900px) {
  .navbar { align-items: flex-start; gap: 0.75rem; flex-direction: column; padding: 1rem 5vw; }
  .nav-links { gap: 0.4rem 1.15rem; flex-wrap: wrap; margin: 0; }
  .hero { min-height: calc(100vh - 132px); }
}

@media (max-width: 460px) {
  .hero-actions { align-items: stretch; flex-direction: column; }
}
