@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/Fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.wrap { padding-inline: var(--gutter); max-width: 1320px; margin-inline: auto; width: 100%; }

.h-display {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4.7vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-weight: 480;
  font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 0;
}
.h-section {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 460;
  font-variation-settings: "opsz" 96, "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}
.lede {
  font-size: clamp(1.05rem, 1.55vw, 1.32rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: var(--measure);
  text-wrap: pretty;
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}
.rule { height: 1px; background: var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: absent over the hero, then fades in softly and follows the reader down the page */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 var(--line);
  transition:
    opacity 0.75s var(--ease-page),
    transform 0.9s var(--ease-lift),
    visibility 0s linear 0.75s;
}
.is-past-hero .top-bar {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition:
    opacity 0.75s var(--ease-page),
    transform 0.9s var(--ease-lift),
    visibility 0s;
}
.no-js .top-bar { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
@supports not (backdrop-filter: blur(1px)) { .top-bar { background: var(--paper); } }
@media (prefers-reduced-motion: reduce) {
  .top-bar { transform: none; transition: opacity 0.3s linear, visibility 0s linear 0.3s; }
  .is-past-hero .top-bar { transition: opacity 0.3s linear, visibility 0s; }
}
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: 0.8rem;
  position: relative;
}
.top__right { display: flex; align-items: center; gap: 0.6rem; }
.wordmark {
  display: inline-flex; gap: 0.55rem; align-items: center;
  font-family: var(--font-serif); font-size: 1.4rem; letter-spacing: -0.02em; font-weight: 500;
  font-variation-settings: "opsz" 48, "SOFT" 40, "WONK" 0;
  color: var(--ink); text-decoration: none;
}
.wordmark .mark { transform: rotate(-8deg); color: var(--red); }

/* App Store style badge, drawn here, swap for Apple's official badge asset when you have it */
.badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--ink); color: var(--paper);
  border-radius: 0.65rem; padding: 0.5rem 0.95rem 0.5rem 0.75rem;
  text-decoration: none; line-height: 1; font-family: var(--font-sans);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.35s var(--ease-lift), box-shadow 0.35s var(--ease-lift);
  white-space: nowrap;
}
.badge:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.5); }
.badge small { display: block; font-size: 0.62rem; opacity: 0.78; letter-spacing: 0.01em; margin-bottom: 0.15rem; }
.badge strong { display: block; font-size: 1.12rem; font-weight: 600; letter-spacing: -0.015em; }
.badge__icon { width: 1.35rem; height: 1.35rem; flex: none; }
.badge__icon svg { display: block; width: 100%; height: 100%; }

/* Until the app ships the badge is an inert plate, not a button: paper, not ink,
   so nothing invites a click that would go nowhere. */
.badge--soon {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
  cursor: default;
}
.badge--soon:hover { transform: none; box-shadow: none; }
.badge--soon small { opacity: 0.62; }
.badge--soon .badge__icon { opacity: 0.68; }

.proof { display: flex; gap: 0.6rem 1.75rem; flex-wrap: wrap; }
.proof li { display: inline-flex; align-items: center; gap: 0.5rem; }
.proof li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); flex: none; }

/* Page furniture: engraved page numbers in the outer margin */
.folio {
  position: absolute; top: 50%; writing-mode: vertical-rl; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.3em; color: var(--ink-faint);
  text-transform: uppercase; pointer-events: none; white-space: nowrap;
}
.folio--left { left: calc(var(--gutter) * 0.35); transform: translateY(-50%) rotate(180deg); }
.folio--right { right: calc(var(--gutter) * 0.35); }
@media (max-width: 900px) { .folio { display: none; } }

/* ---------- Country control in the header ---------- */
.cc { position: relative; }
.cc__btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.38rem 0.6rem 0.38rem 0.42rem; border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 70%, transparent); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; line-height: 1;
  transition: border-color 0.3s var(--ease-page), transform 0.3s var(--ease-lift), background 0.3s var(--ease-page);
}
.cc__btn:hover { border-color: var(--ink-faint); transform: translateY(-1px); }
.cc__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cc__flag { display: block; width: 1.5rem; height: 1.05rem; border-radius: 0.14rem; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.14); }
.cc__flag .flag { display: block; width: 100%; height: 100%; }
.cc__flag:empty { background: linear-gradient(135deg, var(--paper-3), var(--paper-2)); }
.cc__name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc__caret { width: 0.6rem; height: 0.42rem; color: var(--ink-faint); transition: transform 0.3s var(--ease-lift); }
.cc.is-open .cc__caret { transform: rotate(180deg); }
.cc.is-open .cc__btn { border-color: var(--ink-faint); }
.cc__panel {
  position: absolute; top: calc(100% + 0.6rem); right: 0; z-index: 70;
  width: min(28rem, calc(100vw - 2 * var(--gutter)));
  padding: 0.9rem 0.9rem 0.7rem; border-radius: 0.9rem;
  background: color-mix(in srgb, var(--paper) 97%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgba(0,0,0,.35), 0 2px 8px -4px rgba(0,0,0,.18);
  animation: cc-in 0.28s var(--ease-lift);
}
.cc__label { margin: 0 0 0.6rem; }
@keyframes cc-in { from { opacity: 0; transform: translateY(-6px) scale(0.99); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cc__panel { animation: none; } .cc__btn, .cc__caret { transition: none; } }
@media (max-width: 620px) {
  .cc__name { display: none; }
  .badge small { display: none; }
  .badge strong { font-size: 0.95rem; }
  .cc__panel { position: fixed; top: 4rem; left: var(--gutter); right: var(--gutter); width: auto; }
}
