/* ============================================================
   Pocket Nation — pre-launch landing
   ------------------------------------------------------------
   Premium dark game-UI feel. Black-navy base, neon green +
   amber accents, subtle cyan glow on the hex grid. No external
   libraries; one Google font (Space Grotesk) loaded once.
   ============================================================ */

/* ---- Tokens ----------------------------------------------- */
:root {
  /* Backgrounds */
  --bg-deep:    #04060c;
  --bg-soft:    #0a0e1a;
  --bg-card:    #0b1220;
  --bg-elev:    #11192b;

  /* Borders / dividers */
  --border:     rgba(255, 255, 255, 0.06);
  --border-hi:  rgba(255, 255, 255, 0.10);

  /* Text */
  --text:       #f5f7fa;
  --text-mute:  #a3b1bf;
  --text-faint: #5a6b7a;

  /* Accents */
  --green:      #4ade80;       /* primary glow */
  --green-hi:   #6bf38f;
  --green-soft: rgba(74, 222, 128, 0.18);
  --green-edge: rgba(74, 222, 128, 0.40);
  --amber:      #f6b13a;
  --amber-hi:   #ffc858;
  --amber-soft: rgba(246, 177, 58, 0.20);
  --cyan-glow:  rgba(58, 213, 255, 0.18);

  /* Layout */
  --radius:     14px;
  --radius-sm:  10px;
  --container:  1100px;

  /* Type */
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI",
          Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- Reset (minimal) -------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Subtle vignette so the page doesn't read flat */
  background-image:
    radial-gradient(ellipse at 20% 0%,
      rgba(74, 222, 128, 0.06), transparent 55%),
    radial-gradient(ellipse at 90% 10%,
      rgba(246, 177, 58, 0.05), transparent 50%),
    radial-gradient(ellipse at 50% 100%,
      rgba(58, 213, 255, 0.06), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.skip-link {
  position: absolute; top: -40px; left: 12px;
  background: var(--bg-card); color: var(--text);
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--border-hi); z-index: 100;
}
.skip-link:focus { top: 12px; outline: 2px solid var(--green); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---- Topbar ----------------------------------------------- */
.topbar {
  position: relative;
  z-index: 10;
  padding: 22px 0;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.wordmark-hex { color: var(--green); display: inline-flex; }
.wordmark-text {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.18em;
}
.topbar-tag {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.6);
  backdrop-filter: blur(6px);
}

/* ---- Hero ------------------------------------------------- */
.hero {
  position: relative;
  padding: 64px 0 96px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Radial mask: grid reads as territory, edges feather into space. */
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at center,
    #000 35%, transparent 85%);
          mask-image: radial-gradient(ellipse 70% 60% at center,
    #000 35%, transparent 85%);
  pointer-events: none;
}
.hex-grid {
  width: 130%;
  height: 130%;
  position: absolute;
  top: -15%;
  left: -15%;
}

/* Hex layers ------------------------------------------------ */
.hex { stroke-linejoin: round; transition: stroke-opacity 200ms ease; }
.hex-dim {
  stroke: var(--green);
  stroke-opacity: 0.10;
  stroke-width: 1;
  fill: none;
}
.hex-lit {
  stroke: var(--green-hi);
  stroke-opacity: 0.32;
  stroke-width: 1.2;
  fill: none;
}
.hex-pulse {
  animation: hex-pulse 4.8s ease-in-out infinite;
}
@keyframes hex-pulse {
  0%, 100% { stroke-opacity: 0.25; }
  50%      { stroke-opacity: 0.60; }
}

/* The Camp hex — amber, the visual focal point of the grid */
.hex-camp {
  stroke: var(--amber);
  stroke-opacity: 0.85;
  stroke-width: 1.8;
  fill: var(--amber-soft);
  filter: drop-shadow(0 0 6px rgba(246, 177, 58, 0.5));
  animation: camp-pulse 5.6s ease-in-out infinite;
}
@keyframes camp-pulse {
  0%, 100% { stroke-opacity: 0.70; }
  50%      { stroke-opacity: 1.00; }
}
.hex-camp-ring {
  stroke: var(--amber);
  stroke-opacity: 0.22;
  stroke-width: 1.1;
  fill: none;
}

/* Slow camera drift on the whole grid */
.grid-drift {
  transform-origin: center;
  animation: drift 22s ease-in-out infinite;
}
@keyframes drift {
  0%   { transform: translate(-10px, -4px); }
  50%  { transform: translate( 10px,  6px); }
  100% { transform: translate(-10px, -4px); }
}

/* Hero copy ------------------------------------------------- */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 18px;
  opacity: 0;
  animation: rise 700ms cubic-bezier(.2,.7,.2,1) 80ms forwards;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 24px;
  color: var(--text);
  opacity: 0;
  animation: rise 800ms cubic-bezier(.2,.7,.2,1) 180ms forwards;
}
.accent-green { color: var(--green-hi); }
.accent-amber { color: var(--amber-hi); }
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.55;
  color: var(--text-mute);
  margin: 0 0 32px;
  max-width: 580px;
  opacity: 0;
  animation: rise 800ms cubic-bezier(.2,.7,.2,1) 320ms forwards;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  animation: rise 800ms cubic-bezier(.2,.7,.2,1) 460ms forwards;
}
/* Single-CTA layout: the row holds one deliberate button instead of a
   pair, so we anchor it on the start edge and keep it at its natural
   pill width on every breakpoint. Avoids the "missing second button"
   look that a stretched bar would create on mobile. */
.hero-ctas-single { gap: 0; }
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 0;
  /* Slight readability bump: was 13px / --text-faint, which read as
     barely-there next to the headline. 14px / --text-mute lifts the
     line into "intentional meta" territory without making it loud. */
  font-size: 14px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  opacity: 0;
  animation: rise 800ms cubic-bezier(.2,.7,.2,1) 600ms forwards;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green-edge);
  animation: dot-pulse 2.6s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.18); }
}

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0,  0); }
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 180ms ease, background-color 180ms ease,
              box-shadow 200ms ease, border-color 180ms ease;
  user-select: none;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--green-hi);
  outline-offset: 3px;
}
.btn-primary {
  color: #04150b;
  background: var(--green);
  border-color: var(--green-hi);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.18),
    0 14px 30px -12px rgba(74, 222, 128, 0.55);
}
.btn-primary:hover {
  background: var(--green-hi);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(107, 243, 143, 0.30),
    0 18px 38px -12px rgba(74, 222, 128, 0.65);
}
.btn-primary:active { transform: translateY(0); }
.btn-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(107, 243, 143, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 220ms ease;
}
.btn-primary:hover .btn-glow { opacity: 0.6; }

/* ---- Features --------------------------------------------- */
.features {
  padding: 24px 0 96px;
  position: relative;
}
.features::before {
  /* Thin divider line that fades into the page, marking the
     boundary between the hero and the cards without a hard rule. */
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 48px));
  height: 1px;
  background: linear-gradient(90deg,
    transparent, var(--border-hi), transparent);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 60px;
}
.card {
  background: linear-gradient(180deg,
    rgba(17, 25, 43, 0.85) 0%,
    rgba(11, 18, 32, 0.85) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 200ms ease, transform 220ms ease,
              box-shadow 220ms ease;
}
.card::before {
  /* Accent stripe on the left edge of the card, color varies per
     position via :nth-child below. */
  content: "";
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 2px;
  border-radius: 2px;
  background: var(--green);
  opacity: 0.55;
  box-shadow: 0 0 12px var(--green-edge);
}
.card:nth-child(2)::before { background: var(--amber); box-shadow: 0 0 12px rgba(246, 177, 58, 0.5); }
.card:nth-child(3)::before { background: #3ad5ff;       box-shadow: 0 0 12px rgba(58, 213, 255, 0.4); }

.card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -24px rgba(0, 0, 0, 0.8);
}

.card-icon {
  color: var(--green);
  margin-bottom: 18px;
}
.card:nth-child(2) .card-icon { color: var(--amber); }
.card:nth-child(3) .card-icon { color: #6dd9f0; }

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
  color: var(--text);
}
.card-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-mute);
  margin: 0;
}

/* Reveal-on-scroll: starts hidden, gets .is-visible from main.js */
.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1),
              transform 700ms cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ---- Footer ----------------------------------------------- */
.footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--border);
  background: rgba(4, 6, 12, 0.6);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand .wordmark-text { color: var(--text-mute); }
/* Footer-link now hosts a small meta cluster (Contact: email · URL),
   so the typography settles on the container and each child (anchor
   or plain text) inherits. Wraps cleanly on narrow viewports. */
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}
.footer-link a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}
.footer-link a:hover { color: var(--green-hi); }
.footer-contact a { color: inherit; }
.footer-sep { color: var(--text-faint); opacity: 0.7; }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 820px) {
  .hero { padding: 40px 0 64px; }
  .hero-eyebrow { letter-spacing: 0.22em; margin-bottom: 14px; }
  .hero-sub { margin-bottom: 26px; }

  .features { padding-bottom: 64px; }
  .features-grid {
    grid-template-columns: 1fr;
    padding-top: 44px;
    gap: 14px;
  }
  .btn { padding: 13px 20px; font-size: 14.5px; }
  /* Don't stretch the lone CTA across the row on mobile — the natural
     pill width reads more deliberate than a generic full-width bar. */
}

@media (max-width: 480px) {
  .container { padding-inline: 18px; }
  .topbar { padding: 18px 0; }
  .topbar-tag { display: none; }
  .hero-title { letter-spacing: -0.015em; }
}

/* ---- A11y / motion respect -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-eyebrow, .hero-title, .hero-sub,
  .hero-ctas, .hero-status, .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .grid-drift, .hex-pulse, .hex-camp, .status-dot {
    animation: none !important;
  }
}
