/* Photo-fade card (core/hero/004) — sage_light_core w1 (INV-05, D-031), from hero inspiration 21.
   The couple's photo (or the faceless default) melts into cream; below it the card: kicker, Gilda caps names with a
   tiny script "and", the ruled date block, venue, heart rule, "Reception to follow". Gypsophila top-right, a
   watercolour sage sprig bottom-left (it never moves: a painting would not), and still window-light leaf shadows.
   Phone = the card. Tablet = the card centred on a deeper cream. Desktop = split, photo left (D-030).
   The leaf shadow is a multiply layer: .30 on the paper just under the photo, fading to .10 at the foot of the card
   so the text sits on clean cream; .22 over the photo, easing to .08 around the faces (eye check A1311: .45 greyed it).
   live.js draws the same shadow (and the gypsophila) with the same numbers, so its first frame is this one. */
.he043 {
  --he043-ph: clamp(300px, 56svh, 600px);
  --he043-avail: calc(100vw - 2 * var(--k-gutter));
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; touch-action: pan-y;
  background: var(--k-paper); color: var(--k-ink); text-align: center;
}
.he043__frame { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.he043__photo {
  position: relative; z-index: 1; flex: none; height: var(--he043-ph); overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
.he043__img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--he043-pos, 50% 35%); }
.he043__img, .he043__gyp, .he043__sage { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.he043__sage { position: absolute; z-index: 2; left: -4%; bottom: 0; width: clamp(110px, 32vw, 220px); height: auto; pointer-events: none; }
.he043__shade {
  position: absolute; z-index: 3; inset: 0; pointer-events: none;
  background: url("assets/shadow.webp") center / cover no-repeat; mix-blend-mode: multiply; opacity: .3;
  -webkit-mask-image:
    radial-gradient(circle calc(var(--he043-ph) * .22) at calc(var(--he043-fx) * 100%) calc(var(--he043-fy) * var(--he043-ph)), rgb(0 0 0 / .375) 0%, #000 100%),
    linear-gradient(180deg, rgb(0 0 0 / .733) 0, rgb(0 0 0 / .733) calc(var(--he043-ph) * .62), #000 var(--he043-ph), rgb(0 0 0 / .333) 100%);
  mask-image:
    radial-gradient(circle calc(var(--he043-ph) * .22) at calc(var(--he043-fx) * 100%) calc(var(--he043-fy) * var(--he043-ph)), rgb(0 0 0 / .375) 0%, #000 100%),
    linear-gradient(180deg, rgb(0 0 0 / .733) 0, rgb(0 0 0 / .733) calc(var(--he043-ph) * .62), #000 var(--he043-ph), rgb(0 0 0 / .333) 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.he043__stage { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.he043__gyp {
  position: absolute; z-index: 5; top: calc(var(--he043-ph) * -.02); right: -5%; width: clamp(150px, 44vw, 300px); height: auto;
  pointer-events: none; filter: drop-shadow(6px 8px 6px rgb(0 0 0 / .18));
}
/* the foot of the card keeps room for the sage sprig, so a long address never runs over it (eye check A1311) */
.he043__card { position: relative; z-index: 6; margin-top: calc(var(--he043-ph) * -.14); padding: 0 var(--k-gutter) calc(max(104px, 30vw) + env(safe-area-inset-bottom)); }
.he043__blessing { margin-bottom: 10px; font: 400 1.05rem/1.6 var(--k-font-body); color: var(--k-ink-soft); }
.he043__kicker { font: 400 .95rem/1.5 var(--k-font-body); color: var(--k-ink-soft); }
.he043-names { display: flex; flex-direction: column; align-items: center; margin-top: 18px; font-weight: 400; }
.he043-name {
  display: block; white-space: nowrap;
  font: 400 min(clamp(2.4rem, 10.5vw, 4.2rem), calc(var(--he043-avail) / (var(--he043-len) * .74)))/1.08 var(--k-font-display);
  letter-spacing: .04em; text-transform: uppercase; color: var(--k-ink);
}
.he043-and { display: block; margin: .15em 0 .1em; font: 400 1.5rem/1 var(--k-font-script); color: var(--k-ink-soft); }
.he043__date { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: min(100%, 360px); margin: 24px auto 0; }
.he043__side { display: grid; row-gap: 7px; }
.he043__side--l { justify-items: end; padding-right: 16px; }
.he043__side--r { justify-items: start; padding-left: 16px; }
.he043__w { padding: 0 2px 7px; border-bottom: 1px solid var(--k-line); font: 400 .9rem/1 var(--k-font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--k-ink); }
.he043__side--l .he043__w { justify-self: stretch; text-align: right; }
.he043__side--r .he043__w { justify-self: stretch; text-align: left; }
.he043__t { font: 400 .95rem/1 var(--k-font-body); color: var(--k-ink-soft); }
.he043__day { padding: 6px 16px; border-left: 1px solid var(--k-line); border-right: 1px solid var(--k-line); font: 400 3.1rem/1 var(--k-font-display); color: var(--k-ink); }
.he043__venue { display: grid; row-gap: 4px; margin-top: 22px; }
.he043__vname { font: 500 .72rem/1.4 var(--k-font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--k-ink); }
.he043__vaddr { font: 400 .95rem/1.5 var(--k-font-body); color: var(--k-ink-soft); }
.he043__rule { width: 180px; margin: 22px auto 10px; color: var(--c-secondary); }
.he043__follow { font: 400 .95rem/1.5 var(--k-font-body); color: var(--k-ink-soft); }

/* tablet: the card, centred on a deeper cream (D-030) */
@media (min-width: 768px) {
  .he043 {
    --he043-ph: min(50svh, 540px); --he043-avail: 544px;
    display: flex; align-items: center; justify-content: center; padding: 48px var(--k-gutter);
    background: var(--k-paper-deep, var(--k-paper));
  }
  .he043__frame { width: 100%; max-width: 640px; min-height: 0; background: var(--k-card); box-shadow: var(--k-shadow-paper); border-radius: 2px; overflow: hidden; }
  .he043__card { padding: 0 48px 132px; }
  .he043__gyp { right: -4%; width: 42%; }
  .he043__sage { left: -3%; bottom: -1%; width: 32%; }
}

/* desktop and landscape phones: split, the photo fills the left half and melts into the text on the right */
@media (min-width: 1200px) and (min-aspect-ratio: 5/4), (max-height: 500px) and (orientation: landscape) {
  .he043 { --he043-ph: 100svh; --he043-avail: min(calc(50vw - 112px), 520px); display: block; padding: 0; background: var(--k-paper); }
  .he043__frame { flex-direction: row; align-items: stretch; max-width: none; min-height: 100vh; min-height: 100svh; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .he043__photo { width: 50%; height: auto; -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent 100%); mask-image: linear-gradient(90deg, #000 70%, transparent 100%); }
  .he043__shade {
    -webkit-mask-image:
      radial-gradient(circle calc(var(--he043-ph) * .22) at calc(var(--he043-fx) * 50%) calc(var(--he043-fy) * 100%), rgb(0 0 0 / .375) 0%, #000 100%),
      linear-gradient(90deg, rgb(0 0 0 / .733) 0, rgb(0 0 0 / .733) 35%, #000 50%, rgb(0 0 0 / .333) 100%);
    mask-image:
      radial-gradient(circle calc(var(--he043-ph) * .22) at calc(var(--he043-fx) * 50%) calc(var(--he043-fy) * 100%), rgb(0 0 0 / .375) 0%, #000 100%),
      linear-gradient(90deg, rgb(0 0 0 / .733) 0, rgb(0 0 0 / .733) 35%, #000 50%, rgb(0 0 0 / .333) 100%);
  }
  .he043__card { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 50%; margin: 0; padding: 64px 56px; }
  .he043__card > * { max-width: 520px; }
  .he043__gyp { top: -2%; right: auto; left: calc(50% - 21vw); width: min(24vw, 360px); }
  .he043__sage { left: calc(50% - 2vw); bottom: 4%; width: min(15vw, 230px); }
}
@media (max-height: 500px) and (orientation: landscape) {
  .he043 { --he043-avail: calc(50vw - 64px); }
  .he043__card { padding: 24px 32px; }
  .he043-name { font-size: min(2.2rem, calc(var(--he043-avail) / (var(--he043-len) * .74))); }
  .he043__date { margin-top: 12px; }
  .he043__venue, .he043__rule { margin-top: 10px; }
}

/* entrance, only behind an opening (kjy-enter two frames after the tap; --kjy-reveal-at from the opening) */
.js .he043__img { opacity: 0; }
.js.kjy-enter .he043__img { animation: he043-clear 1.6s ease calc(var(--kjy-reveal-at, 0ms) + 100ms) both; }
@keyframes he043-clear { from { opacity: 0; filter: blur(6px) brightness(1.12); } to { opacity: 1; filter: none; } }
.js .he043 [data-he043-in] { opacity: 0; transform: translateY(12px); }
.js.kjy-enter .he043 [data-he043-in] { opacity: 1; transform: none; transition: opacity 1s var(--k-ease), transform 1.2s var(--k-ease); transition-delay: calc(var(--kjy-reveal-at, 0ms) + 400ms + var(--he043-i, 0) * 120ms); }
.js.motion-reduce .he043__img, .js.kjy-instant .he043__img { animation: none; opacity: 1; }
.js.motion-reduce .he043 [data-he043-in], .js.kjy-instant .he043 [data-he043-in] { opacity: 1; transform: none; transition: none; }

/* live (Tier 3): the canvas draws the shade and the gypsophila from the first frame; the poster copies step aside */
.he043.is-live .he043__shade, .he043.is-live .he043__gyp { opacity: 0; }

/* v2.3 (A2346): what the Embroidery hoop leaves behind: the gold thread draws down the right edge and leaves the page, as the page's own
   thread comes out from under the first card. The eucalyptus that sat here came out on the owner's word, 2026-11-02 (A2533): "get rid of
   the green leaves thing.. keep the original thin flowers only". The hoop's leaves now clear with its linen (op043), and the gypsophila
   stays as v2.2 had it. */
.he043 { --he043-d: min(108vw, 56svh); }
.he043__thread { position: absolute; z-index: 5; right: 0; top: 78svh; width: 30px; height: calc(100% - 78svh); overflow: visible; pointer-events: none; }
.he043-th { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.he043-th--s { stroke: rgb(74 63 53 / .2); stroke-width: 2; transform: translate(.8px, 1.2px); }
.he043-th--g { stroke: #B4975F; stroke-width: 1.7; }
.he043-th--h { stroke: #FAF0D0; stroke-width: .5; opacity: .9; }
.js:not(.kjy-enter) .he043__thread { clip-path: inset(0 0 100% 0); }
.js.kjy-enter .he043__thread { clip-path: inset(0 -20px -20px -20px); transition: clip-path 1.5s cubic-bezier(.45, .05, .4, 1) calc(var(--kjy-reveal-at, 0ms) + 120ms); }
.js.motion-reduce .he043__thread, .js.kjy-instant .he043__thread { clip-path: none; transition: none; }
@media (min-aspect-ratio: 3/5) {
  .he043 { --he043-d: min(72vw, 76svh); }
  .he043__thread { top: 62svh; height: calc(100% - 62svh); width: 64px; }
}
