/* Third Horizon homepage hero, Nov 2026 (v8): ski still, nav, font and scrollbar are set site-wide in thca.css.
   Loaded by index.html only. The site font (Source Serif 4) is set in thca.css. */



/* hero: each image carries its own grade, nothing is laid over it */
.hero { justify-content: center; background: #0C1E3A; }
.hero-media { background: #0C1E3A; }
.hero-media .plate {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  opacity: 0; transform: scale(1.04); transition: opacity 1400ms var(--ez-out), transform 7s cubic-bezier(.16,1,.3,1);
}
.hero.ready .hero-media .plate, html:not(.js) .hero-media .plate { opacity: 1; transform: none; }
.hero-scrim { display: none; }

/* the desktop image is the 16:9 scene with extra sky painted above it (4:3 overall), pinned to the
   bottom edge: a 16:9 screen shows exactly the original frame, squarer screens show more sky,
   and the sides are never cropped */
.hero-media .plate { object-position: 50% 100%; }
@media (min-aspect-ratio: 16/9) { .hero-media .plate { object-position: 50% 55%; } }
/* tablets upright: tall image, a little of the empty snow below the skier may go */
@media (max-aspect-ratio: 5/4) {
  .hero, .hero-media { background: #102D51; }
  .hero-media .plate { inset: auto 0 calc(-1 * min(21vw, max(0px, 177.7vw - 100vh))) 0; height: auto; object-fit: fill; }
}
/* phones: the 9:19.5 image */
@media (max-aspect-ratio: 3/5) {
  .hero, .hero-media { background: #0E2543; }
  .hero-media .plate { bottom: 0; }   /* narrower phones: the image's own deep-navy sky simply continues */
}

/* copy */
.hero-inner { max-width: none; margin: 0; padding: 11vh 6.4vw 0; position: relative; z-index: 2; }
.hero-inner > * { max-width: 40vw; }
@media (min-aspect-ratio: 5/4) and (max-aspect-ratio: 3/2) { .hero-inner { padding-top: 16vh; } }

.hero h1 {
  font-size: clamp(44px, 5.35vw, 104px); line-height: 1.02; margin-top: 0; max-width: none;
  font-weight: 700; letter-spacing: -.012em; text-shadow: 0 2px 18px rgba(7,15,29,.18);
}
.hero h1 .ln { display: block; overflow: hidden; padding: .06em 0 .16em; margin: -.06em 0 -.16em; }
.hero h1 .lt { display: inline-block; transform: translateY(135%); transition: transform 1150ms cubic-bezier(.22,1,.36,1); }
.hero h1 .ln:nth-child(1) .lt { transition-delay: 300ms; }
.hero h1 .ln:nth-child(2) .lt { transition-delay: 530ms; color: var(--orange); }
.hero.go h1 .lt, html:not(.js) .hero h1 .lt { transform: none; }
/* until the script has split the headline into its two masked lines, keep it hidden (no flash) */
html.js .hero h1:not(.is-split) { visibility: hidden; }

.hero-sub { margin-top: clamp(16px, 1.9vw, 34px); font-size: clamp(15px, 1.3vw, 24px); line-height: 1.45; color: #F6F3EC; max-width: min(33vw, 34em); text-shadow: none; }
.hero .hero-actions { margin-top: clamp(22px, 2.6vw, 46px); gap: clamp(12px, 1.5vw, 26px); }
.hero .hero-actions .btn { padding: clamp(13px, 1.05vw, 18px) clamp(20px, 1.7vw, 30px); }

/* entrance: headline lines rise into a mask as whole units, paragraph fades up, buttons follow */
html.js .hero-inner > *, .hero.go .hero-inner > * { opacity: 1; transform: none; transition: none; }
html.js .hero-sub { opacity: 0 !important; transform: translateY(7px) !important; transition: opacity 900ms var(--ez-out) 1150ms, transform 1000ms cubic-bezier(.22,1,.36,1) 1150ms !important; }
.hero.go .hero-sub { opacity: 1 !important; transform: none !important; }
html.js .hero .hero-actions .btn { opacity: 0; transform: translateY(10px); transition: opacity 700ms var(--ez-out), transform 900ms cubic-bezier(.22,1,.36,1), background-color var(--d-1), color var(--d-1), border-color var(--d-1); }
html.js .hero.go .hero-actions .btn { opacity: 1; transform: none; }
.hero.go .hero-actions .btn:nth-child(1) { transition-delay: 1550ms, 1550ms, 0s, 0s, 0s; }
.hero.go .hero-actions .btn:nth-child(2) { transition-delay: 1650ms, 1650ms, 0s, 0s, 0s; }

/* scroll cue */
.hero-cue { position: absolute; z-index: 2; left: 50%; bottom: 4.6vh; width: 40px; height: 22px; margin-left: -20px; color: rgba(253,252,248,.92); opacity: 0; transition: opacity 900ms ease 2300ms; }
.hero.go .hero-cue { opacity: 1; animation: cue 2.6s ease-in-out 3s infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* upright screens: copy in the sky at the top, buttons stacked at half width */
@media (max-aspect-ratio: 5/4) {
  .hero { justify-content: flex-start; }
  .hero-inner { padding: calc(64px + 5vh) 8.3vw 0; }
  .hero-inner > * { max-width: 84vw; }
  .hero h1 { font-size: clamp(38px, 10.4vw, 84px); }
  .hero-sub { font-size: clamp(13px, 3.45vw, 22px); line-height: 1.42; margin-top: clamp(10px, 2.2vw, 22px); max-width: 84vw; }
  .hero .hero-actions { display: grid; grid-template-columns: max-content; gap: 10px; margin-top: clamp(16px, 3.4vw, 30px); }
  .hero .hero-actions .btn { width: 100%; min-width: min(48vw, 340px); justify-content: center; white-space: nowrap; padding: 12px 14px; min-height: 42px; font-size: clamp(10px, 2.6vw, 13px); }
  .hero-cue { bottom: 2.4vh; width: 34px; height: 19px; margin-left: -17px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 .lt, .hero-sub, .hero .hero-actions .btn, .hero-media .plate { transition: none !important; }
  .hero.go .hero-cue { animation: none; }
}
