/* Maison Ziad El Achi — design system
   Inspired by Suitsupply's chrome: white ground, near-black ink,
   grotesque sans, image-first, generous whitespace. */

:root {
  --ink: #121213;
  --ink-soft: #4a4a4c;
  --ink-faint: #8b8b8e;
  --paper: #ffffff;
  --paper-warm: #f6f5f2;
  --paper-deep: #eceae5;
  --line: #e2e0db;
  --navy: #22314e;
  --navy-deep: #161f33;
  --gold: #a4854e;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --shadow-soft: 0 18px 50px rgba(18, 18, 19, 0.10);
  --shadow-lift: 0 8px 26px rgba(18, 18, 19, 0.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.55;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(16px, 3vw, 40px);
  height: 66px;
}
.wordmark {
  font-size: 17px; font-weight: 700; letter-spacing: 0.42em;
  text-transform: uppercase; white-space: nowrap;
}
.wordmark small {
  display: block; font-size: 8.5px; font-weight: 400; letter-spacing: 0.55em;
  color: var(--ink-faint); margin-top: 1px;
}
.main-nav { display: flex; gap: clamp(14px, 2.4vw, 34px); }
.main-nav a {
  font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); padding: 6px 0; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); border-color: var(--ink); }
.nav-cta {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  padding: 11px 22px; transition: background .2s, color .2s;
}
.nav-cta:hover { background: transparent; color: var(--ink); }

/* atelier load monitor — tiny live readout of the photography queue */
.atelier-load {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto; margin-right: 16px;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-faint); white-space: nowrap; cursor: default;
}
.atelier-load .al-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--line); flex: none;
}
.atelier-load.busy { color: var(--gold); }
.atelier-load.busy .al-dot {
  background: var(--gold);
  animation: al-pulse 1.6s ease-in-out infinite;
}
@keyframes al-pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.25 } }
@media (max-width: 720px) { .atelier-load { display: none } }

/* topline announcement */
.topline {
  background: var(--ink); color: #d9d7d2; text-align: center;
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 8px 16px;
}
.topline b { color: #fff; font-weight: 600; }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 500px at 82% -10%, #35486e 0%, transparent 55%),
    linear-gradient(160deg, #1a2438 0%, var(--navy-deep) 55%, #10141f 100%);
  color: #fff;
}
.hero .grain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 4vw, 60px); align-items: center;
  min-height: 640px; padding: 60px 0 0;
}
.hero-copy .eyebrow {
  font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase;
  color: #9fb0cf; margin-bottom: 22px;
}
.hero-copy h1 {
  font-size: clamp(40px, 5.6vw, 72px); line-height: 1.04; font-weight: 650;
  letter-spacing: -0.015em; margin-bottom: 24px;
}
.hero-copy h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.hero-copy .sub {
  font-size: clamp(16px, 1.4vw, 19px); color: #c2c9d8; max-width: 46ch;
  margin-bottom: 38px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 16px 30px; border: 1px solid transparent; transition: all .2s;
}
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: transparent; border-color: #fff; color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: transparent; color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-dark:disabled:hover { background: var(--ink); color: #fff; }

.hero-figure { position: relative; align-self: center; display: flex; justify-content: center; padding: 40px 0; }
.hero-figure .hero-photo {
  width: clamp(250px, 26vw, 370px); border-radius: 2px;
  box-shadow: 0 40px 90px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
}
.hero-figure .plinth {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 130%; height: 46px; background: radial-gradient(ellipse at center, rgba(0,0,0,.55), transparent 70%);
}
.hero-stats {
  position: relative; display: flex; gap: clamp(20px, 4vw, 64px);
  padding: 26px 0 30px; margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.hero-stats div b { display: block; font-size: 22px; letter-spacing: .02em; }
.hero-stats div span { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #93a0ba; }

/* --------------------------------------------------------------- sections */

.section { padding: clamp(64px, 8vw, 110px) 0; }
.section.tinted { background: var(--paper-warm); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .eyebrow {
  font-size: 11.5px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px; font-weight: 600;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 44px); font-weight: 650; letter-spacing: -0.01em;
  line-height: 1.12;
}
.section-head p { color: var(--ink-soft); margin-top: 16px; font-size: 17px; }

/* pillars (value band) */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillar { background: var(--paper); padding: 38px 34px 42px; transition: background .25s; }
.pillar:hover { background: var(--paper-warm); }
.pillar .num { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--gold); }
.pillar h3 { font-size: 19px; margin: 14px 0 10px; letter-spacing: .01em; }
.pillar p { color: var(--ink-soft); font-size: 15px; }

/* collection cards */
.suit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.suit-card { background: var(--paper); border: 1px solid var(--line); transition: box-shadow .25s, transform .25s; position: relative; }
.suit-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.suit-card .stage {
  background: linear-gradient(180deg, var(--paper-warm) 0%, var(--paper-deep) 100%);
  display: flex; justify-content: center; overflow: hidden; aspect-ratio: 5 / 6;
}
.suit-card .stage img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.suit-card .meta { padding: 20px 22px 24px; border-top: 1px solid var(--line); }
.suit-card .fitname { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); }
.suit-card h3 { font-size: 17px; font-weight: 600; margin: 6px 0 2px; }
.suit-card .fabric { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 14px; }
.suit-card .rowline { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.suit-card .price { font-size: 16px; font-weight: 600; }
.suit-card .customise {
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid var(--ink); background: none; padding: 9px 16px;
  transition: all .2s;
}
.suit-card .customise:hover { background: var(--ink); color: #fff; }

/* story split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.split .visual {
  background: linear-gradient(150deg, #2b2b2e 0%, #161618 70%);
  min-height: 480px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.split .visual .monogram {
  font-family: var(--serif); font-size: clamp(120px, 14vw, 200px); font-style: italic;
  color: rgba(255,255,255,.08); user-select: none;
}
.split .visual .caption {
  position: absolute; bottom: 26px; left: 30px; right: 30px; color: #cfcdc8;
  font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase;
}
.split .copy h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 650; margin-bottom: 20px; letter-spacing: -0.01em; }
.split .copy p { color: var(--ink-soft); margin-bottom: 16px; font-size: 16.5px; }
.split .copy .sig { font-family: var(--serif); font-style: italic; font-size: 22px; margin-top: 26px; }
.milestones { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.milestones div b { display: block; font-size: 20px; }
.milestones div span { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }

/* quote band */
.quote-band { background: var(--navy-deep); color: #fff; text-align: center; padding: clamp(70px, 9vw, 120px) 0; position: relative; overflow: hidden; }
.quote-band blockquote { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3.2vw, 40px); line-height: 1.3; max-width: 22ch; margin: 0 auto 18px; }
.quote-band cite { font-style: normal; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: #93a0ba; }

/* footer */
.site-footer { background: var(--paper-warm); border-top: 1px solid var(--line); padding: 60px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 44px; }
.footer-grid h4 { font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; }
.footer-grid a, .footer-grid p { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 9px; }
.footer-grid a:hover { color: var(--ink); }
.footer-base { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 26px; font-size: 12.5px; color: var(--ink-faint); flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- atelier */

.atelier-body { background: var(--paper-warm); min-height: 100vh; }
.steps-rail {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  padding: 26px 0 8px; flex-wrap: wrap;
}
.step-chip {
  display: flex; align-items: center; gap: 9px;
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); padding: 8px 14px; border: 1px solid transparent;
  background: none; transition: color .2s;
}
.step-chip .dot {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; background: #fff; color: var(--ink-faint); letter-spacing: 0;
}
.step-chip.active { color: var(--ink); }
.step-chip.active .dot { background: var(--ink); color: #fff; border-color: var(--ink); }
.step-chip.done .dot { background: var(--gold); border-color: var(--gold); color: #fff; }
.step-sep { width: 26px; height: 1px; background: var(--line); }

.stage-panel {
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-soft);
  max-width: 1180px; margin: 18px auto 70px;
}
.stage-inner { padding: clamp(28px, 4vw, 54px); }
.stage-title { text-align: center; margin-bottom: 34px; }
.stage-title .eyebrow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.stage-title h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 650; margin-top: 10px; letter-spacing: -0.01em; }
.stage-title p { color: var(--ink-soft); margin-top: 10px; max-width: 56ch; margin-inline: auto; }

.stage-nav { display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(28px, 4vw, 54px); border-top: 1px solid var(--line); background: var(--paper-warm); }
.stage-nav .hint { font-size: 13px; color: var(--ink-faint); }

/* chat */
.chat-shell { max-width: 720px; margin: 0 auto; }
.chat-window {
  height: 380px; overflow-y: auto; padding: 10px 6px;
  display: flex; flex-direction: column; gap: 14px;
  scroll-behavior: smooth;
}
.msg { max-width: 78%; padding: 14px 18px; font-size: 15px; line-height: 1.5; }
.msg.tailor { background: var(--paper-warm); border: 1px solid var(--line); align-self: flex-start; }
.msg.tailor .who, .msg.client .who { display: block; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 6px; color: var(--gold); font-weight: 600; }
.msg.client { background: var(--ink); color: #fff; align-self: flex-end; }
.msg.client .who { color: #b9a284; }
.msg.thinking { color: var(--ink-faint); font-style: italic; background: none; border: none; padding: 4px 18px; }
.msg.thinking .dots::after { content: ''; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.chat-input { display: flex; gap: 10px; margin-top: 18px; }
.chat-input input {
  flex: 1; border: 1px solid var(--line); padding: 15px 18px; font-size: 15px;
  font-family: inherit; background: #fff; outline: none;
}
.chat-input input:focus { border-color: var(--ink); }
.chat-suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip-btn {
  font-size: 12.5px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: 8px 14px; border-radius: 999px; transition: all .2s;
}
.chip-btn:hover { border-color: var(--ink); color: var(--ink); }
.ai-badge { text-align: center; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); margin-top: 14px; }
.ai-badge b { color: var(--gold); }

/* measurements */
.measure-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 28px; max-width: 720px; margin: 0 auto; }
.field label { display: block; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 9px; font-weight: 600; }
.field input[type="number"], .field select {
  width: 100%; border: 1px solid var(--line); background: #fff; padding: 14px 16px;
  font-size: 16px; font-family: inherit; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--ink); }
.field .unit { font-size: 12px; color: var(--ink-faint); margin-left: 8px; letter-spacing: .05em; text-transform: none; }
.seg { display: flex; border: 1px solid var(--line); background: #fff; }
.seg button { flex: 1; padding: 13px 6px; background: none; border: none; font-size: 13.5px; color: var(--ink-soft); border-right: 1px solid var(--line); transition: all .15s; }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--ink); color: #fff; }

/* camera scan — the tape measure that never leaves the device */
.measure-mode { max-width: 420px; margin: 0 auto 30px; }
.scan-fields { margin-bottom: 26px; }
.scan-shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 28px; max-width: 720px; margin: 0 auto; }
.scan-shot h4 { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 9px; font-weight: 600; }
.shot-stage {
  position: relative; border: 1px solid var(--line); background: var(--paper-warm);
  aspect-ratio: 3 / 4; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.shot-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--paper-deep); touch-action: none; }
.shot-empty { text-align: center; color: var(--ink-faint); padding: 18px; }
.shot-empty .pose-glyph { font-size: 44px; color: var(--gold); margin-bottom: 10px; }
.shot-empty p { font-size: 13px; line-height: 1.5; }
.shot-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  background: var(--paper-deep); transform: scaleX(-1); /* a mirror, as one expects of a fitting room */
}
.shot-count {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 110px; color: #fff; pointer-events: none;
  background: rgba(18, 18, 19, 0.28); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.shot-count[hidden] { display: none; } /* author display beats the hidden attribute otherwise */
.shot-actions { display: flex; gap: 10px; margin-top: 12px; }
.shot-actions .btn { flex: 1; min-width: 0; }
.shot-btn { width: 100%; margin-top: 12px; }
.shot-actions .shot-btn { margin-top: 0; }
.scan-tips { max-width: 720px; margin: 18px auto 0; text-align: center; }
.scan-card { max-width: 720px; margin: 30px auto 0; border: 1px solid var(--line); background: var(--paper-warm); padding: 26px 30px; animation: rise .5s ease; }
.scan-drag-hint { font-size: 14px; color: var(--ink-soft); font-family: var(--serif); font-style: italic; text-align: center; margin-bottom: 18px; }
.scan-review { display: grid; grid-template-columns: 3fr 2fr; gap: 18px; margin-bottom: 20px; align-items: start; }
.scan-review h4 { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; font-weight: 600; }
.scan-review canvas { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: var(--paper-deep); touch-action: none; }
.scan-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.scan-cells div { background: #fff; padding: 14px 10px; text-align: center; }
.scan-cells b { display: block; font-size: 18px; }
.scan-cells b i { font-style: normal; font-size: 11px; color: var(--ink-faint); margin-left: 4px; }
.scan-cells span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.tip-text.warn { color: #a04b2f; }

.fit-result { max-width: 720px; margin: 34px auto 0; border: 1px solid var(--line); background: var(--paper-warm); padding: 30px 34px; display: none; }
.fit-result.show { display: block; animation: rise .5s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fit-result .size-line { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.fit-result .size-big { font-size: 54px; font-weight: 700; letter-spacing: -.02em; }
.fit-result .size-cap { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); }
.fit-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 22px 0; }
.fit-cells div { background: #fff; padding: 14px 12px; text-align: center; }
.fit-cells b { display: block; font-size: 18px; }
.fit-cells span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.fit-notes { font-size: 14.5px; color: var(--ink-soft); }
.fit-notes li { margin: 7px 0 7px 18px; }
.fit-review { margin-top: 16px; font-family: var(--serif); font-style: italic; color: var(--ink); font-size: 15px; }

/* configurator */
.config-grid { display: grid; grid-template-columns: 1fr 380px; gap: clamp(24px, 3.5vw, 54px); align-items: start; }
.config-stage {
  background: linear-gradient(180deg, var(--paper-warm) 0%, var(--paper-deep) 100%);
  border: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: center;
  min-height: 560px; position: sticky; top: 90px; overflow: hidden;
}
.config-stage .suit-svg { width: 74%; max-width: 380px; margin-bottom: -6%; transition: opacity .15s; }
.opt-group { margin-bottom: 26px; }
.opt-group > h4 { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent;
  outline: 1px solid var(--line); outline-offset: 3px; transition: outline-color .15s, transform .15s;
  padding: 0; position: relative;
}
.swatch.on { outline-color: var(--ink); transform: scale(1.06); }
.swatch .tip {
  position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 10.5px; padding: 3px 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5;
}
.swatch:hover .tip { opacity: 1; }
.opt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-pill {
  border: 1px solid var(--line); background: #fff; padding: 10px 16px; font-size: 13.5px;
  color: var(--ink-soft); transition: all .15s;
}
.opt-pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.price-line { border-top: 1px solid var(--line); padding-top: 18px; display: flex; justify-content: space-between; align-items: baseline; }
.price-line .amount { font-size: 30px; font-weight: 700; }
.price-line .note { font-size: 12px; color: var(--ink-faint); }

/* ---------------------------------------------------- configurator v2 */

.stage-panel.wide { max-width: 1320px; }
.cfg-layout { display: grid; grid-template-columns: minmax(360px, 560px) 1fr; gap: clamp(22px, 3vw, 44px); align-items: start; }
.cfg-preview { position: sticky; top: 84px; container-type: inline-size; }
.cfg-view { display: flex; border: 1px solid var(--line); border-bottom: none; }
.cfg-view button {
  flex: 1; padding: 11px 8px; border: none; background: #fff; font-size: 11.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); transition: all .15s;
}
.cfg-view button.on { background: var(--ink); color: #fff; }
.cfg-stage {
  background: linear-gradient(180deg, var(--paper-warm) 0%, var(--paper-deep) 100%);
  border: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: center;
  min-height: 520px; overflow: hidden; position: relative;
  /* the photographs are 1024×1536 portrait — grow the stage toward their
   * shape (height = 1.5 × the preview column's width) so the suit fills it,
   * capped so the sticky preview still fits on screen. Width always stays
   * the full column so the tabs above and the bar below line up. */
  height: min(150cqw, calc(100vh - 210px));
}

/* the atelier is photographing — full-stage veil over the preview */
.shoot-overlay {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; text-align: center;
  padding: 32px; background: rgba(24, 21, 17, .48); backdrop-filter: blur(2.5px);
  animation: shoot-fade-in .35s ease;
}
.shoot-overlay .ring {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .22); border-top-color: var(--gold);
  animation: shoot-spin 1.1s linear infinite;
}
.shoot-overlay b {
  color: #fff; font-size: 15.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.shoot-overlay span {
  color: rgba(255, 255, 255, .78); font-size: 12.5px; font-style: italic;
  max-width: 30ch; line-height: 1.55;
}
.shoot-overlay .bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .16);
}
.shoot-overlay .bar i {
  display: block; height: 100%; background: var(--gold);
  animation: shoot-fill 70s cubic-bezier(.25, .55, .45, .9) forwards;
}
@keyframes shoot-spin { to { transform: rotate(360deg); } }
@keyframes shoot-fade-in { from { opacity: 0; } }
@keyframes shoot-fill { 0% { width: 2%; } 60% { width: 78%; } 100% { width: 96%; } }
.cfg-photo.reveal { animation: photo-reveal .55s ease; }
/* layered compositing: base + option layers share one canvas, so identically
 * sized absolutely-positioned imgs with object-fit:contain stay registered.
 * #cfg-suit must stretch to the stage, or percentage sizes inside collapse. */
#cfg-suit {
  flex: 1; align-self: stretch; min-width: 0;
  display: flex; align-items: flex-end; justify-content: center;
  /* detail zoom: dolly toward the region an option changes, then ease back */
  transition: transform 1.05s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}
#cfg-suit.detail-zoom {
  transform: scale(var(--zoom-scale, 1.75)) translate(var(--zoom-dx, 0%), var(--zoom-dy, 0%));
  animation: zoom-soften .5s ease;
}
@keyframes zoom-soften { from { opacity: .7; } to { opacity: 1; } }
.layer-stack { position: relative; width: 100%; height: 100%; }
.layer-stack .cfg-photo { position: absolute; inset: 0; }
@keyframes photo-reveal { from { opacity: 0; transform: scale(1.015); } }
.cfg-photo { width: 100%; height: 100%; object-fit: contain; align-self: center; }
.photo-pending {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  align-self: center; text-align: center; padding: 40px; color: var(--ink-soft);
}
.photo-pending svg { border: 1px solid var(--line); }
.photo-pending b { font-size: 16px; }
.photo-pending span { font-size: 13px; color: var(--ink-faint); font-style: italic; max-width: 30ch; }
.cfg-photo-note {
  border: 1px solid var(--line); border-top: none; background: var(--paper-warm);
  font-size: 12px; color: var(--ink-soft); padding: 10px 14px; font-style: italic;
}
.fab-tile { position: relative; }
.fab-tile .photobadge {
  position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 12px;
  background: rgba(255,255,255,0.9); border-radius: 4px; padding: 1px 4px; z-index: 2;
  border: 1px solid var(--line);
}
.cfg-stage .suit-svg { width: 78%; max-width: 400px; margin-bottom: -6%; }
.cfg-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-top: none; background: #fff; padding: 16px 20px;
}
.cfg-total { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.cfg-delivery { font-size: 12px; color: var(--ink-faint); }
.cfg-bar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.cfg-bar-actions .btn { white-space: nowrap; }
.cfg-reset {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: 11px 16px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  transition: all .15s; cursor: pointer; white-space: nowrap;
}
.cfg-reset:hover { border-color: var(--ink); color: var(--ink); }

.cfg-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }
.cfg-tab {
  border: none; background: none; padding: 12px 16px; font-size: 12.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s;
}
.cfg-tab.on { color: var(--ink); border-color: var(--ink); }
.cfg-tab:hover { color: var(--ink); }

.cfg-section-head { margin-bottom: 18px; }
.cfg-section-head h3 { font-size: 21px; font-weight: 650; }
.cfg-section-head p { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }

.cfg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.cfg-card {
  text-align: left; border: 1px solid var(--line); background: #fff; padding: 14px 16px;
  transition: all .15s; position: relative;
}
.cfg-card b { display: block; font-size: 14px; margin-bottom: 4px; }
.cfg-card span { font-size: 12.5px; color: var(--ink-soft); display: block; }
.cfg-card .ptag { color: var(--gold); font-size: 12px; margin-top: 6px; font-weight: 600; }
.cfg-card.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cfg-card:hover { border-color: var(--ink-soft); }

.opt-pill i { font-style: normal; color: var(--gold); font-size: 11.5px; }
.opt-pill.on i { color: #cbb98a; }

/* live atelier photography */
.cfg-shoot {
  width: 100%; margin-top: 10px; padding: 12px 16px; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; border: 1px solid var(--ink); background: #fff; color: var(--ink);
  transition: all .15s; cursor: pointer;
}
.cfg-shoot:hover { background: var(--ink); color: #fff; }
.cfg-shoot:disabled { opacity: .5; cursor: default; }
.cfg-shoot .cam { color: var(--gold); }
.cfg-photo-note.working { color: var(--gold); }
.cfg-photo-note.working::after {
  content: '…'; display: inline-block; animation: cfg-dots 1.2s steps(4) infinite;
  overflow: hidden; vertical-align: bottom; width: 1.2em;
}
@keyframes cfg-dots { 0% { width: 0; } 100% { width: 1.2em; } }

/* photographed option detail thumbnails */
.opt-thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #eceae5; }
.opt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.opt-pill.has-thumb {
  display: flex; flex-direction: column; gap: 9px; width: 122px;
  padding: 5px 5px 11px; text-align: center;
}
.opt-pill.has-thumb .opt-label { font-size: 12.3px; line-height: 1.35; padding: 0 4px; }
.opt-pill.has-thumb.on { background: #fff; color: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt-pill.has-thumb.on i { color: var(--gold); }
.opt-pill.has-thumb:hover .opt-thumb img { transform: scale(1.045); }
.cfg-card.has-thumb { padding: 0 0 14px; }
.cfg-card.has-thumb .opt-thumb { margin-bottom: 12px; }
.cfg-card.has-thumb b, .cfg-card.has-thumb span, .cfg-card.has-thumb .ptag { padding: 0 16px; }
.cfg-card .ptag { display: block; }

.cfg-adv-toggle {
  width: 100%; text-align: left; border: 1px solid var(--line); background: var(--paper-warm);
  padding: 14px 18px; font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); display: flex; justify-content: space-between; margin: 8px 0 14px;
}
.cfg-adv-toggle.open { border-color: var(--ink); color: var(--ink); }
.cfg-adv { padding-left: 2px; }

.cfg-mono input {
  width: 100%; border: 1px solid var(--line); padding: 13px 16px; font-size: 15px;
  font-family: var(--serif); font-style: italic; outline: none; background: #fff;
}
.cfg-mono input:focus { border-color: var(--ink); }
.cfg-mono .hint { font-size: 12px; color: var(--ink-faint); display: block; margin-top: 7px; }

/* fabric browser */
.fab-groups { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.fab-group {
  border: 1px solid var(--line); background: #fff; padding: 9px 14px; font-size: 12.5px;
  color: var(--ink-soft); transition: all .15s; border-radius: 999px;
}
.fab-group i { font-style: normal; color: var(--ink-faint); font-size: 11px; margin-left: 5px; }
.fab-group.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fab-group.on i { color: #b9a284; }

.fab-detail {
  display: flex; gap: 20px; border: 1px solid var(--line); background: var(--paper-warm);
  padding: 18px 20px; margin-bottom: 18px; align-items: flex-start;
}
.fab-detail-swatch svg { border: 1px solid var(--line); display: block; }
.fab-name { font-size: 17px; font-weight: 650; }
.fab-mill { font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 3px 0 6px; }
.fab-specs { font-size: 13px; color: var(--ink-soft); }
.fab-desc { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--ink-soft); margin: 8px 0; max-width: 58ch; }
.fab-price { font-size: 17px; font-weight: 700; }
.fab-price span { font-size: 12px; font-weight: 400; color: var(--ink-faint); }

.fab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.fab-tile {
  border: 1px solid var(--line); background: #fff; padding: 10px 10px 12px; text-align: left;
  transition: all .15s;
}
.fab-tile svg { width: 100%; height: auto; border: 1px solid var(--line); display: block; margin-bottom: 8px; }
.fab-tile b { display: block; font-size: 12px; line-height: 1.3; min-height: 31px; }
.fab-tile span { display: block; font-size: 10.5px; color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 3px; }
.fab-tile em { display: block; font-style: normal; font-size: 12px; font-weight: 600; margin-top: 4px; }
.fab-tile.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.fab-tile:hover { border-color: var(--ink-soft); transform: translateY(-1px); }

@media (max-width: 960px) {
  .cfg-layout { grid-template-columns: 1fr; }
  .cfg-preview { position: static; }
  .cfg-stage { min-height: 400px; }
}

/* try-on */
.tryon-grid { display: grid; grid-template-columns: 1fr 340px; gap: clamp(24px, 3.5vw, 50px); align-items: start; }
/* the studio's own backdrop is warm off-white — the stage carries it through
 * rather than framing the portrait in black bars */
.tryon-stage {
  background: linear-gradient(180deg, var(--paper-warm), var(--paper-deep));
  border: 1px solid var(--line); position: relative;
  min-height: 600px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tryon-stage #tryon-result { max-width: 100%; max-height: 720px; display: block; animation: photo-reveal .6s ease; }
/* these rules set display, so they must yield to [hidden] themselves */
.tryon-stage [hidden] { display: none !important; }
.tryon-stage .placeholder { color: var(--ink-faint); text-align: center; padding: 40px; }
.tryon-stage .placeholder .big { font-size: 46px; margin-bottom: 14px; color: var(--gold); }
.drop-hint { border: 1px dashed var(--line); padding: 40px 50px; }
.tryon-controls .opt-group h4 { margin-bottom: 10px; }
/* the fitter's verdict — what a tailor would say looking at this render */
.tryon-verdict {
  margin-top: 14px; padding: 15px 20px; border: 1px solid var(--line); border-left: 3px solid var(--gold);
  background: #fff; font-family: var(--serif); font-size: 15.5px; line-height: 1.6; color: var(--ink-soft);
}
.tryon-verdict b { display: block; font-style: normal; font-weight: 600; color: var(--ink); }
.tryon-verdict span { display: block; margin-top: 6px; font-style: italic; }
/* a fitting that does not work is not dressed up in gold */
.tryon-verdict.level-straining, .tryon-verdict.level-swimming { border-left-color: #a2412f; }
.tryon-verdict.level-snug { border-left-color: #b98a3c; }
.tryon-verdict[hidden] { display: none; }

/* the studio is rendering — the same veil the atelier uses over the preview,
 * with a longer fill: a Nano Banana portrait takes rather more than a shot */
.tryon-veil {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; text-align: center;
  padding: 32px; background: rgba(20, 18, 16, .62); backdrop-filter: blur(3px);
  animation: shoot-fade-in .35s ease;
}
.tryon-veil .ring {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .22); border-top-color: var(--gold);
  animation: shoot-spin 1.1s linear infinite;
}
.tryon-veil b { color: #fff; font-size: 15.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.tryon-veil span {
  color: rgba(255, 255, 255, .78); font-size: 12.5px; font-style: italic;
  max-width: 32ch; line-height: 1.55; transition: opacity .3s ease;
}
.tryon-veil .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .16); }
.tryon-veil .bar i { display: block; height: 100%; background: var(--gold); animation: shoot-fill 45s cubic-bezier(.25, .55, .45, .9) forwards; }

/* what the studio will actually be given: the portrait and the composed suit */
.tryon-source { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tryon-thumb {
  aspect-ratio: 2 / 3; border: 1px solid var(--line); background: var(--paper-warm);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tryon-thumb span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); text-align: center; padding: 0 8px; }
.tryon-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tryon-thumb.has { background: #fff; }
#tryon-status.warn { color: #a2412f; }
.upload-btn { display: block; text-align: center; width: 100%; margin-bottom: 18px; }
.slider-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.slider-row label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); width: 74px; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--ink); }
.mode-toggle { display: flex; border: 1px solid var(--line); margin-bottom: 20px; }
.mode-toggle button { flex: 1; padding: 12px 8px; border: none; background: #fff; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.mode-toggle button.on { background: var(--ink); color: #fff; }
.tip-text { font-size: 13px; color: var(--ink-faint); margin-top: 10px; }

/* the turntable — twelve photographs, one spin */
.turn-block { margin-top: 26px; }
.turn-title { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; font-weight: 600; text-align: center; }
.turn-stage { position: relative; border: 1px solid var(--line); background: #f4f2ee; overflow: hidden; }
.turn-stage canvas { display: block; width: 100%; height: auto; cursor: grab; touch-action: pan-y; }
.turn-stage canvas:active { cursor: grabbing; }
.turn-veil {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; background: rgba(246, 245, 242, 0.88); text-align: center; padding: 20px;
}
.turn-veil b { font-family: var(--serif); font-size: 18px; }
.turn-veil span { font-size: 13px; color: var(--ink-soft); }
.turn-veil .ring {
  width: 34px; height: 34px; border: 2px solid var(--line); border-top-color: var(--gold);
  border-radius: 50%; animation: turnspin 0.9s linear infinite;
}
@keyframes turnspin { to { transform: rotate(360deg); } }
.turn-angles { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.turn-angles button {
  border: 1px solid var(--line); background: #fff; padding: 7px 16px; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); transition: all .15s; cursor: pointer;
}
.turn-angles button.on, .turn-angles button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* summary */
.order-grid { display: grid; grid-template-columns: 340px 1fr; gap: clamp(24px, 3.5vw, 54px); align-items: start; max-width: 980px; margin: 0 auto; }
.order-figure { background: linear-gradient(180deg, var(--paper-warm), var(--paper-deep)); border: 1px solid var(--line); display: flex; justify-content: center; overflow: hidden; }
.order-figure img { width: 100%; height: auto; display: block; }
.order-lines { border: 1px solid var(--line); background: #fff; }
.order-lines .row { display: flex; justify-content: space-between; padding: 15px 22px; border-bottom: 1px solid var(--line); font-size: 15px; }
.order-lines .row span:first-child { color: var(--ink-faint); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; padding-top: 2px; }
.order-lines .row b { font-weight: 600; text-align: right; }
.order-lines .total { background: var(--paper-warm); font-size: 17px; }
.order-done { text-align: center; padding: 50px 20px; display: none; }
.order-done.show { display: block; animation: rise .5s ease; }
.order-done .mark { font-family: var(--serif); font-style: italic; font-size: 60px; color: var(--gold); }
.order-done h3 { font-size: 26px; margin: 12px 0 8px; }
.order-done p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .main-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; }
  .hero-figure { order: 2; margin-top: 10px; }
  .pillars { grid-template-columns: 1fr; }
  .suit-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .config-grid, .tryon-grid { grid-template-columns: 1fr; }
  .config-stage { position: static; min-height: 420px; }
  .measure-grid { grid-template-columns: 1fr; }
  .fit-cells { grid-template-columns: repeat(2, 1fr); }
  .scan-shots { grid-template-columns: 1fr; }
  .scan-cells { grid-template-columns: repeat(2, 1fr); }
  .scan-review { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
}
