:root {
  --bg: #fef6f8;
  --bg-deep: #fcd6e2;
  --bg-blue: #d4e6f4;
  --ink: #4d4670;
  --ink-soft: #7d7595;
  --accent: #ec85a8;
  --accent-soft: #f7bccf;
  --blue: #8ec3e2;
  --blue-deep: #6ba6cb;
  --peach: #ffd4c2;
  --mute: #d4a5b6;
  --footer-bg: #8ec3e2;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

section, header, footer { padding: 5rem 1.5rem; text-align: center; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem;
  background:
    radial-gradient(ellipse at 15% 5%, rgba(252, 214, 226, 0.95), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(142, 195, 226, 0.7), transparent 55%),
    radial-gradient(ellipse at 100% 0%, rgba(247, 188, 207, 0.5), transparent 50%),
    var(--bg);
}

.hero-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--accent);
  margin-bottom: 2.2rem;
}
.hero-mark::before, .hero-mark::after {
  content: "";
  width: 38px;
  height: 1px;
  background: var(--mute);
}
.telugu {
  font-family: 'Tiro Telugu', serif;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.names {
  font-family: 'Pinyon Script', 'Fraunces', Georgia, serif;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(4.4rem, 14vw, 8.5rem);
  color: var(--ink);
  line-height: 0.95;
  letter-spacing: 0;
}
.names span {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translateY(14px);
  animation: blurIn 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.names span:nth-child(1) { animation-delay: 0.6s; }
.names span:nth-child(2) { animation-delay: 1.05s; }
.names span:nth-child(3) { animation-delay: 1.35s; }
.names .amp {
  display: block;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  font-size: 0.4em;
  margin: 0.1em 0;
  letter-spacing: 0;
}

.full-names {
  margin-top: 1.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}

.parents {
  margin-top: 1.4rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.9;
  letter-spacing: 0.01em;
  max-width: 42rem;
}
.parents p { margin: 0; }
.parents em {
  font-style: italic;
  color: var(--ink);
  font-weight: 700;
}

.invitation {
  color: var(--ink-soft);
  margin: 2.8rem auto 2rem;
  font-size: 1rem;
  max-width: 32ch;
  line-height: 1.75;
}

.date-block {
  margin-top: 1rem;
  text-align: center;
}
.date-line {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--accent);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
  line-height: 1;
}
.date-line em {
  font-style: italic;
  font-weight: 300;
}
.day-name {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--mute);
  font-size: 0.7rem;
  font-weight: 500;
}

.scroll-cue {
  margin-top: 3.5rem;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.32em;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s;
}
.scroll-cue:hover { color: var(--accent); }

/* PHOTO */
.photo {
  padding: 6rem 1.5rem;
  background:
    radial-gradient(ellipse at 30% 50%, var(--bg-deep), transparent 70%),
    radial-gradient(ellipse at 80% 50%, var(--bg-blue), transparent 70%),
    var(--bg);
}
.photo-frame {
  width: min(380px, 80vw);
  aspect-ratio: 3/4;
  margin: 0 auto;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(44, 36, 30, 0.3);
  position: relative;
  background: var(--bg);
}
.photo-frame img,
.photo-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-placeholder {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.5rem;
  color: var(--mute);
  font-style: italic;
  text-align: center;
  padding: 2rem;
}
.photo-placeholder code {
  font-family: ui-monospace, Menlo, monospace;
  font-style: normal;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85em;
}
.photo-frame.placeholder .photo-placeholder { display: flex; }

/* MEET US */
.meet {
  padding: 6rem 1.5rem;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(252, 214, 226, 0.4), transparent 60%),
    radial-gradient(ellipse at 10% 80%, rgba(212, 230, 244, 0.4), transparent 60%),
    var(--bg);
}
.meet h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  color: var(--ink);
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
  text-align: center;
}
.meet-grid {
  max-width: 720px;
  margin: 0 auto;
}
.meet-photo {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(44, 36, 30, 0.3);
}
.meet-photo img { width: 100%; height: auto; display: block; }
.meet-bios { display: flex; flex-direction: column; gap: 2.2rem; text-align: left; }
.bio h3 {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.bio-name {
  font-family: 'Pinyon Script', serif;
  font-size: 2.6rem;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.8rem;
}
.bio-text {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
@media (max-width: 760px) {
  .meet-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .meet-photo { max-width: 360px; margin: 0 auto; }
}

/* MESSAGE */
.message { max-width: 580px; margin: 0 auto; }
.message p {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
  letter-spacing: -0.01em;
}
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0;
}
.divider::before, .divider::after {
  content: "";
  height: 1px;
  width: 36px;
  background: var(--mute);
}
.divider span {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: var(--accent);
}

/* DETAILS */
.details {
  background:
    linear-gradient(135deg, var(--bg-deep), var(--bg-blue));
}
.details h2, .rsvp h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  color: var(--ink);
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}
.detail h3 {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.detail p { color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }

/* RSVP */
.rsvp { background: var(--bg); }
.rsvp-sub {
  color: var(--mute);
  margin-bottom: 3rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
#rsvp-form {
  max-width: 460px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
#rsvp-form label > span,
#rsvp-form legend {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
#rsvp-form input[type="text"],
#rsvp-form input[type="number"],
#rsvp-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--mute);
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.7rem 0.2rem;
  outline: none;
  transition: border-color 0.2s;
}
#rsvp-form input:focus, #rsvp-form textarea:focus {
  border-color: var(--accent);
}
#rsvp-form fieldset { border: none; padding: 0; }
.radio {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1.5rem;
  cursor: pointer;
}
.radio input { accent-color: var(--accent); }
.radio span {
  font-size: 0.95rem;
  color: var(--ink);
  text-transform: none !important;
  letter-spacing: normal !important;
  margin-bottom: 0 !important;
  font-weight: 400;
}
button[type="submit"] {
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  padding: 1.2rem 2rem;
  margin-top: 1rem;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
  border-radius: 2px;
  font-weight: 500;
}
button[type="submit"]:hover {
  background: var(--ink);
  transform: translateY(-1px);
}
button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.status {
  text-align: center;
  font-style: italic;
  color: var(--accent);
  margin-top: 1rem;
  min-height: 1.5em;
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
}

/* FOOTER */
footer {
  background: var(--footer-bg);
  color: var(--bg);
  padding: 4rem 1.5rem;
}
footer p:first-child {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bg);
  opacity: 0.8;
  font-weight: 500;
}
.signoff {
  font-family: 'Pinyon Script', 'Fraunces', serif;
  font-style: normal;
  font-size: 3rem;
  margin-top: 0.8rem;
  color: var(--bg);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

/* MUSIC TOGGLE */
#music-toggle {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 6px 24px rgba(236, 133, 168, 0.45);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
}
#music-toggle:hover { transform: scale(1.08); background: var(--blue-deep); }
#music-toggle.playing { animation: musicPulse 2.4s ease-in-out infinite; }
#music-toggle .music-icon { line-height: 1; letter-spacing: -2px; }
@keyframes musicPulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(236, 133, 168, 0.4); }
  50%      { box-shadow: 0 6px 36px rgba(236, 133, 168, 0.8); }
}

/* PETALS */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -40px;
  font-size: 1.4rem;
  animation: petalFall linear infinite, petalSway ease-in-out infinite alternate;
  will-change: transform;
}
.petal.pink  { color: var(--accent); }
.petal.blue  { color: var(--blue-deep); }
.petal.peach { color: var(--peach); }
@keyframes petalFall {
  0%   { transform: translateY(-40px) rotate(0deg); }
  100% { transform: translateY(110vh) rotate(540deg); }
}
@keyframes petalSway {
  0%   { margin-left: 0; }
  100% { margin-left: 30px; }
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blurIn {
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* Hero stagger fade-up (excluding names which have their own blur-in) */
.hero > .hero-mark,
.hero > .full-names,
.hero > .parents,
.hero > .invitation,
.hero > .date-block,
.hero > .scroll-cue {
  opacity: 0;
  animation: fadeUp 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero > .hero-mark    { animation-delay: 0.1s; }
.hero > .full-names   { animation-delay: 1.55s; }
.hero > .parents      { animation-delay: 1.8s; }
.hero > .invitation   { animation-delay: 2.05s; }
.hero > .date-block   { animation-delay: 2.3s; }
.hero > .scroll-cue   { animation-delay: 2.6s; }

.scroll-cue { animation-name: fadeUp, shimmer; animation-duration: 1.1s, 2.4s; animation-iteration-count: 1, infinite; animation-delay: 2.45s, 3.5s; }

/* Photo gentle float */
.photo-frame {
  animation: floatSoft 7s ease-in-out infinite;
}

/* Scroll-triggered reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1), transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .names span { opacity: 1; filter: none; transform: none; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  section, header, footer { padding: 4rem 1.25rem; }
  .photo { padding: 4rem 1.25rem; }
  .hero-mark::before, .hero-mark::after { width: 24px; }
  .detail-grid { gap: 2rem; }
}
