/* home.css — homepage-only styles (hero, social proof marquee, AEM scroll scene,
   RBP zoom, homepage nav accent), split out of index.css on 2026-09-03.
   Load ONLY on the homepage, after global.css and index.css. Shared components
   remain in global.css + index.css. */

/* Homepage contrast: white/dark over dark sections, then invert when the
   nav theme detector reports a light section behind the fixed navigation. */
body:has(.hero#hero) .nav__cta {
  color: var(--c-dark);
  background: var(--c-white);
  border: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

body:has(.hero#hero) .nav__cta:hover {
  color: var(--c-white);
  background: var(--c-dark);
}

/* At the top of the homepage, give the hero CTA a high-contrast brand hover. */
body:has(.hero#hero) .nav:not(.is-scrolled) .nav__cta:hover {
  color: var(--c-dark);
  background: var(--c-accent-1);
}

body:has(.hero#hero) .nav.nav--on-light .nav__cta {
  color: var(--c-white);
  background: var(--c-dark);
}

body:has(.hero#hero) .nav.nav--on-light .nav__cta:hover {
  color: var(--c-white);
  background: var(--c-medium);
}

body:has(.hero#hero) .nav__cta:focus-visible {
  outline: 3px solid var(--c-accent-1);
  outline-offset: 3px;
}

.hero {
  position: relative;
  height: 300vh;
  background: var(--c-light);
}

.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  padding: 0;
  background: var(--c-light);
}

.hero__frame {
  position: relative;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: var(--c-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 var(--gutter);
}

.hero__title {
  font-family: var(--f-label);
  font-weight: 500;
  font-size: clamp(1.9rem, 7vw, 6rem);
  line-height: .9;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-white);
}

.hero__line {
  display: block;
  width: fit-content;
  margin-inline: auto;
  white-space: nowrap;
  will-change: transform;
}

.hero__sub {
  margin-top: clamp(1rem, 3vh, 2rem);
  font-family: var(--f-label);
  font-weight: 500;
  font-size: clamp(1.5rem, 7vw, 6rem);
  line-height: .9;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-light);
}

.hero__sub-inner {
  display: inline-block;
  transform: scale(0.24);
  transform-origin: center;
}

.hero__sub-line {
  display: block;
  width: fit-content;
  margin-inline: auto;
  white-space: nowrap;
  will-change: transform;
}

.hero__sub-line + .hero__sub-line { margin-top: -0.1em; }

.hero__title, .hero__sub-inner { will-change: transform; }

.hero__scroll {
  position: absolute;
  left: clamp(1.25rem, 3vw, 2.75rem);
  bottom: clamp(1.25rem, 3vw, 2.75rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--c-light);
  font-family: var(--f-body);
  letter-spacing: 0.02em;
  font-size: 0.72rem;
  opacity: 0.85;
  pointer-events: none;
}

.hero__scroll-icon {
  width: 17px;
  height: 17px;
  flex: none;
  animation: heroScrollBob 1.8s ease-in-out infinite;
}

@keyframes heroScrollBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-icon { animation: none; }
}

@media (max-width: 560px) {
  .hero__scroll span { display: none; }
}

@media (max-width: 1020px) {

  .hero { height: auto; }
  .hero__sticky { position: static; height: 62vh; min-height: 380px; }
  .hero__scroll { display: none; }
  /* The hero is the mobile LCP. Do not hold it behind the generic reveal
     observer/transition; desktop keeps the original entrance animation. */
  .hero__title.reveal,
  .hero__sub.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__sub {
    margin-top: 1rem;
    font-family: var(--f-label);
    font-size: clamp(1rem, 4.5vw, 1.25rem);
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-transform: none;
  }
  .hero__sub-inner { transform: none; }
  .hero__sub-line {
    display: inline;
    width: auto;
    margin: 0;
    white-space: normal;
  }
  .hero__sub-line + .hero__sub-line { margin-top: 0; }
  .hero__sub-line + .hero__sub-line::before { content: " "; }
}

.social-proof {
  background: var(--c-light);
  padding: clamp(3rem, 6vh, 5rem) 0;
}

.social-proof__inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;

  padding-left: var(--gutter);
}

.social-proof__label {
  flex: none;
  white-space: nowrap;
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  line-height: 1.7;
  color: var(--c-medium);
}

.marquee {
  flex: 1;
  overflow: hidden;

  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 35s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F7F1E9;
  border-radius: 10px;
  padding: 2rem 2.4rem;
  margin-right: 1.25rem;
  min-width: 200px;
}

.marquee__item img {
  height: 40px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.marquee__item:hover img { filter: none; opacity: 1; }

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

@media (max-width: 760px) {
  .social-proof__inner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .social-proof__label { max-width: none; }
  .marquee { width: 100%; }
}

.aem {
  background: var(--c-light);
  height: 260vh;
}

.aem__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 4vh, 3rem);
  padding-top: 5rem;
  padding-bottom: 6rem;
}

.aem__header {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}

.aem__titles { display: grid; }

.aem__title { grid-area: 1 / 1; margin: 0; }

.aem__title--loop { opacity: 0; }

.aem__intros { display: grid; }

.aem__intro { grid-area: 1 / 1; font-weight: 300; }

.aem__intro--loop { opacity: 0; }

.aem__mobile-phase-head { display: none; }

@media (max-width: 1020px) {

  .aem__titles, .aem__intros { display: block; }
  .aem__title, .aem__intro { grid-area: auto; }
  .aem__title--loop, .aem__intro--loop { opacity: 1; }
  .aem__title--loop { margin-top: 0.5rem; }
  .aem__intro--loop { margin-top: 1.25rem; }
}

.aem__track {
  display: flex;
  width: 200%;
  will-change: transform;
}

.aem__panel { width: 50%; flex: none; }

.aem-rocket {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: auto;
  z-index: 12;
  opacity: 0;
  will-change: transform, opacity;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 18px 42px rgba(24, 15, 20, 0.28));
  pointer-events: none;
}

@media (max-width: 1020px) { .aem-rocket { display: none; } }

.aem__panel-inner {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 1021px) {
  #aem .aem-card__media { height: 230px; }
}

#aem .aem-card.is-open .aem-card__num { color: var(--c-light); }

.aem-infinity-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.aem-map {
  position: relative;
  width: min(840px, 100%);
}

.aem-infinity { width: 100%; height: auto; display: block; }

@media (max-width: 1020px) {
  .aem { height: auto; padding: var(--sec-pad) 0 clamp(2rem, 5vw, 3.5rem); }
  .aem__header { display: none; }
  .aem__sticky { position: static; height: auto; overflow: visible; padding-top: 0; }
  .aem__track { display: block; width: auto; transform: none !important; }
  .aem__panel { width: 100%; }
  .aem__panel + .aem__panel { margin-top: 3rem; }
  .aem__panel-inner { flex-direction: column; }
  .aem__mobile-phase-head { display: block; margin-bottom: clamp(1.25rem, 5vw, 2rem); }
  .aem__mobile-phase-head h2 {
    margin: 0;
    font-family: var(--f-display);
    font-weight: 600;
    font-size: clamp(2rem, 10vw, 3.25rem);
    line-height: 1.02;
    color: var(--c-dark);
  }
  .aem__mobile-phase-head p { margin: 1rem 0 0; max-width: 48ch; font-weight: 300; }
}

@media (max-width: 640px) {
  .aem__header { grid-template-columns: 1fr; align-items: start; }
}

.pf-explore { height: 52px; min-height: 52px; padding: 0 1.4rem; }

/* Homepage portfolio controls: dark resting labels and a dark hover fill
   preserve AA contrast when the requested hover label turns white. */
body:has(.hero#hero) :is(.pf-aem, .pf-explore, .pf-skip) {
  color: var(--c-dark);
}

body:has(.hero#hero) .pf-explore {
  --liquid-fill: var(--c-dark);
  border-color: var(--c-dark);
}

body:has(.hero#hero) :is(.pf-aem, .pf-skip)::before {
  background: var(--c-dark);
}

body:has(.hero#hero) :is(.pf-aem, .pf-explore, .pf-skip):hover {
  color: var(--c-white);
}

body:has(.hero#hero) :is(.pf-aem, .pf-explore, .pf-skip):focus-visible {
  outline: 3px solid var(--c-medium);
  outline-offset: 3px;
}

.offer.is-expanded .offer__row-extra { display: table-row; }

.offer.is-expanded .offer__more-row button::after { content: '  ▴'; }

.offer.is-expanded .offer__table-wrap { overflow: visible; }

.offer.is-expanded .offer__table { overflow: visible; }

.offer.is-expanded .offer__intro {
  position: sticky;
  top: clamp(6rem, 12vh, 8rem);
  align-self: start;
}

.offer.is-expanded .offer__table thead th {
  position: sticky;
  top: clamp(6rem, 12vh, 8rem);
  z-index: 4;
  background: var(--c-light);
}

.offer.is-expanded .offer__table thead th:last-child { background: var(--c-dark); }

.offer.is-expanded .offer__more-row td {
  position: sticky;
  bottom: var(--offer-total-h, 3.6rem);
  z-index: 3;
  background: var(--c-light) !important;
}

.offer.is-expanded .offer__table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: var(--c-light);
}

.offer.is-expanded .offer__table tfoot td:last-child { background: var(--c-dark); }

.train-stack { position: relative; }

.rbp {
  position: sticky;
  top: 0;
  padding: 0;
  background: var(--c-medium);
}

.rbp__frame {
  background: transparent;
  border-radius: 0;
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

.rbp__content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rbp__serif {
  font-family: var(--f-body);
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.rbp__body {
  margin-top: 1.5rem;
  max-width: 52ch;
  font-size: 1.1rem;
  font-weight: 300;
}

.rbp__mobile-report { display: none; }

@media (max-width: 1020px) {

  .rbp { position: static; }
}

.rbpz {
  position: relative;
  z-index: 1;
  height: 260vh;
  background: var(--c-light);
}

.rbpz__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--c-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rbpz__bg {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;

  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 26%, #000 80%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 26%, #000 80%, transparent 100%);
}

.rbpz__svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

.rbpz__intro,
.rbpz__love {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  margin: 0;
  padding-inline: var(--gutter);
  text-align: center;
  font-family: var(--f-body);
  font-weight: 500;
}

.rbpz__intro {
  top: clamp(13vh, 16vh, 20vh);
  max-width: 44ch;
  margin-inline: auto;
  font-size: clamp(1rem, 2vw, 1.5rem);
  line-height: 1.2;
  color: var(--c-primary);
}

.rbpz__love {
  bottom: clamp(7vh, 10vh, 13vh);
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  color: var(--c-medium);
}

.rbpz__word {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 620px;
  letter-spacing: -0.02em;
  fill: var(--c-medium);

}

.rbpz__banner {
  position: absolute;
  inset: 0;
  background: var(--c-medium);
  opacity: 0;
  will-change: opacity;
}

.rbpz__paper {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: min(72vw, 840px);
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  filter: drop-shadow(0 32px 42px rgba(7, 12, 18, .38));
}

.rbpz__paper-surface { display: flex; flex-direction: column; align-items: center; isolation: isolate; transform-style: preserve-3d; }

.rbpz__paper img { display: block; height: auto; user-select: none; -webkit-user-drag: none; will-change: transform; }

.rbpz__paper-head { position: relative; z-index: 1; width: 100%; border-radius: 12px 12px 2px 2px; box-shadow: 0 12px 26px rgba(7, 12, 18, .2); }

.rbpz__paper-head-image { width: 100%; border-radius: inherit; }

.rbpz__paper-turtle { position: absolute; top: 24%; right: 7%; z-index: 3; width: 20.6%; transform-origin: 52% 54%; animation: rbp-turtle-swim 6.4s ease-in-out infinite; filter: drop-shadow(0 8px 9px rgba(0, 12, 22, .2)); }

@keyframes rbp-turtle-swim {
  0%, 100% { transform: translate3d(-3px, 2px, 0) rotate(-.7deg) scale(1); }
  35% { transform: translate3d(3px, -4px, 0) rotate(.8deg) scale(1.008); }
  68% { transform: translate3d(6px, 1px, 0) rotate(-.2deg) scale(1.003); }
}

.rbpz__paper-body { position: relative; z-index: 2; width: 92%; margin-top: calc(-1 * var(--rbp-head-overlap, 0px)); border-radius: 2px 2px 12px 12px; box-shadow: 0 22px 34px rgba(7, 12, 18, .24); }

.train-stack {
  z-index: 2;
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .rbpz { height: 100vh; }
  .rbpz__paper {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(.82);
    transform-style: flat;
  }
  .rbpz__paper-head,
  .rbpz__paper-body { transform: none !important; }
  .rbpz__paper-turtle { animation: none; }
  .train-stack { margin-top: 0; }
}

@media (max-width: 767px), (max-width: 1020px) and (pointer: coarse) {
  .rbpz__stage { height: clamp(300px, 88svw, 390px); min-height: 300px; }
  #rbpzPaper.rbpz__paper { display: none !important; visibility: hidden !important; }
  .rbpz__intro { top: clamp(2rem, 8vw, 3rem); font-size: clamp(0.95rem, 4.5vw, 1.1rem); }
  .rbpz__love { bottom: clamp(1.75rem, 7vw, 2.5rem); font-size: clamp(1rem, 4.7vw, 1.15rem); }
  .rbp__frame { padding: clamp(2.75rem, 12vw, 4rem) 0 clamp(4rem, 16vw, 5.5rem); }
  .rbp__mobile-report {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: min(100%, 560px);
    margin: 0 auto clamp(2rem, 9vw, 3rem);
    filter: drop-shadow(0 22px 30px rgba(7, 12, 18, .32));
  }
  .rbp__mobile-report-head { position: relative; z-index: 1; width: 100%; border-radius: 9px 9px 2px 2px; overflow: hidden; }
  .rbp__mobile-report-head-image,
  .rbp__mobile-report-body { display: block; height: auto; user-select: none; -webkit-user-drag: none; }
  .rbp__mobile-report-head-image { width: 100%; }
  .rbp__mobile-report-turtle {
    position: absolute;
    top: 24%;
    right: 7%;
    z-index: 2;
    display: block;
    width: 20.6%;
    height: auto;
    animation: rbp-turtle-swim 6.4s ease-in-out infinite;
    filter: drop-shadow(0 6px 7px rgba(0, 12, 22, .2));
  }
  .rbp__mobile-report-body { position: relative; z-index: 2; width: 92%; margin-top: -2.75%; border-radius: 2px 2px 9px 9px; }
  .rbp__content > h2 { max-width: 9ch; font-size: clamp(2.25rem, 11.5vw, 3.35rem); line-height: 0.96; }
  .rbp__body { margin-top: 1.25rem; max-width: 34ch; font-size: 1rem; line-height: 1.6; }
}

@media (max-width: 1020px) {

  .rbpz { height: auto; }
  .rbpz__stage { position: relative; height: clamp(360px, 76vw, 560px); }
  .rbpz__intro { top: 6vh; }
  .rbpz__love { bottom: 6vh; }
  .rbpz__banner { display: none; }
  .rbpz__paper { display: block; width: min(90vw, 620px); opacity: 1; transform: translate(-50%, -50%); transform-style: flat; }
  .rbpz__paper-surface { transform-style: flat; }
  .rbpz__paper-head, .rbpz__paper-body { transform: none !important; }
  .rbpz__paper-body { margin-top: -2.75%; }
  .train-stack { margin-top: 0; }
}

/* Keep the native-phone overrides after the tablet fallback so the old
   absolute report cannot be turned back on by source order. */
@media (max-width: 767px), (max-width: 1020px) and (pointer: coarse) {
  .rbpz__stage { height: clamp(300px, 88svw, 390px); min-height: 300px; }
  #rbpzPaper.rbpz__paper { display: none !important; visibility: hidden !important; }
  .rbpz__word { font-size: 500px; }
  .rbpz__intro { top: clamp(2rem, 8vw, 3rem); }
  .rbpz__love { bottom: clamp(1.75rem, 7vw, 2.5rem); }
}

.rbpsheet__form { margin-top: clamp(1.25rem, 3vw, 1.75rem); display: flex; flex-direction: column; gap: 1.15rem; }

.rbpsheet__form[hidden] { display: none; }

.rbpsheet__done[hidden] { display: none; }

.nl__form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }

.nl__done { padding: 0.5rem 0; }

@media (max-width: 520px) { .nl__form { grid-template-columns: 1fr; } }

/* Final native-phone RBP guard. */
@media (max-width: 767px), (max-width: 1020px) and (pointer: coarse) {
  #rbpzPaper.rbpz__paper { display: none !important; visibility: hidden !important; }
  .rbp .rbp__mobile-report { display: flex !important; flex-direction: column !important; align-items: center !important; width: calc(100vw - 40px) !important; max-width: 560px !important; margin: 0 auto clamp(2rem, 9vw, 3rem) !important; padding: 0 !important; overflow: visible !important; isolation: isolate; }
  .rbp .rbp__mobile-report-head { position: relative !important; z-index: 1; display: block !important; width: 100% !important; margin: 0 !important; line-height: 0; overflow: hidden; border-radius: 9px 9px 2px 2px; }
  .rbp .rbp__mobile-report-head-image { display: block !important; width: 100% !important; max-width: none !important; height: auto !important; margin: 0 !important; transform: none !important; }
  .rbp .rbp__mobile-report-body { position: relative !important; z-index: 2; display: block !important; width: 92% !important; max-width: none !important; height: auto !important; margin: -2.75% auto 0 !important; transform: none !important; border-radius: 2px 2px 9px 9px; }
  .rbp .rbp__mobile-report-turtle { position: absolute !important; top: 24% !important; right: 7% !important; z-index: 3; display: block !important; width: 20.6% !important; height: auto !important; margin: 0 !important; animation: none !important; transform: none !important; }
}
