/* WHAT THIS FILE IS: Chandrika's foundational layout and interaction styles;
   chapters.css adds the illustrated inner-section compositions. The desktop invitation is
   an editorial spread; phones become a single deliberate column, never a
   scaled desktop screenshot. All motion has a reduced-motion equivalent. */
@font-face {
  font-family: Chandrika Serif;
  src: url("assets/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Chandrika Serif;
  src: url("assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Chandrika Sans;
  src: url("assets/fonts/jost-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  --col: 1440px;
  --forest: #102e29;
  --deep: #0a211d;
  --ivory: #f7f1e5;
  --gold: #cba66a;
  --ink: #24433a;
  --muted: #6d776b;
  --line: #c4ac7b66;
  --serif: "Chandrika Serif", Georgia, serif;
  --sans: "Chandrika Sans", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  background: var(--deep);
}
body {
  margin: 0;
  color: var(--ivory);
  font: 16px/1.65 var(--sans);
  overflow-x: clip;
}
body:not(.open) {
  overflow: hidden;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}
[hidden] {
  display: none !important;
}
img {
  display: block;
  max-width: 100%;
}
p,
h1,
h2,
h3,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
  text-wrap: balance;
}
h2 {
  font-size: clamp(42px, 5.5vw, 72px);
  letter-spacing: -0.045em;
}
h2 em {
  font-weight: 400;
  color: var(--gold);
}
h3 {
  font-size: clamp(34px, 3.7vw, 50px);
  letter-spacing: -0.025em;
}
em {
  font-family: var(--serif);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.26em;
  line-height: 1.8;
  text-transform: uppercase;
}
.section {
  padding: 100px 40px;
}
.section-inner {
  width: min(100%, 1040px);
  margin-inline: auto;
  text-align: center;
}
.section-inner > .eyebrow {
  color: var(--gold);
  margin-bottom: 18px;
}
.paper {
  color: var(--ink);
  background:
    radial-gradient(ellipse at 0 30%, #dcc99e22, transparent 45%),
    radial-gradient(ellipse at 100% 90%, #d6cbb933, transparent 40%), var(--ivory);
}
.paper h2 em {
  color: #94723e;
}
.paper .eyebrow {
  color: #8b6c3c;
}
.section-note {
  margin: 22px auto 38px;
  color: var(--muted);
  max-width: 450px;
}
.ornament {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin-top: 48px;
}
.ornament span {
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.ornament span:last-child {
  transform: rotate(180deg);
}
.button {
  display: inline-flex;
  justify-content: center;
  gap: 22px;
  align-items: center;
  min-height: 48px;
  padding: 13px 24px;
  border: 1px solid var(--gold);
  background: var(--forest);
  color: var(--ivory);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.15em;
  transition:
    background 0.2s,
    transform 0.2s;
}
.button:hover {
  background: #244c3e;
  transform: translateY(-2px);
}
.button span {
  font-size: 20px;
}
.text-button {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 0;
  font-size: 11px;
  letter-spacing: 0.07em;
}
.text-button:hover {
  border-color: currentColor;
}
.text-button span {
  margin-left: 10px;
}
.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 100;
  padding: 12px;
  background: var(--ivory);
  color: var(--forest);
}
#page {
  max-width: var(--col);
  margin: auto;
  overflow: clip;
}

/* Two textured doors open around a real button. The page remains inert until
   opening starts, so a keyboard cannot disappear behind the cover. */
.cover {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
}
.cover-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background:
    radial-gradient(ellipse at 100% 50%, #2c4c3a, transparent 80%),
    repeating-linear-gradient(90deg, #ffffff02 0 1px, transparent 1px 4px), var(--forest);
  transition: transform 1.5s cubic-bezier(0.65, 0, 0.2, 1);
}
.cover-door::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid #cba66a55;
}
.door-left {
  left: 0;
  border-right: 1px solid #cba66a66;
}
.door-right {
  right: 0;
  transform: scaleX(-1);
}
.cover-content {
  position: relative;
  text-align: center;
  width: min(90%, 650px);
  transition:
    opacity 0.55s,
    transform 0.7s;
}
.cover-content > .eyebrow {
  color: #d7c399;
}
.cover-names {
  font: clamp(44px, 6vw, 78px)/1.15 var(--serif);
  margin: 26px 0 34px;
}
.seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin: auto;
  border: 1px solid #f2d9a1;
  border-radius: 50%;
  background: radial-gradient(ellipse at 35% 25%, #e6ce93, #ba9252 60%, #8c662f);
  box-shadow:
    0 0 0 7px #b9945133,
    0 0 0 8px #cba66a55,
    0 15px 40px #0005,
    inset 0 0 0 6px #9a74394d;
  color: #355040;
  font: italic 35px/1 var(--serif);
  transition: transform 0.3s;
}
.seal:hover {
  transform: scale(1.05);
}
.seal-star {
  position: absolute;
  bottom: 14px;
  font-size: 15px;
}
.open-hint {
  margin-top: 32px;
}
.cover-date {
  font: italic 20px var(--serif);
  margin-top: 32px;
  color: #d7c399;
}
.opening .cover-content {
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
}
.opening .door-left {
  transform: translateX(-100%);
}
.opening .door-right {
  transform: translateX(100%) scaleX(-1);
}
.opening .cover {
  pointer-events: none;
}

/* Matching scene dimensions and crop put the painted moon in the same place
   on the opening and closing pages without stretching either illustration. */
.hero,
.closing-scene {
  position: relative;
  min-height: 700px;
  height: 100svh;
  max-height: 1150px;
  /* Center the crop so the full moon is not clipped against the top edge on
     normal landscape screens; the artwork itself keeps its native ratio. */
  background: var(--forest) url("assets/moonlit-palace.webp?v=3") center / cover no-repeat;
  text-align: center;
}
.hero {
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #0a211d22, transparent 58%, #071e1944);
}
.hero-frame {
  position: absolute;
  inset: 24px;
  border: 1px solid #cba66a55;
  pointer-events: none;
}
.hero-frame::before,
.hero-frame::after {
  content: "✧";
  position: absolute;
  color: var(--gold);
  font-size: 23px;
  top: -21px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  padding: 0 15px;
}
.hero-frame::after {
  top: auto;
  bottom: -21px;
  background: transparent;
}
.hero-copy {
  position: relative;
  padding: 65px 40px 0;
  width: min(100%, 1000px);
  margin: auto;
}
.hero-kicker {
  color: #e0c797;
}
.tiny-ornament {
  color: var(--gold);
  margin: 12px 0;
  font-size: 21px;
}
h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 24px;
  font-size: clamp(68px, 8vw, 120px);
  letter-spacing: -0.04em;
  text-shadow: 0 3px 24px #102e2966;
}
h1 span {
  overflow-wrap: anywhere;
}
h1 em {
  color: #cba66a;
  font-size: 0.54em;
}
.hero-invite {
  margin-top: 16px;
  color: #e4dec9;
  font: italic 25px var(--serif);
}
.hero-details {
  margin: 30px auto 0;
  width: fit-content;
  max-width: 90%;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 11px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.hero-details p + p {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.8;
}
.explore {
  position: absolute;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 10px;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.22em;
}
.explore span:last-child {
  font-size: 24px;
  animation: beckon 3s ease-in-out infinite;
}
.hero-edition {
  position: absolute;
  left: 48px;
  bottom: 75px;
  writing-mode: vertical-rl;
  font-size: 8px;
  letter-spacing: 0.35em;
  color: #e2c697;
}
.fireflies {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.fireflies i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ebd393;
  box-shadow: 0 0 12px 3px #e6d39333;
  animation: glimmer 7s ease-in-out infinite alternate;
}
.fireflies i:nth-child(1) {
  left: 18%;
  top: 46%;
}
.fireflies i:nth-child(2) {
  left: 76%;
  top: 40%;
  animation-delay: -3s;
}
.fireflies i:nth-child(3) {
  left: 32%;
  top: 62%;
  animation-delay: -5s;
}
.fireflies i:nth-child(4) {
  left: 83%;
  top: 68%;
  animation-delay: -2s;
}
.fireflies i:nth-child(5) {
  left: 9%;
  top: 75%;
  animation-delay: -4s;
}
.fireflies i:nth-child(6) {
  left: 60%;
  top: 52%;
  animation-delay: -6s;
}
.chapter-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 25px 20px;
  background: var(--deep);
  border-bottom: 1px solid #cba66a33;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.chapter-nav span {
  color: var(--gold);
}
.chapter-nav a:hover {
  color: var(--gold);
}

.welcome {
  position: relative;
}
.welcome::before,
.welcome::after {
  content: "";
  position: absolute;
  inset: 35px auto 35px 25px;
  width: 50px;
  border: 1px solid #c4ac7b40;
  border-right: 0;
  border-radius: 150px 0 0 150px;
  pointer-events: none;
}
.welcome::after {
  left: auto;
  right: 25px;
  transform: rotate(180deg);
}
.blessing {
  margin-top: 32px;
  font-size: 14px;
  color: #7a704f;
}
.blessing img {
  width: 60px;
  max-height: 80px;
  object-fit: contain;
  margin: 0 auto 15px;
}
#blessing-symbol {
  font-size: 32px;
}
.intro {
  max-width: 580px;
  margin: 24px auto 0;
  line-height: 1.9;
  color: var(--muted);
}
.hosted {
  margin-top: 28px;
  color: #776545;
}
.families {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  margin-top: 46px;
}
.family {
  flex: 1;
  max-width: 380px;
}
.family h3 {
  font-size: clamp(29px, 3vw, 39px);
}
.family p {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.family small {
  display: block;
  margin-bottom: 5px;
  color: #92733f;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 9px;
}
.family-join {
  font: italic 32px var(--serif);
  color: #ac8f57;
}
.countdown {
  background:
    radial-gradient(ellipse at 50% 100%, #36513d55, transparent 70%), var(--forest);
}
.countdown h2 {
  font-size: clamp(40px, 5vw, 62px);
}
.countdown-card {
  position: relative;
  width: min(100%, 560px);
  margin: 42px auto 14px;
  border: 1px solid var(--line);
}
.clock {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 35px 22px;
}
.clock strong {
  display: block;
  font: 54px/1 var(--serif);
  font-variant-numeric: tabular-nums;
  min-width: 60px;
}
.clock span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: #cfb98d;
}
.clock b {
  color: #cba66a88;
  font-weight: 400;
  padding-bottom: 20px;
}
#foil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  transition: opacity 0.6s;
}
#foil-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #36513d;
  transition: opacity 0.25s;
}
#foil-label > span {
  font-size: 23px;
}
#foil-label p {
  font: italic 30px var(--serif);
}
#foil-label small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 9px;
}
.countdown .text-button {
  color: #deccaa;
}
.revealed #foil,
.revealed #foil-label {
  opacity: 0;
  pointer-events: none;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 40px auto 28px;
}
.tabs button {
  min-height: 45px;
  padding: 12px 25px;
  background: transparent;
  border: 1px solid transparent;
  color: #6e775f;
  font-size: 11px;
  letter-spacing: 0.1em;
}
.tabs button[aria-selected="true"] {
  border-color: #ac8f57;
  color: var(--forest);
  background: #c4ac7b12;
}
.event-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  border: 1px solid #c4ac7b70;
  text-align: left;
  min-height: 480px;
  background: #fffdf755;
}
.event-scene {
  position: relative;
  background: var(--forest);
  min-height: 100%;
  overflow: hidden;
}
.event-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 72%;
  position: absolute;
}
.event-scene::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid #cba66a66;
  pointer-events: none;
}
.event-scene-label {
  position: absolute;
  inset: auto 35px 35px;
  color: var(--ivory);
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.event-scene-label .eyebrow {
  color: #ead5aa;
}
#event-number {
  font: italic 58px/1 var(--serif);
}
.event-copy {
  padding: 45px;
}
.event-copy h3 {
  margin: 16px 0 6px;
}
.event-time {
  font: italic 24px var(--serif);
  color: #97753b;
}
.short-rule {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 23px 0;
}
.venue-name {
  font-size: 16px;
}
#event-address {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.event-note {
  color: var(--muted);
  margin-top: 20px;
  font-size: 14px;
}
.dress-code {
  margin-top: 22px;
  font-size: 11px;
  color: #80683b;
}
.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-top: 25px;
}
.event-actions .button {
  padding-inline: 18px;
  font-size: 9px;
}
.story {
  background:
    radial-gradient(ellipse at 80% 20%, #37564055, transparent 65%), var(--forest);
}
.story-heading {
  margin-bottom: 45px;
}
.story-heading .eyebrow {
  color: var(--gold);
  margin-bottom: 15px;
}
.story-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 65px;
  align-items: center;
  text-align: left;
}
.story-layout.without-photo {
  grid-template-columns: 1fr;
  max-width: 620px;
  margin-inline: auto;
}
.story-photo-wrap {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 48% 48% 0 0;
}
.story-photo-wrap img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 48% 48% 0 0;
}
.photo-corner {
  position: absolute;
  bottom: -15px;
  right: 24px;
  color: var(--gold);
  font-size: 32px;
  background: var(--forest);
  padding: 0 10px;
}
.story-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}
.story-tabs button {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid #cba66a44;
  border-radius: 50%;
  color: #dbc49c;
  font: 19px var(--serif);
}
.story-tabs button[aria-selected="true"] {
  background: var(--gold);
  color: var(--forest);
  border-color: var(--gold);
}
#story-when {
  color: var(--gold);
  margin-bottom: 18px;
}
#story-heading {
  max-width: 390px;
}
#story-body {
  margin-top: 25px;
  color: #c1c9b9;
  line-height: 1.9;
  font-size: 15px;
}
.chapter-prompt {
  margin-top: 35px;
  font: italic 22px var(--serif);
  color: var(--gold);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.gallery button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  text-align: left;
}
.gallery button:nth-child(3n + 2) {
  margin-top: 45px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  padding: 9px;
  border: 1px solid #c4ac7b88;
  transition:
    transform 0.4s,
    filter 0.4s;
}
.gallery button:hover img {
  transform: translateY(-5px);
  filter: brightness(1.05);
}
.gallery .gallery-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 5px;
  font: italic 20px var(--serif);
}
.gallery .gallery-caption small {
  font: 10px var(--sans);
  color: #907447;
  padding-top: 5px;
}
.film-section {
  background: var(--deep);
}
.film-frame {
  margin-top: 40px;
  aspect-ratio: 16/9;
  border: 1px solid var(--line);
}
.film-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.play-film {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  background: #17372f url("assets/moonlit-palace.webp?v=3") center/cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  overflow: hidden;
}
.play-film img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.play-film > span {
  position: relative;
}
.play-circle {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: 36px;
  background: #102e2980;
}
.reply {
  border-top: 1px solid #c4ac7b55;
}
.rsvp-form {
  width: min(100%, 600px);
  margin: 0 auto;
  text-align: left;
}
fieldset {
  padding: 0;
  border: 0;
  margin: 0 0 28px;
}
legend {
  margin-bottom: 12px;
  font-size: 12px;
}
.reply-choices {
  display: flex;
  gap: 12px;
}
.reply-choices label {
  flex: 1;
  position: relative;
  cursor: pointer;
}
.reply-choices input {
  position: absolute;
  opacity: 0;
}
.reply-choices span {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #c4ac7b88;
  font-size: 13px;
}
.reply-choices input:checked + span {
  background: var(--forest);
  color: var(--ivory);
  border-color: var(--forest);
}
.reply-choices input:focus-visible + span {
  outline: 2px solid #94723e;
  outline-offset: 3px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.form-grid label {
  display: grid;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-grid input,
textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid #b5a37a;
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
  color: var(--ink);
  font-size: 16px;
  resize: vertical;
}
input::placeholder,
textarea::placeholder {
  color: #929586;
  font-size: 13px;
}
.rsvp-form > .button {
  margin-top: 30px;
  width: 100%;
}
#rsvp-status {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
}
.contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 35px;
}
.contacts a {
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.closing {
  background: var(--deep);
  text-align: center;
}
/* Scenery and attribution are consecutive blocks, not overlapping layers.
   The extra lower scene space leaves the palace and water unobstructed. */
.closing-scene {
  /* Keep the moon unobscured; fade only the water into the credit strip. */
  background-image:
    linear-gradient(transparent 65%, #0a211d 100%), url("assets/moonlit-palace.webp?v=3");
  padding: 70px 25px 310px;
}
.closing-credit {
  padding: 20px 70px calc(28px + env(safe-area-inset-bottom));
  background: var(--deep);
}
.closing-names {
  font: clamp(40px, 6vw, 72px) var(--serif);
  margin: 15px 0;
}
.closing .eyebrow,
#hashtag {
  color: #dac396;
}
#hashtag,
#instagram {
  font-size: 12px;
}
#instagram {
  display: block;
  margin-top: 16px;
}
.closing .ornament {
  margin-top: 25px;
}
.credit {
  display: inline-block;
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 0;
  opacity: 0.8;
}
.music {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 12px 17px;
  border: 1px solid #cba66a88;
  border-radius: 30px;
  background: #102e29f2;
  color: #e9dabb;
  box-shadow: 0 3px 14px #0002;
}
#music-label {
  font-size: 9px;
  letter-spacing: 0.08em;
}
.music-bars {
  height: 14px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.music-bars i {
  width: 2px;
  height: 5px;
  background: var(--gold);
}
.music-bars i:nth-child(2),
.music-bars i:nth-child(4) {
  height: 12px;
}
[aria-pressed="true"] .music-bars i {
  animation: sound 1s ease-in-out infinite alternate;
}
[aria-pressed="true"] .music-bars i:nth-child(2) {
  animation-delay: -0.6s;
}
[aria-pressed="true"] .music-bars i:nth-child(3) {
  animation-delay: -0.3s;
}
dialog {
  width: min(900px, 95vw);
  max-height: 94svh;
  border: 1px solid var(--line);
  padding: 45px 25px 20px;
  background: var(--deep);
  color: var(--ivory);
}
dialog::backdrop {
  background: #061713e8;
  backdrop-filter: blur(8px);
}
dialog figure img {
  max-height: 69svh;
  width: 100%;
  object-fit: contain;
}
dialog figcaption {
  text-align: center;
  font: italic 22px var(--serif);
  margin-top: 16px;
}
.lightbox-close {
  position: absolute;
  right: 5px;
  top: 0;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  font-size: 30px;
}
.lightbox-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 15px;
}
.lightbox-controls button {
  background: none;
  border: 1px solid var(--line);
  width: 44px;
  height: 44px;
  font-size: 20px;
}
#photo-count {
  font-size: 11px;
  color: var(--gold);
}
.noscript {
  position: fixed;
  inset: auto 20px 25px;
  z-index: 50;
  padding: 16px;
  text-align: center;
  background: var(--ivory);
  color: var(--forest);
}
/* Content starts visible. JS opts into reveals only after successful setup;
   a failed observer or disabled scripting never strands invisible copy. */
.motion-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}
.motion-ready .reveal.visible {
  opacity: 1;
  transform: none;
}
@keyframes glimmer {
  from {
    opacity: 0.15;
    transform: translateY(0);
  }
  to {
    opacity: 0.9;
    transform: translateY(-18px);
  }
}
@keyframes beckon {
  50% {
    transform: translateY(6px);
  }
}
@keyframes sound {
  to {
    transform: scaleY(0.35);
  }
}
@media (max-width: 700px) {
  .section {
    padding: 70px 24px;
  }
  .hero,
  .closing-scene {
    min-height: 740px;
    height: 100svh;
    max-height: 950px;
    background-size: auto 100%;
  }
  .hero-frame {
    inset: 15px;
  }
  .hero-copy {
    padding: 64px 30px 0;
  }
  .hero-kicker {
    font-size: 8px;
    letter-spacing: 0.2em;
  }
  h1 {
    flex-direction: column;
    align-items: center;
    gap: 0;
    font-size: clamp(58px, 15vw, 92px);
    line-height: 0.98;
  }
  h1 em {
    font-size: 32px;
    line-height: 1.4;
  }
  .tiny-ornament {
    margin: 8px 0 15px;
  }
  .hero-invite {
    font-size: 21px;
    margin-top: 15px;
  }
  .hero-details {
    margin-top: 20px;
    padding-top: 15px;
    font-size: 9px;
    max-width: 100%;
  }
  .hero-details p + p {
    font-size: 8px;
  }
  .hero-edition {
    display: none;
  }
  .explore {
    bottom: 35px;
  }
  .chapter-nav {
    gap: 15px;
    padding: 22px 12px;
    font-size: 8px;
    letter-spacing: 0.08em;
  }
  .chapter-nav span {
    font-size: 9px;
  }
  .welcome::before,
  .welcome::after {
    display: none;
  }
  .intro {
    font-size: 14px;
  }
  .intro br {
    display: none;
  }
  .families {
    flex-direction: column;
    gap: 22px;
    margin-top: 35px;
  }
  .family-join {
    font-size: 26px;
  }
  .clock {
    gap: 10px;
    padding: 35px 10px;
  }
  .clock strong {
    font-size: 38px;
    min-width: 42px;
  }
  .clock span {
    font-size: 7px;
    letter-spacing: 0.08em;
  }
  .clock b {
    font-size: 12px;
  }
  #foil-label p {
    font-size: 26px;
  }
  .tabs {
    gap: 3px;
    margin: 30px 0 20px;
  }
  .tabs button {
    padding: 10px 13px;
    font-size: 10px;
  }
  .event-panel {
    grid-template-columns: 1fr;
  }
  .event-scene {
    min-height: 220px;
  }
  .event-scene img {
    object-position: center 76%;
  }
  .event-copy {
    padding: 30px 25px;
  }
  .story-layout {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  .story-photo-wrap {
    width: min(100%, 360px);
    margin: auto;
  }
  .story-photo-wrap img {
    aspect-ratio: 1;
  }
  .story-copy {
    padding: 0 6px;
  }
  .story-tabs {
    margin-bottom: 25px;
  }
  #story-heading {
    font-size: 37px;
  }
  .gallery {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 5px 0 15px;
    scrollbar-color: var(--gold) transparent;
  }
  .gallery button {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }
  .gallery button:nth-child(3n + 2) {
    margin-top: 0;
  }
  .gallery .gallery-caption {
    font-size: 19px;
  }
  .form-grid {
    gap: 20px 16px;
  }
  .reply-choices span {
    font-size: 11px;
  }
  .closing-scene {
    padding: 65px 30px 270px;
  }
  .cover-content > .eyebrow {
    font-size: 8px;
  }
  .cover-names {
    font-size: 45px;
    margin: 28px 0 40px;
  }
  .music {
    right: 14px;
    padding: 12px;
  }
  #music-label {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .motion-ready .reveal {
    opacity: 1;
    transform: none;
  }
}
