/* Bottega Living, Downtown Design prototype. Values from the Bottega Living Design System. */
@font-face { font-family: "Bodoni Moda"; src: url("/fonts/BodoniModa-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("/fonts/BodoniModa-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/fonts/Switzer-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/fonts/Switzer-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("/fonts/Switzer-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --surface: #fdfcfa; --surface-sand: #f4efe7; --ink: #262120; --ink-soft: #4a4441; --ink-muted: #6e6761;
  --gold: #a68650; --gold-deep: #8a7048; --rule: #e0dad0; --rule-strong: #262120; --focus: #8a7048;
  --dark: #201b1b; --on-dark: #fdfcfa; --on-dark-soft: #cfc6b8; --on-dark-muted: #a39a90; --gold-on-dark: #c6a977;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", "Times New Roman", serif;
  --sans: Switzer, "Helvetica Neue", Arial, sans-serif;
  --gutter: 24px; --measure: 640px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:where(a, button, input, textarea, select, label):focus-visible { outline: 1px solid var(--focus); outline-offset: 3px; }
.wrap { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); max-width: 1344px; margin: 0 auto; }
.narrow { max-width: 560px; margin: 0 auto; }

/* Type */
.eyebrow { margin: 0; font-size: 11px; line-height: 1.4; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-deep); }
.dark .eyebrow, .on-image .eyebrow { color: var(--gold-on-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance; }
.display { font-size: clamp(40px, 9vw, 64px); line-height: 1.05; letter-spacing: -0.01em; }
.h1 { font-size: clamp(34px, 7vw, 48px); line-height: 1.1; }
.statement { font-size: clamp(24px, 5vw, 34px); line-height: 1.35; }
.piece-name { font-size: 22px; line-height: 1.3; }
.accent { font-style: inherit; color: var(--gold); }
.dark .accent, .on-image .accent { color: var(--gold-on-dark); }
.quote { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.45; color: var(--ink-soft); }
.caption { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.small { font-size: 13px; line-height: 1.5; color: var(--ink-muted); }
p { margin: 0; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 32px; }

/* Invitation: the only action style */
.inv { display: inline-flex; align-items: center; gap: 10px; padding: 0 0 8px; border: 0; border-bottom: 1px solid var(--rule); background: none; font: inherit; font-size: 12px; line-height: 1.4; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); text-decoration: none; cursor: pointer; transition: border-color 200ms ease; }
.inv:hover, .inv:focus-visible { border-bottom-color: var(--rule-strong); }
.inv--strong { border-bottom-color: var(--rule-strong); }
.on-image .inv, .dark .inv { color: var(--on-dark); border-bottom-color: var(--on-dark); }
.inv[aria-pressed="true"] { color: var(--gold-deep); border-bottom-color: var(--gold-deep); }
.actions { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.actions--stack { flex-direction: column; align-items: flex-start; gap: 22px; }

/* Header */
.site-head { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) 16px max(var(--gutter), env(safe-area-inset-left, 0px)); }
.site-head--solid { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--rule); }
.site-head { gap: 16px; }
.site-head .logo { height: 12px; width: auto; display: block; }
.site-head .head-link { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 759px) { .site-head .head-link { font-size: 11px; letter-spacing: 0.12em; } }
@media (min-width: 760px) { .site-head .logo { height: 20px; } }
.site-head .head-link { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid currentColor; }
.on-image.site-head { color: var(--on-dark); }

/* Hero */
.hero { position: relative; min-height: min(92vh, 760px); display: flex; align-items: flex-end; color: var(--on-dark); background: var(--dark); overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(32,27,27,0.86) 0%, rgba(32,27,27,0.55) 38%, rgba(32,27,27,0.15) 70%, rgba(32,27,27,0.35) 100%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-top: 140px; padding-bottom: 48px; }
.hero .lede { color: var(--on-dark-soft); font-size: 16px; max-width: 520px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; letter-spacing: 0.04em; color: var(--on-dark-soft); }

/* Sections */
.section { padding-top: 72px; padding-bottom: 72px; }
.section + .section { border-top: 1px solid var(--rule); }
.dark { background: var(--dark); color: var(--on-dark); }
.dark .caption, .dark .small { color: var(--on-dark-muted); }
.sand { background: var(--surface-sand); }
.split { display: grid; gap: 24px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; } .section { padding-top: 112px; padding-bottom: 112px; } }

/* Schedule table */
.schedule { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.schedule th, .schedule td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.schedule th { font-weight: 400; width: 44%; padding-right: 16px; }
.schedule td { color: var(--ink-soft); }
.schedule .note { display: block; font-size: 13px; color: var(--ink-muted); }

/* Rooms and pieces */
.rooms { display: grid; gap: 40px; }
@media (min-width: 720px) { .rooms--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; } }
.room-card { display: grid; gap: 14px; text-decoration: none; }
.room-card .frame { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-sand); }
.room-card .frame img { width: 100%; height: 100%; object-fit: cover; }
.room-card .names { font-size: 14px; color: var(--ink-muted); }

.room { padding-top: 40px; }
.room-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.room-head .count { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); }
.piece-list { display: grid; gap: 28px; }
@media (min-width: 720px) { .piece-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
.piece-card { display: grid; gap: 12px; }
.piece-card .frame { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-sand); }
.piece-card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms ease; }
.piece-card .frame:hover img { transform: scale(1.02); }
.piece-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.piece-card .name { font-family: var(--serif); font-size: 22px; line-height: 1.3; text-decoration: none; }
.piece-card .material { font-size: 14px; color: var(--ink-muted); }

/* Piece page */
.piece-hero { position: relative; aspect-ratio: 4 / 5; max-height: 78vh; width: 100%; overflow: hidden; background: var(--surface-sand); }
.piece-hero img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .piece-hero { aspect-ratio: 16 / 9; } }
.gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(-1 * var(--gutter)); }
.gallery img { flex: 0 0 auto; width: 72%; max-width: 420px; aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: start; background: var(--surface-sand); }
.spec { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.spec th { width: 36%; font-weight: 400; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-muted); padding-top: 18px; padding-right: 12px; }
.spec td { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.action-panel { display: grid; gap: 22px; padding: 28px 0; border-top: 1px solid var(--rule-strong); }

/* Selection bar */
.sel-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--dark); color: var(--on-dark); padding: 14px max(var(--gutter), env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); display: flex; justify-content: space-between; align-items: center; gap: 16px; transform: translateY(110%); visibility: hidden; transition: transform 400ms ease-out, visibility 0s 400ms; }
.sel-bar.show { transform: none; visibility: visible; transition: transform 400ms ease-out; }
.sel-bar .label { font-family: var(--serif); font-size: 20px; }
.sel-bar .inv { color: var(--on-dark); border-bottom-color: var(--on-dark); }
body.has-bar { padding-bottom: 84px; }

/* Forms */
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field label, .legend { font-size: 11px; line-height: 1.4; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-muted); }
.field input, .field textarea, .field select { font: inherit; font-size: 17px; font-weight: 300; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule-strong); border-radius: 0; padding: 8px 0; width: 100%; -webkit-appearance: none; appearance: none; }
.field textarea { min-height: 80px; resize: vertical; }
.choice { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.choice label { display: flex; gap: 12px; align-items: center; font-size: 16px; color: var(--ink); cursor: pointer; }
.choice input { accent-color: var(--ink); width: 18px; height: 18px; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 8px 12px; border: 1px solid var(--rule); font-size: 14px; cursor: pointer; font-variant-numeric: tabular-nums; }
.chips input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.chips input:focus-visible + span { outline: 1px solid var(--focus); outline-offset: 3px; }
.consent { font-size: 13px; color: var(--ink-muted); }
.hidden { display: none !important; }
.form .inv { justify-self: start; }

.sel-items { display: grid; gap: 14px; }
.sel-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.sel-item img { width: 72px; height: 88px; object-fit: cover; background: var(--surface-sand); }
.sel-item .n { font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.sel-item button { font: inherit; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; background: none; border: 0; color: var(--ink-muted); cursor: pointer; padding: 6px 0; }
.empty { color: var(--ink-muted); }

/* Footer */
.foot { padding-top: 56px; padding-bottom: 40px; display: grid; gap: 28px; }
.foot .logo { height: 20px; width: auto; max-width: 100%; }
.foot .contact { display: grid; gap: 4px; font-size: 14px; color: var(--on-dark-soft); }
.foot .legal { font-size: 12px; color: var(--on-dark-muted); border-top: 1px solid #3d352c; padding-top: 16px; }

/* After-the-fair toggle */
.after-only { display: none; }
body.is-after .after-only { display: revert; }
body.is-after .pre-only { display: none !important; }

/* Prototype ribbon */
.proto-ribbon { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 40; margin: max(6px, env(safe-area-inset-top, 0px)) 0 0 0; font: 400 10px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; background: var(--gold-deep); color: #fff; padding: 6px 8px; text-decoration: none; opacity: 0.92; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* v1.4: stand C14 */
.piece-card .frame, .piece-hero { position: relative; }
.pill { position: absolute; top: 12px; right: 12px; z-index: 1; background: #fdfcfaeb; color: var(--ink); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; padding: 6px 10px; line-height: 1; }
.pill--showroom { background: #201b1be0; color: #fdfcfa; }
.ph-name { position: absolute; left: 0; right: 0; top: 42%; text-align: center; font-family: var(--serif); font-size: 34px; color: var(--ink); pointer-events: none; }
.piece-hero--ph { background: var(--surface-sand); }
.piece-hero--ph img { object-fit: cover; }
@media (min-width: 960px) { .piece-list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.jump { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.jump a { text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.room { scroll-margin-top: 80px; }

/* 29 Oct: wider frames so the whole piece shows (Rami's notes) */
.piece-card .frame { aspect-ratio: 4 / 3; }
.piece-hero { aspect-ratio: auto; max-height: none; display: flex; justify-content: center; }
.piece-hero img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; }
@media (min-width: 900px) { .piece-hero { aspect-ratio: auto; } }
.gallery img { width: auto; max-width: none; height: 300px; aspect-ratio: auto; object-fit: contain; }
@media (min-width: 900px) { .gallery img { height: 420px; } }
