:root {
  --paper: #fbf6ec;
  --paper-deep: #f4eadb;
  --jasmine: #fffdf8;
  --gold: #b8893a;
  --gold-soft: #dcc38f;
  --gold-pale: #efe1bf;
  --flame: #e8a33d;
  --maroon: #7d2230;
  --maroon-deep: #5e1622;
  --ink: #3d2b22;
  --ink-soft: #6f5a4d;
  --serif: "Cormorant Garamond", "Noto Serif Tamil", Georgia, serif;
  --tamil: "Noto Serif Tamil", "Cormorant Garamond", serif;
  --ui: "Outfit", "Noto Serif Tamil", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-variant-numeric: lining-nums;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(232, 163, 61, 0.12), transparent 55%),
    var(--paper);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.5;
}

html[lang="ta"] body {
  font-family: var(--tamil);
  line-height: 1.75;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("../assets/mango-butta.svg") 0 0 / 220px repeat;
  opacity: 0.06;
}

body:not(.is-ready) .site {
  visibility: hidden;
}

/* Language switch */

.lang-switch {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 40;
  display: flex;
  padding: 3px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px -10px rgba(125, 34, 48, 0.35);
}

.lang-switch button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--maroon);
  font-family: var(--ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.42rem 0.85rem;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--maroon);
  color: var(--jasmine);
}

/* Shared ornaments */

.garland {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: url("../assets/jasmine-garland.svg") 0 0 / 180px 72px repeat-x;
  pointer-events: none;
  transform-origin: top center;
  animation: sway 7s ease-in-out infinite;
}

@keyframes sway {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.lamp {
  width: 34px;
  height: auto;
  animation: glow 3.2s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% { filter: drop-shadow(0 0 3px rgba(232, 163, 61, 0.35)); }
  50% { filter: drop-shadow(0 0 10px rgba(232, 163, 61, 0.75)); }
}

/* Deity frame */

.deity {
  position: relative;
  width: 128px;
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  padding: 5px;
  isolation: isolate;
  border-radius: 50%;
  background: linear-gradient(160deg, #e3c98f, var(--gold) 55%, #d8b977);
  box-shadow:
    0 0 0 5px var(--paper),
    0 0 0 6px var(--gold-soft),
    0 14px 34px -12px rgba(184, 137, 58, 0.55);
}

.deity::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: inherit;
  background: radial-gradient(closest-side, rgba(232, 163, 61, 0.22), transparent);
  z-index: -1;
  animation: halo 4s ease-in-out infinite;
}

@keyframes halo {
  0%,
  100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

.deity img,
.deity figcaption {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.deity img {
  display: block;
  object-fit: cover;
}

.deity figcaption {
  display: none;
  place-items: center;
  margin: 0;
  padding: 0.6rem;
  text-align: center;
  color: var(--maroon);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.25;
  background:
    radial-gradient(circle at 50% 40%, rgba(232, 163, 61, 0.2), transparent 60%),
    var(--jasmine);
}

html[lang="ta"] .deity figcaption {
  padding: 0.9rem;
  font-style: normal;
  font-size: 0.72rem;
}

.deity.is-empty img { display: none; }
.deity.is-empty figcaption { display: grid; }

.deity-hero {
  width: min(210px, 58vw);
  aspect-ratio: 735 / 698;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.deity-hero::after {
  inset: -14%;
  border-radius: 50%;
}

.deity-hero img {
  object-fit: contain;
  border-radius: 0;
}

/* Falling flowers */

.petals {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}

.petal-fall {
  position: absolute;
  top: -40px;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

@keyframes fall {
  from { transform: translate3d(0, -6vh, 0); }
  to { transform: translate3d(var(--drift), 108vh, 0); }
}

.petal {
  display: block;
  width: var(--size);
  height: var(--size);
  opacity: 0.85;
  animation-name: flutter;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

@keyframes flutter {
  from { transform: translateX(-14px) rotate(-25deg) rotateY(0deg); }
  to { transform: translateX(14px) rotate(35deg) rotateY(160deg); }
}

.petal-jasmine {
  background: url("../assets/jasmine.svg") center / contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(184, 137, 58, 0.35));
}

.petal-marigold,
.petal-rose {
  border-radius: 0 100% 0 100%;
  height: calc(var(--size) * 0.75);
}

.petal-marigold {
  background: linear-gradient(135deg, #f7c04a, #e8892b);
}

.petal-rose {
  background: linear-gradient(135deg, #f1a3b0, #c94a63);
}

/* Entrance and scroll reveals */

.hero .reveal {
  transform: translateY(22px) scale(0.94);
  transition-duration: 1.1s;
  transition-delay: calc(var(--i, 0) * 220ms);
}

.hero .reveal.is-visible {
  transform: none;
}

.garland {
  clip-path: inset(0 100% 0 0);
}

body.is-ready .garland {
  animation:
    unfurl 1.8s var(--ease) 0.1s forwards,
    sway 7s ease-in-out 2s infinite;
}

@keyframes unfurl {
  to { clip-path: inset(0 0 0 0); }
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s ease,
    transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 130ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.stagger:not(.is-visible) > * {
  opacity: 0;
}

.stagger.is-visible > * {
  animation: rise 0.85s var(--ease) both;
}

.stagger.is-visible > :nth-child(2) { animation-delay: 0.12s; }
.stagger.is-visible > :nth-child(3) { animation-delay: 0.24s; }
.stagger.is-visible > :nth-child(4) { animation-delay: 0.36s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Page */

.site {
  position: relative;
  z-index: 1;
  outline: none;
}

.hero {
  position: relative;
  padding: 6.5rem 1.5rem 0;
  text-align: center;
}

.invocation {
  margin: 0;
  color: var(--maroon);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
}

.invocation + .invocation {
  margin-top: 0.1rem;
}

.hero .invocation:first-of-type {
  margin-top: 1.8rem;
}

html[lang="ta"] .invocation {
  font-style: normal;
  font-size: 1rem;
}

.eyebrow {
  margin: 2rem 0 0.5rem;
  color: var(--gold);
  font-family: var(--ui);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

html[lang="ta"] .eyebrow {
  font-family: var(--tamil);
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  text-transform: none;
}

h1 {
  margin: 0;
  color: var(--maroon);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 5.2rem);
  line-height: 0.98;
}

html[lang="ta"] h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1.3;
}

h1 .person {
  display: block;
}

.hero-names {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: center;
  align-items: center;
  gap: clamp(0.75rem, 4vw, 2.5rem);
}

.hero-names .lamp {
  width: 40px;
}

.aka,
.union {
  display: block;
  color: var(--gold);
  font-style: italic;
  font-weight: 500;
}

.aka {
  margin-top: 0.35rem;
  font-size: 0.34em;
  letter-spacing: 0.06em;
}

.union {
  margin: 0.45rem 0;
  font-size: 0.28em;
  letter-spacing: 0.16em;
}

html[lang="ta"] .aka,
html[lang="ta"] .union {
  font-style: normal;
  letter-spacing: 0;
  font-size: 0.4em;
}

.hero-meta,
.hero-place {
  margin: 0.4rem 0 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.hero-meta {
  margin-top: 1.3rem;
}

.sep {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin: 0 0.7rem 0.12rem;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.hero-actions {
  margin: 1.5rem 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9.5rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--maroon);
  border-radius: 999px;
  background: var(--maroon);
  color: var(--jasmine);
  font-family: var(--ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.3s ease, transform 0.3s var(--ease);
}

.btn:hover {
  background: var(--maroon-deep);
  transform: translateY(-2px);
}

html[lang="ta"] .btn {
  font-family: var(--tamil);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}

.temple-border {
  height: 34px;
  max-width: 900px;
  margin: 3rem auto 0;
  background: url("../assets/sari-border.svg") center bottom / 120px 34px repeat-x;
}

.section {
  position: relative;
  padding: 4.5rem 1.25rem;
  text-align: center;
}

.section.alt {
  background: rgba(244, 234, 219, 0.7);
  border-top: 1px solid var(--gold-pale);
  border-bottom: 1px solid var(--gold-pale);
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
}

h2 {
  margin: 0 0 0.8rem;
  color: var(--maroon);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 500;
  line-height: 1.2;
}

h2::before {
  content: "";
  display: block;
  width: 170px;
  height: 22px;
  margin: 0 auto 0.85rem;
  background: url("../assets/divider.svg") center / contain no-repeat;
  transform: scaleX(0.3);
  opacity: 0;
  transition: transform 1.1s var(--ease) 0.15s, opacity 0.8s ease 0.15s;
}

h2.is-visible::before {
  transform: none;
  opacity: 1;
}

.hosts {
  max-width: 38rem;
  margin: 0 auto 0.9rem;
}

.hosts-line {
  margin: 0.3rem 0 0;
  font-size: 1.4rem;
  line-height: 1.5;
}

.hosts-line strong {
  color: var(--maroon);
  font-weight: 700;
}

.host-name {
  white-space: nowrap;
}

.hosts-between {
  margin: 0.25rem 0 0;
  color: var(--gold);
  font-size: 1.15rem;
  font-style: italic;
}

html[lang="ta"] .hosts-line {
  font-size: 1.15rem;
  line-height: 1.9;
}

html[lang="ta"] .hosts-line strong {
  font-weight: 600;
}

.lede,
.note {
  max-width: 38rem;
  margin: 0 auto;
  font-size: 1.3rem;
  line-height: 1.6;
}

html[lang="ta"] .lede,
html[lang="ta"] .note {
  font-size: 1.1rem;
  line-height: 1.95;
}

.note {
  color: var(--ink-soft);
}

.couple,
.events,
.homes,
.love {
  display: grid;
  gap: 1.25rem;
  max-width: 780px;
  margin: 2.2rem auto 0;
  text-align: left;
  align-items: start;
}

.person-card,
.event,
.home,
.family {
  padding: 1.35rem 1.25rem 1.45rem;
  border: 1px solid var(--gold-pale);
  border-top: 2px solid var(--gold);
  background: var(--jasmine);
  box-shadow: 0 16px 34px -24px rgba(125, 34, 48, 0.4);
  transition: transform 0.4s var(--ease), box-shadow 0.4s ease;
}

.person-card:hover,
.event:hover,
.home:hover,
.family:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -24px rgba(125, 34, 48, 0.5);
}

.couple {
  align-items: stretch;
}

.person-card {
  text-align: center;
}

.person-name,
.event-name,
.home-name,
.family h3 {
  margin: 0;
  color: var(--maroon);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
}

.person-role,
.parent,
.shop,
.kin-text,
.family li,
.venue-address {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

html[lang="ta"] .person-role,
html[lang="ta"] .parent,
html[lang="ta"] .shop,
html[lang="ta"] .kin-text,
html[lang="ta"] .family li {
  font-size: 1rem;
  line-height: 1.8;
}

/* Photo */

.photo-section {
  padding-top: 0.5rem;
}

.portrait {
  position: relative;
  width: min(340px, 82vw);
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--gold-soft);
  background: var(--jasmine);
  box-shadow:
    0 0 0 6px var(--paper),
    0 0 0 7px var(--gold-pale),
    0 30px 50px -30px rgba(125, 34, 48, 0.45);
}

.portrait::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -14px;
  right: -14px;
  height: 58px;
  background: url("../assets/jasmine-garland.svg") 0 0 / 120px 48px repeat-x;
  z-index: 2;
  pointer-events: none;
}

.portrait img,
.portrait figcaption {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.portrait img {
  display: block;
  height: auto;
  object-fit: cover;
  object-position: 50% 40%;
}

.portrait figcaption {
  display: none;
  place-items: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: var(--gold);
  font-size: 1.2rem;
  font-style: italic;
  background:
    radial-gradient(circle at 50% 45%, rgba(239, 225, 191, 0.9), transparent 62%),
    repeating-linear-gradient(45deg, rgba(184, 137, 58, 0.07) 0 1px, transparent 1px 10px),
    var(--paper);
}

html[lang="ta"] .portrait figcaption {
  font-style: normal;
  font-size: 1rem;
}

.portrait.is-empty img { display: none; }
.portrait.is-empty figcaption { display: grid; }

/* Countdown */

.band {
  position: relative;
  padding: 4rem 1rem 4.2rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232, 163, 61, 0.16), transparent 60%),
    var(--paper-deep);
  border-top: 1px solid var(--gold-pale);
  border-bottom: 1px solid var(--gold-pale);
}

.ticks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  max-width: 640px;
  margin: 1.6rem auto 0;
}

.tick {
  padding: 1rem 0.3rem 0.85rem;
  border: 1px solid var(--gold-soft);
  border-radius: 6px;
  background: var(--jasmine);
  box-shadow: 0 12px 26px -20px rgba(125, 34, 48, 0.45);
}

.tick-num {
  display: block;
  color: var(--maroon);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.tick-num.bump {
  animation: bump 0.45s var(--ease);
}

@keyframes bump {
  from {
    opacity: 0.35;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tick-label {
  display: block;
  margin-top: 0.45rem;
  color: var(--gold);
  font-family: var(--ui);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

html[lang="ta"] .tick-label {
  font-family: var(--tamil);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
}

.arrived {
  margin: 1rem 0 0;
  color: var(--maroon);
  font-style: italic;
}

html[lang="ta"] .arrived {
  font-style: normal;
}

/* Schedule */

.event-time {
  margin: 0;
  color: var(--gold);
  font-family: var(--ui);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

html[lang="ta"] .event-time {
  font-family: var(--tamil);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0.9rem 0 0;
}

.textlink {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--maroon);
  font-family: var(--ui);
  font-size: 0.82rem;
  text-decoration: underline;
  text-decoration-color: var(--gold-soft);
  text-underline-offset: 0.25em;
  cursor: pointer;
}

.textlink:hover {
  text-decoration-color: var(--maroon);
}

html[lang="ta"] .textlink {
  font-family: var(--tamil);
  font-size: 0.95rem;
}

/* Families */

.home-relation,
.family-place {
  margin: 0.15rem 0 0.7rem;
  color: var(--gold);
  font-style: italic;
}

html[lang="ta"] .home-relation,
html[lang="ta"] .family-place {
  font-style: normal;
}

.shop {
  padding-top: 0.35rem;
}

.kin {
  margin: 0.9rem 0 0;
}

.kin-label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--maroon);
  font-family: var(--ui);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

html[lang="ta"] .kin-label {
  font-family: var(--tamil);
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
}

.placeholder {
  color: var(--gold);
  font-style: italic;
}

html[lang="ta"] .placeholder {
  font-style: normal;
}

.family ul {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.family li {
  position: relative;
  margin-top: 0.55rem;
  padding-left: 1.05rem;
}

.overline {
  text-decoration: overline;
  text-decoration-thickness: 1.25px;
  text-decoration-skip-ink: none;
}

.family li.pair {
  margin-top: 0.9rem;
}

.pair-name {
  display: block;
}

.pair-join {
  display: block;
  margin: 0.05rem 0;
  color: var(--gold);
  font-style: italic;
  line-height: 1.1;
}

.family li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid var(--gold);
  background: var(--jasmine);
  transform: rotate(45deg);
}

/* Venue */

.venue-name {
  margin: 0.4rem 0 0;
  color: var(--maroon);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.map-frame {
  max-width: 760px;
  margin: 1.8rem auto 0;
  padding: 7px;
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  background: var(--jasmine);
  box-shadow: 0 24px 44px -30px rgba(125, 34, 48, 0.5);
}

.map-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 6px;
  filter: sepia(0.12) saturate(0.92);
}

/* Footer */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2.4rem 1rem 2.8rem;
  text-align: center;
}

.footer p {
  margin: 0;
  color: var(--maroon);
  font-family: var(--ui);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

html[lang="ta"] .footer p {
  font-family: var(--tamil);
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.lamp-small {
  width: 20px;
}

.noscript {
  position: relative;
  z-index: 50;
  max-width: 36rem;
  margin: 2rem auto;
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (min-width: 740px) {
  .couple,
  .events,
  .homes,
  .love {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .deity {
    width: 140px;
  }

  .deity-hero {
    width: 240px;
  }
}

@media (max-width: 520px) {
  .garland {
    height: 56px;
    background-size: 140px 56px;
  }

  .lamp {
    width: 22px;
  }

  .hero-names {
    gap: 0.4rem;
  }

  .hero {
    padding-top: 5.5rem;
  }

  .hero-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
  }

  .sep {
    display: none;
  }

  .ticks {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    max-width: 18rem;
  }

  .map-frame iframe {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .garland,
  body.is-ready .garland,
  .lamp,
  .deity::after,
  .tick-num.bump { animation: none; }
  .garland { clip-path: none; }
  .petals { display: none; }
  .reveal,
  .hero .reveal { opacity: 1; transform: none; transition: none; }
  .stagger > *,
  .stagger.is-visible > * { animation: none; opacity: 1; }
  h2::before { transform: none; opacity: 1; transition: none; }
}
