/* Jawnetic site. Radiograph art direction, mirrored from the app's tokens.css:
   near-black film base, film-white type, hairline measurement graphics, and one
   signature colour, the tracing red of the gonion dot. Red is a marker, never a fill. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans-Variable.woff2") format("woff2-variations"),
       url("/fonts/InstrumentSans-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2-variations"),
       url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --film-0: #060709;
  --film-1: #0f1114;
  --film-2: #16191d;
  --film-3: #22262b;
  --white: #edf0f3;
  --bone: #ece7dd;
  --muted: #949aa3;
  --dim: #6b717a;
  --line: rgba(237, 240, 243, 0.09);
  --line-2: rgba(237, 240, 243, 0.16);
  --trace: #de4b32;
  --trace-hi: #ea5c42;
  --signal: #4fbf97;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--film-0);
  color: var(--white);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(222, 75, 50, 0.35); color: var(--white); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--trace); }
:focus-visible { outline: 2px solid var(--trace-hi); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--trace); flex: none; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--white); color: var(--film-0); padding: 0.5rem 0.75rem; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(6, 7, 9, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 15px; width: auto; }
.nav { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.nav a { font-size: 0.875rem; color: var(--muted); text-decoration: none; padding: 0.5rem 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 78% 40%, rgba(237, 240, 243, 0.05), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px;
  mask-image: radial-gradient(70rem 50rem at 70% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70rem 50rem at 70% 40%, #000 30%, transparent 75%);
  opacity: 0.55;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 2rem;
  min-height: min(88svh, 760px);
  padding-top: clamp(3rem, 8vw, 5rem);
  padding-bottom: clamp(3rem, 8vw, 5rem);
}
.eyebrow { display: flex; align-items: center; gap: 0.6rem; }
.hero h1 {
  margin: 1.25rem 0 0;
  font-weight: 600;
  font-stretch: 78%;
  font-size: clamp(3rem, 8.4vw, 6.25rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  max-width: 11ch;
}
.hero .lede { margin: 1.5rem 0 0; max-width: 36ch; font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2.25rem; }
.store-badge {
  display: inline-flex; align-items: center; gap: 0.85rem;
  padding: 0.8rem 1.35rem 0.8rem 1.1rem;
  border-radius: 14px;
  background: var(--white); color: var(--film-0);
  text-decoration: none;
}
.store-badge svg { width: 22px; height: 22px; }
.store-badge small { display: block; font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6; }
.store-badge strong { display: block; font-size: 1.0625rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
.cta-note { font-size: 0.875rem; color: var(--dim); }
.cta-note a { color: var(--muted); }

.tracing { width: 100%; height: auto; max-height: 640px; color: var(--bone); }
.tracing .outline { fill: rgba(236, 231, 221, 0.035); stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.tracing .guide { fill: none; stroke: currentColor; stroke-opacity: 0.35; stroke-width: 1.5; stroke-dasharray: 6 8; }
.tracing .arc { fill: none; stroke: var(--trace); stroke-width: 2.5; }
.tracing text { fill: currentColor; font-family: var(--mono); }
.tracing .lbl { fill-opacity: 0.55; font-size: 20px; letter-spacing: 0.12em; font-weight: 500; }
.tracing .deg { font-size: 34px; font-weight: 600; }
.tracing .go { fill: var(--trace); }

@media (prefers-reduced-motion: no-preference) {
  .tracing .outline { stroke-dasharray: 3400; stroke-dashoffset: 3400; animation: draw 1.6s var(--ease) 0.1s forwards; }
  .tracing .guide { opacity: 0; animation: fade 0.8s var(--ease) 0.9s forwards; }
  .tracing .arc { stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 0.8s var(--ease) 1.4s forwards; }
  .tracing .labels { opacity: 0; animation: fade 0.6s var(--ease) 1.8s forwards; }
  .tracing .go { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: pop 0.5s var(--ease) 1.7s forwards; }
  .rise { opacity: 0; transform: translateY(14px); animation: rise 0.7s var(--ease) forwards; }
  .rise.d1 { animation-delay: 0.08s; } .rise.d2 { animation-delay: 0.16s; } .rise.d3 { animation-delay: 0.24s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes pop { to { transform: scale(1); } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
section.block { padding: clamp(4.5rem, 10vw, 8rem) 0; border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 {
  margin: 0.9rem 0 0; font-weight: 600; font-stretch: 82%;
  font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 0.98; letter-spacing: -0.028em;
}
.section-head p { margin: 0; color: var(--muted); max-width: 46ch; }

.plates { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.plate { background: var(--film-1); padding: clamp(1.5rem, 3vw, 2.25rem); min-height: 15rem; display: flex; flex-direction: column; }
.plate .idx { display: flex; justify-content: space-between; align-items: center; }
.plate h3 { margin: auto 0 0.5rem; padding-top: 2.5rem; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.015em; }
.plate p { margin: 0; color: var(--muted); max-width: 40ch; font-size: 0.9375rem; }
.plate .readout { font-family: var(--mono); font-size: 0.75rem; color: var(--dim); letter-spacing: 0.06em; }
.plate .readout b { color: var(--white); font-weight: 500; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.fact { padding: 1.75rem 1.5rem 0 0; }
.fact + .fact { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.fact .num { font-stretch: 75%; font-weight: 600; font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fact p { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.9375rem; }

.closer { text-align: left; }
.closer h2 { margin: 1rem 0 0; font-weight: 600; font-stretch: 78%; font-size: clamp(2.5rem, 6.5vw, 4.75rem); line-height: 0.92; letter-spacing: -0.035em; max-width: 14ch; }
.closer p { color: var(--muted); max-width: 48ch; margin: 1.5rem 0 0; }

/* ---------- Footer ---------- */
.site-footer { padding: 3rem 0 3.5rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: start; }
.site-footer .legal { color: var(--dim); font-size: 0.8125rem; max-width: 52ch; margin: 1rem 0 0; }
.site-footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer nav a { color: var(--muted); font-size: 0.875rem; text-decoration: none; }
.site-footer nav a:hover { color: var(--white); }

/* ---------- Document pages (privacy / terms / support) ---------- */
.doc { padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem); }
.doc .wrap { display: grid; grid-template-columns: 14rem minmax(0, 44rem); gap: clamp(2rem, 5vw, 5rem); }
.doc-head { grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-bottom: 2rem; margin-bottom: 0.5rem; }
.doc-head h1 { margin: 1rem 0 0.75rem; font-weight: 600; font-stretch: 80%; font-size: clamp(2.5rem, 6vw, 4rem); line-height: 0.95; letter-spacing: -0.032em; }
.doc-head .meta { color: var(--dim); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; }
.toc { position: sticky; top: 88px; align-self: start; }
.toc ol { list-style: none; margin: 0.75rem 0 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 0.6rem; padding: 0.3rem 0; font-size: 0.8125rem; color: var(--dim); text-decoration: none; line-height: 1.4; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 0.6875rem; color: var(--dim); opacity: 0.7; padding-top: 0.1rem; }
.toc a:hover { color: var(--white); }
.prose { font-size: 0.9875rem; color: #c3c8cf; }
.prose section { padding: 2rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.prose section:first-child { padding-top: 0.5rem; }
.prose section:last-child { border-bottom: 0; }
.prose h2 { margin: 0 0 1rem; color: var(--white); font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.01em; display: flex; gap: 0.75rem; align-items: baseline; }
.prose h2 .n { font-family: var(--mono); font-size: 0.75rem; color: var(--trace-hi); letter-spacing: 0.04em; font-weight: 500; }
.prose h3 { color: var(--white); font-size: 1rem; margin: 1.5rem 0 0.5rem; }
.prose p { margin: 0 0 0.9rem; }
.prose ul { margin: 0 0 0.9rem; padding-left: 1.1rem; }
.prose li { margin: 0.4rem 0; }
.prose li::marker { color: var(--dim); }
.prose strong { color: var(--white); font-weight: 600; }
.prose code { font-family: var(--mono); font-size: 0.8125rem; color: var(--white); }
.callout { border: 1px solid var(--line-2); background: var(--film-1); border-radius: 14px; padding: 1.1rem 1.25rem; margin: 0 0 1rem; }
.callout p:last-child { margin: 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin: 0.5rem 0 1rem; }
table.data th, table.data td { text-align: left; padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
table.data td:first-child { color: var(--white); width: 30%; }

/* Support */
.contact-card { border: 1px solid var(--line-2); border-radius: 20px; background: var(--film-1); padding: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
.contact-card .addr { display: inline-block; margin-top: 0.75rem; font-size: clamp(1.25rem, 3vw, 1.625rem); font-weight: 600; letter-spacing: -0.015em; color: var(--white); }
.contact-card p { margin: 0.75rem 0 0; color: var(--muted); }
details { border-bottom: 1px solid var(--line); }
details summary { list-style: none; cursor: pointer; padding: 1.15rem 2rem 1.15rem 0; position: relative; color: var(--white); font-weight: 500; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; position: absolute; right: 0.25rem; top: 1.05rem; font-family: var(--mono); color: var(--dim); font-size: 1.1rem; transition: transform 0.25s var(--ease); }
details[open] summary::after { transform: rotate(45deg); color: var(--trace-hi); }
details .a { padding: 0 0 1.25rem; color: #c3c8cf; }
details .a p { margin: 0 0 0.75rem; }

/* 404 */
.lost { min-height: 70svh; display: grid; place-items: center; text-align: center; }
.lost h1 { font-stretch: 75%; font-size: clamp(4rem, 14vw, 8rem); line-height: 0.9; margin: 1rem 0; letter-spacing: -0.04em; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .hero .art { order: -1; max-width: 420px; margin: -1rem auto 0.5rem; width: 80%; }
  .section-head { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 1.75rem; }
  .doc .wrap { grid-template-columns: 1fr; }
  .toc { position: static; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.25rem; }
}
@media (max-width: 640px) {
  .nav a.hide-sm { display: none; }
  .plates { grid-template-columns: 1fr; }
  .plate { min-height: 0; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding-left: 0; border-left: 0; }
  .fact + .fact { border-top: 1px solid var(--line); margin-top: 1.5rem; }
}
