:root {
  --ink: #243044;
  --muted: #657487;
  --soft-white: rgba(255, 255, 255, 0.82);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --paper: #fffdf7;
  --gold: #b99048;
  --rose: #b06f75;
  --sage: #6f8f86;
  --blue: #91bad4;
  --deep: #233653;
  --line: rgba(85, 105, 130, 0.16);
  --focus: rgba(185, 144, 72, 0.28);
  --shadow: 0 24px 70px rgba(35, 54, 83, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #d9eef7;
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.86), transparent 26%),
    radial-gradient(circle at 76% 12%, rgba(255, 244, 211, 0.72), transparent 24%),
    linear-gradient(180deg, rgba(132, 184, 215, 0.92) 0%, rgba(216, 237, 246, 0.94) 48%, rgba(255, 253, 247, 0.96) 100%);
  transition: background 700ms ease, filter 700ms ease;
}

body.candle-lit .sky {
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 229, 150, 0.52), transparent 28%),
    radial-gradient(circle at 76% 12%, rgba(255, 207, 112, 0.58), transparent 24%),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.7), transparent 24%),
    linear-gradient(180deg, rgba(85, 123, 154, 0.92) 0%, rgba(178, 190, 190, 0.88) 48%, rgba(255, 240, 200, 0.94) 100%);
  filter: saturate(1.08) sepia(0.08) brightness(1.02);
}

.sky::before,
.sky::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transition: opacity 700ms ease, filter 700ms ease;
}

body.candle-lit .sky::before {
  opacity: 0.46;
  filter: blur(12px) sepia(0.18);
}

body.candle-lit .sky::after {
  opacity: 0.54;
  filter: blur(16px) sepia(0.24);
}

.sky::before {
  inset: -8vh auto 0 -65vw;
  width: 230vw;
  height: 70vh;
  opacity: 0.7;
  filter: blur(10px);
  background:
    radial-gradient(ellipse at 9% 30%, rgba(255, 255, 255, 0.9) 0 6%, rgba(231, 243, 249, 0.5) 12%, transparent 22%),
    radial-gradient(ellipse at 19% 22%, rgba(255, 255, 255, 0.94) 0 8%, rgba(231, 243, 249, 0.48) 15%, transparent 26%),
    radial-gradient(ellipse at 34% 36%, rgba(255, 255, 255, 0.84) 0 9%, rgba(231, 243, 249, 0.42) 17%, transparent 29%),
    radial-gradient(ellipse at 52% 18%, rgba(255, 255, 255, 0.88) 0 8%, rgba(231, 243, 249, 0.45) 15%, transparent 27%),
    radial-gradient(ellipse at 68% 34%, rgba(255, 255, 255, 0.82) 0 9%, rgba(231, 243, 249, 0.4) 17%, transparent 30%),
    radial-gradient(ellipse at 84% 24%, rgba(255, 255, 255, 0.9) 0 8%, rgba(231, 243, 249, 0.45) 15%, transparent 27%);
  animation: cloud-field 38s linear infinite;
}

.sky::after {
  inset: auto auto -8vh -75vw;
  width: 250vw;
  height: 46vh;
  opacity: 0.72;
  filter: blur(14px);
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 253, 247, 0.68) 78%, rgba(255, 253, 247, 0.78) 100%),
    radial-gradient(ellipse at 11% 70%, rgba(255, 255, 255, 0.84) 0 7%, rgba(226, 241, 248, 0.44) 15%, transparent 28%),
    radial-gradient(ellipse at 26% 62%, rgba(255, 255, 255, 0.86) 0 9%, rgba(226, 241, 248, 0.42) 17%, transparent 32%),
    radial-gradient(ellipse at 44% 74%, rgba(255, 255, 255, 0.82) 0 9%, rgba(226, 241, 248, 0.4) 18%, transparent 34%),
    radial-gradient(ellipse at 63% 60%, rgba(255, 255, 255, 0.86) 0 8%, rgba(226, 241, 248, 0.42) 16%, transparent 31%),
    radial-gradient(ellipse at 82% 72%, rgba(255, 255, 255, 0.8) 0 9%, rgba(226, 241, 248, 0.36) 18%, transparent 34%);
  animation: cloud-field 54s linear infinite reverse;
}

.cloud,
.cloud::before,
.cloud::after {
  position: absolute;
  display: block;
  pointer-events: none;
}

.cloud {
  --scale: 1;
  --duration: 38s;
  --delay: 0s;
  --y-drift: 12px;
  width: 540px;
  height: 184px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  opacity: 0.88;
  filter: blur(1.2px) drop-shadow(0 24px 28px rgba(111, 150, 176, 0.16));
  transform: scale(var(--scale));
  transform-origin: center;
  will-change: translate, margin-top;
  transition: opacity 700ms ease, filter 700ms ease;
  background:
    radial-gradient(ellipse at 10% 68%, rgba(255, 255, 255, 0.94) 0 12%, transparent 28%),
    radial-gradient(ellipse at 25% 48%, rgba(255, 255, 255, 1) 0 19%, transparent 40%),
    radial-gradient(ellipse at 42% 34%, rgba(255, 255, 255, 0.98) 0 26%, transparent 49%),
    radial-gradient(ellipse at 61% 40%, rgba(255, 255, 255, 0.96) 0 23%, transparent 46%),
    radial-gradient(ellipse at 80% 58%, rgba(255, 255, 255, 0.94) 0 19%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(197, 222, 236, 0.82) 0 40%, transparent 67%);
  box-shadow:
    inset -54px -30px 48px rgba(103, 151, 184, 0.2),
    inset 44px 24px 48px rgba(255, 255, 255, 0.68),
    0 30px 64px rgba(255, 255, 255, 0.42);
  animation: cloud-drift var(--duration) linear infinite, cloud-float 7s ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

body.candle-lit .cloud {
  opacity: 0.5;
  filter: blur(1.6px) sepia(0.22) drop-shadow(0 26px 34px rgba(176, 111, 80, 0.18));
}

.cloud::before,
.cloud::after {
  content: "";
}

.cloud::before {
  width: 82%;
  height: 92%;
  left: 7%;
  bottom: 18%;
  border-radius: 48% 52% 42% 58% / 62% 58% 42% 38%;
  background:
    radial-gradient(ellipse at 16% 60%, rgba(255, 255, 255, 0.82) 0 18%, transparent 38%),
    radial-gradient(ellipse at 38% 34%, rgba(255, 255, 255, 0.96) 0 30%, transparent 54%),
    radial-gradient(ellipse at 68% 52%, rgba(255, 255, 255, 0.84) 0 28%, transparent 53%),
    radial-gradient(ellipse at 84% 66%, rgba(219, 238, 247, 0.58) 0 20%, transparent 42%);
  filter: blur(0.8px);
}

.cloud::after {
  width: 82%;
  height: 52%;
  left: 10%;
  bottom: 0;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 35% 42%, rgba(255, 255, 255, 0.72), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(188, 217, 234, 0.5));
  filter: blur(8px);
}

.cloud-one {
  --scale: 0.84;
  --duration: 31s;
  --delay: -8s;
  --y-drift: 18px;
  top: 8vh;
  left: -620px;
}

.cloud-two {
  --scale: 1.22;
  --duration: 43s;
  --delay: -25s;
  --y-drift: -16px;
  top: 25vh;
  left: -760px;
  opacity: 0.78;
}

.cloud-three {
  --scale: 0.68;
  --duration: 34s;
  --delay: -38s;
  --y-drift: 14px;
  top: 53vh;
  left: -590px;
  opacity: 0.64;
}

.cloud-four {
  --scale: 1.58;
  --duration: 52s;
  --delay: -52s;
  --y-drift: -10px;
  top: 2vh;
  left: -980px;
  opacity: 0.52;
}

.cloud-five {
  --scale: 0.94;
  --duration: 36s;
  --delay: -30s;
  --y-drift: -18px;
  top: 38vh;
  left: -680px;
  opacity: 0.7;
}

.cloud-six {
  --scale: 1.08;
  --duration: 48s;
  --delay: -6s;
  --y-drift: 20px;
  top: 67vh;
  left: -800px;
  opacity: 0.6;
}

.cloud-seven {
  --scale: 0.56;
  --duration: 29s;
  --delay: -18s;
  --y-drift: -12px;
  top: 17vh;
  left: -520px;
  opacity: 0.74;
}

.cloud-eight {
  --scale: 1.35;
  --duration: 58s;
  --delay: -41s;
  --y-drift: 16px;
  top: 78vh;
  left: -980px;
  opacity: 0.46;
}

.light-ray {
  position: absolute;
  top: -12vh;
  right: 3vw;
  width: 42vw;
  height: 88vh;
  background: linear-gradient(105deg, rgba(255, 247, 215, 0.3), rgba(255, 255, 255, 0));
  transform: rotate(8deg);
}

@keyframes cloud-drift {
  0% {
    translate: 0 0;
  }
  45% {
    translate: calc(45vw + 660px) var(--y-drift);
  }
  100% {
    translate: calc(100vw + 1340px) 0;
  }
}

@keyframes cloud-field {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(78vw);
  }
}

@keyframes cloud-float {
  from {
    margin-top: 0;
  }
  to {
    margin-top: 10px;
  }
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 40px rgba(35, 54, 83, 0.12);
  backdrop-filter: blur(22px) saturate(130%);
}

.brand {
  flex: 0 0 auto;
  color: var(--deep);
  font-size: clamp(1rem, 2vw, 1.08rem);
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--deep);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(185, 144, 72, 0.18);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(39, 57, 88, 0.08);
  cursor: pointer;
}

.menu-button span:not(.sr-only) {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--deep);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 790px);
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: clamp(28px, 5vw, 52px);
  width: min(1160px, calc(100% - 32px));
  min-height: calc(100vh - 90px);
  margin: 0 auto;
  padding: clamp(70px, 10vw, 112px) 0 68px;
  text-align: center;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--deep);
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1;
}

h1 {
  max-width: 720px;
  font-size: clamp(3.5rem, 8.6vw, 7.1rem);
}

.hero h1 {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.92;
}

h2 {
  font-size: clamp(2.25rem, 6vw, 4.7rem);
}

h3 {
  font-size: 1.7rem;
}

.dates {
  margin: 18px 0 0;
  color: var(--rose);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 800;
}

.hero-line {
  max-width: 520px;
  margin: 20px auto 0;
  color: var(--ink);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
}

.primary-link,
.quiet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.primary-link {
  border: 0;
  color: #fffdf7;
  background: var(--deep);
  box-shadow: 0 12px 24px rgba(39, 57, 88, 0.2);
  cursor: pointer;
}

.quiet-link {
  color: var(--deep);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(35, 54, 83, 0.1);
}

.primary-link:hover,
.quiet-link:hover,
.primary-link:focus-visible,
.quiet-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(35, 54, 83, 0.18);
}

.portrait-frame {
  position: relative;
  width: min(430px, 100%);
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(120%);
}

.portrait-frame::before {
  content: "";
  position: absolute;
  inset: -16px;
  z-index: -1;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(176, 111, 117, 0.22), rgba(185, 144, 72, 0.22), rgba(111, 143, 134, 0.18));
  filter: blur(18px);
}

.portrait-frame img,
.portrait-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(135deg, rgba(145, 186, 212, 0.34), rgba(255, 253, 247, 0.88)),
    repeating-linear-gradient(135deg, transparent, transparent 9px, rgba(39, 57, 88, 0.045) 9px, rgba(39, 57, 88, 0.045) 18px);
}

.portrait-photo {
  object-position: center 36%;
}

.portrait-photo:not([src]),
.portrait-photo[src=""],
.portrait-photo.is-missing {
  display: none;
}

.portrait-photo:not([src]) + .portrait-placeholder,
.portrait-photo[src=""] + .portrait-placeholder,
.portrait-photo.is-missing + .portrait-placeholder {
  display: grid;
}

.portrait-photo + .portrait-placeholder {
  display: none;
}

.portrait-placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 430px;
  padding: 24px;
  text-align: center;
}

.portrait-placeholder span,
.video-placeholder span {
  color: var(--deep);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1;
}

.portrait-placeholder small,
.video-placeholder small {
  display: block;
  max-width: 240px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.portrait-frame figcaption {
  padding: 15px 4px 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.portrait-actions {
  display: flex;
  justify-content: center;
  padding: 14px 0 2px;
}

.section {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(62px, 9vw, 96px) 0;
}

.section + .section {
  position: relative;
}

.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(760px, 80vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(35, 54, 83, 0.12), transparent);
  transform: translateX(-50%);
}

.section-heading {
  max-width: 730px;
  margin-bottom: 32px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.intro-section .section-heading {
  text-align: center;
}

.split-section .section-heading,
.media-section .section-heading,
.song-section .section-heading,
.memory-section .section-heading {
  max-width: 780px;
}

.idea-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.idea-card,
.story-panel,
.media-shell,
.song-panel,
.candle-panel,
.memory-form,
.memory-item {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  background: var(--soft-white);
  box-shadow: 0 18px 48px rgba(35, 54, 83, 0.11);
  backdrop-filter: blur(22px) saturate(120%);
}

.idea-card {
  display: block;
  position: relative;
  overflow: hidden;
  min-height: 238px;
  padding: 26px;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.idea-card::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, transparent 46%, var(--gold) 47% 53%, transparent 54%),
    linear-gradient(45deg, transparent 48%, var(--gold) 49% 55%, transparent 56%);
  opacity: 0.42;
  transform: translateX(-2px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.idea-card::after {
  content: "";
  position: absolute;
  inset: auto 26px 20px;
  height: 1px;
  background: linear-gradient(90deg, rgba(185, 144, 72, 0.5), transparent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.idea-card:hover,
.idea-card:focus-visible {
  border-color: rgba(185, 144, 72, 0.48);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 26px 58px rgba(35, 54, 83, 0.16);
  transform: translateY(-4px);
}

.idea-card:hover::after,
.idea-card:focus-visible::after {
  opacity: 1;
}

.idea-card:hover::before,
.idea-card:focus-visible::before {
  opacity: 0.8;
  transform: translateX(0);
}

.idea-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.card-number {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--rose);
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.idea-card h3 {
  max-width: 240px;
}

.idea-card p,
.story-panel p,
.media-shell p,
.song-panel p,
.candle-panel p,
.memory-item p,
.form-note {
  color: var(--muted);
}

.story-panel {
  position: relative;
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
}

.story-panel,
.media-shell,
.song-panel,
.candle-panel,
.memory-form {
  outline: 1px solid rgba(255, 255, 255, 0.34);
  outline-offset: -7px;
}

.story-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: clamp(28px, 5vw, 48px);
  left: clamp(28px, 5vw, 48px);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold), rgba(176, 111, 117, 0.7), transparent);
}

.story-panel p {
  margin: 0;
  color: #3f4d61;
  font-size: clamp(1rem, 1.5vw, 1.09rem);
  line-height: 1.82;
}

.story-panel p + p {
  margin-top: 22px;
}

.media-shell {
  max-width: 940px;
  margin-right: auto;
  margin-left: auto;
  overflow: hidden;
}

.media-shell iframe,
.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.22), transparent 24%),
    linear-gradient(135deg, rgba(35, 54, 83, 0.9), rgba(111, 143, 134, 0.72)),
    repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(255, 255, 255, 0.07) 14px, rgba(255, 255, 255, 0.07) 28px);
}

.media-shell iframe {
  display: block;
}

.video-placeholder {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.video-placeholder span,
.video-placeholder small {
  color: #fffdf7;
}

.media-shell p {
  margin: 0;
  padding: 20px 24px 24px;
  font-weight: 500;
  text-align: center;
}

.song-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: 24px;
  max-width: 940px;
  margin-right: auto;
  margin-left: auto;
  padding: clamp(28px, 5vw, 46px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 253, 247, 0.72)),
    radial-gradient(circle at 84% 20%, rgba(185, 144, 72, 0.18), transparent 26%);
}

.song-panel > div:first-child {
  text-align: center;
}

.sound-lines {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 150px;
}

.sound-lines span {
  width: 12px;
  min-height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--rose), var(--gold));
  box-shadow: 0 10px 18px rgba(176, 111, 117, 0.16);
  animation: pulse 1.3s ease-in-out infinite;
}

.sound-lines span:nth-child(2) {
  min-height: 70px;
  animation-delay: 150ms;
}

.sound-lines span:nth-child(3) {
  min-height: 112px;
  animation-delay: 300ms;
}

.sound-lines span:nth-child(4) {
  min-height: 78px;
  animation-delay: 450ms;
}

.sound-lines span:nth-child(5) {
  min-height: 42px;
  animation-delay: 600ms;
}

@keyframes pulse {
  0%,
  100% {
    transform: scaleY(0.78);
    opacity: 0.7;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.memory-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  max-width: 940px;
  margin-right: auto;
  margin-left: auto;
}

.candle-panel,
.memory-form {
  padding: clamp(24px, 4vw, 36px);
}

.candle-panel {
  display: grid;
  place-items: center;
  text-align: center;
}

.candle-button {
  position: relative;
  display: grid;
  justify-items: center;
  width: 160px;
  min-height: 210px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 180ms ease;
}

.candle-button::before,
.candle-button::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease, transform 260ms ease;
}

.candle-button::before {
  top: 0;
  left: 50%;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 222, 127, 0.42) 0 18%, rgba(243, 162, 53, 0.22) 34%, transparent 68%);
  filter: blur(8px);
  transform: translateX(-50%) scale(0.72);
}

.candle-button::after {
  top: 50px;
  left: 50%;
  width: 112px;
  height: 156px;
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(255, 246, 181, 0.2), transparent 68%);
  transform: translateX(-50%) scale(0.8);
}

.candle-button:hover,
.candle-button:focus-visible {
  transform: translateY(-3px);
}

.candle-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 6px;
}

.flame {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 64px;
  margin-top: -6px;
  border-radius: 68% 36% 58% 42% / 72% 42% 58% 34%;
  background:
    radial-gradient(circle at 48% 24%, #fffef2 0 13%, transparent 26%),
    radial-gradient(ellipse at 54% 58%, rgba(255, 214, 84, 0.82) 0 22%, transparent 48%),
    linear-gradient(180deg, #fff3a7 0%, #ffbf36 38%, #f17832 72%, #aa3f3b 100%);
  box-shadow: 0 0 0 rgba(243, 162, 53, 0);
  transform: scale(0.58);
  transform-origin: bottom;
  opacity: 0.34;
  transition: opacity 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}

.flame-core {
  position: absolute;
  right: 12px;
  bottom: 9px;
  width: 17px;
  height: 36px;
  border-radius: 72% 34% 58% 42% / 74% 44% 58% 34%;
  background: linear-gradient(180deg, #fffef0, #ffe57c 54%, rgba(255, 180, 66, 0.65));
  filter: blur(0.2px);
  opacity: 0.88;
  transform-origin: bottom;
}

.wick {
  position: relative;
  z-index: 1;
  width: 4px;
  height: 20px;
  margin-top: -2px;
  border-radius: 999px;
  background: #514135;
}

.candle-body {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 124px;
  margin-top: -2px;
  border-radius: 12px 12px 6px 6px;
  background:
    radial-gradient(ellipse at 48% 0%, rgba(255, 255, 255, 0.82) 0 20%, transparent 38%),
    linear-gradient(90deg, #eadabf, #fffaf0 43%, #d6bd99 100%);
  box-shadow:
    inset -12px 0 18px rgba(185, 144, 72, 0.18),
    inset 10px 0 18px rgba(255, 255, 255, 0.42),
    0 20px 24px rgba(39, 57, 88, 0.14);
}

.candle-body::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 18px;
  width: 10px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0));
}

.button-label {
  margin-top: 18px;
  color: var(--deep);
  font-weight: 900;
}

.candle-button.is-lit .flame {
  opacity: 1;
  transform: scale(1.08);
  box-shadow:
    0 0 20px rgba(255, 246, 181, 0.95),
    0 0 54px rgba(243, 162, 53, 0.78),
    0 0 116px rgba(255, 190, 86, 0.52);
  animation: flicker 1.15s ease-in-out infinite;
}

.candle-button.is-lit .flame-core {
  animation: core-flicker 860ms ease-in-out infinite alternate;
}

.candle-button.is-lit::before {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: candle-glow 2.4s ease-in-out infinite;
}

.candle-button.is-lit::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: candle-aura 3.2s ease-in-out infinite;
}

.candle-button.is-lit .candle-body {
  animation: wax-warmth 2.8s ease-in-out infinite;
}

@keyframes flicker {
  0% {
    transform: scale(0.96, 1.06) rotate(-3deg) translateX(-1px);
  }
  22% {
    transform: scale(1.08, 0.95) rotate(2deg) translateX(1px);
  }
  47% {
    transform: scale(0.92, 1.12) rotate(-1deg) translateX(0);
  }
  72% {
    transform: scale(1.04, 0.98) rotate(3deg) translateX(1px);
  }
  100% {
    transform: scale(1, 1.04) rotate(-2deg) translateX(-1px);
  }
}

@keyframes core-flicker {
  from {
    transform: scale(0.82, 1.12) translateY(1px);
    opacity: 0.72;
  }
  to {
    transform: scale(1.08, 0.9) translateY(-1px);
    opacity: 1;
  }
}

@keyframes candle-glow {
  0%,
  100% {
    opacity: 0.82;
    filter: blur(8px);
  }
  50% {
    opacity: 1;
    filter: blur(12px);
  }
}

@keyframes candle-aura {
  0%,
  100% {
    opacity: 0.42;
    transform: translateX(-50%) scale(0.94);
  }
  50% {
    opacity: 0.72;
    transform: translateX(-50%) scale(1.08);
  }
}

@keyframes wax-warmth {
  0%,
  100% {
    box-shadow:
      inset -12px 0 18px rgba(185, 144, 72, 0.18),
      inset 10px 0 18px rgba(255, 255, 255, 0.42),
      0 20px 24px rgba(39, 57, 88, 0.14);
  }
  50% {
    box-shadow:
      inset -12px 0 18px rgba(185, 144, 72, 0.22),
      inset 10px 0 18px rgba(255, 255, 255, 0.54),
      0 20px 28px rgba(243, 162, 53, 0.2);
  }
}

.memory-form {
  display: grid;
  gap: 12px;
}

.memory-form label {
  color: var(--deep);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.memory-form input,
.memory-form textarea {
  width: 100%;
  border: 1px solid rgba(95, 111, 130, 0.2);
  border-radius: 6px;
  padding: 14px 15px;
  color: var(--ink);
  font: inherit;
  background: rgba(255, 255, 255, 0.84);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.memory-form input:focus,
.memory-form textarea:focus {
  border-color: rgba(185, 144, 72, 0.78);
  box-shadow: 0 0 0 4px rgba(185, 144, 72, 0.14);
  background: rgba(255, 255, 255, 0.96);
}

.form-button {
  width: fit-content;
  margin-top: 4px;
  justify-self: center;
}

.form-note {
  margin: 0;
  font-size: 0.85rem;
}

.memory-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.memory-item {
  padding: 20px 22px;
}

.memory-item strong {
  color: var(--deep);
}

.memory-item p {
  margin: 6px 0 0;
}

.site-footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 64px;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0 0 6px;
  color: var(--deep);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.1;
}

.site-footer span {
  font-weight: 700;
}

@media (max-width: 860px) {
  .site-header {
    align-items: center;
  }

  .menu-button {
    display: grid;
  }

  .site-nav {
    position: fixed;
    top: 74px;
    right: 16px;
    left: 16px;
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  body.nav-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 64px;
  }

  .portrait-frame {
    max-width: 420px;
  }

  .idea-grid,
  .memory-layout,
  .song-panel {
    grid-template-columns: 1fr;
  }

  .sound-lines {
    min-height: 110px;
  }
}

@media (max-width: 540px) {
  h1 {
    font-size: clamp(3rem, 18vw, 4.6rem);
  }

  h2 {
    font-size: clamp(2.05rem, 12vw, 3.2rem);
  }

  .section {
    width: min(100% - 24px, 1160px);
  }

  .primary-link,
  .quiet-link {
    width: 100%;
  }

  .portrait-placeholder {
    min-height: 330px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
