/*
 * The website in the app's own clothes: src/theme/tokens.ts, blush in the light
 * and noir in the dark, the same four fonts, and the card with one corner cut
 * short like a torn note. The values are copied from tokens.ts by hand — a
 * colour changed there and not here makes the site a shade off the app, which
 * is a cosmetic drift, not a broken promise, so nothing tests it.
 */

@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/BricolageGrotesque_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/BricolageGrotesque_800ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/Manrope_500Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/Manrope_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/IBMPlexMono_500Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light dark;

  /* blush — tokens.ts, the light table */
  --bg: #ffebea;
  --surface: #fefafa;
  --ink: #891535;
  --body: #382528;
  --muted: #553d40;
  --faint: #75575b;
  --rose: #e1556b;
  --rose-deep: #d23852;
  --rose-pale: #f4b8c0;
  /* Links and small labels. The app's roseDeep (#d23852) is 4.1:1 on blush,
     under the 4.5:1 small text needs, so the site deepens it; the dark one passes. */
  --link: #b02a43;
  --hairline: rgba(83, 36, 44, 0.10);
  --hairline-soft: rgba(83, 36, 44, 0.06);
  --rose-on: rgba(225, 85, 107, 0.12);

  --display: 'Bricolage Grotesque', 'Noto Sans Georgian', 'BPG Arial', system-ui, sans-serif;
  --text: 'Manrope', 'Noto Sans Georgian', 'BPG Arial', 'Sylfaen', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* radius.note and radius.card: the bottom-left corner cut short */
  --note: 18px 18px 18px 6px;
  --card: 20px 20px 20px 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* noir — tokens.ts, the dark table */
    --bg: #0e0c0c;
    --surface: #1a1717;
    --ink: #fdc4cd;
    --body: #edd4d8;
    --muted: #dac3c6;
    --faint: #bca0a5;
    --rose: #f79caa;
    --rose-deep: #e86c7f;
    --rose-pale: #f1d0d5;
    --link: #e86c7f;
    --hairline: rgba(255, 255, 255, 0.10);
    --hairline-soft: rgba(255, 255, 255, 0.06);
    --rose-on: rgba(247, 156, 170, 0.12);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 500 1.0625rem/1.65 var(--text);
  overflow-wrap: break-word;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--surface); color: var(--ink); padding: 0.5rem 0.9rem; border-radius: var(--note);
  z-index: 2;
}
.skip:focus { top: 1rem; }

/* ── the bar ─────────────────────────────────────────────────────────── */

.top {
  max-width: 64rem; margin: 0 auto; padding: 1.25rem 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--ink); text-decoration: none;
  font: 800 1.45rem/1 var(--display); letter-spacing: -0.02em;
}
.mark path { fill: none; stroke-width: 76; stroke-linecap: round; }
.mark-a { stroke: var(--rose-pale); }
.mark-b { stroke: var(--rose); }

.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1.1rem; }
.top nav a {
  color: var(--muted); text-decoration: none;
  font: 500 0.78rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.45rem 0;
}
.top nav a[lang='ka'], :lang(ka) .top nav a { text-transform: none; letter-spacing: 0; font: 600 0.9rem/1 var(--text); }
.top nav a:hover, .top nav a[aria-current='page'] { color: var(--ink); }
.top nav a[aria-current='page'] { box-shadow: inset 0 -2px 0 var(--rose); }
.top nav .lang {
  border: 1px solid var(--hairline); border-radius: 999px; padding: 0.4rem 0.8rem; color: var(--ink);
}

main { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem 4rem; }

/* ── the small labels: English in capitals, Georgian as it is ─────────── */

.label {
  margin: 0 0 0.9rem;
  color: var(--faint);
  font: 500 0.78rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
:lang(ka) .label { font: 700 0.95rem/1.4 var(--text); letter-spacing: 0; text-transform: none; color: var(--muted); }

/* ── the homepage ────────────────────────────────────────────────────── */

.hero { padding: 3.5rem 0 3rem; max-width: 46rem; }
.slogan {
  margin: 0 0 2rem;
  font: 800 clamp(2.6rem, 8vw, 5.2rem)/0.98 var(--display); letter-spacing: -0.035em;
  color: var(--ink);
}
:lang(ka) .slogan { font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; font-size: clamp(2.1rem, 6.4vw, 4.2rem); }
.slogan span { display: block; }
/* The chance going as it is read, as on the app's first screen — but no
   fainter than 3:1 against the ground, since the words are the page's h1. */
.slogan .fade-1 { opacity: 0.85; }
.slogan .fade-2 { opacity: 0.7; }
.slogan .fade-3 { opacity: 0.55; }

.lede { font-size: 1.3rem; line-height: 1.5; color: var(--ink); font-weight: 700; margin: 0 0 0.75rem; }
.hero p:not(.lede) { max-width: 38rem; color: var(--muted); margin: 0; }
.hero p:not(.lede) + p { margin-top: 0.75rem; }

.cards {
  list-style: none; margin: 0 0 3rem; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem;
  counter-reset: card;
}
.note {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--card);
  padding: 1.4rem 1.4rem 1.5rem;
}
.cards .note { counter-increment: card; position: relative; }
.cards .note::before {
  content: counter(card, decimal-leading-zero);
  display: block; margin-bottom: 1.6rem;
  color: var(--link); font: 500 0.78rem/1 var(--mono); letter-spacing: 0.08em;
}
.cards h3 { margin: 0 0 0.45rem; color: var(--ink); font: 700 1.3rem/1.2 var(--display); letter-spacing: -0.01em; }
.cards p { margin: 0; color: var(--muted); }

.promise { background: var(--rose-on); border-color: transparent; max-width: 46rem; padding: 1.8rem 1.8rem 1.6rem; }
.promise .label { color: var(--link); }
.promise .big { font: 700 1.35rem/1.45 var(--display); color: var(--ink); margin: 0 0 1rem; letter-spacing: -0.005em; }
:lang(ka) .promise .big { font-family: var(--text); }
.promise p { margin: 0 0 0.9rem; }
.promise p:last-child { margin-bottom: 0; }
.more { font-weight: 700; text-decoration: none; }

.availability { margin: 2.5rem 0 0; color: var(--faint); font-size: 0.95rem; max-width: 40rem; }

/* ── the documents ───────────────────────────────────────────────────── */

.doc { max-width: 42rem; padding-top: 2.5rem; }
.doc h1 {
  margin: 0 0 0.75rem; color: var(--ink);
  font: 800 clamp(2.2rem, 6vw, 3.4rem)/1.04 var(--display); letter-spacing: -0.03em;
}
:lang(ka) .doc h1 { font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; font-size: clamp(1.9rem, 5vw, 2.8rem); }
.doc .lede { font-weight: 500; color: var(--muted); font-size: 1.2rem; }
.meta { margin: 0 0 2rem; color: var(--faint); font: 500 0.8rem/1.4 var(--mono); letter-spacing: 0.04em; }
:lang(ka) .meta { font-family: var(--text); letter-spacing: 0; }

.toc {
  background: var(--surface); border: 1px solid var(--hairline-soft); border-radius: var(--card);
  padding: 1.2rem 1.4rem; margin: 0 0 2.75rem;
}
.toc ol { margin: 0; padding-left: 1.4rem; columns: 2 15rem; column-gap: 2rem; }
.toc li { margin: 0.15rem 0; break-inside: avoid; color: var(--faint); font-size: 0.92rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
/* The English headings are written in capitals, which the list keeps, small and
   in mono like the labels: lowercasing them would make "google" of Google. */
:lang(en) .toc li { font: 500 0.74rem/1.5 var(--mono); letter-spacing: 0.05em; }

.doc section { padding-top: 1.75rem; margin-top: 0.25rem; border-top: 1px solid var(--hairline); scroll-margin-top: 1rem; }
.doc section:first-of-type { border-top: 0; }
.toc + section { border-top: 0; }
.doc section p { margin: 0 0 1rem; }
.doc section .label { color: var(--link); }
:lang(ka) .doc section .label { color: var(--ink); }

.steps { margin: 0 0 1rem; padding-left: 1.4rem; }
.steps li { margin: 0 0 0.5rem; padding-left: 0.3rem; }
.steps li::marker { color: var(--link); font: 500 0.9rem var(--mono); }

/* ── the foot ────────────────────────────────────────────────────────── */

.foot {
  max-width: 64rem; margin: 0 auto; padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--hairline);
  color: var(--faint); font-size: 0.92rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-bottom: 1rem; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot p { margin: 0.25rem 0; }
.small { font-size: 0.85rem; }

@media (max-width: 34rem) {
  .top { padding: 1rem 1.1rem; }
  main { padding: 0 1.1rem 3rem; }
  .hero { padding-top: 2rem; }
  .foot { padding: 1.75rem 1.1rem 2.5rem; }
}

@media print {
  .top nav, .skip, .toc, .foot nav { display: none; }
  body { background: #fff; color: #000; }
  .note, .toc { border: 1px solid #ccc; }
}
