/* Event thank-you pages (first: /la-fintech-connect). Loaded after site.css.
   Above the fold: a thank-you, the guest offer (a ticket floating on the water) and a chalk-line
   Marina del Rey sunset. Scrolling, the section lifts away and the setting sun grows into the
   homepage's Horizon globe, then the page carries on as the homepage. event.js drives it.

   Layouts:
   - Default (no JS, reduced motion, screens too short to hold it): the thank-you section, then
     the homepage hero below it, in normal flow.
   - .evt-on (event.js): a stage pins under the nav and the two sections are layered in it;
     --eo (copy out), --es (scene out), --eb (evening out), --sk (sun grows) and --gk (globe in)
     run 0 → 1 with the scroll. */

/* ---------- Section ---------- */
.evt{position:relative;--sun-r:clamp(64px,min(11vw,17vh),168px)}
.evt-hero{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;padding-top:clamp(32px,6vh,72px);min-height:calc(100vh - var(--nav-h));min-height:calc(100svh - var(--nav-h))}
.evt-bg{position:absolute;inset:0;z-index:-2;background:var(--warm)}
.evt-bg::before{content:'';position:absolute;inset:0;background:url(../img/t6.png) center/cover;mix-blend-mode:multiply;opacity:.45}
.evt-copy{position:relative;z-index:3;display:flex;flex-direction:column;align-items:center;text-align:center}

/* ---------- Copy ---------- */
.evt .tagpill::before{background:var(--accent)}
/* the venue, a small callout under the event pill */
.evt-venue{display:inline-flex;align-items:center;gap:7px;margin-top:12px;font:600 11px/1.3 var(--f-label);letter-spacing:.08em;text-transform:uppercase;color:var(--slate)}
.evt-venue svg{width:10px;height:13px;flex:none;fill:none;stroke:var(--accent);stroke-width:1.4}
.evt-hi{margin-top:16px;font:400 15px/1.3 var(--f-body);color:var(--muted)}
.evt-hi[hidden]{display:none}
.evt-h1{margin-top:22px;font-size:clamp(36px,min(4.3vw,6.6vh),58px);line-height:1.22}
.evt-hi:not([hidden]) + .evt-h1{margin-top:8px}
.evt-h1 .g{display:none}
html:not([data-guest]) .evt-h1 .g-any,[data-guest="attended"] .evt-h1 .g-attended,[data-guest="missed"] .evt-h1 .g-missed{display:block}
.evt-copy .lede{margin-top:16px;max-width:620px;font-size:16px;line-height:1.7;text-wrap:balance}

/* ---------- Scene: the marina at sunset, in chalk line. The ticket floats on the water. ---------- */
.evt-scene{position:relative;flex:1 0 auto;display:flex;flex-direction:column;align-items:center;margin-top:calc(var(--sun-r) + clamp(14px,2.4vh,26px));padding-bottom:46px}
.evt-decor{position:absolute;inset:0;z-index:0;pointer-events:none}
.evt-decor svg{position:absolute;overflow:visible;max-width:none}
.evt-decor .ln-k{stroke:rgb(var(--lk) / .5);stroke-width:1.15;fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.evt-decor .ln-s{stroke:rgb(var(--lk) / .28);stroke-width:1;fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round}
.evt-water{left:0;top:0;width:100%;height:100%}
.evt-hz{stroke:rgb(var(--lk) / .55)!important}
/* the sun's reflection: short bars on the water under the sun */
.evt-refl{position:absolute;left:50%;top:0;width:0;height:min(100%,260px)}
.evt-refl i{position:absolute;left:0;top:calc(var(--y) * 1%);width:calc(var(--sun-r) * 2 * var(--w));height:var(--h,3px);transform:translateX(-50%);border-radius:2px;background:var(--accent);opacity:var(--o,.5)}
.evt-masts{left:max(10px,3.5%);bottom:calc(100% - 14px);width:clamp(150px,16vw,240px);height:auto}
.evt-sail{left:9%;top:min(30%,110px);width:clamp(46px,4.2vw,62px);height:auto}
.evt-sail2{left:auto;right:21%;top:min(64%,240px);width:clamp(32px,3vw,46px)}
.evt-palms{right:max(4px,2.5%);bottom:0;height:calc(100% + clamp(150px,28vh,300px));max-height:calc(100% + var(--sun-r) * 2.2);width:auto}
.evt-coord{position:absolute;bottom:16px;font:600 10px/1.3 var(--f-label);letter-spacing:.08em;text-transform:uppercase;color:rgb(var(--lk) / .85)}
.evt-coord-l{left:var(--gutter)}
.evt-coord-r{right:var(--gutter)}

/* ---------- The sun (it becomes the globe) ---------- */
.evt-sun{position:absolute;left:50%;bottom:100%;width:calc(var(--sun-r) * 2);height:var(--sun-r);transform:translateX(-50%);z-index:0;overflow:visible;pointer-events:none;max-width:none}
.evt-sun *{vector-effect:non-scaling-stroke}
.sun-fill{fill:var(--accent);opacity:.62}
.sun-edge{stroke:rgb(var(--lk) / .55);stroke-width:1.2;fill:none}
.sun-halo circle{stroke:rgb(var(--lk) / .26);stroke-width:1;fill:none}
.sun-halo circle+circle{stroke-dasharray:2 7}

/* ---------- The ticket: the guest offer (brand micro asset: tickets and stamps) ---------- */
.evt-offer-wrap{position:relative;z-index:2;display:flex;justify-content:center;padding-top:clamp(26px,5vh,52px)}
.ticket{--notch:11px;--stub:clamp(200px,19vw,236px);position:relative;display:grid;grid-template-columns:var(--stub) minmax(0,1fr);width:min(100%,760px);text-align:left;background:var(--white);border:1px solid var(--line-2);border-radius:14px;box-shadow:0 22px 50px rgba(15,28,27,.09)}
/* perforation: a dashed rule with a half-circle notch at each end */
.ticket::before{content:'';position:absolute;left:var(--stub);top:14px;bottom:14px;border-left:1px dashed var(--line-3)}
.tk-notch{position:absolute;left:calc(var(--stub) - var(--notch));width:calc(var(--notch) * 2);height:calc(var(--notch) * 2);border-radius:50%;background:var(--warm);border:1px solid var(--line-2)}
.tk-notch.t{top:calc(var(--notch) * -1 - 1px);clip-path:inset(50% 0 0 0)}
.tk-notch.b{bottom:calc(var(--notch) * -1 - 1px);clip-path:inset(0 0 50% 0)}
.tk-stub{display:flex;flex-direction:column;padding:20px 22px 18px}
.tk-stub .lab{font-size:10.5px}
.tk-big{margin-top:12px;font:400 clamp(38px,3.4vw,46px)/1 var(--f-display);letter-spacing:-.01em}
.tk-sub{margin-top:6px;font:400 17px/1.2 var(--f-display);color:var(--ink)}
.tk-meta{margin-top:auto;padding-top:14px;font:600 9.5px/1.4 var(--f-label);letter-spacing:.08em;text-transform:uppercase;color:var(--faint)}
.tk-main{display:flex;flex-direction:column;justify-content:center;padding:20px 24px 20px 28px;min-width:0}
.tk-lab{font:500 15px/1.3 var(--f-body);color:var(--ink)}
.tk-note{margin-top:4px;font-size:13.5px;line-height:1.45;color:var(--muted)}
.tk-main .cap-form{width:100%;margin-top:14px}
.tk-main .secondary{margin-top:14px;text-align:left}
.tk-main .secondary::after{text-align:left}
/* the oval "FRAME" stamp, pressed onto the stub */
.tk-stamp{position:absolute;left:calc(var(--stub) - 82px);top:14px;width:64px;height:38px;border:1px solid rgb(var(--lk) / .45);border-radius:50%;display:grid;place-items:center;transform:rotate(-12deg);font:600 8px/1 var(--f-label);letter-spacing:.14em;color:rgb(var(--lk) / .75);pointer-events:none}
.tk-stamp::before{content:'';position:absolute;inset:3px;border:1px solid rgb(var(--lk) / .25);border-radius:50%}

/* scroll cue */
.evt-cue{position:relative;z-index:2;display:inline-flex;flex-direction:column;align-items:center;gap:8px;margin-top:clamp(18px,3.4vh,34px);font:500 13px/1.2 var(--f-body);color:var(--ink);white-space:nowrap}
.evt-cue i{position:relative;width:1px;height:26px;background:rgb(var(--lk) / .35);overflow:hidden}
.evt-cue i::after{content:'';position:absolute;left:-3px;top:0;width:7px;height:7px;border-radius:50%;background:var(--ink)}
.evt-cue span{padding:5px 11px;border-radius:999px;background:rgb(255 255 255 / .75)}

/* ---------- Pinned stage (event.js adds .evt-on) ---------- */
.evt-on{height:calc(100vh - var(--nav-h) + var(--run,125vh))}
.evt-on .evt-stage{position:sticky;top:var(--nav-h);height:calc(100vh - var(--nav-h));height:calc(100svh - var(--nav-h));overflow:hidden}
.evt-on .evt-hero{position:absolute;inset:0;z-index:2;min-height:0}
.evt-on .hero{position:absolute;left:0;right:0;top:0;z-index:1}
.evt-on .evt-copy{opacity:calc(1 - var(--eo,0));transform:translateY(calc(var(--eo,0) * -56px))}
.evt-on .evt-offer-wrap{opacity:calc(1 - var(--tk,0));transform:translateY(calc(var(--tk,0) * -28px)) scale(calc(1 - var(--tk,0) * .03))}
.evt-on .evt-cue{opacity:clamp(0,calc(1 - var(--eo,0) * 3),1)}
.evt-on .evt-bg{opacity:calc(1 - var(--eb,0))}
.evt-on .evt-decor{opacity:calc(1 - var(--es,0))}
.evt-on .evt-water{transform:scaleY(calc(1 - var(--es,0) * .55));transform-origin:top}
.evt-on .evt-masts{transform:translateX(calc(var(--es,0) * -40px))}
.evt-on .evt-sail{transform:translateX(calc(var(--es,0) * -70px))}
.evt-on .evt-sail2{transform:translateX(calc(var(--es,0) * 70px))}
.evt-on .evt-palms{transform:translateY(calc(var(--es,0) * 80px))}
.evt-on .evt-refl{transform:scaleY(calc(1 - var(--es,0)));transform-origin:top}
/* the sun: event.js puts it on the globe's box and scales it down to the horizon (transform);
   as it grows its colour drains, leaving the outline, which hands over to the globe */
.evt-on .evt-sun{transform-origin:0 0}
.evt-on .sun-fill{opacity:calc(.62 * (1 - var(--sk,0)))}
.evt-on .sun-halo{opacity:clamp(0,calc(1 - var(--sk,0) * 2.5),1)}
.evt-on .sun-edge{opacity:calc(1 - var(--gk,0))}
/* the globe follows the scroll here instead of rising on its own */
.js .evt-on .hero .gl{opacity:var(--gk,0);transform:none;transition:none}
/* ...and so does its copy: pill, headline, lede, form and small print rise in turn as you scroll
   (on the homepage they play on a timer, which would jump here). event.js sets --h0..--h4. */
.js .evt-on .hero .tagpill{--t:var(--h0,0)}
.js .evt-on .hero .h1{--t:var(--h1,0)}
.js .evt-on .hero .lede{--t:var(--h2,0)}
.js .evt-on .hero .cap-form,.js .evt-on .hero .cta-row{--t:var(--h3,0)}
.js .evt-on .hero .secondary{--t:var(--h4,0)}
.js .evt-on .hero [data-reveal]{opacity:var(--t);transform:translateY(calc((1 - var(--t)) * 22px));transition:none}
.js .evt-on .hero .h1 .ln>*{transform:translateY(calc((1 - var(--t)) * 108%));transition:none}
.js .evt-on .hero .h1 .ln+.ln>*{transform:translateY(min(108%,calc((1 - var(--t)) * 140%)))}
.evt-on.past .evt-hero{visibility:hidden}
.evt-on.no-cue .evt-cue{visibility:hidden}

/* ---------- Offer bar: stays with guests once they're into the homepage ---------- */
/* it eases up a short way and fades in, rather than jumping in from below the screen */
.evt-offer{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:60;display:flex;align-items:center;gap:12px;max-width:calc(100vw - 24px);padding:6px 6px 6px 14px;border-radius:999px;background:var(--ink);color:var(--paper);box-shadow:0 14px 40px rgba(15,28,27,.22);transform:translate(-50%,14px) scale(.97);opacity:0;visibility:hidden;transition:transform .6s cubic-bezier(.16,1,.3,1),opacity .45s ease,visibility 0s linear .6s}
.evt-offer.show{transform:translate(-50%,0);opacity:1;visibility:visible;transition:transform 1s cubic-bezier(.16,1,.3,1),opacity .7s ease,visibility 0s}
.evt-offer>i{flex:none;width:6px;height:6px;border-radius:50%;background:var(--accent)}
.evt-offer p{font:400 14px/1.25 var(--f-body);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.evt-offer p b{font-weight:500}
.evt-offer .btn{height:34px;padding:0 14px;font-size:14px;flex:none}
.evt-offer .short{display:none}

/* closing band: a line for guests above the form */
.evt-close-note{display:inline-flex;align-items:center;gap:10px;margin-top:22px;padding:7px 14px 7px 10px;border-radius:999px;background:var(--white);border:1px solid var(--line-2);font-size:14px;line-height:1.3;color:var(--ink);text-align:left}
.evt-close-note i{flex:none;width:6px;height:6px;border-radius:50%;background:var(--accent)}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion:no-preference){
  .sun-body{animation:sunset 3.2s cubic-bezier(.3,.6,.2,1) .2s both}
  .evt-refl i{animation:shimmer var(--t,3.4s) ease-in-out var(--dl,0s) infinite alternate}
  .evt-water .drift{animation:drift 14s linear infinite}
  .evt-water .drift.slow{animation-duration:22s;animation-direction:reverse}
  .evt-sail,.evt-sail2{animation:bob 4.6s ease-in-out infinite}
  .evt-sail2{animation-duration:5.4s;animation-delay:-1.8s}
  .evt-masts .mast{transform-box:fill-box;transform-origin:50% 100%;animation:sway 5s ease-in-out infinite alternate}
  .evt-masts .mast:nth-child(2n){animation-duration:6.2s;animation-delay:-2s}
  .evt-masts .mast:nth-child(3n){animation-duration:4.4s;animation-delay:-1s}
  .evt-palms .fronds{transform-box:fill-box;transform-origin:50% 60%;animation:sway 6s ease-in-out infinite alternate}
  .evt-palms .fronds.f2{animation-duration:7.4s;animation-delay:-3s}
  .evt-cue i::after{animation:cue 2.2s ease-in-out infinite}
  .evt-offer.show>i{animation:cblink 2.4s ease-in-out infinite}
  /* Entrance on load: pill, headline, lede, then the ticket (a long fade, a short rise, a hint of
     scale). These are keyframe animations, not the transitions the homepage uses: Safari drops a
     transition that's still in its delay whenever the page restyles around it (the scroll
     sequence does, on load), and the delayed pieces then pop in. An animation keeps running. */
  .js .evt-hero [data-reveal]{opacity:0;transform:none;transition:none}
  .js .evt-hero [data-reveal].in{opacity:1;animation:evt-rise 1.1s cubic-bezier(.22,.61,.36,1) both}
  .js .evt-hero .ticket[data-reveal].in{animation:evt-ticket 1.5s cubic-bezier(.16,1,.3,1) both}
  .js .evt-hero .h1 .ln>*{transform:translateY(108%);transition:none}
  .js .evt-hero .h1.in .ln>*{transform:none;animation:evt-line 1.2s cubic-bezier(.2,.7,.1,1) both}
  /* the order, as plain values (no var() inside animation shorthands, which some Safari versions drop) */
  .js .evt-hero .tagpill.in{animation-delay:.1s}
  .js .evt-hero .evt-venue.in{animation-delay:.16s}
  .js .evt-hero .h1.in .ln:first-child>*{animation-delay:.2s}
  .js .evt-hero .h1.in .ln+.ln>*{animation-delay:.32s}
  .js .evt-hero .lede.in{animation-delay:.5s}
  .js .evt-hero .ticket[data-reveal].in{animation-delay:.6s}
  /* the evening fades in under the copy */
  .js .evt-decor{animation:fadein 1.8s ease .25s both}
  .js .evt-sun{animation:fadein 1.4s ease .1s both}
}
@keyframes sunset{from{transform:translateY(-16%)}to{transform:none}}
@keyframes shimmer{from{transform:translateX(-50%) scaleX(1)}to{transform:translateX(calc(-50% + var(--dx,4px))) scaleX(.82)}}
@keyframes drift{to{stroke-dashoffset:-240}}
@keyframes sway{from{transform:rotate(-1.4deg)}to{transform:rotate(1.4deg)}}
@keyframes cue{0%{transform:translateY(-8px);opacity:0}30%{opacity:1}100%{transform:translateY(30px);opacity:0}}
@keyframes fadein{from{opacity:0}}
@keyframes evt-rise{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes evt-ticket{0%{opacity:0;transform:translateY(18px) scale(.985)}60%{opacity:1}100%{opacity:1;transform:none}}
@keyframes evt-line{from{transform:translateY(108%)}to{transform:none}}

/* ---------- Responsive ---------- */
@media (max-height:780px){
  .evt-copy .lede .more{display:none}
  .tk-note{display:none}
}
@media (max-width:1023px){
  .evt-sail{left:5%}
  .evt-sail2{right:12%}
}
@media (max-width:760px){
  .evt{--sun-r:clamp(52px,min(17vw,9svh),88px)}
  .evt-hero{padding-top:clamp(22px,3.6svh,36px)}
  .evt-venue{margin-top:10px;font-size:10.5px}
  .evt-hi{margin-top:12px;font-size:14px}
  .evt-h1{margin-top:14px;font-size:clamp(30px,8.6vw,40px);line-height:1.18}
  .evt-copy .lede{margin-top:12px;font-size:15px;line-height:1.6}
  .evt-copy .lede .more{display:none}
  .evt-scene{padding-bottom:36px}
  .evt-offer-wrap{padding-top:clamp(18px,3svh,30px)}
  .ticket{--stub:100%;grid-template-columns:1fr}
  .ticket::before{position:relative;inset:auto;grid-row:2;margin:0 16px;border-left:0;border-top:1px dashed var(--line-3)}
  .tk-notch{display:none}
  .tk-stub{display:grid;grid-template-columns:auto 1fr;column-gap:12px;align-items:baseline;padding:14px 16px 12px}
  .tk-stub .lab{grid-column:1/-1}
  .tk-big{margin-top:6px;font-size:36px}
  .tk-sub{font-size:16px}
  .tk-meta,.tk-note{display:none}
  .tk-stamp{left:auto;right:14px;top:12px;width:56px;height:33px;font-size:7px}
  .tk-main{padding:12px 16px 14px}
  .tk-lab{font-size:14px}
  .tk-main .cap-form{margin-top:10px}
  .tk-main .secondary{margin-top:10px;font-size:12.5px}
  .evt-masts{width:clamp(100px,28vw,140px);left:4px}
  .evt-sail{left:auto;right:6%;top:auto;bottom:44px}
  .evt-sail2{display:none}
  .evt-palms{right:-14px;height:calc(100% + var(--sun-r) * .9);max-height:none}
  .evt-coord{bottom:10px;font-size:9px}
  .evt-cue{margin-top:14px;font-size:12px}
  .evt-offer{gap:10px;padding-left:12px}
  .evt-offer .long{display:none}
  .evt-offer .short{display:inline}
}
@media (max-width:520px){
  /* keep the email and button on one line inside the ticket */
  .tk-main .cap-form{flex-direction:row}
  .tk-main .cap-form input{flex:1;width:auto;padding:0 14px}
  .tk-main .cap-form .btn{width:auto;padding:0 14px}
  .tk-main .form-msg{position:absolute;top:calc(100% + 4px)}
  .evt-close-note{font-size:13px}
}
@media (max-width:370px){
  .tk-main .cap-form .btn .lng{display:none}
}
