/* Christmas at Hope — site styles */

:root {
  --red: #c8342b;
  --maroon: #6e1f1c;
  --pine: #2f5d3a;
  --pine-dark: #1f4229;
  --gold: #f2c94c;
  --cream: #fff4dc;
  --night: #1d2a5a;
  --night-deep: #131c3f;
  --blue: #4a63c9;
  --lime: #e8ee4f;
  --indigo: #3527a6;
  --purple: #4e2380;
  --olive: #1e1f1a;
  --brick: #b8282c;
  --flame: #e3402f;
  --green: #2f8134;
  --snow-blue: #a9c8f0;
  --sun: #f6d34a;
  --brown: #4b2a1d;
  --ink: #2a1a10;

  --display: 'DreamPlanner', 'CNHeader', Impact, sans-serif;
  --script: 'Garland Script', cursive;
  --body: 'Epilogue', 'FZHanYH', system-ui, sans-serif;

  --gutter: 16px;
  --radius: 14px;
  --max: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font: 400 16px/1.55 var(--body);
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
:lang(zh-Hans) body, :lang(zh-Hans) { --body: 'FZHanYH', 'Epilogue', system-ui, sans-serif; --display: 'CNHeader', 'DreamPlanner', sans-serif; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 800;
}
.skip:focus { left: 8px; }

.script { font-family: var(--script); font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--gutter);
  background: rgba(19, 28, 63, .82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.logo img { width: 64px; height: auto; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 8px 10px; border-radius: 20px;
}
.site-nav a:hover { background: rgba(255, 255, 255, .1); }
.lang-toggle {
  display: inline-flex; gap: 4px; align-items: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 20px; padding: 6px 12px; font-weight: 800; font-size: 14px;
}
.lang-toggle [data-lang] { opacity: .5; }
html[lang="en"] .lang-toggle [data-lang="en"],
html[lang="zh-Hans"] .lang-toggle [data-lang="zh"] { opacity: 1; color: var(--gold); }
@media (max-width: 420px) { .site-nav a[href="#house"] { display: none; } }

/* ---------- Shared bits ---------- */
section { position: relative; scroll-margin-top: 62px; }
.section-title {
  font: 400 clamp(34px, 8vw, 64px)/1 var(--display);
  text-transform: uppercase; letter-spacing: .01em;
  margin: 0 0 10px; text-align: center;
}
.section-title .script { color: var(--gold); font-size: 1.15em; }
.section-sub { margin: 0 auto 28px; max-width: 34em; text-align: center; opacity: .88; }
.tag {
  display: inline-block; font: 400 15px/1 var(--display); letter-spacing: .06em; text-transform: uppercase;
  background: var(--lime); color: var(--ink); padding: 7px 10px 6px; border-radius: 3px;
}
mark { background: none; color: var(--lime); }
.spark { display: inline-block; width: .8em; height: .8em; vertical-align: .05em; margin-left: .1em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Brochure decorations */
.holly-top { position: relative; }
.holly-top::before {
  content: ""; position: absolute; left: 0; right: 0; top: -34px; height: 86px; z-index: 3; pointer-events: none;
  background: url(../svg/deco/holly.svg) 0 0 / 280px 86px repeat-x;
}
.flakes { position: relative; }
.flakes::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background:
    url(../svg/deco/flake.svg) 6% 18% / 34px no-repeat,
    url(../svg/deco/flake.svg) 92% 9% / 26px no-repeat,
    url(../svg/deco/flake.svg) 84% 52% / 38px no-repeat,
    url(../svg/deco/flake.svg) 12% 70% / 24px no-repeat,
    url(../svg/deco/flake.svg) 58% 92% / 30px no-repeat;
}
.flakes > * { position: relative; z-index: 1; }
.baubles { position: absolute !important; top: 0; right: 10px; width: 120px; height: auto; pointer-events: none; z-index: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 40px; border: 0;
  font: 800 16px/1.2 var(--body); text-decoration: none; text-align: center;
  background: var(--red); color: #fff;
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }

/* ---------- Find Your Centre ---------- */
.glance-section { padding: 64px var(--gutter) 72px; background: var(--purple); overflow: hidden; }
.glance-section .baubles { width: 84px; right: 2px; top: -6px; }
.glance-section > .section-title { margin-top: 56px; }
@media (min-width: 760px) { .glance-section .baubles { width: 130px; right: 6%; } .glance-section > .section-title { margin-top: 0; } }
.glance-panel .tag { margin-bottom: 8px; }
#glance-mount { max-width: 1120px; margin: 0 auto; }
/* Like the Easter site: centre tabs underlined on the left, All / Kids switch on the right, one rule under both. */
.glance-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  margin: 8px 0 40px; border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.glance-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: -1px; }
.glance-tabs [role="tab"] {
  flex: 0 0 auto; min-height: 44px; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; color: rgba(255, 244, 220, .6); font: 800 14px/1 var(--body); text-transform: uppercase; letter-spacing: .08em;
}
.glance-tabs [role="tab"]:hover { color: var(--cream); }
.glance-tabs [aria-selected="true"] { color: var(--cream); border-bottom-color: var(--lime); }
.glance-filters { display: flex; margin: 0 0 8px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 4px; overflow: hidden; }
.glance-filters button {
  min-height: 34px; padding: 6px 14px; border: 0; border-radius: 0; background: none; color: rgba(255, 244, 220, .7);
  font: 800 12px/1 var(--body); text-transform: uppercase; letter-spacing: .1em;
}
.glance-filters button + button { border-left: 1px solid rgba(255, 255, 255, .3); }
.glance-filters [aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.glance-centre { margin: 0; text-align: center; font: 400 clamp(32px, 5vw, 48px)/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.glance-centre em { font-style: normal; color: var(--lime); }
.glance-addr { margin: 8px auto 28px; max-width: 560px; text-align: center; font-size: 14px; }
.glance-addr a { color: inherit; opacity: .85; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.glance-addr a:hover { opacity: 1; }
/* Service cards: photo on top, dark bar with the name, time and an outlined download button; four across on desktop. */
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.svc { display: flex; flex-direction: column; overflow: hidden; border-radius: 4px; background: rgba(20, 8, 40, .45); }
.svc-photo { width: 100%; aspect-ratio: 2 / 1; height: auto; object-fit: cover; background: linear-gradient(160deg, var(--red), var(--maroon)); }
.svc-info { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 14px 16px; min-width: 0; }
.svc-text { display: grid; gap: 4px; min-width: 0; }
.svc-text b { font: 800 15px/1.2 var(--body); text-transform: uppercase; letter-spacing: .05em; }
.svc-text > span { font-size: 14px; color: rgba(255, 244, 220, .8); }
.svc-text > .svc-venue { font-size: 13px; color: var(--lime); }
.svc-text > .svc-who { margin-top: -2px; font-size: 13px; }
.svc-dl {
  flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--lime); color: var(--lime); text-decoration: none; transition: background .15s, color .15s;
}
.svc-dl svg { width: 18px; height: 18px; }
.svc-dl:hover, .svc-dl:focus-visible { background: var(--lime); color: var(--ink); }
/* Phones: one row per service, small photo on the left, like the Easter site. */
@media (max-width: 560px) {
  .glance-bar { margin-bottom: 28px; }
  .glance-filters { margin-bottom: 12px; }
  .glance-centre, .glance-addr { text-align: left; margin-left: 0; }
  .svc-list { grid-template-columns: 1fr; gap: 8px; }
  .svc { flex-direction: row; }
  .svc-photo { width: 120px; flex: 0 0 120px; aspect-ratio: auto; align-self: stretch; min-height: 76px; }
  .svc-info { padding: 10px 12px; }
}
.glance-empty { padding: 20px; border-radius: 12px; border: 2px dashed rgba(255, 255, 255, .3); text-align: center; }

/* ---------- Share popover + toast ---------- */
.share-pop {
  display: flex; flex-wrap: wrap; gap: 8px; width: 100%; padding: 12px; margin-top: 4px;
  background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  animation: fade .2s ease;
}
.share-pop .btn { flex: 1 1 150px; min-height: 44px; font-size: 15px; }
.share-wa { background: #157a41; }
.share-pop .btn-ghost { color: var(--ink); }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 30px; font-weight: 700;
  animation: fade .2s ease;
}

/* ---------- Room overlay ---------- */
.room-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 12, 30, .72);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .25s ease;
}
.room-overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.room-panel {
  --bg: var(--night); --fg: var(--cream); --accent: var(--gold);
  position: relative; width: 100%; max-width: 760px; max-height: 100%;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); color: var(--fg);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 60px rgba(0, 0, 0, .5);
  animation: rise .35s cubic-bezier(.2, .8, .2, 1);
  outline: none;
}
@media (min-width: 800px) {
  .room-overlay { align-items: center; padding: 24px; }
  .room-panel { border-radius: 22px; max-height: calc(100vh - 48px); }
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.room-close {
  position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; z-index: 6;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 20px; line-height: 1;
  backdrop-filter: blur(6px);
}
.room-body { padding-top: 40px !important; }
.room-body { padding: 22px 20px 28px; }
@media (min-width: 600px) { .room-body { padding: 28px 40px 36px; } }
.room-title { font: 400 clamp(32px, 7vw, 50px)/1.02 var(--display); text-transform: uppercase; margin: 12px 0 10px; }
.room-lead { font-size: 17px; margin: 0 0 22px; }
.room-footer {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding-top: 22px;
  border-top: 1px dashed rgba(255, 255, 255, .25);
}
.room-footer .btn { flex: 1 1 220px; }

/* On into the next room: a card in that room's colour (.pick-* in plan.css), at the very end of the room. */
.room-next { margin-top: 30px; }
.room-next button {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px; width: 100%; padding: 16px 20px;
  border: 0; border-radius: 16px; background: var(--c, var(--gold)); color: #fff; text-align: left; cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25); transition: transform .15s, box-shadow .15s;
}
.room-next button:hover, .room-next button:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(0, 0, 0, .25); }
.room-next button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.rn-label { grid-column: 1; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.rn-name { grid-column: 1; font: 400 clamp(24px, 5vw, 30px)/1 var(--display); text-transform: uppercase; }
.rn-head { grid-column: 1; font-size: 15px; opacity: .9; white-space: pre-line; }
.rn-go { grid-column: 2; grid-row: 1 / span 3; font-size: 28px; font-weight: 800; }
.theme-kids .room-next button { border: 3px solid #000; border-radius: 4px; box-shadow: 6px 6px 0 var(--hk-pink); font-family: var(--kids-body); }
@media (prefers-reduced-motion: reduce) { .room-next button { transition: none; } }


/* Peace: breather */
.breath { display: grid; justify-items: center; gap: 14px; margin: 8px 0 10px; }
.breath-visual { position: relative; width: 210px; height: 210px; display: grid; place-items: center; }
.breath-progress { position: absolute; inset: 0; transform: rotate(-90deg); }
.breath-track, .breath-ring { fill: none; stroke-width: 4; }
.breath-track { stroke: rgba(255, 255, 255, .12); }
.breath-ring { stroke: var(--gold); stroke-dasharray: 100; stroke-dashoffset: 0; stroke-linecap: round; opacity: 0; }
.breath.is-running .breath-ring { opacity: 1; }
.breath-orb {
  --s: .6;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 233, 168, .95), rgba(242, 201, 76, .45) 45%, rgba(242, 201, 76, 0) 72%);
  transform: scale(var(--s)); transition: transform 4s ease-in-out;
}
.breath-flame {
  position: absolute; width: 14px; height: 26px; border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: linear-gradient(#fff, var(--gold) 55%, #e8843d);
  animation: flicker 2.2s ease-in-out infinite alternate;
}
@keyframes flicker { 50% { transform: scale(.94, 1.06) rotate(-2deg); } }
.breath-label { min-height: 1.6em; margin: 0; font: 400 26px/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.calm-verse {
  margin: 18px 0 0; padding: 20px 22px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .07); border-left: 4px solid var(--gold);
  animation: fade 1.2s ease;
}
.calm-verse p { margin: 0 0 8px; font-size: 18px; font-style: italic; }
.calm-verse cite { display: block; font-style: normal; opacity: .75; }
.calm-after { font-style: normal !important; font-weight: 800; color: var(--gold); margin-top: 14px !important; }
@media (prefers-reduced-motion: reduce) { .breath-orb { transform: scale(.85) !important; } }

/* Connection */
.conn-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.conn-list li { display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, .07); padding: 12px 14px; border-radius: 12px; }


/* Living: production · Calm: the hope of Christmas letter */
.prod-title { font-size: clamp(40px, 10vw, 68px); margin-top: 4px; }
/* East puts on its own musical instead of the main production. */
.prod-east { margin-top: 30px; padding: 22px 20px 20px; border: 1.5px dashed rgba(255, 255, 255, .3); border-radius: 12px; }
.prod-east .prod-title { font-size: clamp(32px, 7vw, 48px); }
.prod-east .tt { margin-top: 12px; }
/* A centre's Mandarin programme takes the production's place in 中文 (scripts/make-centres.mjs). */
html:not([lang="zh-Hans"]) .prod-zh, html[lang="zh-Hans"] .prod-en { display: none; }
.prod-copy p { margin: 0 0 12px; font-size: 17px; }
.prod-copy mark { background: none; color: var(--lime); }
.video { position: relative; aspect-ratio: 16 / 9; margin: 18px 0; border-radius: 14px; overflow: hidden; background: #000; border: 4px solid var(--gold); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { position: absolute; inset: 0; padding: 0; border: 0; background: none; display: block; width: 100%; }
.video-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; padding-left: 5px;
  background: var(--gold); color: var(--ink); font-size: 26px; box-shadow: 0 0 30px rgba(242, 201, 76, .7);
}
.video-poster:disabled { cursor: default; }
.video-poster:disabled .video-play { opacity: .6; }
.video-note {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: rgba(0, 0, 0, .65); padding: 6px 12px; border-radius: 20px; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.letter {
  position: relative; margin: 30px calc(-1 * var(--pad, 20px)) 0; padding: 30px 22px 26px;
  background: var(--olive); color: #fff;
}
@media (min-width: 600px) { .letter { --pad: 40px; padding: 34px 40px 30px; } }
.letter .baubles { width: 92px; right: 6px; top: 0; }
.letter h3 { margin: 0 0 14px; max-width: 70%; font: 400 32px/1.02 var(--display); text-transform: uppercase; }
.letter p { margin: 0 0 12px; font-size: 17px; }
/* A cross beside the words, so the hope of Christmas has a picture. */
.letter-cross {
  float: right; width: clamp(70px, 20vw, 110px); height: auto; margin: 4px 0 10px 16px; rotate: 8deg;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
}
.letter em { color: #fff; }
/* ---------- Welcome pop-up (first visit) ---------- */
.intro {
  width: min(560px, calc(100% - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 0; border-radius: 18px;
  background: var(--night); color: var(--cream); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: auto;
}
.intro::backdrop { background: rgba(8, 12, 30, .72); backdrop-filter: blur(3px); }
.intro-card { position: relative; padding: 28px 22px 24px; }
@media (min-width: 600px) { .intro-card { padding: 36px 36px 30px; } }
.intro-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: inherit; font-size: 18px; cursor: pointer;
}
.intro-title { margin: 12px 0 14px; font: 400 clamp(34px, 8vw, 50px)/.95 var(--display); text-transform: uppercase; color: var(--gold); }
.intro-copy p { margin: 0 0 10px; font-size: 17px; line-height: 1.45; }
.intro-video { margin: 18px 0 20px; }
.video-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.intro-actions .btn { flex: 1 1 200px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: #0e1430; color: rgba(255, 244, 220, .85); padding: 48px var(--gutter) 56px; font-size: 14px; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 24px 20px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } }
.footer-brand img { width: 92px; height: auto; margin-bottom: 12px; }
.footer-tag { font-weight: 800; color: var(--gold); margin: 0 0 6px; }
.footer-brand p { margin: 0 0 10px; max-width: 26em; }
.footer-social { max-width: var(--max); margin: 28px auto 0; display: flex; justify-content: flex-end; gap: 10px; }
.footer-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 244, 220, .3); color: #fff; }
.footer-social a:hover { color: #0e1430; background: var(--gold); border-color: var(--gold); }
.footer-social svg { width: 20px; height: 20px; fill: currentColor; }
.site-footer h3 { font: 400 18px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: #fff; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }

/* ---------- Chinese: headings use the invite's heavy 厚底黑 so they keep the poster feel ---------- */
:lang(zh-Hans) :is(.section-title, .room-title, .svc-info b, .glance-centre, .breath-label, .letter h3, .tag,
  .tt-title, .tt-name) {
  font-family: 'CNHeader', 'FZHanYH', sans-serif; font-weight: 400; letter-spacing: .02em;
}
:lang(zh-Hans) .hero-title { line-height: 1.15; }
:lang(zh-Hans) .hero-kicker { letter-spacing: .2em; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
