/* Ember Recipes marketing site — shared design system.
 *
 * Built from docs/build-plans/landing-page-redesign.md §7. Shared by index.html, /en/index.html and
 * install-windows.html so the three cannot drift; legal.css keeps the older privacy/terms pages.
 *
 * FONTS — deliberately the system stack for now. §7.3 specifies self-hosted Fraunces + Inter as a
 * ~150-250KB .woff2 subset; the fonts actually in the repo are 1.2MB of variable .ttf (Inter alone
 * is 856KB), which is the wrong trade for a page whose whole job happens in the first two seconds.
 * Subsetting them is an asset task like the screenshots — the @font-face block below is written and
 * ready, and needs only the four files from §8 dropping into /assets/fonts/.
 *
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/Fraunces-Black.woff2') format('woff2');
             font-weight: 900; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/assets/fonts/Fraunces-SemiBold.woff2') format('woff2');
             font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-Regular.woff2') format('woff2');
             font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2');
             font-weight: 600; font-display: swap; }
 */

:root {
  /* Paper (light) — the same tokens theme.dart gives the app's Editorial skin. */
  --bg: #f7f1e4;
  --surface: #f7f1e4;      /* Paper is flat by design — no separate card tone. */
  --surface-raised: #fffdfb;
  --header-fill: #f7f1e4;
  --ink: #1b1712;
  --muted: #6b6053;
  --border: #e4dac8;
  --accent: #c2410c;       /* text, links, focus rings */

  /* Button fills are mode-INVARIANT, and that is a fix, not an oversight. The old page filled
   * buttons with --ember, which in dark mode resolved to #ff9e6b behind hardcoded white text:
   * about 2.03:1, failing AA outright on the only working button on the page, in the mode a large
   * share of Windows users run. A saturated ember reads against both a cream and a near-black
   * page, so it has no reason to lighten the way body text does. */
  --ember-solid: #c2410c;
  --on-ember: #ffffff;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15120d;
    --surface: #1f1a14;
    --surface-raised: #1f1a14;
    --header-fill: #1a1611;
    --ink: #f6efe4;
    --muted: #b8aa97;
    --border: #3a322a;
    --accent: #ff9e6b;     /* text only — never a button fill, see above */
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Keyboard users get to the content without tabbing the whole header first. */
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ember-solid); color: var(--on-ember);
  padding: 12px 18px; border-radius: 0 0 var(--r-sm) 0; z-index: 10; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---- header ---------------------------------------------------------------------------------- */

.site-header {
  background: var(--header-fill);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand svg { width: 38px; height: 38px; border-radius: 9px; display: block; }
.brand b { font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: -0.2px; }
.lang { margin-left: auto; font-size: 15px; font-weight: 600; text-decoration: none; }

/* ---- type ------------------------------------------------------------------------------------ */

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.4px; margin: 0; }
h1 { font-weight: 900; font-size: clamp(34px, 6.2vw, 60px); line-height: 1.08; }
h2 { font-weight: 600; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; }
h3 { font-weight: 600; font-size: 20px; line-height: 1.25; }

p { margin: 14px 0; max-width: var(--measure); }
.lede { font-size: clamp(18px, 2.1vw, 21px); color: var(--muted); }

.eyebrow {
  font-family: var(--text); font-weight: 600; font-size: 13px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent); margin: 0 0 10px;
}

section { padding: 72px 0; border-top: 1px solid var(--border); }
section:first-of-type { border-top: 0; }

/* ---- buttons --------------------------------------------------------------------------------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 28px 0 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 15px 24px; border-radius: var(--r-md); font-weight: 600; font-size: 17px;
  border: 1px solid transparent; font-family: var(--text); cursor: pointer;
}
.btn-primary { background: var(--ember-solid); color: var(--on-ember); }
.btn-primary:hover { filter: brightness(0.92); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); }
/* Pre-launch: a plain button, deliberately NOT Apple's badge artwork — the official badge may only
 * link to a live listing, so using it now would be both wrong and unusable. Swapped at launch. */
.btn-soon { background: var(--surface-raised); color: var(--muted); border-color: var(--border); cursor: default; }
.micro { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

/* ---- screenshot placeholders ----------------------------------------------------------------- */

/* Every shot the page is waiting on states its number from §8 and what it has to PROVE, so the
 * placeholder is a shot list you can work from rather than a grey box. */
.shot {
  margin: 0; background: var(--surface-raised); border: 2px dashed var(--border);
  border-radius: var(--r-lg); display: flex; flex-direction: column; justify-content: center;
  padding: 24px; text-align: center; color: var(--muted);
}
.shot--hero { aspect-ratio: 9 / 16; max-width: 320px; width: 100%; }
/* Capped, not just 100%. A 9:16 phone screenshot at full column width is ~1300px tall on a
 * single-column layout, which buries the copy it is supposed to be illustrating — the steps read
 * as three enormous empty boxes with sentences lost between them. Centred so the cap doesn't leave
 * the shot hanging off one edge. */
.shot--step { aspect-ratio: 9 / 16; width: 100%; max-width: 260px; margin-inline: auto; }
.shot--wide { aspect-ratio: 4 / 3; width: 100%; max-width: 420px; margin-inline: auto; }
.shot .n {
  font-family: var(--display); font-weight: 900; font-size: 30px; color: var(--accent);
  line-height: 1; margin-bottom: 8px;
}
.shot .what { font-size: 14px; line-height: 1.45; margin: 0; max-width: none; }
.shot .tag { font-size: 12px; letter-spacing: 0.8px; text-transform: uppercase; margin: 10px 0 0; opacity: 0.75; }

/* ---- hero ------------------------------------------------------------------------------------ */

.hero { padding: 72px 0 64px; }
.hero .grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.trust-line { font-size: 15px; color: var(--muted); margin: 18px 0 0; }

/* ---- generic layouts ------------------------------------------------------------------------- */

.steps { display: grid; grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
.step .shot { margin-bottom: 18px; }
.step h3 { margin-bottom: 6px; }
.step p { margin-top: 0; font-size: 16px; color: var(--muted); }

.breadth { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 40px; }
.card {
  background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px;
}
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; font-size: 16px; color: var(--muted); }

.checks { list-style: none; padding: 0; margin: 18px 0 0; max-width: var(--measure); }
.checks li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--muted); font-size: 16px; }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

/* ---- pricing --------------------------------------------------------------------------------- */

.tiers { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 40px; }
.tier {
  background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column;
}
.tier--featured { border-color: var(--accent); border-width: 2px; }
.tier h3 { margin-bottom: 2px; }
.tier .for { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.tier ul { list-style: none; padding: 0; margin: 0 0 22px; }
.tier li { position: relative; padding-left: 26px; margin-bottom: 10px; font-size: 15.5px; color: var(--muted); }
.tier li::before { content: "·"; position: absolute; left: 8px; color: var(--accent); font-weight: 700; font-size: 20px; line-height: 1; }
.tier .btn { margin-top: auto; justify-content: center; }
.footnote { font-size: 14.5px; color: var(--muted); margin-top: 26px; }

/* ---- faq ------------------------------------------------------------------------------------- */

.faq { margin-top: 32px; max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 17px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--muted); font-size: 16px; }

/* ---- final band + footer --------------------------------------------------------------------- */

.band { text-align: center; }
.band .cta-row { justify-content: center; }

.site-footer {
  border-top: 1px solid var(--border); padding: 40px 0 56px;
  color: var(--muted); font-size: 14.5px;
}
.site-footer p { max-width: none; margin: 8px 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0; }

/* ---- install-windows page -------------------------------------------------------------------- */

.steps-numbered { counter-reset: step; list-style: none; padding: 0; margin: 36px 0 0; max-width: var(--measure); }
.steps-numbered > li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 34px; }
.steps-numbered > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 34px; height: 34px; border-radius: 50%; background: var(--ember-solid); color: var(--on-ember);
  display: grid; place-items: center; font-weight: 600; font-size: 16px; font-family: var(--text);
}
.steps-numbered h3 { margin-bottom: 4px; }
.steps-numbered p { margin-top: 4px; color: var(--muted); font-size: 16px; }
.callout {
  background: var(--surface-raised); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--r-sm); padding: 18px 20px; margin: 28px 0;
}
.callout p { margin: 0; font-size: 16px; }

/* ---- responsive ------------------------------------------------------------------------------ */

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .breadth { grid-template-columns: repeat(2, 1fr); }
  .tiers { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 940px) {
  .hero .grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
  .shot--hero { max-width: 360px; margin-left: auto; }
}
