/* ==========================================================================
   Cinco Ranch Key Club — "Enchanted Twilight" design system
   Palette is canonical (hero animation README §1). Cinzel = display,
   Cormorant Garamond = body. Content sits on parchment cards over a living
   night sky; gold is reserved for what matters.
   ========================================================================== */

:root {
  --void: #0b1220;
  --navy: #1f3864;
  --slate: #2e3c62;
  --peri: #5e6f9c;
  --gold: #c9a227;
  --gold-soft: #d4b46a;
  --candle: #ffb347;
  --parchment: #e8dcc0;
  --parchment-bright: #f2ead6;
  --ink: #22304f;
  --ink-soft: #3b4a6e;

  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;

  --header-h: 76px;
  --radius: 10px;
  --shadow-card: 0 10px 40px rgba(4, 8, 18, 0.45);
  --gold-line: rgba(201, 162, 39, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: 1.16rem;
  line-height: 1.55;
  color: var(--parchment);
  background-color: var(--void);
  min-height: 100vh;
  overflow-x: hidden;
}
/* The night-sky gradient lives on a fixed, composited layer instead of
   background-attachment: fixed (which forces full-page repaints on scroll
   on many older GPUs). Visually identical, dramatically cheaper. */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--void);
  background-image:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(94, 111, 156, 0.42) 0%, rgba(46, 60, 98, 0.18) 45%, transparent 70%),
    radial-gradient(ellipse 90% 55% at 85% 100%, rgba(94, 111, 156, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, #0b1220 0%, #17233f 34%, #253356 62%, #2e3c62 100%);
}

/* Two static star layers (pure CSS, zero JS — the fx canvas adds the moving
   dust on top). Tiny radial dots tiled at co-prime offsets so no grid reads. */
.stars, .stars-2 {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: repeat;
}
.stars {
  background-image:
    radial-gradient(1.4px 1.4px at 22px 34px, rgba(232, 220, 192, 0.75) 45%, transparent 55%),
    radial-gradient(1px 1px at 133px 89px, rgba(232, 220, 192, 0.5) 45%, transparent 55%),
    radial-gradient(1.2px 1.2px at 271px 157px, rgba(212, 180, 106, 0.6) 45%, transparent 55%),
    radial-gradient(0.9px 0.9px at 74px 205px, rgba(232, 220, 192, 0.42) 45%, transparent 55%),
    radial-gradient(1.1px 1.1px at 190px 251px, rgba(232, 220, 192, 0.55) 45%, transparent 55%);
  background-size: 317px 283px;
  animation: twinkle-a 7s ease-in-out infinite alternate;
}
.stars-2 {
  background-image:
    radial-gradient(1px 1px at 49px 71px, rgba(232, 220, 192, 0.4) 45%, transparent 55%),
    radial-gradient(1.6px 1.6px at 161px 23px, rgba(255, 179, 71, 0.5) 45%, transparent 55%),
    radial-gradient(0.8px 0.8px at 233px 199px, rgba(232, 220, 192, 0.35) 45%, transparent 55%),
    radial-gradient(1.1px 1.1px at 101px 143px, rgba(212, 180, 106, 0.45) 45%, transparent 55%);
  background-size: 401px 367px;
  animation: twinkle-b 9s ease-in-out infinite alternate;
}
@keyframes twinkle-a { from { opacity: 0.55; } to { opacity: 1; } }
@keyframes twinkle-b { from { opacity: 1; } to { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) {
  .stars, .stars-2 { animation: none; }
}

/* A distant castle skyline rests on the viewport's bottom edge — the site's
   fixed horizon. Content scrolls above it; the footer covers it at page end. */
body::after {
  content: '';
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 170px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background: bottom center / 1400px 170px repeat-x
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 170'%3E%3Cpath fill='%23070d1a' d='M0 170 V120 h18 v-14 h10 v14 h16 v-30 h8 l6 -22 6 22 h8 v30 h30 v-18 h12 v18 h44 v-52 h10 v-12 h8 l4 -16 4 16 h8 v12 h10 v52 h36 v-20 h14 v20 h52 v-36 h12 v-10 h20 v10 h12 v36 h40 v-90 h6 l8 -28 8 28 h6 v90 h34 v-24 h16 v24 h58 v-44 h10 v-14 h24 v14 h10 v44 h48 v-20 h12 v20 h64 v-60 h8 l6 -20 6 20 h8 v60 h42 v-30 h14 v30 h56 v-70 h8 v-12 h8 l4 -18 4 18 h8 v12 h8 v70 h38 v-18 h12 v18 h54 v-40 h10 v-12 h22 v12 h10 v40 h46 v-26 h14 v26 h60 v-80 h6 l8 -26 8 26 h6 v80 h40 v-16 h12 v16 h50 v-34 h12 v-10 h18 v10 h12 v34 h44 v-52 h8 l6 -18 6 18 h8 v52 h30 v-14 h12 v14 h20 V170 Z'/%3E%3Cg fill='%23d4b46a' opacity='0.55'%3E%3Ccircle cx='250' cy='96' r='1.6'/%3E%3Ccircle cx='424' cy='70' r='1.5'/%3E%3Ccircle cx='560' cy='118' r='1.4'/%3E%3Ccircle cx='706' cy='92' r='1.6'/%3E%3Ccircle cx='875' cy='78' r='1.5'/%3E%3Ccircle cx='1013' cy='120' r='1.4'/%3E%3Ccircle cx='1168' cy='66' r='1.6'/%3E%3Ccircle cx='1322' cy='102' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}

main { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }

::selection { background: rgba(201, 162, 39, 0.35); color: var(--parchment-bright); }

a { color: var(--gold-soft); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--candle);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--parchment-bright);
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.page-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.14em;
  color: var(--parchment-bright);
  text-shadow: 0 0 30px rgba(201, 162, 39, 0.35), 0 2px 18px rgba(4, 8, 18, 0.8);
}

.page-lede {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  text-align: center;
  color: rgba(232, 220, 192, 0.82);
  max-width: 46em;
  margin: 0.9em auto 0;
}

/* Constellation divider — thin gold lines meeting a star. Encodes “a new
   chamber begins” under every page/section title. */
.constellation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 1.4rem auto 0;
  max-width: 420px;
}
.constellation::before, .constellation::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line));
}
.constellation::after {
  background: linear-gradient(270deg, transparent, var(--gold-line));
}
.constellation svg { flex: none; }

.section-title {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  text-align: center;
  letter-spacing: 0.12em;
}

/* ==========================================================================
   Layout shells
   ========================================================================== */

.page-head {
  padding: calc(var(--header-h) + clamp(3rem, 8vh, 5.5rem)) 24px 0;
}
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 7vh, 5rem) 24px;
}
/* anchored scrolls must clear the fixed header */
.section, .page-head, [id] {
  scroll-margin-top: calc(var(--header-h) + 18px);
}
.section--tight { padding-top: clamp(2rem, 4vh, 3rem); }

/* Parchment card — the site's “page of the tome”. Gold bevel echoes the
   minted-coin seal. */
.card {
  position: relative;
  background:
    radial-gradient(ellipse 130% 100% at 50% 0%, #f2ead6 0%, #e8dcc0 55%, #ddcda8 100%);
  color: var(--ink);
  border-radius: var(--radius);
  border: 1px solid rgba(201, 162, 39, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 214, 0.55),
    inset 0 0 60px rgba(190, 160, 96, 0.18),
    var(--shadow-card);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
}
/* Spellbook inset: a second gold hairline with a tiny star at each corner. */
.card::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
  background-image:
    radial-gradient(circle 2.2px at 0 0, rgba(201, 162, 39, 0.8) 40%, transparent 60%),
    radial-gradient(circle 2.2px at 100% 0, rgba(201, 162, 39, 0.8) 40%, transparent 60%),
    radial-gradient(circle 2.2px at 0 100%, rgba(201, 162, 39, 0.8) 40%, transparent 60%),
    radial-gradient(circle 2.2px at 100% 100%, rgba(201, 162, 39, 0.8) 40%, transparent 60%);
  background-repeat: no-repeat;
  z-index: 2;
}
.card h2, .card h3, .card h4 { color: var(--navy); }
.card a { color: #8a6b12; }

/* Navy card variant (for the hours search + dark accents on light pages) */
.card--navy {
  background:
    radial-gradient(ellipse 130% 100% at 50% 0%, #27406e 0%, #1f3864 55%, #182b4e 100%);
  color: var(--parchment);
  border-color: rgba(201, 162, 39, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(212, 180, 106, 0.18),
    inset 0 0 70px rgba(6, 10, 22, 0.35),
    var(--shadow-card);
}
.card--navy h2, .card--navy h3 { color: var(--parchment-bright); }
.card--navy a { color: var(--gold-soft); }

/* Gold button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--void);
  background: linear-gradient(180deg, #e3c568 0%, #c9a227 55%, #a9861d 100%);
  border: 1px solid rgba(255, 236, 180, 0.6);
  border-radius: 6px;
  padding: 0.9em 2.1em;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(201, 162, 39, 0.35), inset 0 1px 0 rgba(255, 246, 214, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn:hover, .btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.07);
  box-shadow: 0 8px 30px rgba(201, 162, 39, 0.55), inset 0 1px 0 rgba(255, 246, 214, 0.8);
}
.btn:active { transform: translateY(0); }

.btn--ghost {
  color: var(--gold-soft);
  background: rgba(11, 18, 32, 0.4);
  border: 1px solid rgba(201, 162, 39, 0.5);
  box-shadow: none;
  backdrop-filter: blur(3px);
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  color: #f5e3a0;
  background: rgba(201, 162, 39, 0.12);
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.25);
}

/* Outline variant for parchment surfaces — keeps filled gold rare/special. */
.btn--outline {
  color: #8a6b12;
  background: transparent;
  border: 1px solid rgba(201, 162, 39, 0.75);
  box-shadow: none;
}
.btn--outline:hover, .btn--outline:focus-visible {
  color: var(--void);
  background: linear-gradient(180deg, #e3c568 0%, #c9a227 100%);
  box-shadow: 0 4px 18px rgba(201, 162, 39, 0.4);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(15, 24, 46, 0.92), rgba(21, 33, 60, 0.82));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 6px 30px rgba(4, 8, 18, 0.55);
}
.header-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--parchment-bright);
  min-width: 0;
}
.brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(201, 162, 39, 0.75);
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.35);
  background: #fff;
  transition: box-shadow 0.3s ease;
}
.brand:hover img { box-shadow: 0 0 26px rgba(201, 162, 39, 0.65); }
.brand img.spinning { animation: seal-spin 1.1s cubic-bezier(0.3, 0, 0.2, 1.4); }
@keyframes seal-spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(720deg); }
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.14em;
  line-height: 1.25;
  white-space: nowrap;
}
.brand-name small {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
}

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.4vw, 18px);
}
.site-nav a {
  position: relative;
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(232, 220, 192, 0.85);
  padding: 10px 10px;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 10px; right: 10px; bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.site-nav a:hover, .site-nav a:focus-visible {
  color: #f5e3a0;
  text-shadow: 0 0 14px rgba(201, 162, 39, 0.6);
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] {
  color: var(--gold-soft);
}
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  background: transparent;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: '';
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--gold-soft);
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}
.nav-toggle span { top: 22px; }
.nav-toggle span::before { top: -7px; left: 0; }
.nav-toggle span::after { top: 7px; left: 0; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 880px) {
  .brand-name { font-size: 0.85rem; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: linear-gradient(180deg, rgba(15, 24, 46, 0.98), rgba(21, 33, 60, 0.96));
    border-bottom: 1px solid rgba(201, 162, 39, 0.35);
    box-shadow: 0 20px 40px rgba(4, 8, 18, 0.6);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  .site-nav.open { max-height: 420px; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 16px;
  }
  .site-nav a { padding: 13px 28px; font-size: 0.95rem; }
  .site-nav a::after { left: 28px; right: auto; width: 40px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(3rem, 8vh, 6rem);
  background: linear-gradient(180deg, rgba(15, 24, 46, 0.6), rgba(9, 14, 26, 0.95));
  border-top: 1px solid rgba(201, 162, 39, 0.4);
  padding: 2.6rem 24px 2.2rem;
  text-align: center;
}
.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 1.4rem;
}
.footer-social a, .footer-social span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--parchment);
  text-decoration: none;
}
.footer-social img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  padding: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2b4577, #1f3864 72%);
  border: 1px solid rgba(201, 162, 39, 0.55);
  box-shadow: inset 0 0 10px rgba(6, 10, 22, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.footer-social a:hover img {
  transform: translateY(-3px) scale(1.08);
  box-shadow: inset 0 0 10px rgba(6, 10, 22, 0.45), 0 0 16px rgba(201, 162, 39, 0.6);
}
.footer-social a:hover { color: #f5e3a0; }
.footer-rule {
  width: min(420px, 70%);
  height: 1px;
  margin: 0 auto 1.3rem;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}
.footer-copy {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(232, 220, 192, 0.85);
}
.footer-maintained {
  margin-top: 0.5rem;
  font-style: italic;
  font-size: 0.98rem;
  color: rgba(232, 220, 192, 0.55);
}

/* ==========================================================================
   Page transition veil
   ========================================================================== */

.page-veil {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 226, 160, 0.35) 0%, transparent 45%),
    linear-gradient(180deg, #0b1220 0%, #1c2a4d 100%);
  transition: opacity 0.32s ease;
}
.page-veil::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 74px; height: 74px;
  margin: -37px 0 0 -37px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23d4b46a' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='22' cy='22' r='11'/%3E%3Cpath d='M30 30 L50 50 M44 44 l6 -6 M50 50 l6 -6'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0;
  transform: rotate(-20deg) scale(0.8);
  transition: opacity 0.3s ease, transform 0.4s ease;
  filter: drop-shadow(0 0 18px rgba(212, 180, 106, 0.8));
}
.page-veil.active {
  pointer-events: auto;
  opacity: 1;
}
.page-veil.active::after {
  opacity: 1;
  transform: rotate(8deg) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .page-veil { display: none; }
}

/* ==========================================================================
   Scroll reveals — hidden state exists ONLY when motion is allowed, so
   content is never invisible for reduced-motion or no-JS visitors.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    transition-delay: var(--reveal-delay, 0s);
  }
  .js .reveal.revealed {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Home
   ========================================================================== */

.hero-wrap {
  position: relative;
  height: 100vh;
  height: 100svh;
  background: var(--void);
}
.hero-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.hero-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  color: rgba(212, 180, 106, 0.85);
  animation: hint-bob 2.6s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.5));
}
@keyframes hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.55; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-hint { animation: none; }
}

.home-intro {
  text-align: center;
}
.home-intro .division {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 1.3rem;
}
.home-intro .welcome {
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: rgba(232, 220, 192, 0.85);
  max-width: 44em;
  margin: 1.6rem auto 0;
}

/* Collage gallery — masonry via CSS columns */
.collage {
  columns: 3;
  column-gap: 18px;
}
.collage figure {
  break-inside: avoid;
  margin: 0 0 18px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 8px 26px rgba(4, 8, 18, 0.5);
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.collage figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(11, 18, 32, 0.55) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
/* enchanted-portrait inner hairline */
.collage figure::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(212, 180, 106, 0.4);
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
  transition: border-color 0.35s ease;
}
.collage figure:hover::before { border-color: rgba(245, 227, 160, 0.75); }
.collage img {
  width: 100%;
  transition: transform 0.5s ease;
}
.collage figure:hover {
  transform: translateY(-5px);
  border-color: rgba(201, 162, 39, 0.8);
  box-shadow: 0 14px 38px rgba(4, 8, 18, 0.65), 0 0 24px rgba(201, 162, 39, 0.25);
}
.collage figure:hover::after { opacity: 1; }
.collage figure:hover img { transform: scale(1.04); }
@media (max-width: 900px) { .collage { columns: 2; } }
@media (max-width: 560px) { .collage { columns: 1; } }

/* ==========================================================================
   Team
   ========================================================================== */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 26px;
}
.officer-card {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 0;
  overflow: hidden;
}
.officer-card .portrait {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(201, 162, 39, 0.45);
  /* the illustrations arrive on white — multiply melts them into parchment */
  background: radial-gradient(ellipse 100% 80% at 50% 30%, #f7f0de 0%, #efe5cc 70%, #e8dcc0 100%);
}
.officer-card .portrait img {
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  mix-blend-mode: multiply;
  transition: transform 0.5s ease;
}
.officer-card:hover .portrait img { transform: scale(1.05); }
.officer-card .portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 40% at 50% 108%, rgba(201, 162, 39, 0.4), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.officer-card:hover .portrait::after { opacity: 1; }
.officer-body {
  padding: 1.3rem 1.2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.officer-role {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #8a6b12;
}
.officer-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--navy);
}
.officer-class {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.officer-email {
  font-size: 0.98rem;
  word-break: break-all;
  color: #8a6b12;
  text-decoration: none;
}
.officer-email:hover { text-decoration: underline; }
.officer-body .btn {
  margin-top: auto;
  align-self: center;
  margin-top: 1rem;
  font-size: 0.78rem;
  padding: 0.7em 1.8em;
}

/* Officer dialog */
dialog.officer-dialog {
  margin: auto; /* the * reset removes the UA centering — restore it */
  width: min(94vw, 860px);
  max-height: min(88vh, 88svh);
  border: 1px solid rgba(201, 162, 39, 0.65);
  border-radius: var(--radius);
  padding: 0;
  background:
    radial-gradient(ellipse 130% 100% at 50% 0%, #f2ead6 0%, #e8dcc0 55%, #ddcda8 100%);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(2, 4, 10, 0.8), 0 0 60px rgba(201, 162, 39, 0.2);
  overflow-y: auto;
}
dialog.officer-dialog::backdrop {
  background: rgba(5, 9, 18, 0.72);
  backdrop-filter: blur(4px);
}
@media (prefers-reduced-motion: no-preference) {
  dialog.officer-dialog[open] { animation: dialog-in 0.45s cubic-bezier(0.19, 1, 0.22, 1); }
  dialog.officer-dialog[open]::backdrop { animation: backdrop-in 0.45s ease; }
  /* when JS grows the dialog out of the clicked card, skip the CSS entrance */
  dialog.officer-dialog.from-card[open] { animation: none; }
}
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(26px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(31, 56, 100, 0.35);
  background: rgba(232, 220, 192, 0.9);
  color: var(--navy);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font-display);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.dialog-close:hover {
  background: var(--navy);
  color: var(--parchment);
  transform: rotate(90deg);
}

.dialog-inner {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 0;
}
.dialog-photo {
  position: relative;
  min-height: 100%;
}
.dialog-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-right: 1px solid rgba(201, 162, 39, 0.45);
}
.dialog-content {
  position: relative;
  padding: 2rem 2rem 1.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 20px;
  align-items: start;
  align-content: start;
}
.dialog-role, .dialog-name, .dialog-meta { grid-column: 1; }
.dialog-bio, .dialog-tokens { grid-column: 1 / -1; }
.dialog-house {
  grid-column: 2;
  grid-row: 1 / span 3;
  margin-top: 24px; /* clears the close button above */
  display: grid;
  justify-items: center;
  gap: 6px;
}
.dialog-crest {
  width: 96px;
  mix-blend-mode: multiply; /* crest PNGs have white boxes — melt into parchment */
  filter: drop-shadow(0 3px 10px rgba(31, 56, 100, 0.35));
  transition: filter 0.35s ease, transform 0.35s ease;
}
.dialog-crest:hover {
  filter: drop-shadow(0 0 16px rgba(201, 162, 39, 0.9));
  transform: scale(1.07);
}
.dialog-house-name {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8a6b12;
}
.dialog-role {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #8a6b12;
}
.dialog-name {
  font-size: clamp(1.45rem, 2.6vw, 1.75rem);
  margin-top: 0.2rem;
  color: var(--navy);
}
.dialog-meta {
  margin-top: 0.45rem;
  font-style: italic;
  color: var(--ink-soft);
}
.dialog-meta a { color: #8a6b12; word-break: break-all; }
.dialog-bio {
  margin-top: 1.1rem;
  font-size: 1.12rem;
  line-height: 1.6;
}
.dialog-tokens {
  display: flex;
  gap: 20px;
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(201, 162, 39, 0.4);
}
.dialog-tokens .token {
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}
.dialog-tokens .token-disc {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #2b4577, #1f3864 70%);
  border: 1px solid rgba(201, 162, 39, 0.6);
  color: var(--gold-soft);
  box-shadow: inset 0 0 14px rgba(6, 10, 22, 0.5), 0 3px 10px rgba(31, 56, 100, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.dialog-tokens .token:hover .token-disc {
  transform: translateY(-4px) rotate(-4deg);
  box-shadow: inset 0 0 14px rgba(6, 10, 22, 0.5), 0 0 18px rgba(201, 162, 39, 0.5);
}
.dialog-tokens .token-label {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a6b12;
}
.dialog-tokens svg { width: 28px; height: 28px; }

@media (max-width: 640px) {
  .dialog-inner { grid-template-columns: 1fr; }
  .dialog-photo img {
    max-height: 300px;
    border-right: 0;
    border-bottom: 1px solid rgba(201, 162, 39, 0.45);
  }
  .dialog-content { padding: 1.6rem 1.4rem 1.5rem; }
  .dialog-house { margin-top: 0; }
  .dialog-crest { width: 70px; }
}

/* ==========================================================================
   Hours
   ========================================================================== */

.hours-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
}
.hours-search h2 { text-align: center; }
.hours-search .search-sub {
  text-align: center;
  font-style: italic;
  color: rgba(232, 220, 192, 0.75);
  margin-top: 0.4rem;
}
.search-row {
  display: flex;
  gap: 12px;
  max-width: 560px;
  margin: 1.6rem auto 0;
}
.search-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--parchment-bright);
  background: rgba(11, 18, 32, 0.55);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 6px;
  padding: 0.75em 1em 0.75em 2.9em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4b46a' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='4.5'/%3E%3Cpath d='M11 11l9 9M17 17l2.5-2.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 20px;
  background-position: 14px center;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.search-row input::placeholder { color: rgba(232, 220, 192, 0.45); font-style: italic; }
.search-row input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.3);
}
.hours-status {
  text-align: center;
  margin-top: 1.4rem;
  font-style: italic;
  color: rgba(232, 220, 192, 0.8);
}
.hours-status .status-strong {
  font-family: var(--font-display);
  font-style: normal;
  letter-spacing: 0.1em;
  color: var(--gold-soft);
}
.results-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 1.4rem;
}
.results-grid .result-card {
  flex: 0 1 270px;
}
.result-card {
  position: relative;
  background:
    radial-gradient(ellipse 130% 100% at 50% 0%, #f2ead6 0%, #e8dcc0 60%, #ddcda8 100%);
  color: var(--ink);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 8px;
  padding: 1.2rem 1.3rem;
  box-shadow: 0 8px 24px rgba(4, 8, 18, 0.45);
}
/* wax-seal medallion holding the key */
.result-card .key-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #6e5610;
  background: radial-gradient(circle at 36% 30%, #e8cd7d, #c9a227 62%, #a5851e 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 240, 200, 0.85),
    inset 0 -2px 4px rgba(90, 70, 10, 0.45),
    0 2px 6px rgba(90, 70, 10, 0.35);
}
.result-card .r-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--navy);
  padding-right: 30px;
}
.result-card .r-label {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #8a6b12;
}
.result-card .r-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.result-card .r-grade {
  margin-top: 0.35rem;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.hours-note {
  text-align: center;
  margin-top: 1.6rem;
  font-size: 1rem;
  font-style: italic;
  color: rgba(232, 220, 192, 0.55);
}

/* ==========================================================================
   Calendar
   ========================================================================== */

.calendar-frame {
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
}
/* the scrying-window medallion perched on the frame's top edge */
.frame-medallion {
  position: absolute;
  top: -23px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  background: radial-gradient(circle at 35% 30%, #2b4577, #1f3864 72%);
  border: 1px solid rgba(201, 162, 39, 0.75);
  box-shadow: inset 0 0 12px rgba(6, 10, 22, 0.5), 0 4px 14px rgba(4, 8, 18, 0.6), 0 0 18px rgba(201, 162, 39, 0.25);
}
.calendar-frame .cal-clip {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(31, 56, 100, 0.3);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.33);
}
/* candlelight vignette floating above the white embed */
.calendar-frame .cal-clip::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: 6px;
  box-shadow: inset 0 0 46px rgba(46, 40, 20, 0.28), inset 0 0 8px rgba(201, 162, 39, 0.18);
}
.calendar-frame iframe {
  display: block;
  width: 100%;
  height: min(72vh, 640px);
  border: 0;
  background: #f6efdd;
  filter: sepia(0.14) saturate(0.92);
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.45rem;
}
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.12rem;
  color: var(--ink);
  background: rgba(255, 252, 242, 0.75);
  border: 1px solid rgba(31, 56, 100, 0.35);
  border-radius: 6px;
  padding: 0.7em 0.9em;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(201, 162, 39, 0.35);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #a33b2e;
  box-shadow: 0 0 10px rgba(163, 59, 46, 0.3);
}
.field .error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.95rem;
  font-style: italic;
  color: #a33b2e;
}
.field.invalid .error { display: block; }

.contact-cards { display: grid; gap: 16px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 1.05rem 1.2rem;
}
.contact-item img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: none;
  padding: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2b4577, #1f3864 72%);
  border: 1px solid rgba(201, 162, 39, 0.6);
  box-shadow: inset 0 0 12px rgba(6, 10, 22, 0.45), 0 3px 10px rgba(31, 56, 100, 0.3);
}
.contact-item .ci-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8a6b12;
}
.contact-item .ci-value { font-size: 1.08rem; line-height: 1.4; }
.contact-item .ci-value a { color: var(--navy); }
.contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) { .contact-links { grid-template-columns: 1fr; } }

/* ==========================================================================
   More
   ========================================================================== */

.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.5);
  box-shadow: var(--shadow-card);
  aspect-ratio: 16 / 9;
  background: var(--void);
}
.carousel .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.carousel .slide.active { opacity: 1; }
.carousel .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.6);
  background: rgba(11, 18, 32, 0.55);
  color: var(--gold-soft);
  font-size: 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.carousel-btn:hover {
  background: rgba(201, 162, 39, 0.25);
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.45);
}
.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 9px;
}
.carousel-dots button {
  width: 13px;
  height: 13px;
  border: 0;
  background: rgba(212, 180, 106, 0.4);
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}
.carousel-dots button:hover { background: rgba(212, 180, 106, 0.75); }
.carousel-dots button[aria-current="true"] {
  background: #f5e3a0;
  transform: scale(1.45);
  filter: drop-shadow(0 0 6px rgba(245, 227, 160, 0.9));
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.value-tile { text-align: center; padding: 1.8rem 1.4rem; }
.value-tile .v-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #2b4577, #1f3864 70%);
  border: 1px solid rgba(201, 162, 39, 0.6);
  color: var(--gold-soft);
  box-shadow: inset 0 0 14px rgba(6, 10, 22, 0.5);
}
.value-tile .v-icon svg { width: 30px; height: 30px; }
.value-tile h3 { font-size: 1.1rem; letter-spacing: 0.14em; }
.value-tile p { margin-top: 0.6rem; font-size: 1.05rem; line-height: 1.5; }

.pledge-card { text-align: center; }
.pledge-card .pledge-text {
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  line-height: 1.75;
  color: var(--ink);
}
.pledge-card .pledge-text strong { color: var(--navy); }

.facts-list {
  list-style: none;
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
}
.facts-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 1.05rem 1.3rem;
}
.facts-list .fact-star { flex: none; color: var(--gold); margin-top: 0.2em; }

.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq-list details {
  border-radius: 8px;
  overflow: hidden;
}
.faq-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--navy);
  padding: 0.35rem 0;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .faq-key {
  flex: none;
  color: var(--gold);
  transition: transform 0.35s ease;
}
.faq-list details[open] summary .faq-key { transform: rotate(90deg); }
.faq-list .faq-answer {
  padding: 0.5rem 0 0.2rem 38px;
  font-size: 1.1rem;
  line-height: 1.55;
}

/* ==========================================================================
   Easter-egg toast
   ========================================================================== */

.kc-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  z-index: 500;
  background:
    radial-gradient(ellipse 130% 100% at 50% 0%, #f2ead6 0%, #e8dcc0 60%, #ddcda8 100%);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  border: 1px solid rgba(201, 162, 39, 0.7);
  border-radius: 8px;
  box-shadow: 0 16px 50px rgba(2, 4, 10, 0.7), 0 0 30px rgba(201, 162, 39, 0.35);
  padding: 0.95em 1.7em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.kc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* print / capture safety: reveals must never hide content on paper */
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .stars, .stars-2, #fx-canvas, .page-veil { display: none !important; }
  body::after { display: none !important; }
}

/* fx canvas — above the veil (z 400) so the murmuration rides the transition;
   the officer dialog lives in the browser top layer and still wins. */
#fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 450;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
#fx-canvas.covered { opacity: 0; }

/* Weak-machine mode (set by the effects quality gate): shed the per-frame
   raster costs that healthy machines never notice paying. Nothing here
   changes on a machine that holds its frame budget. */
body.kc-low .site-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(180deg, rgba(15, 24, 46, 0.97), rgba(21, 33, 60, 0.94));
}
body.kc-low .stars,
body.kc-low .stars-2 { animation: none; }
body.kc-low .card::before { filter: none; }
body.kc-low .btn:not(.btn--ghost):not(.btn--outline) { animation: none; }
body.kc-low .carousel .slide img { animation: none; }

/* ==========================================================================
   Enchantment layer (2nd design round)
   ========================================================================== */

/* ----- #9 gold-leaf page titles with a slow light sweep ----- */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .page-title, .section-title {
    background: linear-gradient(105deg,
      #9a7a1c 0%, #d4b46a 20%, #f7e7ae 36%, #c9a227 52%,
      #e8cd7d 68%, #f7e7ae 82%, #a5851e 100%);
    background-size: 240% 100%;
    background-position: 0% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(201, 162, 39, 0.3)) drop-shadow(0 2px 12px rgba(4, 8, 18, 0.7));
  }
  @media (prefers-reduced-motion: no-preference) {
    .page-title, .section-title { animation: gold-sweep 8s ease-in-out infinite; }
  }
}
@keyframes gold-sweep {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

/* ----- #8 scroll parallax: sky layers drift at different rates ----- */
@media (prefers-reduced-motion: no-preference) {
  .stars {
    inset: -16% 0;
    transform: translateY(max(calc(var(--sy, 0) * -0.055 * 1px), -160px));
    will-change: transform;
  }
  .stars-2 {
    inset: -16% 0;
    transform: translateY(max(calc(var(--sy, 0) * -0.025 * 1px), -80px));
    will-change: transform;
  }
  body::after {
    transform: translateY(min(calc(var(--sy, 0) * 0.035 * 1px), 64px));
    will-change: transform;
  }
}

/* ----- #8 Lumos: candlelight follows the cursor on dark cards ----- */
.card--navy::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 179, 71, 0.10), rgba(255, 179, 71, 0.03) 45%, transparent 72%);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.card--navy:hover::after { opacity: 1; }

/* ----- #6 unlocking veil: key turn on departure ----- */
@media (prefers-reduced-motion: no-preference) {
  .page-veil.active.turning::after { animation: key-turn 0.5s cubic-bezier(0.4, 0, 0.3, 1) forwards; }
}
@keyframes key-turn {
  0% { opacity: 1; transform: rotate(-16deg) scale(0.92); }
  45% { transform: rotate(4deg) scale(1); }
  62% { transform: rotate(-2deg) scale(1); }
  100% { opacity: 1; transform: rotate(88deg) scale(1); }
}
/* arrival iris: JS drives clip-path; this just locks the veil solid meanwhile */
.page-veil.iris {
  transition: none;
  opacity: 1;
  pointer-events: auto;
}
.page-veil.iris::after { opacity: 0; transition: none; }

/* ----- #7 hours: results are conjured, then sealed ----- */
.result-card.conjuring {
  opacity: 0;
  transform: scale(0.9) translateY(10px);
}
.result-card.materialized {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.19, 1, 0.22, 1);
}
@media (prefers-reduced-motion: no-preference) {
  .key-mark.stamping { animation: seal-stamp 0.55s cubic-bezier(0.34, 1.45, 0.64, 1); }
}
@keyframes seal-stamp {
  0% { transform: scale(2); opacity: 0; }
  55% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ----- team enchanted portraits: gold sheen (tilt is JS-driven) ----- */
.officer-card .sheen {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg,
    transparent 32%, rgba(255, 236, 180, 0.10) 44%,
    rgba(255, 236, 180, 0.22) 50%, rgba(255, 236, 180, 0.10) 56%, transparent 68%);
  background-size: 260% 100%;
  background-position: calc(var(--shx, 50) * 1%) 0;
  transition: opacity 0.35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .officer-card:hover .sheen { opacity: 1; }
}

/* ----- More: the Memory Vault's doors ----- */
.carousel { perspective: 1300px; }
.vault-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.6%;
  z-index: 6;
  background:
    radial-gradient(circle 3px at 14px 20%, rgba(201, 162, 39, 0.5) 40%, transparent 60%),
    radial-gradient(circle 3px at 14px 50%, rgba(201, 162, 39, 0.5) 40%, transparent 60%),
    radial-gradient(circle 3px at 14px 80%, rgba(201, 162, 39, 0.5) 40%, transparent 60%),
    linear-gradient(90deg, #263a63 0%, #1d2f54 55%, #152443 100%);
  box-shadow: inset 0 0 46px rgba(5, 9, 18, 0.5);
  transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.35s ease 1.05s;
  overflow: hidden;
}
.vault-door.left { left: 0; transform-origin: left center; border-right: 2px solid rgba(201, 162, 39, 0.55); }
.vault-door.right {
  right: 0;
  transform-origin: right center;
  border-left: 2px solid rgba(201, 162, 39, 0.55);
  background:
    radial-gradient(circle 3px at calc(100% - 14px) 20%, rgba(201, 162, 39, 0.5) 40%, transparent 60%),
    radial-gradient(circle 3px at calc(100% - 14px) 50%, rgba(201, 162, 39, 0.5) 40%, transparent 60%),
    radial-gradient(circle 3px at calc(100% - 14px) 80%, rgba(201, 162, 39, 0.5) 40%, transparent 60%),
    linear-gradient(270deg, #263a63 0%, #1d2f54 55%, #152443 100%);
}
/* half of the great seal ring on each door, meeting at the seam */
.vault-door::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 120px;
  height: 120px;
  margin-top: -60px;
  border: 3px solid rgba(201, 162, 39, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.2), inset 0 0 18px rgba(201, 162, 39, 0.15);
}
.vault-door.left::after { right: -62px; }
.vault-door.right::after { left: -62px; }
.carousel.vault-open .vault-door.left { transform: rotateY(-86deg); opacity: 0; }
.carousel.vault-open .vault-door.right { transform: rotateY(86deg); opacity: 0; }
/* light spills out as the doors part */
.vault-spill {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 90% at 50% 50%, rgba(255, 226, 160, 0.5), transparent 70%);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .carousel.vault-open .vault-spill { animation: vault-spill 1.5s ease-out forwards; }
}
@keyframes vault-spill {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}

/* ----- More: Ken Burns drift on carousel slides ----- */
@media (prefers-reduced-motion: no-preference) {
  .carousel .slide img { animation: kenburns 11s ease-in-out infinite alternate; animation-play-state: paused; }
  .carousel .slide.active img { animation-play-state: running; }
  .carousel:hover .slide img { animation-play-state: paused; }
  .carousel .slide:nth-child(even) img { animation-name: kenburns-b; }
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.085) translate(1.4%, -1%); }
}
@keyframes kenburns-b {
  from { transform: scale(1.06) translate(-1.2%, 0.8%); }
  to { transform: scale(1); }
}

/* ----- #16 spell-scroll FAQ: roller edge while unrolling ----- */
.faq-list .faq-answer { position: relative; }
.faq-list details.unrolling .faq-answer::after {
  content: '';
  position: absolute;
  left: 38px;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.7), rgba(201, 162, 39, 0.15));
  box-shadow: 0 -6px 10px rgba(190, 160, 96, 0.3);
}

/* ----- calendar: wall sconces + scrying ripple ----- */
.sconce {
  position: absolute;
  top: 30%;
  width: 26px;
  z-index: 4;
  pointer-events: none;
}
.sconce.left { left: -44px; }
.sconce.right { right: -44px; }
.sconce .flame {
  width: 12px;
  height: 20px;
  margin: 0 auto;
  border-radius: 50% 50% 46% 54% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 72%, #fff7e0 0%, #ffd98f 38%, #ffb347 62%, rgba(255, 118, 40, 0.25) 100%);
  box-shadow: 0 0 18px rgba(255, 179, 71, 0.75), 0 0 46px rgba(255, 179, 71, 0.3);
  transform-origin: 50% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .sconce .flame { animation: flame-flicker var(--fd, 1.1s) ease-in-out infinite; }
}
@keyframes flame-flicker {
  0%, 100% { transform: scale(1) skewX(0deg); opacity: 1; }
  26% { transform: scale(1.06, 0.95) skewX(2.5deg); opacity: 0.92; }
  48% { transform: scale(0.95, 1.08) skewX(-2deg); opacity: 1; }
  74% { transform: scale(1.03, 0.97) skewX(1.5deg); opacity: 0.95; }
}
.sconce .candle {
  width: 10px;
  height: 42px;
  margin: -2px auto 0;
  border-radius: 3px 3px 4px 4px;
  background: linear-gradient(180deg, #f2ead6, #ddcda8 70%, #c9b88e);
  box-shadow: inset -2px 0 3px rgba(120, 100, 60, 0.35);
}
.sconce::after {
  content: '';
  display: block;
  width: 22px;
  height: 10px;
  margin: -2px auto 0;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #c9a227, #8a6b12);
  box-shadow: 0 2px 6px rgba(4, 8, 18, 0.6);
}
@media (max-width: 1330px) { .sconce { display: none; } }

.cal-clip::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(112deg, transparent 22%, rgba(255, 240, 200, 0.38) 50%, transparent 78%);
  background-size: 260% 100%;
  background-position: 130% 0;
}
@media (prefers-reduced-motion: no-preference) {
  .cal-clip.rippling::before { animation: cal-ripple 1.2s ease-out forwards; }
  .frame-medallion.rippling { animation: medallion-pulse 1.2s ease-out; }
}
@keyframes cal-ripple {
  0% { opacity: 0; background-position: 130% 0; }
  22% { opacity: 1; }
  100% { opacity: 0; background-position: -60% 0; }
}
@keyframes medallion-pulse {
  0%, 100% { box-shadow: inset 0 0 12px rgba(6, 10, 22, 0.5), 0 4px 14px rgba(4, 8, 18, 0.6), 0 0 18px rgba(201, 162, 39, 0.25); }
  35% { box-shadow: inset 0 0 12px rgba(6, 10, 22, 0.5), 0 4px 14px rgba(4, 8, 18, 0.6), 0 0 34px rgba(201, 162, 39, 0.75); }
}

/* ----- #14 crossing the threshold: rune lintel under the hero ----- */
.threshold {
  position: relative;
  z-index: 1;
  height: 56px;
  background: linear-gradient(180deg, #0a111f 0%, #182642 46%, #101b33 78%, #0b1220 100%);
  border-top: 1px solid rgba(201, 162, 39, 0.22);
  border-bottom: 1px solid rgba(201, 162, 39, 0.3);
  box-shadow: 0 10px 30px rgba(4, 8, 18, 0.55);
  overflow: hidden;
}
.threshold svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.threshold .runes-dim { color: rgba(212, 180, 106, 0.32); }
.threshold .runes-glow {
  color: #f5e3a0;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(245, 227, 160, 0.9));
}
@media (prefers-reduced-motion: no-preference) {
  .threshold.lit .runes-glow { animation: rune-glimmer 1.6s ease-out; }
}
@keyframes rune-glimmer {
  0% { opacity: 0; }
  30% { opacity: 0.95; }
  100% { opacity: 0; }
}

/* ----- #17 candlelit buttons (filled gold only) ----- */
@media (prefers-reduced-motion: no-preference) {
  .btn:not(.btn--ghost):not(.btn--outline) {
    animation:
      candle-breathe var(--breathe, 3.8s) ease-in-out infinite,
      candle-flicker var(--flick, 2.1s) steps(1, end) infinite;
  }
}
@keyframes candle-breathe {
  0%, 100% { box-shadow: 0 4px 18px rgba(201, 162, 39, 0.35), inset 0 1px 0 rgba(255, 246, 214, 0.8); }
  50% { box-shadow: 0 5px 30px rgba(255, 179, 71, 0.55), inset 0 1px 0 rgba(255, 246, 214, 0.8); }
}
@keyframes candle-flicker {
  0%, 100% { filter: brightness(1); }
  31% { filter: brightness(1.035); }
  47% { filter: brightness(0.99); }
  62% { filter: brightness(1.05); }
  81% { filter: brightness(1.01); }
}

/* ----- #18 hand-inked card frames (static turbulence displacement) ----- */
.card::before { filter: url(#kc-ink); }

/* ----- #15 every chamber its own skyline -----
   Same castle, different wing per page: Team = the portrait gallery,
   Hours = the scriptorium tower, Calendar = the observatory,
   More = the vault rotunda, Contact = the key aviary. Home keeps the
   full castle panorama (the default body::after). */
body.page-team::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 170'%3E%3Cpath fill='%23070d1a' d='M0 170V120h36v-12h10v12h44v-46h8l5 -16 5 16h8v46h44v-34h14v-8h360v8h14v34h44v-46h8l5 -16 5 16h8v46h44v-12h10v12h96v-28h14v28h150v-40h10v-10h20v10h10v40h110v-18h12v18h306V170Z'/%3E%3Cg fill='%23d4b46a' opacity='0.42'%3E%3Crect x='214' y='94' width='10' height='20' rx='5'/%3E%3Crect x='264' y='94' width='10' height='20' rx='5'/%3E%3Crect x='314' y='94' width='10' height='20' rx='5'/%3E%3Crect x='364' y='94' width='10' height='20' rx='5'/%3E%3Crect x='414' y='94' width='10' height='20' rx='5'/%3E%3Crect x='464' y='94' width='10' height='20' rx='5'/%3E%3Crect x='514' y='94' width='10' height='20' rx='5'/%3E%3Ccircle cx='1113' cy='96' r='1.6'/%3E%3Ccircle cx='790' cy='108' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}
body.page-hours::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 170'%3E%3Cpath fill='%23070d1a' d='M0 170V120h60v-16h12v16h150v-30h14v30h60v-86h8v-14h36v14h8v86h120v-24h14v24h300v-44h10l6 -18 6 18h10v44h150v-30h14v30h120v-12h10v12h60v-40h8l5 -14 5 14h8v40h216V170Z'/%3E%3Cg fill='%23d4b46a' opacity='0.5'%3E%3Crect x='314' y='46' width='9' height='15' rx='2'/%3E%3Crect x='314' y='72' width='9' height='12' rx='2'/%3E%3Ccircle cx='842' cy='90' r='1.6'/%3E%3Ccircle cx='1180' cy='104' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}
body.page-calendar::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 170'%3E%3Cpath fill='%23070d1a' d='M0 170V120h70v-14h12v14h130v-30h14v30h130v-20h30a80 80 0 0 1 160 0h30v20h130v-30h14v30h130v-14h12v14h70v-44h8l5 -16 5 16h8v44h100v-24h12v24h330V170Z'/%3E%3Cg fill='%23d4b46a' opacity='0.5'%3E%3Crect x='492' y='34' width='8' height='32' rx='3'/%3E%3Cpath d='M498 62l26 -22' stroke='%23d4b46a' stroke-width='3' fill='none' opacity='0.8'/%3E%3Ccircle cx='260' cy='100' r='1.6'/%3E%3Ccircle cx='1090' cy='86' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
}
body.page-more::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 170'%3E%3Cpath fill='%23070d1a' d='M0 170V120h80v-18h12v18h150v-26h14v26h80v-10h30a150 44 0 0 1 300 0h30v10h80v-26h14v26h150v-18h12v18h80v-40h8l5 -14 5 14h8v40h342V170Z'/%3E%3Cg fill='%23d4b46a' opacity='0.45'%3E%3Ccircle cx='430' cy='100' r='3'/%3E%3Ccircle cx='480' cy='100' r='3'/%3E%3Ccircle cx='530' cy='100' r='3'/%3E%3Ccircle cx='580' cy='100' r='3'/%3E%3Ccircle cx='630' cy='100' r='3'/%3E%3Ccircle cx='1180' cy='92' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
}
body.page-contact::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 170'%3E%3Cpath fill='%23070d1a' d='M0 170V120h90v-14h12v14h160v-28h14v28h240v-20h12v20h60v-70h6v-30h4l4 -14 4 14h4v30h6v70h60v-20h12v20h240v-28h14v28h190v-14h12v14h226V170Z'/%3E%3Cg stroke='%23d4b46a' opacity='0.5' fill='none' stroke-width='2'%3E%3Ccircle cx='522' cy='62' r='5'/%3E%3Cpath d='M527 62h15m-5 0v4m3 -4v5'/%3E%3Ccircle cx='688' cy='38' r='4'/%3E%3Cpath d='M692 38h12m-4 0v3m2 -3v4'/%3E%3Ccircle cx='742' cy='86' r='4'/%3E%3Cpath d='M746 86h12m-4 0v3m2 -3v4'/%3E%3C/g%3E%3C/svg%3E");
}

/* ----- #20 aurora canvas sits beneath the stars ----- */
#aurora-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: blur(16px) saturate(1.15);
  opacity: 0;
  transition: opacity 2.5s ease;
}
#aurora-canvas.on { opacity: 0.6; }
