:root {
  color-scheme: light;
  --paper: #f7f4ed;
  --white: #fcfaf5;
  --ink: #26221d;
  --muted: #62594f;
  --rule: #d9d0c3;
  --stage: #e4e4db;
  --dark: #231f1a;
  --dark-rule: #5a4e43;
  --cream: #f7eee0;
  --light-muted: #cfc0af;
  --peach: #edb393;
  --rust: #82472e;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled, fieldset:disabled button { cursor: default; }
::selection { background: var(--peach); color: var(--dark); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
.top :focus-visible, .hero :focus-visible, .tour-section :focus-visible, .footer :focus-visible { outline-color: var(--peach); }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
section[id] { scroll-margin-top: 24px; }
.wrap { width: min(calc(100% - 100px), 1180px); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { position: fixed; z-index: 10; margin: 10px; padding: 10px 16px; background: var(--white); }

.top { background: var(--dark); color: var(--cream); border-bottom: 1px solid var(--dark-rule); }
.top-inner { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; text-decoration: none; width: fit-content; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid #8f7463; border-radius: 50%; color: var(--peach); font: italic 23px/1 var(--serif); padding-bottom: 4px; }
.top nav { display: flex; gap: clamp(16px, 3.4vw, 45px); }
.top nav a, .top-source { font-size: .86rem; text-decoration: none; }
.top nav a { color: var(--light-muted); }
.top-source { justify-self: end; }
.top a:hover, .footer a:hover { color: var(--peach); }

.hero { background: radial-gradient(ellipse at 79% 47%, #3e3127, var(--dark) 68%); color: var(--cream); }
.hero-inner { display: grid; grid-template-columns: 1fr .79fr; align-items: center; gap: clamp(30px, 6vw, 92px); padding-block: 58px 55px; }
.hero-copy { padding-block: 10px 30px; }
.eyebrow { color: var(--rust); font-size: .71rem; font-weight: 750; text-transform: uppercase; letter-spacing: .17em; }
.hero .eyebrow, .tour-section .eyebrow { color: var(--peach); }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.05em; }
h1 { margin-block: 23px 24px; font-size: clamp(67px, 8.25vw, 121px); line-height: .91; }
h1 em { color: var(--peach); font-weight: 400; }
h2 { font-size: clamp(40px, 5.2vw, 71px); line-height: 1.02; }
.hero-deck { max-width: 29em; color: var(--light-muted); font-size: clamp(1rem, 1.55vw, 1.13rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 25px; margin-top: 30px; }
.button { min-height: 45px; display: inline-flex; justify-content: center; align-items: center; gap: 15px; padding: 10px 17px; border: 1px solid transparent; font-size: .86rem; font-weight: 700; line-height: 1.3; text-decoration: none; }
.button[hidden] { display: none; }
.primary { background: var(--peach); color: #30221a; }
.primary:hover { background: #ffc6a5; }
.text-link { display: inline-flex; align-items: center; min-height: 39px; gap: 8px; font-size: .85rem; font-weight: 650; text-underline-offset: .26em; }
.hero-figure { justify-self: end; width: min(100%, 392px); margin-right: clamp(0px, 3vw, 42px); }
.hero-figure img { width: 100%; height: auto; box-shadow: 0 16px 50px #110e0b63; }
.hero-figure figcaption { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--light-muted); font-size: .72rem; }

.overview, .notes-section { display: grid; grid-template-columns: 1fr .86fr; align-items: start; gap: 40px 9%; padding-block: clamp(62px, 8vw, 113px); }
.overview h2, .notes-section h2, .section-head h2 { margin-top: 10px; }
.overview-copy { color: var(--muted); padding-top: 23px; }
.overview-copy p + p { margin-top: 14px; }
.viewer-section { padding-block: clamp(54px, 7vw, 92px) 58px; background: #eee9de; border-block: 1px solid var(--rule); }
.section-head { display: grid; grid-template-columns: 1fr .5fr; align-items: end; gap: 12px 6%; margin-bottom: 27px; }
.section-head > p { max-width: 31ch; color: var(--muted); padding-bottom: 4px; }
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 260px; border: 1px solid #cfc7b9; background: var(--white); }
.stage { min-height: 490px; position: relative; background: radial-gradient(ellipse at 50% 8%, #eeeee6, #d1d2c9); overflow: hidden; }
#viewport, .viewer-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewer-poster { object-fit: contain; }
#viewport canvas { display: block; width: 100%; height: 100%; outline-offset: -3px; touch-action: none; cursor: grab; }
#viewport canvas:active { cursor: grabbing; }
.viewer-overlay { position: absolute; inset: auto 0 0; display: grid; justify-items: start; padding: 42px 23px 22px; background: linear-gradient(transparent, #201c17df); color: white; }
.viewer-overlay :focus-visible { outline-color: var(--peach); }
#model-status:not(:empty) { margin-top: 8px; max-width: 45ch; font-size: .84rem; }
.view-context { position: absolute; right: 12px; bottom: 12px; padding: 4px 8px; background: #fcfaf5e8; color: #433b31; font-size: .73rem; pointer-events: none; }
.control-panel { padding: 15px 15px 17px; border-left: 1px solid var(--rule); }
.control-panel fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
.control-panel fieldset:disabled { opacity: .65; }
.control-heading { display: flex; justify-content: space-between; gap: 7px; align-items: center; font-size: .84rem; font-weight: 730; }
.control-panel section { margin-top: 13px; }
.control-panel h3 { margin-bottom: 5px; color: var(--muted); font-size: .73rem; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.choices button, .reset { min-height: 34px; padding: 3px; border: 1px solid var(--rule); background: transparent; font-size: .72rem; line-height: 1.15; }
.reset { padding-inline: 9px; }
.choices button[aria-pressed="true"] { background: #eddacc; border-color: #ba927c; color: #553523; }
.choices button:not(:disabled):hover, .reset:not(:disabled):hover { border-color: var(--rust); }
.level { display: flex; align-items: center; min-height: 34px; gap: 5px; border-bottom: 1px solid var(--rule); font-size: .75rem; }
.level label, .frame-toggle { display: flex; align-items: center; flex: 1; min-height: 33px; gap: 7px; cursor: pointer; }
.frame-toggle { margin-top: 4px; font-size: .73rem; }
.level input, .frame-toggle input { flex: none; accent-color: var(--rust); }
.solo { font-size: .69rem; min-height: 27px; padding: 1px 6px; border: 1px solid #e3dcd0; background: transparent; }
.solo:not(:disabled):hover { border-color: var(--rust); }
.model-foot { display: flex; justify-content: space-between; align-items: center; gap: 4px 14px; margin-top: 8px; color: var(--muted); font-size: .82rem; }
.model-foot a { white-space: nowrap; }

.gallery-section { padding-block: clamp(64px, 9vw, 115px); }
.gallery-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 14px 22px; }
.gallery-filter button { min-height: 39px; border: 1px solid var(--rule); background: transparent; padding: 6px 14px; font-size: .81rem; font-weight: 650; }
.gallery-filter button[aria-pressed="true"] { color: var(--cream); background: var(--dark); border-color: var(--dark); }
.gallery-filter button:hover { border-color: var(--dark); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 15px; }
.render-card { border-bottom: 1px solid var(--rule); min-width: 0; }
.render-card a { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e8e3d8; }
.render-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 240ms ease; }
.render-card.contained img { object-fit: contain; }
.render-card a:hover img { transform: scale(1.035); }
.enlarge { position: absolute; bottom: 9px; right: 9px; display: grid; place-items: center; width: 34px; height: 34px; background: var(--white); color: var(--ink); }
.render-card figcaption { min-height: 62px; padding: 8px 0 10px; }
.render-card strong, .render-card figcaption > span { display: block; }
.render-card strong { font-weight: 650; font-size: .92rem; }
.render-card figcaption > span { color: var(--muted); font-size: .76rem; }
.lightbox { width: min(96vw, 1240px); max-width: none; max-height: 95dvh; padding: 0; overflow: auto; border: 1px solid var(--dark-rule); background: var(--dark); color: var(--cream); }
.lightbox::backdrop { background: #14100de7; }
.lightbox :focus-visible { outline-color: var(--peach); }
.lightbox-bar, .lightbox-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; }
.lightbox-bar h3 { font-weight: 650; font-size: 1rem; }
.lightbox-bar p, .lightbox-nav span { font-size: .8rem; color: var(--light-muted); }
.lightbox button { width: 40px; height: 40px; border: 1px solid var(--dark-rule); background: transparent; color: var(--cream); font-size: 1.25rem; }
.lightbox button:hover { border-color: var(--peach); }
.lightbox-image { display: grid; place-items: center; height: min(74dvh, 920px); background: #16130f; }
.lightbox-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }

.tour-section { padding-block: clamp(59px, 8vw, 97px); background: var(--dark); color: var(--cream); }
.tour-section .section-head > p, .tour-note { color: var(--light-muted); }
.video-shell { aspect-ratio: 16 / 9; background: #111; border: 1px solid var(--dark-rule); }
.video-shell video { display: block; width: 100%; height: 100%; }
.tour-note { margin-top: 12px; font-size: .83rem; }
.tour-note a { margin-left: 4px; text-underline-offset: .25em; }
.footer { background: var(--dark); color: var(--cream); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 24px; }
.footer p { color: var(--light-muted); font-size: .81rem; margin-top: 5px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer nav a { color: var(--light-muted); text-decoration: none; font-size: .82rem; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 56px); }
  .hero-figure { margin-right: 0; }
  .overview, .notes-section { gap: 35px 5%; }
  .gallery-grid { gap: 20px 12px; }
}

@media (max-width: 690px) {
  .wrap { width: calc(100% - 34px); }
  .top-inner { grid-template-columns: 1fr auto; gap: 0 10px; padding-block: 10px 8px; }
  .top nav { grid-row: 2; grid-column: 1 / -1; }
  .top nav a { padding: 8px 0 3px; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 38px 27px; gap: 22px; }
  .hero-copy { padding-block: 0; }
  h1 { font-size: clamp(61px, 12vw, 83px); margin-block: 17px 19px; }
  .hero-actions { margin-top: 20px; }
  .hero-figure { justify-self: center; width: min(100%, 370px); }
  .overview, .notes-section, .section-head { grid-template-columns: 1fr; gap: 12px; }
  .overview-copy { padding-top: 0; }
  .section-head { margin-bottom: 18px; }
  .section-head > p { max-width: 42ch; padding: 0; }
  .viewer { grid-template-columns: 1fr; }
  .stage { min-height: clamp(290px, 78vw, 465px); }
  .control-panel { border-left: 0; border-top: 1px solid var(--rule); }
  .model-foot { align-items: start; flex-wrap: wrap; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-filter button { padding-inline: 9px; }
  .lightbox-image { height: min(68dvh, 720px); }
}

@media (max-width: 359px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .render-card img { transition: none; }
}
