/* Same families as the iOS app (SIL OFL 1.1), self-hosted, latin subset. Roles: see README. */
@font-face{font-family:"Archivo Expanded";font-weight:700;font-style:normal;font-display:swap;src:url(/fonts/ArchivoExpanded-Bold.woff2) format("woff2")}
@font-face{font-family:"Archivo SemiExpanded";font-weight:600;font-style:normal;font-display:swap;src:url(/fonts/ArchivoSemiExpanded-SemiBold.woff2) format("woff2")}
@font-face{font-family:"Archivo SemiExpanded";font-weight:700;font-style:normal;font-display:swap;src:url(/fonts/ArchivoSemiExpanded-Bold.woff2) format("woff2")}
/* The app maps regular and below to Medium, medium and above to Bold. */
@font-face{font-family:"Space Grotesk";font-weight:400 500;font-style:normal;font-display:swap;src:url(/fonts/SpaceGrotesk-Medium.woff2) format("woff2")}
@font-face{font-family:"Space Grotesk";font-weight:600 800;font-style:normal;font-display:swap;src:url(/fonts/SpaceGrotesk-Bold.woff2) format("woff2")}

/* Metric-matched fallbacks so the swap does not shift layout. */
@font-face{font-family:"Archivo Expanded Fallback";src:local("Arial Bold"),local("Arial");font-weight:700;size-adjust:134.5%;ascent-override:65.3%;descent-override:15.6%;line-gap-override:0%}
@font-face{font-family:"Archivo SemiExpanded Fallback";src:local("Arial Bold"),local("Arial");font-weight:600 700;size-adjust:120.6%;ascent-override:72.8%;descent-override:17.4%;line-gap-override:0%}
@font-face{font-family:"Space Grotesk Fallback";src:local("Arial");font-weight:400 800;size-adjust:102.3%;ascent-override:96.2%;descent-override:28.6%;line-gap-override:0%}

/* Ocular site. Dark only, system fonts only, no build step.
   Roles: Burgundy = brand, Amber = touched/active, Emerald = locked/granted. */
:root {
  color-scheme: dark;
  --bg: #08090b;
  --bg-deep: #050608;
  --surface: #111318;
  --surface-raised: #262930;
  --border: rgba(243, 241, 236, 0.14);
  --border-strong: rgba(243, 241, 236, 0.28);
  --ink: #f3f1ec;
  --ink-muted: rgba(243, 241, 236, 0.8);
  --ink-subtle: rgba(243, 241, 236, 0.62);
  --burgundy: #7a1c2e;
  --burgundy-hover: #922338;
  --burgundy-deep: #4e111e;
  --amber: #e8832a;
  --emerald: #24a876;
  --emerald-ink: #a6f3d4;
  --emerald-bg: rgba(8, 9, 11, 0.82);
  --emerald-border: rgba(36, 168, 118, 0.45);

  --font-sans: "Space Grotesk","Space Grotesk Fallback",-apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: 16px;
  --radius: 3px;
  --radius-sm: 2px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --measure: 720px;
  --wide: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image: linear-gradient(180deg, rgba(122, 28, 46, 0.16) 0%, rgba(8, 9, 11, 0) 420px);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-sans);
  overflow-x: hidden;
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }

h1, h2, h3 { line-height: 1.04; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 4.6vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--amber); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code { font: 0.9em var(--font-mono); background: var(--surface); padding: 0.1em 0.4em; border-radius: 6px; overflow-wrap: anywhere; }
strong { font-weight: 700; }

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

.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 10; padding: 12px 16px; background: var(--ink); color: var(--bg); border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 8px; }

.container, .wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 2; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-block: 8px; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-mark .arc { stroke: var(--ink); }
.brand-wordmark { font: 800 1.05rem/1 var(--font-sans); letter-spacing: 0.16em; }
.site-nav { display: flex; flex-wrap: wrap; margin-inline: -10px; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px; font: 600 0.78rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); text-decoration: none; }
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--amber); }
@media (min-width: 640px) { .nav-link { padding-inline: 14px; } .site-nav { margin-inline: -14px; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font: 700 1rem/1 var(--font-sans); text-decoration: none; cursor: pointer; transition: transform 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: #ffffff; border-color: var(--amber); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--ink-muted); }
.btn:active { transform: scale(0.98); }

/* App Store button: built in CSS/SVG, not Apple's badge artwork. */
.appstore { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 24px 8px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); text-decoration: none; transition: transform 0.18s var(--ease), background-color 0.18s var(--ease); }
.appstore:hover { background: #fff; }
.appstore:active { transform: scale(0.98); }
.appstore svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.appstore-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore-small { font: 500 0.7rem/1.1 var(--font-sans); letter-spacing: 0.02em; }
.appstore-big { font: 700 1.3rem/1.15 var(--font-sans); letter-spacing: -0.01em; white-space: nowrap; }

/* ---------- Legacy page content (privacy, support, 404) ---------- */
main > .container { padding-block: 32px 64px; }
main > .container > * { max-width: var(--measure); }
.meta-line { color: var(--ink-subtle); font: 500 0.85rem var(--font-mono); margin: 12px 0 24px; }
.lead { font-size: 1.15rem; color: var(--ink-muted); margin: 16px 0 24px; }
.callout { margin: 0 0 40px; padding: 18px 20px; background: var(--emerald-bg); border: 1px solid color-mix(in srgb, var(--emerald) 45%, transparent); border-radius: var(--radius-sm); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font: 700 0.78rem/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--emerald-ink); margin: 0 0 8px; }
.prose-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.prose-section h2 { font-size: 1.3rem; margin-bottom: 14px; }
.prose-section ul { padding-left: 1.25em; margin: 0 0 1em; }
.prose-section li { margin-bottom: 0.6em; color: var(--ink-muted); }
.prose-section p { color: var(--ink-muted); }
.prose-section strong { color: var(--ink); }
.contact-card { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; margin: 28px 0 48px; padding: 24px 0; background: transparent; border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border); border-radius: 0; }
.contact-card h2 { font-size: 1.25rem; margin-bottom: 10px; }
.contact-card p { color: var(--ink-muted); }
.contact-email { font: 600 1rem var(--font-mono); overflow-wrap: anywhere; margin: 0; }
.faq-list { display: grid; gap: 0; margin-top: 20px; padding-top: 8px; border-top: 1px solid var(--border); }
.faq-item { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 14px 4px; font-weight: 650; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; font: 600 1.2rem/1 var(--font-mono); color: var(--amber); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-body { padding: 0 4px 16px; color: var(--ink-muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (min-width: 640px) { .contact-card { flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---------- Landing ---------- */
.hero { padding-block: 24px 56px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.hero-lockup img { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 0 0 1px var(--border); }
.hero-lockup span { font: 700 0.78rem/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero-sub { font-size: 1.12rem; color: var(--ink-muted); max-width: 34em; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.hero-note { margin: 16px 0 0; font: 500 0.8rem/1.5 var(--font-mono); letter-spacing: 0.04em; color: var(--ink-subtle); }

/* Decorative viewfinder: illustration only, not a screenshot. */
.finder { position: relative; width: min(100%, 360px); aspect-ratio: 4 / 5; margin-inline: auto; border-radius: 22px; background: radial-gradient(70% 55% at 50% 48%, rgba(181, 42, 68, 0.45), rgba(122, 28, 46, 0.2) 45%, transparent 75%), linear-gradient(160deg, #1b1d22, #0b0c0e); border: 1px solid var(--border); overflow: hidden; }
.finder-mark { position: absolute; inset: 22% 14% 30%; width: 72%; height: auto; margin: auto; }
.finder-mark .arc { stroke: var(--ink); stroke-opacity: 0.94; }
.finder .corner { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(243, 241, 236, 0.5); }
.finder .c1 { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.finder .c2 { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.finder .c3 { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.finder .c4 { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.chip { position: absolute; display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(11, 12, 14, 0.72); border: 1px solid var(--border-strong); font: 700 0.74rem/1 var(--font-mono); letter-spacing: 0.06em; color: var(--ink); white-space: nowrap; }
.chip.amber { color: var(--amber); border-color: rgba(232, 131, 42, 0.5); }
.chip.lock { color: var(--emerald-ink); background: var(--emerald-bg); border-color: var(--emerald-border); }
.finder .t1 { top: 44px; left: 14px; }
.finder .t2 { top: 44px; right: 14px; }
.finder .b1 { bottom: 48px; left: 14px; }
.finder .b2 { bottom: 48px; right: 14px; }

.section { padding-block: 56px; border-top: 1px solid var(--border); }
.section-head { max-width: 38em; margin-bottom: 36px; }
.section-head p { color: var(--ink-muted); font-size: 1.05rem; margin: 14px 0 0; }

.spec { display: grid; gap: 12px; padding-block: 28px; border-top: 1px solid var(--border); }
.spec:first-of-type { border-top: 0; padding-top: 0; }
.spec-index { font: 700 0.78rem/1 var(--font-mono); letter-spacing: 0.14em; color: var(--amber); }
.spec h3 { font-size: 1.35rem; }
.spec p { color: var(--ink-muted); margin: 0 0 14px; max-width: 40em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font: 600 0.76rem/1 var(--font-mono); letter-spacing: 0.04em; color: var(--ink-muted); }

.tiers { display: grid; gap: 16px; }
.tier { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tier.pro { background: linear-gradient(180deg, rgba(122, 28, 46, 0.4), var(--surface) 70%); border-color: rgba(181, 42, 68, 0.55); }
.tier-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; margin-bottom: 14px; border-radius: 999px; font: 700 0.74rem/1 var(--font-mono); letter-spacing: 0.12em; border: 1px solid var(--border-strong); color: var(--ink-muted); }
.pro .tier-badge { color: var(--amber); border-color: rgba(232, 131, 42, 0.55); }
.tier h3 { font-size: 1.3rem; margin-bottom: 6px; }
.tier-sub { color: var(--ink-subtle); font-size: 0.95rem; margin-bottom: 18px; }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tier li { position: relative; padding-left: 24px; color: var(--ink-muted); }
.tier li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 10px; height: 6px; border-left: 2px solid var(--emerald); border-bottom: 2px solid var(--emerald); transform: rotate(-45deg); }
.trial { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 20px; padding: 16px 20px; background: var(--emerald-bg); border: 1px solid var(--emerald-border); border-radius: var(--radius-sm); color: var(--ink); }
.trial strong { font: 700 0.78rem/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--emerald-ink); }
.trial span { color: var(--ink-muted); flex: 1 1 260px; }
.fineprint { margin: 16px 0 0; color: var(--ink-subtle); font-size: 0.9rem; max-width: 46em; }

.privacy-band { display: grid; gap: 24px; padding: 28px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.privacy-band p { color: var(--ink-muted); margin-bottom: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; }
.facts li { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--emerald-bg); border: 1px solid var(--emerald-border); font: 700 0.74rem/1 var(--font-mono); letter-spacing: 0.08em; color: var(--emerald-ink); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }

.final { text-align: center; padding-block: 72px; border-top: 1px solid var(--border); background: radial-gradient(70% 90% at 50% 100%, rgba(122, 28, 46, 0.3), transparent 70%); }
.final h2 { margin-bottom: 14px; }
.final p { color: var(--ink-muted); max-width: 32em; margin-inline: auto; margin-bottom: 28px; }

/* ---------- Footer (matches Footer.tsx on main site) ---------- */
.site-footer { flex: none; border-top: 1px solid var(--border); background: rgba(5, 6, 8, 0.95); color: var(--ink-subtle); font-size: 0.86rem; }
.footer-inner { max-width: 1180px; margin-inline: auto; padding: 20px var(--gutter) 16px; display: flex; flex-direction: column; gap: 14px; }
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-tagline { font: 500 0.74rem/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: rgba(243, 241, 236, 0.8); }
.footer-trademark { font-size: 0.76rem; line-height: 1.45; color: var(--ink-subtle); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; font: 500 0.74rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-muted); text-decoration: none; overflow-wrap: anywhere; transition: color 0.15s var(--ease); }
.footer-links a:hover { color: var(--ink); }
.footer-links a.footer-email { text-transform: none; letter-spacing: 0.02em; }
.footer-locales { max-width: 1180px; margin-inline: auto; padding: 10px var(--gutter) 16px; border-top: 1px solid rgba(243, 241, 236, 0.09); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-locales a { display: inline-flex; align-items: center; gap: 6px; padding-block: 2px; font-size: 0.74rem; line-height: 1.4; color: var(--ink-subtle); text-decoration: none; transition: color 0.15s var(--ease); }
.footer-locales a:hover { color: var(--ink); }
.footer-locales a.is-current { color: var(--ink); font-weight: 600; }
.footer-locales a.is-current::before { content: ""; width: 4px; height: 4px; border-radius: 999px; background: var(--amber); flex: none; }
@media (min-width: 720px) { .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; } }

@media (min-width: 860px) {
  .hero { padding-block: 48px 88px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 64px; }
  .finder { width: 100%; max-width: 380px; }
  .section { padding-block: 88px; }
  .spec { grid-template-columns: 5.5rem 1fr 1.3fr; gap: 24px; align-items: start; padding-block: 36px; }
  .spec p { margin-bottom: 0; }
  .spec .tags { grid-column: 3; }
  .spec-body { display: contents; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .tier { padding: 32px; }
  .privacy-band { grid-template-columns: 1fr auto; align-items: center; padding: 36px; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 1100px) { :root { --gutter: 24px; } }

/* ---------- Motion: transform and opacity only; none under reduced motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes arc-l { from { opacity: 0; transform: translateX(-9px); } to { opacity: 1; transform: none; } }
@keyframes arc-r { from { opacity: 0; transform: translateX(9px); } to { opacity: 1; transform: none; } }
@keyframes core { from { opacity: 0; transform: scale(0.35); } to { opacity: 1; transform: none; } }
@keyframes lock { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-in { animation: rise 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .finder { animation: fade 0.6s var(--ease) 0.15s both; }
  .finder .corner, .finder .chip { animation: fade 0.5s var(--ease) both; animation-delay: calc(0.5s + var(--i, 0) * 80ms); }
  .finder-mark .arc-l, .finder-mark .arc-r, .finder-mark .core { transform-box: fill-box; transform-origin: center; }
  .finder-mark .arc-l { animation: arc-l 0.7s var(--ease) 0.25s both; }
  .finder-mark .arc-r { animation: arc-r 0.7s var(--ease) 0.25s both; }
  .finder-mark .core { animation: core 0.45s var(--ease) 0.75s both; }
  .finder .chip.lock { animation: lock 0.45s var(--ease) 1.05s both; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  }
}

/* Same type roles as the app: Archivo for wordmark and titles, Space Grotesk for body. */
h1,h2,h3{font-family:"Archivo SemiExpanded","Archivo SemiExpanded Fallback",Arial,sans-serif;font-weight:700}
.brand-wordmark{font-family:"Archivo Expanded","Archivo Expanded Fallback",Arial,sans-serif;font-weight:700}
