/* Offcut: dark, sleek, tactile.
   Palette from the cutting table: midnight wool, tailor's chalk, basting thread.
   Signature: a 3D cloth that ripples toward the cursor and changes with the swatches. */
:root {
  --bg: #0F1424; --surface: #161C30; --ink: #ECE8DF; --ink-soft: #9EA4B8;
  --chalk-blue: #8FB3FF; --thread: #E0534A; --link: #8FB3FF; --accent: #E0534A;
  --line: rgba(236, 232, 223, .12); --focus: #8FB3FF; --radius: 14px;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
}
body { font-size: 1.075rem; -webkit-font-smoothing: antialiased; }
h1, h2 { font-weight: 400; letter-spacing: -0.02em; }
h1 { font-size: clamp(3rem, 7.5vw, 6.2rem); line-height: .95; }
h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1; max-width: 18ch; margin-bottom: 1em; }
h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.lede { color: var(--ink-soft); }
.site-header { background: rgba(15, 20, 36, .7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); position: sticky; top: 0; }
.brand { font-family: var(--font-display); font-size: 1.6rem; }
.site-nav a { color: var(--ink-soft); }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); background: rgba(255,255,255,.04); }
.js .site-nav.is-open { padding-bottom: .5rem; }

.btn { background: var(--ink); color: var(--bg); border-radius: 999px; font-weight: 600; box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 10px 30px -10px rgba(143,179,255,.5); }
.btn:hover { background: #fff; }
.link-quiet { color: var(--ink-soft); text-decoration: none; }
.link-quiet:hover { color: var(--ink); }

/* ---------- Hero + 3D stage ---------- */
.hero { padding-block: clamp(3rem, 7vw, 5rem) clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 5fr 6fr; gap: 3rem; } }
.hero h1 { max-width: 10ch; }
.stage { position: relative; }
.stage__glow { position: absolute; inset: 10% 5% 25%; background: radial-gradient(closest-side, rgba(143,179,255,.35), rgba(224,83,74,.12) 60%, transparent); filter: blur(30px); pointer-events: none; }
.stage__canvas { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 70vh; margin-inline: auto; cursor: grab; }
.no-webgl .stage__canvas { background: repeating-linear-gradient(90deg, #2F4B8F 0 2px, #3A5AA5 2px 5px); border-radius: var(--radius); }
.swatches { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.swatch { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .85rem .45rem .45rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--ink-soft); font: inherit; font-size: .9rem; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.swatch:hover { color: var(--ink); border-color: rgba(236,232,223,.3); }
.swatch[aria-pressed="true"] { color: var(--ink); border-color: var(--chalk-blue); background: rgba(143,179,255,.1); }
.swatch__chip { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.swatch[data-cloth="oxford"] .swatch__chip { background: repeating-linear-gradient(0deg, #7FA3D9 0 2px, #A9C2E8 2px 3px); }
.swatch[data-cloth="pinstripe"] .swatch__chip { background: repeating-linear-gradient(90deg, #1C2A4A 0 5px, #D9DDE6 5px 6px); }
.swatch[data-cloth="gingham"] .swatch__chip { background: repeating-linear-gradient(0deg, rgba(183,80,44,.55) 0 4px, transparent 4px 8px), repeating-linear-gradient(90deg, rgba(183,80,44,.55) 0 4px, #F3E9DF 4px 8px); }
.swatch[data-cloth="linen"] .swatch__chip { background: #CFC6B4; }
.swatch[data-cloth="herringbone"] .swatch__chip { background: repeating-linear-gradient(45deg, #3A3D44 0 3px, #55595F 3px 6px); }
.stage__caption { text-align: center; color: var(--ink-soft); font-size: .9rem; margin-top: .75rem; }

/* ---------- Bento with cursor glow ---------- */
.bento { display: grid; gap: 1rem; }
@media (min-width: 52rem) {
  .bento { grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: auto auto; }
  .card--measure { grid-row: span 2; }
  .card--wide { grid-column: span 2; }
}
.card { position: relative; overflow: hidden; padding: 1.75rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card::before { /* glow that follows the cursor */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(143,179,255,.14), transparent 40%);
}
.card:hover::before { opacity: 1; }
.card p { color: var(--ink-soft); margin: 0; }
.card h3 { margin-bottom: .4em; }
.card__big { font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; color: var(--ink) !important; margin-bottom: 1.25rem !important; }
.measure { width: 100%; max-width: 320px; margin: 0 auto 1.5rem; overflow: visible; }
.measure__shirt { fill: rgba(143,179,255,.06); stroke: var(--ink-soft); stroke-width: 1.5; }
.measure__line { fill: none; stroke: var(--thread); stroke-width: 1.5; stroke-dasharray: 4 4; }
.measure text { fill: var(--thread); font-family: var(--font-body); font-size: 12px; }
.js .card--measure .measure__line { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.6s ease; }
.js .card--measure.is-in .measure__line { stroke-dashoffset: 0; }
.js .card--measure.is-in .measure__line:nth-of-type(3) { transition-delay: .3s; }
.js .card--measure.is-in .measure__line:nth-of-type(4) { transition-delay: .6s; }
.js .card--measure.is-in .measure__line:nth-of-type(5) { transition-delay: .9s; }

/* ---------- Process ---------- */
.process { list-style: none; padding: 0; margin: 0; counter-reset: p; display: grid; gap: 0; border-top: 1px solid var(--line); }
.process li { counter-increment: p; display: grid; gap: .25rem 2rem; padding-block: 1.75rem; border-bottom: 1px solid var(--line); }
@media (min-width: 52rem) { .process li { grid-template-columns: 6rem 1fr 1.4fr; align-items: baseline; } }
.process li::before { content: counter(p, decimal-leading-zero); font-family: var(--font-display); font-size: 2rem; color: var(--thread); }
.process h3 { font-size: 1.3rem; margin: 0; }
.process p { color: var(--ink-soft); margin: 0; }

/* ---------- Pricing ---------- */
.price-table { display: grid; gap: 1rem; margin: 0 0 1.5rem; }
@media (min-width: 52rem) { .price-table { grid-template-columns: repeat(3, 1fr); } }
.price-table > div { padding: 1.75rem; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(143,179,255,.06), transparent 60%); }
.price-table dt { color: var(--ink-soft); font-size: .95rem; }
.price-table dd { margin: .25rem 0 .5rem; font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.1; }
.price-table p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; padding-block: clamp(4.5rem, 10vw, 8rem); border-top: 1px solid var(--line); }
.cta::before { content: ""; position: absolute; left: 50%; bottom: -30rem; width: 70rem; height: 50rem; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(143,179,255,.28), rgba(224,83,74,.12) 55%, transparent); pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-56%); } to { transform: translateX(-44%); } }
.cta .wrap { position: relative; text-align: center; }
.cta h2 { margin-inline: auto; max-width: 16ch; }
.cta .lede { margin-inline: auto; max-width: 36rem; }
.form--inline { margin: 2rem auto 0; max-width: 46rem; text-align: left; }
@media (min-width: 48rem) { .form--inline { grid-template-columns: 1fr 1fr auto; align-items: end; } .form--inline .form-status { grid-column: 1 / -1; } }
.form input[type="text"], .form input[type="email"] { background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; }
.form label { color: var(--ink-soft); font-weight: 500; }
.form-status { color: var(--chalk-blue); }
.site-footer a { color: var(--ink-soft); }
