@font-face { font-family: "Yeseva One"; src: url("../fonts/stories/yeseva-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/stories/schibsted-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/stories/schibsted-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bonheur Royale"; src: url("../fonts/stories/bonheur-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* STORIES (theme key "stories"): the invitation as full-screen story cards. The opening is the couple's round avatar
   with a glowing ring; tap and it grows into the first card. Each section is one card (stories.js): tap the right side
   for the next, the left edge to go back, bars at the top. Details sit on "stickers": the date and place as chips, the
   countdown as tiles, venues as location pins, the reply as a poll. Cards take turns: light, tinted and deep.
   Type: Bonheur Royale (names) · Yeseva One (titles) · Schibsted Grotesk (reading). */
:root {
  --bg: #fbf5ef; --paper: #ffffff; --ink: #221b26; --muted: #6f6670; --line: rgba(34, 27, 38, .12);
  --accent: #d9506b; --accent-2: #f2a15a; --accent-ink: #fff; --tint: #f8e3e1; --deep: #2b1e38; --deep-2: #4a2a4c; --on-deep: #fff5ee;
  --display: "Yeseva One", Georgia, serif; --text: "Schibsted Grotesk", system-ui, sans-serif; --script: "Bonheur Royale", cursive;
  --radius: 18px; --maxw: 460px; --gutter: 22px;
}
body { font-family: var(--text); background: var(--bg); color: var(--ink); }
.sh { text-align: left; margin-bottom: 22px; }
.sh-k { display: inline-block; margin: 0 0 12px; padding: 5px 12px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: .74rem; font-weight: 600; letter-spacing: .12em; transform: rotate(-3deg); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45); }
.sh-t { font-size: clamp(2.3rem, 11vw, 3.1rem); line-height: 1.02; letter-spacing: -.01em; }
.btn-line { border-radius: 999px; font-weight: 600; }

/* ---------- opening: the story ring ---------- */
.st-intro { --intro-ms: 1150; background: var(--bg); overflow: hidden; transition: opacity .35s ease .85s, visibility 0s linear 1.2s; }
.st-blob { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(60px); opacity: .45; pointer-events: none; }
.st-blob.is-a { left: -30vmax; top: -30vmax; background: var(--accent); } .st-blob.is-b { right: -34vmax; bottom: -34vmax; background: var(--accent-2); }
.st-ring-btn { position: relative; display: grid; justify-items: center; gap: 14px; padding: 20px; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; }
.st-for { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.st-ring { position: relative; display: grid; place-items: center; width: min(200px, 52vw); aspect-ratio: 1; border-radius: 50%; padding: 6px;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), #ffd36e, var(--accent)); box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--accent) 70%, transparent); }
.st-ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 5px solid var(--bg); pointer-events: none; }
.st-intro .st-ring { animation: st-turn 6s linear infinite; }
.st-intro .st-ring > .st-av { animation: st-turn 6s linear infinite reverse; }
@keyframes st-turn { to { transform: rotate(360deg); } }
.st-av { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: linear-gradient(140deg, var(--deep), var(--deep-2) 55%, var(--accent)); color: var(--on-deep); }
.st-av img { width: 100%; height: 100%; object-fit: cover; }
.st-av b { font: 400 clamp(3rem, 16vw, 4.6rem)/1 var(--script); letter-spacing: 0; padding-top: .1em; }
.st-av b i, .st-big i, .st-hav b i { font-style: normal; font-size: .55em; opacity: .8; margin: 0 .04em; }
.st-who { font: 400 clamp(1.6rem, 7vw, 2.1rem)/1.1 var(--display); text-align: center; max-width: 18ch; }
.st-who i { font: 400 1.25em/1 var(--script); color: var(--accent); }
.st-tap { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .82rem; font-weight: 600; letter-spacing: .04em; animation: st-nudge 2.4s ease-in-out infinite; }
@keyframes st-nudge { 50% { transform: translateY(-4px); } }
.is-opening .st-intro .st-ring { animation: st-grow 1.1s cubic-bezier(.6, 0, .2, 1) forwards; }
.is-opening .st-who, .is-opening .st-tap, .is-opening .st-for { opacity: 0; transition: opacity .25s; }
@keyframes st-grow { 40% { transform: scale(.92) rotate(40deg); } to { transform: scale(7) rotate(120deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .st-intro .st-ring, .st-intro .st-ring > .st-av, .st-tap { animation: none; } .is-opening .st-ring { animation: none; } }

/* ---------- the cover card ---------- */
.st-hero { position: relative; min-height: 100svh; display: grid; place-items: end start; padding: 0; overflow: hidden; color: var(--on-deep); text-align: left;
  background: radial-gradient(120% 80% at 80% 10%, var(--accent) 0, transparent 55%), radial-gradient(90% 70% at 0% 100%, var(--accent-2) 0, transparent 60%), var(--deep); }
.st-hero > * { max-width: none; margin: 0; }
.st-media { position: absolute; inset: 0; }
.st-media .st-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-hero.has-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0, transparent 22%, transparent 42%, rgba(15, 8, 20, .82) 100%); pointer-events: none; }
.st-big { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font: 400 clamp(8rem, 50vw, 14rem)/1 var(--script); color: color-mix(in srgb, var(--on-deep) 18%, transparent); white-space: nowrap; pointer-events: none; }
.st-copy { position: relative; z-index: 2; width: 100%; padding: 0 var(--gutter) 108px; }
.st-hero .hero-guest { margin: 0 0 8px; font-style: normal; font-size: .9rem; }
.st-stk { display: inline-block; padding: 5px 12px; border-radius: 8px; background: var(--paper); color: var(--ink); font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; transform: rotate(-2.5deg); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .6); }
.st-hero .hero-k { margin: 0 0 6px; }
.st-hero .hero-t { display: grid; font: 400 calc(clamp(3.6rem, 21vw, 5.6rem) * var(--fit, 1))/.95 var(--script); margin: 8px 0 6px; text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }
.st-hero .hero-t span { font-size: calc(1em * var(--fit, 1) / var(--fit, 1)); }
.st-hero .hero-t i { font: 400 .42em/1 var(--display); font-style: normal; color: var(--accent-2); margin: -.1em 0 -.05em .3em; }
.st-hero .hero-line { font-size: 1rem; line-height: 1.45; max-width: 30ch; opacity: .92; margin: 0 0 14px; }
.st-when { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: .86rem; font-weight: 600; }
.st-chip.is-pin::before { content: ""; width: 10px; height: 13px; background: currentColor; -webkit-mask: radial-gradient(circle at 50% 38%, transparent 2.2px, #000 2.6px) top / 100% 75% no-repeat, linear-gradient(#000, #000); mask: radial-gradient(circle at 50% 38%, transparent 2.2px, #000 2.6px); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.st-hero .hero-cta { margin: 0; background: var(--paper); color: var(--ink); font-weight: 600; letter-spacing: .06em; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6); }

/* ---------- cards (stories.js adds .st-on) ---------- */
html.st-on, .st-on body { height: 100%; overflow: hidden; }
.st-on .inv { position: fixed; inset: 0; overflow: hidden; background: #0e0a12; }
.st-on .inv > .s { position: absolute; inset: 0; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 92px var(--gutter) 96px; visibility: hidden; opacity: 0; transform: translateX(10%) scale(.97); transition: opacity .32s ease, transform .42s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .42s; }
.st-on .inv > .s { scroll-padding: 80px 0 90px; }
.st-on .inv > .s::before, .st-on .inv > .s::after { content: ""; flex: 1 0 0; }   /* short cards sit in the middle; long ones scroll from the top */
.st-on .inv > .s.is-past { transform: translateX(-10%) scale(.97); }
.st-on .inv > .s.is-cur { visibility: visible; opacity: 1; transform: none; transition: opacity .32s ease, transform .42s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.st-on .inv > .s > * { flex: none; width: 100%; }
.st-on .inv > .st-hero { padding: 0; display: grid; }
.st-on .inv > .st-hero::before, .st-on .inv > .st-hero::after { content: none; }
.st-on .st-hero.has-media::after { content: ""; }
.st-on [data-reveal] { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) { .st-on .inv > .s { transform: none !important; transition: opacity .2s, visibility 0s linear .2s; } }
.st-v1 { background: radial-gradient(70% 45% at 100% 0%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent), var(--bg); }
.st-v2 { background: radial-gradient(80% 50% at 0% 100%, color-mix(in srgb, var(--accent) 22%, transparent), transparent), var(--tint); }
.st-v3 { --ink: var(--on-deep); --muted: color-mix(in srgb, var(--on-deep) 72%, transparent); --line: rgba(255, 255, 255, .16); --paper: rgba(255, 255, 255, .08);
  color: var(--ink); background: radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%), linear-gradient(170deg, var(--deep), var(--deep-2)); }
.st-v3 { --accent: var(--accent-2); --accent-ink: #241a10; }
.st-v3 .sh-k { background: var(--accent-2); color: #241a10; }
.st-v3 .btn-line:hover { background: var(--on-deep); color: var(--deep); }

html:not(.st-on) .has-sp > .sp { margin: 0 auto 24px; overflow: hidden; border-radius: var(--radius); } html:not(.st-on) .sp-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* a card with the couple's photo behind it (Sections & order → Photo): the photo fills the card, darkened at top and bottom;
   text turns light; lists sit on frosted glass and the reply form stays a white sticker */
.st-on .inv > .s.has-sp { color: var(--on-deep); --muted: color-mix(in srgb, var(--on-deep) 80%, transparent); --line: rgba(255, 255, 255, .2); background: #120c16; }
.st-on .inv > .s.has-sp > .sp { position: fixed; inset: 0; z-index: 0; width: auto; max-width: none; margin: 0; border-radius: 0; }
.st-on .has-sp > .sp .sp-img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.st-on .has-sp > .sp::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 6, 14, .6), rgba(10, 6, 14, .25) 30%, rgba(10, 6, 14, .35) 60%, rgba(10, 6, 14, .82)); }
.st-on .inv > .s.has-sp > :not(.sp):not(.sp-tag) { position: relative; z-index: 1; }
.sp-tag { position: absolute; z-index: 2; left: 50%; top: 14px; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; pointer-events: none; }
.st-on .inv > .s.has-sp > .sp-tag { position: fixed; top: calc(62px + env(safe-area-inset-top)); z-index: 2; width: auto; }
.has-sp .vn-c, .has-sp .tl-i, .has-sp .cd-u, .has-sp .faq details, .has-sp .dr-roles > div, .has-sp .gl-c { background: rgba(20, 12, 24, .5); color: var(--on-deep); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.has-sp .cd-u b, .has-sp .tl-time { color: var(--on-deep); }
.has-sp .rs, .has-sp .rs-done { color: var(--ink); --muted: #6f6670; --line: rgba(34, 27, 38, .12); }
.has-sp .tml-d { color: var(--accent-2); }
.has-sp .btn-line:hover { background: var(--on-deep); color: var(--deep); }

/* progress bars, header, next */
.st-bar, .st-head, .st-count { display: none; }
.st-on .st-bar { position: fixed; z-index: 40; left: 10px; right: 10px; top: calc(8px + env(safe-area-inset-top)); display: flex; gap: 4px; pointer-events: none; }
.st-bar i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .38); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12); overflow: hidden; position: relative; }
.st-bar i::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.st-bar i.is-done::after { transform: none; }
.st-bar i.is-cur::after { animation: st-fill .7s ease forwards; }
@keyframes st-fill { to { transform: none; } }
.st-on .st-head { position: fixed; z-index: 40; left: 12px; right: 66px; top: calc(20px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 9px; color: #fff; pointer-events: none; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.st-hav { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; overflow: hidden; background: linear-gradient(140deg, var(--deep-2), var(--accent)); box-shadow: 0 0 0 2px #fff; }
.st-hav img { width: 100%; height: 100%; object-fit: cover; }
.st-hav b { font: 400 .95rem/1 var(--script); color: #fff; padding-top: .15em; }
.st-hn { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-hd { font-size: .78rem; opacity: .8; white-space: nowrap; }
.st-on:not(.st-dark) .st-head { color: var(--ink); text-shadow: none; }
.st-on .st-bar i { background: color-mix(in srgb, currentColor 30%, transparent); }
.st-on:not(.st-dark) .st-bar { color: var(--ink); } .st-on:not(.st-dark) .st-bar i::after { background: var(--accent); }
.st-on.st-dark .st-bar { color: #fff; }
.st-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.st-next { display: none; }
.st-on .st-next { position: fixed; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 41; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 12px 6px 14px; border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); font: 600 .8rem var(--text); cursor: pointer; }
.st-on .st-next i { font-style: normal; font-size: 1.25rem; line-height: 1; }
.st-on.st-dark .st-next { background: rgba(0, 0, 0, .38); color: #fff; }
.st-on .st-next { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.st-on.st-last .st-next, html:not(.is-opened) .st-next { display: none; }
.st-on.st-first .st-next { animation: st-nudge 2.2s ease-in-out infinite; }
.is-demo.st-on .inv > .s, .is-demo .st-on .inv > .s { padding-bottom: 150px; }
.st-on .is-demo ~ .st-next, .st-on body.is-demo .st-next { bottom: calc(84px + env(safe-area-inset-bottom)); }
.st-on .music { top: calc(16px + env(safe-area-inset-top)); width: 38px; height: 38px; }

/* ---------- details as stickers ---------- */
.cd { gap: 8px; }
.cd-u { padding: 14px 4px 10px; border-radius: 16px; background: var(--paper); box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .45); }
.cd-u:nth-child(odd) { transform: rotate(-2deg); } .cd-u:nth-child(even) { transform: rotate(2deg); }
.cd-u b { font-family: var(--display); color: var(--accent); }
.st-v3 .cd-u b { color: var(--on-deep); }
.cal { justify-content: flex-start; }
.tl-i { grid-template-columns: 78px 1fr; border-bottom: 0; padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; background: var(--paper); }
.tl-time { font-weight: 600; color: var(--accent); }
.st-v3 .tl-time { color: var(--accent-2); }
.vn-c { text-align: left; padding: 18px; border: 0; border-radius: 18px; background: var(--paper); box-shadow: 0 14px 30px -20px rgba(0, 0, 0, .5); }
.vn-l { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); letter-spacing: .08em; font-weight: 600; }
.vn-n { font-size: 1.5rem; }
.st-story .story-body, .story-body { font-size: 1.08rem; line-height: 1.6; }
.pp-h, .pp-l { text-align: left; }
.pp-h { font-size: 1.15rem; color: var(--accent); }
.st-v3 .pp-h { color: var(--accent-2); }
.pp-l li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.dr-text, .dr-note { text-align: left; }
.sw { justify-content: flex-start; }
.sw-dot { width: 52px; height: 52px; box-shadow: 0 0 0 3px var(--paper), 0 8px 16px -8px rgba(0, 0, 0, .5); }
.dr-roles > div { text-align: left; border: 0; background: var(--paper); }
.faq details { border: 0; margin-bottom: 8px; padding: 0 16px; border-radius: 14px; background: var(--paper); }
.gal { gap: 8px; }
.gal-i img, .gal-ph { border-radius: 14px; }
.gal-i:nth-child(3n + 1) { grid-column: span 2; } .gal-i:nth-child(3n + 1) img, .gal-i:nth-child(3n + 1) .gal-ph { aspect-ratio: 16 / 10; }

/* the reply, as a poll sticker */
.rs { border: 0; border-radius: 22px; background: var(--paper); box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .5); }
.f-choice .ch span { border-radius: 14px; font-weight: 600; background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }
.ch input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ch input:checked + span::before { border-color: var(--accent-ink); box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 9px var(--accent-ink); }
.rs-btn { background: linear-gradient(110deg, var(--accent), var(--accent-2)); font-weight: 600; }
.rs-done { border: 0; border-radius: 22px; }

/* the last card */
.st-end { text-align: center; }
.st-end .st-ring.is-small { width: 112px; margin: 0 auto 18px; padding: 4px; }
.st-end .st-ring.is-small::after { inset: 3px; border-width: 3px; border-color: var(--bg); }
.st-v2.st-end .st-ring.is-small::after { border-color: var(--tint); }
.st-v3.st-end .st-ring.is-small::after { border-color: var(--deep); }
.st-end .st-av b { font-size: 2.6rem; }
.st-end .cl-line { font-family: var(--display); font-size: clamp(1.7rem, 7vw, 2.2rem); }
.st-end .cl-tag { margin: 6px auto 18px; background: var(--accent); color: var(--accent-ink); }
.st-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
html:not(.st-on) [data-st-again] { display: none; }

/* on a computer: a phone-sized story in the middle */
@media (min-width: 720px) {
  .st-on body { background: radial-gradient(60% 60% at 20% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent), radial-gradient(60% 60% at 80% 80%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent), #17101c; }
  .st-on .inv { left: 50%; right: auto; width: 420px; top: 2.5vh; bottom: 2.5vh; transform: translateX(-50%); border-radius: 26px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7); }
  .st-on .st-bar { left: calc(50% - 200px); right: auto; width: 400px; top: calc(2.5vh + 8px); }
  .st-on .st-head { left: calc(50% - 198px); right: auto; width: 320px; top: calc(2.5vh + 20px); }
  .st-on .music { right: calc(50% - 200px); top: calc(2.5vh + 16px); }
  .st-on .st-next { right: calc(50% - 196px); bottom: calc(2.5vh + 18px); }
}
