/* =====================================================================
   KEERTHANA & VISHNU - WEDDING INVITATION  |  style.css
   Colours and fonts are defined at the top (:root) - change them there.
   ===================================================================== */

:root {
  --wine: #520018;          /* main burgundy */
  --wine-dark: #3d0a16;     /* dark burgundy boxes */
  --paper: #eee9dc;
  --paper-light: #f6f1e7;
  --ink: #3a2928;           /* body text */
  --olive: #737453;         /* small round tag */
  --gold: #b38a44;          /* little ornaments */
  --serif: "Cormorant Garamond", Didot, "Bodoni 72", "Times New Roman", serif;
  --script: "Italianno", "Snell Roundhand", "Apple Chancery", cursive;
  --sans: Avenir, "Avenir Next", Helvetica, Arial, sans-serif;
  --malayalam: "Noto Serif Malayalam", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--wine); }
body {
  margin: 0;
  min-width: 280px;
  background: var(--wine);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
a, button { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
.clip-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
h1, h2, h3, p { margin-top: 0; }
h2, h3 { font-weight: 400; }

/* The page itself is a phone-width column, centred on bigger screens */
.invitation {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  overflow: clip;
  background-color: #e8e4da;
  background-image: linear-gradient(rgba(239, 236, 226, .18), rgba(239, 236, 226, .18)), url("assets/parchment.jpg");
  background-size: auto, 430px auto;
  box-shadow: 0 0 80px rgba(23, 0, 7, .42);
}

.section { position: relative; isolation: isolate; }

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .21em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Script (handwriting) headings */
.couple-names, .welcome-intro h2, .family-card h3, .events-intro h2, .event-card h3, .closing-card h2 {
  font-family: var(--script);
  font-weight: 400;
}

/* ---------- Hero ---------- */
.hero { padding: max(48px, env(safe-area-inset-top)) 22px 14px; text-align: center; }
.invocation-ml {
  margin: 0 0 18px;
  font-family: var(--malayalam);
  font-size: 15px;
  font-weight: 500;
  color: var(--wine);
  letter-spacing: .02em;
}
.hero .eyebrow { margin-bottom: 2px; color: #6f5a55; }
.couple-names { margin: 0; font-size: clamp(40px, 12.4vw, 54px); line-height: 1; text-wrap: balance; color: #382728; letter-spacing: -.04em; }
.couple-names span { color: var(--wine); font-size: .62em; letter-spacing: 0; padding: 0 .08em; }
.hero-date { margin: 12px 0 23px; font-family: var(--sans); font-size: 10px; letter-spacing: .32em; text-transform: uppercase; }
.hero-portrait { position: relative; width: min(92%, 365px); aspect-ratio: 1131 / 1391; margin: 0 auto; }
.arch-frame {
  position: relative;
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  clip-path: url(#church-card-clip);
  filter: drop-shadow(0 12px 15px rgba(40, 18, 16, .18));
}
.arch-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-kicker { max-width: 340px; margin: 18px auto 10px; font-family: var(--script); font-size: 25px; line-height: 1.05; color: var(--wine); }
.scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: #5d514d; text-decoration: none; font: 9px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.scroll-cue span { width: 1px; height: 23px; background: var(--wine); animation: breathe 1.8s ease-in-out infinite; }

/* ---------- Paper cards ---------- */
.paper-card {
  position: relative;
  z-index: 3;
  background: url("assets/deckled-paper.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 8px 9px rgba(42, 29, 22, .13));
}
.flower { position: absolute; z-index: 5; pointer-events: none; }

/* ---------- Families ---------- */
.welcome-section { padding: 18px 0 58px; }
.manuscript { position: absolute; z-index: 1; opacity: .72; filter: sepia(.1) drop-shadow(0 8px 8px rgba(42, 26, 16, .1)); }
.manuscript--welcome { width: 78%; top: 172px; right: -10%; transform: rotate(7deg); }
.welcome-intro { position: relative; z-index: 3; width: 78%; margin: 0 auto 24px; text-align: center; }
.invocation { font: 15px/1.3 var(--script); color: var(--wine); }
.welcome-intro h2 { margin: 4px 0 8px; color: var(--wine); font-size: 32px; line-height: 1; }
.welcome-intro > p:last-child { margin: 0; font-size: 13px; line-height: 1.45; }
.family-card-stack { position: relative; z-index: 3; display: grid; gap: 16px; }
.family-card { width: 82%; padding: 50px 40px 46px; text-align: center; }
.family-card--bride { margin-left: 12%; }
.family-card--groom { margin-left: 6%; }
.family-role { margin-bottom: 12px; color: var(--wine); font: 600 9px/1.3 var(--sans); letter-spacing: .24em; text-transform: uppercase; }
.family-card h3 { margin: 0 auto 13px; color: var(--wine); font-size: 43px; line-height: .9; }
.family-divider { display: block; margin-bottom: 11px; color: var(--gold); font-size: 11px; }
.parent-label { margin-bottom: 8px; color: #6d5b54; font: 600 9px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.parent-names { margin: 0; font-size: 16px; line-height: 1.3; }
.parent-names span { color: var(--wine); font-family: var(--script); font-size: 21px; line-height: .75; }

/* Photo slot (bride / groom). Drop assets/bride.jpg and assets/groom.jpg in
   and the photo appears; until then the initial letter shows. */
.portrait {
  position: relative;
  width: 124px;
  height: 156px;
  margin: 0 auto 16px;
  border-radius: 62px 62px 4px 4px;
  overflow: hidden;
  border: 1px solid rgba(179, 138, 68, .7);
  box-shadow: 0 0 0 4px rgba(246, 241, 231, .9), 0 0 0 5px rgba(82, 0, 24, .25);
  background: linear-gradient(180deg, #efe6d6, #e3d6c0);
}
.portrait::before {
  content: attr(data-initial);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font: 74px/1 var(--script);
  color: rgba(82, 0, 24, .38);
  padding-bottom: 10px;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Save the date ---------- */
.calendar-section { padding: 30px 0 62px; }
.calendar-card { width: 74%; margin: 0 auto; padding: 58px 38px 50px; text-align: center; }
.calendar-card blockquote { margin: 0 0 18px; font: 14px/1.4 var(--script); font-size: 17px; }
.calendar-card h2 { margin: 0; color: var(--wine); font: 30px/1 var(--script); }
.month { margin: 7px 0 16px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px 4px; align-items: center; font: 9px/1 var(--sans); }
.calendar .dow { font-size: 8px; font-weight: 700; color: var(--wine); }
.calendar .marked { display: grid; place-items: center; width: 22px; height: 22px; margin: -6px auto; border-radius: 50%; background: var(--wine); color: white; }
.calendar-legend { margin: 20px 0 0; font: 10px/1.7 var(--sans); letter-spacing: .08em; color: #6d5b54; }
.calendar-legend b { color: var(--wine); font-weight: 700; }
.text-link { display: inline-block; margin-top: 14px; border-bottom: 1px solid currentColor; color: var(--wine); font: 9px/1.6 var(--sans); letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.flower--calendar { width: 150px; right: -29px; bottom: -7px; transform: rotate(24deg); }

/* ---------- Events ---------- */
.venue-section { padding: 108px 0 80px; }
.envelope { position: absolute; z-index: 1; }
.envelope--venue { width: 78%; top: 18px; right: -4%; transform: rotate(2deg); }
.flower--venue { width: 135px; right: 5%; top: 24px; transform: rotate(-18deg); }
.events-intro { position: relative; z-index: 6; width: 82%; margin: 0 auto 30px; padding: 28px 27px 25px; border: 1px solid rgba(211, 177, 111, .55); color: #fff8eb; background: rgba(61, 10, 22, .96); box-shadow: 0 12px 22px rgba(49, 16, 19, .22); text-align: center; }
.events-intro::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(211, 177, 111, .28); pointer-events: none; }
.events-intro .eyebrow { position: relative; margin-bottom: 8px; color: #e7d6b6; font-size: 9px; }
.events-intro h2 { position: relative; margin: 0 0 10px; font-size: 36px; line-height: .96; }
.events-intro > p:last-child { position: relative; margin: 0; color: #f4e9d7; font-size: 13px; line-height: 1.4; }
.event-card-stack { position: relative; z-index: 3; display: grid; gap: 24px; }
.event-card { width: 86%; padding: 52px 36px 48px; margin-inline: auto; text-align: center; }
.event-order { margin-bottom: 10px; color: #6f5a55; font: 600 9px/1.3 var(--sans); letter-spacing: .17em; text-transform: uppercase; }
.event-emblem { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 9px; border: 1px solid rgba(179, 138, 68, .65); border-radius: 50%; color: var(--gold); font-size: 19px; }
.event-card h3 { margin: 0 0 7px; color: var(--wine); font-size: 46px; line-height: .9; }
.event-note { margin: 0 auto 17px; color: #6d5b54; font-size: 13px; font-style: italic; line-height: 1.35; }
.event-meta { display: grid; gap: 16px; margin: 0 0 20px; padding: 17px 0; border-top: 1px solid rgba(82, 0, 24, .18); border-bottom: 1px solid rgba(82, 0, 24, .18); }
.event-meta p { margin: 0; font-size: 13px; line-height: 1.4; }
.event-meta p + p { padding-top: 16px; border-top: 1px solid rgba(82, 0, 24, .12); }
.event-meta small { display: block; margin-bottom: 7px; color: #7b6a62; font: 600 8px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.event-meta strong, .event-meta span { display: block; }
.event-meta strong { color: var(--wine); font-size: 14px; line-height: 1.25; }
.event-meta span { margin-top: 4px; }
.outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 48px; padding: 0 22px; border: 1px solid rgba(82, 0, 24, .48); border-radius: 0; color: var(--wine); background: rgba(255,255,255,.12); font: 9px/1 var(--sans); letter-spacing: .11em; text-decoration: none; text-transform: uppercase; cursor: pointer; }
.event-card .text-link { display: block; width: max-content; max-width: 100%; margin: 16px auto 0; }

/* ---------- Countdown ---------- */
.countdown-section { padding: 70px 13px 52px; text-align: center; }
.countdown-section h2 { margin: 0 0 16px; font-size: 29px; letter-spacing: .1em; text-transform: uppercase; }
.countdown { display: grid; grid-template-columns: 1.2fr 8px 1fr 8px 1fr 8px 1fr; align-items: start; }
.countdown div { min-width: 0; }
.countdown strong { display: block; color: var(--wine); font: 29px/1 var(--serif); font-variant-numeric: tabular-nums; }
.countdown span { display: block; margin-top: 8px; font: 8px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.countdown b { font: 24px/1 var(--serif); color: var(--wine); }
.countdown-note { margin-top: 19px; font: 19px var(--script); color: var(--wine); }
.countdown-done { margin: 0; font: 30px/1.2 var(--script); color: var(--wine); }

/* ---------- Blessings ---------- */
.wine-card { color: #f8efe4; background: var(--wine-dark); box-shadow: 0 12px 22px rgba(49, 16, 19, .2); }
.gifts-section { min-height: 440px; padding-top: 50px; }
.gifts-intro { width: 79%; margin: 0 auto; padding: 42px 30px; text-align: center; }
.gift-icon { display: block; margin-bottom: 7px; color: #d8b56d; font-size: 25px; }
.gifts-intro h2 { margin: 0 0 12px; font-size: 21px; letter-spacing: .09em; text-transform: uppercase; }
.gifts-intro p { margin: 0; font-size: 13px; line-height: 1.6; }
.olive-tag { position: absolute; z-index: 5; display: grid; place-items: center; width: 96px; aspect-ratio: 1; left: 7%; bottom: 36px; color: white; background: var(--olive); clip-path: polygon(50% 0,61% 8%,75% 5%,82% 17%,95% 22%,92% 37%,100% 50%,92% 63%,95% 78%,82% 83%,75% 95%,61% 92%,50% 100%,39% 92%,25% 95%,18% 83%,5% 78%,8% 63%,0 50%,8% 37%,5% 22%,18% 17%,25% 5%,39% 8%); filter: drop-shadow(0 6px 5px rgba(41, 33, 22, .2)); }
.olive-tag span { font: 9px/1.25 var(--serif); letter-spacing: .11em; text-align: center; text-transform: uppercase; }
.flower--gifts { width: 150px; right: -37px; bottom: 6px; transform: rotate(15deg); }

.quote-section { padding: 10px 0 0; }
.quote-section blockquote { width: 78%; margin: 0 auto; padding: 35px 30px; font: 20px/1.35 var(--script); text-align: center; }

/* ---------- Closing ---------- */
.closing-section { min-height: 470px; padding-top: 58px; text-align: center; }
.closing-card { width: 76%; margin: 0 auto; padding: 62px 40px 52px; }
.closing-card h2 { margin: 0 0 12px; color: var(--wine); font-size: 42px; }
.closing-card p { font-size: 13px; line-height: 1.6; }
.closing-card .compliments { margin: 22px 0 0; font-size: 12px; letter-spacing: .04em; color: #6d5b54; }
.closing-card .compliments strong { display: block; margin-top: 4px; font: 25px/1.1 var(--script); color: var(--wine); letter-spacing: 0; }
.flower--closing { width: 150px; left: -30px; bottom: 24px; transform: rotate(10deg); }
.back-to-top { display: inline-block; margin-top: 28px; padding-bottom: 40px; color: var(--wine); font: 9px/1.5 var(--sans); letter-spacing: .13em; text-transform: uppercase; text-decoration: none; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@keyframes breathe { 0%,100% { transform: scaleY(.5); opacity: .45; } 50% { transform: scaleY(1); opacity: 1; } }

@media (min-width: 431px) {
  body { padding: 38px 0; }
  .invitation { border: 1px solid rgba(239,217,180,.2); }
}
@media (max-width: 340px) {
  .hero { padding-inline: 15px; }
  .countdown strong { font-size: 25px; }
  .event-card { width: 90%; padding-inline: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
:focus-visible { outline: 2px solid #c69b51; outline-offset: 3px; }
