/* Royal Gujarati. Invitation palette (NOT the VOWORA brand palette):
   Royal Maroon #5B1728, Antique Gold #B89A6A, Warm Ivory #F7F0E2, Deep #35101B.
   Loaded AFTER /engine/base.css, so rules here win. Art: assets/*.svg (hand-built, tiny). */
:root {
  --color-bg: #F7F0E2;
  --color-surface: #FBF6EA;
  --color-text: #35101B;
  --color-accent: #5B1728;
  --font-display: 'Noto Serif Gujarati', 'Noto Serif Devanagari', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Noto Sans Gujarati', 'Noto Serif Devanagari', 'Cormorant Garamond', system-ui, sans-serif;
  /* theme-specific tokens; maroon/deep/ivory follow the palette so Premium colour overrides still work */
  --maroon: var(--color-accent);
  --deep: var(--color-text);
  --ivory: var(--color-bg);
  --gold: #B89A6A;
  --gold-light: #E2CDA1;
  --ivory-deep: #EFE3CB;
  --art-divider: url("/themes/royal-gujarati/assets/divider.svg");       /* hairline floral: invitation message */
  --art-crest: url("/themes/royal-gujarati/assets/crest.svg");           /* hero crest */
  --art-closing: url("/themes/royal-gujarati/assets/closing.svg");       /* quiet closing motif */
  --art-pattern: url("/themes/royal-gujarati/assets/pattern.svg");       /* octagonal jaali lattice */
  --art-grain: url("/themes/royal-gujarati/assets/grain.svg");           /* paper grain on ivory */
  --art-arch-cap: url("/themes/royal-gujarati/assets/hero-arch-cap.svg");
  --art-arch-body: url("/themes/royal-gujarati/assets/hero-arch-body.svg");
  --art-corner-tl: url("/themes/royal-gujarati/assets/corner-tl.svg");
  --art-corner-tr: url("/themes/royal-gujarati/assets/corner-tr.svg");
  --art-corner-bl: url("/themes/royal-gujarati/assets/corner-bl.svg");
  --art-corner-br: url("/themes/royal-gujarati/assets/corner-br.svg");
  --art-icon-date: url("/themes/royal-gujarati/assets/icon-date.svg");
  --art-icon-venue: url("/themes/royal-gujarati/assets/icon-venue.svg");
  --seam: linear-gradient(rgba(184, 154, 106, .45), rgba(184, 154, 106, .45));  /* second, finer gold seam line */
  --art-jharokha-mask: url("/themes/royal-gujarati/assets/jharokha-mask.svg");
  --art-jharokha-frame: url("/themes/royal-gujarati/assets/jharokha-frame.svg");
}
html { background: #2A0C16; }
body { background: transparent; font-size: 1.0625rem; line-height: 1.95; }
h1, h2, h3 { line-height: 1.55; }                       /* Gujarati stacked conjuncts need room */
.invite, .static-fallback { background: var(--ivory); box-shadow: 0 0 60px rgba(0, 0, 0, .45); }
.static-fallback { min-height: 100dvh; color: var(--deep); }   /* slow network: readable burgundy on warm ivory before JS boots */
.sec { padding: 3.25rem 1.5rem; }
.sec + .sec { border-top: 1px solid rgba(184, 154, 106, .85); }   /* antique-gold seam between colour bands */

/* ---------- A. hero: maroon, toran, pointed jharokha arch ---------- */
.sec-cover {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  /* % padding = % of the page width; it parks the text inside the arch's pointed crown */
  padding: calc(clamp(2.75rem, 12vw, 4.5rem) + 17%) 12% 4.25rem; color: var(--ivory);
  background: radial-gradient(120% 70% at 50% 28%, #6A1B31 0%, var(--maroon) 62%, #4A1220 100%);
}
.sec-cover::before { content: ""; position: absolute; inset: 0; background: var(--art-pattern); background-size: 48px; opacity: .12; pointer-events: none; z-index: 0; }
.sec-cover > * { position: relative; z-index: 1; }
.cover-art { position: absolute; z-index: 2; top: 0; left: 0; right: 0; max-width: none; margin: 0; }
.cover-art img { width: 100%; }
/* the arch: true pointed (ogee) jharokha cap (SVG, 2:1 so it never distorts) + straight double-line sides.
   Arch width is 82% of the page, so its cap is 41% of the page tall: that is the padding-top below. */
.sec-cover::after {
  content: ""; position: absolute; z-index: 0; left: 9%; right: 9%; top: clamp(2.75rem, 12vw, 4.5rem); bottom: 1.6rem; box-sizing: border-box; padding-top: 41%;
  pointer-events: none;
  background-image: var(--art-arch-cap), var(--art-arch-body), linear-gradient(var(--gold), var(--gold)), linear-gradient(rgba(184, 154, 106, .55), rgba(184, 154, 106, .55));
  background-repeat: no-repeat, repeat-y, no-repeat, no-repeat;
  background-size: 100% auto, 100% 24px, 100% 1.5px, calc(100% - 15px) 1px;
  background-position: 0 0, 0 0, 0 100%, 7.5px calc(100% - 7px);
  background-origin: padding-box, content-box, padding-box, padding-box;
  background-clip: padding-box, content-box, padding-box, padding-box;
}
.cover-kind { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; letter-spacing: .04em; color: var(--gold-light); margin: 0; text-shadow: 0 1px 8px rgba(30, 6, 14, .45); }
.cover-kind::after { content: ""; display: block; width: 13.5rem; height: 1.9rem; margin: .1rem auto 0; background: var(--art-crest) center / contain no-repeat; }
.cover-names { font-size: clamp(2.2rem, 10.4vw, 3rem); font-weight: 600; color: var(--ivory); gap: 0; margin-top: .3rem;
  text-shadow: 0 1px 0 rgba(53, 16, 27, .9), 0 3px 14px rgba(26, 4, 12, .6), 0 0 1px rgba(226, 205, 161, .35); }
.cover-names .name { display: block; }
.cover-names .amp { font-family: var(--font-body); font-size: .9rem; font-weight: 400; color: var(--gold); line-height: 2.1; display: flex; align-items: center; gap: .6rem; text-shadow: none; }
.cover-names .amp::before, .cover-names .amp::after { content: ""; width: 2rem; height: 1px; background: var(--gold); opacity: .8; }
.cover-date { font-size: 1.05rem; color: var(--ivory); margin: 1.2rem 0 0; opacity: .95; }
.countdown { display: flex; justify-content: center; gap: 0; margin: 1.35rem auto 0; max-width: none; }
.cd-unit { background: transparent; border: 0; border-radius: 0; padding: 0 .85rem; min-width: 3.9rem; }
.cd-unit + .cd-unit { border-left: 1px solid rgba(184, 154, 106, .55); }
.cd-num { font-size: 1.45rem; color: var(--gold-light); line-height: 1.5; font-weight: 600; }
.cd-label { font-size: .72rem; color: var(--ivory); opacity: .8; line-height: 1.5; }
.countdown-done { color: var(--gold-light); font-size: 1.05rem; }
.demo-ribbon { display: none; }   /* demo notice lives once, as quiet fine print in the closing section */

/* ---------- B. invitation message ---------- */
.sec-blessing, .sec-families { position: relative; background: var(--seam) 0 4px / 100% 1px no-repeat, var(--art-grain), var(--ivory); }
.sec-families::before { content: ""; position: absolute; inset: 0; background: var(--art-pattern); background-size: 48px; opacity: .075; pointer-events: none; }
.sec-families > * { position: relative; }
.invitation-text { max-width: 27rem; margin: 0 auto; }
.invitation-title { font-size: 1.7rem; color: var(--maroon); margin: 0; }
.invitation-title::after { content: ""; display: block; width: 14rem; height: 1.3rem; margin: .5rem auto 1.1rem; background: var(--art-divider) center / contain no-repeat; }
.invitation-text p { font-size: 1.06rem; color: var(--deep); margin: 0; }
/* families: antique-gold hairline titles, burgundy names, generous Gujarati line-height */
.family-pair { gap: 2rem 1.5rem; margin-top: 2rem; }
.family-title { font-size: 1.15rem; font-weight: 600; color: var(--maroon); margin: 0 0 .7rem; padding-bottom: .55rem; background: linear-gradient(90deg, transparent, var(--gold), transparent) 50% 100% / 6rem 1px no-repeat; }
.family-names { list-style: none; margin: 0; padding: 0; font-size: 1.05rem; line-height: 1.85; color: var(--deep); }
.invited-by { max-width: 22rem; margin: 2.25rem auto 0; padding-top: 1.75rem; border-top: 1px solid rgba(184, 154, 106, .6); }

/* ---------- C. photos ----------
   Layout is chosen by the PACKAGE, the theme only styles it:
   .layout-featured (Basic, one portrait)  -> pointed jharokha window + ivory mat + double gold frame
   .photo-grid (Standard) / .photo-rail (Premium) -> clean rectangular antique-gold stationery border, natural proportions.
   Gallery or landscape photos are never cropped into an arch. */
.sec-photos { background: var(--seam) 0 4px / 100% 1px no-repeat, var(--art-grain), var(--ivory-deep); padding: 3rem 1.5rem 3.25rem; }

/* rectangular stationery border: grid, rail and any other layout */
.photo img { display: block; width: 100%; height: auto; border: 1px solid var(--gold); padding: 6px; background: var(--ivory); border-radius: 2px; outline: 1px solid rgba(184, 154, 106, .55); outline-offset: 4px; }
.photo-missing { border: 1px dashed var(--gold); border-radius: 2px; background: var(--ivory); }
.photo-grid, .photo-rail { align-items: start; }
.photo-grid { gap: 1rem; }
.photo-rail { gap: 1rem; padding: 6px 6px 1rem; }

/* featured portrait: the frame is the figure's BACKGROUND and the painting sits on top, so no line is ever drawn across the painting.
   Frame art is 440 x 558; the 400 x 500 window sits at (20, 38). Percentages below are those numbers. */
.layout-featured .photo-featured { max-width: 19.5rem; }
.layout-featured .photo { position: relative; aspect-ratio: 440 / 558; background: var(--art-jharokha-frame) center / 100% 100% no-repeat; filter: drop-shadow(0 8px 16px rgba(53, 16, 27, .16)); }
.layout-featured .photo img, .layout-featured .photo-missing {
  position: absolute; left: 4.545%; top: 6.81%; width: 90.909%; height: 89.606%; box-sizing: border-box;
  border: 0; padding: 0; outline: 0; border-radius: 0; object-fit: cover; background: var(--ivory-deep);
  -webkit-mask: var(--art-jharokha-mask) center / 100% 100% no-repeat; mask: var(--art-jharokha-mask) center / 100% 100% no-repeat;
}
.layout-featured .photo-missing { display: grid; place-items: center; text-align: center; color: var(--deep); }

/* ---------- D. event: double-line stationery card, four filigree corners ---------- */
.sec-events { background: var(--seam) 0 4px / 100% 1px no-repeat, var(--art-grain), var(--ivory); padding: 3.5rem 1.25rem; }
.event { position: relative; background: var(--color-surface); border: 1px solid var(--gold); border-radius: 2px; padding: 2.4rem 1.4rem 1.6rem;
  box-shadow: inset 0 0 0 6px var(--color-surface), inset 0 0 0 7px rgba(184, 154, 106, .55), 0 10px 24px rgba(53, 16, 27, .08); }
.event::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--art-corner-tl) 3px 3px, var(--art-corner-tr) calc(100% - 3px) 3px, var(--art-corner-bl) 3px calc(100% - 3px), var(--art-corner-br) calc(100% - 3px) calc(100% - 3px);
  background-size: 40px 40px; background-repeat: no-repeat; }
.event > * { position: relative; }
.event-title { font-size: 1.75rem; color: var(--maroon); margin: 0 0 1.1rem; }
.event-date { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--deep); margin: 0; padding-top: 2rem; background: var(--art-icon-date) 50% 0 / 1.4rem no-repeat; }
.event-time { font-size: 1.05rem; color: var(--deep); margin: 0 0 1.35rem; }
.event-venue { color: var(--deep); margin: 0 0 .5rem; padding-top: 3.1rem;
  background: linear-gradient(var(--gold), var(--gold)) 50% 0 / 5rem 1px no-repeat, var(--art-icon-venue) 50% 1.1rem / 1.4rem no-repeat; }
.event-venue strong { font-family: var(--font-display); font-weight: 600; }
.event-actions { margin-top: 1.4rem; align-items: center; }
.btn { font-weight: 600; border-radius: 4px; border-color: var(--maroon); color: var(--maroon); min-height: 3rem; font-family: var(--font-display); }
.btn-primary { background: var(--maroon); color: var(--ivory); outline: 1px solid var(--gold); outline-offset: -4px; }   /* inset antique-gold hairline */
.btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- D2. RSVP band: ivory-deep between the ivory events and the deep closing ---------- */
.sec-rsvp { background: var(--seam) 0 4px / 100% 1px no-repeat, var(--art-grain), var(--ivory-deep); padding: 3.25rem 1.5rem 3.5rem; }
.rsvp-heading { font-size: 1.7rem; color: var(--maroon); margin: 0 0 1.3rem; text-wrap: balance; }
.rsvp-deadline { color: var(--deep); }
.sec-rsvp .btn-wide { min-height: 3rem; }

/* demo-only preview note: soft ivory card, fine antique-gold border, deep burgundy text */
.demo-action-note { max-width: 24rem; margin: 1rem auto 0; padding: .85rem 1.1rem; background: var(--color-surface); border: 1px solid var(--gold); border-radius: 2px;
  box-shadow: inset 0 0 0 4px var(--color-surface), inset 0 0 0 5px rgba(184, 154, 106, .45); font-size: .95rem; line-height: 1.85; color: var(--deep); text-align: center; text-wrap: pretty; }

.event > .demo-action-note { margin-bottom: 1.5rem; }   /* keeps the note clear of the card's bottom corner flourishes when open */

/* ---------- E. closing ---------- */
.sec-footer { position: relative; background: var(--seam) 0 4px / 100% 1px no-repeat, var(--deep); color: var(--ivory);
  padding: 3.75rem 1.5rem calc(3.5rem + env(safe-area-inset-bottom, 0px)); }
.sec-footer::before { content: ""; position: absolute; inset: 0; background: var(--art-pattern); background-size: 48px; opacity: .09; pointer-events: none; }
.sec-footer > * { position: relative; }
.footer-invited { font-size: 1.02rem; color: var(--gold-light); margin: 0 auto 1.4rem; max-width: 22rem; }
.footer-invited::before, .footer-hosts::before { content: ""; display: block; width: 7.5rem; height: 1.25rem; margin: 0 auto .9rem; background: var(--art-closing) center / contain no-repeat; }
.footer-hosts { max-width: 22rem; margin: 0 auto 1.6rem; }
.footer-hosts::before { margin-bottom: .9rem; }   /* same closing.svg motif as .footer-invited, once, above the hosts */
.footer-hosts-heading { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; letter-spacing: .02em; line-height: 1.6; color: var(--gold-light); margin: 0 0 .55rem; }
.footer-hosts-list { font-size: 1.05rem; line-height: 1.75; color: var(--ivory); }
.footer-hosts--two-col .footer-hosts-list { font-size: 1rem; line-height: 1.65; column-gap: .75rem; row-gap: .3rem; }
.footer-message { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.8; color: var(--ivory); margin: 0 auto 1.6rem; max-width: 20rem; }
.footer-notice { display: block; max-width: 19rem; margin: 1.8rem auto 0; padding: .9rem 0 0; border: 0; border-top: 1px solid rgba(184, 154, 106, .55); border-radius: 0;
  font-size: .78rem; line-height: 1.8; color: var(--ivory); opacity: .72; }
.studio-credit { display: flex; flex-direction: column; align-items: center; gap: .45rem; margin-top: 2rem; font-size: .8rem; letter-spacing: .03em; color: var(--gold-light); opacity: .95; }
.studio-credit a { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; color: inherit; }
.studio-logo { width: 7.5rem; height: auto; }

/* balanced line breaks: no single orphan word on the last line */
.footer-message, .invitation-title, .cover-names .name, .event-title, .footer-invited, .footer-notice { text-wrap: balance; }
.invitation-text p { text-wrap: pretty; }

/* ---- English typography (Stage 2.2). Scoped to html[lang="en"] so Gujarati Demo 01 is untouched. ---- */
html[lang="en"] {
  --font-display: 'Cormorant Garamond', 'Noto Serif Gujarati', Georgia, serif;
  --font-body: 'Noto Sans Gujarati', 'Cormorant Garamond', system-ui, sans-serif;
}
html[lang="en"] body { line-height: 1.7; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { line-height: 1.2; }
html[lang="en"] .cover-kind { font-size: 1.6rem; letter-spacing: .06em; line-height: 1.3; }
html[lang="en"] .cover-names { font-size: clamp(2.5rem, 11.6vw, 3.4rem); line-height: 1.08; letter-spacing: .005em; }
html[lang="en"] .invitation-title { font-size: 2rem; line-height: 1.2; letter-spacing: .01em; }
html[lang="en"] .invitation-text p { font-size: 1.08rem; line-height: 1.8; }
html[lang="en"] .event-title { font-size: 2rem; line-height: 1.2; }
html[lang="en"] .event-date { font-size: 1.3rem; line-height: 1.4; }
html[lang="en"] .family-names { line-height: 1.6; }
html[lang="en"] .footer-hosts-heading { font-size: 1.3rem; letter-spacing: .06em; line-height: 1.4; }
html[lang="en"] .footer-hosts-list { line-height: 1.6; }
html[lang="en"] .footer-message { font-size: 1.55rem; line-height: 1.4; }
html[lang="en"] .rsvp-heading { font-size: 1.9rem; line-height: 1.2; }
