/* Angoothi: a luxe ring-ceremony invitation, set like a jeweller's vitrine.
   Gate (lift the lid of a velvet ring box: the solitaire rises and catches the light) -> the promise -> the date
   under a champagne polish -> the four Cs (flip cards) -> a certificate of engagement (families) -> the settings
   (events) -> say yes. Aubergine velvet, wine, champagne gold and ivory; Italiana / Libre Caslon / Cinzel / Martel. */

:root {
  --night: #140910;
  --plum: #241020;
  --plum-2: #321528;
  --wine: #5c1530;
  --velvet: #7a1d3c;
  --velvet-hi: #9b2b50;
  --gold: #d9b46a;
  --gold-2: #b98d45;
  --gold-deep: #8d6224;
  --champ: #efdcae;
  --ivory: #fbf6ec;
  --paper: #f6eedd;
  --ink: #2a1720;
  --ink-soft: #6e5560;
  --muted: rgba(239, 220, 174, .72);
  --line: rgba(217, 180, 106, .35);

  --f-display: "Italiana", "Didot", Georgia, serif;
  --f-body: "Libre Caslon Text", Georgia, serif;
  --f-label: "Cinzel", Georgia, serif;
  --f-deva: "Martel", "Tiro Devanagari Hindi", serif;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* core.css tokens */
  --fx-music-bg: #5c1530;
  --fx-music-ring: #d9b46a;
  --fx-music-ink: #efdcae;
  --fx-bg: #241020;

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; }
html.shut { overflow: hidden; }
body {
  background: var(--night); color: var(--champ);
  font: 400 17px/1.7 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p, h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
main, .foot { position: relative; z-index: 1; }

/* velvet behind the whole page: a soft nap and a pool of light from above */
.velvet {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(70% 45% at 50% 0%, rgba(155, 43, 80, .28), transparent 70%),
    radial-gradient(90% 60% at 50% 110%, rgba(92, 21, 48, .5), transparent 70%),
    var(--noise),
    linear-gradient(180deg, var(--plum), var(--night));
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 500 12px/1 var(--f-label); letter-spacing: .3em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before, .eyebrow::after { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow::after { transform: scaleX(-1); }
.sec__title { margin-top: 18px; font: 400 clamp(40px, 11vw, 64px)/1.04 var(--f-display); color: var(--ivory); letter-spacing: .01em; }
.sec__title em { font: italic 400 .62em/1 var(--f-body); color: var(--gold); letter-spacing: 0; }
.sec__sub { max-width: 30em; margin: 18px auto 0; color: var(--muted); }
.gem { width: 22px; height: 18px; color: var(--gold); flex: none; }

/* =================================================================== GATE: the ring box */

.gate {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: grid; grid-template-rows: 1fr auto auto; justify-items: center;
  padding: calc(64px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}
.gate__beam {        /* the jeweller's spotlight, brighter once the lid is up */
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(34% 26% at 50% 66%, rgba(255, 236, 196, .2), transparent 70%),
    conic-gradient(from 180deg at 50% -8%, transparent 168deg, rgba(255, 238, 205, .09) 176deg, rgba(255, 238, 205, .16) 180deg, rgba(255, 238, 205, .09) 184deg, transparent 192deg);
  opacity: .55; transition: opacity 1.6s ease;
}
.gate[data-phase="open"] .gate__beam, .gate[data-phase="opening"] .gate__beam { opacity: 1; }

/* the copy above the box: before (a line) and after (the names) share one cell */
.gate__copy { display: grid; align-self: end; width: 100%; max-width: 760px; text-align: center; }
.gate__copy > * { grid-area: 1 / 1; }
.gate__before { align-self: end; transition: opacity .6s ease, translate .8s var(--ease); }
.gate__to { margin-bottom: 10px; font: 500 12px/1.4 var(--f-label); letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.gate__before { max-width: 420px; justify-self: center; }
.gate__lead { font: italic 400 clamp(20px, 5.6vw, 26px)/1.4 var(--f-body); color: var(--champ); }
.gate:not([data-phase="idle"]) .gate__before { opacity: 0; translate: 0 -14px; pointer-events: none; }

.hero > * { opacity: 0; translate: 0 16px; transition: opacity 1s var(--ease), translate 1.2s var(--ease); }
.gate[data-phase="open"] .hero > * { opacity: 1; translate: 0 0; }
.gate[data-phase="open"] .hero > :nth-child(2) { transition-delay: .15s; }
.gate[data-phase="open"] .hero > :nth-child(3) { transition-delay: .3s; }
.gate[data-phase="open"] .hero > :nth-child(4) { transition-delay: .45s; }
.gate[data-phase="open"] .hero > :nth-child(5) { transition-delay: .6s; }
.gate.instant .hero > * { transition: none; }
.hero__kicker { font: 500 11.5px/1.7 var(--f-label); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.hero__names {
  margin-top: 10px; font: 400 clamp(52px, 15vw, 96px)/1 var(--f-display); color: var(--ivory);
  letter-spacing: .01em; overflow-wrap: anywhere;
}
.hero__n { display: inline-block; }
.hero__amp { display: inline-block; font: italic 400 .55em/1 var(--f-body); color: var(--gold); translate: 0 -.12em; }
.hero__hi { margin-top: 4px; font: 400 21px/1.5 var(--f-deva); color: var(--champ); }
.hero__when { margin-top: 12px; font: italic 400 19px/1.4 var(--f-body); color: var(--champ); }
.hero__where { margin-top: 2px; font: 500 11.5px/1.6 var(--f-label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- the stage and the box (real 3D: faces in a preserve-3d context) ---------- */
.stage {
  --bw: min(56vw, 27svh, 250px);
  --bd: calc(var(--bw) * .84);
  --bh: calc(var(--bw) * .4);
  --lh: calc(var(--bw) * .25);
  --open: 0; --ring: 0;
  position: relative; width: calc(var(--bw) * 1.6); height: calc(var(--bw) * 1.72); margin: 0 0 calc(var(--bw) * .14);
  perspective: 900px; perspective-origin: 50% -30%;
}
.box {
  position: absolute; left: 50%; top: 66%; transform-style: preserve-3d;
  transform: rotateX(-16deg) rotateY(var(--ry, -24deg));
  transition: transform .9s var(--ease);
}
.gate[data-phase="idle"] .box { animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { translate: 0 -5px; } }
.base, .lid { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.face { position: absolute; left: 0; top: 0; display: block; backface-visibility: hidden; -webkit-backface-visibility: hidden; }

/* velvet: nap, a sheen along the light, darker on the sides */
.base__front, .base__back, .lid__front, .lid__back {
  width: var(--bw);
  background:
    var(--noise),
    linear-gradient(100deg, transparent 20%, rgba(255, 190, 210, .12) 42%, transparent 60%),
    linear-gradient(180deg, var(--velvet-hi), var(--velvet) 40%, var(--wine));
}
.base__left, .base__right, .lid__left, .lid__right {
  width: var(--bd);
  background: var(--noise), linear-gradient(180deg, var(--velvet), var(--wine) 60%, #3d0d20);
}
.base__right, .lid__right { filter: brightness(.62); }
.base__left, .lid__left { filter: brightness(.8); }
.base__front, .base__back, .base__left, .base__right { height: var(--bh); border-top: 2px solid var(--gold); border-radius: 0 0 6px 6px; }
.lid__front, .lid__back, .lid__left, .lid__right { height: var(--lh); border-bottom: 2px solid var(--gold-2); border-radius: 10px 10px 0 0; }
.base__front { transform: translateX(-50%) translateZ(calc(var(--bd) / 2)); }
.base__back { transform: translateX(-50%) rotateY(180deg) translateZ(calc(var(--bd) / 2)); }
.base__left { transform: translateX(-50%) rotateY(-90deg) translateZ(calc(var(--bw) / 2)); }
.base__right { transform: translateX(-50%) rotateY(90deg) translateZ(calc(var(--bw) / 2)); }
.clasp {
  position: absolute; left: 50%; top: -2px; width: 18%; height: 16%; translate: -50% 0; border-radius: 0 0 4px 4px;
  background: linear-gradient(180deg, #fff1c6, var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 2px 4px rgba(0, 0, 0, .4);
}

/* the cushion: ivory satin with a slit for the ring, the top face of the base */
.cushion {
  width: var(--bw); height: var(--bd);
  transform: translate(-50%, -50%) translateY(3px) rotateX(90deg);
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(255, 255, 255, .7), transparent 70%),
    linear-gradient(90deg, #d8c6a8, #f7efe0 30%, #fffaf0 50%, #f2e7d2 70%, #cdb994);
  box-shadow: inset 0 0 0 5px var(--velvet), inset 0 0 18px 8px rgba(60, 10, 30, .55);
  border-radius: 4px;
}
.cushion__slit {
  position: absolute; left: 50%; top: 58%; width: 54%; height: 7px; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, #5a3a28, #a88a6a 70%, transparent);
}

/* the ring stands in the slit: a plane facing the guest, rising as the lid lifts */
.ringstand {
  position: absolute; left: 0; top: 0; width: calc(var(--bw) * .8); height: calc(var(--bw) * .84);
  transform: translate(-50%, calc(-72% + (1 - var(--ring)) * 26%)) translateZ(calc(var(--bd) * .06)) rotateY(calc(var(--ry, -24deg) * -1));
  opacity: var(--ring);
}
.solitaire { display: block; width: 100%; height: 100%; overflow: visible; }
.glints .glint, .glints .fire { transform-box: fill-box; transform-origin: center; opacity: 0; }
.gate[data-phase="open"] .glints .fire { animation: fire 4.2s ease-in-out 1 both; }
.gate[data-phase="open"] .glint--a { animation: glint 3.6s ease-in-out .2s infinite; }
.gate[data-phase="open"] .glint--b { animation: glint 3.6s ease-in-out 1.4s infinite; }
.gate[data-phase="open"] .glint--c { animation: glint 3.6s ease-in-out 2.4s infinite; }
@keyframes glint { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); } 12% { opacity: 1; transform: scale(1) rotate(25deg); } 30% { opacity: 0; transform: scale(.3) rotate(45deg); } }
@keyframes fire { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.6); } 60% { opacity: .5; transform: scale(1); } 100% { opacity: .35; transform: scale(1); } }

/* the lid: hinged on the back edge of the base */
.lid {
  transform-origin: 0 0 calc(var(--bd) / -2);
  transform: rotateX(calc(var(--open) * 106deg));
}
.lid__front { transform: translate(-50%, -100%) translateZ(calc(var(--bd) / 2)); }
.lid__back { transform: translate(-50%, -100%) rotateY(180deg) translateZ(calc(var(--bd) / 2)); }
.lid__left { transform: translate(-50%, -100%) rotateY(-90deg) translateZ(calc(var(--bw) / 2)); }
.lid__right { transform: translate(-50%, -100%) rotateY(90deg) translateZ(calc(var(--bw) / 2)); }
.lid__top {
  width: var(--bw); height: var(--bd); border-radius: 12px;
  transform: translate(-50%, -50%) translateY(calc(var(--lh) * -1)) rotateX(90deg);
  background:
    var(--noise),
    radial-gradient(70% 60% at 45% 40%, rgba(255, 180, 205, .22), transparent 70%),
    linear-gradient(160deg, var(--velvet-hi), var(--velvet) 50%, var(--wine));
  box-shadow: inset 0 0 0 1px rgba(217, 180, 106, .5), inset 0 0 22px rgba(30, 5, 15, .5);
}
.lid__lining {          /* ivory satin inside the lid, with the couple's names stamped in gold */
  width: var(--bw); height: var(--bd);
  display: grid; place-items: center; text-align: center; padding: 10%;
  transform: translate(-50%, -50%) translateY(calc(var(--lh) * -1 + 1px)) rotateX(-90deg);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0) 0 6px, rgba(255, 255, 255, .25) 7px, rgba(255, 255, 255, 0) 9px),
    radial-gradient(70% 60% at 50% 45%, #fffaf0, #eadbbf 75%, #c8b089);
  box-shadow: inset 0 0 0 5px var(--velvet), inset 0 0 20px rgba(80, 20, 40, .45);
  border-radius: 6px;
}
.lid__lining span {
  font: 400 calc(var(--bw) * .085)/1.2 var(--f-display); letter-spacing: .08em; color: var(--gold-deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}
.lid__lining em { font: italic 400 1em var(--f-body); }

.stage__shadow {
  position: absolute; left: 50%; top: calc(66% + var(--bh) - 6px); width: calc(var(--bw) * 1.5); height: calc(var(--bw) * .32);
  translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent);
  pointer-events: none;
}
.gate__tap {
  position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border: 0; padding: 0; background: none;
  cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; border-radius: 24px;
}
.gate.is-dragging .gate__tap { cursor: grabbing; }
.gate:not([data-phase="idle"]) .gate__tap { pointer-events: none; }

.gate__foot { display: grid; place-items: center; min-height: 64px; margin-top: 8px; }
.gate__foot > * { grid-area: 1 / 1; }
.gate__hint {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none;
  font: 500 12px/1 var(--f-label); letter-spacing: .3em; text-indent: .3em; text-transform: uppercase; color: var(--gold);
  transition: opacity .6s ease;
}
.gate__arrow { position: relative; width: 1px; height: 26px; background: var(--gold); order: -1; animation: tug 2.4s var(--ease) infinite; }
.gate__arrow::before {
  content: ""; position: absolute; left: -4px; top: 0; width: 8px; height: 8px;
  border-left: 1px solid var(--gold); border-top: 1px solid var(--gold); rotate: 45deg; transform-origin: 0 0; translate: 0 1px;
}
@keyframes tug { 0%, 100% { translate: 0 0; } 45% { translate: 0 -8px; } }
.gate__chev { width: 12px; height: 12px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; rotate: 45deg; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 5px; } }
.gate__hint--down { opacity: 0; pointer-events: none; }
.gate[data-phase="open"] .gate__hint--lift { opacity: 0; }
.gate[data-phase="open"] .gate__hint--down { opacity: 1; pointer-events: auto; transition-delay: 1.4s; }
.gate:not([data-phase="idle"]) .gate__hint--lift { opacity: 0; }

.gate__skip {
  position: absolute; right: 16px; top: calc(16px + env(safe-area-inset-top)); z-index: 5;
  min-height: 36px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(20, 9, 16, .5);
  font: 500 11px/1 var(--f-label); letter-spacing: .22em; text-transform: uppercase; color: var(--champ); cursor: pointer;
}
.gate__skip::before { content: ""; position: absolute; inset: -6px; }
.gate:not([data-phase="idle"]) .gate__skip { display: none; }
html:not(.js) .gate__skip, html:not(.js) .gate__tap, html:not(.js) .gate__hint--lift { display: none; }
html:not(.js) .gate__before { display: none; }
html:not(.js) .hero > * { opacity: 1; translate: 0 0; }
html:not(.js) .stage { --open: 1; --ring: 1; }

/* =================================================================== SECTIONS */

.sec { position: relative; max-width: 640px; margin: 0 auto; padding: clamp(88px, 14vw, 140px) 16px 0; text-align: center; }

/* ---------- the promise ---------- */
.promise { display: flex; flex-direction: column; align-items: center; }
.gem--lg { width: 40px; height: 34px; margin-bottom: 22px; }
.promise__line {
  margin-top: 26px; font: 400 clamp(32px, 8.6vw, 50px)/1.18 var(--f-display); color: var(--ivory); letter-spacing: .005em;
}
.promise__sign { margin-top: 26px; font: italic 400 17px/1.5 var(--f-body); color: var(--muted); }
.promise__sign::before { content: "— "; color: var(--gold); }

/* ---------- the date ---------- */
.scratch { max-width: 420px; margin: 36px auto 0; border-radius: 16px; }
.polish {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px 28px; border-radius: 16px;
  background: radial-gradient(80% 70% at 50% 30%, var(--plum-2), var(--plum));
  box-shadow: inset 0 0 0 1px var(--line), inset 0 0 0 6px var(--plum), inset 0 0 0 7px rgba(217, 180, 106, .2);
}
.polish__wd, .polish__time { font: 500 12px/1 var(--f-label); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.polish__day {
  font: 400 clamp(110px, 32vw, 150px)/.9 var(--f-display); color: var(--ivory);
  background: linear-gradient(180deg, #fff6dc, var(--gold) 60%, var(--gold-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.polish__my { font: italic 400 22px/1.2 var(--f-body); color: var(--champ); }
.polish__time { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.scratch__hint { margin-top: 26px; font: 500 11px/1 var(--f-label); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); transition: opacity .6s; }
.revealed .scratch__hint { opacity: 0; }
.scratch__btn { color: var(--champ); }

.date__count { margin-top: 40px; }
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.count span {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0 14px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(36, 16, 32, .6);
  font: 500 10px/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.count b { font: 400 clamp(34px, 10vw, 48px)/1 var(--f-display); color: var(--ivory); font-variant-numeric: lining-nums tabular-nums; }
.count__done { margin-top: 16px; font: italic 400 22px/1.3 var(--f-body); color: var(--gold); }

/* ---------- the four Cs: flip cards ---------- */
.sec--cs { max-width: 760px; }
.cs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 36px; }
.cc {
  position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; cursor: pointer;
  perspective: 900px; color: inherit; text-align: center; -webkit-tap-highlight-color: transparent;
}
.cc.reveal { transition-delay: calc(var(--i) * .12s); }
.cc__in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .9s var(--ease); }
.cc[aria-pressed="true"] .cc__in { transform: rotateY(180deg); }
.cc__face {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 14px; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.cc__front {
  background: var(--noise), radial-gradient(90% 70% at 50% 25%, var(--velvet), var(--wine) 60%, var(--plum));
  box-shadow: inset 0 0 0 1px var(--gold-2), inset 0 0 0 6px var(--wine), inset 0 0 0 7px rgba(217, 180, 106, .35), 0 18px 30px -18px #000;
}
.cc__no { position: absolute; top: 16px; left: 18px; font: 500 11px/1 var(--f-label); letter-spacing: .2em; color: var(--gold); }
.cc__c { font: 400 clamp(40px, 12vw, 58px)/1 var(--f-display); color: var(--ivory); }
.cc__front-line { font: italic 400 15px/1.35 var(--f-body); color: var(--champ); }
.cc__turn {
  position: absolute; bottom: 14px; left: 50%; translate: -50% 0;
  font: 500 10px/1 var(--f-label); letter-spacing: .24em; text-transform: uppercase; color: var(--gold);
}
.cc__turn::after { content: " \21BB"; letter-spacing: 0; }
.cc__back {
  transform: rotateY(180deg); color: var(--ink);
  background: radial-gradient(90% 80% at 50% 30%, #fffaf0, var(--paper) 70%, #e9dcc1);
  box-shadow: inset 0 0 0 1px var(--gold), inset 0 0 0 6px var(--paper), inset 0 0 0 7px rgba(141, 98, 36, .35), 0 18px 30px -18px #000;
}
.cc__back .gem { color: var(--gold-deep); }
.cc__label { font: 500 12px/1 var(--f-label); letter-spacing: .26em; text-transform: uppercase; color: var(--velvet); }
.cc__back-line { font: 400 16px/1.45 var(--f-body); }
.cc:hover .cc__front { filter: brightness(1.08); }

/* ---------- the certificate (families) ---------- */
.sec--cert { max-width: 720px; }
.cert {
  position: relative; padding: 10px; border-radius: 6px; color: var(--ink);
  background:
    repeating-radial-gradient(circle at 0 0, transparent 0 9px, rgba(141, 98, 36, .14) 10px, transparent 11px),
    repeating-radial-gradient(circle at 100% 100%, transparent 0 9px, rgba(122, 29, 60, .1) 10px, transparent 11px),
    var(--paper);
  box-shadow: 0 30px 60px -30px #000, 0 0 0 1px rgba(217, 180, 106, .4);
}
.cert__in {
  position: relative; padding: 34px 18px 30px; border: 1px solid var(--gold-2); outline: 1px solid rgba(141, 98, 36, .4); outline-offset: -6px;
  background: radial-gradient(80% 60% at 50% 40%, #fffaf0, var(--paper));
}
.cert__no { font: 500 10.5px/1 var(--f-label); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.cert__no b { font-weight: 500; color: var(--velvet); }
.gem--cert { width: 34px; height: 28px; margin-top: 18px; color: var(--gold-deep); }
.cert__title { margin-top: 8px; font: 400 clamp(30px, 8.6vw, 46px)/1.08 var(--f-display); color: var(--wine); letter-spacing: .02em; }
.cert__deva { margin-top: 2px; font: 400 20px/1.5 var(--f-deva); color: var(--gold-deep); }
.cert__lead { margin: 18px auto 0; max-width: 26em; font: italic 400 16px/1.55 var(--f-body); color: var(--ink-soft); }
.cert__pair { display: grid; gap: 6px; margin-top: 18px; }
.cert__name { font: 400 clamp(30px, 8.4vw, 42px)/1.1 var(--f-display); color: var(--ink); letter-spacing: .01em; }
.cert__of { margin-top: 4px; font: 400 16px/1.5 var(--f-body); }
.cert__of em { color: var(--ink-soft); }
.cert__and { font: italic 400 26px/1 var(--f-body); color: var(--gold-deep); }
.cert__wit { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(141, 98, 36, .35); }
.cert__label { font: 500 11px/1 var(--f-label); letter-spacing: .24em; text-transform: uppercase; color: var(--velvet); }
.cert__cols { display: grid; gap: 18px; margin-top: 14px; }
.cert__list { margin: 0; }
.cert__list dt { font: italic 400 15px/1.4 var(--f-body); color: var(--ink-soft); }
.cert__list dd { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin: 6px 0 0; flex-wrap: wrap; }
.cert__list dd span { font: 400 19px/1.3 var(--f-body); }
.cert__list dd small { font: 500 10px/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); }
.cert__foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; margin-top: 30px; }
.cert__sig { display: flex; flex-direction: column; gap: 6px; font: italic 400 14px/1.3 var(--f-body); color: var(--ink-soft); }
.cert__line { height: 1px; background: rgba(42, 23, 32, .45); }
.seal { width: 86px; height: 86px; rotate: -10deg; filter: drop-shadow(0 4px 6px rgba(60, 10, 30, .35)); }
.seal svg { width: 100%; height: 100%; }
.cert.in .seal { animation: press 1s cubic-bezier(.3, 1.5, .5, 1) .6s both; }
@keyframes press { from { scale: 1.6; opacity: 0; rotate: -30deg; } }
.cert__issued { margin-top: 22px; font: 500 10.5px/1.6 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- the settings (events) ---------- */
.events { display: grid; gap: 18px; margin-top: 36px; text-align: left; }
.ev {
  position: relative; padding: 26px 20px 22px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(50, 21, 40, .9), rgba(36, 16, 32, .9));
  box-shadow: inset 0 0 0 1px var(--line), 0 24px 40px -28px #000;
}
.ev.reveal { transition-delay: calc(var(--i) * .12s); }
.ev::before, .ev::after {          /* gold corner mounts */
  content: ""; position: absolute; width: 16px; height: 16px; border: 1px solid var(--gold);
}
.ev::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.ev::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.ev__no { display: flex; align-items: center; gap: 10px; font: 500 11px/1 var(--f-label); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.ev__no .gem { width: 18px; height: 15px; }
.ev__hi { margin-top: 16px; font: 400 20px/1.4 var(--f-deva); color: var(--gold); }
.ev__name { margin-top: 4px; font: 400 clamp(36px, 10vw, 48px)/1.05 var(--f-display); color: var(--ivory); }
.ev__when { margin-top: 12px; font: italic 400 17px/1.5 var(--f-body); color: var(--champ); }
.ev__when span { display: block; }
.ev__when span + span { font: 500 12px/1.8 var(--f-label); font-style: normal; letter-spacing: .16em; color: var(--gold); }
.ev__where { margin-top: 10px; color: var(--champ); }
.ev__where strong { font-weight: 700; color: var(--ivory); }
.ev__note { margin-top: 12px; padding-left: 14px; border-left: 1px solid var(--gold); color: var(--muted); }
.ev__dress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.ev__dress span { font: 500 10px/1 var(--f-label); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-right: 4px; }
.ev__dress em { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-style: normal; font-size: 15px; color: var(--ivory); }
.ev__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--gold-2); text-decoration: none; color: var(--champ);
  font: 500 11px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase;
  transition: background .25s, color .25s;
}
.btn:hover { background: rgba(217, 180, 106, .14); }
.btn--solid { border-color: transparent; color: var(--ink); background: linear-gradient(180deg, #f6e2a6, var(--gold) 55%, var(--gold-2)); }
.btn--solid:hover { background: linear-gradient(180deg, #fff1c6, var(--gold)); }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 24px; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }

/* ---------- say yes ---------- */
.sec--yes { padding-bottom: clamp(96px, 14vw, 140px); }
.yes { display: flex; flex-direction: column; align-items: center; }
.yes__ring {
  position: relative; display: grid; place-items: center; align-content: center; gap: 4px;
  width: min(66vw, 240px); aspect-ratio: 1; margin-top: 34px; border-radius: 50%; text-decoration: none;
  background: radial-gradient(closest-side, rgba(255, 236, 196, .14), transparent 80%);
  transition: transform .5s var(--ease), filter .5s;
}
.yes__ring svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); }
.yes__ring svg circle { transform-origin: center; animation: turn 14s linear infinite; }
@keyframes turn { to { rotate: 360deg; } }
.yes__word { font: 400 clamp(62px, 18vw, 84px)/1 var(--f-display); color: var(--ivory); }
.yes__sub { font: 500 10.5px/1 var(--f-label); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.yes__ring::after {             /* a stone on top of the band */
  content: ""; position: absolute; top: 2%; left: 50%; width: 26px; height: 22px; translate: -50% -50%;
  background: linear-gradient(135deg, #fff, #cfe0ef 50%, #8fa8c0);
  clip-path: polygon(15% 30%, 32% 0, 68% 0, 85% 30%, 50% 100%);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, .8));
}
.yes__ring:hover, .yes__ring:focus-visible { transform: scale(1.04); filter: brightness(1.1); }
.yes__ring.said { animation: said .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes said { 30% { transform: scale(.94); } }
.yes__alt { margin-top: 26px; }
.yes__alt a { color: var(--champ); text-underline-offset: 4px; text-decoration-color: var(--gold-2); }
.yes__tag { margin-top: 26px; font: 500 13px/1 var(--f-label); letter-spacing: .2em; color: var(--gold); }

/* =================================================================== FOOTER */

.foot {
  padding: 60px 16px calc(90px + env(safe-area-inset-bottom)); text-align: center;
  border-top: 1px solid var(--line); background: rgba(20, 9, 16, .7);
}
.gem--foot { width: 28px; height: 24px; }
.foot__names { margin-top: 14px; font: 400 clamp(40px, 11vw, 60px)/1 var(--f-display); color: var(--ivory); }
.foot__names em { font: italic 400 .6em var(--f-body); color: var(--gold); }
.foot__date { margin-top: 12px; font: 500 12px/1 var(--f-label); letter-spacing: .4em; color: var(--gold); }
.foot__cal { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.foot__cal a, .foot__up { color: var(--champ); text-underline-offset: 4px; text-decoration-color: var(--gold-2); }
.foot__music, .foot__credit { margin-top: 14px; font-size: 14px; color: var(--muted); }
.foot__credit a { color: var(--champ); }
.foot__up { display: inline-block; margin-top: 22px; font: 500 11px/1 var(--f-label); letter-spacing: .2em; text-transform: uppercase; }

/* =================================================================== WIDER SCREENS */

@media (min-width: 760px) {
  .cs { grid-template-columns: repeat(4, 1fr); }
  .cc { aspect-ratio: 3 / 4.4; }
  .events { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .sec--events { max-width: 980px; }
  .cert__in { padding: 48px 48px 40px; }
  .cert__pair { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .cert__cols { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 380px) {
  .cert__foot { grid-template-columns: 1fr; justify-items: center; }
  .cert__sig { width: 70%; }
}

/* reduced motion: the box opens without the swing, the end state still shows */
@media (prefers-reduced-motion: reduce) {
  .gate[data-phase="open"] .glints .fire { opacity: .4; }
}

/* =================================================================== LINK PREVIEW (1200 x 630) */

.ogcard {
  align-items: center; padding: 0 70px 0 90px; gap: 30px;
  background: var(--noise), radial-gradient(60% 80% at 75% 60%, rgba(155, 43, 80, .45), transparent 70%), linear-gradient(160deg, var(--plum-2), var(--night));
  color: var(--champ);
}
.og__beam {
  position: absolute; inset: 0; pointer-events: none;
  background: conic-gradient(from 180deg at 76% -10%, transparent 165deg, rgba(255, 238, 205, .14) 175deg, rgba(255, 238, 205, .22) 180deg, rgba(255, 238, 205, .14) 185deg, transparent 195deg);
}
.og__text { position: relative; flex: 1.15; }
.og__kicker { font: 500 22px/1 var(--f-label); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.og__names { margin-top: 18px; font: 400 128px/.98 var(--f-display); color: var(--ivory); }
.og__names em { font: italic 400 .5em var(--f-body); color: var(--gold); }
.og__date { margin-top: 26px; font: italic 400 36px/1.2 var(--f-body); color: var(--champ); }
.og__venue { margin-top: 10px; font: 500 20px/1.3 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.og__art { position: relative; flex: 1; height: 100%; display: grid; place-items: center; }
.og__box { position: relative; width: 340px; height: 380px; }
.og__lid {
  position: absolute; left: 0; right: 0; top: 0; height: 200px; border-radius: 22px 22px 8px 8px;
  display: grid; place-items: center;
  background: radial-gradient(70% 60% at 50% 45%, #fffaf0, #eadbbf 75%, #c8b089);
  box-shadow: inset 0 0 0 10px var(--velvet), inset 0 0 30px rgba(80, 20, 40, .45);
}
.og__lid { place-items: start center; padding-top: 34px; }
.og__lid span { font: 400 30px/1.2 var(--f-display); color: var(--gold-deep); letter-spacing: .06em; }
.og__base {
  position: absolute; left: -10px; right: -10px; top: 214px; height: 160px; border-radius: 6px 6px 14px 14px;
  border-top: 3px solid var(--gold);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 190, 210, .14) 42%, transparent 60%), linear-gradient(180deg, var(--velvet-hi), var(--velvet) 40%, var(--wine));
  box-shadow: 0 30px 50px -20px #000;
}
.og__cushion {
  position: absolute; left: 14px; right: 14px; top: -34px; height: 40px; border-radius: 50%;
  background: linear-gradient(90deg, #d8c6a8, #fffaf0 50%, #cdb994);
}
.og__base { z-index: 2; }
.og__ring { position: absolute; z-index: 1; left: 50%; top: 40px; width: 230px; height: 240px; translate: -50% 0; }
.og__ring .glints .glint--a, .og__ring .glints .fire { opacity: 1; }
