:root {
  --bg: #f8efe8;
  --bg-deep: #f1e3da;
  --surface: rgba(255, 250, 246, 0.72);
  --surface-strong: rgba(255, 250, 246, 0.9);
  --text: #4f342d;
  --muted: #87655d;
  --accent: #c98282;
  --accent-strong: #a95e63;
  --accent-soft: #efd0cf;
  --gold: #c9a56b;
  --shadow: 0 24px 80px rgba(98, 58, 58, 0.14);
  --shadow-soft: 0 12px 40px rgba(116, 70, 70, 0.1);
  --border: rgba(134, 88, 88, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content-width: min(1120px, calc(100vw - 32px));
  --duration: 700ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.78), transparent 34%),
    radial-gradient(circle at 80% 10%, rgba(239, 208, 207, 0.75), transparent 28%),
    linear-gradient(180deg, #fbf4ef 0%, var(--bg) 45%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
}

a,
button {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.page-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
}

.particle-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.82;
  mix-blend-mode: soft-light;
}

.hero {
  position: relative;
  z-index: 1;
}

.ambient {
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.7;
  z-index: -1;
}

.ambient-one {
  top: 6vh;
  left: -6vw;
  width: 26rem;
  height: 26rem;
  background: radial-gradient(circle, rgba(235, 193, 193, 0.55), transparent 70%);
  animation: floatDrift 14s ease-in-out infinite;
}

.ambient-two {
  top: 48vh;
  right: -10vw;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(255, 238, 214, 0.55), transparent 70%);
  animation: floatDrift 18s ease-in-out infinite reverse;
}

.ambient-three {
  bottom: -6vh;
  left: 28vw;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(circle, rgba(219, 186, 215, 0.3), transparent 70%);
  animation: floatDrift 20s ease-in-out infinite;
}

.section,
.hero {
  width: var(--content-width);
  margin: 0 auto;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  align-items: center;
  padding: 3rem 0 2rem;
}

.hero-copy,
.hero-card,
.section-heading,
.letter-card {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--duration) var(--ease),
    transform var(--duration) var(--ease);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-title,
.section-heading h2,
.success-card h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.hero-title {
  font-size: clamp(3.5rem, 9vw, 6.6rem);
  max-width: 10ch;
}

.hero-title span {
  color: var(--accent-strong);
}

.hero-intro,
.proposal-subcopy,
.proposal-hint,
.hero-card-note,
.success-card p {
  line-height: 1.75;
  color: var(--muted);
}

.hero-intro {
  margin: 1.5rem 0 2rem;
  max-width: 33rem;
  font-size: 1.08rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.95rem 1.45rem;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 240ms ease,
    box-shadow 240ms ease,
    background-color 240ms ease,
    color 240ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button:focus-visible {
  outline: 2px solid rgba(169, 94, 99, 0.5);
  outline-offset: 4px;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff7f6;
  box-shadow: 0 14px 32px rgba(169, 94, 99, 0.24);
}

.button-secondary {
  background: rgba(255, 248, 244, 0.8);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(169, 94, 99, 0.14);
}

.hero-card {
  align-self: center;
}

.hero-card-inner,
.letter-card,
.success-card {
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.9), rgba(255, 248, 244, 0.7));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card-inner {
  position: relative;
  padding: 2rem;
  min-height: 28rem;
  overflow: hidden;
}

.hero-card-inner::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border-radius: calc(var(--radius-xl) - 8px);
  border: 1px solid rgba(201, 165, 107, 0.22);
}

.hero-card-label {
  position: relative;
  margin: 0;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.74rem;
}

.hero-card-note {
  position: absolute;
  bottom: 2.35rem;
  right: 2rem;
  left: 2rem;
  margin: 0;
  max-width: 21rem;
}

.hero-art {
  position: absolute;
  inset: 0;
}

.art-heart {
  position: absolute;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.7), transparent 28%),
    linear-gradient(135deg, rgba(201, 130, 130, 0.96), rgba(232, 183, 183, 0.82));
  box-shadow: 0 10px 24px rgba(197, 129, 129, 0.18);
  transform: rotate(45deg);
  border-radius: 1rem;
  animation: pulseGlow 7s ease-in-out infinite;
}

.art-heart::before,
.art-heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
}

.art-heart::before {
  left: -50%;
}

.art-heart::after {
  top: -50%;
}

.art-heart-large {
  left: 40%;
  top: 42%;
  width: 7rem;
  height: 7rem;
}

.art-heart-medium {
  left: 12%;
  top: 18%;
  width: 4.4rem;
  height: 4.4rem;
  animation-delay: 0.9s;
}

.art-heart-small {
  right: 16%;
  top: 32%;
  width: 3.8rem;
  height: 3.8rem;
  animation-delay: 1.7s;
}

.art-glow {
  position: absolute;
  inset: auto auto 8% 18%;
  width: 13rem;
  height: 13rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 208, 207, 0.45), transparent 70%);
  filter: blur(8px);
}

.letter-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  min-height: 100dvh;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 360ms ease,
    visibility 360ms ease;
}

.letter-modal.visible {
  opacity: 1;
  visibility: visible;
}

.letter-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 246, 241, 0.24), transparent 34%),
    radial-gradient(circle at 18% 22%, rgba(239, 208, 207, 0.2), transparent 32%),
    linear-gradient(180deg, rgba(85, 58, 62, 0.48), rgba(85, 58, 62, 0.48));
  opacity: 0;
  transition: opacity 650ms ease;
  transform: translateZ(0);
}

.letter-modal-dialog {
  position: relative;
  width: min(940px, 100%);
  height: min(88vh, 820px);
  max-height: calc(100vh - 2.5rem);
}

.letter-modal-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.modal-letter-sheet {
  position: relative;
  width: min(860px, 100%);
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 252, 249, 0.98), rgba(255, 247, 243, 0.95));
  border: 1px solid rgba(201, 165, 107, 0.18);
  border-radius: 2rem;
  box-shadow: 0 34px 90px rgba(90, 57, 61, 0.22);
  opacity: 0;
  transform: translateY(1.4rem) scale(0.9);
  transition:
    opacity 900ms ease,
    transform 1200ms cubic-bezier(0.16, 0.9, 0.18, 1);
}

.modal-letter-topbar {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 2.35rem 0.75rem;
}

.modal-letter-topbar h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 4.4vw, 3.55rem);
  line-height: 0.96;
}

.modal-close {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  min-height: 2.9rem;
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 249, 244, 0.88);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(169, 94, 99, 0.14);
}

.modal-letter-content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
  padding: 0.25rem 2.35rem 5rem;
  scrollbar-color: rgba(169, 94, 99, 0.42) rgba(255, 249, 244, 0.72);
  scrollbar-width: thin;
}

.modal-letter-content:focus {
  outline: none;
}

.modal-letter-lines .letter-line {
  opacity: 1;
  transform: none;
  transition: none;
}

.letter-modal.modal-open .letter-modal-backdrop,
.letter-modal.modal-closing .letter-modal-backdrop {
  opacity: 1;
}

.letter-modal.modal-open .modal-letter-sheet {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 520ms;
}

.modal-proposal {
  margin-top: 2.25rem;
  padding: 1.85rem 1.2rem 4rem;
  border-top: 1px solid rgba(169, 94, 99, 0.14);
  text-align: center;
}

.modal-proposal .eyebrow {
  margin-bottom: 0.55rem;
}

.modal-proposal h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.15rem, 4.6vw, 3.55rem);
  font-weight: 600;
  line-height: 0.98;
  color: var(--text);
  overflow-wrap: anywhere;
}

.section {
  padding: 5rem 0;
}

.section-heading {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.section-heading h2 {
  font-size: clamp(2.6rem, 6vw, 4rem);
}

.letter-card {
  padding: clamp(1.75rem, 4vw, 3rem);
  background:
    linear-gradient(180deg, rgba(255, 251, 247, 0.93), rgba(255, 246, 240, 0.8)),
    repeating-linear-gradient(
      180deg,
      rgba(201, 165, 107, 0.08) 0,
      rgba(201, 165, 107, 0.08) 1px,
      transparent 1px,
      transparent 2.6rem
    );
}

.letter-salutation,
.letter-signoff {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  color: var(--accent-strong);
}

.letter-lines {
  margin: 1.6rem 0 2rem;
  display: grid;
  gap: 0.9rem;
}

.letter-line {
  margin: 0;
  max-width: 64ch;
  font-size: 1rem;
  line-height: 1.82;
  color: #684843;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 600ms var(--ease),
    transform 600ms var(--ease);
}

.letter-line.line-visible {
  opacity: 1;
  transform: translateY(0);
}

.modal-letter-content .letter-signoff {
  margin-top: 1.8rem;
}

.letter-postscript {
  margin: 1rem 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.7;
}

.proposal-subcopy {
  margin: 0 auto;
  max-width: 42rem;
}

.modal-proposal .proposal-subcopy {
  margin-top: 0.85rem;
}

.proposal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2rem;
}

.proposal-hint {
  margin: 1rem 0 0;
  font-size: 0.96rem;
  min-height: 2.2rem;
  padding-bottom: 0.2rem;
}

.success-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(88, 56, 61, 0.34);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 400ms ease,
    visibility 400ms ease;
}

.success-panel.visible {
  opacity: 1;
  visibility: visible;
}

.success-card {
  width: min(32rem, 100%);
  padding: 2rem;
  text-align: center;
}

.success-card h2 {
  font-size: clamp(2.8rem, 7vw, 4rem);
  margin-bottom: 0.8rem;
}

.petals {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.petal {
  position: absolute;
  top: -10%;
  width: 1rem;
  height: 1rem;
  background: linear-gradient(135deg, rgba(201, 130, 130, 0.95), rgba(255, 235, 228, 0.9));
  border-radius: 70% 0 70% 0;
  opacity: 0.8;
  animation: petalFall linear forwards;
}

.mute-button,
.volume-slider {
  position: fixed;
  left: clamp(1rem, 3vw, 1.75rem);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  min-height: 3.15rem;
  border: 1px solid rgba(169, 94, 99, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 253, 250, 0.86), rgba(255, 243, 239, 0.74)),
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.92), transparent 34%);
  color: var(--accent-strong);
  box-shadow:
    0 18px 42px rgba(98, 58, 58, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
}

.mute-button {
  bottom: clamp(1rem, 3vw, 1.75rem);
  gap: 0.65rem;
  padding: 0.72rem 1rem 0.72rem 0.85rem;
}

.volume-slider {
  bottom: calc(clamp(1rem, 3vw, 1.75rem) + 3.7rem);
  gap: 0.75rem;
  min-height: 2.9rem;
  padding: 0.62rem 0.9rem;
}

.mute-button:hover,
.mute-button:focus-visible,
.volume-slider:hover,
.volume-slider:focus-within {
  transform: translateY(-2px);
  box-shadow:
    0 22px 54px rgba(98, 58, 58, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.mute-button:focus-visible {
  outline: 2px solid rgba(169, 94, 99, 0.5);
  outline-offset: 4px;
}

.volume-slider-label {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.volume-slider input {
  width: 7.2rem;
  accent-color: var(--accent-strong);
}

.volume-slider input:focus-visible {
  outline: 2px solid rgba(169, 94, 99, 0.45);
  outline-offset: 4px;
  border-radius: 999px;
}

.mute-icon {
  position: relative;
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
}

.mute-speaker {
  position: absolute;
  left: 0.08rem;
  top: 0.43rem;
  width: 0.78rem;
  height: 0.6rem;
  border-radius: 0.18rem 0.08rem 0.08rem 0.18rem;
  background: currentColor;
}

.mute-speaker::after {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: -0.25rem;
  width: 0.68rem;
  height: 1.1rem;
  background: currentColor;
  clip-path: polygon(0 32%, 100% 0, 100% 100%, 0 68%);
}

.mute-wave {
  position: absolute;
  top: 50%;
  right: 0;
  border: 2px solid currentColor;
  border-left: 0;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0.72;
}

.mute-wave-one {
  width: 0.48rem;
  height: 0.78rem;
}

.mute-wave-two {
  right: -0.28rem;
  width: 0.76rem;
  height: 1.08rem;
  opacity: 0.42;
}

.mute-label {
  font-size: 0.92rem;
  font-weight: 700;
}

.mute-button[aria-pressed="true"] .mute-wave {
  opacity: 0;
}

.mute-button[aria-pressed="true"] .mute-icon::after {
  content: "";
  position: absolute;
  left: 0.14rem;
  top: 0.66rem;
  width: 1.45rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-38deg);
  transform-origin: center;
}

@keyframes floatDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -20px, 0) scale(1.03);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: rotate(45deg) scale(1);
  }
  50% {
    transform: rotate(45deg) scale(1.08);
  }
}

@keyframes petalFall {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    transform: translate3d(var(--drift-x), 115vh, 0) rotate(var(--rotation));
  }
}

@media (max-width: 880px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding-top: 1.5rem;
    padding-bottom: 8.5rem;
  }

  .hero-card-inner {
    min-height: 20rem;
  }

  .hero-title {
    font-size: clamp(3.2rem, 15vw, 5rem);
    max-width: none;
  }

  .letter-modal-dialog {
    width: min(760px, 100%);
  }

  .letter-modal-stage {
    min-height: min(84vh, 760px);
  }
}

@media (max-width: 640px) {
  :root {
    --content-width: min(100vw - 24px, 100%);
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    gap: 1.35rem;
    padding-top: 1rem;
    padding-bottom: 9rem;
  }

  .hero-intro {
    font-size: 1rem;
  }

  .hero-card-inner {
    min-height: 18.5rem;
    padding: 1.4rem;
  }

  .hero-card-inner::before {
    inset: 0.8rem;
  }

  .hero-card-label {
    max-width: 16rem;
    font-size: 0.66rem;
    letter-spacing: 0.16em;
  }

  .hero-card-note {
    bottom: 1.35rem;
    right: 1.35rem;
    left: 1.35rem;
    max-width: 17rem;
    font-size: 0.95rem;
  }

  .art-heart-large {
    left: 44%;
    top: 42%;
    width: 5.4rem;
    height: 5.4rem;
  }

  .art-heart-medium {
    left: 12%;
    top: 18%;
    width: 3.8rem;
    height: 3.8rem;
  }

  .art-heart-small {
    right: 12%;
    top: 30%;
    width: 3.1rem;
    height: 3.1rem;
  }

  .hero-card-inner,
  .letter-card,
  .success-card {
    border-radius: 24px;
  }

  .modal-letter-topbar,
  .modal-letter-content {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

  .modal-letter-topbar {
    padding-top: 1.35rem;
    flex-direction: column;
    align-items: stretch;
  }

  .modal-letter-topbar h2 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .proposal-actions {
    flex-direction: column;
    margin-top: 1.5rem;
  }

  .proposal-actions .button {
    width: 100%;
  }

  .mute-button {
    min-height: 2.95rem;
    padding: 0.65rem 0.9rem 0.65rem 0.78rem;
  }

  .volume-slider {
    gap: 0.55rem;
    min-height: 2.7rem;
    padding: 0.56rem 0.75rem;
  }

  .volume-slider input {
    width: min(7rem, 38vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .hero-copy,
  .hero-card,
  .section-heading,
  .letter-card,
  .letter-line,
  .modal-letter-sheet {
    opacity: 1 !important;
    transform: none !important;
  }
}
