/* DRIFT — CS2 community design system */
:root {
  --bg: #141214;
  --surface: #302F33;
  --mid: #464C55;
  --muted: #636D79;
  --steel: #7F8995;
  --fog: #9EA7B3;
  --ash: #C2C7CF;
  --online: #34c759;
  --text: #C2C7CF;
  --text-dim: #9EA7B3;
  --border: rgba(194, 199, 207, 0.14);
  --border-strong: rgba(194, 199, 207, 0.28);
  --glass: rgba(20, 18, 20, 0.72);
  --radius: 14px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --header-h: 64px;
  --content: min(95vw, 1680px);
  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.35s var(--ease), opacity 0.35s var(--ease);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ash);
  margin: 0;
}

p {
  margin: 0;
  color: var(--text-dim);
}

/* Particles canvas */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.site-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell {
  width: var(--content);
  margin-inline: auto;
  padding-inline: clamp(16px, 2.5vw, 40px);
}

/* Header — sticky glass */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  background: rgba(20, 18, 20, 0.45);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(48, 47, 51, 0.78);
  border-bottom-color: var(--border);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.site-header__inner {
  width: var(--content);
  margin-inline: auto;
  padding-inline: clamp(16px, 2.5vw, 40px);
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  color: var(--ash);
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.85;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav__link {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--fog);
  transition: color 0.35s var(--ease), background 0.35s var(--ease);
}

.nav__link:hover {
  color: var(--ash);
  background: rgba(194, 199, 207, 0.06);
}

.nav__link.is-active {
  color: var(--ash);
  background: rgba(194, 199, 207, 0.1);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  color: var(--ash);
  transition: background 0.35s var(--ease);
}

.mobile-toggle:hover {
  background: rgba(194, 199, 207, 0.08);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: background 0.3s var(--ease);
}

.mobile-toggle span::before,
.mobile-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out);
}

.mobile-toggle span::before {
  top: -6px;
}

.mobile-toggle span::after {
  top: 6px;
}

.mobile-toggle.is-open span {
  background: transparent;
}

.mobile-toggle.is-open span::before {
  transform: translateY(6px) rotate(45deg);
}

.mobile-toggle.is-open span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  transition:
    background 0.4s var(--ease),
    color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--ash);
  color: var(--bg);
}

.btn--primary:hover {
  background: #d4d8de;
  box-shadow: 0 8px 28px rgba(194, 199, 207, 0.18);
}

.btn--ghost {
  background: transparent;
  color: var(--ash);
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
  background: rgba(194, 199, 207, 0.08);
  border-color: var(--ash);
}

.btn--soft {
  background: var(--surface);
  color: var(--ash);
  border: 1px solid var(--border);
}

.btn--soft:hover {
  border-color: var(--border-strong);
  background: var(--mid);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: 10px;
}

.btn--block {
  width: 100%;
}

/* Hero — full-bleed first viewport */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 18, 20, 0.55) 0%, rgba(20, 18, 20, 0.72) 45%, var(--bg) 100%),
    linear-gradient(90deg, rgba(20, 18, 20, 0.75) 0%, rgba(20, 18, 20, 0.25) 55%, rgba(20, 18, 20, 0.5) 100%),
    var(--hero-img, linear-gradient(145deg, #302F33 0%, #141214 50%, #464C55 100%));
  background-size: cover;
  background-position: center;
}

.hero__bg--img {
  --hero-img: url("../assets/img/drift-hero.png");
}

.hero__content {
  position: relative;
  z-index: 1;
  width: var(--content);
  margin-inline: auto;
  padding: clamp(48px, 8vh, 96px) clamp(16px, 2.5vw, 40px);
  max-width: 720px;
  margin-left: clamp(16px, 4vw, 80px);
  margin-right: auto;
}

.hero__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0.08em;
  color: var(--ash);
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--ash);
}

.hero__lead {
  font-size: 1.05rem;
  max-width: 28em;
  margin-bottom: 28px;
  color: var(--fog);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Sections */
.section {
  padding: clamp(48px, 7vh, 88px) 0;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section__title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.section__sub {
  margin-top: 6px;
  font-size: 0.95rem;
}

.page-hero {
  padding: 40px 0 8px;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: 8px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    border-color 0.4s var(--ease),
    transform 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* Server cards */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.server-card__media {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(160deg, var(--mid) 0%, var(--surface) 60%, var(--bg) 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.server-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20, 18, 20, 0.85) 100%);
}

.server-card__body {
  padding: 16px 18px 18px;
}

.server-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.server-card__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ash);
}

.server-card__meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.server-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.server-card__ping {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel);
}

.server-card__fill {
  height: 4px;
  border-radius: 999px;
  background: rgba(194, 199, 207, 0.12);
  overflow: hidden;
  margin-bottom: 14px;
}

.server-card__fill > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mid), var(--ash));
}

.online-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fog);
}

.online-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.55);
  animation: pingPulse 1.8s var(--ease) infinite;
}

@keyframes pingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* Shop teaser / privilege cards */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.rank-card {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
}

.rank-card__tier {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
}

.rank-card__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ash);
}

.rank-card__price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ash);
  margin-top: auto;
}

.rank-card__price span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

.rank-card__list {
  font-size: 0.88rem;
  color: var(--fog);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rank-card__list li::before {
  content: "· ";
  color: var(--steel);
}

.rank-card--featured {
  border-color: rgba(194, 199, 207, 0.35);
  background: linear-gradient(165deg, #3a3940 0%, var(--surface) 55%);
}

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 8px 0 56px;
}

.stat {
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.4s var(--ease);
}

.stat:hover {
  border-color: var(--border-strong);
}

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 500;
  color: var(--ash);
  line-height: 1.1;
}

.stat__label {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(20, 18, 20, 0.9);
  padding: 36px 0 28px;
}

.footer__inner {
  width: var(--content);
  margin-inline: auto;
  padding-inline: clamp(16px, 2.5vw, 40px);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 1.2rem;
  color: var(--ash);
  margin-bottom: 10px;
}

.footer__copy {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 32em;
}

.footer__col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--steel);
  margin-bottom: 12px;
  font-weight: 600;
}

.footer__col a {
  display: block;
  font-size: 0.92rem;
  color: var(--fog);
  padding: 4px 0;
}

.footer__col a:hover {
  color: var(--ash);
}

.footer__bottom {
  width: var(--content);
  margin: 28px auto 0;
  padding: 16px clamp(16px, 2.5vw, 40px) 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Accordion */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 920px;
}

.accordion__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.35s var(--ease);
}

.accordion__item.is-open {
  border-color: var(--border-strong);
}

.accordion__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ash);
  transition: background 0.35s var(--ease);
}

.accordion__btn:hover {
  background: rgba(194, 199, 207, 0.04);
}

.accordion__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  color: var(--fog);
  transition: transform 0.4s var(--ease-out);
}

.accordion__item.is-open .accordion__icon {
  transform: rotate(45deg);
}

.accordion__panel {
  display: none;
  padding: 0 20px 18px;
  color: var(--fog);
  font-size: 0.95rem;
}

.accordion__item.is-open .accordion__panel {
  display: block;
}

/* FAQ / support */
.support-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}

.contact-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.contact-card p {
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--ash);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.contact-list a:hover {
  background: rgba(194, 199, 207, 0.06);
  border-color: var(--border-strong);
}

.contact-list span {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Servers page list */
.server-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.server-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease-out);
}

.server-row:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.server-row__thumb {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--mid), var(--bg));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.server-row__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ash);
  margin-bottom: 4px;
}

.server-row__meta {
  font-size: 0.88rem;
  color: var(--muted);
}

.server-row__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 140px;
}

/* Cookie bar */
.cookie-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: min(560px, calc(100vw - 32px));
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease-out);
}

.cookie-bar.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}

.cookie-bar p {
  flex: 1;
  font-size: 0.85rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 10, 0.72);
  backdrop-filter: blur(6px);
}

.modal__panel {
  position: relative;
  width: min(400px, 100%);
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.4s var(--ease-out);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__title {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.modal__text {
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--fog);
  transition: background 0.3s var(--ease);
}

.modal__close:hover {
  background: rgba(194, 199, 207, 0.1);
  color: var(--ash);
}

.modal__stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal-delay="1"] {
  transition-delay: 0.08s;
}
[data-reveal-delay="2"] {
  transition-delay: 0.16s;
}
[data-reveal-delay="3"] {
  transition-delay: 0.24s;
}
[data-reveal-delay="4"] {
  transition-delay: 0.32s;
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
}

@media (max-width: 960px) {
  .servers-grid {
    grid-template-columns: 1fr;
  }

  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .server-row {
    grid-template-columns: 100px 1fr;
  }

  .server-row__actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }
}

@media (max-width: 720px) {
  .mobile-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
  }

  .nav-drawer {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 18px;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s var(--ease-out), opacity 0.35s var(--ease);
  }

  .nav-drawer.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-drawer a {
    display: block;
    padding: 12px 10px;
    border-radius: 10px;
    color: var(--fog);
  }

  .nav-drawer a.is-active,
  .nav-drawer a:hover {
    color: var(--ash);
    background: rgba(194, 199, 207, 0.08);
  }

  .hero__content {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }

  .cookie-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .online-dot::before {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .server-row:hover {
    transform: none;
  }
}
