/* Folcadi landing page — no build step, no external assets.
   Palette follows the app's Folcadi day theme (cream surfaces) with the
   brand red/amber accent, so the site and the app look related. */

:root {
  --page: 68rem;
  --gutter: clamp(1.1rem, 4vw, 2.6rem);

  --bg: #f7f1e4;
  --bg-accent: #efe4cf;
  --surface: #fffcf4;
  --surface-2: #f2e9d8;
  --ink: #221d16;
  --ink-soft: #5c5344;
  --line: #ddd0b6;
  --brand: #D32F2F;
  --brand-ink: #B71C1C;
  --brand-soft: #FDECEA;
  /* Text/background pairs that must pass contrast: white on #D32F2F is about
     4.6:1, so filled buttons use the darker brand red. */
  --btn-bg: #B71C1C;
  --btn-bg-hover: #8E1616;
  --btn-ink: #fff;
  --shadow: 0 18px 40px -24px rgb(46 35 18 / 45%);
  --radius: 16px;
  --radius-lg: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101010;
    --bg-accent: #161616;
    --surface: #191919;
    --surface-2: #232323;
    --ink: #f2ede3;
    --ink-soft: #b3aa9c;
    --line: #34302a;
    --brand: #FF8A00;
    --brand-ink: #FFC107;
    --brand-soft: #2A1A0A;
    /* In dark mode the accent is light, so filled controls flip to dark ink. */
    --btn-bg: #FFC107;
    --btn-bg-hover: #FFD24D;
    --btn-ink: #2A1A0A;
    --shadow: 0 18px 40px -24px rgb(0 0 0 / 80%);
  }
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--brand-soft), transparent 70%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--brand-ink); }
a:hover { color: var(--brand); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: .6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  z-index: 10;
}
.skip:focus { top: 1rem; }

/* ── Header ──────────────────────────────────────────────────────── */

.site-header {
  max-width: var(--page);
  margin-inline: auto;
  padding: 1.4rem var(--gutter) 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; display: block; border-radius: 8px; }
.brand-name { font-weight: 650; font-size: 1.15rem; letter-spacing: -0.01em; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.4rem;
  font-size: .95rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: .35rem 0;
}
.site-nav a:hover { color: var(--ink); }

/* Narrow phones: the nav drops to its own line instead of crowding the
   wordmark against the right edge. */
@media (max-width: 560px) {
  .site-header { padding-bottom: .2rem; }
  .site-nav { width: 100%; gap: .1rem 1.1rem; }
}

/* ── Layout ──────────────────────────────────────────────────────── */

.hero,
.section,
.stats,
.site-footer {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.hero h1 {
  font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.5rem);
  font-weight: 680;
  max-width: 18ch;
}

.lead {
  margin-top: 1.1rem;
  font-size: clamp(1.02rem, .95rem + .35vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 46ch;
}

.actions {
  margin-top: 1.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
}
.button:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  color: var(--ink);
}
.button-primary {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-ink);
}
.button-primary:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-bg-hover);
  color: var(--btn-ink);
}

.fineprint {
  margin-top: 1.1rem;
  font-size: .9rem;
  color: var(--ink-soft);
}

/* ── Hero screenshot ─────────────────────────────────────────────── */

.phone {
  margin: 0;
  justify-self: center;
  width: min(23rem, 100%);
}

/* A real screenshot, framed by its own rounded corners. No padding: the
   shot is the frame, so it keeps every pixel of the app UI. */
.phone-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}

.phone figcaption {
  margin-top: .8rem;
  font-size: .74rem;
  line-height: 1.4;
  color: var(--ink-soft);
  text-align: center;
}

/* ── Numbers strip ───────────────────────────────────────────────── */

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: .4rem clamp(1.4rem, 5vw, 3.5rem);
  padding-block: 1.1rem;
  border-block: 1px solid var(--line);
}

.stat {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  color: var(--ink-soft);
  font-size: .95rem;
}

.stat strong {
  color: var(--ink);
  font-size: clamp(1.4rem, 1.15rem + .9vw, 1.9rem);
  font-weight: 680;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Dev preview only: the numbers are sample data, and this says so. */
.stats-preview { border-block-style: dashed; }
.stat-note {
  flex-basis: 100%;
  text-align: center;
  color: var(--brand-ink);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ── Sections ────────────────────────────────────────────────────── */

.section { padding-block: clamp(2.4rem, 5vw, 4rem); }
.section h2 {
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.1rem);
  font-weight: 660;
}
.section > p { margin-top: .8rem; color: var(--ink-soft); max-width: 52ch; }

.cards {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 720px) { .cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.25rem;
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.05rem; font-weight: 640; }
.card p { margin-top: .5rem; color: var(--ink-soft); font-size: .95rem; }

.card-icon {
  width: 30px;
  height: 30px;
  margin-bottom: .8rem;
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-link { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.card-link .button { margin-top: auto; }
.card-link p { margin-bottom: .9rem; }

/* Direct APK block: a second action in the Android card. It must not take the
   card's auto margin again, or the two buttons drift apart. */
.card-link .apk-download {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
}
.card-link .apk-download .button { margin-top: 0; }
.card-link .apk-download .fineprint { margin-top: 0; }

/* ── Split (open development) ────────────────────────────────────── */

.split { display: grid; gap: 1.4rem; }
@media (min-width: 860px) {
  .split { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: start; }
}

.links { display: grid; gap: .55rem; align-content: start; }
.links a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
  font-size: .95rem;
}
.links a:hover { border-color: var(--brand); color: var(--ink); }
.links a span { color: var(--brand); }

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer { padding-block: 2.2rem 2.6rem; border-top: 1px solid var(--line); margin-top: 1rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: baseline;
}
.footer-brand { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: .9rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .button:hover, .card:hover { transform: none; }
}

/* ── Long-form pages (privacy policy) ────────────────────────────── */

.page {
  max-width: 46rem;
  margin-inline: auto;
  padding: clamp(1.8rem, 4vw, 3rem) var(--gutter) clamp(2rem, 4vw, 3rem);
}
.page h1 {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem);
  font-weight: 680;
}
.page .meta {
  margin-top: .6rem;
  color: var(--ink-soft);
  font-size: .92rem;
}
.page h2 {
  margin-top: 2.3rem;
  font-size: clamp(1.15rem, 1.05rem + .5vw, 1.35rem);
  font-weight: 660;
}
.page h3 {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 640;
}
.page p { margin-top: .85rem; }
.page ul {
  margin: .85rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: .45rem;
}
.page li::marker { color: var(--brand); }
.page a { text-decoration: underline; text-underline-offset: 2px; }

.note {
  margin-top: 1.1rem;
  padding: .95rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
}
.note p { margin: 0; }
