/* doesitfit.lol — landing page layout.
 * Tokens and components (colours, .btn, .stamp, .tape, .code, .logo…) live in ds.css.
 * This file only arranges them; it never introduces a colour of its own. */

:root {
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1440px;
  --header-h: 102px; /* 28px padding × 2 + 46px button */
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .art-frame, .art .stamp { animation-delay: 0ms !important; }
  .try-go svg { transition: none !important; }
}

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

/* ------------------------------------------------------------------ skip link */
.skip-link {
  position: absolute; left: var(--s4); top: var(--s4); z-index: 100;
  transform: translateY(calc(-100% - 40px));
}
.skip-link:focus, .skip-link:focus-visible { transform: none; }

/* ------------------------------------------------------------------ header */
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding-block: 28px;
}
.logo { display: inline-flex; align-items: center; min-height: 44px; }
.site-nav { display: flex; align-items: center; gap: var(--s6); }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s1);
  font-weight: 600; text-decoration: none;
}
.nav-cta { min-height: 44px; }

@media (max-width: 519.98px) {
  .site-header-inner { padding-block: var(--s4); }
  .logo { font-size: 24px; }
  .nav-link { display: none; }
}

/* ------------------------------------------------------------------ hero */
.hero { display: flex; flex-direction: column; }

.hero-grid {
  flex: 1 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s7);
  align-items: center; align-content: center;
  padding-top: var(--s5);
}

.hero-copy { display: flex; flex-direction: column; gap: var(--s6); min-width: 0; max-width: 760px; }

.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--graphite); }
.eyebrow-dot {
  flex: none; width: 14px; height: 14px;
  background: var(--blue); border: var(--line); border-radius: var(--r-pill);
}

.hero-title { font-size: clamp(48px, 11vw, 104px); text-wrap: balance; }
.fit {
  display: inline-block;
  padding: 0 0.135em 0.058em;
  background: var(--tape); border: var(--line-frame); border-radius: 14px;
  box-shadow: var(--shadow-hero);
  transform: rotate(-2deg);
}

.hero-lede { max-width: 540px; }

/* the try-it-on form */
.try { display: flex; flex-direction: column; gap: 10px; max-width: 620px; margin: 0; }
.try-label { font: 700 13px/1.2 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.try-row {
  display: flex; align-items: stretch; height: 68px;
  background: var(--paper); border: var(--line); border-radius: 14px;
  box-shadow: var(--shadow-hero); overflow: hidden;
  transition: transform 60ms ease-out, box-shadow 60ms ease-out;
}
.try-row:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }
.try-row:has(.try-go:active) { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--ink); }
.try-input {
  flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 0 20px;
  font: 400 19px/1 var(--font-mono); color: var(--ink);
}
.try-input:focus, .try-input:focus-visible { outline: none; }
.try-input::placeholder { color: var(--graphite); opacity: 1; }
.try-go {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 26px; border: 0; border-left: var(--line); border-radius: 0;
  background: var(--tomato); color: var(--ink);
  font: 700 18px/1 var(--font-body); white-space: nowrap;
}
.try-go svg { flex: none; transition: transform 120ms ease-out; }
.try-go:hover { color: var(--ink); }
.try-go:hover svg { transform: translateX(3px); }
.try-go:focus-visible { outline: 2px dashed var(--ink); outline-offset: -8px; }
.try-hint { margin: 0; font-size: 14px; line-height: 1.45; color: var(--graphite); }

/* the devices illustration: drawn on a 640 × 535 board (1em = 10px) and scaled to its column */
.hero-art { container-type: inline-size; min-width: 0; width: 100%; }
/* the spill tab and tilted stamps poke out of the laptop card: keep that inside the page on narrow screens */
@media (max-width: 1023.98px) { .hero-art { padding-right: 30px; } }
html, body { overflow-x: clip; } /* safety net: decorations must never widen the page on phones */
.art {
  position: relative;
  font-size: 10px;
  font-size: min(10px, 100cqi / 64);
  width: 64em; height: 53.5em;
  margin-inline: auto;
}
.art-frame {
  position: absolute;
  display: flex; flex-direction: column;
  background: var(--paper); border: var(--line-frame); box-shadow: var(--shadow-hero);
  animation: pop-in 220ms cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.art-laptop { left: 13.6em; top: 2.2em; width: 46em; height: 29em; padding: 1.6em; gap: 1em; border-radius: 1.8em; animation-delay: 80ms; }
.art-phone { left: 4.6em; top: 19.4em; width: 23em; height: 31em; padding: 1.8em; gap: 1em; border-radius: 2.2em; animation-delay: 0ms; }
.art-mini { left: 30.6em; top: 30.4em; width: 12em; height: 22em; padding: 1.4em 1.2em; gap: 0.8em; border-radius: 2.2em; animation-delay: 160ms; }

.art i, .art b { display: block; flex: none; }
.sk-top { display: flex; align-items: center; justify-content: space-between; }
.sk-nav { display: flex; gap: 0.8em; }
.sk-nav i { width: 3em; height: 0.6em; background: var(--dust); border-radius: 0.3em; }
.sk-logo { background: var(--ink); }
.sk-line { background: var(--ink); }
.art .sk-fill { flex: 1 1 auto; background: var(--sand); }
.sk-grid { display: grid; }
.sk-grid b { background: var(--sand); }
.sk-w45 { width: 45%; } .sk-w55 { width: 55%; } .sk-w60 { width: 60%; }
.sk-w70 { width: 70%; } .sk-w85 { width: 85%; } .sk-w90 { width: 90%; }

.art-laptop .sk-logo { width: 5.6em; height: 1.2em; border-radius: 0.3em; }
.art-laptop .sk-line { height: 1.8em; border-radius: 0.4em; }
.sk-grid-3 { flex: 1 1 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1em; }
.sk-grid-3 b { border-radius: 0.8em; }

.art-phone .sk-logo { width: 4.4em; height: 1em; border-radius: 0.3em; }
.art-phone .sk-line { height: 1.4em; border-radius: 0.3em; }
.art-phone .sk-fill { border-radius: 0.8em; }
.sk-grid-2 { height: 6em; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8em; }
.sk-grid-2 b { border-radius: 0.6em; }

.art-mini .sk-logo { width: 3em; height: 0.8em; border-radius: 0.2em; }
.art-mini .sk-line { height: 1em; border-radius: 0.2em; }
.art-mini .sk-fill { border-radius: 0.6em; }

.art-spill {
  position: absolute; right: -4.4em; top: 12em; width: 4.4em; height: 7em;
  background: var(--hatch); border: var(--line); border-left: 0; border-radius: 0 0.8em 0.8em 0;
}

.art .stamp {
  position: absolute; font-size: 13px; padding: 5px 10px;
  transform: rotate(var(--tilt));
  animation: stamp-slam 160ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.art .art-stamp-spill { --tilt: 5deg; right: -3em; top: -1.8em; animation-delay: 440ms; }
.art .art-stamp-tight { --tilt: -4deg; left: -2.6em; top: -1.6em; animation-delay: 360ms; }
.art .art-stamp-fits { --tilt: -6deg; right: -2.8em; bottom: 2.6em; animation-delay: 520ms; }

/* the tape measure along the bottom of the hero: 0–1920 mapped onto the page width */
.hero-tape {
  position: relative; overflow: hidden;
  height: 64px; margin-top: var(--s6);
  border-block: var(--line);
  font: 700 12px/1 var(--font-mono);
}
.tick { position: absolute; top: 12px; white-space: nowrap; }
.tick-0 { left: 12px; }
.tick-360 { left: calc(360 / 1920 * 100%); }
.tick-768 { left: calc(768 / 1920 * 100%); }
.tick-1024 { left: calc(1024 / 1920 * 100%); }
.tick-1280 { left: calc(1280 / 1920 * 100%); }
.tick-1440 { left: calc(1440 / 1920 * 100%); }
.tick-end { right: 16px; }

/* hero: tablet (stacked, art below the form) */
@media (min-width: 760px) and (max-width: 1023.98px) {
  .hero-art { max-width: 600px; margin-inline: auto; }
}

/* hero: desktop, the board's two columns */
@media (min-width: 1024px) {
  .hero { min-height: min(calc(100vh - var(--header-h)), 1000px); min-height: min(calc(100svh - var(--header-h)), 1000px); }
  .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-title { font-size: clamp(72px, 7.2vw, 104px); }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  /* narrower column: keep the whole placeholder visible */
  .try-input { padding: 0 16px; font-size: 16px; }
  .try-go { padding: 0 20px; }
}

/* hero: phones */
@media (max-width: 759.98px) {
  .hero-grid { gap: var(--s6); padding-top: var(--s2); }
  .hero-copy { gap: var(--s5); }
  .hero-art { max-width: 440px; margin-inline: auto; }
  .art-frame { border-width: 2px; box-shadow: var(--shadow); }
  .art .stamp { font-size: 12px; padding: 4px 8px; }
}
@media (max-width: 519.98px) {
  .hero-lede { font-size: 18px; }
  .try-row { flex-direction: column; height: auto; }
  .try-row:has(.try-go:active) { transform: translate(4px, 4px); }
  .try-row { box-shadow: var(--shadow); }
  .try-input { height: 60px; flex: none; padding: 0 16px; font-size: 17px; }
  .try-go { height: 56px; border-left: 0; border-top: var(--line); }
}

/* tape labels: drop the ones that would collide */
@media (max-width: 899.98px) { .tick-1440 { display: none; } }
@media (max-width: 679.98px) { .tick-1280 { display: none; } }
@media (max-width: 479.98px) { .tick-note { display: none; } }

/* ------------------------------------------------------------------ how it works */
.how { padding-block: clamp(64px, 9vw, 120px) clamp(64px, 8vw, 104px); }

.section-head { display: flex; flex-direction: column; gap: var(--s4); max-width: 760px; margin-bottom: var(--s7); }
.section-head .t-h2 { font-size: clamp(32px, 5vw, 40px); }
.section-lede { max-width: 640px; }

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5);
}
.step {
  min-width: 0;
  display: flex; flex-direction: column; gap: var(--s4);
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper); border: var(--line); border-radius: var(--r-frame); box-shadow: var(--shadow);
}
.step p { margin: 0; max-width: 64ch; }
.step-head { display: flex; align-items: center; gap: var(--s3); }
.step-head h3, .cant-fake-head h3 { margin: 0; font: 700 22px/1.2 var(--font-body); }
.step-num {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--ink); color: var(--cream); border-radius: 10px;
  font-size: 14px; font-weight: 700;
}
.step-text { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.num { font-weight: 600; white-space: nowrap; }

.step-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: start; }

/* 01: bare host in, full URL out */
.io {
  list-style: none; margin: 0; padding: 0;
  background: var(--paper); border: var(--line); border-radius: var(--r); overflow: hidden;
}
.io li {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2);
  padding: var(--s3) var(--s4);
  font: 400 14px/1.4 var(--font-mono); overflow-wrap: anywhere;
}
.io li + li { border-top: var(--line); }
.io-arrow { flex: none; }
.io-out { font-weight: 700; }

/* 02: layout first, zoom after */
.scale-demo { display: flex; align-items: flex-end; gap: var(--s3); color: var(--ink); }
.sd-item { display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
.sd-box { position: relative; flex: none; }
.sd-box-full { width: 92px; height: 200px; }
.sd-box-half { width: 46px; height: 100px; }
.sd-frame {
  position: absolute; left: 0; top: 0; width: 92px; height: 200px;
  display: flex; flex-direction: column; gap: 7px; padding: 12px 9px;
  background: var(--paper); border: var(--line); border-radius: 12px;
}
.sd-box-half .sd-frame { transform: scale(0.5); transform-origin: 0 0; }
.sd-frame i { display: block; height: 7px; background: var(--ink); border-radius: 2px; }
.sd-frame i:first-child { width: 40%; height: 6px; margin-bottom: 4px; }
.sd-frame i:nth-child(3) { width: 62%; }
.sd-frame b { display: block; flex: 1; margin-top: 4px; background: var(--sand); border-radius: 5px; }
.sd-frame s { display: block; height: 22px; background: var(--sand); border-radius: 5px; text-decoration: none; }
.sd-arrow { flex: none; margin-bottom: 96px; }
.sd-cap { font-size: 13px; font-weight: 600; margin-top: var(--s2); }
.sd-sub { font-size: 13px; color: var(--graphite); }
.step .step-meta {
  margin-top: auto;
  padding-top: var(--s3); border-top: 2px dashed var(--dust);
  font-size: 14px; color: var(--graphite);
}
.step-meta .num { color: var(--ink); }

/* 03: verdicts */
.verdicts {
  margin: 0;
  background: var(--paper); border: var(--line); border-radius: var(--r); overflow: hidden;
}
.verdict {
  display: grid; grid-template-columns: 168px minmax(0, 1fr); align-items: center; gap: var(--s2) var(--s4);
  padding: 14px var(--s4);
}
.verdict + .verdict { border-top: var(--line); }
.verdict dt { display: flex; }
.verdict dd { margin: 0; }
.verdict .stamp { font-size: 13px; }

.fine-print {
  display: flex; flex-direction: column; gap: var(--s3); min-width: 0;
  padding: clamp(16px, 2.4vw, 24px);
  background: var(--cream); border: var(--line); border-radius: var(--r);
}
.fine-print-title { margin: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 8px; height: 8px; background: var(--ink);
}
.snippet { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s2); }
.snippet-label { font-weight: 600; }
.snippet-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--s3); }
.snippet-code {
  display: flex; align-items: center; flex: 1 1 240px; min-width: 0; min-height: 44px;
  padding: 10px 12px; background: var(--paper); font-size: 13px; line-height: 1.5;
}
.copy-btn { flex: none; min-width: 108px; }
.copy-btn[data-state="copied"] { background: var(--ink); color: var(--cream); }
.copy-btn[data-state="copied"]:hover { color: var(--cream); }

/* 04: commands */
.cmds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.cmds li { display: flex; flex-direction: column; gap: var(--s2); }
.cmd-label { color: var(--graphite); }
.cmd { display: block; padding: 12px 14px; font-size: 15px; }
.prompt { color: var(--graphite); user-select: none; -webkit-user-select: none; }

/* what a browser can't fake */
.cant-fake {
  margin-top: var(--s7);
  background: var(--paper); border: var(--line); border-radius: var(--r-frame); box-shadow: var(--shadow);
  overflow: hidden;
}
.cant-fake-head {
  display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s5) clamp(20px, 3vw, 32px);
  border-bottom: var(--line);
}
.cant-fake-head p { margin: 0; max-width: 64ch; }
.fake-list { list-style: none; margin: 0; padding: 0; }
.fake-list li {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s1) var(--s5);
  padding: var(--s4) clamp(20px, 3vw, 32px);
}
.fake-list li + li { border-top: var(--line); }
.fake-list strong { font-weight: 700; }

/* how: wider screens */
@media (min-width: 600px) {
  .step-split-demo { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .step-1 { grid-column: span 5; }
  .step-2 { grid-column: span 7; }
  .step-3, .step-4 { grid-column: 1 / -1; }
  .step-split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
}
@media (min-width: 960px) and (max-width: 1199.98px) {
  /* step 02 is too narrow for text + demo side by side here */
  .step-2 .step-split-demo { grid-template-columns: minmax(0, 1fr); }
  .step-2 .scale-demo { justify-content: flex-start; }
}

/* how: phones */
@media (max-width: 599.98px) {
  .fake-list li { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 479.98px) {
  .verdict { grid-template-columns: minmax(0, 1fr); padding: var(--s3) 14px; }
  .verdict dt { padding-block: var(--s1); }
  .copy-btn { flex: 1 1 auto; }
}

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: var(--line); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s3) var(--s6); padding-block: var(--s6);
}
.logo-sm { font-size: 24px; }
.footer-note { margin: 0; font-size: 14px; color: var(--graphite); }
.footer-link {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px;
  font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}
@media (max-width: 599.98px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------------------ how it works: plain-English version */
.step-3, .step-4 { grid-column: 1 / -1; }
.step strong { font-weight: 700; }
.verdicts { margin: 0; background: var(--paper); border: var(--line); border-radius: var(--r); overflow: hidden; }
.unmeasured-tag { display: inline-block; padding: 4px 9px; border: 2px dashed var(--graphite); color: var(--graphite); font-size: 12px; font-weight: 700; }
.prompt-box {
  white-space: pre-wrap; overflow-wrap: anywhere; font: 400 14px/1.55 var(--font-mono);
  padding: 14px 16px; background: var(--cream); border: var(--line); border-radius: var(--r);
}
.snippet .btn-primary.copy-btn { align-self: flex-start; }
.snippet-label-2 { margin-top: var(--s4); }
.safe-note { padding: 12px 14px; background: var(--cream); border: var(--line); border-radius: var(--r); }

.faq { margin-top: var(--s7); display: flex; flex-direction: column; gap: var(--s3); }
.faq-title { margin: 0 0 var(--s2); font: 800 clamp(26px, 4vw, 32px)/1.1 var(--font-display); letter-spacing: -0.02em; }
.faq details { background: var(--paper); border: var(--line); border-radius: var(--r); }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  min-height: 56px; padding: 12px clamp(16px, 2.4vw, 22px); cursor: pointer; list-style: none;
  font-weight: 700; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border: var(--line); border-radius: 8px; font: 700 18px/1 var(--font-mono);
}
.faq details[open] summary::after { content: "–"; background: var(--ink); color: var(--cream); }
.faq-body { display: flex; flex-direction: column; gap: var(--s3); padding: 0 clamp(16px, 2.4vw, 22px) clamp(16px, 2.4vw, 22px); max-width: 72ch; }
.faq-body p { margin: 0; }
.faq-body .snippet-row { max-width: 420px; }
.glossary { margin: 0; display: flex; flex-direction: column; }
.glossary div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s1) var(--s4); padding: 10px 0; }
.glossary div + div { border-top: 1.5px solid var(--dust); }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 0; }
@media (max-width: 519.98px) { .glossary div { grid-template-columns: minmax(0, 1fr); } }
