/* The Temple of Dreams (design direction, 2026-11-25): behind a secret door, an old-world gallery of Byzantine gold
   relief, crimson and navy damask, each world alive on its own pedestal. Inside the temple its own palette governs
   (gold, crimson, navy); the rest of the site keeps indigo, cobalt, turquoise, olive and brass. Calm: the door opens
   with the scroll; the worlds are alive through slow light, haze and water, never spinning. */
body.temple { background: #0b0716; }
body.temple .topbar { position: fixed; background: linear-gradient(180deg, rgba(11,7,22,.9), rgba(11,7,22,0)); }
#temple-gl { position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: 0; display: block; opacity: 0; transition: opacity 1.2s ease; }
html.t-gl #temple-gl { opacity: 1; }
.t-still { position: fixed; inset: 0; z-index: 0; background: #0b0716 url("../media/temple/dreams/hall.jpg") center / cover no-repeat; opacity: .55; transition: opacity 1s; }
html.t-gl .t-still { opacity: 0; }
html.lite .t-still { background-image: url("../media/temple/dreams/hall-960.jpg"); }
body.temple main { position: relative; z-index: 2; width: auto; margin: 0; padding: 0; }

/* ---------- the door ---------- */
.t-door { height: 220vh; }
.t-door-sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden;
  background: #0b0716 url("../media/temple/tex/damask-navy.jpg") 0 0 / 360px; }
.t-door-sticky::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 50%, rgba(11,7,22,.1), rgba(11,7,22,.85)); pointer-events: none; }
.t-doorway { position: absolute; left: 50%; top: 36%; width: min(34vh, 56vw); aspect-ratio: 2 / 3; transform: translate(-50%, -50%) scale(calc(1 + var(--open, 0) * 2.2)); perspective: 1400px; }
.t-doorway .glow { position: absolute; inset: 6% 10%; background: radial-gradient(closest-side, #fff4d6, #f2c36b 40%, rgba(242,160,60,.0) 100%); opacity: calc(.15 + var(--open, 0) * .85); }
.t-doorway .leaf { position: absolute; top: 0; bottom: 0; width: 50%; background: url("../media/temple/dreams/door.jpg") 0 0 / 200% 100% no-repeat; backface-visibility: hidden; box-shadow: 0 0 40px rgba(0,0,0,.6); }
.t-doorway .leaf.l { left: 0; transform-origin: 0 50%; transform: rotateY(calc(var(--open, 0) * -100deg)); }
.t-doorway .leaf.r { right: 0; background-position: 100% 0; transform-origin: 100% 50%; transform: rotateY(calc(var(--open, 0) * 100deg)); }
.t-door-copy { position: relative; z-index: 2; text-align: center; max-width: 640px; padding: 0 20px; transform: translateY(26vh); opacity: calc(1 - var(--open, 0) * 1.6); }
.t-door-copy h1 { margin: 6px 0 12px; font: 400 clamp(34px, 5vw, 76px)/1.04 var(--serif); letter-spacing: .04em; background: linear-gradient(180deg, #fff3d6, #d9a94a 65%, #8a5a22); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.t-door-copy .lede { font: 400 clamp(17px, 1.4vw, 21px)/1.5 var(--book); color: #f1e6cf; text-shadow: 0 2px 12px #000; }
.t-door-copy .eyebrow { color: #e7c27a; }
.t-scroll { font: 500 10px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #e7c27a; }
.t-door-sticky { opacity: calc(1 - max(0, var(--open, 0) - .82) * 5.5); }

/* ---------- the hall: one caption per pedestal, set beside the world it names ---------- */
.t-hall { height: calc(var(--n, 6) * 100vh); }
.t-hall-sticky { position: sticky; top: 0; height: 100vh; pointer-events: none; }
.t-worlds { list-style: none; margin: 0; padding: 0; }
.t-worlds li { position: absolute; bottom: 9vh; width: min(380px, 86vw); padding: 18px 20px 20px; pointer-events: none; visibility: hidden; opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease, visibility 0s linear .6s;
  background: rgba(16,6,10,.78) url("../media/temple/tex/damask-crimson.jpg") 0 0 / 300px; background-blend-mode: multiply;
  border-style: solid; border-width: 20px 16px 10px 16px; border-image: url("../media/temple/frame/card2.webp") 106 85 53 83 / 20px 16px 10px 16px / 0 stretch; }
.t-worlds li.left { left: 4vw; } .t-worlds li.right { right: 4vw; }
.t-worlds li.on { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }   /* inactive cards neither paint, take clicks nor take focus */
.t-worlds .el { margin: 0; font: 600 10px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #e7c27a; }
.t-worlds h3 { margin: 6px 0 8px; font: 400 clamp(22px, 2vw, 30px)/1.1 var(--serif); color: #fbecc8; }
.t-worlds p.line { margin: 0 0 12px; font: 400 16px/1.45 var(--book); color: #ead9bf; }
.t-worlds figure { margin: 0 0 10px; }
.t-worlds img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid rgba(231,194,122,.45); }
.t-worlds figcaption { margin-top: 4px; font: 400 10.5px/1.3 var(--sans); color: rgba(234,217,191,.65); }
.t-worlds a { color: #e7c27a; font: 600 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
@media (max-width: 760px) { .t-worlds li, .t-worlds li.left, .t-worlds li.right { left: 50%; right: auto; transform: translate(-50%, 14px); bottom: 3vh; padding: 12px 14px 14px; }
  .t-worlds li.on { transform: translate(-50%, 0); } .t-worlds img { aspect-ratio: 16 / 9; } .t-worlds p.line { font-size: 14.5px; } }

/* ---------- dream it ---------- */
.t-dream { position: relative; min-height: 100vh; padding: 14vh var(--gutter) 12vh; display: grid; place-items: center;
  background: #0b0716 url("../media/temple/dreams/dome.jpg") center / cover no-repeat; }
html.lite .t-dream { background-image: url("../media/temple/dreams/dome-960.jpg"); }
.t-dream::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #0b0716, rgba(11,7,22,.35) 30%, rgba(11,7,22,.55) 70%, #0b0716); }
.t-dream-inner { position: relative; width: min(860px, 100%); padding: clamp(20px, 3vw, 40px); background: rgba(14,8,20,.82) url("../media/temple/tex/damask-navy.jpg") 0 0 / 320px !important; background-blend-mode: multiply !important; border: 1px solid rgba(231,194,122,.4); }
.t-dream-inner h2 { color: #fbecc8; font: 400 clamp(26px, 3vw, 44px)/1.1 var(--serif); margin: 4px 0 10px; }
.t-dream-inner .lede { font: 400 clamp(17px, 1.3vw, 20px)/1.5 var(--book); color: #ead9bf; }
#dream-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: 18px; }
#dream-form label.f { display: flex; flex-direction: column; gap: 6px; font: 600 10.5px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #e7c27a; }
#dream-form .wide { grid-column: 1 / -1; }
#dream-form input, #dream-form textarea { font: 400 17px/1.4 var(--book); color: #f6ead2; padding: 11px 12px; background: rgba(8,4,14,.8); border: 1px solid rgba(231,194,122,.35); border-radius: 0; }
#dream-form input:focus, #dream-form textarea:focus { outline: 2px solid rgba(231,194,122,.7); outline-offset: 1px; }
#dream-form fieldset { border: 1px solid rgba(231,194,122,.25); padding: 14px; margin: 0; }
#dream-form legend { padding: 0 6px; font: 600 10.5px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #e7c27a; }
.t-els { display: flex; flex-wrap: wrap; gap: 8px; }
.t-els input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.t-els span { display: inline-block; padding: 6px 11px; border: 1px solid rgba(231,194,122,.5); color: #f1dcb0; font: 500 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.t-els input:checked + span { background: rgba(124,34,15,.6); border-color: #e7c27a; color: #fff; }
.t-els input:focus-visible + span { outline: 2px solid #e7c27a; }
@media (max-width: 640px) { #dream-form { grid-template-columns: 1fr; } }
.t-concept { position: fixed; left: 12px; bottom: 10px; z-index: 3; margin: 0; font: 500 9px/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: rgba(242,234,219,.6); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .t-worlds li { transition: none; } }
/* the dream card stays navy damask here (this file loads after v2.css), so v2's parchment ink rules left the element
   chips, the status line and the labels dark-on-navy. Light text on the dark card. */
.t-dream-inner p, .t-dream-inner .lede, .t-dream-inner .status { color: #ead9bf !important; }
.t-dream-inner label.f, .t-dream-inner legend, .t-dream-inner .eyebrow { color: #d9b77a !important; }
.t-dream-inner h2 { color: #fbecc8 !important; }
.t-els span { color: #f1dcb0 !important; border-color: rgba(231,194,122,.5) !important; }
.t-els input:checked + span { background: rgba(124,34,15,.85) !important; color: #fff !important; border-color: #e7c27a !important; }
/* the fixed concept-render credit sat on top of "Copy my dream" at 390 px. On phones it stops being fixed and
   closes the page instead, under the form (the pedestal cards still carry their own photo credits). */
@media (max-width: 760px) { .t-concept { position: static; padding: 14px var(--gutter, 16px) 22px; line-height: 1.6; } }
