/* NRL Survivor — holding page.
   Tokens are lifted from the Next.js app's globals.css so this standalone
   page reads as the same product. Light values live on :root; the dark set is
   written twice, once for "follow the system" and once for an explicit choice,
   because a saved preference has to beat the media query in both directions. */

:root {
  --canvas: #f4f4ef;
  --surface: #ffffff;
  --raised: #ecebe3;
  --line: #dfded4;
  --ink: #15180f;
  --muted: #666a5b;
  --brand-500: #4a7c22;
  --gold: #af7e0a;
  --good: #3f7a18;

  --radius-card: 1rem;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
}

/* No saved choice: follow the system. `:not(.light)` lets someone who has
   explicitly picked light stay light on a dark-mode machine. */
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --canvas: #0b0d09;
    --surface: #12150f;
    --raised: #1b1f17;
    --line: #2b3024;
    --ink: #e9ece2;
    --muted: #8e9484;
    /* On a dark ground the accent has to be the lighter green. */
    --brand-500: #84bd54;
    --gold: #f0b40c;
    --good: #84bd54;
  }
}

/* Explicitly chosen dark, set by the toggle and replayed before paint. */
:root.dark {
  --canvas: #0b0d09;
  --surface: #12150f;
  --raised: #1b1f17;
  --line: #2b3024;
  --ink: #e9ece2;
  --muted: #8e9484;
  --brand-500: #84bd54;
  --gold: #f0b40c;
  --good: #84bd54;
}

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

/* Keeps form controls, scrollbars and the address bar in step with the
   chosen theme rather than the system one. */
html {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  html:not(.light) {
    color-scheme: dark;
  }
}

html.dark {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  background-color: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background-color: var(--brand-500);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

/* Theme toggle --------------------------------------------------------- */

/* Floated over the hero rather than stacked above it: the hero's glow is
   clipped to its own box, so anything that pushes the hero down turns that
   clip into a visible seam across the top of the page. */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1rem;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  background-color: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  background-color: var(--raised);
  color: var(--ink);
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* One button, two icons: CSS picks the right one from the theme, so there is
   no icon state to keep in sync and nothing to swap out in script. */
.theme-toggle .icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) .theme-toggle .icon-sun {
    display: block;
  }
  :root:not(.light) .theme-toggle .icon-moon {
    display: none;
  }
}

:root.dark .theme-toggle .icon-sun {
  display: block;
}

:root.dark .theme-toggle .icon-moon {
  display: none;
}

/* Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* The same soft green wash that sits behind the app's landing hero. */
.hero__glow {
  position: absolute;
  top: -20rem;
  left: 50%;
  width: 42rem;
  height: 42rem;
  transform: translateX(-50%);
  border-radius: 9999px;
  background-color: rgba(74, 124, 34, 0.2);
  filter: blur(64px);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) .hero__glow {
    background-color: rgba(132, 189, 84, 0.16);
  }
}

:root.dark .hero__glow {
  background-color: rgba(132, 189, 84, 0.16);
}

.hero__inner {
  position: relative;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 1rem;
  text-align: center;
}

.logo {
  display: block;
  width: 9rem;
  height: auto;
  margin: 0 auto 2rem;
  user-select: none;
  filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.15));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background-color: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.eyebrow__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--good);
}

.headline {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.75rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* Brand green into the logo's gold, as on the app's hero. */
.headline__accent {
  background-image: linear-gradient(to right, var(--brand-500), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 34rem;
  margin: 1.5rem auto 0;
  font-size: 1.125rem;
  line-height: 1.6;
  text-wrap: pretty;
  color: var(--muted);
}

.note {
  margin: 2.25rem auto 0;
  padding: 1.25rem 1.5rem;
  max-width: 30rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background-color: var(--surface);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}

.note strong {
  color: var(--ink);
}

/* Footer -------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1rem;
}

.footer__inner {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.wordmark {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.wordmark__nrl {
  color: var(--brand-500);
}

.footer__fineprint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (min-width: 640px) {
  .hero__inner {
    padding: 6rem 1.5rem;
  }

  .logo {
    width: 10rem;
  }
}
