/* Root Colors */
:root {
  --bg: #111;
  --fg: #F1E2CF;
  --sec: #1F1F1F;
  --prim: #E65C2C;
  --acc: #DA7937;
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
img { display: block; max-width: 100%; height: auto; }

/* Screen-reader only */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* Base */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Global heading size to avoid Chrome's future change warning */
h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; }
/* EXPLICIT sizes inside sectional elements to satisfy deprecation check */
section h1, nav h1, article h1, aside h1 { font-size: clamp(1.6rem, 5.5vw, 2.6rem); line-height: 1.1; }

/* Containers */
.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* Blur when modal open */
body.modal-open > :not(.modal) { filter: blur(5px); pointer-events: none; user-select: none; }

/* Navbar */
.navbar { background: var(--bg); position: sticky; top: 0; z-index: 100; transition: border-bottom 0.3s; }
.navbar.scrolled { border-bottom: 2px solid var(--acc); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }

/* Logo + Title */
.logo-container { display: flex; align-items: center; gap: .5rem; }
.logo-img { width: 40px; height: 40px; object-fit: contain; }
.logo-text { font-size: 1.2rem; font-weight: 700; color: var(--fg); text-transform: uppercase; }

/* Section Header */
.section-header { display: flex; align-items: center; margin: 2rem 0 1rem; }
.section-header h2 { font-size: 2rem; font-weight: 600; color: var(--prim); }
.section-header .line { flex: 1; height: 2px; background: var(--prim); margin-left: 10px; }

/* Hero */
.hero-content {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  padding: 3rem 0;
  /* IMPORTANT: do NOT use content-visibility on the hero; it can hurt LCP */
}
.hero-text { flex: 1 1 400px; min-width: 280px; }
.hero-text p { max-width: 600px; margin-top: .5rem; margin-bottom: 1.5rem; font-size: 1.1rem; }
.hero-buttons { display: flex; gap: 1rem; margin-top: 1rem; }
.btn {
  background: var(--prim); color: var(--bg);
  padding: .7rem 1.5rem; border: none; border-radius: 6px; cursor: pointer; font-weight: 600;
  transition: transform .05s ease, background .15s ease;
}
.btn:hover { background: var(--acc); }
.btn:active { transform: translateY(1px); }

/* Hero images */
.hero-image { flex: 1 1 400px; display: flex; justify-content: flex-end; min-width: 320px; }
.image-wrapper { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 600px; height: 400px; gap: 10px; }
.float-knife { width: 180px; aspect-ratio: 1 / 1; object-fit: contain; will-change: transform; animation: float-cycle 4s ease-in-out infinite; }
.float-knife.invert { animation-direction: reverse; }
@keyframes float-cycle {
  0% { transform: translateY(0); }
  25% { transform: translateY(-30px); }
  75% { transform: translateY(30px); }
  100% { transform: translateY(0); }
}
/* Respect reduced motion */
.reduce-motion .float-knife { animation: none !important; }

/* Hide hero knives entirely on mobile/tablet (<= 1024px) */
@media (max-width: 1024px) {
  .hero-image { display: none; }
}

/* Trusted Cards */
.trusted { padding: 2rem 0; content-visibility: auto; contain-intrinsic-size: 400px; }
.trusted-cards { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.trusted-card { background: var(--sec); border-radius: 10px; padding: 1rem 1.5rem; text-align: center; min-width: 150px; }
.trusted-number { display: block; font-size: 1.3rem; font-weight: 700; color: var(--prim); }
.trusted-label { display: block; font-size: .95rem; opacity: .9; margin-top: .45rem; }

/* Steps Cards */
.steps-cards { padding: 2rem 0; content-visibility: auto; contain-intrinsic-size: 600px; }
.steps-cards .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.card-step { background: var(--sec); border-radius: 12px; padding: 2rem 1.5rem; display: flex; flex-direction: column; align-items: center; text-align: center; }
.icon-wrapper {
  width: 48px; height: 48px; background: rgba(230, 92, 44, 0.15); border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 1rem;
}
.icon-wrapper img { width: 24px; height: 24px; object-fit: contain; }
.card-step h3 { font-size: 1.3rem; margin-bottom: .5rem; color: var(--fg); font-weight: 700; }
.card-step p { font-size: .98rem; opacity: .9; margin-bottom: 1.5rem; }

/* FAQ Section */
.faq-section { padding: 2rem 0; content-visibility: auto; contain-intrinsic-size: 800px; }
.faq-item + .faq-item { margin-top: 1rem; }
.faq-question {
  width: 100%; background: none; border: none; border-bottom: 2px solid var(--acc);
  padding: .75rem 0; font-size: 1rem; color: var(--fg);
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
}
.faq-question .icon { transition: transform .3s ease; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s ease, padding .4s ease; padding: 0; }
.faq-answer.open { padding: .75rem 0 1.25rem; }
.faq-answer p { margin: 0 0 1rem; line-height: 1.55; color: var(--fg); }

/* Alert Banner */
#alert-banner {
  position: fixed; top: 0; left: 0; width: 100%;
  display: none; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; background: var(--acc); color: #fff;
  z-index: 10001; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
#alert-banner .message { flex: 1; margin-right: 1rem; }
#alert-banner .close-btn { background: none; border: none; font-size: 1.2rem; color: #fff; cursor: pointer; }
body.modal-open > #alert-banner { filter: none !important; pointer-events: auto !important; }

/* Modals */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 2000;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-content {
  background: var(--sec); padding: 2rem; border-radius: 12px;
  width: 90%; max-width: 420px; position: relative; color: var(--fg);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.modal-close { position: absolute; top: 10px; right: 10px; background: none; border: none; font-size: 1.2rem; color: var(--fg); cursor: pointer; }
#join-modal form { display: flex; flex-direction: column; gap: 1rem; }
#join-modal input, #footer-waitlist-form input {
  padding: .6rem .75rem; border: 1px solid var(--prim); border-radius: 6px; background: var(--bg); color: var(--fg);
}

/* Footer */
.footer-bottom { background: var(--sec); width: 100%; padding: 2rem 0; }
.footer-grid {
  display: grid; align-items: center; gap: 1rem;
  grid-template-columns: 1fr auto 1fr;
}
.footer-left { display: flex; align-items: center; gap: .6rem; }
.footer-left img { width: 40px; height: 40px; object-fit: contain; }
.footer-left span { font-weight: 500; opacity: .95; }
.footer-center { text-align: center; }
.footer-center h3 { font-size: 1.05rem; margin-bottom: .6rem; letter-spacing: .25px; }
.footer-center form { display: inline-flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-center form { width: 100%; }
}

/* Focus states */
input:focus, button:focus { outline: 2px solid rgba(230,92,44,.7); outline-offset: 2px; }

/* Desktop: make all 4 hero knives fit (no clipping) */
@media (min-width: 1025px) {
  .hero-image { overflow: visible; }
  .hero-image .image-wrapper {
    max-width: 740px;
    gap: 12px;          /* 3 gaps total = 36px */
  }
  .hero-image .float-knife {
    width: calc((min(740px, 100%) - 36px) / 4);
  }
}

/* ————————————————————————————————————————————————
   Profile menu (square avatar + orange dropdown)
   ———————————————————————————————————————————————— */
#auth-slot { position: relative; }

.profile-menu { position: relative; }
.profile-trigger {
  background: transparent; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center;
}
.auth-avatar {
  width: 36px; height: 36px; object-fit: cover; border-radius: 0; /* SQUARE */
  outline: 2px solid var(--prim);
  outline-offset: 0;
}
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--prim); color: var(--bg);
  border-radius: 10px; min-width: 180px; padding: .25rem;
  box-shadow: 0 10px 20px rgba(0,0,0,.35);
  transform-origin: top right;
  opacity: 0; visibility: hidden; transform: scale(.98);
  transition: opacity .12s ease, transform .12s ease, visibility .12s;
  z-index: 200;
}
.dropdown.open { opacity: 1; visibility: visible; transform: scale(1); }
.dropdown ul { list-style: none; }
.dropdown a {
  display: block; padding: .65rem .8rem; border-radius: 8px;
  color: var(--bg); text-decoration: none; font-weight: 700;
}
.dropdown a:hover, .dropdown a:focus { background: var(--acc); outline: none; }

/* Steam login button — EXACTLY same styling as .btn */
.steam-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--prim); color: var(--bg);
  padding: .7rem 1.5rem; border: none; border-radius: 6px; cursor: pointer; font-weight: 600;
  text-decoration: none;
  transition: transform .05s ease, background .15s ease;
}
.steam-btn:hover { background: var(--acc); }
.steam-btn:active { transform: translateY(1px); }
.steam-img { width: 20px; height: 20px; }
.steam-text {
  font: inherit;        /* same font family/size/weight as .btn text */
  color: inherit;       /* same color as .btn text */
  line-height: 1;
}
