/* Resleeve homepage (promoted from the frankenstein-v1 spike: the founder's picks from five spikes, set as one system).
   System rules:
   - Two surfaces, each a full-bleed band with the same vertical rhythm (--sec), consecutive bands split by a hairline:
     light (warm off-white: everything) and paper (dot paper, the proof: case + pilot). Only the API code block stays dark.
   - Every band sets the same tokens (--bg --fg --fg-2 --dim --line --line-2 --acc), so every component adapts.
   - One accent: #ff4f12 for lines and marks, #d9420b where it is text (contrast on light).
   - Type: Archivo (display + body) and JetBrains Mono (labels, data). No serif.
   - One CTA: the noir bracket. One section label: the noir chips. */

:root {
  --c-light: #f8f6f1;
  --c-light-2: #f0ede6;
  --c-paper: #f1eadd;
  --c-sheet: #f8f4ec;
  --c-ink: #161513;
  --accent: #ff4f12;
  --accent-ink: #d9420b;
  --ok: #16a34a;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --sec: clamp(88px, 10vw, 140px);
  --gutter: 20px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
@media (min-width: 900px) { :root { --gutter: 28px; } }

/* ---------- Bands: one token set per surface ---------- */
.band--light { --bg: var(--c-light); --bg-2: var(--c-light-2); --card: #fff; --fg: #0d0d0e; --fg-2: #4a4a50; --dim: #87868c; --line: #e5e2da; --line-2: #d4d0c6; --acc: var(--accent-ink); }
.band--paper { --bg: var(--c-paper); --bg-2: var(--c-sheet); --card: var(--c-sheet); --fg: var(--c-ink); --fg-2: rgba(22, 21, 19, .72); --dim: rgba(22, 21, 19, .5); --line: rgba(22, 21, 19, .16); --line-2: rgba(22, 21, 19, .3); --acc: var(--accent-ink); }
.band { position: relative; background-color: var(--bg); color: var(--fg); }
/* Paper: atelier's dot grid, a fine dot every 24px and a heavier one every 120px. */
.band--paper { background-image:
    radial-gradient(circle at 1px 1px, rgba(22, 21, 19, .22) 1.15px, transparent 1.6px),
    radial-gradient(circle at 1px 1px, rgba(22, 21, 19, .11) .8px, transparent 1.2px);
  background-size: 120px 120px, 24px 24px; background-position: 11px 11px, 11px 11px; }
.band > .wrap { position: relative; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--c-light); color: #0d0d0e; font: 400 16px/1.55 var(--display); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, pre, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--accent); color: #000; padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.caps { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.dim { color: var(--dim); }

h1 { font: 620 clamp(2.9rem, 7.2vw, 6.2rem)/.98 var(--display); letter-spacing: -.05em; text-wrap: balance; }
h2 { font: 600 clamp(2.2rem, 5vw, 4.4rem)/1 var(--display); letter-spacing: -.045em; text-wrap: balance; }
h3 { font: 600 1.15rem/1.25 var(--display); letter-spacing: -.02em; }

/* ---------- Sections ---------- */
.sec { padding: var(--sec) 0; }
.sec--rule::after { content: ""; position: absolute; top: 0; left: 0; right: 0; max-width: calc(1240px - 2 * var(--gutter)); margin: 0 auto; border-top: 1px solid var(--line); }
@media (max-width: 1239px) { .sec--rule::after { left: var(--gutter); right: var(--gutter); } }

/* Section label: noir chips, everywhere. */
.chips { display: inline-flex; margin-bottom: 26px; border-bottom: 1px solid var(--fg); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.chips span { padding: 3px 7px; }
.chips .on { background: var(--fg); color: var(--bg); }

/* ---------- Bracket CTA (noir): orange text in a frame, two corner ticks outside it ---------- */
.bracket { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; color: var(--acc, var(--accent-ink)); font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border: 1px solid rgba(255, 79, 18, .38); background: rgba(255, 79, 18, .06); transition: background .2s, color .2s; }
.bracket::before, .bracket::after { content: ""; position: absolute; width: 7px; height: 7px; border: 1px solid var(--accent); }
.bracket::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.bracket::after { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
.bracket:hover, .bracket:focus-visible { background: var(--accent); color: #0b0b0b; }
.bracket--lg { height: 54px; padding: 0 26px; font-size: 12.5px; }
.bracket--xl { height: 68px; padding: 0 38px; font-size: 14px; letter-spacing: .08em; }
.bracket--xl::before, .bracket--xl::after { width: 10px; height: 10px; }
.bracket--xl::before { top: -6px; left: -6px; }
.bracket--xl::after { bottom: -6px; right: -6px; }
/* On light and paper bands (and the light header) the primary bracket is a crisp solid ink button;
   the orange corner ticks stay. Dark bands keep the noir frame. */
:is(.band--light, .band--paper, .nav) .bracket { background: #0b0b0c; color: #f8f6f1; border-color: #0b0b0c; }
:is(.band--light, .band--paper, .nav) .bracket:is(:hover, :focus-visible) { background: var(--accent); color: #0b0b0c; border-color: var(--accent); }
.textlink { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); border-bottom: 1px solid var(--line-2); padding: 4px 0; }
.textlink:hover { color: var(--fg); border-color: var(--fg); }

/* ---------- Header (saas nav) ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(248, 246, 241, .86); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  --fg: #0d0d0e; --fg-2: #4a4a50; --line-2: #d4d0c6; --acc: var(--accent-ink); color: var(--fg); }
.nav__in { display: flex; align-items: center; gap: 28px; height: 60px; }
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__brand svg { height: 13px; width: auto; fill: currentColor; }
.nav__links { display: none; gap: 24px; font-size: 14.5px; color: var(--fg-2); }
.nav__links a:hover { color: var(--fg); }
.nav__cta { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.nav__login { font-size: 14.5px; color: var(--fg-2); }
.nav__login:hover { color: var(--fg); }
@media (min-width: 1080px) {
  .nav__links { display: flex; }
  /* Logo left, links in the true centre of the bar, Log in + CTA right. */
  .nav__in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .nav__brand { justify-self: start; }
  .nav__cta { justify-self: end; margin-left: 0; }
}
@media (max-width: 420px) { .nav__cta { gap: 12px; } .nav .bracket { padding: 0 11px; } }
/* Long translations on phones (js fitNav): first Log in goes (it is in the footer too), then the CTA tightens. */
.nav.is-tight .nav__login { display: none; }
.nav.is-tighter .bracket { padding: 0 9px; letter-spacing: .02em; }
.nav.is-tighter .lang__btn span[aria-hidden] { display: none; }

/* Language picker: the page's code opens the list of languages. */
.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px; border: 0; background: transparent; color: var(--fg-2); font-size: 12px; cursor: pointer; }
.lang__btn:hover, .lang__btn[aria-expanded="true"] { color: var(--fg); }
.lang__btn span[aria-hidden] { font-size: 9px; }
.lang__menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; display: grid; min-width: 168px; padding: 6px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; box-shadow: 0 18px 40px -18px rgba(20, 20, 30, .3); }
.lang__menu[hidden] { display: none; }
.lang__menu a { display: block; padding: 8px 10px; border-radius: 6px; font-size: 14px; color: var(--fg-2); }
.lang__menu a:hover { background: var(--c-light); color: var(--fg); }
.lang__menu a[aria-current="page"] { color: var(--fg); font-weight: 600; }

/* Tape-measure scroll ruler (atelier), along the header's bottom edge. */
.ruler { position: relative; height: 14px; border-top: 1px solid var(--fg); background: transparent; color: var(--c-ink); }
.ruler__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ruler__svg line { stroke: var(--c-ink); stroke-width: 1; }
.ruler__svg text { font: 7px var(--mono); fill: rgba(22, 21, 19, .7); }
.ruler__mark { position: absolute; top: -1px; left: 0; width: 2px; height: 15px; background: var(--accent); will-change: transform; }
.ruler__mark::after { content: ""; position: absolute; top: 14px; left: -4px; border: 5px solid transparent; border-top-color: var(--accent); }


/* ---------- Hero: centred title, two sentences, then the working app ----------
   The app keeps a fixed, sensible height (min(720px, 80svh)) and may run below the fold;
   its window bar, chat and panes start well inside the first screen. Phones: natural height. */
.hero { padding: clamp(44px, 7vw, 104px) 0 clamp(40px, 5vw, 64px); overflow: hidden; }
.hero__in { display: flex; flex-direction: column; gap: clamp(36px, 4.4vw, 60px); }
.hero__text { display: grid; justify-items: center; gap: clamp(14px, 1.6vw, 22px); text-align: center; }
.hero h1 { font: 640 12vw/.95 var(--display); letter-spacing: -.05em; color: var(--fg); text-wrap: balance; }
.hero__sub { max-width: 34em; color: var(--fg-2); font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.5; text-wrap: balance; }
@media (min-width: 700px) {
  .hero h1 { font-size: clamp(3rem, 6.4vw, 5.5rem); white-space: nowrap; }
  /* Two sentences, one per line. */
  .hero__sub { max-width: none; }
  .hero__sub span { display: block; }
  .hero__app { height: min(720px, 80svh); min-height: 520px; }
}

/* =====================================================================
   APP WINDOW (saas, light theme), interactive. Self-contained: every rule is
   scoped to .app and reads only the --app-* tokens set here.
   ===================================================================== */
.app { --app-bg: #fff; --app-bg-2: #f3f3f0; --app-line: #e6e6e1; --app-line-2: #d6d6d0; --app-fg: #0b0b0c; --app-fg-2: #4b4b53; --app-dim: #84848c; --app-accent: #ea470d; --app-ok: #16a34a;
  position: relative; display: flex; flex-direction: column; border-radius: 14px; background: var(--app-bg); color: var(--app-fg); text-align: left; overflow: hidden;
  box-shadow: 0 0 0 1px var(--app-line-2), 0 40px 100px -30px rgba(20, 20, 30, .25), 0 0 80px -20px rgba(255, 79, 18, .15); }
@media (min-width: 700px) { .app { height: 100%; } }
.app .mono { font-family: var(--mono); letter-spacing: .02em; }
.app :focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }
:where(.app button) { font: inherit; color: inherit; cursor: pointer; } /* zero specificity: .cmd, .size etc. set their own size */
.app__bar { flex: none; display: flex; align-items: center; gap: 14px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--app-line); background: var(--app-bg-2); }
.app .dots { display: flex; gap: 6px; }
.app .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--app-line-2); }
.app__url { flex: 1; min-width: 0; text-align: center; color: var(--app-dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .app__body { grid-template-columns: minmax(260px, 38%) minmax(0, 1fr); } }

/* Chat column: fixed-height log that scrolls itself, then the commands, then the composer. */
.app__chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-bottom: 1px solid var(--app-line); }
@media (min-width: 700px) { .app__chat { border-bottom: 0; border-right: 1px solid var(--app-line); } }
.app .chat { flex: none; height: 190px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; font-size: 13px; line-height: 1.5; scroll-behavior: smooth; }
@media (min-width: 700px) { .app .chat { flex: 1; height: auto; min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .app .chat { scroll-behavior: auto; } }
.app .msg { padding: 9px 11px; border-radius: 10px; color: var(--app-fg-2); }
.app .msg b { color: var(--app-fg); font-weight: 600; }
.app .msg--user { align-self: flex-end; max-width: 92%; background: #f0f0ec; color: var(--app-fg); }
.app .msg__files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.app .msg__files span { padding: 2px 7px; border: 1px solid var(--app-line-2); border-radius: 6px; color: var(--app-dim); font-size: 10.5px; }
.app .msg--agent { padding: 0 2px; }
.app .msg--note { padding: 9px 11px; background: rgba(234, 71, 13, .06); border: 1px solid rgba(234, 71, 13, .22); }
.app .msg p + p, .app .msg p + .files, .app .msg .files + p { margin-top: 8px; }
.app .worked { color: var(--app-dim); font-size: 11px; }
.app .checks { display: grid; gap: 5px; padding: 9px 11px; border: 1px solid var(--app-line); border-radius: 10px; background: var(--app-bg-2); color: var(--app-fg-2); font-size: 11px; }
.app .checks i { color: var(--app-ok); font-style: normal; margin-right: 6px; }
.app .checks .is-pending i { color: var(--app-dim); }
.app .stream { display: grid; gap: 3px; padding: 0 2px; color: var(--app-dim); font-size: 11px; }
.app .stream li::before { content: "› "; color: var(--app-accent); }
.app .stream.is-live li:last-child::after { content: ""; display: inline-block; width: 6px; height: 11px; margin-left: 4px; background: var(--app-accent); vertical-align: -1px; animation: appBlink 1s steps(2) infinite; }
@keyframes appBlink { 50% { opacity: 0; } }
.app .files { display: flex; flex-wrap: wrap; gap: 6px; }
.app .files span { padding: 3px 8px; border-radius: 6px; background: rgba(234, 71, 13, .1); color: var(--app-accent); font: 500 10.5px var(--mono); }
.app .msg a.applink { color: var(--app-fg); border-bottom: 1px solid var(--app-line-2); }
.app .msg a.applink:hover { color: var(--app-accent); border-color: var(--app-accent); }
.app .msg .bracket { margin-top: 10px; height: 34px; padding: 0 12px; font-size: 10.5px; }
.app__hint { flex: none; padding: 8px 12px 0; color: var(--app-accent); font-size: 11px; }

.cmds { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; }
.cmd { padding: 4px 8px; border: 1px solid var(--app-line-2); border-radius: 6px; background: #fff; color: var(--app-fg-2); font-size: 11px; line-height: 1.4; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.cmd:hover:not(:disabled) { border-color: var(--app-accent); color: var(--app-fg); }
.cmd.is-done { color: var(--app-fg); border-color: var(--app-fg-2); }
.cmd--ghost { border-style: dashed; background: transparent; color: var(--app-dim); }
.cmd:disabled, .composer__send:disabled { opacity: .45; cursor: default; }
.cmd.is-pulse { animation: cmdPulse 1.3s ease-out 3; }
@keyframes cmdPulse { 0% { box-shadow: 0 0 0 0 rgba(234, 71, 13, .5); border-color: var(--app-accent); } 100% { box-shadow: 0 0 0 10px rgba(234, 71, 13, 0); } }
@media (prefers-reduced-motion: reduce) { .cmd.is-pulse { animation: none; border-color: var(--app-accent); } .app .stream.is-live li:last-child::after { animation: none; } }
@media (max-width: 699px) {
  .cmds { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 2px; }
  .cmds::-webkit-scrollbar { display: none; }
}
.composer { flex: none; display: flex; align-items: center; gap: 8px; margin: 10px 12px 12px; padding: 6px 6px 6px 12px; border: 1px solid var(--app-line-2); border-radius: 12px; background: var(--app-bg-2); }
.composer:focus-within { border-color: var(--app-accent); box-shadow: 0 0 0 1px var(--app-accent); }
.app .composer input:focus-visible { outline: none; } /* the composer's own ring shows focus */
.composer input { flex: 1; min-width: 0; height: 30px; border: 0; background: transparent; color: var(--app-fg); font: 400 13px var(--display); outline: none; }
.composer input::placeholder { color: var(--app-dim); }
.composer__send { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: #0b0b0c; color: #fff; font-size: 14px; }
.composer__send:hover:not(:disabled) { background: var(--app-accent); color: #0b0b0c; }
@media (max-width: 699px) { .composer input { font-size: 16px; } }

/* Work column: tabs + view toggle, then the panes take all remaining height. */
.app__work { display: flex; flex-direction: column; min-width: 0; min-height: 0; container: work / inline-size; }
.app .work__bar { flex: none; display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--app-line); color: var(--app-dim); font-size: 11px; }
.app .seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--app-bg-2); border: 1px solid var(--app-line); }
.app .seg button { margin: 0; padding: 3px 8px; border: 0; border-radius: 6px; background: transparent; letter-spacing: inherit; line-height: inherit; }
.app .seg button:hover { color: var(--app-fg); }
.app .seg button[aria-pressed="true"] { background: #fff; color: var(--app-fg); font-weight: 500; box-shadow: 0 0 0 1px var(--app-line); }
.app .work__panes { flex: 1; min-height: 0; display: grid; grid-template: minmax(0, 1fr) minmax(0, 1.3fr) / minmax(0, 1fr); }
@container work (min-width: 500px) { .app .work__panes { grid-template: minmax(0, 1fr) / minmax(0, 1.15fr) minmax(0, 1fr); } .app .pane + .pane { border-top: 0; border-left: 1px solid var(--app-line); } }
.app:is([data-view="2d"], [data-view="3d"]) .work__panes { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.app[data-view="2d"] .pane--3d, .app[data-view="3d"] .pane--2d { display: none; }
.app .pane { position: relative; min-height: 0; background: radial-gradient(ellipse at 50% 40%, #ffffff, #f1f1ed 70%); overflow: hidden; }
.app .pane + .pane { border-top: 1px solid var(--app-line); }
.app .pane--2d { background-image: linear-gradient(var(--app-line) 1px, transparent 1px), linear-gradient(90deg, var(--app-line) 1px, transparent 1px); background-size: 24px 24px; background-color: #fcfcfa; }
@media (max-width: 699px) { .app .work__panes { flex: none; height: 284px; } }
.app .pane__tag { position: absolute; z-index: 2; left: 10px; top: 10px; margin: 0; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .85); border: 1px solid var(--app-line-2); color: var(--app-fg-2); font-size: 10.5px; }
.app .layer { position: absolute; inset: 36px 12px 12px; display: none; }
.app[data-tab="design"] [data-layer="design"], .app[data-tab="sizes"] [data-layer="sizes"], .app[data-tab="production"] [data-layer="production"] { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.app .layer > svg { display: block; width: 100%; min-height: 0; flex: 1; }
.app .flat .piece { fill: rgba(234, 71, 13, .04); stroke: #1a1a1c; stroke-width: 4; transition: stroke .3s; }
.app .flat .piece.is-trace { stroke: var(--app-accent); stroke-width: 6; }
.app .flat .notch { stroke: var(--app-accent); stroke-width: 3; fill: none; }
.app .flat .grain-line { stroke: var(--app-accent); stroke-width: 2; }
.app .grade path { fill: none; stroke: #b9b9b2; stroke-width: 1.2; vector-effect: non-scaling-stroke; transition: stroke .2s, stroke-width .2s; }
.app .grade path.is-base { stroke: #1a1a1c; }
.app .grade path.is-on { stroke: var(--app-accent); stroke-width: 2.4; }
.app .sizes { flex: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.app .size { display: grid; gap: 1px; padding: 4px 0; border: 1px solid var(--app-line-2); border-radius: 6px; background: #fff; text-align: center; font-size: 11px; color: var(--app-fg); }
.app .size small { color: var(--app-dim); font-size: 9.5px; }
.app .size[aria-pressed="true"] { border-color: var(--app-accent); box-shadow: 0 0 0 1px var(--app-accent); }
.app .sizes__cap { grid-column: 1 / -1; color: var(--app-dim); font-size: 10px; text-align: center; }
.app .layer > .nestmap { flex: 0 1 auto; max-height: 70%; }
.app .nestmap rect.fab { fill: #fff; stroke: var(--app-line-2); }
.app .nestmap path { fill: rgba(234, 71, 13, .06); stroke: #2a2a2e; stroke-width: 1.4; vector-effect: non-scaling-stroke; transition: opacity .4s, transform .5s var(--ease); }
.app .nestmap.is-nesting path { opacity: 0; transform: translateY(-14px); }
.app .layer__cap { flex: none; color: var(--app-fg-2); font-size: 11px; text-align: center; }
.app .layer__cap b { color: var(--app-accent); }
.app canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.app canvas.is-drag { cursor: grabbing; }
.swatches { position: absolute; z-index: 2; left: 10px; bottom: 10px; display: flex; gap: 6px; }
.swatch { width: 22px; height: 22px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--app-line-2); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--app-accent); }
@media (max-width: 699px) {
  .app { border-radius: 12px; }
  .app .seg--sm [data-app-view="both"] { display: none; }
}
/* ===================== /APP WINDOW ===================== */

/* ---------- Bento (saas). 4-col grid on desktop: rows 2+1+1 / 1+1+2, no ragged end. ---------- */
.bento { display: grid; gap: 14px; margin-top: 56px; }
@media (min-width: 760px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card--wide { grid-column: span 2; } }
@media (min-width: 1100px) { .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px 18px 22px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow .25s, transform .25s; }
.card:hover { box-shadow: 0 0 0 1px var(--line-2) inset, 0 20px 50px -24px rgba(20, 20, 30, .22); transform: translateY(-2px); }
.card p { color: var(--fg-2); font-size: 14.5px; line-height: 1.5; }
.card__vis { position: relative; display: grid; place-items: center; min-height: 200px; margin-bottom: 8px; padding: 14px; border-radius: 10px; background: var(--bg-2); box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; }
.vis-agent { place-items: start; align-content: center; gap: 10px; }
.v-msg { padding: 8px 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--line); color: var(--fg) !important; font-size: 13.5px !important; }
.v-msg--user { justify-self: end; background: rgba(217, 66, 11, .1); box-shadow: none; color: #7a2a0c !important; }
.caret { display: inline-block; width: 7px; height: 14px; margin-left: 2px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.v-cmds { display: flex; flex-wrap: wrap; gap: 6px; }
.v-cmds span { padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--fg-2); }
.v-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.v-table th { color: var(--dim); font-weight: 400; text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line-2); }
.v-table td { padding: 5px 6px; border-bottom: 1px solid var(--line); color: var(--fg-2); }
.v-table .hl td { color: var(--fg); background: rgba(217, 66, 11, .06); }
.v-table .ok { color: var(--ok); }
.v-table .warn { color: var(--acc); }
.v-note { margin-top: 8px; color: var(--dim) !important; font-size: 11px !important; justify-self: start; }
.vis-photo img { width: 62%; max-width: 220px; }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 14px var(--accent); animation: scan 3.2s ease-in-out infinite; }
@keyframes scan { 0%, 100% { top: 8%; } 50% { top: 92%; } }
.vis-doc { place-items: stretch; align-content: start; gap: 8px; }
.vis-doc p:first-child { color: var(--fg-2); font-size: 10.5px; }
.vis-doc i { display: block; height: 8px; border-radius: 4px; background: #e3e0d8; }
.vis-doc i.s { width: 62%; }
.doc__f { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.doc__f span { padding: 2px 7px; border-radius: 6px; background: rgba(217, 66, 11, .1); color: var(--acc); font-size: 10.5px; }
.vis-marker { gap: 10px; }
.marker { width: 100%; max-width: 560px; }
.marker rect.fab { fill: #fff; stroke: var(--line-2); }
.marker path { fill: rgba(217, 66, 11, .06); stroke: #2a2a2e; stroke-width: 2; vector-effect: non-scaling-stroke; }
.vis-marker p { color: var(--fg-2) !important; font-size: 11.5px !important; }
.vis-marker b { color: var(--acc); }

/* ---------- Compare (noir) ---------- */
.cmp__scroll { margin-top: 56px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp { width: 100%; min-width: 760px; border-collapse: collapse; }
.cmp th, .cmp td { padding: 18px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.35; }
.cmp thead th { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); color: var(--dim); font-weight: 400; }
.cmp tbody th { width: 28%; font: 500 1.05rem/1.25 var(--display); letter-spacing: -.01em; color: var(--fg); }
.cmp td { color: var(--fg-2); }
.cmp .is-us { color: var(--fg); background: rgba(255, 79, 18, .06); border-left: 1px solid rgba(255, 79, 18, .5); border-right: 1px solid rgba(255, 79, 18, .5); }
.cmp thead .is-us { color: var(--acc); border-top: 1px solid rgba(255, 79, 18, .5); }
.cmp tbody tr:last-child .is-us { border-bottom: 1px solid rgba(255, 79, 18, .5); color: var(--acc); font: 500 1.5rem/1 var(--display); letter-spacing: -.03em; }
/* Phones: the Resleeve column moves next to the capability column, so it is on screen
   without scrolling; the two other columns scroll inside the wrapper. */
@media (max-width: 699px) {
  .cmp, .cmp thead, .cmp tbody { display: block; min-width: 0; }
  .cmp { width: max-content; }
  .cmp tr { display: grid; grid-template-columns: 132px 168px 150px 150px; }
  .cmp th, .cmp td { padding: 14px 12px; font-size: 14px; }
  .cmp tbody th { width: auto; font-size: .95rem; }
  .cmp .is-us { order: 1; }
  .cmp tr > :nth-child(2), .cmp tr > :nth-child(3) { order: 2; }
  .cmp tbody tr:last-child .is-us { font-size: 1.25rem; }
}

/* ---------- Files (noir files2). Formats and CAD systems share one row style: .bigrows ---------- */
.files2 { display: grid; gap: 56px; margin-top: 56px; }
@media (min-width: 960px) { .files2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; } }
.files2__h { padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.bigrows { margin: 0; padding: 0; list-style: none; }
.bigrows li { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.bigrows b { font: 500 clamp(1.7rem, 3.4vw, 3.2rem)/1 var(--display); letter-spacing: -.04em; min-width: 0; }
.bigrows span { color: var(--dim); text-align: right; }
.bigrows--count { counter-reset: sys; }
.bigrows--count li { counter-increment: sys; }
.bigrows--count li::after { content: counter(sys, decimal-leading-zero); color: var(--accent); font: 400 11px var(--mono); letter-spacing: .06em; }
.files2__note { margin-top: 22px; color: var(--fg-2); max-width: 40ch; }

/* ---------- Case (demo) ---------- */
.case__mast { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; padding-bottom: 14px; border-bottom: 2px solid var(--fg); margin-bottom: clamp(28px, 4vw, 48px); }
.case__mast .mono { color: var(--fg-2); }
.case__brand { font: 600 clamp(1.6rem, 2.8vw, 2.2rem)/1 var(--display); letter-spacing: -.035em; }
@media (max-width: 699px) { .case__brand { order: -1; flex-basis: 100%; } }
.case__grid { display: grid; gap: 32px; }
@media (min-width: 980px) { .case__grid { grid-template-columns: 5fr 6fr; gap: 56px; } }
.case__ph { aspect-ratio: 4 / 5; background: repeating-linear-gradient(135deg, #e3dccd 0 10px, #d9d1c1 10px 20px); display: grid; place-items: end start; padding: 16px; }
.case__ph span { background: var(--c-paper); padding: 4px 8px; color: var(--fg-2); }
.case__img figcaption { margin-top: 10px; color: var(--fg-2); }
.case blockquote p { font: 600 clamp(1.8rem, 3.6vw, 3.1rem)/1.06 var(--display); letter-spacing: -.04em; text-wrap: balance; }
.case blockquote footer { margin-top: 18px; font-size: 14px; color: var(--fg-2); }
.case blockquote footer span { color: var(--fg); font-weight: 600; }
.case__intro { margin-top: 36px; font-size: 1.05rem; max-width: 48ch; }
.case__scroll { overflow-x: auto; }
.case__table { width: 100%; min-width: 340px; border-collapse: collapse; margin-top: 18px; }
.case__table th, .case__table td { text-align: left; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); font-weight: 400; vertical-align: baseline; }
.case__table thead th { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--fg-2); }
.case__table tbody th { width: 46%; }
.case__table td { font: 600 1.35rem/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.case__table td:last-child { color: var(--acc); }

/* ---------- Pilot (atelier tape measure). Red pencil becomes the one accent. ---------- */
.pilot { position: relative; margin-top: clamp(48px, 6vw, 72px); }
.tape-measure {
  position: relative; height: 46px; border: 1.5px solid var(--fg); border-radius: 3px; background-color: var(--c-sheet);
  background-image:
    linear-gradient(90deg, var(--fg) 1.2px, transparent 1.2px),
    linear-gradient(90deg, var(--fg) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 21, 19, .55) 1px, transparent 1px);
  background-size: 80px 18px, 40px 12px, 8px 7px;
  background-repeat: repeat-x;
  background-position: -1px 0, -1px 0, -1px 0;
}
.tape-measure span { position: absolute; bottom: 5px; left: calc(var(--x) * 25% + 8px); font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--acc); }
.tape-measure span::before { content: ""; position: absolute; left: -8px; bottom: -6px; width: 2px; height: 48px; background: var(--accent); }
.js .tape-measure span { opacity: 0; transition: opacity .6s var(--ease); }
.js .pilot.is-in .tape-measure span { opacity: 1; }
.js .pilot.is-in .tape-measure span:nth-child(2) { transition-delay: .2s; }
.js .pilot.is-in .tape-measure span:nth-child(3) { transition-delay: .4s; }
.js .pilot.is-in .tape-measure span:nth-child(4) { transition-delay: .6s; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li { padding: 28px 24px 0 0; }
.step__when { color: var(--acc); margin-bottom: 14px; }
.steps h3 { margin-bottom: 10px; font-size: 1.3rem; }
.steps p:not(.step__when) { color: var(--fg-2); font-size: 16px; }
.pilot__cta { display: flex; justify-content: center; margin-top: 64px; }
@media (max-width: 859px) {
  .pilot { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 20px; }
  .tape-measure { height: auto; min-height: 100%; background-image:
      linear-gradient(180deg, var(--fg) 1.2px, transparent 1.2px),
      linear-gradient(180deg, var(--fg) 1px, transparent 1px),
      linear-gradient(180deg, rgba(22, 21, 19, .55) 1px, transparent 1px);
    background-size: 18px 80px, 12px 40px, 7px 8px; background-repeat: repeat-y; }
  .tape-measure span { display: none; }
  .steps { grid-template-columns: 1fr; }
  .steps li { padding: 0 0 36px; position: relative; }
  .steps li::before { content: ""; position: absolute; left: -36px; top: 6px; width: 30px; height: 2px; background: var(--accent); }
}

/* ---------- API (saas). The code block stays dark on the light page. ---------- */
.api { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .api { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.api__p { margin-top: 22px; color: var(--fg-2); max-width: 46ch; }
.api__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-top: 26px; color: var(--fg-2); }
.api__list li::before { content: "→ "; color: var(--acc); }
@media (max-width: 420px) { .api__list { grid-template-columns: 1fr; } }
.code { min-width: 0; border-radius: 14px; background: #0b0b0e; box-shadow: 0 0 0 1px #1f1f24, 0 30px 80px -30px rgba(20, 20, 30, .35); overflow: hidden; }
.code__bar { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 14px; border-bottom: 1px solid #1f1f24; color: #6b6b73; font-size: 11.5px; }
.code .dots { display: flex; gap: 6px; }
.code .dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a2a31; }
.code pre { padding: 18px 20px; overflow-x: auto; font-size: 12.5px; line-height: 1.7; color: #d6d6dc; }
.code .k { color: #ff8a5c; }
.code .s { color: #f5c396; }
.code .c { color: #5e5e68; }
.code .n { color: #9fd0ff; }

/* ---------- FAQ (saas) ---------- */
.faq-wrap { display: grid; gap: 40px; }
@media (min-width: 960px) { .faq-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { position: relative; padding: 20px 36px 20px 0; list-style: none; cursor: pointer; font-weight: 500; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; color: var(--acc); font: 400 22px/1 var(--mono); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 36px 22px 0; color: var(--fg-2); }


/* ---------- IP / Security (saas Security cards, on dark) ---------- */
.ip { display: grid; gap: 14px; margin-top: 56px; }
@media (min-width: 760px) { .ip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ip article { padding: 20px 18px 24px; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.ip__i { color: var(--acc); margin-bottom: 28px; }
.ip h3 { margin-bottom: 8px; }
.ip article > p:last-child { color: var(--fg-2); font-size: 14.5px; }

/* ---------- Demo request: copy + checklist left, form card right (structure after fashionINSTA's
   demo page; our light band, ink, one orange accent, Archivo + JetBrains Mono) ---------- */
.cta { overflow: hidden; padding-bottom: calc(var(--sec) + 20px); }
.cta::before { content: ""; position: absolute; left: 30%; bottom: -260px; width: 900px; max-width: 100vw; height: 520px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255, 79, 18, .1), transparent); filter: blur(10px); pointer-events: none; }
.demo { display: grid; gap: 48px; }
@media (min-width: 960px) { .demo { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(48px, 7vw, 104px); align-items: start; } }
.demo__sub { margin-top: 22px; max-width: 44ch; color: var(--fg-2); font-size: 1.15rem; line-height: 1.5; }
.demo__list { display: grid; gap: 12px; max-width: 480px; margin-top: 32px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.demo__list li { position: relative; padding-left: 28px; font-size: 15px; line-height: 1.4; }
.demo__list li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--acc); font-weight: 600; }
.demo__alt { margin-top: 22px; color: var(--fg-2); font-size: 15px; }
.demo__alt a, .demo__note a { color: var(--fg); border-bottom: 1px solid var(--line-2); }
.demo__alt a:hover, .demo__note a:hover { color: var(--acc); border-color: var(--acc); }

/* The card: white, hairline, rounded like the app window. */
.demo__card { position: relative; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--line-2); border-radius: 14px; background: #fff; box-shadow: 0 30px 80px -40px rgba(20, 20, 30, .25); }
.demo__fields { display: grid; gap: 14px; }
.demo__fields[hidden], .demo__done[hidden], .drop[hidden], .drop__file[hidden] { display: none; }
.demo__head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.demo__badge { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--accent); border-radius: 50%; color: var(--acc); }
.demo__badge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.demo__title { font: 600 1.4rem/1.15 var(--display); letter-spacing: -.03em; }
.demo__note { margin-top: 2px; color: var(--dim); font-size: 14px; }
.demo__row { display: grid; gap: 14px; }
@media (min-width: 480px) { .demo__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.field { display: grid; gap: 6px; min-width: 0; }
.field__l { color: var(--fg-2); }
.field__l em { font-style: normal; color: var(--dim); text-transform: none; letter-spacing: 0; }
.field input:not([type="file"]), .field textarea { width: 100%; height: 50px; padding: 0 16px; border: 1px solid rgba(13, 13, 14, .28); border-radius: 10px; background: var(--c-light); color: var(--fg); font: 400 15px var(--display); }
.field textarea { height: auto; min-height: 96px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a8981; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); background: #fff; }
.field__err { color: var(--acc); font-size: 13px; }
.field.is-invalid input:not([type="file"]), .drop.is-invalid { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.drop { position: relative; display: grid; gap: 4px; align-content: center; justify-items: center; min-height: 96px; padding: 16px; border: 1px dashed rgba(13, 13, 14, .35); border-radius: 10px; background: var(--c-light); text-align: center; transition: border-color .2s, background .2s; }
.drop:hover, .drop.is-over, .drop:focus-within { border-color: var(--accent); background: rgba(255, 79, 18, .05); }
.drop input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.drop__text { font-size: .95rem; color: var(--fg); }
.drop__text strong { font-weight: 500; }
.drop__hint { color: var(--dim); font-size: 11px; }
/* A chosen file: thumbnail (images) or its extension, name + size, remove. */
.drop__file { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--c-light); }
.drop__thumb { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--line); border-radius: 8px; background: var(--c-light-2) center / cover no-repeat; color: var(--fg-2); font: 500 11px var(--mono); text-transform: uppercase; }
.drop__meta { flex: 1; display: grid; min-width: 0; }
.drop__meta b { overflow: hidden; font-size: 14px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.drop__meta small { color: var(--dim); font-size: 11px; }
.drop__remove { flex: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--fg-2); font-size: 22px; line-height: 1; cursor: pointer; }
.drop__remove:hover { background: var(--line); color: var(--fg); }
.demo__submit { width: 100%; gap: 10px; margin-top: 4px; }
.demo__legal { color: var(--dim); font-size: 12.5px; text-align: center; }
.demo__error { padding: 10px 14px; border: 1px solid var(--acc); border-radius: 10px; color: var(--acc); font-size: 14px; line-height: 1.45; }
.demo__error[hidden] { display: none; }
.demo__error a { color: inherit; text-decoration: underline; }
.demo__submit[disabled] { opacity: .6; cursor: progress; }
/* Honeypot: off screen for people, still in the form for bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.demo__done { display: grid; justify-items: start; gap: 12px; padding: 6px 0; }
.demo__done p { color: var(--fg-2); }
.demo__done p b { color: var(--fg); font-weight: 600; }
.demo__done:focus { outline: none; }

/* ---------- Footer (saas) ---------- */
.foot { padding: 56px 0 40px; border-top: 1px solid var(--line); }
.foot__in { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .foot__in { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot svg { height: 12px; width: auto; fill: var(--fg); }
.foot .mono { color: var(--dim); margin-top: 8px; }
.foot ul { display: grid; gap: 8px; font-size: 14px; color: var(--fg-2); align-content: start; }
.foot ul a:hover { color: var(--fg); }
.foot__legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); }
.foot .foot__langs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.foot__langs a[aria-current="page"] { color: var(--fg); font-weight: 600; }

/* ---------- Reveal ---------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv, .app .chat > *, .js .tape-measure span { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scan, .caret { animation: none; }
  .card:hover { transform: none; }
}
