:root {
  --navy: #101c3f;
  --navy-2: #1a2a5c;
  --gold: #f5b942;
  --gold-soft: #ffd98a;
  --cream: #fff8ec;
  --ink: #232946;
  --muted: #5b5f7a;
  --card: #ffffff;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--navy);
  color: var(--cream);
  line-height: 1.6;
  overflow-x: clip;
}
img, svg { max-width: 100%; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 1.2rem;
  background: rgba(16, 28, 63, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(245, 185, 66, 0.25);
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--cream); text-decoration: none; font-weight: 800; font-size: 1.25rem; min-width: 0; flex-shrink: 1; }
.brand-star { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.site-header nav { display: flex; gap: 1rem; align-items: center; min-width: 0; margin-left: auto; }
.site-header nav a { color: var(--cream); text-decoration: none; font-size: 0.95rem; opacity: 0.9; }
.site-header nav a:hover { opacity: 1; color: var(--gold-soft); }
.donate-link { background: var(--gold); color: var(--navy) !important; font-weight: 700; padding: 0.35rem 0.9rem; border-radius: 999px; }
main { max-width: 1020px; margin: 0 auto; padding: 0 1.2rem; }
section { padding: 3.2rem 0; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.15; margin: 1rem 0; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin-bottom: 0.8rem; color: var(--gold-soft); }
.section-sub { color: #c9cdea; max-width: 640px; margin-bottom: 1.6rem; }
.hero { text-align: center; padding: 3.5rem 0 3rem; }
.hero-star { width: min(240px, 55vw); border-radius: 24px; box-shadow: 0 12px 40px rgba(245, 185, 66, 0.25); }
.lede { font-size: 1.15rem; color: #dfe3fa; max-width: 620px; margin: 0 auto 1.8rem; }
.cta-row { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 0.8rem 1.7rem; border-radius: 999px; font-weight: 700; text-decoration: none; border: none; cursor: pointer; font-size: 1rem; }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-soft); }
.btn-ghost { background: transparent; color: var(--cream); border: 2px solid rgba(255, 248, 236, 0.4); }
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.btn-small { padding: 0.55rem 1.3rem; font-size: 0.92rem; }
.about p { color: #dfe3fa; max-width: 680px; margin-bottom: 1rem; }
.about strong { color: var(--gold-soft); }
.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.book-card { background: var(--card); color: var(--ink); border-radius: var(--radius); overflow: hidden; text-align: center; padding-bottom: 1.4rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.book-card img { width: 100%; height: 300px; object-fit: cover; object-position: top; display: block; }
.book-card h3 { margin: 1rem 0 0.2rem; font-size: 1.25rem; }
.book-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; padding: 0 1rem; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.chip { background: var(--navy-2); border: 1px solid rgba(245, 185, 66, 0.3); padding: 0.55rem 1.1rem; border-radius: 999px; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 0.45rem; }
.chip-flag { font-size: 1.12rem; line-height: 1; }
.chip em { font-style: normal; opacity: 0.6; font-size: 0.85rem; }
.chip-ready { background: rgba(245, 185, 66, 0.15); border-color: var(--gold); font-weight: 700; }
.notify form { display: flex; flex-direction: column; gap: 0.8rem; max-width: 440px; }
.notify input { padding: 0.85rem 1.1rem; border-radius: 12px; border: 2px solid rgba(255, 248, 236, 0.25); background: var(--navy-2); color: var(--cream); font-size: 1rem; }
.notify input::placeholder { color: #8b90b5; }
.notify input:focus { outline: none; border-color: var(--gold); }
.form-msg { min-height: 1.5rem; font-size: 0.95rem; }
.push-row { margin-top: 0.6rem; }
.form-msg.ok { color: #8fe3a0; }
.form-msg.err { color: #ff9d9d; }
.donate-row { display: flex; justify-content: center; gap: 0.7rem; width: 100%; max-width: 100%; }
.donate-chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.9rem; border-radius: 999px; border: 1px solid rgba(245, 185, 66, 0.18); background: rgba(255, 248, 236, 0.03); color: var(--cream); font-size: 0.92rem; white-space: nowrap; flex: 1 1 0; min-width: 0; justify-content: center; }
.donate-chip > span { min-width: 0; }
.donate-chip .soon { font-size: 0.78rem; }
.soon { color: #8b90b5; font-style: italic; }
footer { text-align: center; padding: 2.2rem 1.2rem 2.6rem; border-top: 1px solid rgba(245, 185, 66, 0.2); color: #aab0d6; font-size: 0.92rem; }
footer .copy { margin-top: 0.4rem; font-size: 0.85rem; opacity: 0.7; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 16, 38, 0.78); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--navy-2); border: 1px solid rgba(245, 185, 66, 0.35); border-radius: 20px; padding: 2rem 1.6rem; max-width: 420px; width: 100%; position: relative; text-align: center; }
.modal h3 { color: var(--gold-soft); margin-bottom: 0.6rem; }
.modal p { color: #c9cdea; margin-bottom: 1.2rem; font-size: 0.95rem; }
.modal form { display: flex; flex-direction: column; gap: 0.8rem; }
.modal input { padding: 0.85rem 1.1rem; border-radius: 12px; border: 2px solid rgba(255, 248, 236, 0.25); background: var(--navy); color: var(--cream); font-size: 1rem; }
.modal input::placeholder { color: #8b90b5; }
.modal input:focus { outline: none; border-color: var(--gold); }
.modal-close { position: absolute; top: 0.5rem; right: 0.9rem; background: none; border: none; color: #8b90b5; font-size: 1.7rem; cursor: pointer; line-height: 1; }
.dl-gate { font-family: inherit; }
/* Download gate: locked until the visitor's email unlocks it */
.dl-gate.is-locked { background: transparent; color: #8a8fa8; border: 2px dashed rgba(35, 41, 70, 0.4); }
.dl-gate.is-locked:hover { background: rgba(35, 41, 70, 0.06); color: var(--muted); border-color: rgba(35, 41, 70, 0.6); }
.dl-gate.is-locked::before { content: "🔒 "; }
.dl-gate:not(.is-locked)::before { content: "⬇ "; }
section { scroll-margin-top: 84px; }
.site-header nav a.nav-active { color: var(--gold-soft); opacity: 1; box-shadow: inset 0 -2px 0 var(--gold); }
/* Language dropdown (custom, with flag icons) */
.lang-dropdown { position: relative; margin-left: 1rem; flex: 0 0 auto; }
.lang-btn { display: flex; align-items: center; gap: 0.4rem; background: var(--navy-2); color: var(--cream); border: 1px solid rgba(245, 185, 66, 0.4); border-radius: 999px; padding: 0.35rem 0.7rem; font-size: 0.9rem; font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap; }
.lang-btn:hover { border-color: var(--gold-soft); }
.lang-btn:focus-visible { outline: none; border-color: var(--gold); }
.lang-flag { font-size: 1.05rem; line-height: 1; }
.lang-caret { font-size: 0.7rem; opacity: 0.8; }
.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 190px; list-style: none; background: var(--navy-2); border: 1px solid rgba(245, 185, 66, 0.4); border-radius: 14px; padding: 0.4rem; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); z-index: 30; }
.lang-menu[hidden] { display: none; }
.lang-option { display: flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.7rem; border-radius: 9px; color: var(--cream); font-size: 0.95rem; cursor: pointer; white-space: nowrap; }
.lang-option:hover, .lang-option:focus { background: rgba(245, 185, 66, 0.14); outline: none; }
.lang-option[aria-selected="true"] { background: rgba(245, 185, 66, 0.2); font-weight: 700; }
/* Advent teaser banner (homepage) */
.advent-teaser { padding: 1.2rem 0 3.2rem; }
.teaser-inner { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; background: linear-gradient(135deg, var(--navy-2), rgba(245, 185, 66, 0.14)); border: 1px solid rgba(245, 185, 66, 0.45); border-radius: var(--radius); padding: 1.8rem; }
.teaser-star { font-size: 3rem; line-height: 1; filter: drop-shadow(0 6px 16px rgba(245, 185, 66, 0.4)); }
.teaser-text { flex: 1 1 260px; }
.teaser-text h2 { margin-bottom: 0.3rem; }
.teaser-text p { color: #dfe3fa; }
/* Advent page: hero + how it works */
.page-hero { padding-bottom: 1.4rem; }
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.how-step { background: var(--navy-2); border: 1px solid rgba(245, 185, 66, 0.3); border-radius: var(--radius); padding: 1.4rem; display: flex; gap: 1rem; align-items: flex-start; }
.how-step .step-num { flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; }
.how-step p { color: #dfe3fa; font-size: 0.98rem; }
.empty-state { background: var(--navy-2); border: 1px dashed rgba(245, 185, 66, 0.35); border-radius: var(--radius); padding: 1.6rem; color: #c9cdea; max-width: 640px; }
.empty-state .btn { margin-top: 1rem; }
/* Sound book placeholder card */
.sound-cover { height: 300px; background: linear-gradient(160deg, var(--navy-2), var(--navy)); display: flex; align-items: center; justify-content: center; position: relative; }
.sound-emoji { font-size: 6rem; filter: drop-shadow(0 8px 20px rgba(245, 185, 66, 0.35)); }
.badge-soon { position: absolute; top: 0.9rem; right: 0.9rem; background: var(--gold); color: var(--navy); font-weight: 800; font-size: 0.8rem; padding: 0.3rem 0.8rem; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
/* Advent doors */
.advent-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.8rem; margin-bottom: 2.6rem; }
.door { aspect-ratio: 1 / 1.1; border-radius: 14px; border: 1px solid rgba(245, 185, 66, 0.3); background: var(--navy-2); color: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; padding: 0.4rem; font-family: inherit; }
.door-star { color: var(--gold); font-size: 1rem; line-height: 1; }
.door-num { font-size: 1.6rem; font-weight: 800; color: var(--gold-soft); line-height: 1.1; }
.door-hint { font-size: 0.68rem; color: #8b90b5; text-align: center; line-height: 1.25; }
.door-locked { opacity: 0.55; cursor: not-allowed; }
.door-open { background: linear-gradient(160deg, var(--gold), #e09f26); border-color: var(--gold-soft); cursor: pointer; box-shadow: 0 8px 22px rgba(245, 185, 66, 0.28); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.door-open:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(245, 185, 66, 0.4); }
.door-open .door-num { color: var(--navy); }
.door-open .door-star { color: var(--navy); }
.door-open .door-hint { color: #4a3a08; font-weight: 700; }
/* Materials ordering */
.materials h3 { font-size: 1.35rem; color: var(--gold-soft); margin-bottom: 0.6rem; }
.materials-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.material-card { background: var(--navy-2); border: 1px solid rgba(245, 185, 66, 0.3); border-radius: var(--radius); padding: 1.4rem; }
.material-card h4 { color: var(--gold-soft); font-size: 1.15rem; margin-bottom: 0.4rem; }
.material-desc { color: #c9cdea; font-size: 0.95rem; margin-bottom: 0.8rem; }
.suggested { color: var(--gold-soft); font-weight: 700; font-size: 0.95rem; margin-bottom: 0.9rem; }
.order-form { display: flex; flex-direction: column; gap: 0.6rem; }
.order-form input { padding: 0.7rem 0.95rem; border-radius: 10px; border: 2px solid rgba(255, 248, 236, 0.25); background: var(--navy); color: var(--cream); font-size: 0.95rem; font-family: inherit; }
.order-form input::placeholder { color: #8b90b5; }
.order-form input:focus { outline: none; border-color: var(--gold); }
.order-form .btn { align-self: flex-start; }
.order-msg { text-align: left; }
/* Events */
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.event-card { background: var(--navy-2); border: 1px solid rgba(245, 185, 66, 0.3); border-radius: var(--radius); padding: 1.4rem; }
.event-card h3 { color: var(--gold-soft); margin-bottom: 0.5rem; font-size: 1.15rem; }
.event-when { color: var(--cream); font-weight: 700; font-size: 0.95rem; }
.event-where { color: #c9cdea; font-size: 0.95rem; }
.event-desc { color: #c9cdea; font-size: 0.95rem; margin-top: 0.6rem; }
/* Fundraisers */
.fundraiser-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.fundraiser-card { background: var(--navy-2); border: 1px solid rgba(245, 185, 66, 0.3); border-radius: var(--radius); padding: 1.4rem; }
.fundraiser-card h3 { color: var(--gold-soft); margin-bottom: 0.5rem; font-size: 1.15rem; }
.fundraiser-purpose { color: #c9cdea; font-size: 0.95rem; margin-bottom: 0.9rem; }
.progress { height: 14px; background: rgba(255, 248, 236, 0.15); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 999px; }
.progress-label { color: var(--cream); font-size: 0.9rem; font-weight: 700; margin-top: 0.5rem; }
@media (max-width: 900px) {
  .advent-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; row-gap: 0.5rem; }
  .site-header nav {
    order: 3; flex: 1 1 100%;
    overflow-x: auto; white-space: nowrap;
    gap: 0.85rem; padding-bottom: 0.15rem;
    scrollbar-width: none; -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  .site-header nav::-webkit-scrollbar { display: none; }
  .site-header nav a { font-size: 0.88rem; flex: 0 0 auto; }
  .brand { font-size: 1.1rem; }
  .brand-star { width: 32px; height: 32px; }
  .lang-dropdown { order: 2; margin-left: auto; position: relative; flex: 0 0 auto; }
  section { padding: 2.2rem 0; scroll-margin-top: 128px; }
  .advent-grid { grid-template-columns: repeat(4, 1fr); }
  .door-num { font-size: 1.25rem; }
  .teaser-inner { padding: 1.3rem; }
  .book-grid, .materials-list, .event-grid, .fundraiser-grid, .how-steps { grid-template-columns: minmax(0, 1fr); }
  .donate-row { gap: 0.45rem; }
  .donate-chip { padding: 0.4rem 0.5rem; font-size: 0.8rem; gap: 0.3rem; white-space: normal; text-align: center; }
  .donate-chip .soon { display: none; }
}
@media (max-width: 380px) {
  .advent-grid { grid-template-columns: repeat(3, 1fr); }
}
