/* Monte — The Collection
   Design language: plaster, timber, and the 4 mm shadow line.
   Every UI edge is a hairline, the way a Monte door is only a line in the wall. */

:root {
  --paper: #e8e3dc;
  --paper-2: #efebe5;
  --paper-3: #ddd6cc;
  --ink: #1c1b19;
  --ink-2: #57524b;
  --ink-3: #8b847a;
  --line: rgba(28, 27, 25, 0.14);
  --line-2: rgba(28, 27, 25, 0.34);
  --bronze: #8a6a48;
  --f-display: 'Antonio', 'Vazirmatn', sans-serif;
  --f-body: 'Inter', 'Vazirmatn', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --gut: 28px;
  --top: 64px;
  --panel: min(460px, 38vw);
  /* safe areas (notch, home indicator): iOS reports the side insets symmetrically in landscape */
  --gx: max(var(--gut), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sheet-h: 46vh;
}
@supports (height: 1dvh) { :root { --sheet-h: 46dvh; } }
html[lang='fa'] {
  --f-body: 'Vazirmatn', system-ui, sans-serif;
  --f-display: 'Vazirmatn', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.02em; font-feature-settings: 'zero' 0; }
.latin { font-family: 'Antonio', sans-serif !important; }
.eyebrow { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin: 0; }
html[lang='fa'] .eyebrow { letter-spacing: 0; font-size: 12px; }
.arr { display: inline-block; width: 18px; height: 1px; background: currentColor; position: relative; vertical-align: middle; margin-inline-start: 8px; transition: width 0.5s var(--ease); }
.arr::after { content: ''; position: absolute; right: 0; top: 0; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); transform-origin: 100% 0; }
html[dir='rtl'] .arr { transform: scaleX(-1); }
.arr.back { transform: scaleX(-1); margin-inline: 0 8px; }
html[dir='rtl'] .arr.back { transform: none; }

.wordmark {
  display: inline-block; width: 96px; aspect-ratio: 800 / 415;
  background: currentColor;
  -webkit-mask: url(../img/b/wordmark.png) center / contain no-repeat;
  mask: url(../img/b/wordmark.png) center / contain no-repeat;
}

/* ------------------------------------------------------------ canvas */
/* sized by its fixed box (not 100vh), so the drawing buffer always matches what is visible on iOS */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; opacity: 0; transition: opacity 1.1s var(--ease); }
body.gl-ready #gl { opacity: 1; }
body:not(.gl-ready) #tags, body:not(.gl-ready) #dimtags { visibility: hidden; }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(120% 90% at 50% 42%, transparent 55%, rgba(40, 34, 28, 0.10)); }
#tags, #dimtags { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.tag {
  position: absolute; left: 0; top: 0; white-space: nowrap; text-align: center;
  display: flex; gap: 10px; align-items: baseline; will-change: transform, opacity;
  transition: color 0.4s;
}
.tag b { font: 300 12px var(--f-mono); color: var(--ink-3); }
.tag span { font: 400 13px 'Antonio', sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.tag.hot span, .tag.hot b { color: var(--ink); }
.dim {
  position: absolute; left: 0; top: 0; font: 400 11px var(--f-mono); color: var(--ink);
  background: var(--paper-2); padding: 2px 6px; white-space: nowrap; opacity: 0; transition: opacity 0.4s;
}
.dim.on { opacity: 1; }

/* ------------------------------------------------------------ top bar */
.top {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 25;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: var(--st) var(--gx) 0; height: calc(var(--top) + var(--st)); pointer-events: none;
  background: linear-gradient(rgba(232, 227, 220, 0.92), rgba(232, 227, 220, 0));
}
.top > * { pointer-events: auto; }
.brand { color: var(--ink); justify-self: start; display: flex; align-items: center; gap: 14px; text-decoration: none; }
@media (max-width: 1180px) { .brand small { display: none; } }
.brand small { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); padding-inline-start: 14px; border-inline-start: 1px solid var(--line-2); line-height: 1.2; }
html[lang='fa'] .brand small { letter-spacing: 0; font-size: 11px; }
.tabs { display: flex; gap: 30px; }
.tabs button { position: relative; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); padding: 8px 0; transition: color 0.3s; }
html[lang='fa'] .tabs button { letter-spacing: 0; font-size: 13px; }
.tabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--ink); transform: scaleX(0); transition: transform 0.5s var(--ease); }
.tabs button:hover, .tabs button[aria-current='true'] { color: var(--ink); }
.tabs button[aria-current='true']::after { transform: scaleX(1); }
.tools { justify-self: end; display: flex; gap: 22px; align-items: center; }
.tools button { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
html[lang='fa'] .tools button { letter-spacing: 0; font-size: 13px; }
.tools .lang { font-family: 'Vazirmatn', 'Inter', sans-serif; letter-spacing: 0.06em; border: 1px solid var(--line-2); padding: 4px 9px; }
.count { font: 400 10px var(--f-mono); min-width: 18px; height: 18px; display: inline-grid; place-items: center; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 5px; }
.count.has { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ------------------------------------------------------------ HUD (wall) */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; transition: opacity 0.6s var(--ease); }
body.is-focus .hud, body.is-sheet .hud { visibility: hidden; transition: opacity 0.6s var(--ease), visibility 0s 0.6s; }
.hud > * { pointer-events: auto; }
body.is-focus .hud, body.is-sheet .hud { opacity: 0; }
body.is-focus .hud > *, body.is-sheet .hud > * { pointer-events: none; }
body.is-focus #tags, body.is-sheet #tags { opacity: 0; }
#tags { transition: opacity 0.5s; }

.now { position: absolute; inset-inline-start: var(--gx); bottom: calc(128px + var(--sb)); max-width: 470px; }
.now-no { color: var(--ink-3); display: flex; gap: 10px; align-items: center; }
.now-no i { width: 28px; height: 1px; background: var(--line-2); }
.now-name {
  font: 200 clamp(64px, 8.6vw, 132px)/0.86 'Antonio', sans-serif; text-transform: uppercase; letter-spacing: 0.005em;
  margin: 10px 0 14px; white-space: nowrap;
}
.now-fam { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
html[lang='fa'] .now-fam { letter-spacing: 0; font-size: 13px; }
.now-line { font-size: 16px; color: var(--ink-2); margin: 6px 0 22px; max-width: 34ch; }
.swap { animation: swap 0.7s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } }
.cta { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; padding: 12px 0; border-bottom: 1px solid var(--ink); display: inline-flex; align-items: center; }
html[lang='fa'] .cta { letter-spacing: 0; font-size: 14px; }
.cta:hover .arr { width: 30px; }

.hint { position: absolute; inset-inline-end: var(--gx); bottom: calc(132px + var(--sb)); text-align: end; color: var(--ink-3); font-size: 11.5px; line-height: 1.7; }
.hint kbd { font: 400 10px var(--f-mono); border: 1px solid var(--line-2); padding: 0 5px; margin: 0 2px; }

/* The dimension chain — a scale bar that doubles as navigation */
.chain { position: absolute; left: var(--gx); right: var(--gx); bottom: calc(30px + var(--sb)); height: 70px; direction: ltr; }
.chain-track { position: absolute; left: 2.5%; right: 6%; top: 0; bottom: 0; }
.chain-base { position: absolute; left: 0; right: 0; top: 38px; height: 1px; background: var(--line-2); }
.grp { position: absolute; top: 4px; height: 14px; border-top: 1px solid var(--line-2); text-align: center; cursor: pointer; }
.grp::before, .grp::after { content: ''; position: absolute; top: -4px; width: 1px; height: 8px; background: var(--line-2); }
.grp::before { left: 0; } .grp::after { right: 0; }
.grp span { position: relative; top: -12px; background: var(--paper); padding: 0 8px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; transition: color 0.3s; }
html[lang='fa'] .grp span { letter-spacing: 0; font-size: 11.5px; }
.grp:hover span, .grp.on span { color: var(--ink); }
.grp.end span { position: absolute; top: -12px; right: 0; padding-right: 0; } /* keep the last label inside the track */
.tick { position: absolute; top: 26px; width: 34px; margin-left: -17px; height: 44px; display: flex; flex-direction: column; align-items: center; }
.tick::before { content: ''; width: 1px; height: 12px; margin-top: 6px; background: var(--line-2); transition: height 0.4s var(--ease), background 0.3s; }
.tick span { font: 400 10px var(--f-mono); color: var(--ink-3); margin-top: 6px; transition: color 0.3s; }
.tick:hover::before, .tick.on::before { background: var(--ink); height: 18px; margin-top: 0; }
.tick:hover span, .tick.on span { color: var(--ink); }
/* the rail spans the track and is moved with a transform, so the marker never triggers layout */
.marker-rail { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.marker { position: absolute; left: 0; top: 25px; width: 10px; height: 26px; margin-left: -5px; border: 1px solid var(--ink); background: var(--paper); pointer-events: none; }
.marker::after { content: ''; position: absolute; right: 2px; top: 11px; width: 1px; height: 3px; background: var(--ink); }

/* ------------------------------------------------------------ product panel */
.panel {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: var(--panel); z-index: 12;
  background: var(--paper-2); border-inline-start: 1px solid var(--line);
  transform: translateX(100%); transition: transform 0.9s var(--ease), visibility 0s 0.9s; visibility: hidden; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
html[dir='rtl'] .panel { transform: translateX(-100%); }
body.is-focus .panel { transform: none; visibility: visible; transition: transform 0.9s var(--ease); }
.pn { padding: calc(var(--top) + 18px) 36px 0; }
.pn > * { opacity: 0; transform: translateY(12px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
body.is-focus .pn > * { opacity: 1; transform: none; }
body.is-focus .pn > *:nth-child(2) { transition-delay: 0.08s; }
body.is-focus .pn > *:nth-child(3) { transition-delay: 0.14s; }
body.is-focus .pn > *:nth-child(n+4) { transition-delay: 0.2s; }
.pn-top { display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.close { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); display: inline-flex; gap: 10px; align-items: center; position: relative; }
.close::before, .tools button::before, .tog::before, .txt::before, .in-lang::before { content: ''; position: absolute; inset: -12px -8px; }
.tools button, .tog, .txt, .in-lang { position: relative; }
html[lang='fa'] .close { letter-spacing: 0; font-size: 13px; }
.x { width: 14px; height: 14px; position: relative; display: inline-block; }
.x::before, .x::after { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: currentColor; transform: rotate(45deg); }
.x::after { transform: rotate(-45deg); }
.pn-fam { margin-top: 30px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
html[lang='fa'] .pn-fam { letter-spacing: 0; font-size: 13px; }
.pn-fam span { color: var(--ink-3); }
.pn-name { font: 200 76px/0.9 'Antonio', sans-serif; text-transform: uppercase; margin: 10px 0 18px; letter-spacing: 0.005em; }
.pn-tag { font-size: 19px; line-height: 1.4; margin: 0 0 14px; color: var(--ink); font-weight: 300; }
.pn-desc { color: var(--ink-2); margin: 0 0 26px; font-size: 14px; line-height: 1.75; }
html[lang='fa'] .pn-desc { line-height: 2; }
.pn-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.btn { height: 42px; padding: 0 18px; border: 1px solid var(--ink); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; transition: background 0.3s, color 0.3s; }
html[lang='fa'] .btn { letter-spacing: 0; font-size: 13px; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #000; }
.btn.on { background: transparent; color: var(--ink); border-color: var(--line-2); }
.pn section { padding: 22px 0 30px; border-top: 1px solid var(--line); }
.pn section .eyebrow { margin-bottom: 16px; }
.specs { margin: 0; display: grid; grid-template-columns: 112px 1fr; }
.specs dt, .specs dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.specs dt { color: var(--ink-3); font-size: 12px; }
.specs dd { color: var(--ink); line-height: 1.55; }
.specs > :nth-last-child(-n+2) { border-bottom: 0; }
.gal { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gal button { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-3); position: relative; }
.gal button:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gal button:hover img { transform: scale(1.04); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--line-2); padding: 6px 12px; font-size: 12px; color: var(--ink-2); }
.pn-nav { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); background: var(--paper-2); margin: 0 -36px; }
.pn-nav button { padding: 18px 36px; text-align: start; display: flex; flex-direction: column; gap: 2px; transition: background 0.3s; }
.pn-nav button + button { text-align: end; align-items: flex-end; border-inline-start: 1px solid var(--line); }
.pn-nav button:hover { background: var(--paper); }
.pn-nav small { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
html[lang='fa'] .pn-nav small { letter-spacing: 0; font-size: 11.5px; }
.pn-nav b { font: 300 20px 'Antonio', sans-serif; text-transform: uppercase; letter-spacing: 0.03em; }

/* ------------------------------------------------------------ focus dock */
.dock {
  position: fixed; inset-inline-start: var(--gx); inset-inline-end: calc(var(--panel) + var(--gut)); bottom: calc(26px + var(--sb)); z-index: 11;
  display: flex; gap: 40px; align-items: flex-end; flex-wrap: wrap;
  opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s 0.6s;
}
body.is-focus .dock { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.6s var(--ease) 0.35s, transform 0.6s var(--ease) 0.35s; }
body.is-sheet .dock { opacity: 0; pointer-events: none; visibility: hidden; }
.dk { display: flex; flex-direction: column; gap: 12px; }
.dk .eyebrow b { color: var(--ink); font-weight: 500; letter-spacing: 0.1em; }
html[lang='fa'] .dk .eyebrow b { letter-spacing: 0; }
.op { display: flex; align-items: center; gap: 14px; }
.op output { width: 54px; color: var(--ink); }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 190px; height: 22px; background: transparent; cursor: pointer; direction: ltr; }
input[type='range']::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
input[type='range']::-moz-range-track { height: 1px; background: var(--ink); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 22px; margin-top: -11px; background: var(--paper-2); border: 1px solid var(--ink); }
input[type='range']::-moz-range-thumb { width: 9px; height: 20px; border-radius: 0; background: var(--paper-2); border: 1px solid var(--ink); }
.sw { display: flex; gap: 10px; }
.sw button { width: 22px; height: 34px; border: 1px solid rgba(28, 27, 25, 0.25); position: relative; transition: transform 0.4s var(--ease); }
.sw button::before { content: ''; position: absolute; inset: -6px -5px; } /* larger hit area, invisible */
.sw button::after { content: ''; position: absolute; inset: -5px; border: 1px solid transparent; transition: border-color 0.3s; }
.sw button[aria-pressed='true']::after { border-color: var(--ink); }
.sw button:hover { transform: translateY(-2px); }
.dk-btns { display: flex; gap: 22px; align-items: center; height: 34px; }
.tog, .txt { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
html[lang='fa'] .tog, html[lang='fa'] .txt { letter-spacing: 0; font-size: 13px; }
.tog i { width: 22px; height: 9px; border-left: 1px solid; border-right: 1px solid; position: relative; }
.tog i::after { content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: currentColor; }
.tog[aria-pressed='true'], .tog:hover, .txt:hover { color: var(--ink); }
.tog[aria-pressed='true'] i { color: var(--bronze); }
.dk-note { flex-basis: 100%; margin: -18px 0 0; color: var(--ink-3); font-size: 11.5px; }

/* ------------------------------------------------------------ sheets (index / compare / projects) */
.sheet {
  position: fixed; inset: 0; z-index: 15; background: var(--paper); overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--top) + var(--st) + 36px) var(--gx) calc(90px + var(--sb));
  opacity: 0; visibility: hidden; transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease), visibility 0s 0.8s;
}
.sheet.open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.6s var(--ease), transform 0.8s var(--ease), visibility 0s; }
.sh-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.sh-title { font: 200 clamp(64px, 9vw, 140px)/0.84 var(--f-display); text-transform: uppercase; margin: 0; }
html[lang='fa'] .sh-title { font-weight: 200; line-height: 1.1; }
.sh-sub { color: var(--ink-2); font-size: 15px; max-width: 46ch; margin: 0 0 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { border: 1px solid var(--line-2); padding: 7px 14px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); transition: all 0.3s; }
html[lang='fa'] .filters button { letter-spacing: 0; font-size: 12.5px; }
.filters button sup { font-family: var(--f-mono); font-size: 9px; margin-inline-start: 4px; color: var(--ink-3); }
.filters button[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters button[aria-pressed='true'] sup { color: var(--paper-3); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 40px 22px; }
.card { text-align: start; display: block; width: 100%; }
.card[hidden] { display: none; }
.card .ph { aspect-ratio: 3 / 4; position: relative; overflow: hidden; background: var(--paper-3); }
.card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.8s var(--ease), transform 1.4s var(--ease); }
.card .ph img + img { opacity: 0; }
.card:hover .ph img { transform: scale(1.035); }
.card:hover .ph img + img { opacity: 1; }
.card .meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; padding-top: 14px; border-top: 1px solid var(--line-2); margin-top: 14px; }
.card .meta .mono { color: var(--ink-3); padding-top: 6px; }
.card .meta b { font: 300 30px/1 'Antonio', sans-serif; text-transform: uppercase; letter-spacing: 0.01em; }
.card .meta small { grid-column: 2; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
html[lang='fa'] .card .meta small { letter-spacing: 0; font-size: 12.5px; }
.card .meta p { grid-column: 2; margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }

.cmp-wrap { overflow-x: auto; scrollbar-width: thin; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); }
.cmp { border-collapse: collapse; min-width: 100%; }
.cmp th, .cmp td { text-align: start; vertical-align: top; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--line); min-width: 190px; font-size: 13px; color: var(--ink-2); font-weight: 400; }
html[dir='rtl'] .cmp th, html[dir='rtl'] .cmp td { padding: 14px 0 14px 18px; }
.cmp tbody th { position: sticky; inset-inline-start: calc(var(--gut) * -1); background: var(--paper); min-width: 130px; color: var(--ink-3); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; z-index: 1; padding-inline-start: var(--gut); }
html[lang='fa'] .cmp tbody th { letter-spacing: 0; font-size: 12.5px; }
.cmp thead th { border-bottom: 1px solid var(--line-2); }
.cmp thead th:first-child { position: sticky; inset-inline-start: calc(var(--gut) * -1); background: var(--paper); z-index: 2; }
.cmp-h { display: flex; flex-direction: column; gap: 10px; text-align: start; width: 100%; }
.cmp-h .ph { width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-3); }
.cmp-h img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.cmp-h:hover img { transform: scale(1.04); }
.cmp-h b { font: 300 24px/1 'Antonio', sans-serif; text-transform: uppercase; color: var(--ink); }
.cmp-h small { color: var(--ink-3); }
.cmp td.na { color: var(--ink-3); }

.about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 60px; padding-bottom: 50px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.about p.big { font-size: clamp(19px, 1.9vw, 26px); line-height: 1.5; font-weight: 300; margin: 14px 0 0; }
html[lang='fa'] .about p.big { line-height: 1.9; }
.facts dl { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 0 20px; }
.facts dt, .facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-3); font-size: 12px; }
.facts dd { font-size: 14px; }
.masonry { columns: 3 300px; column-gap: 22px; }
.masonry figure { margin: 0 0 30px; break-inside: avoid; }
.masonry button { display: block; width: 100%; overflow: hidden; background: var(--paper-3); }
.masonry img { width: 100%; height: auto; transition: transform 1.4s var(--ease); }
.masonry button:hover img { transform: scale(1.03); }
.masonry figcaption { display: flex; gap: 12px; padding-top: 10px; font-size: 12px; color: var(--ink-2); }
.masonry figcaption .mono { color: var(--ink-3); }

/* ------------------------------------------------------------ lightbox */
.lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(22, 21, 20, 0.96); color: #e9e4dd; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0s 0.5s; }
.lightbox.open { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease); }
.lightbox :focus-visible { outline-color: #e9e4dd; }
.lightbox img { max-width: 88vw; max-height: 82vh; object-fit: contain; transition: opacity 0.4s; }
.lb-bar { position: absolute; inset: auto var(--gx) calc(24px + var(--sb)); display: flex; justify-content: space-between; align-items: center; direction: ltr; }
.lb-bar button, .lb-close { color: #e9e4dd; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; min-height: 44px; }
.lb-close { position: absolute; top: calc(12px + var(--st)); inset-inline-end: var(--gx); }
.lb-cap { position: absolute; top: calc(26px + var(--st)); inset-inline-start: var(--gx); font: 300 18px 'Antonio', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; }

/* ------------------------------------------------------------ selection drawer */
.scrim { position: fixed; inset: 0; z-index: 29; background: rgba(28, 27, 25, 0.2); opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0s 0.5s; }
.scrim.open { opacity: 1; visibility: visible; transition: opacity 0.5s; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(440px, 100vw); z-index: 30; background: var(--paper-2);
  border-inline-start: 1px solid var(--line); transform: translateX(100%); transition: transform 0.8s var(--ease), visibility 0s 0.8s; visibility: hidden;
  overflow-y: auto; overscroll-behavior: contain; padding: calc(26px + var(--st)) 32px calc(40px + var(--sb)); display: flex; flex-direction: column;
}
html[dir='rtl'] .drawer { transform: translateX(-100%); }
.drawer.open, html[dir='rtl'] .drawer.open { transform: none; visibility: visible; transition: transform 0.8s var(--ease); }
.dr-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dr-head h2 { font: 200 40px/1 var(--f-display); text-transform: uppercase; margin: 0; }
html[lang='fa'] .dr-head h2 { font-size: 30px; }
.dr-empty { color: var(--ink-2); padding: 24px 0; }
.dr-list { list-style: none; margin: 0; padding: 0; }
.dr-list li { display: grid; grid-template-columns: 58px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dr-list img { width: 58px; height: 76px; object-fit: cover; background: var(--paper-3); }
.dr-list b { font: 300 22px/1 'Antonio', sans-serif; text-transform: uppercase; display: block; }
.dr-list small { color: var(--ink-3); font-size: 12px; display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.dr-list small i { width: 8px; height: 12px; border: 1px solid rgba(0, 0, 0, 0.2); display: inline-block; }
.dr-list .txt { font-size: 10px; }
.dr-actions { display: flex; gap: 10px; margin: 18px 0 36px; flex-wrap: wrap; }
.form h3 { margin: 0 0 6px; }
.form label { display: block; padding-top: 14px; }
.form label span { font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; }
.form input, .form textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; padding: 8px 0; outline: none; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--ink); }
.form .btn { margin-top: 24px; width: 100%; justify-content: center; }
.form .ok { color: var(--bronze); font-size: 13px; margin-top: 12px; min-height: 20px; }

/* ------------------------------------------------------------ intro */
.intro { position: fixed; inset: 0; z-index: 50; background: var(--paper); display: grid; place-items: center; transition: opacity 0.9s var(--ease) 0.75s, visibility 0s 1.7s; }
.intro.gone { opacity: 0; visibility: hidden; }
.in-wrap { display: flex; align-items: center; gap: clamp(36px, 6vw, 96px); }
.in-door { height: min(56vh, 520px); aspect-ratio: 90 / 240; position: relative; perspective: 1400px; }
.in-door i { position: absolute; background: var(--ink); z-index: 2; animation: draw 0.55s cubic-bezier(0.6, 0, 0.3, 1) forwards; }
.in-door i:nth-of-type(1) { left: 0; bottom: 0; width: 1px; height: 100%; transform: scaleY(0); transform-origin: bottom; animation-delay: 0.2s; }
.in-door i:nth-of-type(2) { left: 0; top: 0; height: 1px; width: 100%; transform: scaleX(0); transform-origin: left; animation-delay: 0.7s; }
.in-door i:nth-of-type(3) { right: 0; top: 0; width: 1px; height: 100%; transform: scaleY(0); transform-origin: top; animation-delay: 1.0s; }
.in-door i:nth-of-type(4) { right: 0; bottom: 0; height: 1px; width: 100%; transform: scaleX(0); transform-origin: right; animation-delay: 1.5s; }
@keyframes draw { to { transform: none; } }
.in-light { position: absolute; inset: 0; background: linear-gradient(180deg, #f4e8d6, #fffaf2 55%, #f1e2cc); opacity: 0; transition: opacity 0.8s; }
.in-leaf { position: absolute; inset: 0; background: var(--paper-2); transform-origin: 0 50%; transition: transform 1.3s var(--ease); box-shadow: 0 0 0 0 rgba(0,0,0,0); }
.in-leaf::after { content: ''; position: absolute; right: 9%; top: 43%; width: 1px; height: 7%; background: var(--ink); opacity: 0; animation: fade 0.8s 1.6s forwards; }
.intro.opening .in-light { opacity: 1; }
.intro.opening .in-leaf { transform: rotateY(-78deg); box-shadow: 30px 0 60px rgba(0, 0, 0, 0.08); }
.in-copy > * { opacity: 0; animation: rise 1s var(--ease) forwards; }
.in-copy .wordmark { width: 200px; animation-delay: 0.9s; }
.in-line { font: 200 34px/1.1 var(--f-display); text-transform: uppercase; margin: 26px 0 8px; animation-delay: 1.1s; letter-spacing: 0.02em; }
html[lang='fa'] .in-line { font-size: 28px; }
.in-line .mono { font-size: 12px; color: var(--ink-3); vertical-align: middle; margin-inline-start: 10px; }
.in-sub { color: var(--ink-2); margin: 0 0 40px; animation-delay: 1.25s; }
.in-enter { animation-delay: 1.6s; }
.in-lang { position: absolute; top: calc(22px + var(--st)); inset-inline-end: var(--gx); min-height: 32px; font-family: 'Vazirmatn', 'Inter', sans-serif; font-size: 12px; border: 1px solid var(--line-2); padding: 4px 9px; color: var(--ink-2); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* ------------------------------------------------------------ fallback when WebGL is unavailable */
body.no-gl #gl, body.no-gl #tags, body.no-gl #dimtags, body.no-gl .dock, body.no-gl .vignette { display: none; }
.nogl { position: fixed; inset: calc(var(--top) + var(--st) + 12px) var(--gx) calc(220px + var(--sb)); z-index: 0; display: grid; place-items: center; cursor: pointer; }
.nogl img { max-width: 100%; max-height: 100%; object-fit: contain; background: var(--paper-3); }
body.is-focus .nogl { inset-inline-end: calc(var(--panel) + var(--gut)); bottom: calc(40px + var(--sb)); cursor: default; }

#print { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ small screens */
@media (max-width: 820px) {
  :root { --gut: 16px; --top: 100px; --panel: 100vw; }
  .top { grid-template-columns: 1fr auto; grid-template-areas: 'brand tools' 'tabs tabs'; align-content: end; row-gap: 4px; }
  .brand { grid-area: brand; } .brand small { display: none; }
  .brand .wordmark { width: 84px; }
  .tabs button { min-height: 44px; }
  .tools .lang { min-height: 30px; min-width: 34px; justify-content: center; }
  .tools { grid-area: tools; gap: 14px; }
  .tabs { grid-area: tabs; gap: 0; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 2px; }
  .tools .sel-label { display: none; }
  .now { bottom: calc(112px + var(--sb)); inset-inline-end: var(--gx); }
  .now-name { font-size: 64px; margin: 6px 0 10px; }
  .now-line { font-size: 14px; margin-bottom: 14px; }
  .hint { display: none; }
  .chain { bottom: calc(18px + var(--sb)); }
  .grp span { font-size: 0; padding: 0 3px; }
  .grp.on span { font-size: 9.5px; }
  .tick span { font-size: 9px; }
  .panel { top: auto; height: var(--sheet-h); width: 100%; inset-inline: 0; border-inline-start: 0; border-top: 1px solid var(--line); transform: translateY(100%) !important; }
  body.is-focus .panel { transform: none !important; }
  .pn { padding: 18px 20px 0; }
  .pn-name { font-size: 56px; }
  .pn-nav { margin: 0 -20px; }
  .pn-nav button { padding: 14px 20px calc(14px + var(--sb)); }
  .dock { inset-inline: var(--gx); bottom: calc(var(--sheet-h) + 12px); gap: 18px; flex-wrap: nowrap; justify-content: space-between; }
  .dk { gap: 8px; }
  .dk-note, .dk-btns .txt, .tog span { display: none; }
  .dk .eyebrow { font-size: 9.5px; }
  .op { gap: 8px; } .op output { width: 38px; }
  input[type='range'] { width: 96px; }
  .sw { gap: 10px; } .sw button { width: 20px; height: 30px; }
  .sw button::before { inset: -8px -5px; }
  .tog::before { inset: -18px -12px; }
  .dk-btns { height: 28px; }
  .sh-head, .about { grid-template-columns: 1fr; gap: 18px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .filters button { padding: 10px 14px; }
  body.is-focus .nogl { inset-inline-end: var(--gx); bottom: calc(var(--sheet-h) + 16px); }
  .card .meta { grid-template-columns: 1fr; }
  .card .meta small, .card .meta p { grid-column: 1; }
  .card .meta p { display: none; }
  .card .meta b { font-size: 24px; }
  .in-wrap { flex-direction: column; gap: 30px; }
  .in-door { height: 38vh; }
  .in-copy { text-align: center; }
  .in-sub { margin-bottom: 24px; }
}

/* ------------------------------------------------------------ short landscape (phones on their side) */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --top: 56px; --gut: 20px; --panel: min(380px, 44vw); }
  .top { grid-template-columns: auto 1fr auto; grid-template-areas: 'brand tabs tools'; align-content: center; row-gap: 0; column-gap: 16px; }
  .brand small { display: none; }
  .brand .wordmark { width: 76px; }
  .tabs { justify-content: flex-start; gap: 18px; border-top: 0; padding-top: 0; } /* clear of the side panel */
  .tabs button { min-height: 44px; }
  .tools .sel-label { display: none; }
  .now { bottom: calc(92px + var(--sb)); }
  .now-name { font-size: 48px; margin: 4px 0 6px; }
  .now-line { display: none; }
  .cta { padding: 10px 0; }
  .hint { display: none; }
  .chain { bottom: calc(8px + var(--sb)); }
  .panel { top: 0; bottom: 0; height: auto; width: var(--panel); inset-inline-start: auto; inset-inline-end: 0; border-top: 0; border-inline-start: 1px solid var(--line); transform: translateX(100%) !important; }
  html[dir='rtl'] .panel { transform: translateX(-100%) !important; }
  body.is-focus .panel { transform: none !important; }
  .pn { padding: calc(var(--top) + var(--st) + 14px) 24px 0; }
  .pn-name { font-size: 48px; }
  .pn-nav { margin: 0 -24px; }
  .pn-nav button { padding: 12px 24px calc(12px + var(--sb)); }
  .dock { inset-inline-start: var(--gx); inset-inline-end: calc(var(--panel) + var(--gut)); bottom: calc(12px + var(--sb)); gap: 18px; flex-wrap: nowrap; justify-content: space-between; }
  .dk { gap: 6px; }
  .dk-note, .dk-btns .txt, .tog span { display: none; }
  .op { gap: 8px; } .op output { width: 38px; }
  input[type='range'] { width: 96px; }
  .sw { gap: 10px; } .sw button { width: 20px; height: 30px; }
  .dk-btns { height: 30px; }
  body.is-focus .nogl { inset-inline-end: calc(var(--panel) + var(--gut)); bottom: calc(16px + var(--sb)); }
  .sheet { padding-top: calc(var(--top) + var(--st) + 20px); }
  .sh-title { font-size: 56px; }
  .in-wrap { flex-direction: row; gap: 40px; }
  .in-door { height: 62vh; }
  .in-copy { text-align: start; }
  .in-copy .wordmark { width: 150px; }
  .in-line { font-size: 28px; margin: 14px 0 6px; }
  .in-sub { margin-bottom: 16px; }
}

/* touch: every control gets a 44px hit area (visuals unchanged); iOS zooms into fields under 16px */
@media (pointer: coarse) {
  .form input, .form textarea { font-size: 16px; }
  .tabs button { min-height: 44px; }
  .tabs button::before { content: ''; position: absolute; inset: 0 -10px; }
  .btn { height: 44px; }
  .cta, .brand { min-height: 44px; }
  input[type='range'] { height: 44px; }
  .close::before, .tools button::before, .txt::before, .in-lang::before { inset: -14px -12px; }
  .tog::before { inset: -18px -12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}

/* ------------------------------------------------------------ print: specification sheet */
@media print {
  @page { size: A4; margin: 16mm; }
  html, body { height: auto; overflow: visible; background: #fff; }
  body > *:not(#print) { display: none !important; }
  #print { display: block; color: #111; font: 10pt/1.5 var(--f-body); }
  .pr-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 0.5pt solid #111; padding-bottom: 8pt; margin-bottom: 14pt; }
  .pr-head img { height: 38pt; }
  .pr-head h1 { font: 200 26pt/1 'Antonio', var(--f-display); text-transform: uppercase; margin: 0; }
  .pr-item { display: grid; grid-template-columns: 46mm 1fr; gap: 8mm; padding: 10pt 0 14pt; border-bottom: 0.5pt solid #bbb; break-inside: avoid; }
  .pr-item img { width: 46mm; height: 60mm; object-fit: cover; }
  .pr-item h2 { font: 300 22pt/1 'Antonio', sans-serif; text-transform: uppercase; margin: 0 0 2pt; }
  .pr-item .f { color: #666; font-size: 8.5pt; text-transform: uppercase; letter-spacing: 0.1em; }
  .pr-item dl { display: grid; grid-template-columns: 26mm 1fr; margin: 8pt 0 0; }
  .pr-item dt, .pr-item dd { margin: 0; padding: 3pt 0; border-bottom: 0.3pt solid #ddd; font-size: 8.5pt; }
  .pr-item dt { color: #777; }
  .pr-foot { margin-top: 14pt; font-size: 8pt; color: #666; }
}
