/* Apple-inspired motion, media, and cinematic layouts */

:root {
  --header-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-distance: 40px;
}

/* Larger Apple-like type scale on home */
.hero--cinematic h1 {
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 14ch;
  font-weight: 500;
}
.section-head--xl h2 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.section--spacious { padding: clamp(5rem, 12vw, 9rem) 0; }

/* Frosted nav */
.site-header {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  border-bottom: 1px solid rgba(11, 31, 58, 0.06);
  transition: background 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 1px 0 rgba(11,31,58,0.06), 0 8px 30px rgba(7,21,38,0.06);
}
.site-header.is-over-dark {
  background: rgba(7, 21, 38, 0.45) !important;
  border-bottom-color: rgba(255,255,255,0.08);
}
.site-header.is-over-dark .logo-word,
.site-header.is-over-dark .nav a:not(.nav-cta) { color: #F4F6F8; }
.site-header.is-over-dark .nav a:not(.nav-cta):hover,
.site-header.is-over-dark .nav a[aria-current="page"] {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.site-header.is-over-dark .nav-toggle { background: transparent; border-color: rgba(255,255,255,0.25); }
.site-header.is-over-dark .nav-toggle span { background: #F4F6F8; }

/* Cinematic hero */
.hero--cinematic {
  position: relative;
  min-height: min(100vh, 980px);
  display: flex;
  align-items: flex-end;
  padding: 0;
  overflow: hidden;
  background: var(--navy-950);
  color: #fff;
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
}
.hero--cinematic::before { display: none; }
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img,
.hero-media picture,
.hero-media picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  will-change: transform;
}
.hero-media.is-loaded img { animation: heroKen 18s var(--ease-out) forwards; }
@keyframes heroKen {
  from { transform: scale(1.12); }
  to { transform: scale(1.0); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(7,21,38,0.35) 0%, rgba(7,21,38,0.55) 40%, rgba(7,21,38,0.92) 100%),
    linear-gradient(90deg, rgba(7,21,38,0.65) 0%, rgba(7,21,38,0.2) 60%, transparent 100%);
  pointer-events: none;
}
.hero--cinematic .hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: clamp(6rem, 14vw, 9rem) 0 clamp(3.5rem, 8vw, 5.5rem);
}
.hero--cinematic .eyebrow { color: var(--gold-400); }
.hero--cinematic h1 { color: #fff; margin-bottom: 1.35rem; }
.hero--cinematic .lead {
  color: rgba(238,241,245,0.85);
  max-width: 38ch;
  margin-bottom: 2rem;
}
.hero--cinematic .btn-secondary,
.hero--cinematic .btn-light {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.28);
}
.hero--cinematic .btn-secondary:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
  border-color: rgba(255,255,255,0.45);
}
.hero--cinematic .hero-meta {
  border-top-color: rgba(255,255,255,0.15);
}
.hero--cinematic .hero-meta dt { color: rgba(184,194,206,0.85); }
.hero--cinematic .hero-meta dd { color: #fff; }

/* Full-bleed image band */
.image-band {
  position: relative;
  min-height: clamp(340px, 48vw, 560px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.image-band__media {
  position: absolute;
  inset: 0;
}
.image-band__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 1.4s var(--ease-out);
  will-change: transform;
}
.image-band.in-view .image-band__media img { transform: scale(1); }
.image-band__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,21,38,0.15), rgba(7,21,38,0.78));
}
.image-band__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.image-band__content h2 { color: #fff; max-width: 16ch; margin-bottom: 0.75rem; }
.image-band__content p { color: rgba(238,241,245,0.85); max-width: 42ch; margin: 0; }

/* Sector photo cards */
.sector-tile--photo {
  position: relative;
  min-height: 280px;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
}
.sector-tile--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 0.8s var(--ease-out);
}
.sector-tile--photo:hover img { transform: scale(1.16); }
.sector-tile--photo .sector-tile__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(7,21,38,0.92));
  z-index: 1;
}
.sector-tile--photo h3 { color: #fff; margin-bottom: 0.3rem; }
.sector-tile--photo p { color: var(--slate-300); font-size: 0.875rem; margin: 0; }
.sector-tile--photo .accent-line {
  width: 28px; height: 2px; background: var(--gold-500); margin-bottom: 0.85rem;
}

/* Horizontal carousel */
.carousel-wrap {
  overflow: hidden;
  margin-top: 2rem;
}
.carousel-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0 1.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 99px; }
.carousel-card {
  flex: 0 0 min(78vw, 380px);
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-900);
  color: #fff;
  position: relative;
  min-height: 320px;
  text-decoration: none;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: #fff;
}
.carousel-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.8s var(--ease-out), opacity 0.35s;
}
.carousel-card:hover img { transform: scale(1.06); opacity: 1; }
.carousel-card__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(7,21,38,0.95));
  z-index: 1;
}
.carousel-card h3 { color: #fff; font-size: 1.2rem; margin-bottom: 0.4rem; }
.carousel-card p { color: var(--slate-300); font-size: 0.9rem; margin: 0; }

/* Sticky scroll storytelling */
.sticky-story {
  position: relative;
  background: var(--navy-950);
  color: #fff;
}
.sticky-story__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  overflow: hidden;
}
.sticky-story__media {
  position: relative;
  height: min(70vh, 560px);
  margin-left: max(1.25rem, calc((100vw - var(--max)) / 2));
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sticky-story__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.2);
  will-change: transform;
}
.sticky-story__copy {
  padding-right: max(1.25rem, calc((100vw - var(--max)) / 2));
  position: relative;
  min-height: 280px;
}
.sticky-step {
  position: absolute;
  inset: 0 auto auto 0;
  max-width: 36ch;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  pointer-events: none;
}
.sticky-step.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sticky-step .eyebrow { color: var(--gold-400); }
.sticky-step h3 {
  color: #fff;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.sticky-step p { color: var(--slate-300); font-size: 1.05rem; }
.sticky-story__spacers { position: relative; }
.sticky-spacer { height: 70vh; }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal-scale.in-view {
  opacity: 1;
  transform: scale(1);
}

/* Page hero with image */
.page-hero--media {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 0;
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
}
.page-hero--media .page-hero__media {
  position: absolute;
  inset: 0;
}
.page-hero--media .page-hero__media img {
  width: 100%; height: 100%; object-fit: cover;
}
.page-hero--media .page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,21,38,0.45), rgba(7,21,38,0.88));
}
.page-hero--media .container {
  position: relative;
  z-index: 1;
  padding: clamp(5rem, 10vw, 7rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

/* Split with photo */
.split-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 360px;
  position: relative;
}
.split-photo img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

/* Parallax helper */
.parallax-slow { will-change: transform; }

@media (max-width: 960px) {
  .sticky-story__pin {
    grid-template-columns: 1fr;
    height: auto;
    position: relative;
    min-height: auto;
    padding: 3rem 0;
    gap: 1.5rem;
  }
  .sticky-story__media {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
    height: 42vh;
  }
  .sticky-story__copy {
    padding: 0 1.25rem 2rem;
    position: relative;
    min-height: 0;
  }
  .sticky-step {
    position: relative;
    opacity: 1;
    transform: none;
    margin-bottom: 2rem;
    pointer-events: auto;
  }
  .sticky-step:not(.is-active) { opacity: 1; }
  .sticky-spacer { display: none; height: 0; }
  .hero--cinematic { min-height: min(88vh, 780px); align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale, .sticky-step, .image-band__media img,
  .hero-media img, .sector-tile--photo img, .carousel-card img {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .sticky-story__pin { position: relative; height: auto; }
  .sticky-spacer { display: none; }
}

.site-header.is-over-dark .nav-cta {
  background: rgba(255,255,255,0.95) !important;
  color: var(--navy-900) !important;
}
.site-header.is-over-dark .nav-cta:hover {
  background: #fff !important;
  color: var(--navy-900) !important;
}
.site-header.is-over-dark .logo-mark {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
  border-radius: 8px;
}
