/*
 * Gaspr marketing site — "Gilded Hour" identity.
 * Brand tokens mirror the app theme (src/theme/colors.ts, fonts.ts, atmosphere.ts):
 * anthracite base, gold-only haze + grain atmosphere, Space Grotesk (display) over
 * IBM Plex Sans (body), and a single shared gold glow. This is a standalone static
 * site, so values live here directly rather than in the app's token system.
 */

/* Self-hosted fonts (latin subset) — no third-party request, GDPR-clean. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/spacegrotesk-500.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/spacegrotesk-700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibmplexsans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibmplexsans-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibmplexsans-600.woff2") format("woff2");
}

:root {
  --bg: #15161a;
  --panel: rgba(255, 250, 238, 0.045);
  --panel-strong: rgba(36, 33, 28, 0.82);
  --border: rgba(205, 175, 110, 0.14);
  --border-strong: rgba(205, 175, 110, 0.28);
  --gold: #d2ac58;
  --gold-ink: #b8923f;
  --text-hi: #f2efe7;
  --text-lo: #9a958a;
  --text-button: #f0e7d2;
  --danger: #eb4d3d;
  --maxw: 720px;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --glow-gold: 0 0 28px rgba(210, 172, 88, 0.26);
  --glow-gold-strong: 0 0 34px rgba(210, 172, 88, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.1px;
  background-color: var(--bg);
  /* Gold haze: two soft rays anchored off-screen (atmosphere.ts §primary/§secondary). */
  background-image:
    radial-gradient(ellipse 90% 55% at 82% -12%, rgba(150, 118, 52, 0.16), transparent 60%),
    radial-gradient(ellipse 85% 55% at 12% 112%, rgba(120, 96, 48, 0.12), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Static grain — the app's fourth atmosphere layer, present as a material. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

::selection {
  background: rgba(210, 172, 88, 0.28);
  color: var(--text-hi);
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--gold-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-hi);
  text-shadow: var(--glow-gold);
}

.wordmark:hover {
  color: var(--gold);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
}

.site-header nav a {
  color: var(--text-lo);
}

.site-header nav a:hover {
  color: var(--gold);
  text-decoration: none;
}

/* Burger toggle — hidden on desktop, shown under 600px (see media query). */
.nav-burger {
  display: none;
}

/* ---------- Content (legal + about pages) ---------- */

.content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 44px 20px 8px;
}

.content h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
}

.subtitle {
  color: var(--text-lo);
  font-size: 14px;
  margin: 0 0 32px;
}

.content h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.2px;
  color: var(--gold);
  margin: 38px 0 12px;
  padding-top: 6px;
}

.content h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  margin: 26px 0 8px;
  color: var(--text-hi);
}

.content p {
  margin: 0 0 15px;
}

.content ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.content li {
  margin: 7px 0;
}

.content li::marker {
  color: var(--gold-ink);
}

.content strong {
  color: var(--text-hi);
  font-weight: 600;
}

.lead {
  font-size: 18px;
  color: var(--text-hi);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 30px 0;
}

/* ---------- Tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 20px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--panel-strong);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.2px;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:nth-child(even) td {
  background: rgba(255, 250, 238, 0.02);
}

/* ---------- Hero (landing) ---------- */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 20px 8px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 12vw, 4.25rem);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin: 0 0 18px;
  color: var(--text-hi);
  text-shadow: var(--glow-gold-strong);
}

.hero .tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 5vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -0.2px;
  color: var(--text-hi);
  max-width: 26ch;
  margin: 0 auto 16px;
}

.hero .kicker {
  margin: 0;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-ink);
}

/* ---------- Manifesto (landing) ---------- */

.manifesto {
  max-width: 600px;
  margin: 0 auto;
  padding: 28px 20px 8px;
  text-align: center;
}

.manifesto p {
  margin: 0 auto 16px;
  max-width: 52ch;
  color: var(--text-lo);
}

.manifesto .lede {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  color: var(--text-hi);
  margin-bottom: 24px;
}

.manifesto em {
  color: var(--text-hi);
  font-style: italic;
}

.creed {
  list-style: none;
  margin: 32px auto;
  padding: 0;
  max-width: 46ch;
  text-align: left;
  display: grid;
  gap: 16px;
}

.creed li {
  padding-left: 16px;
  border-left: 2px solid var(--border-strong);
  color: var(--text-lo);
}

.creed b {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--gold);
}

.manifesto .closer {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: 18px;
  color: var(--text-hi);
  margin-top: 28px;
}

/* ---------- How it works (landing) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: var(--maxw);
  margin: 48px auto 0;
  padding: 0 20px;
}

.step {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 22px 20px;
  text-align: center;
}

.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
}

.step b {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--text-hi);
  margin-bottom: 5px;
}

.step span:not(.step-n) {
  color: var(--text-lo);
  font-size: 14px;
}

/* ---------- Cards ---------- */

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 48px 0 8px;
  padding: 0 20px;
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

.card {
  display: block;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--panel-strong);
  padding: 16px 20px;
  min-width: 180px;
  color: var(--text-hi);
  text-align: left;
  box-shadow: var(--glow-gold);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--glow-gold-strong);
  text-decoration: none;
}

.card:active {
  transform: translateY(0) scale(0.99);
  box-shadow: var(--glow-gold);
}

.card b {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 3px;
}

.card span {
  color: var(--text-lo);
  font-size: 13px;
}

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

.site-footer {
  max-width: var(--maxw);
  margin: 56px auto 0;
  padding: 26px 20px 56px;
  border-top: 1px solid var(--border);
  color: var(--text-lo);
  font-size: 13px;
  line-height: 1.7;
}

.site-footer a {
  color: var(--text-lo);
}

.site-footer a:hover {
  color: var(--gold);
}

/* ---------- Responsive ---------- */

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

  .card {
    min-width: 0;
    flex: 1 1 100%;
  }

  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 38px;
    padding: 9px 8px;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    cursor: pointer;
  }

  .nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--gold);
    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }

  .nav-burger:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }

  .nav-burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-header nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 14px;
  }

  .site-header nav.is-open {
    display: flex;
  }

  .site-header nav a {
    padding: 12px 2px;
    border-top: 1px solid var(--border);
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 40px;
  }

  .hero h1 {
    letter-spacing: 3px;
  }

  .manifesto {
    padding-top: 12px;
  }

  .manifesto .lede {
    font-size: 20px;
  }

  .content h1 {
    font-size: 26px;
  }

  .content,
  .hero,
  .manifesto,
  .steps,
  .cards,
  .site-header,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}
