/* DagWorld marketing site, shared styles.
 *
 * Tokens are lifted verbatim from the app's DagColors green-light and
 * green-dark sets, so the site and the product are literally the same palette
 * rather than a hand-matched approximation. If a value changes in
 * app/lib/core/ui/theme/dag_colors.dart, change it here too.
 *
 * Type follows the app's rule exactly and it is semantic, not decorative:
 *   Schibsted Grotesk  all chrome, headings, navigation, buttons
 *   Literata (serif)   quote text ONLY
 * The serif is what stops a quote reading like a UI label. Never swap them.
 *
 * The aurora is the brand's one signature gesture, and the app permits at most
 * one per screen on a low-text surface. This page spends it on the hero and
 * nowhere else.
 */

:root {
  /* --- green-light: the page's resting state --- */
  --surface-0: #F2FBF5;
  --surface-1: #E5F4EA;
  --surface-2: #D7EDDF;
  --text-primary: #0B3D2E;
  --text-secondary: #3E6754;
  --accent: #087744;              /* 5.39:1 on accent-contrast, AA */
  --accent-contrast: #F4FCF7;
  --chip-overlay: rgba(11, 61, 46, 0.08);
  --hairline: rgba(11, 61, 46, 0.13);
  --gradient-a: #BEE3CC;
  --gradient-b: #F2FBF5;
  --shadow-card: 0 24px 54px rgba(31, 64, 49, 0.22);

  /* --- green-dark: the hero and the footer --- */
  --dark-surface-0: #04100A;
  --dark-surface-1: #0C2013;
  --dark-surface-2: #16301F;
  --dark-text-primary: #F2FAF4;
  --dark-text-secondary: #8FA898;
  --dark-accent: #2BD481;
  --dark-hairline: rgba(242, 250, 244, 0.10);
  --dark-frost-bg: rgba(4, 18, 10, 0.50);
  --dark-frost-line: rgba(242, 250, 244, 0.16);

  /* Aurora blooms, green-dark. Hue-analogous on purpose: the app keeps every
     bloom in the green-teal band so overlaps stay clean instead of muddying. */
  --aurora-base: #05170D;
  --aurora-1: #0FA968;
  --aurora-2: #36D98C;
  --aurora-3: #0E8C86;
  --aurora-4: #7FE0AC;

  /* Reading surface. Warm paper in the app's light AND dark themes alike,
     because the reader is the one place the product stops being a media
     surface. Quote blocks below reuse it for the same reason. */
  --read-bg: #FAF7ED;
  --read-text: #2C3325;
  --read-muted: #8B8A72;
  --read-accent: #0E7A46;

  /* The app-icon tile. Brand, not chrome: fixed regardless of theme. */
  --brand-tile: #177A4C;
  --on-brand-tile: #FFFFFF;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --radius-art: 6px;              /* book covers, small on purpose */

  --font-ui: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
  --font-serif: 'Literata', Georgia, 'Times New Roman', serif;

  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; display: block; }
/* Skip link. The header nav is sticky and five links deep, so without this a
   keyboard user tabs the whole thing again on every page. Visible only when
   focused. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }
a { color: var(--accent); }

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

/* Aggressive weight contrast, per the app's type register: very bold headings
   against regular secondary text. Negative tracking on the large sizes because
   Schibsted opens up at display sizes and looks loose without it. */
h1, h2, h3 { font-family: var(--font-ui); margin: 0 0 12px; letter-spacing: -0.03em; }
h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; line-height: 1.06; }
h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; line-height: 1.15; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0 0 16px; }

.lede { font-size: clamp(16px, 2.2vw, 19px); color: var(--text-secondary); max-width: 56ch; }

/* Tiny all-caps context label. The wide tracking is the whole point; at 11px
   with normal tracking this reads as broken UI rather than as a label. */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* ---------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 251, 245, 0.86);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.header-row {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 17px; letter-spacing: -0.02em;
  color: var(--text-primary); text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600;
  color: var(--text-secondary); text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav a:hover { background: var(--chip-overlay); color: var(--text-primary); }
.nav .nav-cta {
  background: var(--accent); color: var(--accent-contrast);
  font-weight: 700; padding: 9px 16px;
}
.nav .nav-cta:hover { background: var(--read-accent); color: var(--accent-contrast); }

.mobile-menu-btn {
  display: none; margin-left: auto;
  width: 40px; height: 40px; padding: 9px;
  background: none; border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); cursor: pointer;
}
.mobile-menu-btn span {
  display: block; height: 2px; margin: 3px 0;
  background: var(--text-primary); border-radius: 2px;
}

/* ------------------------------------------------------------------ hero -- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--aurora-base);
  color: var(--dark-text-primary);
  padding: clamp(56px, 9vw, 104px) 0 clamp(60px, 10vw, 116px);
}

/* Four soft radial blooms over the base, exactly the app's recipe. They drift
   on a slow loop; anything faster reads as a loading state rather than as an
   ambient surface. Transform and opacity only, so it stays off the main
   thread. */
.aurora { position: absolute; inset: 0; pointer-events: none; }
.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
  animation: drift 14s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: var(--aurora-1); width: 46%; height: 62%; left: -8%;  top: -18%; }
.aurora span:nth-child(2) { background: var(--aurora-2); width: 40%; height: 56%; right: -6%; top: -10%; animation-delay: -3s; }
.aurora span:nth-child(3) { background: var(--aurora-3); width: 44%; height: 58%; left: 22%;  bottom: -26%; animation-delay: -6s; }
.aurora span:nth-child(4) { background: var(--aurora-4); width: 30%; height: 40%; right: 12%; bottom: -18%; opacity: 0.4; animation-delay: -9s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3%, 4%, 0) scale(1.12); }
}

/* Reduced motion freezes the drift and KEEPS the gradient, which is the app's
   rule too: the colour is the brand, the movement is decoration. */
@media (prefers-reduced-motion: reduce) {
  .aurora span { animation: none; }
}

.hero-inner { position: relative; display: grid; gap: 44px; align-items: center; }
.hero .eyebrow { color: var(--dark-text-secondary); }
.hero h1 { color: var(--dark-text-primary); }
.hero .lede { color: var(--dark-text-secondary); }

/* Text on an aurora ALWAYS sits on a frosted panel, never straight on the
   gradient, because contrast has to hold against the WORST frame of the
   animation rather than the resting one. */
.frost {
  background: var(--dark-frost-bg);
  border: 1px solid var(--dark-frost-line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  padding: clamp(22px, 4vw, 34px);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 30px; }
.meta-stat { display: flex; flex-direction: column; }
.meta-stat-value { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; color: var(--dark-text-primary); }
.meta-stat-label { font-size: 12.5px; color: var(--dark-text-secondary); }

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui); font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* Accent is the app's play-FAB green and it appears here only on the primary
   action, matching the product's restraint. */
.btn-primary { background: var(--dark-accent); color: var(--dark-surface-0); }
.btn-primary:hover { background: var(--aurora-4); }
.btn-secondary {
  background: transparent; color: var(--dark-text-primary);
  border-color: var(--dark-frost-line);
}
.btn-secondary:hover { background: rgba(242, 250, 244, 0.08); }

.btn-light { background: var(--accent); color: var(--accent-contrast); }
.btn-light:hover { background: var(--read-accent); }
.btn-outline { background: transparent; color: var(--text-primary); border-color: var(--hairline); }
.btn-outline:hover { background: var(--chip-overlay); }

/* -------------------------------------------------------------- sections -- */

.section { padding: clamp(52px, 8vw, 92px) 0; }
.section-alt { background: var(--surface-1); }
.section-head { max-width: 60ch; margin-bottom: 38px; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Containerless cards, per the app: bare content, hairline only, no elevation
   and no heavy rounding. Heavy rounding immediately stops reading as
   Spotify-adjacent, which is the anatomy this borrows. */
.card {
  background: var(--surface-0);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 22px;
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--text-secondary); margin: 0; font-size: 15px; }

.card-icon {
  width: 38px; height: 38px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--chip-overlay);
  color: var(--accent);
}
.card-icon svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- quotes -- */

/* Literata, on warm paper. This is the app's reading surface reproduced
   exactly, so a quote on the site looks like a quote in the product. */
.quote {
  background: var(--read-bg);
  border-radius: var(--radius-md);
  padding: clamp(22px, 3.5vw, 32px);
  border: 1px solid rgba(11, 61, 46, 0.08);
}
.quote blockquote {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--read-text);
}
.quote cite {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--read-muted);
}

/* ------------------------------------------------------------------ misc -- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--chip-overlay);
  font-size: 12.5px; font-weight: 600;
  color: var(--text-primary);
}

.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: none; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--accent); color: var(--accent-contrast);
  font-size: 14px; font-weight: 800;
}

/* Book covers are portrait 2:3 and NEVER square. This is the app's one
   deliberate deviation from the Spotify anatomy, so the site honours it.
   The real covers are not exactly 2:3, so object-fit crops rather than
   distorts: a squashed cover looks worse than a slightly trimmed one. */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 16px; }
.cover { display: block; text-decoration: none; }
.cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-art);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
}
.cover-title {
  display: block;
  margin-top: 8px;
  font-size: 12px; font-weight: 600; line-height: 1.3;
  color: var(--text-secondary);
}

/* Roadmap. Muted on purpose: nothing here exists yet, so it must not compete
   with the three things that do. No accent, hairline only, dashed edge to read
   as outline rather than product. */
.soon { border-style: dashed; background: transparent; }
.soon h3 { color: var(--text-primary); }
.soon .tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--chip-overlay);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-secondary);
}

/* -------------------------------------------------------------- long-form -- */

.prose { max-width: 72ch; }
.prose h2 { font-size: 24px; margin-top: 38px; }
.prose h3 { margin-top: 26px; }
.prose p, .prose li { color: var(--text-secondary); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); }
.updated { font-size: 13px; color: var(--text-secondary); margin-bottom: 30px; }

.page-head { padding: clamp(40px, 6vw, 68px) 0 10px; }

/* ---------------------------------------------------------------- footer -- */

.site-footer {
  background: var(--dark-surface-0);
  color: var(--dark-text-secondary);
  padding: 48px 0 32px;
  margin-top: 20px;
}
.footer-row { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.site-footer .brand { color: var(--dark-text-primary); }
.site-footer a { color: var(--dark-text-secondary); text-decoration: none; font-size: 14px; }
.site-footer a:hover { color: var(--dark-text-primary); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-legal {
  margin-top: 34px; padding-top: 20px;
  border-top: 1px solid var(--dark-hairline);
  font-size: 12.5px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}

/* ----------------------------------------------------------- breakpoints -- */

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
}

@media (max-width: 760px) {
  .mobile-menu-btn { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 16px 16px;
    background: var(--surface-0);
    border-bottom: 1px solid var(--hairline);
  }
  .nav.is-open { display: flex; }
  .header-row { position: relative; }
  .nav .nav-cta { text-align: center; margin-top: 6px; }
}
