/* YD Build — shared styles. Drawing-set look: title blocks, hairlines, one safety-orange accent. */
:root {
  --bg: #F2F3F1;
  --paper: #FFFFFF;
  --ink: #1B2430;
  --ink-2: #2A3542;
  --muted: #48525F;
  --line: #D4D8DC;
  --accent: #C9501A;
  --accent-hover: #A8420F;
  --accent-ink: #FFFFFF;
  --tint: #FBEADF;
  --link: #275486;
  --f-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1120px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 {
  font-family: var(--f-display); font-weight: 700; line-height: 1.02;
  letter-spacing: 0.005em; margin: 0; text-wrap: balance;
}
h1 { font-size: clamp(2.9rem, 8vw, 5.6rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4.6vw, 3rem); text-transform: uppercase; }
h3 { font-size: 1.5rem; }
p { margin: 0; max-width: 66ch; text-wrap: pretty; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow {
  font-family: var(--f-body); font-size: 0.95rem; font-weight: 600; letter-spacing: 0;
  color: var(--accent);
}
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* Header */
.site-head { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; background: var(--ink); color: var(--bg);
  font-family: var(--f-display); font-weight: 700; font-size: 1.15rem;
  display: grid; place-items: center; position: relative;
}
.brand-mark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--accent); }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.06em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 1.5px solid var(--ink);
  font-family: var(--f-body); font-size: 0.98rem; font-weight: 600; letter-spacing: 0;
  text-decoration: none; color: var(--ink); background: transparent; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.nav .btn { min-height: 40px; padding: 0 16px; color: var(--accent-ink); }
.nav .btn:hover { color: var(--accent-ink); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
main > section { padding-block: clamp(56px, 9vw, 104px); }
main > section + section { border-top: 1px solid var(--line); }
.sec-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head p { font-size: 1.1rem; color: var(--muted); }
.dark { background: var(--ink); color: #E6E9ED; }
.dark .muted, .dark .sec-head p, .dark figcaption { color: #A9B2BE; }
.dark .eyebrow { color: #EE7A3F; }
.dark a { color: #8DB7E6; }
.dark .btn { border-color: #E6E9ED; color: #E6E9ED; }
.dark .btn:hover { background: #E6E9ED; color: var(--ink); }
.dark .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Hero */
.hero { padding-block: clamp(48px, 8vw, 96px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero h1 span { color: var(--accent); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.28rem); max-width: 54ch; }
.hero-figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hero-figure img { border: 1px solid var(--line); background: var(--paper); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
figcaption { font-family: var(--f-body); font-size: 0.86rem; color: var(--muted); }

/* Title block */
.titleblock {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1.5px solid var(--ink); background: var(--paper);
  font-family: var(--f-body); font-size: 0.95rem; margin-top: clamp(36px, 5vw, 56px);
}
.titleblock > div { padding: 10px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.titleblock > div:last-child { border-right: 0; }
.titleblock span { color: var(--muted); font-size: 0.82rem; }
.titleblock b { font-weight: 500; overflow-wrap: anywhere; }

/* Cards */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); padding: 26px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card .k { font-family: var(--f-body); font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.card p { color: var(--muted); }

/* Featured work */
.feature { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature img { width: 100%; border: 1px solid #2B3440; }
.feature-copy { display: flex; flex-direction: column; gap: 18px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { padding-left: 26px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 12px; height: 2px; background: var(--accent); }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; border: 1px solid #2B3440; }

/* Sample-site screenshots */
.shot { display: block; border: 1.5px solid var(--ink); background: var(--paper); box-shadow: 10px 10px 0 var(--line); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.shot:hover { transform: translate(-2px, -2px); box-shadow: 12px 12px 0 var(--line); }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--bg); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.shot-bar span { margin-left: 8px; flex: 1; font-family: var(--f-mono); font-size: 0.7rem; color: var(--muted); background: var(--paper); border: 1px solid var(--line); padding: 3px 8px; }
.feature .shot img { width: 100%; border: 0; }
.shots-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(28px, 4vw, 44px); }
.shots-row a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--muted); font-family: var(--f-body); font-size: 0.86rem; }
.shots-row img { border: 1px solid var(--line); transition: border-color .15s; }
.shots-row a:hover img { border-color: var(--ink); }
.shots-row a:hover span { color: var(--accent); }
@media (max-width: 640px) { .shots-row { grid-template-columns: minmax(0, 1fr); } .shot { box-shadow: 6px 6px 0 var(--line); } }

/* Pricing table */
.offers { border: 1.5px solid var(--ink); background: var(--paper); }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 170px; gap: 24px; padding: 24px; border-bottom: 1px solid var(--line); align-items: start; }
.offer:last-child { border-bottom: 0; }
.offer.pick { background: linear-gradient(90deg, var(--tint), var(--paper) 55%); box-shadow: inset 5px 0 0 var(--accent); }
.offer h3 { font-size: 1.6rem; }
.offer .for { font-size: 0.9rem; color: var(--muted); margin-top: 6px; }
.offer ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; font-size: 0.97rem; }
.price { font-family: var(--f-display); font-size: 2rem; font-weight: 700; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.price small { display: block; font-family: var(--f-body); font-size: 0.82rem; font-weight: 400; color: var(--muted); margin-top: 6px; }
.badge { display: inline-block; font-family: var(--f-body); font-size: 0.8rem; font-weight: 600; letter-spacing: 0; padding: 3px 8px; background: var(--accent); color: #fff; margin-bottom: 8px; }
.note { margin-top: 16px; font-size: 0.92rem; color: var(--muted); }

.badge.alt { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* Founding-client offer */
.founding { margin-top: 16px; background: var(--ink); color: #E6E9ED; padding: clamp(22px, 3.5vw, 32px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center; }
.founding > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.founding .eyebrow { color: #EE7A3F; }
.founding h3 { font-size: clamp(1.5rem, 3vw, 2rem); text-transform: uppercase; }
.founding p:not(.eyebrow) { color: #B8C0CA; max-width: 60ch; }
@media (max-width: 640px) { .founding { grid-template-columns: minmax(0, 1fr); } }

/* Promises under the price list */
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 16px; border: 1.5px solid var(--ink); background: var(--paper); }
.promises > div { padding: 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.promises > div:last-child { border-right: 0; }
.promises .k { font-family: var(--f-body); font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.promises h3 { font-size: 1.35rem; }
.promises p { font-size: 0.95rem; color: var(--muted); }
@media (max-width: 920px) {
  .promises { grid-template-columns: minmax(0, 1fr); }
  .promises > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .promises > div:last-child { border-bottom: 0; }
}

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--ink); background: var(--paper); }
.step { padding: 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.step:last-child { border-right: 0; }
.step .n { font-family: var(--f-display); font-size: 2.6rem; font-weight: 700; color: var(--accent); line-height: 1; }
.step .t { font-family: var(--f-body); font-size: 0.88rem; font-weight: 500; color: var(--muted); }
.step p { font-size: 0.95rem; }

/* Milestone band */
.band { background: var(--tint); border-left: 6px solid var(--accent); padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.band h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.band p { margin-top: 10px; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); }
.about-copy { display: flex; flex-direction: column; gap: 16px; font-size: 1.05rem; }

/* Form */
.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact-side { display: flex; flex-direction: column; gap: 18px; }
.contact-lines { font-family: var(--f-body); font-size: 1rem; display: flex; flex-direction: column; gap: 6px; }
form { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); padding: clamp(20px, 3vw, 32px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full, fieldset.full { grid-column: 1 / -1; }
label, legend { font-family: var(--f-body); font-size: 0.92rem; font-weight: 600; color: var(--ink); }
input[type=text], input[type=email], input[type=tel], input[type=url], textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-bottom: 2px solid var(--ink-2); padding: 11px 12px; width: 100%; border-radius: 0;
}
input:focus, textarea:focus { outline: none; border-bottom-color: var(--accent); background: #fff; }
textarea { min-height: 110px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
fieldset legend { width: 100%; margin-bottom: 8px; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; font-weight: 500; padding: 8px 12px; border: 1px solid var(--line); font-size: 0.92rem; cursor: pointer; background: var(--bg); user-select: none; }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-foot p { font-size: 0.85rem; color: var(--muted); }
.form-status { grid-column: 1 / -1; font-size: 0.95rem; }
.form-status:empty { display: none; }
.form-status.is-error { color: #A23B2A; font-weight: 600; }
.form-foot a { color: inherit; }
.hp { position: absolute; left: -9999px; }

/* Case study */
.crumbs { font-family: var(--f-body); font-size: 0.88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.cs-hero { display: flex; flex-direction: column; gap: 22px; }
.cs-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); max-width: 15ch; }
.wide { margin: clamp(32px, 5vw, 56px) 0 0; }
.wide img { width: 100%; border: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.split.rev > :first-child { order: 2; }
.split-copy { display: flex; flex-direction: column; gap: 16px; }
.plate { background: var(--paper); border: 1px solid var(--line); padding: clamp(20px, 4vw, 48px); display: grid; place-items: center; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pair figure, .gallery figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pair img { background: #fff; border: 1px solid var(--line); width: 100%; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.gallery .span2 { grid-column: span 2; }
.gallery .span2 img { aspect-ratio: auto; height: 100%; }
.deliver { columns: 2 260px; column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.deliver li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.deliver li span { font-family: var(--f-body); font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.quote { border-left: 6px solid var(--accent); padding: 8px 0 8px 24px; display: flex; flex-direction: column; gap: 12px; }
.quote p { font-family: var(--f-display); font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 600; line-height: 1.15; max-width: 32ch; }

/* Footer */
.site-foot { border-top: 3px solid var(--ink); padding-block: 28px 40px; font-family: var(--f-body); font-size: 0.88rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-foot a { color: var(--muted); }

/* Responsive */
@media (max-width: 920px) {
  .hero-grid, .feature, .contact, .about, .split { grid-template-columns: minmax(0, 1fr); }
  .split.rev > :first-child { order: 0; }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .offer { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .price { text-align: left; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav a:not(.btn) { display: none; }
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock > div:nth-child(2) { border-right: 0; }
  .titleblock > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .band { grid-template-columns: minmax(0, 1fr); }
  form { grid-template-columns: minmax(0, 1fr); }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery .span2 { grid-column: auto; }
  .btns .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Case studies & Work index ---------- */
.sample-flag { background: var(--tint); border-left: 5px solid var(--accent); padding: 14px 18px; font-size: 0.98rem; max-width: 760px; }
.sample-flag b { font-weight: 600; }
.screens { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: end; margin-top: clamp(28px, 4vw, 48px); }
.screens .shot img { width: 100%; }
.phone-frame { border: 2px solid var(--ink); border-radius: 26px; padding: 8px; background: var(--paper); box-shadow: 8px 8px 0 var(--line); }
.phone-frame img { border-radius: 18px; width: 100%; }
.screens figcaption, .phone-cap { margin-top: 10px; }
.live-link { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--accent); text-decoration: none; }
.live-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.why article { background: var(--paper); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.why p { color: var(--muted); font-size: 0.97rem; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.feature-list li { padding: 12px 0 12px 26px; border-bottom: 1px solid var(--line); position: relative; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: 12px; height: 2px; background: var(--accent); }
.feature-list li b { font-weight: 600; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.trio figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.trio img { width: 100%; border: 1px solid var(--line); }
.ba { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ba figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ba .plate { min-height: 260px; }
.ba .tagline { font-weight: 600; font-size: 0.9rem; }
.ba .before .tagline { color: var(--muted); }
.ba .after .tagline { color: var(--accent); }
.palette { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.palette div { border: 1px solid var(--line); background: var(--paper); }
.palette i { display: block; height: 72px; }
.palette span { display: block; padding: 8px 10px; font-size: 0.88rem; }
.palette span b { display: block; font-weight: 600; }
.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.apps figure { margin: 0; background: var(--paper); border: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.apps svg { width: 100%; height: auto; display: block; }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.work-card { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; min-width: 0; }
.work-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.work-card.featured { grid-column: 1 / -1; }
.work-card.featured img { aspect-ratio: 21 / 9; object-position: center; }
.work-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); }
.work-card .wc-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.work-card h3 { font-size: 1.5rem; }
.work-card p { color: var(--muted); font-size: 0.97rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-s { font-size: 0.8rem; font-weight: 600; padding: 3px 9px; border: 1px solid var(--line); background: var(--bg); }
.chip-s.real { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip-s.sample { border-color: var(--accent); color: var(--accent); background: transparent; }
.ex-link { display: inline-block; margin-top: 8px; font-weight: 600; font-size: 0.92rem; color: var(--accent); text-decoration: none; }
.ex-link:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 920px) {
  .screens { grid-template-columns: minmax(0, 1fr) 180px; }
  .why, .trio { grid-template-columns: minmax(0, 1fr); }
  .feature-list { grid-template-columns: minmax(0, 1fr); }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .screens { grid-template-columns: minmax(0, 1fr); }
  .screens .phone-wrap { max-width: 230px; }
  .ba, .apps { grid-template-columns: minmax(0, 1fr); }
  .palette { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Case study v2: stage, brief, decisions, measures ---------- */
.cs-stage { position: relative; overflow: hidden; border-radius: 14px; padding: clamp(18px, 4vw, 48px) clamp(18px, 4vw, 48px) 0; height: clamp(300px, 50vw, 620px); margin-top: clamp(28px, 4vw, 48px); }
.cs-stage .win { width: 84%; background: #fff; border-radius: 10px 10px 0 0; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.08); }
.cs-stage .win .bar { height: 30px; background: #ECEDEF; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.cs-stage .win .bar i { width: 10px; height: 10px; border-radius: 50%; background: #D3D5D9; }
.cs-stage .win .bar span { margin-left: 10px; height: 18px; flex: 0 1 300px; border-radius: 9px; background: #fff; font: 500 11px/18px var(--f-body); color: #7A7F87; padding: 0 10px; overflow: hidden; white-space: nowrap; }
.cs-stage .win img { width: 100%; height: auto; }
.cs-stage .ph { position: absolute; right: clamp(14px, 4vw, 48px); bottom: clamp(-60px, -4vw, -20px); width: 23%; max-width: 250px; min-width: 104px; background: #111418; border-radius: 34px; padding: 9px; box-shadow: 0 30px 60px -18px rgba(0,0,0,.45); }
.cs-stage .ph img { border-radius: 26px; width: 100%; height: auto; }
.stage-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 12px; font-size: 0.9rem; color: var(--muted); }
.stage-cap a { color: var(--accent); font-weight: 600; text-decoration: none; }
.stage-cap a:hover { text-decoration: underline; text-underline-offset: 3px; }

.brief { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.brief div { padding: 20px 24px 4px 0; display: flex; flex-direction: column; gap: 8px; }
.brief div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.brief h3 { font-size: 1.3rem; }
.brief p { color: var(--muted); font-size: 0.98rem; }

.decide { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.decide-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.decide-list li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.decide-list .k { font-weight: 600; }
.decide-list p { color: var(--muted); }
.decide-list p b { color: var(--ink); font-weight: 600; }
.spec-card { background: var(--paper); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.spec-card .sw { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.spec-card .sw div { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; color: var(--muted); min-width: 0; }
.spec-card .sw i { display: block; height: 46px; border: 1px solid rgba(0,0,0,.08); }
.spec-card dl { margin: 0; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px 12px; font-size: 0.93rem; }
.spec-card dt { color: var(--muted); }
.spec-card dd { margin: 0; }
.spec-card .watch { background: var(--bg); padding: 12px 14px; font-size: 0.92rem; }
.spec-card .watch b { font-weight: 600; }

.measure { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.measure div { background: var(--paper); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.measure b { font-family: var(--f-display); font-size: 1.6rem; font-weight: 700; line-height: 1.05; }
.measure p { color: var(--muted); font-size: 0.95rem; }

/* Home: choose your style */
.styles-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.style-card { grid-column: span 2; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; min-width: 0; transition: border-color .15s, transform .15s; }
.style-card:nth-child(n+4) { grid-column: span 3; }
.style-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.style-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); }
.style-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.style-card .sc-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.style-card h3 { font-size: 1.4rem; display: flex; align-items: center; gap: 10px; }
.style-card h3 i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.style-card p { color: var(--muted); font-size: 0.95rem; }
.style-card .for { font-size: 0.88rem; font-weight: 600; color: var(--ink); }

/* Work page v2: featured real project, then 3 + 2 samples */
.work-grid.v2 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.work-grid.v2 .work-card { grid-column: span 2; }
.work-grid.v2 .work-card.featured { grid-column: 1 / -1; }
.work-grid.v2 .work-card.wide { grid-column: span 3; }

@media (max-width: 920px) {
  .brief, .measure { grid-template-columns: minmax(0, 1fr); }
  .brief div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .decide { grid-template-columns: minmax(0, 1fr); }
  .spec-card { position: static; }
  .styles-grid, .work-grid.v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .style-card, .style-card:nth-child(n+4), .work-grid.v2 .work-card, .work-grid.v2 .work-card.wide { grid-column: span 1; }
  .style-card:last-child, .work-grid.v2 .work-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .cs-stage .win { width: 100%; }
  .cs-stage .ph { width: 34%; right: 10px; }
  .decide-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .styles-grid, .work-grid.v2 { grid-template-columns: minmax(0, 1fr); }
  .style-card:last-child, .work-grid.v2 .work-card:last-child { grid-column: auto; }
}
