/* Section films + growing-up scrub (site/gatefold/secfilm.js; Love Story, 2026-10-30). Only pages that load secfilm.js get
   html.gf-sf, so nothing here touches the other gatefold designs. */

/* sticky films need an ancestor that does not clip as a scroll container (overflow: hidden on .app breaks position: sticky) */
html.gf-sf .app { overflow: clip; }

/* ───────── a section standing on its film ───────── */
.sec.sf { padding: 0; isolation: isolate; background: none; }
.sec.sf::before, .sec.sf::after { display: none; }
.sf-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.sf-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--paper); }
.sf-pin > img, .sf-pin > video, .sf-pin > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--sf-pos, 50% 50%); display: block; max-width: none; }
.sf-v { opacity: 0; transition: opacity .3s ease; }
.sf-play .sf-v { opacity: 1; }
.sf-s1 { opacity: 0; }
.sf-end .sf-s1 { opacity: 1; animation: sfBreathe 22s ease-in-out 1s infinite alternate; }
.sf-melt .sf-s1 { opacity: 1; transition: opacity 1.6s ease; }
html.sf-reduce .sf-s1 { opacity: 1; animation: none; }
@keyframes sfBreathe { from { transform: scale(1); } to { transform: scale(1.035); } }
/* soft paper edges: the film melts into the page above and below (static, no animation) */
.sf-bg::before, .sf-bg::after { content: ''; position: absolute; left: 0; right: 0; height: 96px; z-index: 2; pointer-events: none; }
.sf-bg::before { top: 0; background: linear-gradient(var(--paper), color-mix(in srgb, var(--paper) 55%, transparent) 40%, transparent); }
.sf-bg::after { bottom: 0; background: linear-gradient(transparent, color-mix(in srgb, var(--paper) 55%, transparent) 60%, var(--paper)); }
/* a tiny caption on the film (the parents' photo: "1994 · the same chapel steps · today") */
.sf-cap { position: absolute; left: 0; right: 0; top: 12svh; display: flex; justify-content: center; z-index: 3; padding: 0 16px; }
.sf-cap span { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--ink); padding: 8px 16px; border-radius: 99px;
  background: color-mix(in srgb, var(--paper) 72%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); text-align: center; text-wrap: balance; }

/* the text: a calm translucent panel over the film */
.sf-body { position: relative; z-index: 1; min-height: 100svh; display: flex; flex-direction: column; gap: 16px; padding: 46svh 16px 8svh; }
.sf-top .sf-body { padding: 8svh 16px 46svh; }
.sec.sf .sf-panel, .sec.gr .sf-panel { position: relative; width: min(100%, 380px); margin: 0 auto; padding: 30px 22px 30px; border-radius: 22px; text-align: center;
  color: var(--ink); background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.08); backdrop-filter: blur(14px) saturate(1.08);
  border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
  box-shadow: 0 18px 46px rgba(52, 38, 20, .2), inset 0 0 0 5px color-mix(in srgb, var(--paper) 50%, transparent), inset 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent); }
.sec.sf .sf-panel > :first-child { margin-top: 0; }
.sec.sf .sf-panel p { max-width: 320px; }
.sec.sf .note-card.sf-panel::before, .sec.sf .note-card.sf-panel::after { display: none; }
.sec.sf .sf-panel .divider { margin-bottom: 0; }

/* order of the day on its panel: the drawn icon in the left column */
.sec.sf .prog { margin-top: 10px; }
.sf-pi.line-icons { margin: 0 auto; gap: 0; }
.sf-pi.line-icons svg { width: 46px; height: 46px; }

/* ───────── growing up: the two portraits grow up by themselves (~2 s) when the section comes into view ───────── */
.sec.gr { padding: 0; background: none; }
.gr-pin { position: relative; min-height: 92svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 16px; }
.gr-k { margin: 0; }
.gr-pair { display: flex; gap: 16px; justify-content: center; }
.gr-p { width: min(40vw, 184px, calc((100svh - 360px) * .75)); min-width: 112px; margin: 0; }
.gr-ph { position: relative; aspect-ratio: 3 / 4; border-radius: 999px 999px 14px 14px; overflow: hidden; background: #e9e2d6;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px color-mix(in srgb, var(--accent) 55%, transparent), 0 16px 34px rgba(60, 44, 24, .22); }
.gr-ph canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gr-p figcaption { font-family: var(--script); font-style: var(--script-style); font-size: 31px; line-height: 1.1; text-align: center; margin-top: 10px; color: var(--ink); }
.sec.gr .gr-panel { padding: 16px 18px 18px; width: min(100%, 360px); }
.sec.gr .framed.plain { width: 100%; padding: 0; border: 0; }
.sec.gr .framed.plain .framed-in { padding: 4px 0 2px; border: 0; background: none; }
.sec.gr .gr-panel .btn { margin-top: 12px; }
.sec.gr .cd-days { margin: 4px 0 8px; }
html.sf-reduce .gr-pin { min-height: 0; padding: 70px 16px; }

/* small phones: a little less air so the pinned scene fits (SE 667, 320 × 568) */
@media (max-height: 700px) {
  .gr-pin { gap: 8px; }
  .gr-p figcaption { font-size: 26px; margin-top: 6px; }
  .sec.gr .gr-panel { padding: 12px 14px 14px; }
  .sec.gr .cd-days b { font-size: 46px; }
  .sec.gr .gr-panel .btn { margin-top: 8px; }
}

/* ───────── Love Story hero: the names on one line in the sunset sky, no Art Deco frame (its light pool stays) ───────── */
html[data-gf="love-story"] .hero .hn-names .n, html[data-gf="love-story"] .hero .hn-names .amp { display: inline; }
html[data-gf="love-story"] .hero .hn-names { white-space: nowrap; }
html[data-gf="love-story"] .hero .hn-names .amp { font-size: .72em; margin: 0 .22em; }
html[data-gf="love-story"] .ffr svg { display: none; }
.sf-cap { opacity: 0; transition: opacity 1s ease .4s; }
.sf-play .sf-cap, .sf-end .sf-cap, .sf-melt .sf-cap, html.sf-reduce .sf-cap { opacity: 1; }
/* the drawn calendar above the countdown: only where the pinned scene has room */
@media (max-height: 760px) { .sec.gr .gr-panel .line-icons { display: none; } }
@media (max-height: 600px) {
  .gr-pin { gap: 8px; padding: 30px 14px; }
  .gr-p { width: min(38vw, calc((100svh - 330px) * .75)); min-width: 0; }
  .gr-p figcaption { font-size: 23px; margin-top: 4px; }
  .sec.gr .cd-days b { font-size: 40px; }
  .sec.gr .cd-row b { font-size: 24px; }
  .sec.gr .cd-t { margin-top: 6px; font-size: 15px; }
}


/* the caption card on the parents' film: script title, then "Michael & Linda · 1994" turns into "Daniel & Sophie · 2027" */
.sf-cap.rich { top: 9svh; }
.sf-card { width: min(100%, 330px); padding: 12px 18px 13px; border-radius: 18px; text-align: center; color: var(--ink);
  background: color-mix(in srgb, var(--paper) 80%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent); box-shadow: 0 10px 30px rgba(52, 38, 20, .16); }
.sf-ct { font-family: var(--script); font-style: var(--script-style); font-size: 29px; line-height: 1.12; text-wrap: balance; }
.sf-cl { position: relative; height: 1.5em; margin-top: 6px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.sf-cl span { position: absolute; left: 0; right: 0; top: 0; white-space: nowrap; transition: opacity .9s ease, translate .9s ease; }
.sf-cl .b { opacity: 0; translate: 0 5px; }
.sf-turn .sf-cl .a { opacity: 0; translate: 0 -5px; }
.sf-turn .sf-cl .b { opacity: 1; translate: 0 0; }
@media (max-width: 340px) { .sf-ct { font-size: 25px; } .sf-cl { font-size: 11px; letter-spacing: .14em; } }

/* the Polaroid opening (opener 'bloom'): the names written on the sunset sky with a soft light glow, not a dark shadow */
html[data-gf="love-story"] .hero.film .hn-names { text-shadow: 0 0 18px rgba(255, 249, 238, .95), 0 0 3px rgba(255, 252, 245, .8); }
/* the names a touch larger than the engine's box fit gives in this short sky (~10.5 vw, at most 46 px) — now art.namesFloor in
   config.js, applied by app.js only when the names still fit (2026-11-18: this CSS floor let long names run off the screen) */
html[data-gf="love-story"] .hero .hn-rule { margin-top: 6px; margin-bottom: 8px; }
/* the rich caption is part of the page (readable before the film turns), only the plain pill waits for its film */
.sf-cap.rich { opacity: 1; }

/* ───────── v4 (owner 2026-10-31) ───────── */
/* (1) no blinking panels: a glass panel (backdrop-filter) that fades in from opacity 0 flickered while scrolling (the blurred
   backdrop was painted on some frames and not on others — the "glitch" on the parents' film). The panel box is always there;
   only its contents fade / rise in. */
.sec.sf .sf-panel[data-reveal] { opacity: 1; transform: none; transition: none; }
.sec.sf .note-card.sf-panel > * { opacity: 0; transform: translateY(10px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.sec.sf .note-card.sf-panel.in > * { opacity: 1; transform: none; }
html.sf-reduce .sec.sf .note-card.sf-panel > * { opacity: 1; transform: none; transition: none; }
/* (2) a film that played holds its own last frame (no swap to a still: the still is sharper → a visible "pop"); it breathes slowly */
.sf-play.sf-end .sf-s1 { opacity: 0; animation: none; }
.sf-play.sf-end .sf-v { animation: sfBreathe 22s ease-in-out 1s infinite alternate; }

/* (3) 'veil': no box. The film is a full screen that scrolls with the page (not pinned); its lower part melts into the paper and
   the text starts there, below both faces (the invitation on the lake film; owner 2026-10-31: "faces hidden behind the panel") */
.sec.sf.sf-veil .sf-pin { position: relative; }
.sec.sf.sf-veil .sf-body { padding: 75svh 18px 4svh; justify-content: flex-start; gap: 0; }
.sec.sf.sf-veil .sf-pin::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; z-index: 1; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--paper) 0%, transparent), color-mix(in srgb, var(--paper) 70%, transparent) 38%, color-mix(in srgb, var(--paper) 93%, transparent) 62%, var(--paper) 86%); }
.sec.sf.sf-veil .sf-bg::after { display: none; }
.sec.sf.sf-veil .sf-panel { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; box-shadow: none; padding: 0 4px; width: min(100%, 360px); }
.sec.sf.sf-veil .sf-panel > .line-icons { display: none; }
.sec.sf.sf-veil .names-big { white-space: nowrap; font-size: clamp(36px, 11.5vw, 52px); margin: 6px 0 4px; }
.sec.sf.sf-veil .names-big .n, .sec.sf.sf-veil .names-big .amp { display: inline; }
.sec.sf.sf-veil .names-big .amp { font-size: .62em; margin: 0 .18em; }
.sec.sf.sf-veil .sf-panel p { margin-top: 8px; }

/* (4) the Polaroid's shutter: one soft warm flash at the tap (≈0.35 s), opacity only */
.ls-flash { position: absolute; inset: 0; z-index: 30; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 46%, #fffdf6 0%, #fff8ea 45%, rgba(255, 246, 228, .85) 100%); }
.hero.ls-shot .ls-flash { animation: lsFlash .42s cubic-bezier(.2, .6, .3, 1) both; }
@keyframes lsFlash { 0% { opacity: 0; } 14% { opacity: .82; } 100% { opacity: 0; } }

/* (5) typography (html[data-ty] set by secfilm.js from art.typo): headings in an elegant serif, script only for the names,
   labels in clean small caps, numbers in the heading serif. Consistent sizes. */
html[data-ty] body { font-size: calc(18.5px * var(--ls-body-scale, 1)); }
html[data-ty] .sec p { font-size: calc(18px * var(--ls-body-scale, 1)); line-height: 1.6; font-weight: 500; }
html[data-ty] h2.script, html[data-ty] .sf-ct { font-family: var(--ls-head); font-style: var(--ls-head-style); font-weight: 400; letter-spacing: .005em;
  font-size: calc(36px * var(--ls-head-scale, 1)); line-height: 1.12; text-wrap: balance; }
html[data-ty] .sf-ct { font-size: calc(24px * var(--ls-head-scale, 1)); }
html[data-ty] :is(.kicker, .hn-k, .hn-date, .hn-city, .cd-days span, .cd-row span, .sf-cl, .gr-k, .dateline span, .dateline small, .prog time, .venue-name, .dress-title) {
  font-family: var(--ls-label); font-style: normal; font-weight: 500; text-transform: uppercase; }
html[data-ty] :is(.kicker, .gr-k) { font-size: 10.5px; letter-spacing: .3em; }
html[data-ty] .venue-name, html[data-ty] .dress-title { font-size: 14px; letter-spacing: .24em; line-height: 1.6; }
html[data-ty] .prog time { font-size: 11px; letter-spacing: .2em; font-style: normal; }
html[data-ty] .prog b { font-family: var(--ls-head); font-style: var(--ls-head-style); font-weight: 400; font-size: calc(22px * var(--ls-head-scale, 1)); letter-spacing: .01em; text-transform: none; }
html[data-ty] :is(.cd-days b, .cd-row b, .dateline b) { font-family: var(--ls-head); font-style: normal; font-weight: 400; }
html[data-ty] .timeline-words, html[data-ty] .cd-t { font-family: var(--serif); font-style: italic; }
html[data-ty] .gr-p figcaption { font-family: var(--script); }

/* (6) buttons: a gold-foil hairline that draws itself in when the button appears, a warm foil sheen now and then (btnsheen),
   a soft gold glow on press; RSVP = champagne foil. Labels in the small-caps face. */
html[data-gf="love-story"] .btn { position: relative; overflow: hidden; isolation: isolate; font-family: var(--ls-label, var(--serif)); font-weight: 500;
  font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink); padding: 15px 30px; min-height: 48px;
  background: color-mix(in srgb, var(--paper) 72%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  transition: box-shadow .45s ease, transform .18s ease, background .45s ease; -webkit-tap-highlight-color: transparent; }
html[data-gf="love-story"] .btn::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: linear-gradient(100deg, #b38a48, #f3dfa6 32%, #a07d43 55%, #ecd497 78%, #b38a48);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  clip-path: inset(0 100% 0 0); transition: clip-path 1.5s cubic-bezier(.6, 0, .2, 1) .3s; }
html[data-gf="love-story"] .in .btn::before, html[data-gf="love-story"] .btn.in::before { clip-path: inset(0 0 0 0); }
html[data-gf="love-story"].anim-btnsheen .btn::after { background: linear-gradient(100deg, transparent, rgba(255, 238, 196, .6), transparent); }
html[data-gf="love-story"] .btn:hover { background: color-mix(in srgb, var(--paper) 88%, #f3e3b8); }
html[data-gf="love-story"] .btn:active { transform: scale(.975); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 13%, transparent), 0 8px 22px color-mix(in srgb, var(--accent) 26%, transparent); }
html[data-gf="love-story"] .btn.fill { color: #3b2d20; border-color: transparent;
  background: linear-gradient(135deg, #e6cf98 0%, #f8ecc8 42%, #d9b978 72%, #efdcaa 100%);
  box-shadow: 0 10px 26px rgba(120, 90, 40, .28), inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -1px 0 rgba(120, 90, 40, .18); }
html[data-gf="love-story"] .btn.fill::before { background: linear-gradient(100deg, #fff6dc, #c99c52 50%, #fff6dc); opacity: .7; }
@media (prefers-reduced-motion: reduce) { html[data-gf="love-story"] .btn::before { clip-path: none; transition: none; } }
/* the caption card fades away when a panel scrolls up to it (secfilm.js) */
.sf-cap.rich { transition: opacity .45s ease; }
.sf-capoff .sf-cap.rich { opacity: 0; }

/* v5 (Love Story only): on narrow phones the round music button sat over the last word of long paragraphs — a touch smaller and
   tucked into the corner, and the panels / the invitation text get extra room at the bottom so their last line rests above it */
@media (max-width: 380px) {
  html[data-gf="love-story"] .music-btn { width: 38px; height: 38px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); }
  html[data-gf="love-story"] .music-btn svg { width: 17px; height: 17px; }
  html[data-gf="love-story"] .sec.sf .sf-panel, html[data-gf="love-story"] .sec.gr .gr-panel { padding-bottom: 40px; }
  html[data-gf="love-story"] .sec.sf.sf-veil .sf-body { padding-bottom: 64px; }
  html[data-gf="love-story"] #content > .sec:not(.sf):not(.gr) { padding-bottom: 76px; }
}

/* v5 cover (owner 2026-10-31: "too much space between the words; the names a bit lower, clearly below the kicker"): Parisienne's
   wide side bearings left ~30 px of air around the "&" → pulled in; more room between the kicker and the names */
html[data-gf="love-story"] .hero .hn-names .amp { margin: 0 -.3em; position: relative; top: -.04em; }
html[data-gf="love-story"] .hero .hn-k { margin-bottom: 1.05em; }
html[data-gf="love-story"] .hero .hn-names { margin-top: .1em; }
html[data-gf="love-story"] .hero .hn-rule { margin-top: 4px; margin-bottom: 7px; }

/* v5 "Open in Maps" (secfilm.js .ls-map): linen pill with the gold-foil hairline (shared .btn ::before), a second fine inner line,
   a small drawn map-pin and refined small caps */
html[data-gf="love-story"] .btn.ls-map { display: inline-flex; align-items: center; justify-content: center; gap: 11px; padding: 14px 30px 14px 25px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 96%, #fff) 0%, color-mix(in srgb, var(--paper) 86%, #e9dcc3) 100%);
  outline: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: -5px;
  box-shadow: 0 6px 18px rgba(92, 68, 30, .12), inset 0 1px 0 rgba(255, 255, 255, .8); color: color-mix(in srgb, var(--ink) 88%, var(--accent)); }
html[data-gf="love-story"] .btn.ls-map span { letter-spacing: .26em; padding-left: .26em; }
html[data-gf="love-story"] .btn.ls-map .ls-pin { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round;
  margin-top: -1px; }
html[data-gf="love-story"] .btn.ls-map:active { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 13%, transparent), 0 8px 22px color-mix(in srgb, var(--accent) 26%, transparent); }
/* v5: a long venue name breaks into even lines ("Ashgrove / Lake House"), never a lone last word */
html[data-gf="love-story"] :is(.venue-name, .dress-title) { text-wrap: balance; }

/* v7 (owner 2026-10-31: "smoother transitions between the pages"): the old 96 px overlays faded the film into a FLAT paper colour,
   while the page around it is the textured paper (.app) — while scrolling that read as a hard line at every film section. Now the
   film layer itself is masked at its top and bottom edges over ~190 px with an eased curve, so it melts straight into the page's
   own textured paper (no seam, no colour step). */
html.gf-sf .sf-bg {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .1) 30px, rgba(0, 0, 0, .35) 70px, rgba(0, 0, 0, .7) 120px, rgba(0, 0, 0, .92) 160px, #000 190px,
    #000 calc(100% - 190px), rgba(0, 0, 0, .92) calc(100% - 160px), rgba(0, 0, 0, .7) calc(100% - 120px), rgba(0, 0, 0, .35) calc(100% - 70px), rgba(0, 0, 0, .1) calc(100% - 30px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .1) 30px, rgba(0, 0, 0, .35) 70px, rgba(0, 0, 0, .7) 120px, rgba(0, 0, 0, .92) 160px, #000 190px,
    #000 calc(100% - 190px), rgba(0, 0, 0, .92) calc(100% - 160px), rgba(0, 0, 0, .7) calc(100% - 120px), rgba(0, 0, 0, .35) calc(100% - 70px), rgba(0, 0, 0, .1) calc(100% - 30px), transparent 100%); }
html.gf-sf .sf-bg::before, html.gf-sf .sf-bg::after { display: none; }
/* the plain sections' light pools (anim-pools radial glows) were cut off at the section edge, and the hero ended on a flat
   colour: both left a visible step next to a film. Their edges now fade out too. */
html.gf-sf.anim-pools #content > .sec:not(.tone):not(.foot)::before, html.gf-sf.anim-pools #content > .sec:not(.tone):not(.foot)::after {
  -webkit-mask-image: linear-gradient(transparent, #000 150px, #000 calc(100% - 150px), transparent);
          mask-image: linear-gradient(transparent, #000 150px, #000 calc(100% - 150px), transparent); }
html.gf-sf body:not(.locked) .hero {
  -webkit-mask-image: linear-gradient(#000 calc(100% - 170px), rgba(0, 0, 0, .75) calc(100% - 110px), rgba(0, 0, 0, .3) calc(100% - 50px), transparent);
          mask-image: linear-gradient(#000 calc(100% - 170px), rgba(0, 0, 0, .75) calc(100% - 110px), rgba(0, 0, 0, .3) calc(100% - 50px), transparent); }
