/* Franki website. Warm paper and ink, like the app: a cream page and white cards in
   light mode, warm near-black and charcoal in dark, with colour only from decks and
   the butter highlight. Tokens mirror Franki/DesignSystem/Theme.swift and DeckPalette. */

:root {
  color-scheme: light dark;
  --ink: #1b1a17;
  --paper: #f6f2ea;
  --ink2: #4a463f;
  --ink3: #6b655b;
  --hair: rgba(60, 40, 10, .12);
  --surface: #fff;
  --surface2: #efeae0;
  --shadow: rgba(60, 40, 10, .08);
  --butter: #f8d66d;
  --sky: #9ecff5;
  --peach: #f4a98c;
  --mint: #a8ddb5;
  --lilac: #c9b8f0;
  --rose: #f2b5d4;
  --on-accent: #1b1a17;
  --sans: 'Geist', -apple-system, 'SF Pro Text', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --spring: cubic-bezier(.2, .8, .2, 1);
  --content: 1240px;
}

/* The inverted band is always the opposite of the page. */
.inv {
  --ink: #f6f2ea;
  --paper: #1b1a17;
  --ink2: #d2ccc0;
  --ink3: #a39d92;
  --hair: rgba(255, 255, 255, .14);
  --surface: #26241f;
  --surface2: #33302a;
  --shadow: rgba(0, 0, 0, .3);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f6f2ea;
    --paper: #13120f;
    --ink2: #d2ccc0;
    --ink3: #a39d92;
    --hair: rgba(255, 255, 255, .12);
    --surface: #1f1d19;
    --surface2: #2b2823;
    --shadow: rgba(0, 0, 0, .35);
  }
  .inv {
    --ink: #1b1a17;
    --paper: #f6f2ea;
    --ink2: #4a463f;
    --ink3: #6b655b;
    --hair: rgba(60, 40, 10, .12);
    --surface: #fff;
    --surface2: #efeae0;
    --shadow: rgba(60, 40, 10, .08);
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: hidden would make body a scroll container and stop the
     scroll-driven reveals from ever running. */
  overflow-x: clip;
}

img { max-width: 100%; }

a { color: var(--ink); text-decoration: none; }
a:not(.btn):hover { color: var(--ink2); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible { border-radius: 999px; }
.cta :focus-visible { outline-color: var(--paper); }

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.skip:focus { top: 16px; }
.skip:hover { color: var(--paper); }

.wrap { max-width: var(--content); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

h1, h2, h3, p { margin: 0; }

/* Small uppercase monospaced labels, as in the app. */
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink2);
}
.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink3);
}

.display {
  font-size: clamp(44px, 6vw, 80px);
  line-height: .98;
  font-weight: 800;
  letter-spacing: -.04em;
}

.lede { font-size: 19px; line-height: 1.5; color: var(--ink2); }
.body { font-size: 17px; line-height: 1.5; color: var(--ink2); }
.fineprint { font-family: var(--mono); font-size: 13px; color: var(--ink3); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-quiet { border: 1px solid var(--hair); background: var(--surface); color: var(--ink); }
.btn-small { gap: 10px; min-height: 44px; padding: 0 22px; font-size: 15px; }
.btn-large { min-height: 60px; padding: 0 28px; font-size: 18px; }

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  padding-bottom: 24px;
}
.mark { display: flex; align-items: center; gap: 12px; }
.mark svg { display: block; flex: none; }
.wordmark { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.navlinks { display: flex; gap: 32px; font-size: 15px; font-weight: 500; }
@media (max-width: 760px) { .navlinks { display: none; } }

/* ---------- Tiles ---------- */

.tile {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 32px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.tile h3 { font-size: 34px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; }
@media (max-width: 420px) { .tile { padding: 28px; border-radius: 28px; } }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding-top: 32px;
  padding-bottom: 56px;
  border-top: 1px solid var(--hair);
  font-size: 14px;
  color: var(--ink3);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .wordmark { font-size: 18px; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }

@media (max-width: 420px) {
  .display { font-size: clamp(36px, 11vw, 44px); }
}

/* ---------- Simple pages (privacy, support) ---------- */

.page { padding-top: 56px; padding-bottom: 128px; }
.page-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; padding-bottom: 56px; }
.prose { max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.prose h2 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; padding-top: 32px; }
.prose h3 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; padding-top: 12px; }
.prose p, .prose li { font-size: 17px; line-height: 1.55; color: var(--ink2); }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface); border: 1px solid var(--hair); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.prose a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); }
.contact-tile { margin-top: 8px; }
.prose .contact-title { padding-top: 0; }
.faq details { border-top: 1px solid var(--hair); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); font-weight: 500; color: var(--ink3); }
.faq details[open] summary::after { content: '−'; }
.faq details > p, .faq details > ul { margin-top: 12px; }

/* ---------- Motion: calm and springy, like the app. All of it stops under Reduce Motion. ---------- */

.press { transition: transform .18s var(--spring), opacity .18s; }
.press:hover { transform: translateY(-2px); }
.press:active { transform: scale(.96); }
.mark .top { transition: transform .4s var(--spring); transform-origin: 47px 40px; }
.mark:hover .top { transform: rotate(8deg) translate(4px, -3px); }

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