/* =========================================================
   HOUSE OF VAELOR — Coming Soon
   Concept: a collector's-edition storybook. Cream pages,
   gold foil, garden florals, one velvet plum chapter.
   ========================================================= */

/* Colours, fonts, spacing and motion live in tokens.css (loaded first). */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html.is-intro, html.is-intro body { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: clamp(1.125rem, 1rem + .35vw, 1.3rem);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Paper grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: .14;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.01 0 0 0 0 0.16 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
main { overflow-x: hidden; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 4px; border-radius: 2px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
::selection { background: var(--rose); color: var(--plum); }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--f-display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--gold-ink);
  margin: 0 0 1.4rem;
}
.eyebrow--gold { color: var(--gold); }
.section-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 1.2rem + 4.6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: .02em;
  margin: 0 0 1.2rem;
  text-wrap: balance;
}
.section-lede {
  max-width: 34em;
  margin: 0;
  font-size: 1.15em;
  font-style: italic;
}
.script { font-family: var(--f-script); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Scribe (calligraphy) state */
.ch { display: inline-block; }
.ch.is-scribe { font-family: var(--f-script); text-transform: none; color: var(--gold-ink); font-weight: 400; text-align: center; }

/* Logo + fallback (shown only if logo.png is missing) */
.logo-fallback { display: none; }
img.is-missing { display: none; }
img.is-missing + .logo-fallback {
  display: inline-flex;
  align-items: baseline;
  gap: .25em;
  font-family: var(--f-display);
  letter-spacing: .02em;
  text-transform: none;
  color: var(--plum);
  white-space: nowrap;
}
img.is-missing + .logo-fallback i { font-family: var(--f-script); text-transform: none; color: var(--gold-ink); font-style: normal; letter-spacing: 0; font-size: 1.3em; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: .95em 2.1em;
  font-family: var(--f-display);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), background-color .4s, color .4s;
}
.btn::after { /* foil glint */
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 248, 236, .75) 47%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease-out);
}
.btn:hover::after, .btn:focus-visible::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn--plum { background: var(--plum); color: var(--gold); border-color: var(--plum); box-shadow: 0 10px 30px -12px rgba(52, 2, 42, .55); }
.btn--plum:hover { box-shadow: 0 16px 36px -12px rgba(52, 2, 42, .6), 0 0 0 4px rgba(242, 193, 78, .25); }
.btn--gold { background: linear-gradient(135deg, #F7D57E, var(--gold) 40%, var(--gold-2)); color: var(--plum); border-color: var(--gold-2); }
.btn--gold:hover { box-shadow: 0 0 0 4px rgba(242, 193, 78, .25), 0 14px 36px -10px rgba(242, 193, 78, .55); }
.btn--ghost { color: var(--plum); border-color: var(--gold-2); background: rgba(255, 248, 236, .4); }
.btn--ghost:hover { background: var(--ivory); }

@keyframes spin { to { rotate: 360deg; } }
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate(18px, 55vh) rotate(160deg); }
  100% { transform: translate(-10px, 115vh) rotate(320deg); opacity: .9; }
}
@keyframes twinkle {
  0%, 100% { opacity: .2; transform: translate(0, 0) scale(.7); }
  50% { opacity: 1; transform: translate(4px, -8px) scale(1.1); }
}

/* =========================================================
   HEADER
   ========================================================= */
body::before { /* paints the phone status-bar band */
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--cream);
}
.site-header {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0; right: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
  transition: background-color .5s, box-shadow .5s, color .5s;
}
.site-header.is-scrolled {
  background: rgba(243, 235, 221, .82);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
          backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(217, 174, 85, .45);
}
.brand { display: flex; align-items: center; text-decoration: none; min-height: 44px; }
.brand__img { height: 42px; width: auto; }
.brand__fallback { font-size: .78rem; }
.site-nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.site-nav a {
  position: relative;
  font-family: var(--f-display);
  font-size: .8rem;
  letter-spacing: .02em;
  text-transform: none;
  text-decoration: none;
  padding-block: .6em;
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: .26em; bottom: .25em;
  height: 1px; background: var(--gold-2);
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.site-nav a.is-active { color: var(--rose-deep); }
.header-aside { display: flex; align-items: center; gap: 14px; }
.pill {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 0 1.2em;
  border: 1px solid var(--gold-2);
  border-radius: 999px;
  font-family: var(--f-display); font-size: .7rem; letter-spacing: .02em; text-transform: none;
  text-decoration: none;
  transition: background-color .4s, color .4s;
}
.pill:hover { background: var(--plum); color: var(--gold); border-color: var(--plum); }
.progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-2), var(--gold), var(--rose-deep));
  transform: scaleX(0); transform-origin: left;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 24px);
  padding-bottom: 96px;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
  overflow: hidden;
  isolation: isolate;
}
.hero__wash {
  position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(40% 35% at 18% 30%, rgba(231, 163, 174, .45), transparent 70%),
    radial-gradient(38% 34% at 84% 26%, rgba(185, 163, 214, .45), transparent 70%),
    radial-gradient(45% 40% at 60% 85%, rgba(242, 193, 78, .22), transparent 70%);
  animation: wash 24s ease-in-out infinite alternate;
}
@keyframes wash { to { transform: translate(3%, -2%) rotate(4deg) scale(1.05); } }
.vine { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 40px); width: clamp(170px, 30vw, 400px); z-index: -1; overflow: visible; }
.vine--l { left: -10px; }
.vine--r { right: -10px; transform: scaleX(-1); }
.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 1100px; }
.hero__logo { position: relative; width: clamp(210px, 30vw, 360px); margin-bottom: 1.4rem; }
.hero__logo img { width: 100%; filter: drop-shadow(0 14px 24px rgba(52, 2, 42, .12)); }
.hero__logo img.is-missing + .logo-fallback { font-size: clamp(.9rem, .7rem + 1vw, 1.3rem); justify-content: center; width: 100%; padding-block: 2.4rem; border-block: 1px solid var(--gold-2); }
.hero__shine {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 248, 236, .95) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%;
  background-position: 150% 0;
  -webkit-mask: url("../img/logo-gold.webp") center / contain no-repeat;
          mask: url("../img/logo-gold.webp") center / contain no-repeat;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.hero__eyebrow { margin-bottom: 1.1rem; }
.hero__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 11vw, 8.6rem);
  line-height: .92;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--plum);
}
.hero__of {
  font-family: var(--f-script);
  text-transform: none;
  letter-spacing: 0;
  font-size: .5em;
  line-height: 1.1;
  margin: -.05em 0 -.02em;
  background: linear-gradient(100deg, var(--gold-ink), var(--gold) 45%, var(--gold-ink) 70%, var(--gold-2));
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: foil 6s ease-in-out infinite;
  padding-inline: .2em;
}
@keyframes foil { 50% { background-position: 100% 0; } }
.hero__sub { max-width: 30em; margin: 1.6rem 0 0; font-size: clamp(1.1rem, 1rem + .4vw, 1.35rem); text-wrap: balance; }
.hero__sub em { color: var(--rose-deep); }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 2rem; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--f-display); font-size: .8rem; letter-spacing: .02em; text-transform: none;
  text-decoration: none; color: var(--gold-ink);
}
.scroll-cue i { width: 1px; height: 34px; background: linear-gradient(var(--gold-2), transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* =========================================================
   RIBBON
   ========================================================= */
.ribbon {
  position: relative;
  overflow: hidden;
  background: var(--plum);
  color: var(--gold);
  border-block: 1px solid var(--gold-2);
  padding-block: 14px;
  transform: rotate(-1.2deg) scale(1.03);
  z-index: 2;
}
.ribbon__track { display: flex; width: max-content; gap: 28px; align-items: center; animation: marquee 38s linear infinite; }
.ribbon span { font-family: var(--f-display); font-size: .82rem; letter-spacing: .02em; text-transform: none; white-space: nowrap; }
.ribbon i { font-style: normal; color: var(--rose); }
.ribbon--light { background: transparent; color: var(--plum); transform: none; border-color: rgba(217, 174, 85, .6); }
.ribbon--light i { color: var(--gold-ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   STORY / MANIFESTO
   ========================================================= */
.story, .realm { position: relative; overflow: hidden; padding-block: clamp(96px, 14vw, 180px); }
.drift {
  position: absolute;
  top: clamp(40px, 8vw, 110px);
  left: 0;
  white-space: nowrap;
  font-family: var(--f-script);
  font-size: clamp(7rem, 26vw, 24rem);
  line-height: 1;
  color: var(--rose);
  opacity: .42;
  pointer-events: none;
  z-index: 0;
  padding-left: 6vw;
}
.drift--wisteria { color: var(--wisteria); opacity: .5; }
.story .wrap, .realm .wrap { position: relative; z-index: 1; }
.manifesto {
  margin: 0;
  max-width: 15.5em;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: clamp(2.2rem, 1.2rem + 4.8vw, 5.6rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: pretty;
}
.manifesto .w { display: inline-block; }
.orn { display: inline-block; color: var(--gold-ink); font-size: .55em; vertical-align: .35em; margin-inline: .08em; }
.charm {
  position: relative;
  display: inline-block;
  width: .82em;
  height: 1.06em;
  vertical-align: -.16em;
  margin-inline: .06em;
  overflow: hidden;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 290' preserveAspectRatio='none'><path d='M0,290 L0,110 C0,50 45,10 100,0 C155,10 200,50 200,110 L200,290 Z'/></svg>") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 290' preserveAspectRatio='none'><path d='M0,290 L0,110 C0,50 45,10 100,0 C155,10 200,50 200,110 L200,290 Z'/></svg>") center / 100% 100% no-repeat;
}
.charm svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.charm--wire { background: radial-gradient(circle at 50% 60%, #5A1049, var(--plum)); }
.charm--wire path { stroke-dasharray: 120; animation: wire 4s ease-in-out infinite; }
@keyframes wire { 0% { stroke-dashoffset: 120; } 55%, 75% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -120; } }
.charm--garnet { background: linear-gradient(160deg, var(--ivory), var(--rose)); }
.charm--garnet::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, .85) 50%, transparent 60%);
  background-size: 300% 100%;
  animation: glint 3.2s ease-in-out infinite;
}
@keyframes glint { 0%, 40% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
.charm--petals { background: linear-gradient(to bottom, var(--wisteria), var(--rose)); }
.charm--petals i {
  position: absolute; top: -10%; width: 22%; height: 14%;
  border-radius: 60% 0 60% 0; background: var(--ivory);
  animation: charmfall 3s linear infinite;
}
.charm--petals i:nth-child(1) { left: 18%; }
.charm--petals i:nth-child(2) { left: 52%; animation-delay: -1s; background: var(--gold); }
.charm--petals i:nth-child(3) { left: 70%; animation-delay: -2s; }
@keyframes charmfall { to { transform: translateY(800%) rotate(240deg); } }
.charm--star { background: radial-gradient(circle at 50% 40%, #5A1049, var(--plum)); }
.charm--star svg { animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6%); } }

.story__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px clamp(24px, 5vw, 72px);
  margin-top: clamp(48px, 7vw, 96px);
  max-width: 980px;
  margin-left: auto;
}
.story__cols p { margin: 0; max-width: 32em; }
.story__cols p:first-child::first-letter {
  float: left;
  font-family: var(--f-display);
  font-size: 4.2em;
  line-height: .82;
  padding: .06em .1em 0 0;
  color: var(--garnet);
  text-shadow: 2px 2px 0 var(--gold);
}
.signature {
  margin: 2.4rem 0 0;
  text-align: right;
  font-family: var(--f-script);
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.8rem);
  color: var(--rose-deep);
  max-width: 980px;
  margin-left: auto;
}

/* =========================================================
   REALM / MAP
   ========================================================= */
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.realm__grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
.map {
  position: relative;
  min-width: 0;
  border-radius: 6px;
  background:
    radial-gradient(120% 120% at 50% 50%, var(--parchment) 55%, #E9D9BD 100%);
  box-shadow: 0 30px 60px -30px rgba(52, 2, 42, .35), inset 0 0 0 1px rgba(217, 174, 85, .5);
  overflow: hidden;
}
.map__stage { position: relative; aspect-ratio: 1000 / 640; max-width: 100%; transform-origin: 50% 50%; }

.pin {
  position: absolute;
  left: var(--x); top: var(--y);
  width: 48px; height: 48px;
  margin: -24px 0 0 -24px;
  padding: 0;
  border: 0;
  background: none;
  display: grid; place-items: center;
}
.pin span {
  position: relative;
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--rose), var(--garnet) 45%, var(--plum));
  box-shadow: 0 0 0 3px var(--gold), 0 6px 14px rgba(52, 2, 42, .35);
  transition: transform .4s var(--ease-out);
}
.pin span::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  border: 1.5px solid var(--gold);
  animation: pulse 2.4s ease-out infinite;
}
.pin:hover span, .pin.is-active span { transform: scale(1.25); }
@keyframes pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }

/* =========================================================
   INVITATION (velvet plum chapter)
   ========================================================= */
.invite {
  position: relative;
  padding-block: clamp(96px, 13vw, 170px);
  background-color: var(--plum);
  background-image:
    radial-gradient(60% 50% at 50% 40%, rgba(194, 87, 122, .22), transparent 70%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'><g fill='none' stroke='%23521046' stroke-width='1.3'><path d='M45 12c8 10 8 20 0 30c-8-10-8-20 0-30z'/><path d='M45 42c-10 0-18 6-20 14c8 0 16-4 20-14zm0 0c10 0 18 6 20 14c-8 0-16-4-20-14z'/><path d='M45 42v26'/><circle cx='45' cy='72' r='3'/><path d='M0 0l8 8M90 0l-8 8M0 90l8-8M90 90l-8-8'/></g></svg>");
  color: var(--cream);
  overflow: hidden;
}
.invite__card {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(48px, 7vw, 88px) clamp(22px, 6vw, 80px);
  text-align: center;
  border: 1px solid var(--gold-2);
  outline: 1px solid rgba(217, 174, 85, .45);
  outline-offset: -12px;
  background: linear-gradient(180deg, rgba(74, 11, 60, .7), rgba(52, 2, 42, .85));
  box-shadow: 0 40px 90px -40px #000, inset 0 0 80px rgba(194, 87, 122, .15);
}
.corner { position: absolute; width: clamp(48px, 9vw, 80px); height: auto; }
.corner--tl { top: -1px; left: -1px; }
.corner--tr { top: -1px; right: -1px; transform: scaleX(-1); }
.corner--bl { bottom: -1px; left: -1px; transform: scaleY(-1); }
.corner--br { bottom: -1px; right: -1px; transform: scale(-1, -1); }
.invite__emblem { width: clamp(84px, 14vw, 120px); margin: 0 auto 1.2rem; filter: drop-shadow(0 6px 18px rgba(242, 193, 78, .25)); }

.invite__title {
  margin: 0 0 1rem;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2rem, 1.2rem + 4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: .02em;
  text-wrap: balance;
  background: linear-gradient(100deg, var(--gold-2), #FBE3A2 30%, var(--gold) 50%, var(--gold-2) 75%, #FBE3A2);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: foil 7s ease-in-out infinite;
}
.invite__title .script { font-size: 1.25em; line-height: .8; padding-inline: .1em; }
.invite__text { margin: 0 auto 2.2rem; max-width: 26em; font-size: 1.15em; font-style: italic; color: var(--cream); }
.invite__form { display: grid; gap: 14px; max-width: 460px; margin-inline: auto; text-align: left; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--f-display); font-size: .8rem; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--gold); }
.field label span { font-family: var(--f-body); text-transform: none; letter-spacing: 0; font-style: italic; font-size: 1.2em; color: var(--rose); }
.field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  font: inherit;
  font-size: 1.1rem;
  color: var(--cream);
  background: rgba(255, 248, 236, .06);
  border: 1px solid rgba(217, 174, 85, .55);
  border-radius: 4px;
  transition: border-color .3s, background-color .3s, box-shadow .3s;
}
.field input:focus { outline: none; border-color: var(--gold); background: rgba(255, 248, 236, .1); box-shadow: 0 0 0 3px rgba(242, 193, 78, .25); }
.field input[aria-invalid="true"] { border-color: var(--rose); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.invite__submit { margin-top: 8px; width: 100%; }
.invite__submit[disabled] { opacity: .7; cursor: progress; }
.form-msg { margin: 0; min-height: 1.4em; text-align: center; color: var(--rose); font-style: italic; }
.form-msg.is-ok { color: var(--gold); }
.form-note { margin: 0; text-align: center; font-size: 1.02rem; font-style: italic; color: rgba(243, 235, 221, .92); }
.invite__success { display: grid; justify-items: center; gap: 8px; }
.wax { width: 120px; height: 120px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
.wax__v { font-family: var(--f-script); font-size: 54px; fill: var(--gold); }
.invite__success-title { margin: 12px 0 0; font-family: var(--f-display); font-weight: 500; font-size: 1.6rem; letter-spacing: .06em; color: var(--gold); }
.invite__success-text { margin: 0; max-width: 24em; font-style: italic; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { position: relative; padding-top: clamp(80px, 10vw, 140px); overflow: hidden; }
.footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer__emblem { position: relative; width: clamp(220px, 40vw, 440px); }
.footer__emblem::before {
  content: ""; position: absolute; inset: -20%; z-index: -1;
  background: radial-gradient(circle, rgba(242, 193, 78, .4), rgba(231, 163, 174, .2) 40%, transparent 68%);
  animation: glow 5s ease-in-out infinite;
}
@keyframes glow { 50% { opacity: .55; transform: scale(.94); } }
.footer__emblem img.is-missing + .logo-fallback { font-size: clamp(1rem, .8rem + 1.6vw, 1.8rem); justify-content: center; width: 100%; padding-block: 3rem; }
.footer__script { margin: 1.4rem 0 2.4rem; font-family: var(--f-script); font-size: clamp(2rem, 1.4rem + 2.6vw, 3.6rem); color: var(--rose-deep); line-height: 1.1; }
.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
  margin-bottom: 48px;
  font-family: var(--f-display);
  font-size: .8rem;
  letter-spacing: .02em;
  text-transform: none;
}
.footer__row a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 1px solid transparent; transition: border-color .3s; }
.footer__row a:hover { border-color: var(--gold-2); }
.footer__legal {
  margin: 0;
  padding: 22px var(--gutter-r) calc(env(safe-area-inset-bottom, 0px) + 28px) var(--gutter);
  text-align: center;
  font-size: .95rem;
  color: #6B4A63;
}

/* =========================================================
   WAX SEAL BADGE, MOTH, SPARKLES
   ========================================================= */
.seal {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 18px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 40;
  width: clamp(62px, 9vw, 104px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: drop-shadow(0 12px 20px rgba(52, 2, 42, .35));
  transition: opacity .5s;
}
.seal svg { width: 100%; height: 100%; display: block; transition: transform .5s var(--ease-out); }
.seal__ring { transform-origin: 60px 60px; animation: spin 22s linear infinite; }
.seal__text { font-family: var(--f-display); font-size: 10.4px; letter-spacing: .5px; fill: var(--gold); text-transform: none; }
.seal:hover svg { transform: scale(1.08) rotate(-6deg); }
.seal:hover .seal__ring { animation-play-state: paused; }
.seal.is-hidden { opacity: 0; pointer-events: none; }

.moth {
  position: fixed;
  left: 0; top: 0;
  z-index: 300;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  pointer-events: none;
  display: none;
  will-change: transform;
}
.moth.is-on { display: block; }
.moth svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 4px 6px rgba(52, 2, 42, .3)); }
.moth__wing { transform-box: fill-box; animation: flap .16s ease-in-out infinite alternate; }
.moth__wing--l { transform-origin: right center; }
.moth__wing--r { transform-origin: left center; }
.moth.is-idle .moth__wing { animation-duration: .7s; }
.moth.is-landed .moth__wing { animation-duration: 1.1s; }
.moth.is-landed svg { transform: scale(1.25); transition: transform .4s var(--ease-out); }
.moth svg { transition: transform .4s var(--ease-out); }
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(.28); } }
.sparkles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 299; pointer-events: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .realm__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .site-nav { display: none; }
  .brand__img { height: 38px; }
  .hero { padding-bottom: 88px; }
  .hero__cta .btn { flex: 1 1 220px; }
  .hero__title { font-size: clamp(2.4rem, 12.6vw, 4rem); }
  .hero__of { font-size: .62em; }
  .hero__eyebrow { letter-spacing: .02em; font-size: .78rem; }
  .vine { width: 46vw; opacity: .9; }

}
@media (max-width: 420px) {

}

/* Reduced motion: keep it calm and still */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ribbon__track { animation: none; }
  .moth, .sparkles { display: none !important; }
}

/* =========================================================
   PAINTED SCENES (approved style, see brand/IMAGE-STYLE.md)
   ========================================================= */

/* Intro arch: painted archway instead of the drawn garden */

/* Hero: castle by the lake, lit like a film still */
.hero { background: var(--plum); color: var(--ivory); }
.hero__bg { position: absolute; inset: -4% 0 -4% 0; z-index: -3; overflow: hidden; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 42%; transform-origin: 62% 45%; animation: drift 34s ease-in-out infinite alternate; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 55% at 50% 58%, rgba(24, 8, 14, .45), rgba(24, 8, 14, 0) 72%),
    linear-gradient(to bottom, rgba(24, 8, 14, .45) 0%, rgba(24, 8, 14, .05) 24%, rgba(40, 6, 30, .2) 60%, rgba(52, 2, 42, .92) 100%);
}
.hero::after { /* soft film grain + gentle vignette over the scene */
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  box-shadow: inset 0 0 160px rgba(20, 0, 15, .55);
}
@keyframes drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.13) translate3d(-1.5%, -1%, 0); } }
.hero__wash { display: none; }
.hero__title { color: var(--ivory); text-shadow: 0 4px 30px rgba(20, 0, 15, .55); }
.hero__of { background: linear-gradient(100deg, var(--gold-2), #FBE3A2 40%, var(--gold) 60%, var(--gold-2)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 12px rgba(20, 0, 15, .5)); }
.hero__eyebrow { color: var(--gold); text-shadow: 0 2px 12px rgba(20, 0, 15, .6); }
.hero__sub { color: var(--cream); text-shadow: 0 2px 16px rgba(20, 0, 15, .7); }
.hero__sub em { color: var(--rose); }
.hero__logo img { filter: drop-shadow(0 10px 30px rgba(20, 0, 15, .55)); }
.hero .ch.is-scribe { color: var(--gold); }
.hero .scroll-cue { color: var(--gold); }
.hero .scroll-cue i { background: linear-gradient(var(--gold), transparent); }
.btn--ghost-light { color: var(--ivory); border-color: rgba(242, 193, 78, .75); background: rgba(52, 2, 42, .25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn--ghost-light:hover { background: rgba(52, 2, 42, .55); }

/* Header sits over the dark scene until you scroll */
.brand__img--light { display: none; }
.site-header:not(.is-scrolled) { color: var(--ivory); }
.site-header:not(.is-scrolled) .brand__img:not(.brand__img--light) { display: none; }
.site-header:not(.is-scrolled) .brand__img--light { display: block; }
.site-header:not(.is-scrolled) .pill { border-color: rgba(242, 193, 78, .8); }
.site-header:not(.is-scrolled) .site-nav a.is-active { color: var(--gold); }

/* Velvet invitation: painted plum damask */
.invite {
  background-image:
    radial-gradient(60% 50% at 50% 40%, rgba(194, 87, 122, .18), transparent 70%),
    linear-gradient(rgba(52, 2, 42, .3), rgba(52, 2, 42, .3)),
    url("../img/plum-damask-tile.webp");
  background-size: auto, auto, var(--damask-size, min(200vw, 960px) auto);
  background-position: center, center, center top;
  background-repeat: no-repeat, no-repeat, repeat;
}
@media (prefers-reduced-motion: reduce) { .hero__bg img { animation: none; transform: scale(1.04); } }

/* =========================================================
   CINEMATIC SCENES, ROUND 2
   ========================================================= */

/* Story: swans framed in an arch beside the text */
.story__body {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  margin-top: clamp(56px, 8vw, 110px);
}
.story__figure { margin: 0; filter: drop-shadow(0 30px 40px rgba(52, 2, 42, .28)); }
.story__arch {
  aspect-ratio: 4 / 5;
  max-width: 100%;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 290' preserveAspectRatio='none'><path d='M0,290 L0,110 C0,50 45,10 100,0 C155,10 200,50 200,110 L200,290 Z'/></svg>") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 290' preserveAspectRatio='none'><path d='M0,290 L0,110 C0,50 45,10 100,0 C155,10 200,50 200,110 L200,290 Z'/></svg>") center / 100% 100% no-repeat;
}
.story__arch img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; }
.story__body .story__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin: 0; max-width: 34em; }
.story__body .signature { margin: 10px 0 0; text-align: left; }

/* Full-screen chapter plates */
.plate {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(92svh, 880px);
  display: grid;
  place-items: center;
  padding: clamp(96px, 14vw, 170px) max(16px, env(safe-area-inset-right, 0px)) clamp(96px, 14vw, 170px) max(16px, env(safe-area-inset-left, 0px));
  text-align: center;
  color: var(--ivory);
  background: var(--plum);
}
.plate__bg { position: absolute; inset: -12% 0; z-index: -2; }
.plate__bg img { width: 100%; height: 100%; object-fit: cover; }
.plate::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 50%, rgba(24, 8, 14, .55), rgba(24, 8, 14, .1) 75%),
    linear-gradient(to bottom, rgba(24, 8, 14, .45), rgba(24, 8, 14, 0) 22%, rgba(24, 8, 14, 0) 70%, rgba(24, 8, 14, .55));
  box-shadow: inset 0 0 180px rgba(20, 0, 15, .55);
}
.plate__inner { max-width: 980px; display: grid; justify-items: center; gap: 18px; }
.plate .eyebrow { margin: 0; text-shadow: 0 2px 12px rgba(20, 0, 15, .7); }
.plate__title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 1.2rem + 6vw, 6.6rem);
  line-height: .98;
  letter-spacing: .02em;
  text-transform: none;
  text-wrap: balance;
  text-shadow: 0 6px 40px rgba(20, 0, 15, .6);
}
.plate__title .script { display: block; color: var(--gold); font-size: .78em; line-height: 1; margin-top: -.05em; }
.plate__verse { margin: 10px 0 0; display: grid; gap: 14px; justify-items: center; }
.plate__verse p {
  margin: 0;
  max-width: 24em;
  font-style: italic;
  font-size: clamp(1.3rem, 1rem + 1.4vw, 2.1rem);
  line-height: 1.35;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(20, 0, 15, .8);
}
.plate__verse--lg p { font-size: clamp(1.7rem, 1.1rem + 2.6vw, 3.4rem); max-width: 18em; }
.plate__verse cite { font-style: normal; font-family: var(--f-display); font-size: .84rem; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--gold); }
.plate__note { margin: 18px 0 0; font-family: var(--f-display); font-size: .82rem; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--cream); opacity: .85; }

/* Misty bridge behind the map */
.realm__bg { position: absolute; left: 0; right: 0; top: 0; height: 75%; z-index: 0; pointer-events: none; opacity: .33;
  -webkit-mask: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.7) 45%, transparent 100%);
          mask: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.7) 45%, transparent 100%); }
.realm__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }

/* Footer at dusk */
.footer { background: var(--plum); color: var(--ivory); isolation: isolate; }
.footer__bg { position: absolute; inset: 0; z-index: -2; }
.footer__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.footer::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--plum) 0%, rgba(52, 2, 42, .55) 18%, rgba(24, 8, 14, .35) 50%, rgba(36, 2, 28, .85) 85%, var(--plum) 100%);
}
.footer__emblem img { filter: drop-shadow(0 10px 30px rgba(20, 0, 15, .6)); }
.footer__script { color: var(--rose); text-shadow: 0 2px 16px rgba(20, 0, 15, .7); }
.footer__row a:hover { border-color: var(--gold); }
.footer .ribbon--light { color: var(--ivory); border-color: rgba(242, 193, 78, .45); }
.footer .ribbon--light i { color: var(--gold); }
.footer__legal { color: rgba(243, 235, 221, .9); }

@media (max-width: 800px) {
  .story__body { grid-template-columns: minmax(0, 1fr); }
  .story__figure { max-width: 420px; width: 100%; margin-inline: auto; }
  .plate { min-height: 78svh; }
}

/* =========================================================
   TWO SIDES OF ONE REALM: the map, the bridge, the City
   ========================================================= */
.day-only { }
.night-only { display: none !important; }
html.is-night .day-only { display: none !important; }
html.is-night .night-only { display: grid !important; }

/* ---- Map ---- */
.realm__grid { grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); align-items: center; }
.map { background: #E9DCC0; }
.map__stage { aspect-ratio: 3 / 2; container-type: inline-size; overflow: hidden; }
.map__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter 1.2s ease; }
.map__night {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease;
  background:
    radial-gradient(28% 34% at 76% 52%, rgba(255, 190, 110, .16), transparent 70%),
    linear-gradient(rgba(18, 16, 40, .55), rgba(10, 8, 22, .7));
  mix-blend-mode: multiply;
}
.map__lamps { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.4s ease .3s; }
.map__lamps i {
  position: absolute; left: var(--x); top: var(--y); width: .55cqw; height: .55cqw; min-width: 3px; min-height: 3px;
  border-radius: 50%; background: #FFD796;
  box-shadow: 0 0 1.2cqw .35cqw rgba(255, 196, 110, .75);
  animation: lamp 3.4s ease-in-out var(--d) infinite;
}
@keyframes lamp { 0%, 100% { opacity: 1; } 45% { opacity: .55; } 50% { opacity: .9; } 55% { opacity: .6; } }
.map__label { position: absolute; transform: translate(-50%, -50%); font-family: var(--f-display); font-weight: 600; letter-spacing: .02em; text-transform: none; color: #3A1B2E; white-space: nowrap; pointer-events: none; transition: color 1.2s; }
.map__label--top { left: 50%; top: 7.6%; font-size: 2.05cqw; }
.map__label--garden { left: 22.5%; top: 89.6%; font-size: max(9px, 1.75cqw); }
.map__label--city { left: 78%; top: 89.6%; font-size: max(9px, 1.75cqw); }
.map__crest { position: absolute; left: 50%; top: 88.5%; width: 6.4%; transform: translate(-50%, -50%); pointer-events: none; }

.pin { width: 44px; height: 44px; margin: -22px 0 0 -22px; transition: opacity .6s, transform .5s var(--ease-out); }
.pin span { width: max(14px, 1.5cqw); height: max(14px, 1.5cqw); }
.pin--night span { background: radial-gradient(circle at 35% 30%, #F4F6FA, #A9B0BC 45%, #3C3A4A); box-shadow: 0 0 0 3px #C9CED6, 0 6px 14px rgba(0, 0, 0, .45); }
.pin--night span::after { border-color: #DDE1E8; }
.pin.is-away { opacity: .35; }
.pin.is-away span::after { animation: none; opacity: 0; }

.bridge {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 6px;
  padding: 0; border: 0; background: none; min-width: 44px; min-height: 44px;
}
.bridge__ring {
  width: max(26px, 3cqw); height: max(26px, 3cqw); border-radius: 50%;
  border: 2px solid var(--gold); background: rgba(255, 248, 236, .25);
  box-shadow: 0 0 0 6px rgba(242, 193, 78, .2), 0 0 24px rgba(242, 193, 78, .6);
  animation: bridgePulse 2.2s ease-in-out infinite;
}
@keyframes bridgePulse { 50% { box-shadow: 0 0 0 12px rgba(242, 193, 78, 0), 0 0 34px rgba(242, 193, 78, .9); } }
.bridge__label {
  font-family: var(--f-display); font-size: max(11px, 1.2cqw); font-weight: 600; letter-spacing: .02em; text-transform: none;
  color: var(--ivory); background: rgba(52, 2, 42, .82); padding: .45em .9em; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(20, 0, 15, .35);
}
.bridge:hover .bridge__ring, .bridge:focus-visible .bridge__ring { transform: scale(1.12); }

.place-card {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--gold-2);
  border-radius: 6px;
  background: rgba(255, 248, 236, .82);
  box-shadow: 0 24px 50px -30px rgba(52, 2, 42, .5);
  display: grid; gap: 10px; align-content: start;
}
.place-card .eyebrow { margin: 0; }
.place-card__name { margin: 0; font-family: var(--f-display); font-weight: 500; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); line-height: 1.1; }
.place-card__line { margin: 0; }
.place-card__piece { font-style: italic; color: var(--rose-deep); }
.place-card__status { margin: 0; font-family: var(--f-display); font-size: .8rem; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--gold-ink); }
.place-card__cross { margin-top: 8px; justify-self: start; }

/* ---- Header side switch ---- */
.side-switch {
  display: inline-flex; align-items: center; padding: 3px; min-height: 40px;
  border: 1px solid var(--gold-2); border-radius: 999px; background: rgba(255, 248, 236, .18);
  font-family: var(--f-display); font-size: .74rem; font-weight: 600; letter-spacing: .02em; text-transform: none;
}
.side-switch__opt { padding: .7em 1em; border-radius: 999px; transition: background-color .5s, color .5s; }
.side-switch__opt--day { background: var(--gold); color: var(--plum); }
html.is-night .side-switch__opt--day { background: transparent; color: inherit; }
html.is-night .side-switch__opt--night { background: #C9CED6; color: var(--black); }
@media (max-width: 420px) { .side-switch__opt { padding: .7em .75em; } .header-aside { gap: 8px; } }

/* ---- Crossing fog ---- */
.crossing {
  position: fixed; inset: 0; z-index: 250; pointer-events: none; opacity: 0; visibility: hidden;
  display: grid; place-items: center;
  background:
    radial-gradient(60% 50% at 30% 40%, rgba(214, 210, 222, .95), transparent 70%),
    radial-gradient(55% 45% at 70% 60%, rgba(190, 184, 204, .95), transparent 70%),
    radial-gradient(80% 70% at 50% 50%, rgba(120, 104, 128, .9), rgba(28, 16, 30, .96));
}
.crossing__text { margin: 0; font-family: var(--f-display); font-size: clamp(.8rem, .6rem + .8vw, 1.15rem); letter-spacing: .02em; text-transform: none; color: #F4F2F7; text-shadow: 0 2px 20px rgba(20, 0, 15, .6); }

/* ---- Lantern light (City side) ---- */
.lantern-light {
  --lx: 50vw; --ly: 55vh;
  position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0; transition: opacity 1s ease;
  background: radial-gradient(circle at var(--lx) var(--ly), rgba(255, 200, 120, .14) 0, rgba(255, 200, 120, .05) 160px, rgba(6, 3, 10, 0) 260px, rgba(6, 3, 10, .32) 640px);
}
html.is-night .lantern-light { opacity: 1; animation: flicker 5s steps(1) infinite; }
@keyframes flicker { 0%, 100% { opacity: 1; } 31% { opacity: .9; } 32% { opacity: 1; } 67% { opacity: .94; } 68% { opacity: 1; } }

/* ---- Cursor: butterfly by day, lantern by night ---- */
.moth__lantern { display: none; }
html.is-night .moth__wing, html.is-night .moth svg > ellipse, html.is-night .moth svg > path { display: none; }
html.is-night .moth__lantern { display: inline; }
html.is-night .moth svg { animation: sway 2.4s ease-in-out infinite; transform-origin: 50% 5%; filter: drop-shadow(0 0 10px rgba(255, 200, 120, .7)); }
.moth__flame { animation: flame .18s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes sway { 50% { rotate: 6deg; } }
@keyframes flame { to { transform: scaleY(.82) scaleX(1.1); } }

/* =========================================================
   THE CITY (night) THEME
   ========================================================= */
html.is-night {
  --gold: #D8DCE3;
  --gold-2: #A9B0BC;
  --gold-ink: #B9C0CB;
  --rose-deep: #E7A3AE;
  --fg: #ECE8F0;
  --bg: var(--black);
}
html.is-night body { background-color: var(--black) !important; color: var(--fg); }
html.is-night body::before { background: var(--black); }
html.is-night .site-header.is-scrolled { background: rgba(18, 10, 18, .82); box-shadow: 0 1px 0 rgba(169, 176, 188, .4); color: var(--fg); }
html.is-night .site-header .brand__img:not(.brand__img--light) { display: none; }
html.is-night .site-header .brand__img--light { display: block; }
html.is-night .pill:hover { background: #C9CED6; color: var(--black); border-color: #C9CED6; }
html.is-night .drift { color: #8C8798; opacity: .22; }
html.is-night .orn, html.is-night .eyebrow { color: var(--gold-ink); }
html.is-night .story__cols p:first-child::first-letter { color: #E7A3AE; text-shadow: 2px 2px 0 #6E7480; }
html.is-night .btn--gold { background: linear-gradient(135deg, #F4F6FA, #C9CED6 45%, #9AA1AD); color: var(--black); border-color: #A9B0BC; }
html.is-night .btn--ghost { color: var(--fg); background: rgba(255, 255, 255, .04); border-color: #A9B0BC; }
html.is-night .btn--plum { background: #1E141E; color: #D8DCE3; border-color: #4A3F4C; }
html.is-night .hero__of, html.is-night .invite__title {
  background-image: linear-gradient(100deg, #A9B0BC, #F4F6FA 35%, #C9CED6 55%, #A9B0BC 75%, #F4F6FA);
}
html.is-night .plate__title .script, html.is-night .plate__verse cite { color: #D8DCE3; }

/* scenes go to night */
html.is-night .hero__bg img,
html.is-night .plate:not(.plate--fountain) .plate__bg img,
html.is-night .realm__bg img { filter: brightness(.42) saturate(.55) contrast(1.12) hue-rotate(-18deg); }
html.is-night .realm__bg { opacity: .5; }
html.is-night .hero::after { box-shadow: inset 0 0 220px rgba(4, 2, 10, .8); }

/* map at night */
html.is-night .map { background: #1A1420; box-shadow: 0 30px 60px -30px #000, inset 0 0 0 1px rgba(169, 176, 188, .5); }
html.is-night .map__img { filter: grayscale(.55) brightness(.62) contrast(1.15) sepia(.15); }
html.is-night .map__night, html.is-night .map__lamps { opacity: 1; }
html.is-night .map__label { color: #E6E8EE; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
html.is-night .bridge__ring { border-color: #DDE1E8; background: rgba(220, 225, 232, .15); box-shadow: 0 0 0 6px rgba(221, 225, 232, .18), 0 0 26px rgba(255, 200, 120, .55); }
html.is-night .bridge__label { background: rgba(18, 10, 18, .85); }
html.is-night .place-card { background: rgba(26, 18, 28, .86); border-color: #6E7480; color: var(--fg); box-shadow: 0 24px 50px -24px #000; }
html.is-night .place-card__piece { color: #E7A3AE; }

/* invitation + footer in silver */
html.is-night .invite { background-color: var(--black); }
html.is-night .invite__card { border-color: #A9B0BC; outline-color: rgba(169, 176, 188, .4); background: linear-gradient(180deg, rgba(30, 20, 32, .82), rgba(14, 8, 16, .9)); }
html.is-night .corner path { stroke: #A9B0BC; }
html.is-night .field label { color: #D8DCE3; }
html.is-night .field input { border-color: rgba(169, 176, 188, .55); }
html.is-night .footer::before { background: linear-gradient(to bottom, var(--black) 0%, rgba(18, 10, 18, .6) 20%, rgba(10, 6, 14, .45) 50%, rgba(14, 8, 16, .9) 85%, var(--black) 100%); }
html.is-night .footer__bg img { filter: brightness(.6) saturate(.7); }
html.is-night .ribbon { background: #1A121A; border-color: #6E7480; }
html.is-night .ribbon i { color: #E7A3AE; }
html.is-night .seal svg circle:first-child { fill: #1A121A; }
html.is-night .seal svg circle:nth-child(2) { stroke: #A9B0BC; }

@media (max-width: 900px) {
  .realm__grid { grid-template-columns: minmax(0, 1fr); }
  .map__stage { aspect-ratio: 3 / 2; }
}
@media (prefers-reduced-motion: reduce) {
  html.is-night .lantern-light { animation: none; }
  .map__lamps i, .bridge__ring { animation: none; }
}

/* map places pop in once the map is in view (always visible at rest) */
.map.is-in .pin span { animation: pinIn .8s cubic-bezier(.34, 1.56, .64, 1) both; }
.map.is-in .pin:nth-of-type(2n) span { animation-delay: .08s; }
.map.is-in .pin:nth-of-type(3n) span { animation-delay: .16s; }
.map.is-in .pin:nth-of-type(5n) span { animation-delay: .24s; }
@keyframes pinIn { from { transform: scale(0); opacity: 0; } }

html.is-night .btn--ghost-light { border-color: rgba(201, 206, 214, .7); background: rgba(18, 10, 18, .35); }

/* =========================================================
   PHASE 1: warm Garden mode, contrast, mobile-first hero
   ========================================================= */
.drift { opacity: .28; }
.drift--wisteria { color: var(--gold-2); opacity: .3; }
.realm { background: var(--parchment-deep); }
html.is-night .realm { background: transparent; }
.realm__bg { opacity: .22; }
.realm__bg img { filter: sepia(.35) saturate(.85); }
.story { background: linear-gradient(180deg, var(--cream), var(--parchment-deep)); }
html.is-night .story { background: transparent; }
.site-nav a, .pill, .footer__row { font-weight: 600; }

/* Mobile first: tagline + main button on the first screen at 375 x 667 */
@media (max-width: 760px) {
  .hero { min-height: 100svh; padding-top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 8px); padding-bottom: 64px; align-items: start; }
  .hero__inner { padding-top: 2vh; }
  .hero__logo { width: min(52vw, 210px); margin-bottom: .6rem; }
  .hero__eyebrow { margin-bottom: .55rem; }
  .hero__title { font-size: clamp(2.2rem, 11.4vw, 3.6rem); }
  .hero__sub { margin-top: .9rem; font-size: 1.12rem; line-height: 1.45; }
  .hero__cta { margin-top: 1.1rem; gap: 10px; width: 100%; }
  .hero__cta .btn { flex: 1 1 100%; min-height: 50px; padding-block: .8em; }
  .scroll-cue { display: none; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .hero__logo { width: min(40vw, 150px); }
  .hero__title { font-size: clamp(2rem, 10.2vw, 3rem); }
  .hero__sub { font-size: 1.04rem; margin-top: .6rem; }
}

/* Phase 1: minimum label sizes + desktop hero fits the first screen */
.pill { font-size: .82rem; }
.side-switch { font-size: .8rem; }
.bridge__label { font-size: max(12.5px, 1.2cqw); }
.hero__logo { width: clamp(190px, 21vw, 300px); }
@media (min-width: 761px) { .hero__title { font-size: clamp(2.4rem, 8.6vw, 7.6rem); } .hero__sub { margin-top: 1.2rem; } .hero__cta { margin-top: 1.5rem; } }
@media (max-width: 760px) { .hero__eyebrow { font-size: .8rem; letter-spacing: .02em; } }

/* Text for screen readers only */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Painted windows set into the manifesto (replacing the earlier icons) */
.charm.charm--pic { width: 1.45em; height: .78em; vertical-align: -.02em; margin-inline: .08em; border-radius: 999px; overflow: hidden; background: #2A0221;
  box-shadow: 0 0 0 1px var(--color-antique-gold), 0 0 0 3px rgba(243, 235, 221, .0), 0 10px 18px -10px rgba(52, 2, 42, .55); }
.charm.charm--pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
html.is-night .charm.charm--pic { box-shadow: 0 0 0 1px var(--color-silver-deep), 0 10px 18px -10px #000; }
.charm.charm--pic { -webkit-mask: none; mask: none; }
/* no decorative drop cap (a template tell): the story opens in plain, confident type */
.story__cols p:first-child::first-letter, html.is-night .story__cols p:first-child::first-letter { float: none; font: inherit; color: inherit; text-shadow: none; margin: 0; padding: 0; line-height: inherit; }
