/* Light stays on the set behind the photographs. */
.winter-scene { position:relative; isolation:isolate; }
.winter-scene > .winter-scenery {
  display:block; position:absolute; inset:0; overflow:hidden; pointer-events:none;
  z-index:-1; border:0; margin:0; padding:0;
}
.winter-scenery::after {
  content:""; position:absolute; inset:-35px -50px;
  background:var(--scene-art); opacity:var(--ink,.6);
}
@media (prefers-reduced-motion:no-preference) {
  body:not(:has(#quiet[aria-pressed="true"])) .winter-scenery::after {
    animation:scene-drift var(--tempo,9s) ease-in-out infinite alternate paused;
  }
  body:not(:has(#quiet[aria-pressed="true"])) .scene-visible > .winter-scenery::after {animation-play-state:running;}
  @keyframes scene-drift {
    from { transform:translate(var(--from-x,-15px),var(--from-y,-10px)); }
    to { transform:translate(var(--to-x,24px),var(--to-y,18px)); }
  }
}
#front,.sofa-studio,.fourth-wall {
  --scene-art:linear-gradient(108deg,transparent 8%,#f3c87c24 22%,transparent 36%,transparent 67%,#f9dfb21c 78%,transparent 90%);
  --from-x:-42px; --to-x:40px; --tempo:7s;
}
#charlie,#card {
  --scene-art:radial-gradient(circle at 21% 17%,#ffe9ad 0 1px,transparent 2px) 0 0/109px 137px,
    radial-gradient(circle at 80% 39%,#fff5e0 0 1.5px,transparent 3px) 0 0/183px 155px,
    radial-gradient(ellipse at 8% 52%,#ffce9533,transparent 44%);
}
#charlie {background:linear-gradient(118deg,#f2c8bb,#fff3dc 63%,#efcdb6);--ink:.95;}
#family-radio,#sunday-extra > summary,.issue-desk {
  --scene-art:repeating-radial-gradient(ellipse at 110% 105%,transparent 0 8px,#9b542529 9px,transparent 10px 15px);
  --from-y:-6px; --to-y:6px; --tempo:12s;
}
#family-radio {background:#f8d697;}
.issue-desk {background:linear-gradient(130deg,#503044,#784653 50%,#503346);--ink:.4;}
#big-brother,#toy-drawer > summary,.album-siblings {
  --scene-art:repeating-linear-gradient(134deg,transparent 0 56px,#b5846240 56px 58px,transparent 58px 63px,#b5846229 63px 65px,transparent 65px 125px);
  --tempo:14s;
}
#big-brother {background:#f3e0c3;}
#toy-drawer > summary {background:#503049;}
.album-siblings {background:linear-gradient(120deg,#332543,#55354b);}
.album-arms {
  background: #4a1620 url("assets/mistletoe-velvet.webp") center / 100% 100% no-repeat;
  --scene-art: radial-gradient(ellipse at 78% 10%, #ffe3af1a, transparent 37%);
}
.album-arms .view-photo {
  border: 3px solid #fff0d9; box-shadow: 0 8px 20px #22090b66;
}
.album-arms h2 { text-wrap: balance; }
@media (max-width: 600px) {
  .album-arms { background-image: url("assets/mistletoe-velvet-phone.webp"); }
  .album-arms h2 { max-width: 75%; }
}
.fourth-wall {background-color:#322841;}
#gift-scene,.parcel-run {background:radial-gradient(ellipse at center,#54435a,#292434 86%);}
.parcel-run,#family-cinema > summary {
  --scene-art:conic-gradient(from 130deg at 93% 5%,transparent,#ffe3ac25 15deg,transparent 30deg,transparent 42deg,#ffe3ac18 50deg,transparent 64deg);
  --from-x:-38px; --to-x:38px; --tempo:6s;
}
#cookie-curling,.album-outside {
  --scene-art:repeating-linear-gradient(155deg,transparent 0 79px,#d3edff22 80px,transparent 82px 140px),
    radial-gradient(circle at 12% 22%,#e7f6ffb3 0 1px,transparent 2px) 0 0/117px 91px;
}
#cookie-curling {background:linear-gradient(135deg,#345972,#233e5c 65%,#303852);}
#card {background:radial-gradient(ellipse at 58% 4%,#34485c,#182537 62%);}

/* Frame the opening print with the moonlit evergreen illustration. */
#front {
  background:
    linear-gradient(0deg, #061d29a6, transparent 17%),
    linear-gradient(100deg,#07192788, #07192755 27%, transparent 62%),
    url("assets/winter-wings.webp") center center / cover no-repeat,
    #102434;
}
#front .show-title { text-shadow:0 1px 5px #091723; }
#front .card-inside,#front summary { text-shadow:none; }
#front .show-frame:has(#feature-still[data-cut="family"])::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:url("assets/greenhouse-frost.png") center/100% 100% no-repeat,
    linear-gradient(90deg,#b2d8ea60,transparent 29%,transparent 78%,#bbd9e554);
}
@media(max-width:700px) {
  #front { background-position:center,center,64% center; }
  #front .show-title > p,#front .card-enclosures a,#front .show-billing {text-shadow:0 1px 5px #031421,0 1px 8px #031421;}
}

/* A pair of prints hinged into the family album. */
.album-siblings {
  background: radial-gradient(ellipse at 50% 0, #fff9e9, transparent 72%), #efddbe;
  color: #472c35;
  padding-block: clamp(40px, 6vw, 82px);
  --scene-art: radial-gradient(ellipse at 85% 46%, #ae796d1f, transparent 48%);
}
.sibling-intro { text-align: center; }
.sibling-intro h2 em { color: #853749; }
.sibling-intro p { margin: 12px auto; }
.sibling-sheet {
  margin-top: clamp(26px, 4vw, 52px);
  max-width: 800px; grid-template-columns: .92fr 1.08fr;
  align-items: center; gap: clamp(12px, 3vw, 32px);
}
.sibling-sheet .album-shot {
  padding: clamp(5px, 1vw, 12px); background: #fff9ea;
  box-shadow: 0 1px 1px #51351f44, 0 6px 16px #54372a27;
}
.sibling-sheet figure:first-child { margin-bottom: 7%; transform: rotate(-2.5deg); }
.sibling-sheet figure:last-child { transform: rotate(2deg); }
.sibling-sheet .view-photo { box-shadow: none; }
.sibling-sheet figcaption { padding: 9px 2px 3px; }
#toy-drawer { background: #623541; }
#toy-drawer > summary {
  display: flex; gap: clamp(12px, 3vw, 30px); justify-content: center;
  width: 100%; padding: 12px max(5%, calc((100% - 940px)/2));
  background: radial-gradient(ellipse at center, #854655, #562c3a);
}
#toy-drawer > summary img { width: clamp(68px, 12vw, 120px); height: 52px; object-fit: contain; }
#toy-drawer > summary strong { font-weight: 400; font-style: italic; }
@media (max-width: 620px) {
  .sibling-intro p { max-width: 28ch; }
  .sibling-sheet { grid-template-columns: 1fr; max-width: 390px; gap: 0; }
  .sibling-sheet figure:first-child { width: 75%; margin: 0; }
  .sibling-sheet figure:last-child { width: 79%; justify-self: end; margin-top: 8px; }
}

/* Set the greeting like two lines from a foil-stamped card. */
@media (min-width: 701px) {
  #front .show-title h1 { display: grid; justify-items: center; gap: 6px; margin-bottom: 22px; }
  #front .show-title h1 b {
    display: flex; align-items: center; gap: .8em; padding-left: .25em;
    font: 500 clamp(15px, 1.65vw, 26px)/1.2 Georgia, serif;
    letter-spacing: .32em; text-transform: uppercase; text-shadow: none;
  }
  #front .show-title h1 b::before, #front .show-title h1 b::after {
    content: ""; width: clamp(25px, 3vw, 54px); height: 3px; border-block: 1px solid #bc965e;
  }
  #front .show-title h1 em { font-size: clamp(65px, 7.6vw, 116px); }
}

.sibling-sheet .hug-pair {
  display: grid;
  align-self: center;
  transform: rotate(-2.5deg);
}
.hug-pair > figure { grid-area: 1 / 1; }
.hug-pair:has(details[open]) > figure { display: none; }
.sibling-sheet .hug-pair figure {
  width: 100%; margin: 0; transform: none;
}
.hug-print { grid-area: 2 / 1; text-align: center; }
.hug-print[open] { grid-area: 1 / 1 / 3 / 2; display: flex; flex-direction: column; }
.hug-print[open] summary { order: 1; }
@media (max-width: 620px) {
  .sibling-sheet .hug-pair { width: 80%; }
}
@media (max-width: 620px) {
  #big-brother .eldest-small {
    width: 100%; max-width: 410px; margin-inline: auto;
    grid-template-columns: 1fr; gap: 12px;
  }
  #big-brother .eldest-small figure {
    padding: 5px 5px 8px; background: #fff7e6; box-shadow: 0 3px 11px #54372a2b;
  }
  #big-brother .eldest-small figure:first-child { width: 91%; margin: 0; }
  #big-brother .eldest-small figure:last-child { width: 76%; justify-self: end; }
  #big-brother .eldest-small figcaption { padding-inline: 4px; }
}

.greenhouse-heading { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2vw, 24px); margin-bottom: clamp(18px, 3vw, 32px); }
.greenhouse-heading svg { width: clamp(49px, 10vw, 109px); height: auto; flex: none; color: #f4d7a2; transform: rotate(-4deg); }
.album-outside .greenhouse-heading h2 { margin: 0; }

/* Light moves across the paper; the photographs stay still enough to read. */
.winter-scene > .winter-scenery::before {
  content:""; position:absolute; inset:-4%; pointer-events:none;
  background:radial-gradient(ellipse at 16% 24%, #ffdb9752, transparent 34%),
             radial-gradient(ellipse at 85% 74%, #c9dbe62a, transparent 30%);
  opacity:.38;
}
.winter-scenery i { position:absolute; width:3px; height:3px; border-radius:50%; background:#fff6d8; opacity:.65; }
.winter-scenery i:nth-child(3n) { width:5px; height:5px; filter:blur(1px); opacity:.42; }
#front .show-grid { column-gap:clamp(24px,4vw,64px); }

@media (prefers-reduced-motion:no-preference) {
  body:not(:has(#quiet[aria-pressed="true"])) .scene-visible > .winter-scenery::before {
    animation:window-light 11s ease-in-out infinite alternate;
  }
  body:not(:has(#quiet[aria-pressed="true"])) .scene-visible .winter-scenery i {
    animation:fall-past-glass var(--travel) linear var(--delay) infinite;
  }
  body:not(:has(#quiet[aria-pressed="true"])) #front.cover-arrival .show-print {
    animation:set-print-down 1s cubic-bezier(.18,.75,.18,1) both;
  }
  body:not(:has(#quiet[aria-pressed="true"])) #front.cover-arrival .show-title {
    animation:ink-arrives .72s ease-out both;
  }
  @keyframes window-light { to { transform:translate(4%,2%) scale(1.06); opacity:.74; } }
  @keyframes fall-past-glass {
    0% {transform:translate(-10px,-52px);opacity:0;}
    24% {opacity:.7;}
    84% {opacity:.48;}
    100% {transform:translate(20px,74px);opacity:0;}
  }
  @keyframes set-print-down { from {translate:2% 24px; rotate:3deg; opacity:.25;} to {translate:0 0; rotate:0deg; opacity:1;} }
  @keyframes ink-arrives { from {translate:0 12px; opacity:.2;} to {translate:0 0; opacity:1;} }
}

.glove-single:not([hidden]) {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 0 12px;
  max-width: 300px;
  margin: 12px 0 0;
  padding: 8px 0;
  border-block: 1px solid #b99a73;
}
.glove-single img { display: block; width: 60px; height: 60px; transform: rotate(-4deg); box-shadow: 1px 2px 4px #40231c44; }
.glove-single small, .glove-single strong { display: block; }
.glove-single small { font: italic 13px Georgia, serif; }
.glove-single strong { font: 24px/1.1 S, Georgia, serif; margin-top: 2px; }
#drive-record, .quiet-chorus { font: 15px/1.3 B, sans-serif; }
#drive-record { background: none; border: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.quiet-chorus, body:has(#quiet[aria-pressed="true"]) #drive-record { display: none; }
body:has(#quiet[aria-pressed="true"]) .quiet-chorus { display: block; margin: 5px 0; }
#drive-status:not(:empty) { grid-column: 1 / -1; }

.hug-pair .view-photo { position: relative; overflow: hidden; }
.hug-pair .view-photo .peek-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hug-print summary {
  width: fit-content; min-height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  position: relative; z-index: 1; margin: -2px 7% 0 auto; padding: 6px 13px 6px 18px;
  border: 1px solid #77333d; border-top: 0; border-radius: 0 0 5px 5px;
  background: repeating-linear-gradient(90deg,#0000 0 2px,#ffffff0c 3px),#8b3d47;
  box-shadow: inset 0 3px 4px #401d2966, 0 2px 2px #59272836;
  color: #fff0d2; text-decoration: none; font: italic 17px/1.1 S,Georgia,serif;
  transform: translateX(var(--tug,0px)); touch-action: pan-y pinch-zoom; user-select: none; cursor: grab;
}
.hug-print summary:active { cursor: grabbing; }
.hug-print summary::-webkit-details-marker { display: none; }
.hug-print summary span:nth-child(2), .hug-print[open] summary span:first-child { display: none; }
.hug-print[open] summary span:nth-child(2) { display: inline; }
.peek-arrow { display: inline-flex; align-items: center; width: 25px; }
.peek-arrow svg { width: 100%; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hug-print[open] .peek-arrow { order: -1; transform: rotate(180deg); }

.glasshouse-lights { text-align: center; margin: -4px 0 clamp(18px, 3vw, 32px); }
.glasshouse-lights[hidden], .glasshouse-status:empty { display: none; }
#glasshouse-switch {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: 8px 13px; min-height: 44px; border: 1px solid #dabf88; border-radius: 24px;
  background: #102e32; color: #ffedc8;
  font: italic 18px/1.2 S, Georgia, serif; cursor: pointer;
}
#glasshouse-switch:focus-visible { outline: 3px solid #fff1c6; outline-offset: 4px; }
.glasshouse-rocker { width: 29px; height: 17px; padding: 2px; border: 1px solid currentColor; border-radius: 12px; box-sizing: border-box; }
.glasshouse-rocker::before { content: ""; display: block; width: 11px; height: 11px; background: currentColor; border-radius: 50%; }
#glasshouse-switch[aria-pressed="true"] { background: #f6dfac; color: #28363d; }
#glasshouse-switch[aria-pressed="true"] .glasshouse-rocker::before { transform: translateX(12px); }
.glasshouse-status { display: block; margin: 6px auto 0; color: #fff2d9; font: 15px/1.3 B, sans-serif; }
.greenhouse-pair .view-photo { position: relative; }
.greenhouse-pair .glasshouse-night { position: absolute; inset: 0; height: 100%; width: 100%; opacity: 0; pointer-events: none; }
.greenhouse-pair.christmas-eve .glasshouse-night { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  body:not(:has(#quiet[aria-pressed="true"])) .glasshouse-night { transition: opacity .75s ease-in-out; }
  body:not(:has(#quiet[aria-pressed="true"])) .glasshouse-rocker::before { transition: transform .22s ease; }
}
