/* ==========================================================================
   Keyhold: the key board. Black lacquer, stamped brass, bone engraving.
   Shared by the public site, admin panel and owner panel. No build step.
   ========================================================================== */

:root {
  --ink: #f5f1e7;
  --lacquer: #fffdf8;
  --lacquer-2: #efe9db;
  --lacquer-3: #e2d9c4;
  --rule: rgba(110, 82, 8, 0.16);
  --rule-strong: rgba(110, 82, 8, 0.32);
  --brass: #f2c230;
  --brass-hi: #ffd95a;
  --brass-deep: #b88a12;
  --brass-dark: #6e5208;
  --brass-text: #8a6400;
  --tag-ink: #221803;
  --bone: #1d1a12;
  --bone-dim: #4b4537;
  --muted: #655e4b;
  --red: #c8372d;
  --red-text: #b0281f;
  --ok: #d9c98a;

  --f-display: "Big Shoulders Display", "Archivo Narrow", sans-serif;
  --f-stamp: "Big Shoulders Stencil Display", "Big Shoulders Display", sans-serif;
  --f-text: "Archivo", system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-swing: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1360px;
  --shadow-1: 0 1px 3px rgba(60, 45, 10, 0.12), 0 14px 30px -14px rgba(60, 45, 10, 0.28);
  --shadow-tag: 0 3px 2px rgba(0, 0, 0, 0.45), 0 12px 18px -8px rgba(0, 0, 0, 0.75);

  --key-brass: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='.4'%3E%3Cstop offset='0' stop-color='%23ffe48a'/%3E%3Cstop offset='.5' stop-color='%23f2c230'/%3E%3Cstop offset='1' stop-color='%23c99a17'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url%28%23g%29' fill-rule='evenodd' stroke='%23a87c0e' stroke-width='2' stroke-linejoin='round' d='M34 2H66A30 30 0 0 1 96 32V48A30 30 0 0 1 66 78H62V84H68V92H58V98L67 103V108L58 113V118L66 122V128L58 132L64 137V142L58 146V150L48 158H38V92H32V84H38V78H34A30 30 0 0 1 4 48V32A30 30 0 0 1 34 2ZM43.5 15A6.5 6.5 0 1 0 56.5 15A6.5 6.5 0 1 0 43.5 15Z'/%3E%3Cpath fill='none' stroke='%23fff' stroke-opacity='.4' stroke-width='1.5' d='M34 7H66A25 25 0 0 1 91 32V48A25 25 0 0 1 66 73H34A25 25 0 0 1 9 48V32A25 25 0 0 1 34 7Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='.12' stroke-width='1.5' d='M38 94V156'/%3E%3C/svg%3E");
  --key-brass-hi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='.4'%3E%3Cstop offset='0' stop-color='%23fff0b8'/%3E%3Cstop offset='.5' stop-color='%23ffd95a'/%3E%3Cstop offset='1' stop-color='%23dcae2a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url%28%23g%29' fill-rule='evenodd' stroke='%23a87c0e' stroke-width='2' stroke-linejoin='round' d='M34 2H66A30 30 0 0 1 96 32V48A30 30 0 0 1 66 78H62V84H68V92H58V98L67 103V108L58 113V118L66 122V128L58 132L64 137V142L58 146V150L48 158H38V92H32V84H38V78H34A30 30 0 0 1 4 48V32A30 30 0 0 1 34 2ZM43.5 15A6.5 6.5 0 1 0 56.5 15A6.5 6.5 0 1 0 43.5 15Z'/%3E%3Cpath fill='none' stroke='%23fff' stroke-opacity='.4' stroke-width='1.5' d='M34 7H66A25 25 0 0 1 91 32V48A25 25 0 0 1 66 73H34A25 25 0 0 1 9 48V32A25 25 0 0 1 34 7Z'/%3E%3Cpath fill='none' stroke='%23000' stroke-opacity='.12' stroke-width='1.5' d='M38 94V156'/%3E%3C/svg%3E");
  --key-sold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpath fill='%231d1a12' fill-opacity='.03' fill-rule='evenodd' stroke='%231d1a12' stroke-opacity='.35' stroke-width='2' stroke-dasharray='5 4' stroke-linejoin='round' d='M34 2H66A30 30 0 0 1 96 32V48A30 30 0 0 1 66 78H62V84H68V92H58V98L67 103V108L58 113V118L66 122V128L58 132L64 137V142L58 146V150L48 158H38V92H32V84H38V78H34A30 30 0 0 1 4 48V32A30 30 0 0 1 34 2ZM43.5 15A6.5 6.5 0 1 0 56.5 15A6.5 6.5 0 1 0 43.5 15Z'/%3E%3C/svg%3E");
  --key-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpath fill='%23b88a12' fill-opacity='.12' fill-rule='evenodd' stroke='%238a6400' stroke-opacity='.45' stroke-width='2' stroke-linejoin='round' d='M34 2H66A30 30 0 0 1 96 32V48A30 30 0 0 1 66 78H62V84H68V92H58V98L67 103V108L58 113V118L66 122V128L58 132L64 137V142L58 146V150L48 158H38V92H32V84H38V78H34A30 30 0 0 1 4 48V32A30 30 0 0 1 34 2ZM43.5 15A6.5 6.5 0 1 0 56.5 15A6.5 6.5 0 1 0 43.5 15Z'/%3E%3C/svg%3E");

  --key-sold-sm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpath fill='%231d1a12' fill-opacity='.03' fill-rule='evenodd' stroke='%231d1a12' stroke-opacity='.5' stroke-width='9' stroke-dasharray='14 10' stroke-linejoin='round' d='M34 2H66A30 30 0 0 1 96 32V48A30 30 0 0 1 66 78H62V84H68V92H58V98L67 103V108L58 113V118L66 122V128L58 132L64 137V142L58 146V150L48 158H38V92H32V84H38V78H34A30 30 0 0 1 4 48V32A30 30 0 0 1 34 2ZM43.5 15A6.5 6.5 0 1 0 56.5 15A6.5 6.5 0 1 0 43.5 15Z'/%3E%3C/svg%3E");
  --key-out-sm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpath fill='%23b88a12' fill-opacity='.12' fill-rule='evenodd' stroke='%238a6400' stroke-opacity='.45' stroke-width='9' stroke-linejoin='round' d='M34 2H66A30 30 0 0 1 96 32V48A30 30 0 0 1 66 78H62V84H68V92H58V98L67 103V108L58 113V118L66 122V128L58 132L64 137V142L58 146V150L48 158H38V92H32V84H38V78H34A30 30 0 0 1 4 48V32A30 30 0 0 1 34 2ZM43.5 15A6.5 6.5 0 1 0 56.5 15A6.5 6.5 0 1 0 43.5 15Z'/%3E%3C/svg%3E");
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--brass-text);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--brass-text); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--brass-text); }
::selection { background: var(--brass); color: var(--tag-ink); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 3px; }
html { scrollbar-color: var(--brass-deep) var(--ink); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--brass-dark); border-radius: 10px; border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--brass-deep); }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 800; line-height: 0.95; margin: 0; text-wrap: balance; letter-spacing: 0.005em; }
p { margin: 0; text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.num { font-variant-numeric: tabular-nums lining-nums; }
.stamp { font-family: var(--f-stamp); font-weight: 800; letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.dim { color: var(--bone-dim); }
.brass { color: var(--brass-text); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--brass); color: var(--tag-ink); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: 12px; }
[data-lucide], .ico { width: 18px; height: 18px; stroke-width: 1.75; flex: none; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--brass); --fg: var(--tag-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px;
  border: 0; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font: 700 15px/1 var(--f-text); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  box-shadow: inset 0 -2px 0 var(--brass-deep), 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.25s var(--ease-out), background-color 0.2s, box-shadow 0.25s;
  position: relative; white-space: nowrap;
}
.btn:hover { background: var(--brass-hi); color: var(--fg); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 var(--brass-deep); }
.btn[disabled], .btn.is-loading { opacity: 0.55; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
.btn-ghost { --bg: transparent; --fg: var(--bone); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.btn-ghost:hover { --bg: rgba(242, 194, 48, 0.16); background: var(--bg); color: var(--bone); }
.btn-danger { --bg: var(--red); --fg: #fff; box-shadow: inset 0 -2px 0 #7f1d16; }
.btn-danger:hover { background: #dc4438; color: #fff; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; gap: 7px; }
.btn-xs { min-height: 30px; padding: 0 11px; font-size: 12.5px; gap: 6px; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 16.5px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brass-text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.btn-link.danger { color: var(--red-text); text-decoration-color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--bone-dim); letter-spacing: 0.01em; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--red-text); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--lacquer); color: var(--bone);
  border: 1px solid var(--lacquer-3); border-radius: var(--r-sm);
  font: 500 15px/1.4 var(--f-text);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.textarea { min-height: 110px; resize: vertical; }
input[type="file"].input { padding: 8px; color: var(--bone-dim); font-size: 14px; }
.input::file-selector-button { margin-right: 12px; height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--lacquer-3); color: var(--bone); font: 600 13px/1 var(--f-text); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.input::file-selector-button:hover { background: var(--brass); color: var(--tag-ink); }
.input::placeholder, .textarea::placeholder { color: #9a927d; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--rule-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brass-text); box-shadow: 0 0 0 3px rgba(242, 194, 48, 0.18); }
.input[aria-invalid="true"], .is-invalid { border-color: var(--red); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%238a6400' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; }
.check input { appearance: none; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--rule-strong); background: var(--ink); display: grid; place-items: center; margin: 0; cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.check input:checked { background: var(--brass); border-color: var(--brass-text); }
.check input:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1.5' fill='none' stroke='%23221803' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 12px 10px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--ink); box-shadow: inset 0 0 0 1px var(--lacquer-3); gap: 2px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--bone-dim); transition: background-color 0.2s, color 0.2s; }
.seg input:checked + label { background: var(--brass); color: var(--tag-ink); }
.seg input:focus-visible + label { outline: 2px solid var(--brass); outline-offset: 2px; }

/* ==========================================================================
   THE KEY: a cut brass key on a ring, hanging from a hook on the board.
   Silhouette lives in --key-* (SVG); text is stamped on the bow and blade.
   ========================================================================== */
.peg {
  --w: 74px;
  position: relative; display: flex; flex-direction: column; align-items: center;
  width: var(--w); padding-top: 4px; text-decoration: none; color: inherit;
  background: none; border: 0; font: inherit; cursor: pointer;
}
.peg::before { /* the hook screwed into the board */
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff4cf, #c4a85a 55%, #7d6524);
  box-shadow: 0 2px 2px rgba(60, 45, 10, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  position: relative; z-index: 2;
}
.peg .swing { transform-origin: 50% 0; display: flex; flex-direction: column; align-items: center; margin-top: -6px; will-change: transform; }
.peg .ring { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #c9a23a; border-left-color: #8d6f1d; border-bottom-color: #e7c35a; margin-bottom: calc(var(--w) * -0.15); position: relative; z-index: 1; }
.tag {
  width: var(--w); aspect-ratio: 100 / 160;
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: calc(var(--w) * 0.27) 6px 0;
  background: var(--key-brass) center / 100% 100% no-repeat;
  color: var(--tag-ink);
  filter: drop-shadow(0 2px 1.5px rgba(60, 45, 10, 0.35)) drop-shadow(0 8px 8px rgba(60, 45, 10, 0.18));
}
.tag .no { font-family: var(--f-stamp); font-weight: 800; font-size: calc(var(--w) * 0.3); line-height: 1; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45); letter-spacing: -0.01em; }
.tag .sub { margin-top: calc(var(--w) * 0.04); font-size: calc(var(--w) * 0.125); font-weight: 800; line-height: 1; white-space: nowrap; text-align: center; }
.tag .meta { /* stamped down the blade */
  position: absolute; top: 58.5%; left: 48%; transform: translateX(-50%) rotate(180deg); writing-mode: vertical-rl;
  font-size: calc(var(--w) * 0.095); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1;
  white-space: nowrap; opacity: 0.8; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Available keys sway; JS adds pointer-driven swing on top. */
.peg[data-status="available"] .swing { animation: idle-sway 5.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.37s); }
@keyframes idle-sway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
.peg[data-status="available"]:hover .tag, .peg[data-status="available"]:focus-visible .tag { background-image: var(--key-brass-hi); }
.peg:focus-visible { outline: none; }
.peg:focus-visible .tag { outline: 2px solid var(--bone); outline-offset: 4px; border-radius: 8px; }

/* On hold: a red tape wrapped across the collar. */
.peg[data-status="on_hold"] .tag::after {
  content: "HOLD"; position: absolute; left: -4px; right: -4px; top: 49%; transform: rotate(-12deg);
  background: repeating-linear-gradient(135deg, var(--red) 0 6px, #a72a21 6px 12px);
  color: #fff; font: 800 calc(var(--w) * 0.13) / 1.5 var(--f-display); letter-spacing: 0.18em; text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.peg[data-status="on_hold"] .ring { border-color: var(--red); border-left-color: #8e2219; }
.peg[data-status="on_hold"] .swing { transform: rotate(4deg); }

/* Sold and handed over: the key is gone; its outline stays on the board. */
.peg[data-status="sold"] .ring, .peg[data-status="handed_over"] .ring { visibility: hidden; }
.peg[data-status="sold"] .tag, .peg[data-status="handed_over"] .tag { background-image: var(--key-sold); color: #8a8371; filter: none; }
.peg[data-status="sold"] .tag .no, .peg[data-status="handed_over"] .tag .no { text-shadow: none; }
.peg[data-status="handed_over"] .tag { background-image: var(--key-out); color: #8a6f2a; }
.peg[data-status="sold"], .peg[data-status="handed_over"] { cursor: default; }

/* legend chips reuse the same vocabulary */
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--bone-dim); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 13px; height: 21px; display: inline-block; background: center / 100% 100% no-repeat; }
.legend .l-available { background-image: var(--key-brass); }
.legend .l-on_hold { background-image: linear-gradient(-12deg, transparent 42%, var(--red) 42% 58%, transparent 58%), var(--key-brass); }
.legend .l-sold { background-image: var(--key-sold-sm); }
.legend .l-handed_over { background-image: var(--key-out-sm); }

/* Status pills (panels, tables): same names, pattern + colour */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-available, .pill-upcoming, .pill-new { color: var(--brass-text); box-shadow: inset 0 0 0 1px rgba(138, 100, 0, 0.45); }
.pill-on_hold, .pill-overdue, .pill-cancelled { color: #fff; background: repeating-linear-gradient(135deg, #c8372d 0 5px, #b02c23 5px 10px); }
.pill-sold, .pill-active, .pill-partial, .pill-due, .pill-contacted, .pill-current, .pill-construction, .pill-selling { color: var(--tag-ink); background: var(--brass); }
.pill-handed_over, .pill-paid, .pill-completed, .pill-done, .pill-closed { color: var(--bone-dim); background: var(--lacquer-3); }
.pill-partial { background: linear-gradient(90deg, var(--brass) 55%, var(--brass-deep) 55%); }
.pill-due { background: var(--brass-hi); }

/* ==========================================================================
   SITE CHROME: wordmark bar + key-ring button + full-screen cabinet nav
   ========================================================================== */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  transition: background-color 0.35s, box-shadow 0.35s;
}
.bar.is-scrolled { background: rgba(245, 241, 231, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--rule); }
.wordmark { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--bone); }
.wordmark svg { width: 34px; height: 34px; }
.wordmark b { font: 800 23px/1 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; }
.wordmark small { display: block; font: 600 10.5px/1 var(--f-text); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.bar-right { display: flex; align-items: center; gap: 10px; }
.bar-link { font-size: 14px; font-weight: 600; text-decoration: none; padding: 10px 14px; border-radius: 999px; color: var(--bone-dim); transition: color 0.2s, background-color 0.2s; }
.bar-link:hover { color: var(--brass-text); background: rgba(242, 194, 48, 0.07); }
@media (max-width: 760px) { .bar-link.hide-sm { display: none; } .wordmark small { display: none; } }

.keyring {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  height: 46px; padding: 0 6px 0 20px; border-radius: 999px; border: 0;
  background: var(--lacquer-2); color: var(--bone); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  font: 700 13px/1 var(--f-text); letter-spacing: 0.14em; text-transform: uppercase;
  transition: background-color 0.25s, box-shadow 0.25s;
}
.keyring:hover { background: var(--lacquer-3); box-shadow: inset 0 0 0 1px var(--brass); }
.keyring > span { margin-right: -0.14em; padding-top: 1px; } /* cancel trailing letter-spacing so the word centres */
.keyring .ring-svg { width: 34px; height: 34px; padding: 5px; box-sizing: border-box; flex: none; overflow: visible; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); transition: background-color 0.25s; }
.keyring:hover .ring-svg { background: var(--lacquer); }
.keyring .ring-svg .k { transform-box: view-box; transform-origin: 19px 12px; transition: transform 0.6s var(--ease-swing); }
.keyring:hover .k1 { transform: rotate(-16deg); }
.keyring:hover .k2 { transform: rotate(9deg); }
.keyring:hover .k3 { transform: rotate(24deg); }
.keyring[aria-expanded="true"] .k1 { transform: rotate(-40deg); }
.keyring[aria-expanded="true"] .k3 { transform: rotate(40deg); }

.cabinet {
  position: fixed; inset: 0; z-index: 80; visibility: hidden; pointer-events: none;
  perspective: 1800px;
}
.cabinet.is-open { visibility: visible; pointer-events: auto; }
.cabinet .door {
  position: absolute; top: 0; bottom: 0; width: 50.5%; background:
    repeating-linear-gradient(90deg, rgba(110, 82, 8, 0.025) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #faf6ec, #f1ead9);
  box-shadow: inset 0 0 0 1px var(--rule);
  transition: transform 0.75s var(--ease-out);
}
.cabinet .door-l { left: 0; transform-origin: left center; transform: rotateY(96deg); }
.cabinet .door-r { right: 0; transform-origin: right center; transform: rotateY(-96deg); }
.cabinet.is-open .door-l, .cabinet.is-open .door-r { transform: rotateY(0); }
.cabinet .door::after { /* brass hairline inset panel */
  content: ""; position: absolute; inset: 18px; border: 1px solid var(--rule); border-radius: 4px;
}
.cabinet-inner {
  position: relative; z-index: 2; height: 100%; overflow-y: auto; opacity: 0;
  transition: opacity 0.3s 0.35s;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr); gap: clamp(24px, 4vw, 70px);
  padding: 96px var(--gutter) 40px; max-width: var(--maxw); margin: 0 auto;
}
.cabinet.is-open .cabinet-inner { opacity: 1; }
.cabinet-close { position: absolute; top: 14px; right: var(--gutter); z-index: 3; }
.cabinet h2.plate { font: 700 13px/1 var(--f-text); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px; display: flex; align-items: center; gap: 14px; }
.cabinet h2.plate::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.cab-tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 36px 26px; }
.cab-tag { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--tag-ink); }
.cab-tag .swing { transform-origin: 50% 0; display: flex; flex-direction: column; align-items: center; transition: transform 0.7s var(--ease-swing); }
.cab-tag:nth-child(odd) .swing { transform: rotate(-3deg); }
.cab-tag:nth-child(even) .swing { transform: rotate(2.5deg); }
.cab-tag:hover .swing, .cab-tag:focus-visible .swing { transform: rotate(0deg) translateY(6px); }
.cab-tag .peghead { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d8cdb2, #8d8268 65%); box-shadow: 0 2px 3px rgba(60, 45, 10, 0.4); }
.cab-tag .ring { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #c9a23a; border-left-color: #8d6f1d; margin: -7px 0 -10px; }
.cab-tag .big {
  width: 100%; max-width: 210px; padding: 52px 18px 20px; text-align: center;
  border-radius: 48% 48% 16px 16px / 22% 22% 16px 16px; position: relative;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 34%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.15)), var(--brass);
  box-shadow: var(--shadow-tag), inset 0 0 0 2px var(--brass-deep);
  transition: background-color 0.2s;
}
.cab-tag:hover .big { background-color: var(--brass-hi); }
.cab-tag .big::before { content: ""; position: absolute; top: 14px; left: 50%; width: 22px; height: 22px; transform: translateX(-50%); border-radius: 50%; background: #f1ead9; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.4); }
.cab-tag .code { font: 800 46px/0.9 var(--f-stamp); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); }
.cab-tag .nm { font: 800 21px/1.05 var(--f-display); text-transform: uppercase; margin-top: 8px; letter-spacing: 0.02em; }
.cab-tag .ct { font-size: 12.5px; font-weight: 700; margin-top: 10px; opacity: 0.85; }
.cab-links { display: grid; align-content: start; gap: 4px; }
.cab-links a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font: 800 clamp(30px, 4vw, 46px)/1 var(--f-display); text-transform: uppercase; color: var(--bone); transition: color 0.2s, transform 0.35s var(--ease-out); }
.cab-links a small { font: 600 12px/1 var(--f-text); letter-spacing: 0.16em; color: var(--muted); }
.cab-links a:hover, .cab-links a[aria-current="page"] { color: var(--brass-text); transform: translateX(10px); }
.cab-contact { margin-top: 26px; font-size: 14px; color: var(--bone-dim); display: grid; gap: 6px; }
@media (max-width: 860px) {
  .cabinet-inner { grid-template-columns: 1fr; padding-top: 84px; }
  .cab-links { order: -1; }
  .cab-tags { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .cab-tag .big { padding: 44px 10px 16px; }
  .cab-tag .code { font-size: 36px; }
  .cab-tag .nm { font-size: 17px; }
}

/* ==========================================================================
   PUBLIC PAGES
   ========================================================================== */
.section { padding-block: clamp(72px, 10vw, 140px); position: relative; }
.section-tight { padding-block: clamp(48px, 6vw, 80px); }
.h-display { font-size: clamp(54px, 8.4vw, 96px); text-transform: uppercase; letter-spacing: 0.005em; }
.h-1 { font-size: clamp(42px, 6vw, 76px); text-transform: uppercase; }
.h-2 { font-size: clamp(32px, 4.2vw, 54px); text-transform: uppercase; }
.h-3 { font-size: clamp(22px, 2.2vw, 28px); text-transform: uppercase; letter-spacing: 0.02em; }
.lede { font-size: clamp(17px, 1.4vw, 20px); color: var(--bone-dim); max-width: 46ch; line-height: 1.55; }
.copy { max-width: 66ch; color: var(--bone-dim); }
.copy p + p { margin-top: 1em; }
.rule-top { border-top: 1px solid var(--rule); }

/* engraved lintel: headline set into a brass-edged plate */
.lintel { position: relative; padding: 22px 0 26px; }
.lintel::before, .lintel::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--brass-deep), rgba(184, 138, 18, 0.1)); }
.lintel::before { top: 0; }
.lintel::after { bottom: 0; }
.lintel .h-display .hl { color: var(--brass-text); }

/* HERO */
.hero { min-height: 100svh; padding-top: 110px; padding-bottom: 48px; display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 26px; align-content: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-count { display: flex; gap: 28px; flex-wrap: wrap; padding-top: 6px; }
.hero-count div { display: grid; gap: 2px; }
.hero-count b { font: 800 40px/1 var(--f-stamp); color: var(--brass-text); }
.hero-count span { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } .hero { min-height: auto; } }

/* the cabinet with doors */
.board-cab { position: relative; perspective: 2000px; }
.board {
  position: relative; border-radius: 10px; padding: 20px clamp(14px, 2vw, 26px) 22px;
  background:
    repeating-linear-gradient(90deg, rgba(110, 82, 8, 0.03) 0 1px, transparent 1px 7px),
    radial-gradient(120% 80% at 50% 0%, #fbf7ee 0%, #f1e9d7 60%, #e8dec8 100%);
  box-shadow: var(--shadow-1), inset 0 0 0 1px rgba(110, 82, 8, 0.25), inset 0 0 0 7px #f3ecdc, inset 0 0 0 8px rgba(110, 82, 8, 0.14);
}
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 4px 8px 16px; border-bottom: 1px solid var(--rule); margin-bottom: 14px; }
.plate-brass {
  display: inline-flex; align-items: center; gap: 12px; padding: 7px 14px 7px 10px; border-radius: 4px;
  background: linear-gradient(180deg, #f6cf4a, #d9a91f); color: var(--tag-ink);
  box-shadow: inset 0 0 0 1px var(--brass-deep), 0 2px 4px rgba(60, 45, 10, 0.25);
  font: 800 15px/1 var(--f-display); letter-spacing: 0.12em; text-transform: uppercase;
}
.plate-brass .screw { width: 6px; height: 6px; border-radius: 50%; background: #7a5d10; box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.5); }
.board-left { font-size: 13px; color: var(--bone-dim); }
.board-left b { color: var(--brass-text); font: 800 22px/1 var(--f-stamp); margin-right: 4px; }
.pegs { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cell, 66px), 1fr)); gap: 18px 8px; justify-items: center; padding: 6px 4px 4px; }
.board-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 14px 8px 0; border-top: 1px solid var(--rule); }
.board-cab .leaf {
  position: absolute; top: 0; bottom: 0; width: 50%; z-index: 5; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(110, 82, 8, 0.03) 0 2px, transparent 2px 10px), linear-gradient(180deg, #f7f1e3, #ebe2cd);
  box-shadow: inset 0 0 0 1px rgba(110, 82, 8, 0.3), inset 0 0 0 10px #f1e9d7, inset 0 0 0 11px rgba(110, 82, 8, 0.16);
  backface-visibility: hidden;
}
.board-cab .leaf-l { left: 0; border-radius: 10px 0 0 10px; transform-origin: left center; }
.board-cab .leaf-r { right: 0; border-radius: 0 10px 10px 0; transform-origin: right center; }
.board-cab .leaf::after { content: ""; position: absolute; top: 50%; width: 8px; height: 64px; margin-top: -32px; border-radius: 4px; background: linear-gradient(90deg, #8d6f1d, #f2c230, #b88a12); box-shadow: 0 2px 4px rgba(60, 45, 10, 0.35); }
.board-cab .leaf-l::after { right: 18px; }
.board-cab .leaf-r::after { left: 18px; }
.board-cab.is-open .leaf-l { animation: leaf-l 1.5s var(--ease-out) 0.25s both; }
.board-cab.is-open .leaf-r { animation: leaf-r 1.5s var(--ease-out) 0.32s both; }
@keyframes leaf-l { to { transform: rotateY(-104deg); opacity: 0; visibility: hidden; } }
@keyframes leaf-r { to { transform: rotateY(104deg); opacity: 0; visibility: hidden; } }
.board-cab.is-open .peg { animation: tag-drop 0.9s var(--ease-swing) both; animation-delay: calc(0.75s + var(--i, 0) * 0.025s); }
@keyframes tag-drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* community rows: one engraved drawer per project */
.drawers { display: grid; gap: 18px; }
.drawer {
  display: grid; grid-template-columns: minmax(220px, 0.9fr) minmax(0, 2fr) auto; gap: clamp(18px, 3vw, 44px); align-items: center;
  padding: 26px clamp(18px, 2.4vw, 32px); border-radius: 10px; position: relative; text-decoration: none; color: inherit;
  background: var(--lacquer); box-shadow: inset 0 0 0 1px var(--rule);
  transition: box-shadow 0.3s, transform 0.5s var(--ease-out);
}
.drawer:hover { box-shadow: inset 0 0 0 1px var(--brass-deep), var(--shadow-1); transform: translateY(-2px); color: inherit; }
.drawer .who { display: grid; gap: 8px; }
.drawer .who .code { font: 800 15px/1 var(--f-stamp); letter-spacing: 0.1em; color: var(--brass-text); }
.drawer .who h3 { font-size: clamp(28px, 3vw, 38px); text-transform: uppercase; }
.drawer .who p { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.strip { display: flex; flex-wrap: wrap; gap: 6px 5px; }
.strip i { width: 14px; height: 22px; display: block; background: center / 100% 100% no-repeat; }
.strip .s-available { background-image: var(--key-brass); }
.strip .s-on_hold { background-image: linear-gradient(-12deg, transparent 42%, var(--red) 42% 58%, transparent 58%), var(--key-brass); }
.strip .s-sold { background-image: var(--key-sold-sm); }
.strip .s-handed_over { background-image: var(--key-out-sm); }
.strip-wrap { display: grid; gap: 12px; }
.strip-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13.5px; color: var(--bone-dim); }
.strip-facts b { color: var(--bone); font-weight: 700; }
.drawer .go { display: grid; justify-items: end; gap: 6px; text-align: right; }
.drawer .go .left { font: 800 48px/0.9 var(--f-stamp); color: var(--brass-text); }
.drawer .go small { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.drawer .arrow { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--rule-strong); margin-top: 6px; transition: background-color 0.25s, transform 0.4s var(--ease-out); }
.drawer:hover .arrow { background: var(--brass); color: var(--tag-ink); transform: translateX(4px); }
@media (max-width: 980px) { .drawer { grid-template-columns: 1fr; } .drawer .go { grid-auto-flow: column; justify-content: space-between; align-items: center; justify-items: start; text-align: left; } }

/* payment journey: a passbook strip */
.journey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
@media (max-width: 980px) { .journey { grid-template-columns: 1fr; } }
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 54px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--rule); counter-increment: s; }
.steps li::before { content: counter(s); font: 800 40px/0.9 var(--f-stamp); color: var(--brass-text); }
.steps h3 { font-size: 22px; text-transform: uppercase; margin-bottom: 6px; letter-spacing: 0.02em; }
.steps p { color: var(--bone-dim); font-size: 15px; }

.calc { background: #fffdf8; color: #1d1a12; border-radius: 6px; padding: clamp(20px, 3vw, 34px); position: relative; box-shadow: var(--shadow-1); }
.calc::before { /* perforation down the left edge of a passbook page */
  content: ""; position: absolute; left: 10px; top: 14px; bottom: 14px; width: 6px;
  background: radial-gradient(circle, rgba(29, 26, 18, 0.32) 2px, transparent 2.5px) 0 0 / 6px 14px repeat-y;
}
.calc h3 { font-size: 30px; text-transform: uppercase; color: #1d1a12; }
.calc .sub { font-size: 13.5px; color: #5d5747; margin-top: 6px; }
.calc .seg { background: #e8e1cf; box-shadow: none; margin-top: 18px; }
.calc .seg label { color: #3f3a2e; }
.calc .seg input:checked + label { background: #1d1a12; color: var(--brass); }
.calc .range { margin-top: 18px; display: grid; gap: 8px; }
.calc .range label { font-size: 13px; font-weight: 700; color: #4b4537; display: flex; justify-content: space-between; }
.calc input[type="range"] { width: 100%; accent-color: #1d1a12; }
.calc .out { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid #1d1a12; border-bottom: 1.5px solid #1d1a12; }
.calc .out div { padding: 14px 10px 14px 0; display: grid; gap: 4px; }
.calc .out div + div { padding-left: 14px; border-left: 1px solid rgba(29, 26, 18, 0.2); }
.calc .out span { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #6a634f; }
.calc .out b { font: 800 clamp(24px, 2.6vw, 34px)/1 var(--f-stamp); color: #1d1a12; }
.ledger { margin-top: 18px; font-size: 13.5px; width: 100%; border-collapse: collapse; }
.ledger th { text-align: left; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #6a634f; font-weight: 700; padding: 6px 0; border-bottom: 1px solid rgba(29, 26, 18, 0.25); }
.ledger td { padding: 8px 0; border-bottom: 1px dotted rgba(29, 26, 18, 0.25); }
.ledger td:last-child, .ledger th:last-child { text-align: right; }
.ledger .stamped { position: relative; }
.ledger .stamped::after { content: "PAID"; position: absolute; right: 90px; top: 50%; transform: translateY(-50%) rotate(-8deg); font: 800 13px/1 var(--f-stamp); letter-spacing: 0.14em; color: #b0281f; border: 1.5px solid #b0281f; padding: 2px 6px; border-radius: 3px; opacity: 0.8; }
.calc .note { font-size: 12px; color: #6a634f; margin-top: 14px; }
@media (max-width: 520px) { .calc .out { grid-template-columns: 1fr; } .calc .out div + div { border-left: 0; padding-left: 0; border-top: 1px solid rgba(29, 26, 18, 0.2); } .ledger .stamped::after { right: 70px; } }

/* numbered build sequence */
.build { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; counter-reset: b; }
.build li { position: relative; padding: 52px 16px 18px 0; counter-increment: b; }
.build li::before { content: counter(b); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 800 18px/1 var(--f-stamp); background: var(--lacquer-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--lacquer-3); z-index: 1; }
.build li::after { content: ""; position: absolute; top: 19px; left: 38px; right: 0; height: 2px; background: var(--lacquer-3); }
.build li.done::before { background: var(--brass); color: var(--tag-ink); box-shadow: none; }
.build li.done::after { background: var(--brass-deep); }
.build li.current::before { background: var(--ink); color: var(--brass-text); box-shadow: inset 0 0 0 2px var(--brass), 0 0 0 6px rgba(242, 194, 48, 0.12); animation: pulse-ring 2.4s ease-out infinite; }
@keyframes pulse-ring { 0% { box-shadow: inset 0 0 0 2px var(--brass), 0 0 0 0 rgba(242, 194, 48, 0.4); } 100% { box-shadow: inset 0 0 0 2px var(--brass), 0 0 0 14px rgba(242, 194, 48, 0); } }
.build li:last-child::after { display: none; }
.build h4 { font: 700 15.5px/1.25 var(--f-text); color: var(--bone); }
.build li:not(.done):not(.current) h4 { color: var(--muted); }
.build small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
@media (max-width: 760px) {
  .build { grid-template-columns: 1fr; }
  .build li { padding: 6px 0 22px 56px; }
  .build li::after { top: 38px; bottom: 0; left: 18px; right: auto; width: 2px; height: auto; }
}

/* owner panel teaser */
.teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
@media (max-width: 980px) { .teaser { grid-template-columns: 1fr; } }
.mock { border-radius: 12px; background: var(--lacquer); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--rule); overflow: hidden; }
.mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--rule); align-items: center; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--lacquer-3); }
.mock-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); }
.mock-body { padding: 22px; display: grid; gap: 18px; }
.meter { height: 12px; border-radius: 999px; background: var(--lacquer-3); overflow: hidden; position: relative; }
.meter > span { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, var(--brass) 0 10px, #e2b123 10px 20px); border-radius: inherit; clip-path: inset(0 100% 0 0 round 999px); transition: clip-path 1.4s var(--ease-out); }
.synthetic { font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }

/* contact close */
.close-band { background: var(--brass); color: var(--tag-ink); position: relative; overflow: hidden; }
.close-band::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.035) 0 1px, transparent 1px 8px); pointer-events: none; }
.close-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; position: relative; }
@media (max-width: 900px) { .close-grid { grid-template-columns: 1fr; } }
.close-band .h-1 { color: var(--tag-ink); }
.close-band .lede { color: #3e300a; }
.close-band .form-card { background: var(--lacquer); color: var(--bone); border-radius: 12px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 30px 60px -30px rgba(60, 45, 10, 0.45); }
.close-band .contact-lines { margin-top: 28px; display: grid; gap: 12px; font-weight: 600; }
.close-band .contact-lines a, .close-band .contact-lines div { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--tag-ink); }
.close-band .contact-lines a:hover { text-decoration: underline; }

.foot { position: relative; padding: 0 0 26px; background: var(--lacquer-2); border-top: 1px solid var(--rule); font-size: 14px; color: var(--bone-dim); }
.foot-rail { /* a row of hooks screwed along the top edge, like the board */
  height: 22px; margin-bottom: clamp(36px, 5vw, 60px);
  background: radial-gradient(circle at 50% 50%, #fff4cf 0 1.5px, #c4a85a 2.5px, #7d6524 4.5px, transparent 5px) center 0 / 46px 22px repeat-x;
  border-bottom: 1px solid var(--rule);
}
.foot-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.foot-brand { display: grid; gap: 16px; align-content: start; }
.foot-brand p { max-width: 34ch; font-size: 15.5px; }
.foot-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.foot-h { font: 700 12px/1 var(--f-text); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: clamp(36px, 5vw, 56px); padding-top: 30px; border-top: 1px solid var(--rule); }
.foot-cols nav { display: grid; gap: 10px; align-content: start; }
.foot-cols nav .foot-h { margin-bottom: 4px; }
.foot a { text-decoration: none; color: var(--bone-dim); }
.foot a:hover { color: var(--brass-text); }
.foot-line { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; }
.foot-line [data-lucide] { width: 16px; height: 16px; margin-top: 2px; color: var(--brass-text); }
.foot-base { display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.foot-base .synthetic { flex: 1; }
.foot-top-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.foot-top-link [data-lucide] { width: 15px; height: 15px; }
@media (max-width: 900px) { .foot-top { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .foot-cols { grid-template-columns: 1fr; gap: 22px; } .foot-base { flex-direction: column; align-items: flex-start; } }
.foot-contact { display: grid; align-content: start; }
.foot-contact a.foot-line { width: fit-content; }

/* social icon row (footer, contact page) */
.socials { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--bone); background: var(--lacquer); box-shadow: inset 0 0 0 1px var(--rule-strong); transition: background-color 0.2s, color 0.2s, transform 0.3s var(--ease-out); }
.socials a:hover { background: var(--brass); color: var(--tag-ink); transform: translateY(-2px); }
.soc-ico { width: 18px; height: 18px; flex: none; }

/* legal pages */
.legal-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.legal-nav { position: sticky; top: 96px; display: grid; gap: 2px; border-left: 1px solid var(--rule); }
.legal-nav a { padding: 9px 0 9px 16px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--bone-dim); font-weight: 600; font-size: 14.5px; }
.legal-nav a:hover { color: var(--brass-text); }
.legal-nav a[aria-current="page"] { color: var(--bone); border-left-color: var(--brass); }
.prose { max-width: 70ch; color: var(--bone-dim); font-size: 16.5px; line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(24px, 2.4vw, 30px); text-transform: uppercase; letter-spacing: 0.02em; color: var(--bone); margin-top: 1.9em; }
.prose h3 { font: 700 18px/1.3 var(--f-text); color: var(--bone); margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--brass-deep); }
.prose strong, .prose b { color: var(--bone); }
.prose a { color: var(--brass-text); }
.legal-reg { padding: 14px 16px; border-radius: 8px; background: var(--lacquer-2); box-shadow: inset 0 0 0 1px var(--rule); }
@media (max-width: 800px) { .legal-grid { grid-template-columns: 1fr; } .legal-nav { position: static; display: flex; flex-wrap: wrap; gap: 8px; border: 0; } .legal-nav a { padding: 8px 14px; margin: 0; border: 0; border-radius: 999px; background: var(--lacquer-2); } .legal-nav a[aria-current="page"] { background: var(--brass); color: var(--tag-ink); } }

/* page header for inner pages */
.page-head { padding-top: 128px; padding-bottom: 36px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 22px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; color: var(--bone-dim); }
.crumbs a:hover { color: var(--brass-text); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 28px; }
.chip { height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--lacquer-2); color: var(--bone-dim); box-shadow: inset 0 0 0 1px var(--lacquer-3); font: 600 13.5px/1 var(--f-text); cursor: pointer; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; }
.chip:hover { color: var(--brass-text); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.chip[aria-pressed="true"] { background: var(--brass); color: var(--tag-ink); box-shadow: none; }

/* project page */
.p-hero { padding-top: 118px; padding-bottom: 20px; }
.p-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); align-items: end; }
@media (max-width: 900px) { .p-hero-grid { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 3px; }
.facts div:nth-child(odd) { padding-right: 16px; }
.facts div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
.facts span { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.facts b { font: 800 26px/1.05 var(--f-display); text-transform: uppercase; }
.elev { width: 100%; height: auto; margin-top: 8px; }
.board-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.pegs.big { --cell: 84px; gap: 26px 10px; }
.pegs.big .peg { --w: 80px; }
.peg.is-dim { opacity: 0.18; filter: grayscale(1); transition: opacity 0.3s; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.plan { padding: 26px 24px; border-radius: 10px; background: var(--lacquer); box-shadow: inset 0 0 0 1px var(--rule); display: grid; gap: 14px; align-content: start; }
.plan h3 { font-size: 26px; text-transform: uppercase; }
.plan .big { font: 800 44px/1 var(--f-stamp); color: var(--brass-text); }
.plan .big small { font: 600 14px/1 var(--f-text); color: var(--muted); margin-left: 4px; }
.plan dl { margin: 0; display: grid; gap: 7px; font-size: 14px; }
.plan dl div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted var(--lacquer-3); padding-bottom: 7px; }
.plan dt { color: var(--muted); }
.plan dd { margin: 0; font-weight: 700; }
.amen { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; }
.amen li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-weight: 500; }
.amen li [data-lucide] { color: var(--brass-text); }
.updates { display: grid; gap: 0; }
.update { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid var(--rule); }
.update time { font-size: 13px; color: var(--muted); font-weight: 600; }
.update h4 { font: 700 17px/1.3 var(--f-text); margin-bottom: 4px; }
.update p { color: var(--bone-dim); font-size: 15px; }
@media (max-width: 600px) { .update { grid-template-columns: 1fr; gap: 6px; } }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.map-frame { width: 100%; height: 320px; border: 0; border-radius: 10px; filter: grayscale(1) sepia(0.15) contrast(0.95); }

/* ==========================================================================
   MODAL + CONFIRM + TOAST (never native alert/confirm)
   ========================================================================== */
dialog.modal {
  max-width: calc(100vw - 24px); margin: auto;
  border: 0; padding: 0; background: transparent; color: var(--bone);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: visible;
}
dialog.modal.wide { width: min(820px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(40, 32, 14, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog.modal[open] { animation: modal-in 0.45s var(--ease-out); }
dialog.modal[open]::backdrop { animation: fade-in 0.3s ease; }
dialog.modal.is-closing { animation: modal-out 0.22s ease-in forwards; }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
.modal-card { min-width: 0; overflow-wrap: anywhere; background: var(--lacquer); border-radius: 14px; box-shadow: 0 40px 80px -30px rgba(40, 30, 8, 0.45), inset 0 0 0 1px var(--rule-strong); max-height: calc(100dvh - 24px); overflow-y: auto; position: relative; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.modal-head h2 { font-size: 30px; text-transform: uppercase; }
.modal-head p { color: var(--bone-dim); font-size: 14.5px; margin-top: 6px; }
.modal-body { padding: 20px 24px 24px; display: grid; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 24px; flex-wrap: wrap; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--lacquer-2); color: var(--bone); display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: inset 0 0 0 1px var(--lacquer-3); transition: background-color 0.2s, color 0.2s; }
.x:hover { background: var(--brass); color: var(--tag-ink); }
.confirm-tag { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(242, 194, 48, 0.22); color: var(--brass-text); margin-bottom: 4px; }
.confirm-tag.danger { background: rgba(200, 55, 45, 0.16); color: var(--red-text); }
.confirm-tag [data-lucide] { width: 26px; height: 26px; }

/* tag modal (unit detail) */
.unit-sheet { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 26px 24px 8px; }
.unit-sheet .peg { --w: 128px; width: 128px; cursor: default; }
.unit-sheet .peg .swing { animation: lift 0.9s var(--ease-swing) both; }
@keyframes lift { from { transform: translateY(40px) rotate(-14deg); opacity: 0; } }
@media (max-width: 560px) { .unit-sheet { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } .unit-sheet .facts { text-align: left; width: 100%; } }
.quotes { display: grid; gap: 8px; }
.quote { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 8px; background: var(--ink); box-shadow: inset 0 0 0 1px var(--lacquer-3); font-size: 14px; }
.quote b { font: 800 22px/1 var(--f-stamp); color: var(--brass-text); white-space: nowrap; flex: none; }
.quote > div { min-width: 0; }
.quote small { color: var(--muted); display: block; font-size: 12.5px; margin-top: 2px; }

.toasts { position: fixed; z-index: 120; right: 16px; bottom: 16px; display: grid; gap: 10px; width: min(400px, calc(100vw - 32px)); }
.toast {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
  padding: 14px 14px 14px 16px; border-radius: 10px; background: #fffdf8; color: #1d1a12;
  box-shadow: inset 0 0 0 1px var(--rule-strong), 0 20px 40px -18px rgba(40, 30, 8, 0.45); font-size: 14.5px; font-weight: 500;
  animation: toast-in 0.5s var(--ease-out);
}
.toast.err { background: #fdeeeb; color: #5e140e; box-shadow: inset 0 0 0 1px var(--red), 0 20px 40px -18px rgba(40, 30, 8, 0.45); }
.toast .ti { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: var(--tag-ink); }
.toast.err .ti { background: var(--red); color: #fff; }
.toast .ti [data-lucide] { width: 16px; height: 16px; }
.toast button { background: none; border: 0; color: inherit; cursor: pointer; opacity: 0.6; padding: 2px; }
.toast.is-leaving { animation: toast-out 0.3s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) rotate(-2deg); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* scroll reveal: content is visible by default; JS opts in */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* auth */
.auth { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(120% 80% at 30% 20%, #fbf7ee, #ebe2cd 70%); display: flex; flex-direction: column; justify-content: space-between; padding: 36px clamp(24px, 4vw, 56px); border-right: 1px solid var(--rule); }
.auth-art .pegs { max-width: 520px; --cell: 64px; }
.auth-form { display: grid; place-items: center; padding: 40px var(--gutter); }
.auth-form .inner { width: min(420px, 100%); display: grid; gap: 22px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* receipt (print friendly) */
.receipt-page { background: #e9e4d6; min-height: 100vh; padding: 32px 16px; color: #1d1a12; }
.receipt { max-width: 760px; margin: 0 auto; background: #fbf8ef; border-radius: 6px; padding: clamp(22px, 4vw, 48px); box-shadow: 0 20px 50px -25px rgba(0, 0, 0, 0.45); position: relative; }
.receipt h1 { font-size: 44px; text-transform: uppercase; color: #1d1a12; }
.receipt table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 18px; }
.receipt th, .receipt td { text-align: left; padding: 9px 0; border-bottom: 1px solid rgba(29, 26, 18, 0.15); }
.receipt td:last-child, .receipt th:last-child { text-align: right; }
.receipt .big { font: 800 52px/1 var(--f-stamp); }
.receipt .stampmark { position: absolute; right: 40px; top: 120px; transform: rotate(-12deg); font: 800 30px/1 var(--f-stamp); letter-spacing: 0.14em; color: #b0281f; border: 3px solid #b0281f; padding: 6px 14px; border-radius: 6px; opacity: 0.75; }
.receipt-actions { max-width: 760px; margin: 0 auto 16px; display: flex; justify-content: space-between; gap: 10px; }
.receipt-actions a, .receipt-actions button { color: #1d1a12; }
@media print { .receipt-actions { display: none; } .receipt-page { background: #fff; padding: 0; } .receipt { box-shadow: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   CINEMATIC HERO: full-bleed community film + switcher for every community
   ========================================================================== */
.cine { position: relative; min-height: 100svh; display: flex; color: #fbf7ec; background: #0d0b07; overflow: hidden; isolation: isolate; }
.cine-media { position: absolute; inset: 0; z-index: -2; }
.cine-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; background: radial-gradient(120% 90% at 70% 40%, #4a3510 0%, #0d0b07 70%); }
.cine-slide.is-on { opacity: 1; }
.cine-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cine-slide.is-on img { animation: cine-kb 22s ease-in-out infinite alternate; }
@keyframes cine-kb { from { transform: scale(1.03); } to { transform: scale(1.12) translate(-1.5%, -1%); } }

/* A muted background player (hero, card preview, project banner). Covers its box like object-fit: cover. */
.bg-vid { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; container-type: size; }
.bg-vid.is-ready { opacity: 1; }
.bg-vid iframe { position: absolute; top: 50%; left: 50%; border: 0; width: max(100cqw, 177.78cqh); height: max(56.25cqw, 100cqh); transform: translate(-50%, -50%) scale(1.18); }
.bg-vid video { width: 100%; height: 100%; object-fit: cover; display: block; }

.cine-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  linear-gradient(90deg, rgba(10, 8, 5, 0.86) 0%, rgba(10, 8, 5, 0.5) 40%, rgba(10, 8, 5, 0) 72%),
  linear-gradient(0deg, rgba(10, 8, 5, 0.94) 0%, rgba(10, 8, 5, 0.15) 46%, rgba(10, 8, 5, 0.5) 100%); }
.cine-body { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding-top: 150px; padding-bottom: 36px; }
.cine-panels { display: grid; }
.cine-copy { grid-area: 1 / 1; max-width: 700px; display: grid; gap: 22px; align-content: start; }
.cine-copy[hidden] { display: none; }
.cine-copy.is-on { animation: cine-in 0.9s var(--ease-out) both; }
@keyframes cine-in { from { opacity: 0; transform: translateY(18px); } }
.cine-eyebrow { font: 700 13px/1.3 var(--f-text); letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); }
.cine-name { font-size: clamp(54px, 8.4vw, 124px); line-height: 0.86; font-weight: 900; text-transform: uppercase; color: #fbf7ec; }
.cine-lede { font-size: clamp(16px, 1.4vw, 19px); color: #e9e2cf; max-width: 540px; }
.cine-lede b { color: var(--brass); }
.cine .btn-lg { box-shadow: inset 0 -2px 0 var(--brass-deep), 0 10px 30px -10px rgba(242, 194, 48, 0.55); }
.cine-play, .p-film-play {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 24px 0 7px;
  border: 0; border-radius: 999px; background: rgba(251, 247, 236, 0.14); color: #fbf7ec;
  font: 600 16px/1 var(--f-text); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color 0.25s;
}
.cine-play:hover, .p-film-play:hover { background: rgba(251, 247, 236, 0.24); color: #fbf7ec; }
.cine-play .disc, .p-film-play .disc { width: 42px; height: 42px; border-radius: 50%; background: #fbf7ec; color: var(--tag-ink); display: grid; place-items: center; transition: transform 0.4s var(--ease-swing); }
.cine-play:hover .disc, .p-film-play:hover .disc { transform: scale(1.1); }
.cine-play .disc svg, .p-film-play .disc svg { width: 17px; height: 17px; fill: currentColor; margin-left: 2px; }

.cine-rail { display: grid; gap: 14px; }
.cine-rail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #cfc6ae; }
.cine-rail-head b { color: var(--brass); }
.cine-nav { display: flex; align-items: center; gap: 10px; }
.cine-count { font: 800 22px/1 var(--f-display); letter-spacing: 0.02em; color: #fbf7ec; margin-right: 6px; }
.cine-count b { color: var(--brass); }
.cine-arrow { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(251, 247, 236, 0.12); color: #fbf7ec; display: grid; place-items: center; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.cine-arrow:hover { background: var(--brass); color: var(--tag-ink); }
.cine-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1180px) { .cine-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cine-card {
  position: relative; display: flex; gap: 14px; align-items: center; padding: 12px; overflow: hidden;
  border: 0; border-radius: 14px; text-align: left; cursor: pointer; color: #fbf7ec; font-family: var(--f-text);
  background: rgba(10, 8, 5, 0.5); box-shadow: inset 0 0 0 1px rgba(251, 247, 236, 0.1);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.35s var(--ease-out);
}
.cine-card:hover { transform: translateY(-3px); background: rgba(251, 247, 236, 0.12); }
.cine-card.is-on { background: rgba(251, 247, 236, 0.17); box-shadow: inset 0 0 0 1px rgba(242, 194, 48, 0.6); }
.cine-card .thumb { width: 96px; height: 66px; flex: none; border-radius: 9px; overflow: hidden; background: #2a2114; }
.cine-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cine-card .txt { display: grid; gap: 4px; min-width: 0; }
.cine-card small { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #cfc6ae; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cine-card strong { font: 800 21px/1 var(--f-display); text-transform: uppercase; }
.cine-card .txt > span { font-size: 13px; color: #e9e2cf; }
.cine-card .txt b { color: var(--brass); }
.cine-card .tick { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(251, 247, 236, 0.1); }
.cine-card .tick i { display: block; height: 100%; width: 0; background: var(--brass); }
.cine-card.is-on .tick i { width: 100%; }
.cine.is-auto .cine-card.is-on .tick i { animation: cine-tick var(--cine-ms, 8s) linear both; }
.cine.is-paused .cine-card.is-on .tick i { animation-play-state: paused; }
@keyframes cine-tick { from { width: 0; } to { width: 100%; } }
@media (max-width: 760px) {
  .cine-body { padding-top: 112px; gap: 32px; }
  .cine-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .cine-cards::-webkit-scrollbar { display: none; }
  .cine-card { flex: 0 0 78%; scroll-snap-align: start; }
  .cine-card .thumb { width: 64px; height: 56px; }
  .cine-rail-head p { flex-basis: 100%; }
}

/* Header over the dark hero, until the page scrolls */
.on-cine .bar:not(.is-scrolled) .wordmark { color: #fbf7ec; }
.on-cine .bar:not(.is-scrolled) .wordmark small { color: #cfc6ae; }
.on-cine .bar:not(.is-scrolled) .bar-link { color: #e9e2cf; }
.on-cine .bar:not(.is-scrolled) .bar-link:hover { color: var(--brass); background: rgba(251, 247, 236, 0.08); }
.on-cine .bar:not(.is-scrolled) .keyring { background: rgba(251, 247, 236, 0.12); color: #fbf7ec; box-shadow: inset 0 0 0 1px rgba(251, 247, 236, 0.25); }
.on-cine .bar:not(.is-scrolled) .keyring .ring-svg { background: rgba(10, 8, 5, 0.4); box-shadow: none; }
.on-cine .bar:not(.is-scrolled) .keyring:hover .ring-svg { background: rgba(10, 8, 5, 0.65); }

/* ---------- Community photo cards ---------- */
.ccards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
@media (max-width: 860px) { .ccards { grid-template-columns: 1fr; } }
.ccard {
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--lacquer); box-shadow: inset 0 0 0 1px var(--rule), var(--shadow-1);
  transition: box-shadow 0.3s, transform 0.5s var(--ease-out);
}
.ccard:hover { color: inherit; transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--brass-deep), 0 30px 50px -28px rgba(60, 45, 10, 0.55); }
.ccard-media { position: relative; aspect-ratio: 16 / 8.5; overflow: hidden; background: radial-gradient(120% 90% at 70% 40%, #6e5208 0%, #1d1a12 75%); isolation: isolate; }
.ccard-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.ccard:hover .ccard-media > img { transform: scale(1.05); }
.ccard-media::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(10, 8, 5, 0.75) 0%, rgba(10, 8, 5, 0) 55%); pointer-events: none; }
.ccard-badge, .ccard-hint { position: absolute; top: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.ccard-badge { left: 14px; background: rgba(251, 247, 236, 0.94); color: var(--tag-ink); }
.ccard-badge.ccard-selling { background: var(--brass); }
.ccard-hint { right: 14px; background: rgba(10, 8, 5, 0.6); color: #fbf7ec; letter-spacing: 0.04em; text-transform: none; font-weight: 600; opacity: 0; transform: translateY(-4px); transition: opacity 0.3s, transform 0.3s; }
.ccard-hint svg { width: 12px; height: 12px; fill: var(--brass); stroke: var(--brass); }
.ccard:hover .ccard-hint { opacity: 1; transform: none; }
.ccard.is-previewing .ccard-hint { opacity: 0; }
.ccard-title { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; color: #fbf7ec; }
.ccard-title .code { font: 700 12px/1.2 var(--f-text); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); }
.ccard-title h3 { font-size: clamp(30px, 3.2vw, 42px); font-weight: 900; text-transform: uppercase; margin-top: 4px; }
.ccard-title .arrow { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: var(--tag-ink); transition: transform 0.4s var(--ease-out); }
.ccard:hover .ccard-title .arrow { transform: translateX(4px); }
.ccard-body { padding: 18px 20px 22px; display: grid; gap: 14px; }
.ccard-body > p { color: var(--bone-dim); font-size: 15.5px; }

/* ---------- Project page film banner ---------- */
.p-film { position: relative; margin-top: 44px; aspect-ratio: 21 / 9; border-radius: 18px; overflow: hidden; background: #1d1a12; isolation: isolate; box-shadow: var(--shadow-1); }
.p-film > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-film::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(0deg, rgba(10, 8, 5, 0.6) 0%, rgba(10, 8, 5, 0) 50%); }
.p-film-play { position: absolute; left: 22px; bottom: 22px; z-index: 2; }
@media (max-width: 760px) { .p-film { aspect-ratio: 4 / 3; } .p-film-play { left: 14px; bottom: 14px; font-size: 14.5px; } }

/* ---------- Film player modal ---------- */
dialog.modal.film { width: min(1120px, calc(100vw - 24px)); }
dialog.modal.film::backdrop { background: rgba(8, 6, 4, 0.84); }
.film-card { background: #0d0b07; color: #fbf7ec; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.85); }
.film-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; }
.film-kicker { font: 700 12px/1 var(--f-text); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); }
.film-head h2 { font-size: clamp(22px, 2.4vw, 30px); text-transform: uppercase; margin-top: 6px; }
.film .x { background: rgba(251, 247, 236, 0.12); color: #fbf7ec; box-shadow: none; }
.film-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.film-frame iframe, .film-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   PHOTO GALLERY (bento grid) + LIGHTBOX
   ========================================================================== */
.gal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 16vw, 230px); gap: clamp(8px, 1vw, 14px); }
.gal-tile {
  position: relative; display: block; padding: 0; border: 0; overflow: hidden; cursor: zoom-in;
  border-radius: 14px; background: var(--lacquer-3); isolation: isolate;
}
.gal-tile.g-c2 { grid-column: span 2; }
.gal-tile.g-c4 { grid-column: span 4; }
.gal-tile.g-r2 { grid-row: span 2; }
.gal-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out), filter 0.4s; }
.gal-tile:hover img { transform: scale(1.06); }
.gal-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 8, 5, 0.45), rgba(10, 8, 5, 0) 45%); opacity: 0; transition: opacity 0.35s; }
.gal-tile:hover::after, .gal-tile:focus-visible::after { opacity: 1; }
.gal-tile:focus-visible { outline-offset: 4px; }
.gal-zoom { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 247, 236, 0.92); color: var(--tag-ink); opacity: 0; transform: scale(0.8); transition: opacity 0.3s, transform 0.4s var(--ease-swing); }
.gal-zoom svg { width: 16px; height: 16px; }
.gal-tile:hover .gal-zoom, .gal-tile:focus-visible .gal-zoom { opacity: 1; transform: none; }
.gal-more { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; background: rgba(10, 8, 5, 0.58); color: #fbf7ec; font: 800 clamp(34px, 4vw, 52px)/1 var(--f-display); letter-spacing: 0.02em; }
@media (max-width: 700px) {
  .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 132px; }
  .gal-tile.g-c2, .gal-tile.g-c4, .gal-tile.g-r2, .gal-tile { grid-column: span 1; grid-row: span 1; }
  .gal-tile:first-child { grid-column: span 2; grid-row: span 2; }
  .gal-tile.m-wide { grid-column: span 2; }
  .gal-zoom { opacity: 1; transform: none; width: 32px; height: 32px; }
}

dialog.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(8, 6, 4, 0.96); color: #fbf7ec; overflow: hidden;
}
dialog.lightbox::backdrop { background: rgba(8, 6, 4, 0.96); }
dialog.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fade-in 0.3s ease; }
dialog.lightbox.is-closing { animation: fade-out 0.2s ease forwards; }
@keyframes fade-out { to { opacity: 0; } }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 16px clamp(16px, 3vw, 28px); }
.lb-count { font: 800 20px/1 var(--f-display); letter-spacing: 0.06em; }
.lb-count b { color: var(--brass); font-weight: 800; }
.lb-stage { margin: 0; display: grid; place-items: center; min-height: 0; padding: 0 clamp(16px, 7vw, 96px); touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); user-select: none; -webkit-user-drag: none; }
.lb-stage img.is-in { animation: lb-in 0.45s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: scale(0.97); } }
.lb-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(251, 247, 236, 0.12); color: #fbf7ec; transition: background-color 0.2s, color 0.2s; }
.lb-btn:hover { background: var(--brass); color: var(--tag-ink); }
.lb-prev, .lb-next { position: absolute; top: 50%; margin-top: -24px; }
.lb-prev { left: clamp(10px, 2vw, 28px); }
.lb-next { right: clamp(10px, 2vw, 28px); }
.lb-strip { display: flex; gap: 8px; justify-content: center; padding: 14px 16px 18px; overflow-x: auto; scrollbar-width: none; }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-strip button { flex: none; width: 72px; height: 50px; padding: 0; border: 0; border-radius: 7px; overflow: hidden; cursor: pointer; opacity: 0.45; background: #2a2114; transition: opacity 0.2s, box-shadow 0.2s; }
.lb-strip button:hover { opacity: 0.8; }
.lb-strip button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--brass); }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) {
  .lb-prev, .lb-next { top: auto; bottom: 84px; margin: 0; }
  .lb-stage { padding: 0 8px; }
  .lb-strip button { width: 56px; height: 40px; }
}
