:root { font-family: Arial, Helvetica, sans-serif; color: #f0eeea; background: #080808; font-synthesis: none; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; cursor: default; }
button, a { -webkit-tap-highlight-color: transparent; cursor: pointer; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 1px solid #eee; outline-offset: 6px; }
.showroom { height: 100vh; height: 100svh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); padding: max(32px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) max(56px, env(safe-area-inset-bottom)) max(32px, env(safe-area-inset-left)); overflow: hidden; }
.header { position: relative; display: flex; justify-content: center; align-items: center; z-index: 2; }
.wordmark { color: inherit; text-decoration: none; text-align: center; font-family: Georgia, 'Times New Roman', serif; font-size: 40px; font-weight: 700; letter-spacing: -4px; line-height: .85; }
.wordmark-initials { display: flex; align-items: center; justify-content: center; gap: .2em; padding-right: .1em; }
.wordmark-initials::before, .wordmark-initials::after { content: ''; display: block; flex: 0 0 .32em; height: .105em; background: currentColor; }
.wordmark-caption { display: block; margin-top: 9px; padding-left: 4px; font-family: Arial, sans-serif; font-size: 7px; font-weight: 400; letter-spacing: 4px; }
.stage { position: relative; min-height: 0; }
model-viewer { display: block; height: 100%; width: 100%; background: #080808; --poster-color: #080808; pointer-events: none; translate: 0 10px; transition: opacity 600ms ease, translate 700ms cubic-bezier(.22, 1, .36, 1); }
.is-inspecting model-viewer { pointer-events: auto; }
.ar-button { position: absolute; right: 0; bottom: 16px; display: flex; align-items: center; gap: 9px; border: 1px solid #343434; border-radius: 0; padding: 12px 15px; background: #080808; color: #c5c5c5; font-size: 10px; cursor: pointer; pointer-events: auto; }
.ar-button svg { width: 19px; height: 19px; }
.loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90px; }
.loader-track { display: block; height: 1px; background: #303030; }
#progress { display: block; width: 0; height: 100%; background: #ccc; }
.error { position: absolute; inset: 40% 10% auto; text-align: center; font-size: 12px; background: #080808; padding: 20px; color: #aaa; }
.error button { color: inherit; border: 0; background: transparent; text-decoration: underline; cursor: pointer; }
.product-info { --action-gap: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 38px; column-gap: var(--action-gap); width: max-content; max-width: 100%; margin-inline: auto; padding-top: 8px; }
.inspect-button, .buy-button { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 38px; min-width: 0; padding: 8px 18px; border-radius: 999px; font-family: Arial, Helvetica, sans-serif; font-size: clamp(11px, 1.5vw, 14px); line-height: 1.2; letter-spacing: -.15px; text-align: center; white-space: nowrap; }
.inspect-button { grid-column: 2; grid-row: 1; padding-left: 14px; gap: 8px; background: transparent; color: #d4d4d4; border: 1px solid #666; font-weight: 500; cursor: pointer; }
.inspect-icon { width: 16px; height: 16px; flex-shrink: 0; }
.inspect-button:hover { color: #fff; border-color: #aaa; }
.inspect-button:disabled { opacity: .4; cursor: wait; }
.buy-button { color: #080808; border: 1px solid #f0eeea; background: #f0eeea; font-weight: 700; text-decoration: none; }
.buy-button:hover { background: #d8d6d2; border-color: #d8d6d2; }
.motion-button { position: absolute; right: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 12px; background: transparent; border: 0; color: #999; cursor: pointer; }
.motion-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  .showroom { padding: max(26px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
  .wordmark { font-size: 35px; }
  .ar-button { bottom: 12px; left: 50%; right: auto; transform: translateX(-50%); white-space: nowrap; }
  .product-info { --action-gap: 10px; }
}
@media (max-height: 500px) {
  .showroom { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .wordmark { font-size: 28px; }
  .product-info { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) { #progress { transition: none; } }

/* Equal action slots preserve size while the secondary action moves to center. */
/* Keep the canvas dimensions constant: resizing forces model-viewer to snap its camera. */
.showroom { --inspection-shift: calc(max(56px, env(safe-area-inset-bottom)) - max(20px, env(safe-area-inset-bottom))); }
@media (max-width: 600px) { .showroom { --inspection-shift: calc(max(40px, env(safe-area-inset-bottom)) - max(20px, env(safe-area-inset-bottom))); } }
@media (max-height: 500px) { .showroom { --inspection-shift: 0px; } }
.is-inspecting .inspect-button { transform: translateX(calc(-50% - var(--action-gap) / 2)); }
.buy-slot { grid-column: 1; grid-row: 1; min-width: 0; max-width: 100%; }
.buy-button { transition: transform 480ms cubic-bezier(.22, 1, .36, 1), opacity 240ms ease, background-color 180ms ease; }
.is-inspecting .buy-slot .buy-button { transform: translateY(160px); opacity: 0; pointer-events: none; }
.inspect-button { transition: transform 480ms cubic-bezier(.22, 1, .36, 1), color 180ms ease, border-color 350ms ease; }
.inspect-labels { display: grid; }
.inspect-labels > span { grid-area: 1 / 1; transition: opacity 220ms ease, transform 350ms cubic-bezier(.22, 1, .36, 1); }
.inspect-label-close { opacity: 0; transform: translateY(5px); }
.is-inspecting .inspect-label-open { opacity: 0; transform: translateY(-5px); }
.is-inspecting .inspect-label-close { opacity: 1; transform: translateY(0); }
.eye-slash { stroke-dasharray: 26; stroke-dashoffset: 26; opacity: 0; transition: stroke-dashoffset 350ms ease, opacity 220ms ease; }
.is-inspecting .eye-slash { stroke-dashoffset: 0; opacity: 1; }
.motion-button { transition: opacity 220ms ease, transform 350ms ease; }
.motion-button.is-muted, .view-toggle.is-muted { opacity: 0; transform: translateY(-8px); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .showroom, .product-info, .buy-button, .inspect-button, .inspect-labels > span, .eye-slash, .motion-button { transition: none; }
}

model-viewer.is-ready { opacity: 1; visibility: visible; translate: 0 0; }
.model-poster { width: 100%; height: 100%; background: #080808; }
/* Keep the loading cover outside the canvas masks and below the percentage.
   Its fade shares the model reveal, with no extra loading delay. */
.stage::after { opacity: 1; visibility: visible; transition: opacity 600ms ease, visibility 0s linear 600ms; }
.has-model .stage::after { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .stage::after { transition: none; } }
@media (prefers-reduced-motion: reduce) { model-viewer { transition: none; } }

.view-toggle { position: absolute; left: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 12px; color: #999; background: transparent; border: 0; cursor: pointer; transition: color 180ms ease, opacity 220ms ease, transform 350ms ease; }
.view-toggle:hover { color: #f0eeea; }
.view-toggle svg { width: 18px; height: 18px; }
.grid-symbol, .single-symbol { transform-origin: center; transition: opacity 250ms ease, transform 400ms cubic-bezier(.22, 1, .36, 1); }
.single-symbol { opacity: 0; transform: scale(.75); }
.is-grid .grid-symbol { opacity: 0; transform: scale(.75); }
.is-grid .single-symbol { opacity: 1; transform: scale(1); }
.view-stack { position: relative; min-height: 0; }
.hero-view, .catalog-view { position: absolute; inset: 0; transition: opacity 380ms ease, transform 550ms cubic-bezier(.22, 1, .36, 1), visibility 550ms; }
.hero-view { display: grid; grid-template-rows: minmax(0, 1fr) auto; opacity: 1; transform: translateY(0) scale(1); visibility: visible; }
.catalog-view { opacity: 0; visibility: hidden; transform: translateY(22px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #333 transparent; padding: clamp(32px, 6vh, 64px) 0 16px; }
.is-grid .hero-view { opacity: 0; visibility: hidden; transform: translateY(12px) scale(.97); pointer-events: none; }
.is-grid .catalog-view { opacity: 1; visibility: visible; transform: translateY(0); }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; max-width: 1400px; margin: 0 auto; }
.catalog-card { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.catalog-image-wrap { width: 100%; height: clamp(160px, 32vh, 340px); position: relative; }
.catalog-image { width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: scale(.96); transition: opacity 400ms ease, transform 550ms cubic-bezier(.22, 1, .36, 1); }
.catalog-image.is-loaded { opacity: 1; transform: scale(1); }
.catalog-card:hover .catalog-image.is-loaded { transform: scale(1.025); }
.catalog-status { position: absolute; inset: 0; display: grid; place-items: center; color: #777; font-size: 10px; text-align: center; }
.catalog-buy { display: inline-flex; align-items: center; min-height: 44px; padding: 12px 18px; margin-top: 10px; background: transparent; color: #f0eeea; font-size: 11px; letter-spacing: .4px; text-decoration: none; opacity: 0; transform: translateY(7px); transition: opacity 220ms ease, transform 350ms cubic-bezier(.22, 1, .36, 1); }
.catalog-card:hover .catalog-buy, .catalog-card:focus-within .catalog-buy { opacity: 1; transform: translateY(0); }
@media (min-width: 1500px) { .catalog-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 700px) { .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; } .catalog-image-wrap { height: clamp(150px, 28vh, 260px); } }
@media (hover: none) { .catalog-buy { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .view-toggle, .grid-symbol, .single-symbol, .hero-view, .catalog-view, .catalog-image, .catalog-buy { transition: none; }
}

/* Intro uses independent translate, preserving the interactive transforms. */
@keyframes intro-reveal {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
.header { animation: intro-reveal 650ms cubic-bezier(.22, 1, .36, 1) both; }
.wordmark { animation: intro-reveal 650ms cubic-bezier(.22, 1, .36, 1) 60ms backwards; }
.stage { animation: intro-reveal 650ms cubic-bezier(.22, 1, .36, 1) 140ms backwards; }
.product-info { opacity: 0; translate: 0 12px; transition: opacity 600ms ease, translate 700ms cubic-bezier(.22, 1, .36, 1); }
.has-model .product-info { opacity: 1; translate: 0 0; }
.has-model.is-inspecting .product-info { translate: 0 var(--inspection-shift); }
.loader { transition: opacity 180ms ease; }
.loader.is-dismissed { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .header, .wordmark, .stage, .product-info { animation: none; }
  model-viewer { translate: none; transition: none; }
  .loader { transition: none; }
}

.load-percent { display: block; margin-bottom: 12px; text-align: center; color: #aaa; font-size: 11px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.showroom:not(.has-model) .motion-button, .showroom:not(.has-model) .view-toggle { opacity: 0; pointer-events: none; transform: translateY(-8px); }
@media (prefers-reduced-motion: reduce) { .product-info { transition: none; } }

/* Move the rendered canvas without resizing it, preserving camera interpolation. */
model-viewer { transform: translateX(0); transition: opacity 600ms ease, translate 700ms cubic-bezier(.22, 1, .36, 1), transform 700ms cubic-bezier(.22, 1, .36, 1); }
.is-inspecting model-viewer { transform: translateX(16%); }
.piece-details { position: absolute; z-index: 1; left: clamp(28px, 7vw, 112px); top: 50%; width: min(31%, 350px); opacity: 0; visibility: hidden; transform: translate(-18px, -50%); pointer-events: none; transition: opacity 300ms ease, transform 550ms cubic-bezier(.22, 1, .36, 1), visibility 550ms; }
.is-inspecting .piece-details { opacity: 1; visibility: visible; transform: translate(0, -50%); pointer-events: auto; }
.piece-details h1 { margin: 0 0 22px; font-size: clamp(26px, 3.4vw, 46px); line-height: 1.04; font-weight: 600; letter-spacing: -1.5px; }
.piece-details p { margin: 0 0 30px; max-width: 36ch; color: #999; font-size: 14px; line-height: 1.8; }
.piece-details > * { opacity: 0; translate: 0 8px; transition: opacity 280ms ease, translate 500ms cubic-bezier(.22, 1, .36, 1); }
.is-inspecting .piece-details > * { opacity: 1; translate: 0 0; }
.is-inspecting .piece-details h1 { transition-delay: 80ms; }
.is-inspecting .piece-details p { transition-delay: 130ms; }
.is-inspecting .piece-details .details-actions { transition-delay: 180ms; }
.details-buy { width: max-content; max-width: 100%; font-size: 12px; }
@media (max-width: 700px) and (orientation: portrait) {
  .piece-details { top: auto; bottom: 0; left: 0; width: 100%; transform: translateY(14px); }
  .is-inspecting .piece-details { transform: translateY(0); }
  .piece-details h1 { font-size: 25px; margin-bottom: 9px; letter-spacing: -.8px; }
  .piece-details p { max-width: 40ch; font-size: 12px; line-height: 1.65; margin-bottom: 14px; }
  .is-inspecting .ar-button { top: 12%; bottom: auto; right: 0; left: auto; transform: none; }
}
@media (max-height: 600px) and (max-width: 700px) and (orientation: portrait) {
  .piece-details h1 { font-size: 21px; margin-bottom: 5px; }
  .piece-details p { margin-bottom: 8px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  model-viewer, .piece-details, .piece-details > * { transition: none; transition-delay: 0ms; }
}

.is-inspecting .inspect-button, .is-inspecting .inspect-button:hover { border-color: transparent; }

/* The center stays opaque: the fade only becomes visible when geometry reaches
   an edge. Mask both boundaries because the canvas moves inside the frame. */
.model-frame { position: absolute; inset: 0; overflow: hidden; }
.model-frame, .model-frame model-viewer {
  --edge-fade: clamp(20px, 4vmin, 48px);
  --edge-mask-x: linear-gradient(to right, transparent, rgb(0 0 0 / .15) calc(var(--edge-fade) * .25), rgb(0 0 0 / .5) calc(var(--edge-fade) * .5), rgb(0 0 0 / .85) calc(var(--edge-fade) * .75), #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), rgb(0 0 0 / .85) calc(100% - var(--edge-fade) * .75), rgb(0 0 0 / .5) calc(100% - var(--edge-fade) * .5), rgb(0 0 0 / .15) calc(100% - var(--edge-fade) * .25), transparent);
  --edge-mask-y: linear-gradient(to bottom, transparent, rgb(0 0 0 / .15) calc(var(--edge-fade) * .25), rgb(0 0 0 / .5) calc(var(--edge-fade) * .5), rgb(0 0 0 / .85) calc(var(--edge-fade) * .75), #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), rgb(0 0 0 / .85) calc(100% - var(--edge-fade) * .75), rgb(0 0 0 / .5) calc(100% - var(--edge-fade) * .5), rgb(0 0 0 / .15) calc(100% - var(--edge-fade) * .25), transparent);
  -webkit-mask-image: var(--edge-mask-x), var(--edge-mask-y);
  mask-image: var(--edge-mask-x), var(--edge-mask-y);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* Safari: keep native button rendering and automatic landscape text sizing predictable. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
button { -webkit-appearance: none; appearance: none; }
button, a { touch-action: manipulation; }
.header { min-height: 44px; }
.product-info { min-width: 0; }
.ar-button, .is-inspecting .ar-button { top: 18px; right: 18px; bottom: auto; left: auto; transform: none; min-height: 44px; z-index: 2; border-radius: 999px; }
.error { z-index: 5; }
.catalog-view, .piece-details { overscroll-behavior: contain; }
/* Keep long copy reachable with large text settings or a short landscape viewport. */
.piece-details { max-height: calc(100% - 24px); overflow-y: auto; scrollbar-width: thin; }

@media (any-pointer: coarse) {
  .product-info { grid-template-rows: 44px; }
  .inspect-button, .buy-button { height: 44px; }
  .catalog-buy { opacity: 1; transform: none; }
}
@media (max-width: 700px) {
  .product-info { width: min(100%, 380px); }
  .inspect-button, .buy-button { padding-inline: 10px; font-size: clamp(11px, 2.8vw, 13px); }
  .inspect-button { padding-left: 7px; gap: 6px; }
  .details-buy { padding-inline: 18px; font-size: 12px; }
}
@media (max-width: 700px) and (orientation: portrait) {
  .piece-details { max-height: 48%; padding: 4px 2px 0; }
  .piece-details p { font-size: 13px; line-height: 1.6; }
  .is-inspecting model-viewer { transform: translateY(var(--inspection-offset-y, 0px)); }
  .ar-button, .is-inspecting .ar-button { top: 4px; right: 4px; font-size: 11px; }
}
@media (orientation: landscape) and (max-height: 600px) {
  .showroom { padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); --inspection-shift: 0px; }
  .product-info { padding-top: 4px; }
  .piece-details { top: 50%; bottom: auto; left: 16px; width: min(38%, 310px); transform: translate(-18px, -50%); max-height: calc(100% - 8px); }
  .is-inspecting .piece-details { transform: translate(0, -50%); }
  .piece-details h1 { font-size: 24px; margin-bottom: 10px; letter-spacing: -.8px; }
  .piece-details p { font-size: 12px; line-height: 1.5; margin-bottom: 12px; }
  .is-inspecting model-viewer { transform: translateX(20%); }
  .ar-button, .is-inspecting .ar-button { top: 2px; right: 4px; font-size: 10px; padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  model-viewer, .piece-details, .piece-details > *, .product-info { transition: none; transition-delay: 0ms; }
}

/* On phones (including landscape), AR belongs to the inspection actions. */
@media (max-width: 700px), (max-height: 600px) and (pointer: coarse) {
  .details-actions.has-ar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: min(100%, 380px); }
  .details-actions.has-ar > .details-buy,
  .piece-details .details-actions > .ar-button {
    position: static; inset: auto; transform: none; width: 100%; min-width: 0;
    height: auto; min-height: 44px; padding: 8px; margin: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; line-height: 1.25; letter-spacing: -.15px;
    white-space: normal; text-align: center; border-radius: 999px;
  }
  .piece-details .details-actions > .ar-button { gap: 5px; background: transparent; }
  .details-actions .ar-button svg { width: 14px; height: 14px; flex-shrink: 0; }
}
