/*
 * Murmur Flow web - the same design system as the app, expressed as CSS custom properties.
 *
 * Token values mirror `MurmurSemanticColors` / `MurmurSpacing` / `MurmurRadius` in
 * Packages/MurmurKit/Sources/MurmurUI. When a token changes in the app, change it here too:
 * the marketing surface and the product should never look like two different products.
 */

:root {
  color-scheme: light dark;

  /* Colour - light */
  --background: #eff1f4;
  --surface: #ffffff;
  --surface-subtle: #d7f0e8;
  --primary: #2648c4;
  --on-primary: #ffffff;
  --accent: #087050;
  --text: #0e1726;
  --text-secondary: #52606d;
  --text-muted: #606d7c;
  --border: #c8cfd8;
  --divider: #d9dee5;

  /* Fixed-dark hero, exactly as the app's recording surface */
  --hero: #0e1726;
  --on-hero: #eff1f4;
  --on-hero-muted: #aeb8c4;
  --hero-accent: #2fd6a6;

  /* Spacing - 4pt rhythm */
  --space-2: 2px;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-22: 22px;
  --space-28: 28px;
  --space-40: 40px;
  --space-56: 56px;

  /* Shape */
  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Motion */
  --motion-quick: 150ms;
  --motion-standard: 220ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* Layout */
  --content-max: 720px;
  --page-max: 1040px;

  --font-voice: "Newsreader", ui-serif, Georgia, serif;
  --font-ui: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0e1726;
    --surface: #1a2233;
    --surface-subtle: #1e3a33;
    --on-primary: #ffffff;
    --accent: #2fd6a6;
    --text: #eff1f4;
    --text-secondary: #aeb8c4;
    --text-muted: #848e9a;
    --border: #3b4658;
    --divider: #2a3445;
    /* In dark the app's fixed-dark hero equals the page background, so the hero takes the
       elevated-surface role instead - otherwise it and the feature cards are the same colour and
       the hierarchy collapses. */
    --hero: #222c3e;
  }
}

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

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

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
  a {
    color: var(--hero-accent);
  }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--space-22);
}

/* ---------- Site chrome ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12) var(--space-16);
  padding-top: var(--space-22);
  padding-bottom: var(--space-22);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-12);
  font-family: var(--font-voice);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.site-nav {
  display: flex;
  gap: var(--space-22);
  font-size: 15px;
  font-weight: 600;
}

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

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

.site-footer {
  border-top: 1px solid var(--divider);
  margin-top: var(--space-56);
  padding: var(--space-28) 0 var(--space-40);
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
  justify-content: space-between;
}

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

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

.hero {
  background: var(--hero);
  border-radius: var(--radius-xl);
  padding: var(--space-56) var(--space-28);
  text-align: center;
  color: var(--on-hero);
}

/*
 * The app's Hero role is 33pt, read at arm's length on a phone. A desktop browser is read from
 * further away, so the same role scales fluidly from the app value up to 52px rather than being a
 * new step on the ramp.
 */
.hero h1 {
  font-family: var(--font-voice);
  font-size: clamp(33px, 6vw, 52px);
  line-height: 1.1;
  font-weight: 400;
  margin: 0 0 var(--space-16);
  color: var(--on-hero);
}

.hero p {
  margin: 0 auto var(--space-28);
  max-width: 46ch;
  color: var(--on-hero-muted);
  font-size: 17px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-22);
  padding: var(--space-4) var(--space-12);
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--hero-accent) 14%, transparent);
  color: var(--hero-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 var(--space-28);
  border-radius: var(--radius-lg);
  background: var(--hero-accent);
  color: #0e1726;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--motion-quick) var(--ease), opacity var(--motion-quick) var(--ease);
}

.cta:hover {
  opacity: 0.92;
}

.cta:active {
  transform: scale(0.98);
}

.cta-note {
  margin-top: var(--space-16);
  font-size: 13px;
  color: var(--on-hero-muted);
}

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

.section {
  margin-top: var(--space-56);
}

.section h2 {
  font-family: var(--font-voice);
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 var(--space-22);
}

.features {
  display: grid;
  gap: var(--space-16);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-22);
}

.feature h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 var(--space-8);
}

.feature p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.shots {
  display: grid;
  gap: var(--space-16);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}

.shots img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

/* ---------- Long-form document (privacy policy) ---------- */

.doc {
  max-width: var(--content-max);
  margin: var(--space-40) auto 0;
}

.doc h1 {
  font-family: var(--font-voice);
  font-size: 33px;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 var(--space-8);
}

.doc h2 {
  font-size: 18px;
  font-weight: 700;
  margin: var(--space-40) 0 var(--space-12);
}

.doc p,
.doc li {
  color: var(--text-secondary);
}

.doc li {
  margin-bottom: var(--space-8);
}

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

.doc .doc-meta {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .hero {
    padding: var(--space-40) var(--space-22);
    border-radius: var(--radius-lg);
  }

  .site-nav {
    gap: var(--space-16);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
