/* Hallmark · Stillroom cinematic edition · visual depth follows the coffee counter, from printed menu to the glass and window. */
:root {
  --stage: #151a15;
  --stage-lit: #46513b;
  --stage-muted: #aab29b;
  --stage-rule: #777f685a;
  --stage-glass: #151a15e5;
  --gallery-shadow: #171c1460;
  --shelf-wash: #7583653d;
  --panel-gap: clamp(16px, 2.4vw, 32px);
}

::selection { color: var(--night); background: var(--linden); }

.reading-progress { position: fixed; inset: 0 0 auto; height: 2px; pointer-events: none; z-index: 5; }
.reading-progress span { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left; background: var(--linden); }
.hero { overflow: clip; }
.hero-image { perspective: 1100px; }
.hero h1 span { display: block; }

.menu-section { padding-block: clamp(64px, 7vw, 112px) clamp(72px, 10vw, 136px); }
.menu-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-block: 36px 20px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.menu-tools .menu-filters { margin: 0; }
.menu-count { color: var(--ink-muted); font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu-display, .menu-views { display: flex; align-items: center; gap: 8px; }
.menu-display { gap: 16px; }
.menu-views button { min-height: 44px; padding: 4px 12px; font-size: .88rem; color: var(--ink); border: 1px solid var(--line); background: var(--paper); }
.menu-views button:hover { border-color: var(--ink); }
.menu-views button[aria-pressed="true"] { color: var(--ivory); border-color: var(--forest); background: var(--forest); }
.menu-views button[aria-pressed="true"]:focus-visible { outline-color: var(--forest); }
.menu-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px) var(--panel-gap); perspective: 1350px; }
.menu-item { min-width: 0; padding: 0; border: 0; gap: 8px; }
.menu-image { grid-column: 1 / -1; position: relative; margin-bottom: 8px; overflow: clip; aspect-ratio: 4 / 5; background: var(--stage); color: var(--ivory); border: 1px solid var(--stage-rule); transform-origin: 50% 56%; }
.menu-image img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.025); }
.menu-image::after { content: ""; position: absolute; inset: auto 0 0; height: 35%; background: linear-gradient(transparent, var(--gallery-shadow)); pointer-events: none; }
.menu-inspect { position: absolute; z-index: 1; right: 12px; bottom: 12px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-light); color: var(--ivory); background: var(--stage-glass); }
.menu-inspect::before, .menu-inspect::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 14px; height: 1px; background: currentColor; translate: -50% -50%; }
.menu-inspect::after { rotate: 90deg; }
.menu-inspect:hover { color: var(--night); background: var(--linden); }
.menu-inspect:focus-visible { outline-color: var(--ivory); }
.menu-item h3 { font-size: clamp(1.65rem, 2.5vw, 2.45rem); }
.menu-item p { font-size: .86rem; line-height: 1.5; }
.menu-item [data-price-label] { font-size: .91rem; }

.menu-shelf { --shelf-shift: clamp(96px, 18vw, 228px); position: relative; isolation: isolate; overflow: clip; background: var(--stage); color: var(--ivory); }
.menu-shelf::before { position: absolute; inset: 0; content: ""; pointer-events: none; background: radial-gradient(ellipse at 50% 27%, var(--shelf-wash), transparent 69%); z-index: -1; }
.shelf-stage { position: relative; height: clamp(372px, 34vw, 472px); perspective: 1030px; perspective-origin: 50% 50%; transform-style: preserve-3d; touch-action: pan-y; }
.shelf-stage:focus-visible { outline: 2px solid var(--linden); outline-offset: -4px; }
.shelf-stage::after { position: absolute; left: 8%; right: 8%; top: 78%; height: 20%; border-top: 1px solid var(--stage-rule); content: ""; pointer-events: none; transform: rotateX(60deg); }
.shelf-card { position: absolute; left: 50%; top: 50%; width: clamp(148px, 25%, 294px); aspect-ratio: 4 / 5; padding: 0; border: 1px solid var(--stage-rule); background: var(--stage); color: var(--ivory); transform: translate3d(calc(-50% + var(--slot) * var(--shelf-shift)), -50%, calc(var(--distance) * -134px)) rotateY(calc(var(--slot) * -28deg)); transition: transform .64s var(--ease), opacity .45s var(--ease), border-color .23s var(--ease); }
.shelf-card img { width: 100%; height: 100%; object-fit: cover; }
.shelf-card[data-layer="0"] { z-index: 3; border-color: var(--linden); box-shadow: 0 20px 36px var(--gallery-shadow); }
.shelf-card[data-layer="1"] { opacity: .75; z-index: 2; }
.shelf-card[data-layer="2"] { opacity: .43; z-index: 1; }
.shelf-card[data-layer="hidden"] { opacity: 0; pointer-events: none; }
.shelf-card:hover { opacity: 1; border-color: var(--linden); }
.shelf-counter { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 20px; width: min(550px, calc(100% - 48px)); margin: 0 auto 28px; padding-top: 16px; border-top: 1px solid var(--stage-rule); }
.shelf-detail { text-align: center; min-width: 0; }
.shelf-item-name { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
.shelf-item-name h3 { font: 400 clamp(2.4rem, 4vw, 3.9rem)/.9 var(--display); }
.shelf-item-name span { color: var(--linden); font-size: .91rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.shelf-detail p { color: var(--fog); font-size: .89rem; margin-top: 8px; }
.shelf-detail .text-link { justify-content: center; }
.direction { position: relative; color: var(--ivory); background: transparent; border: 1px solid var(--stage-rule); width: 44px; height: 44px; }
.direction::before, .direction::after { position: absolute; left: 50%; top: 50%; content: ""; }
.direction::before { width: 14px; height: 1px; background: currentColor; translate: -50% -50%; }
.direction::after { width: 6px; height: 6px; border-block-start: 1px solid currentColor; border-inline-end: 1px solid currentColor; translate: 0 -50%; rotate: 45deg; }
.direction[data-orbit="-1"]::after, .direction[data-shelf-turn="-1"]::after { translate: -100% -50%; rotate: -135deg; }
.direction:hover { color: var(--night); background: var(--linden); }
.direction:focus-visible { outline-color: var(--ivory); }
.motion-off .shelf-card { transition: none; }

.feature { background: var(--stage); }
.pour-stage { display: grid; align-items: center; }
.feature-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: var(--column-gap); }
.feature-visual { position: relative; aspect-ratio: 1 / 1.06; overflow: clip; isolation: isolate; border: 1px solid var(--stage-rule); background: var(--stage); }
.feature-visual .feature-photo { position: absolute; inset: 0; aspect-ratio: auto; outline: 0; }
.feature-visual .feature-photo img { object-position: center 55%; }
.feature-copy h2 { font-size: clamp(5rem, 8.6vw, 9rem); }
.scene-view { position: absolute; inset: 0; isolation: isolate; overflow: clip; touch-action: pan-y; cursor: grab; background: radial-gradient(ellipse at 51% 38%, var(--stage-lit), var(--stage) 69%); }
.scene-view.is-dragging { cursor: grabbing; }
.scene-view canvas { position: absolute; inset: 0; display: block; max-width: 100%; width: 100%; height: 100%; outline-offset: -5px; }
.scene-dial { pointer-events: none; position: absolute; border: 1px solid var(--stage-rule); border-radius: 50%; width: 80%; height: 24%; left: 10%; bottom: 12%; }
.scene-dial::before, .scene-dial::after { position: absolute; content: ""; border: 1px solid var(--stage-rule); border-radius: inherit; inset: 16% 11%; }
.scene-dial::after { inset: 31% 24%; }
.scene-cross { pointer-events: none; position: absolute; top: 48%; left: 6%; width: 88%; height: 1px; border-inline: 10px solid var(--stage-rule); }
.scene-mode { position: absolute; z-index: 1; inset: auto auto 16px 16px; display: flex; background: var(--stage-glass); border: 1px solid var(--stage-rule); }
.scene-mode button { min-height: 44px; padding: 4px 16px; color: var(--fog); background: transparent; border: 0; font-size: .86rem; }
.scene-mode button:hover, .scene-mode button[aria-pressed="true"] { background: var(--linden); color: var(--night); }
.scene-mode button:focus-visible { outline-color: var(--ivory); }
.pour-panel { margin-top: 32px; max-width: 380px; }
.pour-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.pour-steps button { min-height: 44px; border: 0; border-top: 2px solid var(--stage-rule); color: var(--fog); background: transparent; padding: 8px 4px; text-align: left; font-size: .86rem; }
.pour-steps button[aria-pressed="true"], .pour-steps button:hover { color: var(--ivory); border-color: var(--linden); }
.pour-note { font-size: .94rem; min-height: 3.2em; color: var(--fog); margin-block: 8px 16px; }
.scene-orbit { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--fog); font-size: .84rem; }

.room-window { overflow: clip; isolation: isolate; outline: 1px solid var(--line); outline-offset: -1px; }
.room-image { outline: none; }
.footer-controls { display: flex; gap: 24px; align-items: center; }
.footer-controls [aria-pressed="false"] { color: var(--fog); text-decoration-style: dashed; }

dialog.menu-detail { width: min(790px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; overflow: auto; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr); }
.detail-photo { display: block; width: 100%; height: 100%; min-height: 350px; max-height: 600px; object-fit: cover; background: var(--stage); }
.detail-content { display: grid; align-content: space-between; gap: 24px; min-width: 0; padding: 24px; }
.detail-close { justify-self: end; }
.detail-copy h2 { font-size: clamp(3.2rem, 6vw, 5.5rem); line-height: .87; }
.detail-copy strong { font-variant-numeric: tabular-nums; }
.detail-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--ink-muted); font-size: .88rem; }

@media (min-width: 960px) and (min-height: 760px) {
  .pour-stage { min-height: min(100svh, 960px); }
  .feature-visual { max-height: 74svh; }
}

@media (max-width: 860px) {
  .menu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-item h3 { font-size: clamp(1.55rem, 4vw, 2.4rem); }
}

@media (max-width: 640px) {
  .nav-links { gap: 12px; }
  .menu-tools { margin-block: 20px 16px; }
  .menu-image { margin-bottom: 4px; }
  .menu-list { row-gap: 32px; }
  .menu-item { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .menu-item h3 { min-height: 1lh; }
  .menu-item p { margin-top: 4px; }
  .menu-inspect { right: 4px; bottom: 4px; }
  .shelf-stage { height: clamp(240px, 77vw, 418px); }
  .shelf-card { width: clamp(132px, 48%, 228px); }
  .shelf-counter { gap: 8px; width: calc(100% - 24px); margin-bottom: 16px; }
  .shelf-detail p { font-size: .82rem; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .feature-copy { grid-row: auto; }
  .feature-visual { aspect-ratio: 1 / 1.05; }
  .feature-copy h2 { font-size: clamp(4rem, 12vw, 6rem); }
  .pour-panel { margin-top: 24px; }
  .scene-mode { bottom: 8px; left: 8px; }
  .footer-frame { display: flex; flex-wrap: wrap; }
  .footer-frame p { order: 2; }
  .footer-controls { gap: 16px; flex-wrap: wrap; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .detail-photo { min-height: 0; height: min(43svh, 370px); object-position: center 56%; }
  .detail-content { padding: 16px; gap: 12px; }
}

@media (max-width: 455px) {
  .nav-room { display: none !important; }
  .menu-tools { flex-wrap: wrap; gap: 8px; }
  .menu-count { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress { display: none; }
}
