/* ============================================================
   INVITINITY DEMO INVITATIONS — shared engine styles.
   Each template sets its look with the CSS variables below
   (in its own <style>) and reuses this layout.
   ============================================================ */
:root {
  --bg: #fbf7f4;            /* page background (desktop sides) */
  --paper: #ffffff;         /* invitation column */
  --tint: #f6eef1;          /* alternate section background */
  --ink: #3a2a30;
  --muted: #8a7a80;
  --accent: #701c45;
  --accent-ink: #ffffff;    /* text on accent */
  --line: rgba(58, 42, 48, .14);
  --cover-bg: #701c45;
  --cover-ink: #ffffff;
  --cover-btn: var(--accent); /* text on the cover button (a solid color; --cover-bg may be a gradient) */
  --f-display: "Cormorant Garamond", Georgia, serif;
  --f-body: ui-sans-serif, system-ui, sans-serif;
  --display-weight: 500;
  --display-style: italic;
  --radius: 0px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.is-locked, html.is-locked body { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Display type */
.display { font-family: var(--f-display); font-weight: var(--display-weight); font-style: var(--display-style); line-height: 1.05; letter-spacing: .01em; }
.kicker { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.amp { display: block; font-size: .5em; margin: .1em 0; color: var(--accent); }

/* Ornament (inline SVG <use href="#orn">) */
.orn { width: 120px; height: auto; aspect-ratio: 8 / 1; color: var(--accent); opacity: .85; margin-inline: auto; }
.orn--corner { position: absolute; width: clamp(120px, 34vw, 200px); aspect-ratio: 1; opacity: .55; pointer-events: none; }
.orn--tl { top: -6px; left: -6px; }
.orn--br { bottom: -6px; right: -6px; transform: rotate(180deg); }

/* ---------- Cover (opening screen) ---------- */
.cover { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 32px 20px; text-align: center; overflow: hidden;
  background: var(--cover-bg); color: var(--cover-ink); transition: transform 1s var(--ease), opacity 1s var(--ease); }
.cover .orn { color: currentColor; }
.cover__inner { position: relative; display: grid; justify-items: center; gap: 16px; max-width: 420px; }
.cover .kicker { color: inherit; opacity: .8; }
.cover__names { font-size: clamp(44px, 12vw, 64px); }
.cover__names .amp { color: inherit; opacity: .8; }
.cover__date { font-size: 13px; letter-spacing: .3em; opacity: .85; }
.cover__to { margin-top: 10px; font-size: 13px; opacity: .8; }
.cover__guest { font-size: 18px; font-weight: 600; padding: 8px 22px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 35%, transparent); }
.cover__note { font-size: 11px; opacity: .65; max-width: 280px; }
.btn-open { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; padding: 13px 26px; border-radius: var(--radius); background: var(--cover-ink); color: var(--cover-btn); font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; transition: transform .3s var(--ease); }
.btn-open:hover { transform: translateY(-2px); }
.btn-open svg { width: 16px; height: 16px; }
body.is-open .cover { transform: translateY(-100%); opacity: 0; pointer-events: none; }

/* ---------- Invitation column ---------- */
.invite { position: relative; width: min(100%, 520px); margin-inline: auto; background: var(--paper); box-shadow: 0 0 60px -20px rgba(0,0,0,.25); overflow: hidden; }
.sec { position: relative; padding: 72px 28px; text-align: center; }
.sec--tint { background: var(--tint); }
.sec--accent { background: var(--accent); color: var(--accent-ink); }
.sec--accent .kicker, .sec--accent .muted { color: inherit; opacity: .8; }
.sec__title { font-size: 40px; margin: 10px 0 8px; color: var(--accent); }
.sec--accent .sec__title { color: inherit; }
.muted { color: var(--muted); }
.lead { max-width: 380px; margin: 0 auto; }

/* Hero */
.hero { min-height: 100svh; display: grid; place-items: center; overflow: hidden; }
.hero__inner { position: relative; display: grid; gap: 14px; justify-items: center; }
.hero__names { font-size: clamp(52px, 15vw, 72px); color: var(--accent); }
.hero__date { font-size: 13px; letter-spacing: .32em; }
.scroll-hint { margin-top: 28px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* Quote / verse */
.verse__ar { font-family: "Amiri", "Scheherazade New", serif; font-size: 24px; line-height: 2; direction: rtl; margin: 18px 0 12px; color: var(--accent); }
.verse__text { font-style: italic; max-width: 400px; margin: 0 auto; }
.verse__src { margin-top: 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Couple / profile */
.people { display: grid; gap: 36px; margin-top: 28px; }
.person { display: grid; justify-items: center; gap: 8px; }
.monogram { width: 150px; aspect-ratio: 4 / 5; display: grid; place-items: center; border-radius: 999px 999px 0 0; background: var(--tint); border: 1px solid var(--line); outline: 1px solid var(--line); outline-offset: 6px; font-family: var(--f-display); font-style: var(--display-style); font-size: 64px; color: var(--accent); }
.sec--tint .monogram { background: var(--paper); }
.person__name { font-size: 32px; color: var(--accent); margin: 10px 0 0; }
.person p, .event p, .story__item p { margin: 0; }
.story__title { margin: 2px 0 4px; }
.person__parents { font-size: 13px; color: var(--muted); max-width: 300px; }
.person__ig { font-size: 12px; letter-spacing: .08em; text-decoration: none; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; }
.people__amp { font-family: var(--f-display); font-style: var(--display-style); font-size: 44px; color: var(--accent); line-height: 1; }

/* Countdown */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 360px; margin: 26px auto 22px; }
.countdown div { padding: 14px 4px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: var(--radius); }
.countdown b { display: block; font-family: var(--f-display); font-size: 34px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; transition: opacity .2s; }
.btn:hover { opacity: .88; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.btn svg { width: 15px; height: 15px; }

/* Events */
.events { display: grid; gap: 18px; margin-top: 28px; }
.event { position: relative; padding: 30px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); outline: 1px solid var(--line); outline-offset: -8px; }
.event__name { font-size: 34px; color: var(--accent); }
.event__date { margin-top: 10px; font-weight: 600; }
.event__time { font-size: 13px; color: var(--muted); }
.event__place { margin-top: 12px; font-weight: 600; }
.event__addr { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* Story */
.story { display: grid; gap: 0; margin-top: 30px; text-align: left; }
.story__item { position: relative; padding: 0 0 28px 28px; border-left: 1px solid var(--line); }
.story__item:last-child { padding-bottom: 0; }
.story__item::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.story__year { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.story__title { font-family: var(--f-display); font-style: var(--display-style); font-size: 24px; color: var(--accent); line-height: 1.2; }

/* Gallery (art tiles stand in for the couple's photos) */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 26px; }
.gallery > div { aspect-ratio: 3 / 4; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius); background: var(--g, var(--tint)); color: var(--accent); font-family: var(--f-display); font-style: var(--display-style); font-size: 28px; }
.gallery > div:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; font-size: 54px; }
.gallery__note { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* Gift */
.gifts { display: grid; gap: 14px; margin-top: 26px; }
.gift { display: grid; gap: 4px; justify-items: center; padding: 22px; background: var(--paper); color: var(--ink); border-radius: var(--radius); border: 1px solid var(--line); }
.gift__bank { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.gift__no { font-size: 22px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.gift__name { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

/* RSVP + wishes */
.rsvp { display: grid; gap: 12px; margin-top: 26px; text-align: left; }
.rsvp label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.rsvp input, .rsvp select, .rsvp textarea { width: 100%; padding: 11px 13px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.rsvp textarea { min-height: 90px; resize: vertical; }
.rsvp .btn { width: 100%; margin-top: 4px; padding-block: 14px; }
.rsvp__note { font-size: 11px; color: var(--muted); text-align: center; }
.wishes { display: grid; gap: 10px; margin-top: 26px; max-height: 360px; overflow: auto; text-align: left; }
.wish { padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.wish b { font-size: 14px; }
.wish small { margin-left: 6px; font-size: 11px; color: var(--muted); }
.wish p { margin: 4px 0 0; font-size: 14px; }

/* Closing */
.closing__names { font-size: 46px; color: var(--accent); margin: 14px 0; }
.credit { padding: 22px; text-align: center; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); }
.credit a { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 18px; letter-spacing: .02em; text-transform: none; text-decoration: none; }
.demo-badge { position: fixed; left: 50%; bottom: 14px; z-index: 40; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; background: rgba(20,20,20,.78); color: #fff; font-size: 11px; letter-spacing: .06em; white-space: nowrap; backdrop-filter: blur(6px); }
.demo-badge a { color: #fff; font-weight: 600; }

/* Reveal on scroll */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } .scroll-hint { animation: none; } }
