/* A cabinet drawing becomes assembled timber, then opens onto the homepage. */
.joinery-opening.opening { display: none; position: fixed; inset: 0; z-index: 1000; background: transparent; color: var(--paper); pointer-events: auto; overflow: hidden; }
.joinery-opening[hidden] { display: none !important; }
.opening-run .joinery-opening.opening { display: grid; height: auto; animation: none; }
.joinery-intro-pending body { background: var(--green); }
.opening-shutter { position: absolute; top: 0; bottom: 0; width: calc(50% + 1px); background: var(--green); }
.opening-shutter-left { left: 0; border-right: 1px solid #ad795130; }
.opening-shutter-right { right: 0; }
.opening-workshop { position: relative; align-self: center; justify-self: center; width: min(780px, 86vw); display: flex; flex-direction: column; align-items: center; gap: clamp(24px, 4vh, 42px); }
.opening-drawing { display: block; width: min(700px, 78vw); height: auto; overflow: visible; }
.opening-outline { fill: none; stroke: #d9decd; stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.opening-guides { fill: none; stroke: #aebaab; stroke-width: 1; opacity: .35; stroke-dasharray: 1; stroke-dashoffset: 1; }
.opening-grain { fill: url(#joinery-oak); stroke: #c0a17a; stroke-width: 1; }
.opening-panel-frame { fill: none; stroke: #e7d2ad; stroke-width: 1.5; }
.opening-handle { stroke: #f1e5ce; stroke-width: 3; }
.opening-piece { opacity: 0; }
.opening-wordmark { display: flex; align-items: center; gap: clamp(20px, 4vw, 36px); clip-path: inset(0 100% 0 0); }
.opening-monogram { font: 400 clamp(74px, 10vw, 112px)/.9 Georgia, serif; letter-spacing: -.14em; padding-right: 18px; }
.opening-brand { border-left: 1px solid #bdc7b580; padding-left: clamp(20px, 4vw, 36px); font-size: clamp(18px, 3vw, 26px); letter-spacing: .17em; line-height: 1.3; font-weight: 600; }
.opening-brand small { display: block; font-size: 10px; letter-spacing: .4em; margin-top: 10px; font-weight: 400; }
.opening-line { width: 56px; height: 1px; background: #c0a17a; transform: scaleX(0); }
.opening-caption { text-align: center; max-width: none; font-size: clamp(10px, 1.2vw, 12px); letter-spacing: .15em; color: #d1d9ca; clip-path: inset(0 100% 0 0); }
.opening-skip { position: absolute; bottom: max(30px, env(safe-area-inset-bottom)); right: max(6vw, 24px); border: 0; border-bottom: 1px solid #cad3c45c; background: transparent; color: #e2e8dc; font: 400 12px/1.8 Arial, sans-serif; padding: 6px 0; cursor: pointer; }
.opening-skip:focus-visible { outline-color: #e2cfac; }
.opening-replay { display: none; border-bottom: 1px solid #ad795170; margin-left: 18px; vertical-align: middle; font-size: 11px; white-space: nowrap; }
.js .opening-replay { display: inline-block; }
.hero-foot { flex-wrap: wrap; }
.joinery-intro-playing .opening-outline { animation: joinery-pencil 1050ms cubic-bezier(.4, 0, .2, 1) 150ms both; }
.joinery-intro-playing .opening-guides { animation: joinery-pencil 1100ms cubic-bezier(.4, 0, .2, 1) 50ms both; }
.joinery-intro-playing .opening-piece-left { animation: joinery-board-left 950ms cubic-bezier(.16, 1, .3, 1) 550ms both; }
.joinery-intro-playing .opening-piece-bottom { animation: joinery-board-bottom 950ms cubic-bezier(.16, 1, .3, 1) 750ms both; }
.joinery-intro-playing .opening-piece-right { animation: joinery-board-right 950ms cubic-bezier(.16, 1, .3, 1) 950ms both; }
.joinery-intro-playing .opening-wordmark { animation: joinery-brand-in 1000ms cubic-bezier(.16, 1, .3, 1) 1200ms both; }
.joinery-intro-playing .opening-line { animation: joinery-rule 700ms cubic-bezier(.16, 1, .3, 1) 1500ms both; }
.joinery-intro-playing .opening-caption { animation: joinery-brand-in 900ms cubic-bezier(.16, 1, .3, 1) 1550ms both; }
.joinery-intro-playing .opening-workshop { animation: joinery-workshop-out 800ms cubic-bezier(.55, 0, .8, .45) 2850ms both; }
.joinery-intro-playing .opening-shutter-left { animation: joinery-door-left 800ms cubic-bezier(.65, 0, .25, 1) 2850ms both; }
.joinery-intro-playing .opening-shutter-right { animation: joinery-door-right 800ms cubic-bezier(.65, 0, .25, 1) 2850ms both; }
.joinery-intro-playing .joinery-opening.opening { animation: joinery-opening-finish 800ms step-end 2850ms both; }
@keyframes joinery-pencil { to { stroke-dashoffset: 0; } }
@keyframes joinery-board-left { from { translate: -105vw 0; opacity: 1; } to { translate: 0 0; opacity: 1; } }
@keyframes joinery-board-bottom { from { translate: 0 105vh; opacity: 1; } to { translate: 0 0; opacity: 1; } }
@keyframes joinery-board-right { from { translate: 105vw 0; opacity: 1; } to { translate: 0 0; opacity: 1; } }
@keyframes joinery-brand-in { from { translate: 0 105vh; clip-path: inset(0); } to { translate: 0 0; clip-path: inset(0); } }
@keyframes joinery-rule { to { transform: scaleX(1); } }
@keyframes joinery-workshop-out { from { translate: 0 0; } to { translate: 0 -120vh; } }
@keyframes joinery-door-left { to { translate: -101% 0; } }
@keyframes joinery-door-right { to { translate: 101% 0; } }
@keyframes joinery-opening-finish { from { visibility: visible; } to { visibility: hidden; } }
@media (max-width: 760px) {
  .opening-workshop { gap: 28px; }
  .opening-drawing { width: 86vw; }
  .opening-wordmark { gap: 18px; }
  .opening-brand { padding-left: 18px; }
  .opening-caption { max-width: 28ch; line-height: 1.8; letter-spacing: .1em; }
}
@media (max-width: 359px) { .js .opening-replay { display: table; margin: 14px 0 0; } }
@media (max-height: 520px) and (min-width: 761px) {
  .opening-workshop { gap: 14px; }
  .opening-drawing { width: min(470px, 60vw); }
  .opening-monogram { font-size: 64px; }
}
@media (prefers-reduced-motion: reduce) { .joinery-opening.opening, .opening-replay { display: none !important; } }
@media print { .joinery-opening.opening, .opening-replay { display: none !important; } }
