/* QLOSET by Bahar. Mobile first. Apple design rules: transform/opacity only, scale from .97, snappy, reduced-motion aware. */
:root {
  interpolate-size: allow-keywords;
  --ivory: #f6f2ec;
  --paper: #fffdf9;
  --sand: #ece4d9;
  --ink: #1f1a16;
  --muted: #675d53;
  --faint: rgba(31, 26, 22, .16);
  --line: #e2d8cc;
  --camel: #9a7454;
  --espresso: #2a211b;
  --radius: 12px;
  --gutter: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, sans-serif;
  --nav-h: 64px;
  color: var(--ink);
  background: var(--ivory);
  font: 300 1rem/1.65 var(--sans);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { margin: 0; background: var(--ivory); overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.link { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; transition: opacity 150ms; }
.link:hover { opacity: .7; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: var(--radius);
  background: var(--espresso); color: var(--ivory);
  font-weight: 400; font-size: .95rem; letter-spacing: .03em;
  text-box: trim-both cap alphabetic;
  transition: transform 100ms ease-out, background-color 200ms;
}
.btn:hover { background: #3a2e26; }
.btn:active, .dock:active, .nav-book:active, .gbtn:active { transform: scale(.97); }
.btn-block { width: 100%; }
.btn-light { background: var(--ivory); color: var(--espresso); }
.btn-light:hover { background: #fff; }

/* Image frames: fade in once decoded */
[data-img] { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--sand), #d9c9b6); }
[data-img] img { transition: opacity 700ms var(--ease); }
[data-img] img.loading { opacity: 0; }

/* Header: translucent material */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(var(--nav-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--gutter) 0;
  color: var(--ivory);
  transition: background-color 300ms var(--ease), color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.nav.solid {
  color: var(--ink);
  background: rgba(246, 242, 236, .74);
  backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 rgba(31, 26, 22, .06);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.wordmark { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; letter-spacing: .34em; margin-right: -.34em; }
.wordmark.small { font-size: 1.1rem; }
.by { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: .95rem; opacity: .8; margin-left: 4px; }
.nav-links { display: none; }
.nav-toggle { min-height: 44px; padding: 0 2px; font-size: 1rem; position: relative; z-index: 31; }
.menu-open .nav { color: var(--ink); background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.menu {
  position: fixed; inset: 0; z-index: 29; background: var(--ivory);
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 0 var(--gutter);
}
.menu[hidden] { display: none; }
.menu a { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 1.3rem + 3.6vw, 2.8rem); line-height: 1.2; padding: 4px 0; }
.menu:not([hidden]) a { animation: up 480ms var(--ease-out) both; }
.menu a:nth-child(2) { animation-delay: 35ms; } .menu a:nth-child(3) { animation-delay: 70ms; }
.menu a:nth-child(4) { animation-delay: 105ms; } .menu a:nth-child(5) { animation-delay: 140ms; }
@keyframes up { from { opacity: 0; transform: translateY(16px) scale(.97); } }

.eyebrow { margin: 0 0 14px; font-size: .85rem; letter-spacing: .06em; color: var(--camel); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--ivory); overflow: clip; }
.hero-frame { position: absolute; inset: 0; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { transform: scale(var(--hs, 1.06)); transform-origin: 50% 40%; will-change: transform; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 17, 13, .42) 0%, rgba(22, 17, 13, 0) 20%, rgba(22, 17, 13, .1) 48%, rgba(22, 17, 13, .78) 100%); }
.quote-hero { display: none; }
.hero-copy { position: relative; z-index: 1; width: 100%; padding: 0 var(--gutter) calc(40px + env(safe-area-inset-bottom)); }
.hero .eyebrow { color: inherit; opacity: .9; }
.hero h1 { margin: 0 0 18px; font-family: var(--serif); font-weight: 300; font-size: clamp(2.15rem, 1.3rem + 3.8vw, 3.9rem); line-height: 1.02; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 .line { display: block; }
.hero h1 i { font-style: italic; text-transform: none; letter-spacing: 0; }
.hero h1 em { margin-top: .12em; font-style: italic; text-transform: none; letter-spacing: -.005em; font-size: .84em; }
.hero-sub { margin: 0 0 28px; max-width: 34ch; opacity: .92; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.hero .btn { background: var(--ivory); color: var(--espresso); }
.hero .btn:hover { background: #fff; }
/* Entrance: rise from .97, staggered */
.rise { animation: up 900ms var(--ease-out) both; }
.hero h1 .line:nth-child(1) { animation-delay: 80ms; } .hero h1 .line:nth-child(2) { animation-delay: 140ms; }
.hero h1 .line:nth-child(3) { animation-delay: 200ms; } .hero-sub { animation-delay: 280ms; } .hero-actions { animation-delay: 340ms; }
.hero-media img.ready { animation: settle 1600ms var(--ease-out) backwards; }
@keyframes settle { from { opacity: 0; transform: scale(1.12); } }

/* ---------- Statement: scroll-lit words ---------- */
.statement { padding: 48px var(--gutter) 28px; }
.statement-sub { margin: 14px 0 0; max-width: 40ch; color: var(--muted); }
.statement-text { margin: 0; max-width: 20ch; font-family: var(--serif); font-weight: 300; font-size: clamp(1.55rem, 1.1rem + 2.2vw, 2.9rem); line-height: 1.22; letter-spacing: -.012em; }
.statement-text .w { color: var(--faint); transition: color 260ms var(--ease); }
.statement-text .w.on { color: var(--ink); }
.statement-text .w.em { font-style: italic; }

/* ---------- For executives ---------- */
.exec { padding: 0 var(--gutter) 36px; }
/* Same-background neighbours: don't stack both paddings */
.method + .about { padding-top: 8px; }
.exec-visual { display: none; }
.exec-list { list-style: none; margin: 4px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px; display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); overscroll-behavior-x: contain; scrollbar-width: none; }
.exec-list::-webkit-scrollbar { display: none; }
.exec-item { scroll-snap-align: start; }
.exec-item .shot { aspect-ratio: 3 / 4; border-radius: var(--radius); margin-bottom: 12px; }
.exec-item .num { display: block; color: var(--camel); font-variant-numeric: tabular-nums; font-size: .8rem; margin-bottom: 2px; }
.exec-item h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 300; font-size: clamp(1.25rem, 1rem + 1.8vw, 2.5rem); line-height: 1.15; letter-spacing: -.01em; }
.exec-item p { margin: 0; color: var(--muted); max-width: 36ch; font-size: .92rem; }
.exec-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 1.1rem; line-height: 1.4; max-width: 34ch; }

/* ---------- Sections ---------- */
.section { padding: 44px var(--gutter); }
.title { margin: 0 0 10px; font-family: var(--serif); font-weight: 300; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem); line-height: 1.08; letter-spacing: -.012em; }
.lede { margin: 0; color: var(--muted); max-width: 44ch; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 20px; }

/* ---------- Services gallery: native scroll-snap (real momentum + rubber-band on iOS) ---------- */
.services { padding-left: 0; padding-right: 0; background: var(--paper); border-block: 1px solid var(--line); }
.services .section-head { padding: 0 var(--gutter); }
.gallery-controls { display: none; gap: 10px; }
.gbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius); background: var(--sand); transition: transform 100ms ease-out, opacity 200ms, background-color 200ms; }
.gbtn:hover { background: #e2d8cb; }
.gbtn:disabled { opacity: .35; cursor: default; }
.gbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rail {
  list-style: none; margin: 0; padding: 0 var(--gutter) 8px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  overscroll-behavior-x: contain; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.card { scroll-snap-align: start; }
.card-media { aspect-ratio: 3 / 4; border-radius: var(--radius); }
.card-media img { transition: opacity 700ms var(--ease), transform 900ms var(--ease-out); }
.card-num { display: block; margin: 12px 0 2px; color: var(--camel); font-variant-numeric: tabular-nums; font-size: .8rem; }
.card h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; line-height: 1.15; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.rail-progress { margin: 18px var(--gutter) 0; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.rail-progress span { display: block; height: 100%; background: var(--ink); border-radius: 2px; transform-origin: left; will-change: transform; }

/* ---------- Method ---------- */
.method-track { position: relative; height: 2px; margin: 18px 0 0; background: var(--line); border-radius: 2px; overflow: hidden; }
.method-track span { position: absolute; inset: 0; background: var(--camel); transform-origin: left; transform: scaleX(var(--mp, 0)); will-change: transform; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; padding: 14px 0; border-bottom: 1px solid var(--line); transition: opacity 400ms var(--ease); opacity: .38; }
.steps li.on { opacity: 1; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; color: var(--camel); font-size: .95rem; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.steps h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem, 1.2rem + 2.4vw, 3rem); line-height: 1.05; letter-spacing: -.015em; }
.steps h3::after { content: "."; color: var(--camel); }
.steps p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* ---------- About ---------- */
.about { display: grid; gap: 22px; }
.about-media { aspect-ratio: 1 / 1; border-radius: var(--radius); }
.about-body p { margin: 0 0 14px; max-width: 46ch; }

/* Quote card */
.quote { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: 0 24px 48px -30px rgba(42, 33, 27, .45); }
.quote blockquote { margin: 0 0 10px; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 1.25rem; line-height: 1.3; color: var(--ink); }
.quote blockquote::before { content: "“"; } .quote blockquote::after { content: "”"; }
.quote figcaption { font-size: .9rem; color: var(--muted); }
.quote-about { margin-top: 20px; }

/* ---------- Book ---------- */
.book { position: relative; color: var(--ivory); background: var(--espresso); overflow: clip; }
.book-media { position: absolute; inset: 0; background: var(--espresso); }
.book-media img { opacity: .5; }
.book-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42, 33, 27, .35), rgba(42, 33, 27, .92)); }
.book-inner { position: relative; z-index: 1; display: grid; gap: 24px; padding: 60px var(--gutter) calc(52px + env(safe-area-inset-bottom)); }
.book h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 300; font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); line-height: 1.08; letter-spacing: -.012em; }
.book-copy p { margin: 0; opacity: .85; max-width: 40ch; }
.consult {
  border-radius: var(--radius); padding: 26px;
  background: rgba(255, 253, 249, .1); border: 1px solid rgba(255, 253, 249, .22);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55);
}
.consult-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 253, 249, .2); }
.consult-name { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; line-height: 1.15; }
.consult-price { font-weight: 400; white-space: nowrap; }
.consult-list { list-style: none; margin: 18px 0 26px; padding: 0; display: grid; gap: 12px; }
.consult-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.consult-list li::before { content: ""; width: 14px; height: 1px; background: currentColor; opacity: .7; margin-top: .8em; }
.consult-meta { margin: 14px 0 0; font-size: .9rem; opacity: .7; text-align: center; }

.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  font-size: .95rem; color: var(--muted);
}

/* ---------- Booking dock (phones) ---------- */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 58px; padding: 6px 6px 6px 18px; border-radius: 14px;
  background: rgba(42, 33, 27, .86); color: var(--ivory);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .5);
  font-size: .95rem;
  transform: translateY(calc(100% + 28px)) scale(.97); opacity: 0;
  transition: transform 480ms var(--ease-out), opacity 300ms var(--ease);
}
.dock.on { transform: none; opacity: 1; }
.dock-cta { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 10px; background: var(--ivory); color: var(--espresso); font-weight: 400; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px) scale(.97); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Tablet ---------- */
@media (min-width: 700px) {
  :root { --gutter: 36px; }
  .section { padding: 88px var(--gutter); }
  .method + .about { padding-top: 24px; }
  .statement { padding: 96px var(--gutter) 88px; }
  .rail { grid-auto-columns: 46%; gap: 20px; }
  .steps { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
  .book-inner { grid-template-columns: 1fr minmax(320px, 420px); align-items: end; gap: 48px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  :root { --gutter: clamp(36px, 5vw, 80px); --nav-h: 72px; }
  .nav { color: var(--ink); }
  .nav-links { display: flex; align-items: center; gap: 28px; font-size: .98rem; }
  .nav-links a:not(.nav-book) { opacity: .78; transition: opacity 150ms; }
  .nav-links a:not(.nav-book):hover, .nav-links a.active { opacity: 1; }
  .nav-book { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border-radius: var(--radius); background: var(--espresso); color: var(--ivory); transition: transform 100ms ease-out; }
  .nav-toggle { display: none; }

  .hero { color: var(--ink); min-height: min(100svh, 940px); padding: calc(var(--nav-h) + 32px) var(--gutter) 56px; display: grid; grid-template-columns: 1fr 46%; align-items: center; gap: 64px; }
  .hero-frame { position: relative; inset: auto; order: 2; height: min(80svh, 780px); }
  .hero-media { border-radius: var(--radius); }
  .hero-media::after { display: none; }
  .quote-hero { display: block; position: absolute; left: -56px; bottom: 36px; max-width: 330px; z-index: 2; animation: up 900ms var(--ease-out) 420ms both; }
  .hero-copy { padding: 0; }
  .hero .eyebrow { color: var(--camel); opacity: 1; }
  .hero-sub { color: var(--muted); opacity: 1; font-size: 1.05rem; }
  .hero .btn { background: var(--espresso); color: var(--ivory); }
  .hero .btn:hover { background: #3a2e26; }

  .statement { padding: 168px var(--gutter) 176px; }

  /* Pinned visual, scrolling chapters */
  .exec { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding-bottom: 160px; }
  .exec-visual { display: block; position: sticky; top: calc(var(--nav-h) + 24px); height: calc(100svh - var(--nav-h) - 48px); border-radius: var(--radius); overflow: hidden; background: var(--sand); }
  .exec-visual [data-img] { position: absolute; inset: 0; opacity: 0; transform: scale(1.04); transition: opacity 700ms var(--ease), transform 1200ms var(--ease-out); }
  .exec-visual [data-img].on { opacity: 1; transform: none; }
  .exec-copy { padding-top: 8vh; }
  .exec-list { gap: 0; grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; scroll-snap-type: none; }
  .exec-item { min-height: 56svh; display: flex; flex-direction: column; justify-content: center; opacity: .3; transition: opacity 500ms var(--ease); }
  .exec-item.on { opacity: 1; }
  .exec-item .shot { display: none; }
  .exec-note { margin-top: 24px; }

  .section { padding: 144px var(--gutter); }
  .method + .about { padding-top: 48px; }
  .services { padding-left: 0; padding-right: 0; }
  .gallery-controls { display: flex; }
  .rail { grid-auto-columns: calc((100% - 2 * var(--gutter) - 48px) / 3.2); gap: 24px; scroll-snap-type: x mandatory; }
  .rail-progress { display: none; }
  .card:hover .card-media img { transform: scale(1.035); }

  .steps { grid-template-columns: repeat(4, 1fr); column-gap: 32px; }
  .steps li { border-bottom: 0; padding-top: 32px; }

  .about { grid-template-columns: 38% 1fr; gap: 80px; align-items: center; }
  .about-media { aspect-ratio: 4 / 5; }
  .about-body { font-size: 1.05rem; }
  .book-inner { padding: 176px var(--gutter); }
  .dock { display: none; }
}

@media (hover: hover) { .menu a:hover { color: var(--camel); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .quote-hero, .menu:not([hidden]) a, .hero-media img.ready { animation: none; }
  .hero-media img { transform: none; }
  .reveal { transform: none; transition: opacity 200ms ease; }
  .statement-text .w { color: var(--ink); }
  .exec-visual [data-img] { transform: none; transition: opacity 200ms ease; }
  .exec-item, .steps li { opacity: 1; }
  .dock { transition: opacity 200ms ease; transform: none; }
  .card:hover .card-media img { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav.solid { background: var(--ivory); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .dock { background: var(--espresso); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .consult { background: rgba(42, 33, 27, .95); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .statement-text .w { color: rgba(31, 26, 22, .45); }
  .consult { background: var(--espresso); border-color: var(--ivory); }
}

/* Swipe rows scroll sideways only: no vertical drag inside them, page scroll still passes through */
.rail, .exec-list { overflow-y: hidden; overscroll-behavior-y: none; touch-action: pan-x pan-y; }
.rail .card.reveal, .exec-list .exec-item.reveal { transform: none; }
@media (min-width: 960px) { .exec-list { overflow: visible; } }
