/* Nazanin Shaterian — portfolio prototype
   Plain CSS, mobile first. Tokens first; components after.
   See DESIGN.md for the rules behind every value. */

/* ---------- 1. Tokens ---------- */
:root {
  /* colour */
  --bg: #0c0c0b;            /* page */
  --bg-raised: #141413;     /* panels: contact, specs, header on scroll */
  --plate: #070707;         /* behind every image */
  --line: #262624;          /* hairlines */
  --line-strong: #64625b;   /* control borders: 3.2:1 on --bg (WCAG 1.4.11) */
  --text: #edece7;          /* body + headings  (17.4:1 on --bg) */
  --text-2: #b5b3aa;        /* secondary text   (9.4:1 on --bg) */
  --text-3: #8f8d85;        /* mono labels      (5.8:1 on --bg) */
  --focus: #8db8ff;         /* keyboard focus only (CAD selection blue) */
  --confirm: #f0b45a;       /* [CONFIRM] placeholders only */
  --confirm-bg: rgba(240, 180, 90, 0.08);

  /* type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --fs-display: clamp(2.25rem, 1.55rem + 2.9vw, 4rem);     /* 36 → 64 */
  --fs-h2: clamp(1.75rem, 1.45rem + 1.3vw, 2.5rem);        /* 28 → 40 */
  --fs-h3: 1.125rem;                                       /* 18 */
  --fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);     /* 17 → 20 */
  --fs-body: 1.0625rem;                                    /* 17 */
  --fs-small: 0.9375rem;                                   /* 15 */
  --fs-mono: 0.75rem;                                      /* 12 */

  /* spacing (4 px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 9vw, 136px);
  --max: 1320px;
  --measure: 38rem;

  /* shape + motion */
  --r-plate: 2px;
  --r-btn: 4px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
picture { display: contents; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: #3a4a66; color: #fff; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--text); color: var(--bg); padding: var(--s3) var(--s4);
  border-radius: var(--r-btn); text-decoration: none; font-weight: 500;
}
.skip:focus-visible { top: var(--s3); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- 3. Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); border-top: 1px solid var(--line); }
.section--flush { border-top: 0; }

.section-head { display: grid; gap: var(--s4); margin-bottom: var(--s7); }
.section-head p { color: var(--text-2); max-width: var(--measure); font-size: var(--fs-lead); }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 4fr 8fr; align-items: end; gap: var(--s6); }
  .section-head--stack { grid-template-columns: 1fr; }
}

/* ---------- 4. Type ---------- */
.display {
  font-size: var(--fs-display); line-height: 1.04; letter-spacing: -0.035em; font-weight: 500;
  text-wrap: balance;
}
.h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -0.025em; font-weight: 500; text-wrap: balance; }
.h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.01em; font-weight: 500; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-2); max-width: var(--measure); text-wrap: pretty; }
.muted { color: var(--text-2); }

/* mono label: figure numbers, eyebrows, small facts */
.label {
  font-family: var(--font-mono); font-size: var(--fs-mono); line-height: 1.4;
  letter-spacing: 0.02em; color: var(--text-3); font-weight: 400;
}
.label--rule { display: flex; align-items: center; gap: var(--s3); }
.label--rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- 5. Buttons + links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  border-radius: var(--r-btn); border: 1px solid var(--line-strong);
  font-size: 1rem; font-weight: 500; letter-spacing: -0.005em; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--text);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { border-color: var(--text-2); background: rgba(255, 255, 255, .04); }
.btn--primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--primary:hover { background: #ffffff; border-color: #ffffff; }
.btn--sm { min-height: 44px; padding: 0 var(--s4); font-size: var(--fs-small); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.link {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px;
  color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 5px; text-decoration-thickness: 1px;
  transition: text-decoration-color .2s var(--ease);
}
.link:hover { text-decoration-color: var(--text); }

/* ---------- 6. Header + nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 12, 11, .86);
  -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: var(--s4); }

.wordmark { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; text-decoration: none; line-height: 1.15; }
.wordmark__name { font-weight: 500; font-size: 1rem; letter-spacing: -0.01em; }
.wordmark__role { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-3); letter-spacing: 0.02em; }

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: var(--s1); }
.nav__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3);
  font-size: var(--fs-small); color: var(--text-2); text-decoration: none; border-radius: var(--r-btn);
  transition: color .2s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="true"] { color: var(--text); }
.nav__cta { margin-left: var(--s3); }

.menu-btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 44px; min-width: 44px; padding: 0 var(--s3);
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r-btn);
  font-size: var(--fs-small); cursor: pointer;
}
.menu-btn__icon { width: 16px; height: 10px; position: relative; }
.menu-btn__icon::before, .menu-btn__icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.menu-btn__icon::before { top: 1px; }
.menu-btn__icon::after { top: 7px; }
.menu-btn[aria-expanded="true"] .menu-btn__icon::before { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__icon::after { top: 4px; transform: rotate(-45deg); }

/* mobile panel */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: var(--s3) var(--gutter) var(--s6);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a:not(.btn) {
  display: flex; align-items: center; justify-content: space-between; min-height: 56px;
  font-size: 1.25rem; letter-spacing: -0.015em; text-decoration: none; border-bottom: 1px solid var(--line);
}
.mobile-nav a:not(.btn)::after { content: "→"; color: var(--text-3); font-size: 1rem; }
.mobile-nav .btn { width: 100%; margin-top: var(--s5); }

@media (min-width: 900px) {
  .nav { display: block; }
  .menu-btn, .mobile-nav { display: none !important; }
}

/* ---------- 7. Plate: the one image frame used everywhere ---------- */
/* Every render and photo sits in a plate. The plate fixes the aspect ratio,
   fills the gap with near-black, crops with object-fit, and lays a soft vignette
   + hairline on top so black, red and green render backgrounds all fade to the
   same near-black edge. Per-image crop: --pos (object-position) and --zoom. */
.plate {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: var(--ratio, 4 / 3);
  background: var(--plate); border-radius: var(--r-plate);
}
.plate img, .plate > video {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transform: scale(var(--zoom, 1)); transform-origin: var(--origin, 50% 50%);
  filter: saturate(var(--sat, .9));
  transition: transform .6s var(--ease);
}
.plate::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(130% 110% at 50% 48%, transparent 52%, rgba(7, 7, 7, .62) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  border-radius: inherit;
}
/* photos (real-world shots) keep full colour and a lighter vignette */
.plate--photo img, .plate--photo > video { filter: none; }
.plate--photo::after { background: radial-gradient(140% 120% at 50% 50%, transparent 60%, rgba(7, 7, 7, .45) 100%); }

/* kind tag inside the plate: Render / Photo / Video */
.plate__tag {
  position: absolute; z-index: 2; left: var(--s3); top: var(--s3);
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.02em; line-height: 1;
  padding: 5px 7px; border-radius: 2px;
  background: rgba(7, 7, 7, .72); color: var(--text-2);
  border: 1px solid rgba(255, 255, 255, .08);
}

.fig { display: grid; gap: var(--s3); }
.fig__cap { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: baseline; }
.fig__cap .label:first-child { color: var(--text-2); }

/* ---------- 8. Hero ---------- */
.hero { padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 80px); }
.hero__grid { display: grid; gap: var(--s7); }
.hero__text { display: grid; gap: var(--s5); align-content: center; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s2); }
.hero__media .plate { --ratio: 5 / 4; }
@media (max-width: 479px) {
  .hero__actions .btn { flex: 1 1 100%; }
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 5fr 7fr; gap: var(--s8); align-items: center; }
}

/* ---------- 9. Proof strip ---------- */
.proof { padding-block: 0 var(--section); }
.proof__inner {
  border: 1px solid var(--line); border-radius: var(--r-plate);
  background: var(--bg-raised); padding: var(--s4);
}
.proof__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s5); align-items: baseline; margin-bottom: var(--s4); padding: var(--s1) var(--s1) 0; }
.proof__title { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.625rem); letter-spacing: -0.02em; font-weight: 500; line-height: 1.2; }
.proof__pair { display: grid; gap: var(--s3); align-items: center; }
.proof__arrow {
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--text-3);
  padding: var(--s1) 0;
}
.proof__arrow svg { width: 18px; height: 18px; transform: rotate(90deg); }
.proof__foot { display: grid; gap: var(--s3); margin-top: var(--s4); padding: 0 var(--s1) var(--s1); }
.proof__foot p { color: var(--text-2); }
@media (min-width: 720px) {
  .proof__inner { padding: var(--s5); }
  .proof__pair { grid-template-columns: 1fr 56px 1fr; gap: var(--s4); }
  .proof__arrow { flex-direction: column; }
  .proof__arrow svg { transform: none; }
  .proof__foot { grid-template-columns: 1fr auto; align-items: center; }
}

/* ---------- 10. Work grid + tiles ---------- */
.work-grid { display: grid; gap: var(--s7) var(--s5); }
@media (min-width: 600px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }

.tile {
  display: grid; gap: var(--s4); align-content: start;
  text-decoration: none; text-align: left; color: inherit;
  background: none; border: 0; padding: 0; cursor: pointer; width: 100%;
  border-radius: var(--r-plate);
}
.tile__meta { display: grid; gap: var(--s1); }
.tile__row { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; }
.tile__title { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.tile__line { color: var(--text-2); font-size: var(--fs-small); line-height: 1.5; max-width: 34rem; }
.tile__kind { white-space: nowrap; }
.tile__kind--case { color: var(--text); }
.tile:hover .plate img { transform: scale(calc(var(--zoom, 1) * 1.035)); }
.tile:hover .tile__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (prefers-reduced-motion: reduce) { .tile:hover .plate img { transform: scale(var(--zoom, 1)); } }

/* More work: small tiles (never larger than 1/4 of the row on desktop) */
.more { margin-top: var(--s8); display: grid; gap: var(--s5); }
.more__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s5) var(--s4); }
.more .tile { gap: var(--s3); }
.more .tile__title { font-size: 1rem; }
@media (min-width: 900px) { .more__grid { grid-template-columns: repeat(4, 1fr); gap: var(--s5); } }

/* ---------- 11. Services ---------- */
.services { display: grid; border-top: 1px solid var(--line); }
.service { display: grid; gap: var(--s2); padding: var(--s5) 0; border-bottom: 1px solid var(--line); align-content: start; }
.service__num { margin-bottom: var(--s1); }
.service p { color: var(--text-2); font-size: var(--fs-small); max-width: 32rem; }
.service .link { min-height: 44px; font-size: var(--fs-small); margin-top: var(--s1); color: var(--text-2); }
.service .link:hover { color: var(--text); }
@media (min-width: 720px) {
  .services { grid-template-columns: repeat(2, 1fr); border-left: 1px solid var(--line); }
  .service { padding: var(--s5); border-right: 1px solid var(--line); }
}
@media (min-width: 1100px) {
  .services { grid-template-columns: repeat(3, 1fr); }
  .service { padding: var(--s6) var(--s5); }
}

/* ---------- 12. Process ---------- */
.steps { display: grid; gap: 0; counter-reset: step; }
.step { position: relative; display: grid; gap: var(--s2); padding: 0 0 var(--s6) var(--s7); }
.step::before { /* vertical rail on mobile */
  content: ""; position: absolute; left: 11px; top: 28px; bottom: 0; width: 1px; background: var(--line-strong);
}
.step:last-child::before { display: none; }
.step__num {
  position: absolute; left: 0; top: 0; width: 23px; height: 23px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg);
  font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-2);
}
.step p { color: var(--text-2); font-size: var(--fs-small); max-width: 28rem; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: var(--s5); }
  .step { padding: var(--s8) 0 0 0; }
  .step::before { left: 30px; right: calc(-1 * var(--s5)); top: 11px; bottom: auto; width: auto; height: 1px; }
}

/* ---------- 13. About ---------- */
.about { display: grid; gap: var(--s7); }
.about__body { display: grid; gap: var(--s5); max-width: var(--measure); }
.about__body p { font-size: var(--fs-lead); line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.about__body p:first-of-type { color: var(--text); }
.about__facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.portrait-slot { --ratio: 4 / 5; max-width: 360px; }
.portrait-slot .slot-inner {
  height: 100%; display: grid; place-items: center; text-align: center; padding: var(--s5);
}
@media (min-width: 900px) {
  .about { grid-template-columns: 4fr 8fr; gap: var(--s8); align-items: start; }
  .about--no-portrait { grid-template-columns: 4fr 8fr; }
}

/* ---------- 14. FAQ ---------- */
.faq { border-top: 1px solid var(--line); max-width: 56rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s5);
  min-height: 64px; padding: var(--s4) 0; cursor: pointer; list-style: none;
  font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: #fff; }
.faq__icon { position: relative; flex: none; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--text-2);
  transform: translate(-50%, -50%); transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] .faq__icon { border-color: var(--text-2); }
.faq details[open] .faq__icon::after { transform: translate(-50%, -50%) rotate(0deg); opacity: 0; }
.faq__a { padding: 0 var(--s8) var(--s5) 0; color: var(--text-2); max-width: 44rem; }
@media (max-width: 599px) { .faq__a { padding-right: 0; } }
.faq-layout { display: grid; gap: var(--s7); }
@media (min-width: 900px) { .faq-layout { grid-template-columns: 4fr 8fr; gap: var(--s6); } }

/* ---------- 15. Contact ---------- */
.contact {
  display: grid; gap: var(--s7);
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-plate);
  padding: clamp(24px, 5vw, 64px);
}
.contact__main { display: grid; gap: var(--s5); align-content: start; }
.contact__buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); margin-top: var(--s3); }
.contact__buttons .btn { width: 100%; justify-content: space-between; }
.contact__buttons .btn--primary { grid-column: 1 / -1; }
.checklist { display: grid; gap: 0; border-top: 1px solid var(--line); }
.checklist li {
  display: flex; align-items: center; gap: var(--s3); min-height: 48px;
  border-bottom: 1px solid var(--line); color: var(--text-2); font-size: var(--fs-small);
}
.checklist li::before {
  content: ""; flex: none; width: 14px; height: 14px; border: 1px solid var(--line-strong); border-radius: 2px;
}
@media (min-width: 900px) {
  .contact { grid-template-columns: 7fr 5fr; gap: var(--s8); }
  .contact__buttons { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 16. Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s6) var(--s7); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3) var(--s5); align-items: center; }
.site-footer a { color: var(--text-3); }

/* ---------- 17. Lightbox ---------- */
.lightbox {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0;
  background: rgba(7, 7, 7, .97); color: var(--text);
}
.lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s3) var(--gutter); }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter); }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-plate); }
.lightbox__foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s3) var(--gutter) var(--s5); }
.lightbox__cap { color: var(--text-2); font-size: var(--fs-small); }
.lightbox__nav { display: flex; gap: var(--s2); }
.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none;
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r-btn); cursor: pointer;
}
.icon-btn:hover { border-color: var(--text-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; }
body.is-locked { overflow: hidden; }

/* ---------- 18. Case study ---------- */
.crumb { padding-top: var(--s5); }
.cs-head { padding-block: var(--s6) var(--s7); display: grid; gap: var(--s4); }
.cs-head .lead { font-size: var(--fs-lead); }
.cs-pair { display: grid; gap: var(--s5); }
@media (min-width: 720px) { .cs-pair { grid-template-columns: 1fr 1fr; gap: var(--s4); } }

.cs-body { display: grid; gap: var(--s7); padding-block: var(--section) 0; }
.cs-blocks { display: grid; gap: var(--s6); }
.cs-block { display: grid; gap: var(--s3); align-content: start; padding-top: var(--s4); border-top: 1px solid var(--line); }
.cs-block p { color: var(--text-2); }
@media (min-width: 900px) {
  .cs-body { grid-template-columns: 8fr 4fr; gap: var(--s8); align-items: start; }
  .cs-blocks { grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
  .cs-body--no-specs { grid-template-columns: 1fr; }
}

.specs { border: 1px solid var(--line); border-radius: var(--r-plate); background: var(--bg-raised); padding: var(--s5); }
.specs dl { display: grid; margin-top: var(--s3); }
.specs dl > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.specs dl > div:last-child { border-bottom: 0; }
.specs dt { color: var(--text-3); font-family: var(--font-mono); font-size: var(--fs-mono); padding-top: 2px; }
.specs dd { color: var(--text); }

.cs-finished { display: grid; gap: var(--s5); padding-top: var(--section); }
.cs-finished__grid { display: grid; gap: var(--s5); }
@media (min-width: 720px) { .cs-finished__grid { grid-template-columns: 7fr 5fr; gap: var(--s4); align-items: start; } }

.cs-next { display: grid; gap: var(--s5); }
.cs-next__grid { display: grid; gap: var(--s6) var(--s5); }
@media (min-width: 600px) { .cs-next__grid { grid-template-columns: repeat(2, 1fr); } }

.cta-band { display: grid; gap: var(--s5); justify-items: start; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1fr auto; align-items: end; } }

/* ---------- 19. [CONFIRM] placeholders ---------- */
/* .cf = an unconfirmed fact. Two kinds:
   data-confirm  → optional: hidden in clean mode (html.clean) and in production while empty.
   (data-required was used for contact details until 2026-11-23; they are filled now.) */
.cf:not(.btn):not(.label) {
  color: var(--confirm); background: var(--confirm-bg);
  outline: 1px dashed rgba(240, 180, 90, .55); outline-offset: 1px; border-radius: 2px;
  padding: 0 .25em; font-size: .92em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* on buttons and mono labels the element keeps its own style; only a dashed outline marks it */
.btn.cf, .label.cf { outline: 1px dashed rgba(240, 180, 90, .7); outline-offset: 3px; }
.label.cf { color: var(--confirm); }
.btn.cf { justify-content: flex-start; }
.btn.cf .arrow { margin-left: auto; }
.cf-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.625rem; line-height: 1; letter-spacing: .03em;
  color: var(--bg); background: var(--confirm); padding: 3px 4px; border-radius: 2px; vertical-align: 2px; margin-left: 4px;
}
.cf-block {
  border: 1px dashed rgba(240, 180, 90, .55); background: var(--confirm-bg); border-radius: var(--r-plate);
}
.cf-block .label { color: var(--confirm); }
html.clean [data-confirm] { display: none !important; }
html.clean .cf-tag { display: none; }


/* case study: body collapses to one column when the specs slot is gone */
html.clean .cs-body, .cs-body:not(:has(.specs)) { grid-template-columns: 1fr; }

/* case study: one detail figure + its note (B: mechanism, E: honeycomb back) */
.cs-detail { display: grid; gap: var(--s5); }
.cs-detail__note { display: grid; gap: var(--s3); align-content: end; }
.cs-detail__note p { color: var(--text-2); max-width: 26rem; }
@media (min-width: 900px) { .cs-detail { grid-template-columns: 7fr 5fr; gap: var(--s6); align-items: end; } }

/* video plate before the clip has loaded: a quiet note instead of a black hole */
.plate--video::before {
  content: "Video plays when in view"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--text-3); z-index: 0;
}
.plate--video > video { position: relative; z-index: 0; }
.plate--video > video:not([src]) { opacity: 0; }

/* contact: grid children may shrink; buttons stack on narrow phones */
.contact > * { min-width: 0; }
@media (max-width: 479px) {
  .contact__buttons { grid-template-columns: 1fr; }
}

/* ---------- 20. Revision 1 (2026-11-14) ---------- */
/* Image-only tiles: no visible names. The tag says what a tap opens. */
.work-grid { gap: var(--s5); }
.plate__tag--case { color: var(--bg); background: var(--text); border-color: var(--text); }
.tile .plate::after { transition: box-shadow .2s var(--ease); }
.tile:hover .plate::after { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }

/* More work: 2 / 3 / 5 small tiles, then a one-line note */
@media (min-width: 900px) { .more__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .more__grid { grid-template-columns: repeat(5, 1fr); gap: var(--s4); } }
.more__note { color: var(--text-2); font-size: var(--fs-small); max-width: 40rem; }

/* words that change with layout ("On the right" / "Below") */
.only-narrow { display: inline; }
.only-wide { display: none; }
@media (min-width: 720px) { .only-narrow { display: none; } .only-wide { display: inline; } }

/* Lightbox: project text above the image caption */
.lightbox__text { display: grid; gap: var(--s2); max-width: 46rem; }
.lightbox__desc { color: var(--text); font-size: var(--fs-small); line-height: 1.5; }
.lightbox__desc:empty { display: none; }


/* ---------- 21. Revision 2 (2026-11-23): minimal-luxury layer ---------- */
/* Metal tokens. Gold and silver appear ONLY as metallic type and the line ornament:
   never as button, background or border colours. Darkest stops keep ≥ 3:1 on --bg
   (all metallic text is ≥ 28 px, so WCAG large-text rules apply). */
:root {
  --gold: linear-gradient(100deg, #9a7634 0%, #d8b468 20%, #f6e3b0 36%, #c9a052 52%, #94702f 68%, #e2c27c 86%, #a7843f 100%);
  --silver: linear-gradient(100deg, #8a8a85 0%, #d9d9d4 22%, #ffffff 38%, #b4b4ae 54%, #80807b 70%, #e3e3de 88%, #9d9d98 100%);
  --sheen: linear-gradient(110deg, transparent 42%, rgba(255, 255, 255, .9) 50%, transparent 58%);
  --gold-line: #c9a052;
  --reveal-dur: .9s;
}

/* Metallic type: brushed gradient clipped to the letters, optional light sweep.
   Fallback (no background-clip:text) = plain --text colour. */
.metal { color: var(--text); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .metal {
    background-image: var(--sheen), var(--gold);
    background-size: 260% 100%, 100% 100%;
    background-position: 160% 0, 0 0;
    background-repeat: no-repeat;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
  }
  .metal--silver { background-image: var(--sheen), var(--silver); }
  @media (prefers-reduced-motion: no-preference) {
    .metal--sweep { animation: metal-sweep 9s var(--ease) 1.2s infinite; }
  }
}
/* one 2.4 s pass, then a 6.6 s rest */
@keyframes metal-sweep {
  0% { background-position: 160% 0, 0 0; }
  27%, 100% { background-position: -60% 0, 0 0; }
}
@media (forced-colors: active) { .metal { -webkit-text-fill-color: CanvasText; color: CanvasText; background: none; } }

/* Signature ornament: a four-point star taken from the star set, on a gold hairline.
   Drawn once when it scrolls into view (lines grow out of the star, star stroke draws). */
.ornament { display: flex; align-items: center; gap: var(--s4); height: 24px; color: var(--gold-line); }
.ornament__line { flex: 1; height: 1px; }
.ornament__line:first-child { background: linear-gradient(90deg, transparent, rgba(201, 160, 82, .75)); transform-origin: right center; }
.ornament__line:last-child { background: linear-gradient(270deg, transparent, rgba(201, 160, 82, .75)); transform-origin: left center; }
.ornament svg { width: 22px; height: 22px; flex: none; overflow: visible; }
.ornament path { fill: none; stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 0; }
.ornament circle { fill: currentColor; }
.section--ornament { border-top: 0; padding-top: 0; }
.section--ornament .ornament { margin-bottom: var(--section); }

/* Scroll reveal: one curve (--ease), fade + 14 px rise, staggered 70 ms (--i set by script.js).
   Gated on html.js (inline head script) AND no-preference, so no-JS and reduced-motion
   visitors always see the finished page. Images also settle from 1.06 scale. */
@media (prefers-reduced-motion: no-preference) {
  html.js :is(.section-head, .work-grid > .tile, .more__grid > .tile, .more__note,
              .services > .service, .steps > .step, .about > *, .faq details, .contact, .proof__pair > *, .proof__foot,
              .interlude__grid > *, .cs-head > *, .cs-pair > .fig, .cs-trio > .fig, .cs-block, .specs, .cs-finished__grid > .fig,
              .cs-next__grid > .tile, .cta-band):not(.is-in) {
    opacity: 0; transform: translateY(14px);
  }
  html.js :is(.section-head, .work-grid > .tile, .more__grid > .tile, .more__note,
              .services > .service, .steps > .step, .about > *, .faq details, .contact, .proof__pair > *, .proof__foot,
              .interlude__grid > *, .cs-head > *, .cs-pair > .fig, .cs-trio > .fig, .cs-block, .specs, .cs-finished__grid > .fig,
              .cs-next__grid > .tile, .cta-band) {
    transition: opacity var(--reveal-dur) var(--ease) calc(var(--i, 0) * 70ms + var(--d, 0ms)),
                transform var(--reveal-dur) var(--ease) calc(var(--i, 0) * 70ms + var(--d, 0ms));
  }
  html.js :not(.is-in) > .plate img, html.js .fig:not(.is-in) .plate img, html.js .tile:not(.is-in) .plate img { transform: scale(calc(var(--zoom, 1) * 1.06)); }
  html.js .is-in .plate img, html.js .is-in.plate img { transition: transform 1.4s var(--ease) calc(var(--i, 0) * 70ms + var(--d, 0ms)); }

  html.js .ornament:not(.is-in) .ornament__line { transform: scaleX(0); }
  html.js .ornament:not(.is-in) path { stroke-dashoffset: 100; }
  html.js .ornament:not(.is-in) circle { opacity: 0; }
  html.js .ornament .ornament__line { transition: transform 1.4s var(--ease) .35s; }
  html.js .ornament path { transition: stroke-dashoffset 1.6s var(--ease); }
  html.js .ornament circle { transition: opacity .6s var(--ease) 1.2s; }
}
html.shot * { transition: none !important; animation: none !important; }

/* Tile hover: a soft light passes across the render once, plus the existing 3.5 % zoom */
.tile .plate::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 238, 205, .13) 50%, transparent 65%);
  transform: translateX(-120%);
}
@media (prefers-reduced-motion: no-preference) {
  .tile:hover .plate::before { transform: translateX(120%); transition: transform 1s var(--ease); }
}

/* Interlude: the openwork set as the one large "luxury moment" (image + metallic line) */
.interlude { padding-block: 0 var(--section); }
.interlude__grid { display: grid; gap: var(--s7); align-items: center; }
.interlude__text { display: grid; gap: var(--s5); justify-items: start; }
.display-2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem); line-height: 1.06; letter-spacing: -0.03em; font-weight: 500; text-wrap: balance; }
@media (min-width: 900px) { .interlude__grid { grid-template-columns: 7fr 5fr; gap: var(--s8); } }

/* Portrait: CSS-only crop of 00-portrait (960×1280). Window = x 500–960, y 400–1167 of the
   original (3:5): face, brick wall, hands and ring; the wall calligraphy is outside it.
   Numbers: width 960/460 = 208.7 %, left −500/460 = −108.7 %, top −400/767 = −52.2 %. */
.plate--portrait { --ratio: 3 / 5; max-width: 360px; margin-top: var(--s6); }
/* extra corner shade over the top-left of the window, where a patterned wall tile sits */
.plate--portrait::after {
  background:
    radial-gradient(55% 38% at 0% 0%, rgba(7, 7, 7, .92) 0%, rgba(7, 7, 7, .6) 45%, transparent 100%),
    radial-gradient(140% 120% at 50% 50%, transparent 60%, rgba(7, 7, 7, .45) 100%);
}
.plate--portrait img {
  position: absolute; max-width: none; width: 208.7%; height: auto;
  left: -108.7%; top: -52.2%; object-fit: fill; transform: none !important;
}

/* Case study D: three equal figures (necklace, earrings front, earring parts) */
.cs-trio { display: grid; gap: var(--s5); }
@media (min-width: 720px) { .cs-trio { grid-template-columns: repeat(3, 1fr); gap: var(--s4); } }

/* Contact (2026-11-23): Email + WhatsApp only. Two equal buttons side by side from 480 px,
   the email address as copyable text under them. No phone number is ever printed. */
.contact__buttons .btn--primary { grid-column: auto; }
@media (min-width: 900px) { .contact__buttons { grid-template-columns: repeat(2, 1fr); max-width: 32rem; } }
.contact__address { color: var(--text-2); font-size: var(--fs-small); }
.contact__address a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
.cta-band__buttons { display: flex; flex-wrap: wrap; gap: var(--s3); }
@media (max-width: 479px) { .cta-band__buttons { width: 100%; } .cta-band__buttons .btn { flex: 1 1 100%; } }
.footer-contact { display: flex; flex-wrap: wrap; gap: 0 var(--s4); }
.footer-contact a { color: var(--text-2); }
