/* Design "gold-dust": a dark silk card with gold dust that forms the kolam, the names and the date.
   A design is this token block plus its dust shapes; the content comes from the invitation.
   First built from the prototype (invite-gold-dust in the owner's files, port-css.py). */
:root {
  /* Palette "kumkum" (the default): maroon silk and gold.
     A palette is this group of colours; the other palettes are further down. */
  --bg-a: #3a0f1c; --bg-b: #230810; --bg-c: #12040a;            /* background: glow, middle, edge */
  --card-a: #3b101d; --card-b: #270a13;                         /* cards, top to bottom */
  --card-main-a: #4c1526; --card-main-b: #2c0b15;               /* the main function's card */
  --acc: 240, 195, 106;                                         /* the accent as r, g, b: lines, borders, washes */
  --gold: #f0c36a; --gold-2: #ffe6a6; --gold-dk: #b9842a;       /* accent, its light and its dark */
  --btn-a: #f7d98c; --btn-b: #dba53a; --on-gold: #2a0a12;       /* main button, and the text on it */
  --paper: #fff3dc; --muted: #dcbd93;                           /* text, quiet text */
  --glass: rgba(28, 6, 12, .72); --well: rgba(18, 4, 10, .6); --inset: rgba(24, 5, 10, .55); --node: #3a1320;

  /* Dust (hex only; read by golddust.js) */
  --p-1: #d9962b;   /* deep */
  --p-2: #ffe7a3;   /* pale */
  --p-3: #fff7e0;   /* sparks */

  /* Made from the palette; no need to edit */
  --line: rgba(var(--acc), .3); --hair: rgba(var(--acc), .12); --edge: rgba(var(--acc), .44); --wash: rgba(var(--acc), .1); --sheen: rgba(var(--acc), .16);

  /* Type */
  --font-display-en: "Fraunces", Georgia, serif;
  --font-display-ta: "Noto Serif Tamil", "Hind Madurai", serif;
  --font-dust-en: "Marcellus", "Fraunces", Georgia, serif;   /* names in English: even strokes hold up as dust */
  --font-dust-digits: "Noto Serif Tamil", Georgia, serif;    /* the date: sturdy figures with a zero that cannot be read as a letter */
  --font-body: "Manrope", "Hind Madurai", system-ui, sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --screens: 3.8;   /* how many screens of scrolling the opening stays pinned for */
}

/* ----- The other palettes; the invitation's look names one. To add one, copy a block, rename it, and add it to
   PALETTES in engine.js and to the design's choices in the catalog. ----- */
[data-palette="peacock"] {            /* deep peacock green and gold */
  --bg-a: #0f3c3b; --bg-b: #082628; --bg-c: #04151a;
  --card-a: #10413f; --card-b: #0a2b2d; --card-main-a: #165653; --card-main-b: #0c3435;
  --acc: 240, 195, 106; --gold: #f0c36a; --gold-2: #ffe6a6; --gold-dk: #b9842a;
  --btn-a: #f7d98c; --btn-b: #dba53a; --on-gold: #06211f;
  --paper: #f2fbf3; --muted: #a8cdbf;
  --glass: rgba(4, 21, 26, .72); --well: rgba(2, 14, 18, .6); --inset: rgba(3, 16, 20, .55); --node: #114241;
  --p-1: #d9962b; --p-2: #ffe7a3; --p-3: #eafff4;
}
[data-palette="midnight"] {           /* night blue and rose gold */
  --bg-a: #1b2554; --bg-b: #0e1434; --bg-c: #070a1c;
  --card-a: #1d2759; --card-b: #11183b; --card-main-a: #27347c; --card-main-b: #161f4d;
  --acc: 240, 186, 160; --gold: #f0baa0; --gold-2: #ffe2d3; --gold-dk: #b87b63;
  --btn-a: #ffd9c7; --btn-b: #e3a086; --on-gold: #1b1030;
  --paper: #f3f1ff; --muted: #b4b7d7;
  --glass: rgba(7, 10, 28, .72); --well: rgba(4, 6, 20, .6); --inset: rgba(5, 8, 24, .55); --node: #1c2556;
  --p-1: #c98a70; --p-2: #ffd9c7; --p-3: #ffffff;
}
[data-palette="marigold"] {           /* dark sandalwood and saffron */
  --bg-a: #4b2509; --bg-b: #2c1405; --bg-c: #170a03;
  --card-a: #50290c; --card-b: #321806; --card-main-a: #663310; --card-main-b: #3d1d07;
  --acc: 255, 178, 62; --gold: #ffb23e; --gold-2: #ffd98a; --gold-dk: #c2701a;
  --btn-a: #ffd98a; --btn-b: #f09a23; --on-gold: #2a1200;
  --paper: #fff4dc; --muted: #e1c193;
  --glass: rgba(23, 10, 3, .72); --well: rgba(15, 6, 2, .6); --inset: rgba(18, 8, 2, .55); --node: #4a2409;
  --p-1: #e07b12; --p-2: #ffd27a; --p-3: #fff3d0;
}

[data-palette="ivory"] {              /* soft sage and ivory, with pearl dust */
  --bg-a: #2a3b35; --bg-b: #18231f; --bg-c: #0c1311;
  --card-a: #2d3f39; --card-b: #1b2723; --card-main-a: #3a5148; --card-main-b: #22312c;
  --acc: 241, 231, 207; --gold: #f1e7cf; --gold-2: #fffaf0; --gold-dk: #a99a78;
  --btn-a: #fffaf0; --btn-b: #dccdaa; --on-gold: #18231f;
  --paper: #f7f5ee; --muted: #b7c4bc;
  --glass: rgba(12, 19, 17, .72); --well: rgba(7, 12, 10, .6); --inset: rgba(9, 15, 13, .55); --node: #2a3b35;
  --p-1: #cdbd93; --p-2: #fff6e2; --p-3: #ffffff;
}
[data-palette="emerald"] {            /* deep emerald and gold */
  --bg-a: #0d4a33; --bg-b: #072c1f; --bg-c: #03160f;
  --card-a: #0e5038; --card-b: #083323; --card-main-a: #136747; --card-main-b: #0a3d2a;
  --acc: 240, 195, 106; --gold: #f0c36a; --gold-2: #ffe6a6; --gold-dk: #b9842a;
  --btn-a: #f7d98c; --btn-b: #dba53a; --on-gold: #04210f;
  --paper: #f4fbf1; --muted: #a9cdb4;
  --glass: rgba(3, 22, 15, .72); --well: rgba(2, 14, 9, .6); --inset: rgba(2, 17, 11, .55); --node: #0f4d35;
  --p-1: #d9962b; --p-2: #ffe7a3; --p-3: #f1fff0;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-c); color: var(--paper); font: 400 17px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, p { margin: 0; }
button { font: inherit; color: inherit; }
[lang="ta"] { font-family: "Hind Madurai", var(--font-body); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
.nojs { padding: 40px 20px; text-align: center; }

/* ---------- language switch ---------- */
.langbar { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 60; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.langbar button { border: 0; background: transparent; cursor: pointer; padding: 7px 13px; border-radius: 999px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.langbar button[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }

/* =====================================================================
   SECTION 1: THE OPENING
   Default (no JS, or reduced motion): three panels stacked, real text.
   With .pin (added by JS): the section is pinned and the panels cross-fade.
   With .gl as well: the dust draws the names and the day, so that text is
   kept in the page for screen readers but made invisible.
   ===================================================================== */
.opening { position: relative; }
.opening__pin { position: relative; overflow: hidden; background: radial-gradient(120% 70% at 50% 36%, var(--bg-a) 0%, var(--bg-b) 46%, var(--bg-c) 100%); }
.opening__gl { position: absolute; top: 0; left: 0; width: 100%; height: 100vh; height: 100svh; display: block; pointer-events: none; }
.no-js .opening__gl, .no-gl .opening__gl { display: none; }
.opening__frame { position: absolute; inset: 10px; border: 1px solid var(--line); border-radius: 22px; pointer-events: none; z-index: 3; }
.opening__frame::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--hair); border-radius: 17px; }
.opening__stage { position: relative; z-index: 2; }

.panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 88px 30px 72px; }
.panel--1 { min-height: 100vh; min-height: 100svh; }

.kicker { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
[lang="ta"].kicker { letter-spacing: .02em; font-size: .95rem; text-transform: none; }
.invoke { font: 500 clamp(1.7rem, 7.4vw, 2.6rem)/1.25 var(--font-display-en); color: var(--paper); text-wrap: balance; }
[lang="ta"].invoke { font-family: var(--font-display-ta); font-size: clamp(1.5rem, 6.6vw, 2.3rem); line-height: 1.45; }

.slot--kolam { width: min(80vw, 430px, 52svh); aspect-ratio: 1 / .72; margin-bottom: 6px; }
/* an optional line above the opening picture, in its own script (for example the Bismillah) */
.blessing { font: 400 clamp(1.5rem, 6.6vw, 2.2rem)/1.7 "Amiri", "Noto Naskh Arabic", serif; color: var(--gold-2); }
.slot--kolam.is-upright { width: min(72vw, 400px, 46svh); aspect-ratio: 1 / 1; }   /* a picture stands upright; the kolam lies flat */
.no-js .slot--kolam, .no-gl .slot--kolam { display: none; }

.slot--names { display: grid; justify-items: center; font: 400 clamp(3rem, 17vw, 5.5rem)/1.12 var(--font-dust-en); color: var(--gold-2); letter-spacing: -.01em; }
.slot--names [lang="ta"] { font-family: var(--font-display-ta); font-weight: 700; line-height: 1.4; }
.slot--names .heart { font: 400 .34em/1 system-ui, sans-serif; color: var(--gold); margin: .2em 0; }

.hosts p { text-wrap: balance; }
.hosts { display: grid; gap: 12px; max-width: 30rem; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.hosts b { display: block; color: var(--gold); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hosts b[lang="ta"] { letter-spacing: .02em; text-transform: none; font-size: .86rem; }

.slot--day { font: 700 clamp(7rem, 40vw, 12rem)/.9 var(--font-dust-digits); color: var(--gold-2); }
.dateline { font: 500 clamp(1.25rem, 5.4vw, 1.7rem)/1.3 var(--font-display-en); color: var(--paper); }
[lang="ta"].dateline { font-family: var(--font-display-ta); line-height: 1.5; }
.when { color: var(--gold); font-weight: 700; }
.where { color: var(--muted); }

.cue { display: none; }

/* ----- pinned mode ----- */
.pin .opening { height: calc(100vh * var(--screens)); height: calc(100svh * var(--screens)); }
.pin .opening__pin { position: sticky; top: 0; height: 100vh; height: 100svh; }
.pin .opening__gl { height: 100%; }
.pin .opening__stage { position: absolute; inset: 0; }
.pin .panel { position: absolute; inset: 0; min-height: 0; opacity: 0; visibility: hidden; will-change: opacity, transform; }
.pin .panel--1 { opacity: 1; visibility: visible; }
.pin .panel--1 > :not(.slot) { animation: rise 1.1s var(--ease) both; animation-delay: 1.5s; }
.pin .panel--1 > .invoke { animation-delay: 1.7s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.pin .cue { display: grid; place-items: center; position: absolute; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); width: 44px; height: 44px; margin-left: -22px; z-index: 4; color: var(--gold); border: 1px solid var(--line); border-radius: 50%; }
.cue svg { width: 20px; height: 20px; animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }

/* the dust draws these, so hide the letters but keep them for screen readers */
.pin.gl .slot--names, .pin.gl .slot--day { color: transparent; }
.pin.gl .slot--names .heart { color: transparent; }
.pin.gl .slot--names { width: min(84vw, 560px); height: min(38svh, 400px); }
.pin.gl .slot--day { width: min(56vw, 320px); height: min(24svh, 250px); }
.slot--day.is-numbers { font-size: clamp(2.6rem, 13vw, 4.6rem); line-height: 1.1; }
.pin.gl .slot--day.is-numbers { width: min(80vw, 480px); height: min(32svh, 320px); }

@media (min-width: 900px) {
  .opening__frame { inset: 16px; border-radius: 28px; }
  .opening__frame::after { border-radius: 23px; }
  .slot--kolam { width: min(46vw, 560px, 58svh); }
  .pin.gl .slot--names { width: min(60vw, 760px); height: min(44svh, 460px); }
}
@media (max-height: 640px) {
  .panel { padding: 72px 26px 64px; gap: 10px; }
  .hosts { font-size: .84rem; gap: 8px; }
}

/* =====================================================================
   SECTION 2: THE PROGRAMME
   Default (reduced motion): the function cards are a plain list.
   With .pin: the section is pinned and the cards are a deck; scrolling
   lifts the top card away and brings the next one forward.
   ===================================================================== */
.prog { position: relative; }
.prog__pin { position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 18px; padding: 84px 20px 40px; background: radial-gradient(120% 70% at 50% 54%, var(--bg-a) 0%, var(--bg-b) 46%, var(--bg-c) 100%); }
.prog__frame { position: absolute; inset: 10px; border: 1px solid var(--line); border-radius: 22px; pointer-events: none; z-index: 3; }
.prog__frame::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--hair); border-radius: 17px; }
.prog__title { position: relative; z-index: 2; margin: 0; }
.deck { position: relative; z-index: 2; width: 100%; display: grid; gap: 18px; justify-items: center; align-content: center; }
.prog__dots { display: none; }

.fn { position: relative; width: min(100%, 400px); display: grid; justify-items: center; gap: 8px; padding: 26px 22px 24px; text-align: center; border-radius: 22px; border: 1px solid var(--edge); background: linear-gradient(180deg, var(--card-a) 0%, var(--card-b) 100%); box-shadow: inset 0 0 0 5px var(--inset), inset 0 0 0 6px var(--hair), 0 34px 60px -34px rgba(0, 0, 0, .9); overflow: hidden; }
.fn.is-main { border-color: var(--gold); background: linear-gradient(180deg, var(--card-main-a) 0%, var(--card-main-b) 100%); }
.fn__no { display: inline-flex; align-items: center; gap: 12px; font: 700 .78rem/1 var(--font-body); letter-spacing: .24em; color: var(--gold); }
.fn__no::before, .fn__no::after { content: ""; width: 28px; height: 1px; background: var(--line); }
.fn__day { margin-top: 6px; font-size: .84rem; font-weight: 700; color: var(--muted); }
.fn__time { font: 500 clamp(1.7rem, 7.8vw, 2.4rem)/1.2 var(--font-display-en); color: var(--gold-2); text-wrap: balance; }
[lang="ta"].fn__time { font-family: var(--font-display-ta); font-weight: 600; font-size: clamp(1.55rem, 7.2vw, 2.2rem); line-height: 1.4; }
.fn__name { margin: 2px 0 0; font: 500 1.3rem/1.3 var(--font-display-en); color: var(--paper); text-wrap: balance; }
[lang="ta"].fn__name { font-family: var(--font-display-ta); font-size: 1.15rem; line-height: 1.5; }
.fn__venue { color: var(--muted); font-size: .94rem; line-height: 1.5; text-wrap: balance; }
.fn__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font-size: .9rem; font-weight: 700; text-decoration: none; color: inherit; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn--gold { background: linear-gradient(180deg, var(--btn-a), var(--btn-b)); color: var(--on-gold); }
.btn--line { border-color: var(--line); background: transparent; color: var(--paper); }
button.btn { cursor: pointer; }
.btn:active { transform: scale(.97); }

/* ----- pinned mode ----- */
.pin .prog { height: calc(100vh * var(--prog-screens, 3)); height: calc(100svh * var(--prog-screens, 3)); }
.pin .prog__pin { position: sticky; top: 0; height: 100vh; height: 100svh; }
.pin .deck { height: 100%; gap: 0; will-change: transform, opacity; }
.pin .fn { grid-area: 1 / 1; align-self: center; will-change: transform, opacity; transform-origin: 50% 60%; }
.pin .fn > * { opacity: var(--ink, 1); }
/* a slow gold sheen crosses a card when it becomes the top one */
.pin .fn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, var(--sheen) 50%, transparent 62%); transform: translateX(-120%); pointer-events: none; }
.pin .fn.is-active::after { animation: sheen 1.4s var(--ease) .15s both; }
@keyframes sheen { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
.pin .prog__dots { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; position: relative; z-index: 2; }
.prog__dots li { width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: width .4s var(--ease), background-color .4s var(--ease); }
.prog__dots li.is-on { width: 26px; background: var(--gold); }

@media (min-width: 900px) {
  .prog__frame { inset: 16px; border-radius: 28px; }
  .prog__frame::after { border-radius: 23px; }
  .fn { width: min(100%, 460px); padding: 34px 32px 30px; }
}
@media (max-height: 640px) {
  .prog__pin { padding: 72px 18px 30px; gap: 12px; }
  .fn { padding: 20px 18px 18px; gap: 6px; }
  .fn__actions { margin-top: 8px; }
  .btn { min-height: 44px; padding: 0 14px; font-size: .84rem; }
}

/* =====================================================================
   SHARED BY THE LATER SECTIONS
   ===================================================================== */
[hidden] { display: none !important; }
h2, h3, figure, fieldset { margin: 0; }
input, textarea { font: inherit; color: inherit; }
.frame { position: absolute; inset: 10px; border: 1px solid var(--line); border-radius: 22px; pointer-events: none; z-index: 3; }
.frame::after { content: ""; position: absolute; inset: 5px; border: 1px solid var(--hair); border-radius: 17px; }
.orn { display: block; width: 72px; height: 9px; background: linear-gradient(var(--gold), var(--gold)) center / 100% 1px no-repeat; position: relative; }
.orn::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -4px 0 0 -4px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 4px var(--bg-c); }
.title { font: 500 clamp(1.7rem, 7.2vw, 2.5rem)/1.25 var(--font-display-en); color: var(--paper); text-wrap: balance; }
[lang="ta"].title { font-family: var(--font-display-ta); font-size: clamp(1.4rem, 6vw, 2.1rem); line-height: 1.5; }
/* things that rise into place the first time they are seen */
.pin .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.pin .reveal.is-in { opacity: 1; transform: none; }

/* =====================================================================
   THE MESSAGE: each word lights up as the guest scrolls through it
   ===================================================================== */
.words { display: grid; justify-items: center; gap: 22px; padding: 120px 30px 130px; text-align: center; background: var(--bg-c); }
.words__dear { color: var(--gold); font-weight: 700; }
.words__msg { max-width: 34rem; font: 500 clamp(1.4rem, 6vw, 2.1rem)/1.5 var(--font-display-en); color: var(--paper); text-wrap: balance; }
[lang="ta"].words__msg { font-family: var(--font-display-ta); font-size: clamp(1.2rem, 5.2vw, 1.85rem); line-height: 1.8; }
/* an optional verse under the message */
.words__verse { display: grid; gap: 6px; max-width: 28rem; margin-top: 10px; color: var(--muted); font-size: .98rem; font-style: italic; line-height: 1.6; text-wrap: balance; }
.words__verse[lang="ta"] { font-style: normal; }
.words__verse cite { color: var(--gold); font-size: .8rem; font-style: normal; font-weight: 700; letter-spacing: .08em; }

/* =====================================================================
   SECTION 3: THE STORY, a journey through the years
   Default (reduced motion): the chapters are a plain list, one under another.
   With .pin: the section is pinned; pictures pass like a turning carousel,
   one year counter rolls, and a marker travels along the path at the bottom.
   ===================================================================== */
.story { position: relative; }
.story__pin { position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 12px; padding: 84px 0 40px; background: radial-gradient(120% 70% at 50% 50%, var(--bg-a) 0%, var(--bg-b) 46%, var(--bg-c) 100%); }
.story__pin > .kicker { position: relative; z-index: 2; }
.journey { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; justify-items: center; align-content: center; }
.chap { position: relative; display: grid; justify-items: center; gap: 12px; padding: 0 28px; text-align: center; }
/* the frame is an arch, like a doorway */
.chap__photo { width: min(58vw, 270px, 32svh); aspect-ratio: 4 / 5; border-radius: 999px 999px 18px 18px; overflow: hidden; border: 1px solid var(--edge); box-shadow: 0 0 0 5px var(--inset), 0 0 0 6px var(--hair), 0 34px 60px -30px #000; }
.chap__img { display: grid; place-items: center; width: 100%; height: 100%; object-fit: cover; }
img.chap__img { display: block; }
.chap__art { width: 38%; height: auto; fill: none; stroke: var(--gold-2); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: .92; }
.chap__year { font: 500 clamp(3.4rem, 19vw, 5.6rem)/1 var(--font-display-en); font-variant-numeric: lining-nums tabular-nums; color: var(--gold-2); }
.chap__text { max-width: 20rem; font: 500 clamp(1.1rem, 4.8vw, 1.4rem)/1.45 var(--font-display-en); color: var(--paper); text-wrap: balance; }
[lang="ta"].chap__text { font-family: var(--font-display-ta); font-size: clamp(1rem, 4.4vw, 1.28rem); line-height: 1.7; }
.odo, .journey__path { display: none; }

.pin .story { height: calc(100vh * var(--story-screens, 3)); height: calc(100svh * var(--story-screens, 3)); }
.pin .story__pin { position: sticky; top: 0; height: 100vh; height: 100svh; }
.pin .journey { gap: 0; height: 100%; }
.pin .chap { grid-area: 1 / 1; align-self: center; perspective: 900px; }
.pin .chap__photo, .pin .chap__img, .pin .chap__text { will-change: transform, opacity; }
.pin .has-odo .chap__year { visibility: hidden; }
.pin .odo { display: flex; justify-content: center; position: absolute; left: 0; right: 0; z-index: 20; font: 500 clamp(3.4rem, 19vw, 5.6rem)/1 var(--font-display-en); font-variant-numeric: lining-nums tabular-nums; color: var(--gold-2); pointer-events: none; }
.odo__col { display: block; width: .66em; height: 1em; overflow: hidden; }
.odo__strip { display: block; will-change: transform; }
.odo__strip i { display: block; height: 1em; font-style: normal; text-align: center; }
.pin .journey__path { display: block; position: relative; z-index: 2; width: min(78vw, 340px); }
.journey__path svg { display: block; width: 100%; height: auto; overflow: visible; }
.jp-base { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.jp-prog { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.jp-stop { fill: var(--node); stroke: var(--line); stroke-width: 1; transition: fill .4s var(--ease), stroke .4s var(--ease); }
.jp-stop.is-on { fill: var(--gold); stroke: var(--gold); }
.jp-halo { fill: rgba(var(--acc), .25); }
.jp-dot { fill: var(--gold-2); }

/* =====================================================================
   SECTION 4: MEMORIES. Not pinned: each frame drifts at its own speed.
   ===================================================================== */
.mem { display: grid; justify-items: center; gap: 34px; padding: 110px 20px 130px; overflow: hidden; background: var(--bg-c); }
.mem__grid { width: min(100%, 560px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.shot { display: grid; gap: 8px; will-change: transform; }
.shot:nth-child(even) { margin-top: 64px; }
.shot__img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; border: 1px solid var(--edge); box-shadow: 0 26px 44px -26px #000; }
.shot--2 .shot__img { aspect-ratio: 1 / 1; }
.shot--3 .shot__img { aspect-ratio: 4 / 5; }
.shot figcaption { font-size: .84rem; color: var(--muted); text-align: center; }
/* placeholder tones, shown until a gallery entry has a real "src" */
.tone1 { background: linear-gradient(160deg, #8a2a42, #3a0f1c); }
.tone2 { background: linear-gradient(160deg, #c9892b, #6b3a12); }
.tone3 { background: linear-gradient(160deg, #1f6a5c, #0f2f33); }
.tone4 { background: linear-gradient(160deg, #5a2a66, #26102e); }

/* =====================================================================
   SECTION 5: THE REPLY (the shared form is styled further down)
   ===================================================================== */
.burst { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* =====================================================================
   SECTION 6: THE CLOSING
   ===================================================================== */
.close { display: grid; justify-items: center; gap: 18px; text-align: center; padding: 90px 24px calc(64px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg-c); }
.close__kolam { width: min(60vw, 250px); margin-bottom: 8px; }
.close__kolam svg { display: block; width: 100%; height: auto; overflow: visible; }
.k-line { fill: none; stroke: var(--gold); stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; }
.k-dot { fill: var(--gold-2); }
/* the kolam draws itself, then its dots appear */
.pin .k-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.8s cubic-bezier(.5, 0, .2, 1); }
.pin .k-dot { opacity: 0; transition: opacity .8s ease 1.9s; }
.pin .is-in .k-line { stroke-dashoffset: 0; }
.pin .is-in .k-dot { opacity: 1; }
.close__count { display: grid; justify-items: center; gap: 14px; width: 100%; }
.clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(100%, 380px); }
.clock div { display: grid; gap: 6px; padding: 14px 4px 12px; border: 1px solid var(--line); border-radius: 14px; }
.clock b { font: 500 1.9rem/1 var(--font-display-en); font-variant-numeric: tabular-nums; color: var(--gold-2); }
.clock small { font-size: .74rem; color: var(--muted); }
.close__sign { max-width: 24rem; margin-top: 14px; font: 500 1.3rem/1.5 var(--font-display-en); color: var(--paper); text-wrap: balance; }
[lang="ta"].close__sign { font-family: var(--font-display-ta); font-size: 1.15rem; line-height: 1.7; }
.made { margin-top: 12px; font-size: .78rem; color: var(--muted); opacity: .7; }

@media (min-width: 900px) {
  .frame { inset: 16px; border-radius: 28px; }
  .frame::after { border-radius: 23px; }
  .mem__grid { gap: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   WHAT THE PORTAL'S PAGE ADDS
   ===================================================================== */

/* ---------- the cover: one tap opens the invitation ---------- */
html.is-locked, html.is-locked body { overflow: hidden; }
.cover { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 76px 28px max(64px, env(safe-area-inset-bottom)); text-align: center; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 34%, var(--bg-a) 0%, var(--bg-b) 46%, var(--bg-c) 100%); transition: opacity .9s var(--ease), visibility 0s .9s; }
.cover::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); border-radius: 22px; pointer-events: none; }
.cover.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.cover__in { position: relative; display: grid; justify-items: center; gap: 12px; width: 100%; max-width: 30rem; }
.cover__ring { width: min(46vw, 190px); height: auto; margin-bottom: 6px; overflow: visible; }
.cover__ring path { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: .1 5.4; }
.cover__ring circle { fill: var(--gold-2); }
.cover__names { font: 400 clamp(2.6rem, 13vw, 4.2rem)/1.12 var(--font-dust-en); color: var(--gold-2); letter-spacing: .01em; text-wrap: balance; overflow-wrap: anywhere; }
[lang="ta"].cover__names { font-family: var(--font-display-ta); font-weight: 700; font-size: clamp(2rem, 10vw, 3.2rem); line-height: 1.4; }
.cover__date { color: var(--paper); }
.cover__dear { margin-top: 14px; font-size: 1.06rem; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.cover__invoke { color: var(--muted); }
.cover__open { margin-top: 18px; min-height: 54px; padding: 0 30px; font-size: 1.05rem; }
.cover__hint { font-size: .84rem; color: var(--muted); }
.no-js .cover { display: none; }

/* ---------- the shared sections, in this design's colours: reply, wishes, the family's card ---------- */
.content { background: var(--bg-c); }
.sec { padding: 90px 20px; }
.in { max-width: 440px; margin-inline: auto; }
.sec-title { margin: 0 0 22px; text-align: center; font: 500 clamp(1.7rem, 7.2vw, 2.5rem)/1.25 var(--font-display-en); color: var(--paper); text-wrap: balance; }
[lang="ta"].sec-title { font-family: var(--font-display-ta); font-size: clamp(1.4rem, 6vw, 2.1rem); line-height: 1.5; }
.hint { margin-top: 4px; text-align: center; font-size: .86rem; color: var(--muted); }
.btn-maroon { background: linear-gradient(180deg, var(--btn-a), var(--btn-b)); color: var(--on-gold); }
.btn-line { border-color: var(--line); background: transparent; color: var(--paper); }
.gd .rsvp { background: radial-gradient(120% 60% at 50% 40%, var(--bg-b) 0%, var(--bg-c) 100%); }
.gd .rsvp-box { padding: 24px 20px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--card-a) 0%, var(--card-b) 100%); }
.gd .rsvp-by, .gd .rsvp-privacy, .gd .rsvp-small, .gd .rsvp-closed, .gd .rsvp-mine small, .gd .rsvp-date small { color: var(--muted); }
.gd .rsvp-label { color: var(--gold); }
.gd .rsvp-form input[type="text"], .gd .rsvp-form input[type="tel"], .gd .rsvp-form textarea { border: 1px solid var(--line); border-radius: 12px; background: var(--well); color: var(--paper); }
.gd .rsvp-form input::placeholder { color: var(--muted); opacity: .8; }
.gd .rsvp-form input:focus-visible, .gd .rsvp-form textarea:focus-visible, .gd .rsvp-choice:focus-visible, .gd .rsvp-step:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.gd .rsvp-choice { border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--paper); font: 700 1rem/1.25 var(--font-body); }
.gd .rsvp-choice[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.gd .rsvp-fn { border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--paper); text-align: left; }
.gd .rsvp-fn input { accent-color: var(--gold); }
.gd .rsvp-step { border: 1px solid var(--line); background: transparent; color: var(--gold-2); }
.gd .rsvp-n { color: var(--gold-2); }
.gd .rsvp-error { background: rgba(255, 180, 168, .14); color: #ffd3cb; }
.gd .rsvp-actions .btn, .gd .family-actions .btn { width: 100%; cursor: pointer; }
.gd .rsvp-thanks { font: 500 1.7rem/1.3 var(--font-display-en); color: var(--gold-2); }
.gd .rsvp-thanks[lang="ta"] { font-family: var(--font-display-ta); font-size: 1.4rem; line-height: 1.5; }
.gd .rsvp-told { color: var(--paper); }
.gd .rsvp-mine { background: var(--well); border-color: var(--line); }
.gd .rsvp-mine b { color: var(--paper); }
.gd .rsvp-mine .btn, .gd .rsvp-date .btn { min-height: 44px; }
.gd .rsvp-dates h4 { font: 700 .9rem/1.4 var(--font-body); color: var(--gold); }
.gd .rsvp-date { border-color: var(--line); }
.gd .rsvp-date b { color: var(--paper); }
.gd .wish { border-color: var(--line); background: linear-gradient(180deg, var(--card-a) 0%, var(--card-b) 100%); }
.gd .wish blockquote { color: var(--paper); }
.gd .wish figcaption { color: var(--gold); }
.gd .family { padding-block: 64px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--card-main-a) 0%, var(--card-main-b) 100%); text-align: center; }
.gd .family .sec-title { font-size: 1.5rem; }
.gd .family-check { color: var(--paper); }
.gd .family-small { color: var(--muted); }
.gd .wm span { color: rgba(var(--acc), .13); -webkit-text-stroke: 1px rgba(255, 255, 255, .06); }
.gd .preview-chip, .gd .preview-note { border: 1px solid var(--line); background: var(--glass); color: var(--paper); }
.gd .preview-chip { top: max(14px, env(safe-area-inset-top)); left: 14px; padding: 9px 13px; }
.gd .foot-links a { color: var(--paper); }

/* ---------- a quick way to the reply, at the foot of the screen ---------- */
.replybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.replybar__words { flex: 1; min-width: 0; display: grid; }
.replybar b { font-size: .96rem; color: #fff; }
.replybar small { font-size: .8rem; color: var(--muted); }
.replybar .btn { flex: none; min-height: 48px; padding: 0 22px; font-size: 1rem; }
.has-replybar .close { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }

/* ---------- inside the Look screen: only the opening, at the size of its small frame ---------- */
.embed .langbar, .embed main > :not(.opening), .embed .close, .embed .cue, .embed .preview-chip, .embed .wm { display: none; }
.embed .opening { height: 100vh; height: 100svh; }
.embed .panel { padding: 14px 12px; gap: 6px; }
.embed .hosts, .embed .panel .kicker, .embed .when, .embed .where { display: none; }
.embed .slot--kolam { width: min(70vw, 62svh); margin: 0; }
.embed .slot--kolam.is-upright { width: min(62vw, 58svh); }
.embed .invoke { font-size: 1.05rem; }
.pin.gl .embed .slot--names { width: 86vw; height: 70svh; }
.pin.gl .embed .slot--day { width: 50vw; height: 46svh; }
.pin.gl .embed .slot--day.is-numbers { width: 80vw; height: 56svh; }
.embed .dateline { font-size: 1rem; }
.embed .opening__frame { inset: 6px; border-radius: 14px; }
.embed .opening__frame::after { border-radius: 9px; }

