/* South Indian customizations. Text swaps use pseudo-elements so React's
   markup (and hydration) stays untouched. Artwork lives in assets/. */

/* Ganesha above everything in the hero, 1rem from the top (template: 5rem) */
[class~="min-h-[100svh]"]:has(> .z-20.text-center) { padding-top: 1rem; }
[class~="min-h-[100svh]"] > .z-20.text-center::before {
  content: ""; display: block; width: 3rem; aspect-ratio: 1; margin: 0 auto .5rem;
  background: url(/templates/royal-gateway/ganesha.webp) center / contain no-repeat;
}

/* One down chevron, without text, at the bottom of the screen: the template's
   "Scroll now" button (it works, and fades on scroll) loses its text and is
   pinned to the screen, not the hero (on desktop the hero is taller than the
   screen), in the maroon of the decorative chevron below the date card,
   which is hidden (it can't be clicked). */
button[aria-label="Scroll down to see the invitation"] { position: fixed; color: #9e141e !important; }
button[aria-label="Scroll down to see the invitation"] > span:first-child { display: none; }
div.mt-5:has(> div > svg.lucide-chevron-down) { display: none; }

/* 1. Hero blessing line */
[class~="min-h-[100svh]"] > .z-20.text-center > p:first-child { font-size: 0; }
[class~="min-h-[100svh]"] > .z-20.text-center > p:first-child::before {
  content: "Srirastu · Shubhamastu · Avighnamastu"; white-space: nowrap;
  font-size: min(6.4vw, 1.875rem); line-height: 2.25rem;
}

/* 2. "Weds" between the names, centred on the knot (the row is the knot's height) */
[class~="min-h-[100svh]"] > .z-20.text-center > p:nth-child(3) {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1200 / 247;
  font-size: 0; background: url(/templates/royal-gateway/weds-knot.webp) center / 100% 100% no-repeat;
}
[class~="min-h-[100svh]"] > .z-20.text-center > p:nth-child(3)::before {
  content: "Weds"; font-size: 3rem; line-height: 1;
}

/* 3. Wedding date card: taller, with the muhurtham details. customize.js draws
   the taller frame and sets --local-frame-h; the panel keeps its 24-unit margins. */
[class~="aspect-[320/150]"][style*="--local-frame-h"] { aspect-ratio: 320 / var(--local-frame-h); }
[class~="aspect-[320/150]"] > svg[data-local-source] { visibility: hidden; }
[class~="aspect-[320/150]"][style*="--local-frame-h"] > div.absolute:first-child {
  top: calc(24 / var(--local-frame-h) * 100%) !important; bottom: calc(24 / var(--local-frame-h) * 100%) !important;
  clip-path: url(#local-frame-panel) !important;
}
[class~="aspect-[320/150]"] p:first-child::before {
  content: "Sumuhurtham"; display: block; margin-bottom: .5cqw;
  font-family: var(--font-great-vibes), cursive; font-size: 6cqw; line-height: 1.1;
  letter-spacing: 0; text-transform: none; color: #dea645;
}
[class~="aspect-[320/150]"] p:first-child::after {
  content: "8:50 AM"; display: block; margin-top: 1.4cqw;
}
[class~="aspect-[320/150]"] p + p { font-size: 0; }
[class~="aspect-[320/150]"] p + p::before {
  content: "Mrugasira Nakshatram, Vruschika Lagnam"; display: block; margin-bottom: 1.6cqw;
  font-family: var(--font-cormorant), serif; font-style: italic; font-size: 3.4cqw;
  letter-spacing: .02em; text-transform: none; color: #fef4df;
}
[class~="aspect-[320/150]"] p + p::after { content: "Shiva Vishnu Temple, Livermore"; font-size: 2.7cqw; }

/* Couple photo frames (100x129.5): the corner lotuses (translate(11 17) and
   translate(89 17), 17.4 wide) cover the white border at x=4 and x=96; move
   them inward and down so their edges clear it */
svg[viewBox="0 0 100 129.5"] > g[transform="translate(11 17) scale(1)"] { transform: translate(15px, 18px); }
svg[viewBox="0 0 100 129.5"] > g[transform="translate(89 17) scale(1)"] { transform: translate(85px, 18px); }

/* 4. Rosette: keep the entry animation, stop the spin */
img[src$="/jewel-rosette.webp"] { transform: none !important; }

/* 5. Honorifics above the couple's names (bride first: nameOrder "bride") */
.grid-cols-2.items-start > div h3::before {
  display: block; margin-bottom: .2em;
  font-family: var(--font-cormorant), serif; font-style: italic; font-size: .7em; color: #8d5a17;
}
.grid-cols-2.items-start > div:nth-child(1) h3::before { content: "Chi. La. Sow."; }
.grid-cols-2.items-start > div:nth-child(2) h3::before { content: "Chi."; }

/* 6. Event icons (tagged by customize.js) */
[data-local-icon] {
  font-size: 0 !important; width: 10cqw; height: 10cqw; flex-shrink: 0;
  background: center / contain no-repeat;
}
[data-local-icon="mehendi"] { background-image: url(/templates/royal-gateway/icons/mehendi.webp); }
[data-local-icon="haldi"] { background-image: url(/templates/royal-gateway/icons/haldi.webp); }
[data-local-icon="sangeet"] { background-image: url(/templates/royal-gateway/icons/sangeet.webp); }
[data-local-icon="wedding"] { background-image: url(/templates/royal-gateway/icons/wedding.webp); }

/* 7. Dress code pills open the attire guide; venues open Google Maps (customize.js) */
[data-local-href] { cursor: pointer; }
p.rounded-full[data-local-href] { transition: background-color .2s, box-shadow .2s; }
p.rounded-full[data-local-href]:hover, p.rounded-full[data-local-href]:focus-visible {
  background-color: rgba(222, 166, 69, .25); box-shadow: 0 0 10px rgba(222, 166, 69, .5);
}
p.italic[data-local-href] { text-decoration: underline dotted rgba(251, 227, 180, .6); text-underline-offset: .25em; }
p.italic[data-local-href]:hover, p.italic[data-local-href]:focus-visible { color: #fff1d6; text-decoration-style: solid; }
[data-local-href]:focus-visible { outline: 2px solid #dea645; outline-offset: 2px; }

/* Timeline car stops ~65% of its height earlier (30% + 35% more):
   shorten the track and give the space back to the section */
section:has(img[src$="/timeline-car.webp"]) > .max-w-6xl { display: flow-root; }
section:has(img[src$="/timeline-car.webp"]) > .max-w-6xl > ul { margin-bottom: -3.2rem; }
section:has(img[src$="/timeline-car.webp"]) { padding-bottom: 7.2rem; }

/* Gallery caption ribbon: room above and below the text */
.rgw-shadow-royal.rounded-md { padding-top: 1.1rem; padding-bottom: 1rem; }

/* 8. Closing: both families, on three lines */
[class~="min-h-[70vh]"] h2 { font-size: 0; line-height: 1.15; }
[class~="min-h-[70vh]"] h2 > span { display: block; }
[class~="min-h-[70vh]"] h2 > span > span { display: none; }
[class~="min-h-[70vh]"] h2::before,
[class~="min-h-[70vh]"] h2 > span::after {
  display: block; white-space: nowrap; font-size: min(5vw, 3.25rem);
}
[class~="min-h-[70vh]"] h2::before { content: "Patnaik & Kuruchety Family"; }
[class~="min-h-[70vh]"] h2 > span::after { content: "Nidumolu & Nyayapathi Family"; }
[class~="min-h-[70vh]"] h2 > span::before {
  content: "&"; display: block; margin: .1em 0;
  font-family: var(--font-great-vibes), cursive; font-size: min(10vw, 4rem); line-height: 1;
}

@media (min-width: 768px) {
  section:has(img[src$="/timeline-car.webp"]) > .max-w-6xl > ul { margin-bottom: -8.5rem; }
  section:has(img[src$="/timeline-car.webp"]) { padding-bottom: 15.5rem; }
  [class~="min-h-[100svh]"] > .z-20.text-center > p:first-child::before { font-size: 2.25rem; line-height: 2.5rem; }
  [class~="min-h-[100svh]"] > .z-20.text-center > p:nth-child(3)::before { font-size: 4.5rem; }
}

/* Venue cards: each venue's own photo (set by customize.js), a little stronger
   than the template's 25% so it reads; the palace courtyard strip is hidden. */
img[data-local-venue] { opacity: .32; object-position: center; }
img[data-local-hidden] { display: none; }

/* Closing ("We await your gracious presence"): drop the template's full-screen
   height (70vh / 100vh) so the text isn't floated in empty space; trim padding */
section[class~="min-h-[70vh]"] { min-height: 0; padding-top: 1rem; padding-bottom: 3rem; }
@media (min-width: 768px) {
  section[class~="min-h-[70vh]"] { padding-top: 1rem; padding-bottom: 4rem; }
}

/* Gallery: the carousel clips on all sides with only 40px above the frames, so
   the centre frame's crown finial gets cut on wide screens. Clip sideways only. */
@supports (overflow: clip) {
  [aria-label="Wedding gallery"] > .touch-pan-y.overflow-hidden { overflow-x: clip; overflow-y: visible; }
}
