/* The hero: a wedding card floating over the valley (art: art-v4/BRIEF-L.md, Codex).
   It stands in for the entrance until the dove videos are ready. The picture is one painted
   image; only the words are live, laid on the card's paper so they are always exact and sharp.
   The frame keeps the picture's own proportions and covers the screen on phones; on wider
   screens it sits centred, with a blurred copy of itself filling the sides. */
.cover.hero-card{height:100svh;min-height:540px;max-height:none;background:#e7cfb3;overflow:hidden;position:relative;isolation:isolate}
.hero-backdrop{position:absolute;inset:-6%;z-index:-1;background:url('assets/hero/hero-card-tall-1.webp') center/cover;filter:blur(30px) saturate(1.05);opacity:.9}
.hero-frame{position:absolute;left:50%;top:50%;height:100%;aspect-ratio:941/1672;transform:translate(-50%,-50%)}
/* A little wider than the picture (most phones with their toolbars showing): fill the width instead,
   trimming a little sky and foreground rather than showing slivers of the blurred sides. */
@media (min-aspect-ratio:941/1672) and (max-aspect-ratio:7/10){.hero-frame{height:auto;width:100%}}
.hero-art{display:block;width:100%;height:100%;object-fit:cover}

/* The paper, measured on the painted card (out/L/NOTES.md). The words scale with it. */
.hero-paper{position:absolute;left:17.53%;top:22.55%;width:65.14%;height:48.86%;container-type:size}
.hero-card[data-take="2"] .hero-paper{left:19.02%;top:24.16%;width:62.17%;height:49.88%}
.hero-words{position:absolute;inset:18.6% 11% 16%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#1f2a3c;mix-blend-mode:multiply}
.hero-card[data-take="2"] .hero-words{inset:23.5% 13% 15.5%}
.hero-words>*{margin:0}
.hero-eyebrow{font:500 2.7cqw/1.5 var(--sans);letter-spacing:.18em;color:#6b1d2c}
/* Four short lines, so the longest clears the corner ferns beside the seal. */
.hero-greeting{font:4.4cqw/1.12 var(--serif)}
.hero-greeting em{font-style:italic}
.hero-rule{display:block;width:11cqw;height:1px;background:#b08d57;margin:3.4cqw auto!important;flex:none}
.hero-names{font:400 12.2cqw/.92 var(--serif);letter-spacing:-.02em;color:#6b1d2c;display:flex;flex-direction:column;align-items:center}
.hero-names em{font-size:.5em;line-height:1.35;font-style:italic;color:#8a5a3c}
.hero-date{font:4.9cqw/1.3 var(--serif);letter-spacing:.02em;margin-top:2.8cqw!important}
.hero-place{font:5.4cqw/1.12 var(--serif)}
.hero-town{font:500 2.5cqw/1.5 var(--sans);letter-spacing:.12em;text-transform:uppercase;margin-top:1.4cqw!important;opacity:.82}
.hero-signature{font:italic 4.7cqw/1.2 var(--serif);color:#6b1d2c;margin-top:3.6cqw!important}

/* The words settle onto the paper once, just after the picture appears. */
@keyframes hero-ink{from{opacity:0;transform:translateY(1.2cqw)}to{opacity:1;transform:none}}
/* Held while the entrance covers the card, so the words ink in as its light clears. */
.js:not(.entrance-on) .hero-words>*{animation:hero-ink .9s cubic-bezier(.2,.7,.2,1) both}
.js .hero-words>:nth-child(2){animation-delay:.12s}.js .hero-words>:nth-child(3){animation-delay:.2s}
.js .hero-words>:nth-child(4){animation-delay:.28s}.js .hero-words>:nth-child(5){animation-delay:.36s}
.js .hero-words>:nth-child(6){animation-delay:.42s}.js .hero-words>:nth-child(n+7){animation-delay:.5s}
.motion-off .hero-words>*{animation:none}
@media (prefers-reduced-motion:reduce){.hero-words>*{animation:none!important}}

/* The cue sits on the soft blossoms at the foot of the picture. */
.hero-card .scroll-cue{bottom:calc(14px + env(safe-area-inset-bottom,0px));color:#fff8ec;text-shadow:0 1px 10px #3b2a1a99;z-index:2;min-width:48px;min-height:48px;justify-content:center}
/* Just the arrow now, nudging downwards every few seconds: a hint, not a call. */
.hero-card .scroll-cue i{font:1.9rem/1 var(--serif);display:block;animation:cue-nudge 2.8s ease-in-out infinite}
@keyframes cue-nudge{0%,55%,100%{transform:translateY(0)}72%{transform:translateY(6px)}86%{transform:translateY(1px)}}
.motion-off .hero-card .scroll-cue i{animation:none}
@media (prefers-reduced-motion:reduce){.hero-card .scroll-cue i{animation:none}}

/* Laptops and anything wider than tall: the landscape painting of the same card (out/L/l-hero-wide-1).
   Up to 16:9 it fills the height and trims the sides; a little wider it fills the width and trims sky and
   foreground; on very wide screens it sits at full height with its blurred self at the sides. */
@media (min-aspect-ratio:1/1){
  .hero-backdrop{background-image:url('assets/hero/hero-card-wide-1.webp')}
  .hero-frame{aspect-ratio:1672/941;height:100%;width:auto}
  .hero-paper{left:34.99%;top:16.68%;width:29.72%;height:68.97%}
  /* This card's corner ferns reach a little higher: the words finish a touch earlier. */
  .hero-words{inset:18% 12% 18.5%}
  .hero-greeting{font-size:4.1cqw;line-height:1.12}
  .hero-rule{margin:3cqw auto!important}
}
@media (min-aspect-ratio:1672/941) and (max-aspect-ratio:21/10){.hero-frame{width:100%;height:auto}}
/* Very wide screens: the full-height picture's edges soften into its blurred self instead of stopping on a line. */
@media (min-aspect-ratio:21/10){.hero-frame{-webkit-mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent);mask-image:linear-gradient(90deg,transparent,#000 7%,#000 93%,transparent)}}
