/* GoalWorld site — design system (single source of truth: goalworld_site/)
   Palette: Solana neons over deep space. Type: Outfit (self-hosted variable). */

:root {
  --bg: #030307;
  --bg-elev: #0a0a14;
  --bg-card: rgba(12, 12, 22, 0.72);
  --ink: #f0f0f5;
  --muted: rgba(240, 240, 245, 0.78);
  --faint: rgba(240, 240, 245, 0.55);
  --line: rgba(255, 255, 255, 0.1);
  --green: #14f195;
  --purple: #9945ff;
  --purple-text: #c084fc;   /* AA-compliant purple for small text */
  --cyan: #7ee8ff;
  --amber: #fbbf24;
  --grad: linear-gradient(120deg, #14f195, #7ee8ff 45%, #9945ff);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1160px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/outfit-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------- a11y ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: #03130b;
  padding: 10px 18px;
  border-radius: 0 0 12px 0;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* ---------- layout ---------- */
.wrap {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

.section { padding: 4.5rem 0; }
.section-tight { padding: 2.75rem 0; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 0.9rem;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--green);
}

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.5rem, 7vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); font-weight: 800; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.45rem); font-weight: 700; letter-spacing: -0.015em; }

p { margin: 0 0 1.1em; }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(3, 3, 7, 0.82);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.32rem;
  letter-spacing: -0.04em;
}
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand .dim { color: var(--green); }

.nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  padding: 0.45rem 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-color: var(--green); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(6, 6, 13, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.1rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 0.85rem; justify-content: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.82rem 1.6rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s;
}
.btn-primary {
  background: var(--grad);
  color: #06121b;
  box-shadow: 0 10px 34px rgba(20, 241, 149, 0.22);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(153, 69, 255, 0.32);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover { border-color: var(--green); transform: translateY(-2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 38%;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(94deg, rgba(3, 3, 7, 0.96) 6%, rgba(3, 3, 7, 0.72) 48%, rgba(3, 3, 7, 0.34) 100%),
    linear-gradient(0deg, var(--bg) 2%, transparent 34%);
}
.hero h1 { max-width: 13ch; }
.hero .lead { margin-bottom: 1.9rem; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 1rem;
  border: 1px solid rgba(20, 241, 149, 0.35);
  border-radius: 999px;
  background: rgba(20, 241, 149, 0.08);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 1.35rem;
}
.hero-note { margin-top: 1.5rem; font-size: 0.92rem; color: var(--faint); }

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 3.25rem 0; }
}

.card {
  position: relative;
  padding: 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s var(--ease), border-color 0.22s, box-shadow 0.22s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 241, 149, 0.5);
  box-shadow: 0 22px 50px rgba(20, 241, 149, 0.1);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--muted); margin-bottom: 0.9rem; font-size: 0.98rem; }
.card .go {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card-glow-purple:hover { border-color: rgba(153, 69, 255, 0.55); box-shadow: 0 22px 50px rgba(153, 69, 255, 0.12); }
.card-glow-cyan:hover { border-color: rgba(126, 232, 255, 0.55); box-shadow: 0 22px 50px rgba(126, 232, 255, 0.12); }

.card-img {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1.1rem;
  background: var(--bg-elev);
}
.card-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- steps ---------- */
.steps { counter-reset: step; }
.step {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 4.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1.3rem;
  top: 1.35rem;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #06121b;
  font-weight: 800;
}
.step h3 { margin-bottom: 0.25rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* ---------- quote ---------- */
.pull {
  margin: 0;
  padding: 1.7rem 1.9rem;
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(120deg, rgba(20, 241, 149, 0.07), rgba(153, 69, 255, 0.06));
}
.pull p {
  font-size: clamp(1.18rem, 2.6vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 0.55em;
}
.pull cite { font-style: normal; color: var(--faint); font-size: 0.92rem; }

/* ---------- media / video ---------- */
.video-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}
.video-card figcaption {
  padding: 0.95rem 1.15rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.video-card figcaption strong { color: var(--ink); display: block; font-size: 1.02rem; }
.video-tag {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ---------- bands ---------- */
.band {
  border-block: 1px solid var(--line);
  background:
    radial-gradient(900px 380px at 12% 0%, rgba(153, 69, 255, 0.12), transparent 62%),
    radial-gradient(900px 380px at 88% 100%, rgba(20, 241, 149, 0.1), transparent 62%),
    var(--bg-elev);
}

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 0.35rem 1.35rem;
  margin-bottom: 0.85rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.08rem;
  padding: 0.95rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { color: var(--muted); margin-bottom: 1rem; }

/* ---------- prose pages ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.9rem; }
.prose ul { padding-left: 1.25rem; color: var(--muted); }
.prose li { margin-bottom: 0.55rem; }
.prose a { color: var(--green); }
.prose .callout {
  border: 1px dashed rgba(20, 241, 149, 0.4);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.35rem;
  color: var(--muted);
  background: rgba(20, 241, 149, 0.05);
}

/* ---------- tables / downloads ---------- */
.dl-list { display: grid; gap: 0.75rem; }
.dl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  text-decoration: none;
  transition: border-color 0.18s, transform 0.18s var(--ease);
}
.dl:hover { border-color: var(--green); transform: translateX(4px); }
.dl .name { font-weight: 700; }
.dl .meta { color: var(--faint); font-size: 0.88rem; }
.dl .get { color: var(--green); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3.25rem 0 2.5rem;
  background: var(--bg-elev);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.25rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .footer-h {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: 0.96rem; }
.site-footer a:hover { color: var(--green); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  color: var(--faint);
  font-size: 0.88rem;
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 72vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}
.notfound .code {
  font-size: clamp(5rem, 22vw, 11rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- reveal (motion-safe) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.7s var(--ease) both; }
  .rise-2 { animation: rise 0.7s 0.12s var(--ease) both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }
}
