/* ---------- HERO START: CSS ---------- */
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; background: #FFFFFF; color: #4A5A50; }

.eya-hero { --loop: 15s; max-width: 1200px; margin: 0 auto; padding: 88px 24px 96px; display: flex; flex-direction: column; gap: 24px; }
.eya-pill { align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: #D4A325; color: #14301F; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.eya-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The stage: words play here, then the photo takes the same space */
.eya-stage { position: relative; width: 100%; aspect-ratio: 2128 / 560; min-height: 260px; border-radius: 24px; overflow: hidden; background: #F7F7F5; }
.eya-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; animation: eya-photo-in 1.7s cubic-bezier(.7,0,.2,1) calc(var(--loop) * .86) both; }
/* The photo is visible by default; the animation only hides it until its moment.
   If animations are blocked anywhere, the photo still shows. */
/* Transition: the photo opens outward from where "EYA" sits, like a window,
   while settling from a slight zoom. */
@keyframes eya-photo-in {
  from { clip-path: circle(0% at 15% 50%); transform: scale(1.12); }
  60%  { transform: scale(1.04); }
  to   { clip-path: circle(150% at 15% 50%); transform: none; }
}

.eya-rotator { position: absolute; inset: 0; margin: 0; padding: 0 clamp(24px, 5vw, 64px); display: grid; align-items: center; font-size: clamp(2.2rem, 6vw, 4.75rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; color: #14301F; }
.eya-rotator > .ph { grid-area: 1 / 1; padding-bottom: .1em; }
.eya-rotator .w { display: inline-block; opacity: 0; transform: translateY(.45em); animation: var(--loop) cubic-bezier(.2,.75,.2,1) calc(var(--i, 0) * 90ms) 1 both; }
.eya-rotator .p1 .w { animation-name: eya-p1; }
.eya-rotator .p2 .w { animation-name: eya-p2; }
.eya-rotator .p3 .w { animation-name: eya-p3; }
.eya-rotator .p4 .w { animation-name: eya-p4; }
.eya-rotator .p5 .w { animation-name: eya-p5; }
.eya-rotator .p6 .w { animation-name: eya-p6; }
@keyframes eya-p1 { 0% {opacity:0; transform:translateY(.45em)} 2%,10% {opacity:1; transform:none} 12%,100% {opacity:0; transform:translateY(-.3em)} }
@keyframes eya-p2 { 0%,12% {opacity:0; transform:translateY(.45em)} 14%,22% {opacity:1; transform:none} 24%,100% {opacity:0; transform:translateY(-.3em)} }
@keyframes eya-p3 { 0%,24% {opacity:0; transform:translateY(.45em)} 26%,34% {opacity:1; transform:none} 36%,100% {opacity:0; transform:translateY(-.3em)} }
@keyframes eya-p4 { 0%,36% {opacity:0; transform:translateY(.45em)} 38%,46% {opacity:1; transform:none} 48%,100% {opacity:0; transform:translateY(-.3em)} }
@keyframes eya-p5 { 0%,48% {opacity:0; transform:translateY(.45em)} 50%,58% {opacity:1; transform:none} 60%,100% {opacity:0; transform:translateY(-.3em)} }
@keyframes eya-p6 { 0%,60% {opacity:0; transform:translateY(.45em)} 62%,86% {opacity:1; transform:none} 93%,100% {opacity:0; transform:scale(1.25)} }

/* E gold, Y green, A pink; the rest of each word folds away */
.eya-rotator .init { display: inline-block; animation: var(--loop) linear 1 both; }
.eya-rotator .i-e { animation-name: eya-col-e; }
.eya-rotator .i-y { animation-name: eya-col-y, eya-space; }
.eya-rotator .i-a { animation-name: eya-col-a, eya-space; }
@keyframes eya-col-e { 0%,68% {color:#14301F} 71%,100% {color:#D4A325} }
@keyframes eya-col-y { 0%,68% {color:#14301F} 71%,100% {color:#368700} }
@keyframes eya-col-a { 0%,68% {color:#14301F} 71%,100% {color:#D6249F} }
/* After the fold: a little breathing room between E, Y, A ... */
@keyframes eya-space { 0%,76% {margin-left:0} 82%,100% {margin-left:.06em} }
/* ...and EYA grows slightly so it reads as the hero moment */
.eya-rotator .p6 { transform-origin: left center; animation: eya-grow var(--loop) cubic-bezier(.65,0,.35,1) 1 both; }
@keyframes eya-grow { 0%,76% {transform:none} 83%,100% {transform:scale(1.35)} }
/* padding + negative margin keep descenders (the "g" in Young) from being clipped */
.eya-rotator .rest { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: pre; max-width: 7em; padding-bottom: .22em; margin-bottom: -.22em; animation: eya-fold var(--loop) cubic-bezier(.65,0,.35,1) 1 both; }
@keyframes eya-fold { 0%,71% {max-width:7em; opacity:1} 76% {opacity:0} 79%,100% {max-width:0; opacity:0} }

/* Progress bar + pause button under the stage; they tidy away at the end */
.eya-steps { display: flex; align-items: center; gap: 8px; animation: eya-done .6s ease calc(var(--loop) + .2s) forwards; }
.eya-steps i { display: block; width: 40px; height: 4px; border-radius: 99px; background: #E5E7E2; overflow: hidden; position: relative; }
.eya-steps i::after { content: ""; position: absolute; inset: 0; background: #D4A325; transform: scaleX(0); transform-origin: left; animation: var(--loop) linear 1 both; }
.eya-steps i:nth-child(1)::after { animation-name: eya-s1; }
.eya-steps i:nth-child(2)::after { animation-name: eya-s2; }
.eya-steps i:nth-child(3)::after { animation-name: eya-s3; }
.eya-steps i:nth-child(4)::after { animation-name: eya-s4; }
.eya-steps i:nth-child(5)::after { animation-name: eya-s5; }
@keyframes eya-s1 { 0% {transform:scaleX(0)} 12%,100% {transform:scaleX(1)} }
@keyframes eya-s2 { 0%,12% {transform:scaleX(0)} 24%,100% {transform:scaleX(1)} }
@keyframes eya-s3 { 0%,24% {transform:scaleX(0)} 36%,100% {transform:scaleX(1)} }
@keyframes eya-s4 { 0%,36% {transform:scaleX(0)} 48%,100% {transform:scaleX(1)} }
@keyframes eya-s5 { 0%,48% {transform:scaleX(0)} 90%,100% {transform:scaleX(1)} }
@keyframes eya-done { to { opacity: 0; visibility: hidden; } }

.eya-pause { margin-left: 8px; width: 32px; height: 32px; border-radius: 999px; border: 1px solid #CBD3C7; background: #FFFFFF; color: #14301F; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.eya-pause:hover { border-color: #14301F; }
.eya-pause:focus-visible { outline: 3px solid #14301F; outline-offset: 2px; }
.eya-pause .play { display: none; }
.eya-hero.is-paused .eya-pause .play { display: block; }
.eya-hero.is-paused .eya-pause .pause { display: none; }
.eya-hero.is-paused .eya-stage .ph, .eya-hero.is-paused .eya-stage *, .eya-hero.is-paused .eya-steps, .eya-hero.is-paused .eya-steps i::after { animation-play-state: paused !important; }

.eya-tagline { margin: 24px 0 0; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: #14301F; }
.eya-lead { margin: 0; max-width: 640px; font-size: 19px; line-height: 1.65; color: #4A5A50; }
.eya-btns { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.eya-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; font-size: 16px; font-weight: 700; text-decoration: none; transition: transform .25s ease, background-color .25s ease, box-shadow .25s ease; }
.eya-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20,48,31,.12); }
.eya-btn:focus-visible { outline: 3px solid #14301F; outline-offset: 3px; }
.eya-btn--gold { background: #D4A325; color: #14301F; }
.eya-btn--gold:hover { background: #C4951D; }
.eya-btn--gold svg { transition: transform .25s ease; }
.eya-btn--gold:hover svg { transform: translateX(4px); }
.eya-btn--outline { border: 1.5px solid #14301F; color: #14301F; font-weight: 600; }

/* Entrance on page load */
.eya-in { opacity: 0; transform: translateY(16px); animation: eya-in .8s cubic-bezier(.2,.7,.2,1) forwards; }
.eya-in.d1 { animation-delay: .05s; } .eya-in.d2 { animation-delay: .15s; } .eya-in.d4 { animation-delay: .45s; } .eya-in.d5 { animation-delay: .6s; }
@keyframes eya-in { to { opacity: 1; transform: none; } }
.eya-steps.eya-in { animation: eya-in .8s cubic-bezier(.2,.7,.2,1) .3s forwards, eya-done .6s ease calc(var(--loop) + .2s) forwards; }

/* Reduced motion: no animation, show the photo straight away */
@media (prefers-reduced-motion: reduce) {
  .eya-hero *, .eya-hero *::after { animation: none !important; }
  .eya-in, .eya-photo { opacity: 1; transform: none; }
  .eya-rotator, .eya-steps { display: none; }
}
/* (1) PLAY ONCE PER VISIT: if the visitor already saw it this visit,
   skip straight to the finished state (photo showing). */
.eya-hero.eya-seen .eya-stage *, .eya-hero.eya-seen .eya-stage, .eya-hero.eya-seen .eya-in { animation: none !important; }
.eya-hero.eya-seen .eya-in, .eya-hero.eya-seen .eya-photo, .eya-hero.eya-seen .eya-caption { opacity: 1; transform: none; clip-path: none; }
.eya-hero.eya-seen .eya-rotator, .eya-hero.eya-seen .eya-steps { display: none; }

/* (2) PHOTO CAPTION: small pill that appears once the photo is revealed */
.eya-caption { position: absolute; left: 20px; bottom: 20px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.92); color: #14301F; font-size: 13px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 4px 14px rgba(20,48,31,.12); opacity: 0; transform: translateY(8px); animation: eya-cap-in .6s cubic-bezier(.2,.75,.2,1) calc(var(--loop) * .86 + 1.4s) forwards; }
.eya-caption::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: #D4A325; }
@keyframes eya-cap-in { to { opacity: 1; transform: none; } }
.eya-hero.is-paused .eya-caption { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .eya-caption { opacity: 1; transform: none; } }
/* ---------- HERO END: CSS ---------- */
