/* Wareform — carries the app's "Energy" theme to the web.
   Palette and faces are lifted from Shared/Theme/AppTheme.swift so the site
   and the app read as one product. Fonts are self-hosted: the CSP in
   _headers is style-src 'self', and self-hosting also means no third-party
   request just to render a headline. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-style: italic; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist.ttf") format("truetype");
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono.ttf") format("truetype");
  font-weight: 100 900; font-display: swap;
}

:root {
  --bg:        #FFF4E0;
  --bg-alt:    #FFEAC4;
  --card:      #FFFFFF;
  --surface:   #FFE8C2;
  --ink:       #1A1005;
  --ink-2:     rgba(26, 16, 5, .62);
  --ink-3:     rgba(26, 16, 5, .38);
  --rule:      rgba(26, 16, 5, .10);
  --accent:    #FF6600;
  --accent-lt: #FFD700;
  --accent-dp: #FF1677;
  /* accentDeep → accent → accentLight, the app's CTA gradient order */
  --cta: linear-gradient(100deg, #FF1677 0%, #FF6600 55%, #FFD700 100%);
  --wrap: 68rem;
  --prose: 66ch;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Geist, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: var(--prose); }

h1, h2, h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.75rem, 8vw, 5rem); }
h2 { font-size: clamp(1.85rem, 4vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1rem; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dp); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.kicker {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
}
.mono { font-family: "Geist Mono", ui-monospace, monospace; }

/* ── Header ─────────────────────────────────────────────── */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.4rem 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; display: block; }
.brand span { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 1.45rem; }
.site-nav { display: flex; gap: 1.4rem; font-size: .95rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: 3.5rem 0 1rem; }
.hero .lede {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--ink-2);
  max-width: 46ch;
  margin-top: 1.4rem;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 3rem; align-items: center;
}
@media (max-width: 56rem) { .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; } }

.badge-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; align-items: center; }
.cta {
  display: inline-block; background: var(--cta); color: #fff;
  font-weight: 600; text-decoration: none;
  padding: .85rem 1.9rem; border-radius: 999px;
  box-shadow: 0 8px 24px -10px rgba(255, 22, 119, .7);
}
.cta:hover { color: #fff; filter: brightness(1.05); }
.cta[aria-disabled="true"] { opacity: .55; cursor: default; box-shadow: none; }
.cta-note { font-size: .875rem; color: var(--ink-3); }

/* Phone captures are 460x1000. Capped and centred so a tall screenshot
   sits beside its copy instead of setting the height of the whole section. */
.shot {
  width: auto; max-width: 100%;
  max-height: 34rem; height: auto;
  display: block; margin: 0 auto;
  border-radius: 26px;
  box-shadow: 0 30px 60px -30px rgba(26, 16, 5, .45);
}
@media (max-width: 56rem) { .shot { max-height: 28rem; } }

/* ── Feature blocks ─────────────────────────────────────── */
section { padding: 3.25rem 0; }
/* 19rem, not 15rem: at 15rem a wide desktop fits four columns and the
   headings break mid-phrase ("Plans written / for your goal"). Three
   columns keeps each title on one or two clean lines. */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.1rem; margin-top: 2rem; }
.card {
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 20px; padding: 1.5rem 1.6rem;
}
.card h3 { font-style: normal; font-family: Geist, sans-serif; font-weight: 600; font-size: 1.05rem; margin-bottom: .5rem; }
.card p { color: var(--ink-2); font-size: .95rem; margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 56rem) { .split, .split.flip { grid-template-columns: 1fr; gap: 2rem; }
  .split.flip > :first-child { order: 0; } }
.split ul { color: var(--ink-2); padding-left: 1.15rem; margin: 0; }
.split ul li { margin-bottom: .5rem; }

/* ── Document pages ─────────────────────────────────────── */
.doc { padding: 2.5rem 0 1rem; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.1rem); }
.doc h2 { font-size: 1.5rem; margin: 2.5rem 0 .9rem; }
.doc h3 { font-size: 1.08rem; font-family: Geist, sans-serif; font-style: normal; font-weight: 600; margin: 1.6rem 0 .5rem; }
.doc p, .doc li { color: var(--ink-2); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: .5rem; }
.updated { font-family: "Geist Mono", monospace; font-size: .8125rem; color: var(--ink-3); margin-top: .6rem; }

.callout {
  background: var(--card); border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 14px; padding: 1.15rem 1.35rem; margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }

table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: .95rem; }
.table-scroll { overflow-x: auto; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; color: var(--ink); font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; }
td { color: var(--ink-2); }

/* ── Footer ─────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid var(--rule);
  margin-top: 3rem; padding: 2.25rem 0 3rem;
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  font-size: .9rem; color: var(--ink-3);
}
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.site-foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
