/* XShape website. Tokens copied from app/src/xshape_app/static/css/app.css (marketing brief §8). */
@font-face { font-family: "Inter Tight"; font-weight: 400; font-display: swap; src: url("../fonts/InterTight-400.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 500; font-display: swap; src: url("../fonts/InterTight-500.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 600; font-display: swap; src: url("../fonts/InterTight-600.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 700; font-display: swap; src: url("../fonts/InterTight-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("../fonts/IBMPlexMono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("../fonts/IBMPlexMono-500.woff2") format("woff2"); }

:root {
  --ink: #0b0b0b; --paper: #fff;
  --g1: #f3f4f6; --g2: #e5e7eb; --g3: #d1d5db; --g4: #9ca3af; --g5: #6b7280; --g6: #4b5563;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --headline: clamp(2rem, 4.2vw + .75rem, 4.75rem);
  --h2: clamp(1.6rem, 2.6vw + .7rem, 3.4rem);
  --body: clamp(.875rem, .35vw + .6rem, .95rem);
  --micro: clamp(.6rem, .25vw + .5rem, .72rem);
  --pad-x: clamp(1.25rem, 4.5vw, 5rem);
  --sec-y: clamp(4.5rem, 9vw, 9rem);
  --max: 1180px;
  --head-h: 56px;
  --edge: max(var(--pad-x), calc((100vw - var(--max)) / 2));
  /* colours that flip inside a black block (.dark) */
  --fg: var(--ink); --bg: var(--paper); --muted: var(--g5); --line-o: var(--g4);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--head-h); }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; }
p { margin: 0 0 .8rem; }
img, svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.label { font: 400 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* black blocks: 03, 08 and the footer */
.dark { --fg: var(--paper); --bg: var(--ink); --muted: var(--g4); --line-o: var(--g5); background: var(--ink); color: var(--paper); }
.dark ::selection { background: var(--paper); color: var(--ink); }

/* ---------- header ---------- */
.head { position: sticky; top: 0; z-index: 30; height: var(--head-h); background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .15s; }
.head.scrolled { border-bottom-color: var(--g2); }
.head .in { max-width: calc(var(--max) + 2 * var(--pad-x)); margin: 0 auto; height: 100%; padding: 0 var(--pad-x); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-weight: 700; letter-spacing: .06em; font-size: 19px; text-decoration: none; display: inline-flex; align-items: flex-start; gap: 3px; }
.logo::after { content: ""; width: 1.5px; height: 8px; background: var(--ink); margin-top: 3px; }
.lnav { display: flex; align-items: center; gap: clamp(.9rem, 2vw, 2rem); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; }
.lnav a { text-decoration: none; color: var(--g6); padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.lnav a:hover, .lnav a.on { color: var(--ink); border-bottom-color: var(--ink); }
.lang { display: flex; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .07em; padding-left: clamp(.6rem, 1.5vw, 1.2rem); border-left: 1px solid var(--g3); }
.lang [aria-current] { color: var(--ink); }
.lang .soon { color: var(--g4); cursor: default; }
@media (max-width: 760px) {
  .lnav .opt { display: none; }
  .lnav { letter-spacing: .14em; }
}

/* ---------- layout ---------- */
.sec { padding: var(--sec-y) var(--pad-x); border-top: 1px solid var(--g2); }
.sec.dark, .dark + .sec { border-top-color: var(--ink); }
.wrap { max-width: var(--max); margin: 0 auto; }
.plabel { display: flex; align-items: center; gap: 12px; margin: 0 0 1.6rem; }
.plabel .tape { width: 62px; height: 14px; flex: none; }
h1, h2, .h2 { font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1; margin: 0 0 1.4rem; }
h2, .h2 { font-size: var(--h2); max-width: 18ch; }
.lead { font-size: var(--body); max-width: 60ch; color: var(--g6); }
.body { font-size: var(--body); max-width: 60ch; }

/* buttons (.cta outline with arrow, .btn the one filled button) */
.cta { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line-o); border-radius: 6px; padding: .75rem 1.4rem; font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; background: transparent; color: var(--fg); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.cta:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cta span { transition: transform .15s; }
.cta:hover span { transform: translate(2px, -2px); }
.btn { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--fg); border-radius: 6px; padding: .95rem 1.6rem; font: 600 12.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; background: var(--fg); color: var(--bg); transition: opacity .15s; }
.btn:hover { opacity: .85; }

/* notch corner marks: one featured block per screen */
.notched { position: relative; }
.n { position: absolute; width: 11px; height: 11px; pointer-events: none; }
.n::before, .n::after { content: ""; position: absolute; background: var(--fg); }
.n::before { width: 1px; height: 11px; left: 5px; }
.n::after { height: 1px; width: 11px; top: 5px; }
.n.tl { left: -6px; top: -6px; } .n.tr { right: -6px; top: -6px; } .n.bl { left: -6px; bottom: -6px; } .n.br { right: -6px; bottom: -6px; }

/* drawings (strokes follow the block colours) */
.ink { fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-linejoin: round; }
.paper { fill: var(--paper); stroke: none; }
.orig { fill: none; stroke: var(--line-o); stroke-width: 1.3; stroke-dasharray: 7 5; stroke-linejoin: round; }
.ghost { fill: none; stroke: var(--g3); stroke-width: 1; stroke-linejoin: round; }
.fine { fill: none; stroke: var(--fg); stroke-width: 1; }
.cut { fill: none; stroke: var(--fg); stroke-width: 1; stroke-dasharray: 14 4 2 4; }
.hand { fill: none; stroke: var(--g4); stroke-width: 1.4; stroke-linecap: round; }
.tile { fill: none; stroke: var(--g3); stroke-width: 1; stroke-dasharray: 3 3; }
.svgt { font: 500 11px var(--mono); letter-spacing: .07em; fill: var(--muted); text-transform: uppercase; }
.svgt.k { fill: var(--fg); }
.draw { transition: stroke-dashoffset 1.6s cubic-bezier(.4, 0, .2, 1); }
.caption { margin-top: .7rem; }

/* ---------- 01 hero ---------- */
.hero { position: relative; min-height: max(560px, calc(100svh - var(--head-h))); padding: clamp(2rem, 6vh, 4.5rem) var(--edge) clamp(1.5rem, 4vh, 3rem); display: flex; flex-direction: column; overflow: hidden; }
.hero .mat { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .1; pointer-events: none; }
.hero .art { position: absolute; top: 4%; bottom: 10%; right: var(--edge); left: 46%; pointer-events: none; }
.hero .art svg { width: 100%; height: 100%; }
.hero .text { position: relative; max-width: min(36rem, 40vw); }
.hero h1 { font-size: min(var(--headline), 4.3vw); margin: .9rem 0 1.2rem; }
.hero h1 .tape { display: inline-block; height: .38em; width: 1.3em; vertical-align: .05em; }
.reg { width: 12px; height: 12px; }
.hero .body { max-width: 34ch; }
.readout { position: absolute; right: var(--edge); bottom: clamp(1.5rem, 4vh, 3rem); text-align: right; }
.readout .big { font: 500 clamp(1.6rem, 2.4vw + .6rem, 3rem)/1 var(--mono); letter-spacing: .02em; }
.readout .small { margin-top: .4rem; }
.hero .hero-foot { margin-top: auto; position: relative; display: flex; flex-direction: column; gap: .5rem; }
.scroll { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; }
.scroll svg { width: 10px; height: 28px; }
.hint.fine-only { display: none; }
@media (hover: hover) and (pointer: fine) { .hint.fine-only { display: block; } }
@media (max-width: 900px) {
  .hero .text { max-width: none; }
  .hero h1 { font-size: min(var(--headline), 9.6vw); }
  .hero .art { left: var(--pad-x); top: 40%; bottom: 14%; }
}
@media (max-width: 560px) {
  .hero .art { top: 46%; }
  .readout .small { display: none; }
}

/* ---------- 02 problem: sticky markers + stacked statements ---------- */
.problem .grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 5rem); }
.problem .side { position: sticky; top: calc(var(--head-h) + 2rem); align-self: start; }
.markers { list-style: none; margin: 2.2rem 0 0; padding: 0; }
.markers a { display: block; padding: .55rem 0 .55rem 14px; border-left: 2px solid var(--g2); font: 11.5px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--g5); text-decoration: none; transition: color .15s, border-color .15s; }
.markers a.on { color: var(--ink); border-left-color: var(--ink); }
.statements { display: flex; flex-direction: column; gap: clamp(2rem, 6vw, 5rem); }
.stmt { border: 1px solid var(--g2); padding: clamp(1.25rem, 2.5vw, 2.25rem); min-height: 70vh; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.stmt .who { margin: 0 0 .8rem; }
.stmt h3 { font-size: clamp(1.15rem, 1.2vw + .7rem, 1.6rem); font-weight: 600; line-height: 1.15; margin: 0 0 .8rem; max-width: 26ch; }
.stmt .fig { display: flex; gap: clamp(1rem, 3vw, 2.5rem); align-items: flex-end; flex-wrap: wrap; }
.stmt .fig svg { width: min(100%, 300px); height: auto; }
.rules { list-style: none; margin: 0; padding: 0; font: 11.5px/1 var(--mono); letter-spacing: .05em; color: var(--g6); flex: 1; min-width: 12rem; }
.rules li { padding: .5rem 0; border-bottom: 1px solid var(--g2); display: flex; justify-content: space-between; gap: 1rem; }
.rules li span:last-child { color: var(--g4); }
@media (max-width: 860px) {
  .problem .grid { grid-template-columns: 1fr; }
  .problem .side { position: static; }
  .markers { display: none; }
  .stmt { min-height: 0; }
}

/* ---------- 03 what xshape does (black) ---------- */
.does .grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.does .statement { font-size: var(--h2); font-weight: 700; text-transform: uppercase; line-height: 1.02; letter-spacing: .01em; margin: 0 0 1.6rem; }
.does .statement u { text-decoration-thickness: 2px; text-underline-offset: .12em; }
.does .body { color: var(--g4); }
.does figure svg { width: 100%; max-width: 420px; height: auto; margin-left: auto; }
@media (max-width: 860px) { .does .grid { grid-template-columns: 1fr; } .does figure svg { margin: 0; } }

/* ---------- 04 how it works ---------- */
.how .grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); }
.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 62vh; padding: 1.6rem 0 1.6rem 16px; border-left: 2px solid var(--g2); transition: border-color .15s; }
.step.on { border-left-color: var(--ink); }
.step .no { display: inline-block; border: 1px solid var(--g2); padding: 4px 8px; font: 500 12px var(--mono); margin-bottom: 1rem; }
.step h3 { font-size: clamp(1.1rem, 1vw + .7rem, 1.45rem); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; margin: 0 0 .6rem; }
.step .inline-view { display: none; }
.how .view { position: sticky; top: calc(var(--head-h) + 2rem); align-self: start; border: 1px solid var(--g2); padding: clamp(1rem, 2vw, 1.75rem); min-height: 420px; }
.how .view > figure { margin: 0; display: none; }
.how .view > figure.on { display: block; }
figure { margin: 0; }
.how figure svg { width: 100%; height: auto; }
@media (max-width: 860px) {
  .how .grid { grid-template-columns: 1fr; }
  .how .view { display: none; }
  .step { min-height: 0; }
  .step .inline-view { display: block; margin-top: 1.2rem; border: 1px solid var(--g2); padding: 1rem; }
}

/* app-like table + legend + file list (classes as in fitting.html) */
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { padding: 8px 5px; border-bottom: 1px solid var(--g2); text-align: right; font: 12px var(--mono); font-variant-numeric: tabular-nums; }
table.t th { font-size: 10.5px; color: var(--g5); text-transform: uppercase; letter-spacing: .06em; font-weight: 400; }
table.t td:first-child, table.t th:first-child { text-align: left; font-family: var(--sans); font-size: 13px; }
table.t th:first-child { font-family: var(--mono); font-size: 10.5px; }
table.t td.d { color: var(--ink); font-weight: 500; }
.legend { display: flex; gap: 18px; font: 11px var(--mono); color: var(--g5); margin: .4rem 0 .9rem; flex-wrap: wrap; text-transform: uppercase; letter-spacing: .05em; }
.legend i { display: inline-block; width: 26px; height: 0; border-top: 1.5px solid var(--ink); vertical-align: middle; margin-right: 7px; }
.legend i.o { border-top: 1.5px dashed var(--g4); }
.files { list-style: none; margin: 0; padding: 0; }
.files li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--g2); font-size: var(--body); }
.files li:first-child { border-top: 1px solid var(--g2); }
.files b { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding-top: 2px; }

/* ---------- 05 what you get ---------- */
.frame { border: 1px solid var(--g2); padding: clamp(1rem, 2.5vw, 2.25rem); margin-top: 2.4rem; }
.frame .grid2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.75rem); align-items: start; }
.frame svg { width: 100%; height: auto; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); margin-top: clamp(2rem, 4vw, 3.5rem); }
@media (max-width: 760px) {
  .frame .grid2, .facts { grid-template-columns: 1fr; }
}

/* ---------- 06 why ---------- */
.why .grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); }
.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--g2); }
.lines li { display: grid; grid-template-columns: minmax(9rem, 2fr) 3fr; gap: 1.5rem; padding: 1.6rem 0 1.6rem 16px; border-bottom: 1px solid var(--g2); border-left: 2px solid transparent; transition: border-color .15s; }
.lines li:hover { border-left-color: var(--ink); }
.lines b { font: 500 12px/1.5 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.lines p { margin: 0; font-size: var(--body); }
@media (max-width: 860px) { .why .grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .lines li { grid-template-columns: 1fr; gap: .5rem; } }

/* ---------- 07 your data ---------- */
.data .grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); }
.data .side { position: sticky; top: calc(var(--head-h) + 2rem); align-self: start; }
.promises { display: flex; flex-direction: column; gap: 10px; }
.promises details { border: 1px solid var(--g2); transition: border-color .15s; }
.promises details[open] { border-color: var(--ink); }
.promises summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 2.4rem 1fr 14px; align-items: center; gap: .8rem; padding: 1.05rem 1.2rem; font-size: var(--body); font-weight: 500; }
.promises summary::-webkit-details-marker { display: none; }
.promises summary .k { font: 500 12px var(--mono); color: var(--g5); }
.plus { position: relative; width: 14px; height: 14px; }
.plus::before, .plus::after { content: ""; position: absolute; background: var(--ink); left: 0; top: 6.5px; width: 14px; height: 1px; transition: transform .15s; }
.plus::after { transform: rotate(90deg); }
details[open] .plus::after { transform: rotate(0deg); }
.promises details p { margin: 0; padding: 0 1.2rem 1.15rem calc(1.2rem + 2.4rem + .8rem); color: var(--g6); font-size: var(--body); max-width: 60ch; }
@media (max-width: 860px) { .data .grid { grid-template-columns: 1fr; } .data .side { position: static; } }

/* ---------- who makes it (hidden for now) ---------- */
.people { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: end; margin-top: 2.4rem; }
.person .ph { width: 100%; height: auto; border: 1px solid var(--g2); }
.person .name { margin: 1rem 0 .4rem; font: 500 12px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.person p { font-size: var(--body); max-width: 46ch; }
.method { margin-top: 2.4rem; font-size: var(--body); }
@media (max-width: 640px) { .people { grid-template-columns: 1fr; } }

/* ---------- 08 write to us (black) ---------- */
.contact .addr { display: block; font-size: clamp(1.5rem, 5.4vw, 5.2rem); font-weight: 700; letter-spacing: .005em; line-height: 1; margin: .3rem 0 2rem; text-decoration: none; overflow-wrap: anywhere; }
.contact .addr:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn.pop { transform: scale(.96); transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .15s; }
.btn.pop.in { transform: none; }
.contact .what { margin-top: 2rem; }
.contact .what ul { margin: .4rem 0 0; padding: 0; list-style: none; font-size: var(--body); }
.contact .what li::before { content: "— "; color: var(--g5); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--g2); padding: 1.6rem var(--pad-x) 2rem; }
.foot.dark { border-top-color: #2a2a2a; }
.foot .wrap { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; font: 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); }
.foot .links { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- privacy page ---------- */
.doc { padding: clamp(2.5rem, 6vw, 5rem) var(--pad-x) var(--sec-y); }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: var(--h2); }
.doc h2 { font-size: 1.05rem; max-width: none; margin: 2.4rem 0 .7rem; letter-spacing: .04em; }
.doc p, .doc li { font-size: var(--body); max-width: 64ch; }
.draft { border: 1px solid var(--ink); padding: .8rem 1rem; font: 12px/1.5 var(--mono); margin: 1.2rem 0 2rem; }
.todo { background: var(--g1); padding: 0 .3em; font-family: var(--mono); font-size: .92em; }

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

/* ---------- cutting-mat grid: hero to block 04 only (blocks after it are plain white) ---------- */
.mat-bg {
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cpath d='M40 0V200M80 0V200M120 0V200M160 0V200M0 40H200M0 80H200M0 120H200M0 160H200' fill='none' stroke='%236b7280' stroke-opacity='.1' stroke-width='.6'/%3E%3Cpath d='M0 0V200M0 0H200' fill='none' stroke='%236b7280' stroke-opacity='.18' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  background-attachment: fixed;
}
.hero .mat { display: none; }
.stmt, .how .view, .step .inline-view, .step .no { background: var(--paper); }

/* ---------- "More" toggles for longer explanations ---------- */
.more { margin: .2rem 0 .8rem; }
.more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 2px 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; font-size: 13px; line-height: 1; }
.more[open] summary::before { content: "−"; }
.more summary:hover { color: var(--fg); border-bottom-color: var(--fg); }
.more .c, .more[open] .o { display: none; }
.more[open] .c { display: inline; }
.more > p { margin: .5rem 0 0; }
.dark .more > p.body { color: var(--g4); }
.lines li > div p { margin: 0; }
.lines .more, .files .more { margin: .35rem 0 0; }
.files li > div > span { display: block; }
.caption + .more { margin-top: 0; }
