/*
  FINE marketing site — shared stylesheet.

  Tokens live at the top as CSS custom properties on purpose: the palette
  below is the "Coral Pop" brand direction (see docs/brand.md — source of
  truth for every hex value here). Any future palette tweak should stay a
  variables-only change, not a find-and-replace across every page.

  Coral Pop personality: "confident optimist." Warm cream ground, coral
  accent spent deliberately (hero CTA, links, small moments), deep violet
  ink for text, teal as a secondary note. No external fonts/CDNs — system
  font stack only.
*/

:root {
  /* Brand accent — "Coral Pop" palette. Mirrors mobile/constants/tokens.ts
     light-mode values exactly; see docs/brand.md for the full spec. */
  --color-accent: #d6412e;
  --color-accent-dark: #b43625;
  --color-accent-contrast: #ffffff;
  --color-accent-tint: #fbe0de;

  /* Secondary note — teal */
  --color-teal: #0b7a6e;

  /* Neutrals — warm cream surface instead of cold slate, per Coral Pop */
  --color-bg: #ffffff;
  --color-bg-alt: #fbf7f0;
  --color-ink: #1b1533;
  --color-text: #1b1533;
  --color-text-muted: #5b5478;
  --color-text-subtle: #8b84a8;
  --color-border: #e5dfd2;
  --color-border-light: #f1eee7;

  /* Feedback / placeholder callouts */
  --color-placeholder-bg: #fffbeb;
  --color-placeholder-border: #fbbf24;
  --color-placeholder-text: #92400e;

  /* Type scale — system stack only (no external fonts / CDNs) */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-size-eyebrow: 0.75rem;
  --font-size-small: 0.9375rem;
  --font-size-base: 1.0625rem;
  --font-size-lede: 1.25rem;
  --font-size-h3: 1.25rem;
  --font-size-h2: 1.75rem;
  --font-size-h1: 2.75rem;
  --line-height-base: 1.65;
  --line-height-tight: 1.15;
  --line-height-heading: 1.25;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 6rem;

  /* Layout */
  --content-max-width: 45rem;
  --content-max-width-wide: 75rem;
  --measure: 65ch;
  --radius-sm: 0.5rem;
  --radius-base: 0.875rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-card: 0 1px 2px rgba(27, 21, 51, 0.04), 0 8px 24px -12px rgba(27, 21, 51, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus {
  color: var(--color-accent-dark);
}

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

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

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  max-width: var(--content-max-width-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  color: var(--color-text);
  text-decoration: none;
}

.site-logo img {
  display: block;
  height: 26px;
  width: auto;
}

.site-logo:hover {
  opacity: 0.85;
}

.site-nav {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--font-size-small);
  font-weight: 600;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-accent);
}

.site-nav a[aria-current="page"] {
  color: var(--color-ink);
  border-bottom-color: var(--color-accent);
}

/* -------------------------------------------------------------------- */
/* Layout                                                                */
/* -------------------------------------------------------------------- */

main {
  flex: 1 0 auto;
}

.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

.container--wide {
  max-width: var(--content-max-width-wide);
}

h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  color: var(--color-ink);
}

h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-heading);
  letter-spacing: -0.01em;
  margin: var(--space-6) 0 var(--space-3);
  color: var(--color-ink);
}

h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-heading);
  margin: var(--space-5) 0 var(--space-2);
  color: var(--color-ink);
}

p {
  margin: 0 0 var(--space-3);
  color: var(--color-text);
  max-width: var(--measure);
}

ul,
ol {
  max-width: var(--measure);
}

li {
  margin-bottom: var(--space-2);
}

.lede {
  font-size: var(--font-size-lede);
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 38ch;
}

.eyebrow {
  display: inline-block;
  font-size: var(--font-size-eyebrow);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin: 0 0 var(--space-3);
}

/* -------------------------------------------------------------------- */
/* Buttons & chips                                                       */
/* -------------------------------------------------------------------- */

.button {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--font-size-base);
  line-height: 1;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover,
.button:focus {
  background: var(--color-accent-dark);
  color: var(--color-accent-contrast);
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin: var(--space-5) 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-small);
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
}

.chip::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-teal);
  flex: none;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.link-list li {
  margin-bottom: 0;
}

/* -------------------------------------------------------------------- */
/* Home — hero                                                           */
/* -------------------------------------------------------------------- */

.hero {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.hero__inner {
  max-width: var(--content-max-width-wide);
  margin: 0 auto;
  padding: var(--space-8) var(--space-4) var(--space-7);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__mark {
  height: 64px;
  width: 64px;
  margin-bottom: var(--space-5);
}

.hero h1 {
  max-width: 20ch;
}

.hero .lede {
  max-width: 44ch;
  margin-left: auto;
  margin-right: auto;
}

.hero .cta-row {
  justify-content: center;
}

/* -------------------------------------------------------------------- */
/* Home — feature strip                                                  */
/* -------------------------------------------------------------------- */

.feature-strip {
  max-width: var(--content-max-width-wide);
  margin: 0 auto;
  padding: var(--space-7) var(--space-4);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
}

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-base);
  background: var(--color-accent-tint);
  color: var(--color-accent);
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
}

.feature-card:nth-child(2) .feature-card__icon {
  background: #d9efec;
  color: var(--color-teal);
}

.feature-card:nth-child(3) .feature-card__icon {
  background: #f3e3f7;
  color: #7a2e8c;
}

.feature-card h2 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  font-size: 1.0625rem;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  margin-bottom: 0;
  max-width: none;
}

/* -------------------------------------------------------------------- */
/* Home — app preview (illustrative mockup cards, not real screenshots) */
/* -------------------------------------------------------------------- */

.app-preview {
  border-top: 1px solid var(--color-border-light);
  background: var(--color-bg-alt);
}

.app-preview__inner {
  max-width: var(--content-max-width-wide);
  margin: 0 auto;
  padding: var(--space-7) var(--space-4);
  text-align: center;
}

.app-preview__inner h2 {
  margin-top: 0;
}

.app-preview__grid {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  text-align: left;
}

/* Real app screenshots in a minimal phone frame. Reuses the palette's ink
   color + card shadow (see docs/brand.md) rather than a new visual style. */
.app-shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.app-shot__phone {
  width: 100%;
  max-width: 248px;
  padding: 0.5rem;
  background: var(--color-ink);
  border-radius: 2.25rem;
  box-shadow: var(--shadow-card);
}

.app-shot__phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.85rem;
}

.app-shot figcaption {
  max-width: 248px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-muted);
  text-align: center;
  text-wrap: balance;
}

.home-links {
  border-top: 1px solid var(--color-border-light);
}

.home-links__inner {
  max-width: var(--content-max-width-wide);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-7);
}

.home-links__inner p {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  margin-bottom: var(--space-2);
}

/* -------------------------------------------------------------------- */
/* Home — getting started (onboarding help for internal testers)         */
/* -------------------------------------------------------------------- */

.getting-started {
  border-top: 1px solid var(--color-border-light);
  background: var(--color-bg);
}

.getting-started__inner {
  max-width: var(--content-max-width-wide);
  margin: 0 auto;
  padding: var(--space-7) var(--space-4);
}

.getting-started__intro h2 {
  margin-top: 0;
}

.getting-started__intro p {
  color: var(--color-text-muted);
  font-size: var(--font-size-lede);
  line-height: 1.55;
  max-width: 52ch;
}

.getting-started__body {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: start;
}

.steps {
  list-style: none;
  counter-reset: steps;
  margin: 0;
  padding: 0;
  max-width: none;
}

.steps__item {
  position: relative;
  padding-left: 3.25rem;
  margin-bottom: var(--space-5);
  counter-increment: steps;
}

.steps__item:last-child {
  margin-bottom: 0;
}

.steps__item::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-base);
  background: var(--color-accent-tint);
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.0625rem;
}

.steps__item h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-h3);
}

.steps__item p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.getting-started__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  position: sticky;
  top: calc(var(--space-6) + 26px);
}

.getting-started__figure .app-shot__phone {
  width: 100%;
  max-width: 232px;
}

.getting-started__figure figcaption {
  max-width: 232px;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-muted);
  text-align: center;
  text-wrap: balance;
}

.getting-started__beta {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border-light);
}

.getting-started__beta p {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  max-width: var(--measure);
  margin-bottom: var(--space-4);
}

/* -------------------------------------------------------------------- */
/* Legal pages                                                           */
/* -------------------------------------------------------------------- */

.legal main .container {
  max-width: var(--content-max-width);
}

.legal h2 {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border-light);
}

.legal h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.placeholder-notice {
  background: var(--color-placeholder-bg);
  border: 1px solid var(--color-placeholder-border);
  color: var(--color-placeholder-text);
  border-radius: var(--radius-base);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-small);
  margin-bottom: var(--space-5);
  max-width: var(--measure);
}

.placeholder-notice strong {
  font-weight: 700;
}

.effective-date {
  display: inline-block;
  font-size: var(--font-size-small);
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-3);
  margin-bottom: var(--space-5);
}

.legal-disclaimer {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-base);
  padding: var(--space-5);
  margin: var(--space-4) 0;
  max-width: var(--measure);
}

.legal-disclaimer h3 {
  margin-top: 0;
}

.legal-disclaimer h3:not(:first-child) {
  margin-top: var(--space-5);
}

/* -------------------------------------------------------------------- */
/* Support — FAQ                                                         */
/* -------------------------------------------------------------------- */

dl.faq {
  max-width: var(--measure);
  margin: var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

dl.faq > div {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-card);
  padding: var(--space-4) var(--space-5);
}

dl.faq dt {
  font-weight: 700;
  color: var(--color-ink);
  margin-top: 0;
}

dl.faq dd {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  max-width: none;
}

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

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  flex: none;
}

.site-footer__disclaimer {
  max-width: var(--content-max-width-wide);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-text-subtle);
}

.site-footer__disclaimer p {
  max-width: var(--measure);
  color: inherit;
}

.site-footer__disclaimer strong {
  color: var(--color-text-muted);
}

.site-footer__disclaimer a {
  color: var(--color-text-subtle);
  text-decoration-thickness: 1px;
}

.site-footer__disclaimer a:hover,
.site-footer__disclaimer a:focus {
  color: var(--color-accent);
}

.site-footer__inner {
  max-width: var(--content-max-width-wide);
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-4);
}

.site-footer__inner nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

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

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

@media (max-width: 900px) {
  .feature-strip {
    grid-template-columns: 1fr;
  }

  .app-preview__grid {
    grid-template-columns: 1fr;
  }

  .getting-started__body {
    grid-template-columns: 1fr;
  }

  .getting-started__figure {
    position: static;
    order: -1;
    margin-bottom: var(--space-4);
  }
}

@media (max-width: 640px) {
  :root {
    --font-size-h1: 2rem;
    --font-size-h2: 1.5rem;
    --font-size-lede: 1.0625rem;
  }

  .site-header__inner {
    padding: var(--space-3);
  }

  .container {
    padding: var(--space-5) var(--space-3);
  }

  .hero__inner {
    padding: var(--space-6) var(--space-3) var(--space-5);
  }

  .feature-strip {
    padding: var(--space-5) var(--space-3);
  }

  .app-preview__inner {
    padding: var(--space-6) var(--space-3);
  }

  .getting-started__inner {
    padding: var(--space-6) var(--space-3);
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
}
