/*
 * FoglioRosa — the site. The same toy box as the app (DESIGN.md §4): a quiet
 * warm-grey interface, Rosa's pink as the one colour that is not content, gold
 * only for what is earned, Notte for the brand moment, charcoal by night.
 * Values are the app's tokens (apps/mobile/src/ui/tokens.ts).
 */

/* Self-hosted (SIL OFL, docs/fonts/), so a visit sends nobody's address to a font CDN. */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('fonts/BricolageGrotesque_800ExtraBold.ttf') format('truetype');
  font-weight: 700 800;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('fonts/Figtree_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --pink-light: #f6698f; /* Rosa in the light */
  --pink-key: #e76487; /* the key: buttons, the band */
  --pink-shade: #e64874; /* the key's lip, the lane */
  --pink-text: #c2385f; /* pink text on white */
  --pink-wash: #fff2f4;
  --gold: #fdc535;
  --notte: #1d0c16;
  --notte-raised: #2e1423;
  --cream: #fff6ee;
  --plum-shadow: rgba(85, 17, 47, 0.18);

  --bg: #ffffff;
  --surface: #faf8f8;
  --surface-raised: #ffffff;
  --well: #f4f1f1;
  --rule: #eae5e6;
  --text: #1b1719;
  --text-muted: #62585c;
  --link: var(--pink-text);

  --radius-chip: 12px;
  --radius-button: 20px;
  --radius-card: 24px;
  --lip: 4px;

  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121011;
    --surface: #1b1719;
    --surface-raised: #241f21;
    --well: #2e282a;
    --rule: #4a4145;
    --text: #f4f1f1;
    --text-muted: #b3aaad;
    --link: #fe85a4;
    --plum-shadow: rgba(0, 0, 0, 0.4);
  }
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  font-weight: 600;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
}

h2 {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .container {
    padding: 0 32px;
  }
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  padding: 12px 16px;
  border-radius: var(--radius-chip);
  background: var(--pink-key);
  color: #fff;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

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

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

.site-header {
  background: var(--bg);
  border-bottom: 2px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.375rem;
  min-height: 48px;
}

.logo img {
  border-radius: 8px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 12px 0;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--text);
}

/* ── Hero: Notte, Rosa, the road ────────────────────────────────────────── */

.hero {
  background: radial-gradient(circle at 20% 0%, #4f2a42 0%, var(--notte) 60%);
  color: var(--cream);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 24px;
  align-items: center;
  padding-top: 48px;
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    padding-top: 72px;
  }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--notte);
  background: var(--cream);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  color: #fff;
}

.hero-sub {
  font-size: 1.1875rem;
  color: #f5d6c0;
  max-width: 34em;
}

.hero-art {
  justify-self: center;
  max-width: min(360px, 64vw);
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.35));
}

.store-note {
  font-size: 0.9375rem;
  color: #c99c88;
  margin-top: 12px;
}

/* The road: a clay lane with a dashed centre line, the app's progress device. */
.road {
  position: relative;
  height: 56px;
  margin-top: 24px;
  background: #3d1b30;
  border-top: 4px solid #4f2a42;
}

.road::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background: repeating-linear-gradient(
    90deg,
    var(--cream) 0 28px,
    transparent 28px 56px
  );
  opacity: 0.7;
}

/* ── Buttons: pressable things have weight ──────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: var(--radius-button);
  background: var(--pink-key);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  text-decoration: none;
  box-shadow: 0 var(--lip) 0 var(--pink-shade);
  transform: translateY(0);
  transition:
    transform 80ms ease-out,
    box-shadow 80ms ease-out;
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--pink-shade);
}

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

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--surface);
}

.section-lede {
  color: var(--text-muted);
  max-width: 40em;
  margin-bottom: 32px;
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--surface-raised);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: 0 4px 12px var(--plum-shadow);
}

.card p:last-child {
  margin-bottom: 0;
}

.card-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pink-text);
  margin-bottom: 8px;
}

@media (prefers-color-scheme: dark) {
  .card-tag {
    color: var(--link);
  }
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  background: var(--well);
  border-radius: var(--radius-chip);
  padding: 16px 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.3;
}

.facts strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--text);
}

/* Pro: the pink band, white bold on the key. */
.pro {
  background: var(--pink-key);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 32px 24px;
}

.pro h2 {
  color: #fff;
}

.pro ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
  font-weight: 700;
}

.pro p {
  font-weight: 600;
}

/* Sources and legal: plain (DESIGN.md §1.3). */
.plain {
  max-width: 44em;
}

.plain h2 {
  font-size: 1.375rem;
  margin-top: 2em;
}

.source dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 24px;
  margin: 0 0 16px;
}

@media (min-width: 640px) {
  .source dl {
    grid-template-columns: max-content 1fr;
  }
}

.source dt {
  font-weight: 700;
}

.source dd {
  margin: 0 0 8px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.legal-page {
  padding: 48px 0 64px;
}

.updated {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: 2em;
}

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

.site-footer {
  border-top: 2px solid var(--rule);
  padding: 32px 0 48px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-bottom: 12px;
}

.footer-links a {
  padding: 12px 0;
  display: inline-block;
}
