/*
 * KeepMyBooking - Cinematic film section
 * Vanilla port of the scroll-driven hero; phone plays the KeepMyBooking ad.
 */

.gsap-reveal {
  visibility: hidden;
}

.cinematic-pin-space {
  /* Sticky runway for one phone scene (desktop) */
  height: 2800px;
  position: relative;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
}

/* Mobile: normal document flow, no long sticky runway */
@media (max-width: 899px) {
  .cinematic-pin-space {
    height: auto;
    /* Avoid browser scroll-anchoring jumps when the video paints / plays */
    overflow-anchor: none;
  }

  .cinematic-hero,
  .cinematic-hero--sticky {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 2.5rem 0 3rem;
    overflow-anchor: none;
  }

  .gsap-reveal {
    visibility: visible;
  }

  .cinematic-hero__stage {
    position: relative;
    inset: auto;
    min-height: 0;
  }

  .cinematic-hero .main-card {
    width: min(94vw, 520px);
    height: auto;
    min-height: 0;
    margin: 0 auto;
  }

  .cinematic-hero__card-grid--desktop-copy .cinematic-hero__phone {
    /* Keep a stable box so poster -> video does not reflow the page */
    width: min(72vw, 280px);
    max-height: none;
    aspect-ratio: 220 / 460;
  }
}

.cinematic-hero {
  position: relative;
  top: 0;
  width: 100%;
  /* svh: stable when mobile browser chrome toggles (avoid dvh reflow) */
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #faf9fc;
  color: #0a0618;
  font-family: var(--sans, 'Inter Tight', system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  perspective: 1500px;
}

.cinematic-hero--sticky {
  position: sticky;
  top: 0;
  width: 100%;
  flex-shrink: 0;
}

.cinematic-hero__grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
}

.cinematic-hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-size: 60px 60px;
  background-image:
    linear-gradient(to right, rgba(10, 6, 24, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 6, 24, 0.05) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.cinematic-hero .text-3d-matte {
  color: #0a0618;
  text-shadow:
    0 10px 30px rgba(10, 6, 24, 0.18),
    0 2px 4px rgba(10, 6, 24, 0.08);
}

.cinematic-hero .text-silver-matte {
  background: linear-gradient(180deg, #0a0618 0%, rgba(75, 0, 130, 0.55) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: translateZ(0);
  filter:
    drop-shadow(0px 10px 20px rgba(10, 6, 24, 0.12))
    drop-shadow(0px 2px 4px rgba(10, 6, 24, 0.08));
}

.cinematic-hero .text-card-silver-matte {
  background: linear-gradient(180deg, #ffffff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: translateZ(0);
  filter:
    drop-shadow(0px 12px 24px rgba(0, 0, 0, 0.8))
    drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.6));
}

.cinematic-hero .premium-depth-card {
  background: linear-gradient(145deg, #2a1050 0%, #0a0618 55%, #1a0528 100%);
  box-shadow:
    0 40px 100px -20px rgba(0, 0, 0, 0.9),
    0 20px 40px -20px rgba(0, 0, 0, 0.8),
    inset 0 1px 2px rgba(255, 255, 255, 0.18),
    inset 0 -2px 4px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.cinematic-hero .card-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 50;
  background: radial-gradient(
    800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(147, 51, 234, 0.12) 0%,
    transparent 40%
  );
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
}

/* Same chassis as site hero / how-it-works (.phone-device + phone-frame.svg) */
.cinematic-hero .phone-device.cinematic-hero__phone {
  background: linear-gradient(155deg, #2b2b2b 0%, #1a1a1a 42%, #0d0d0d 100%);
  border-radius: 22px;
  padding: 6px;
  box-shadow:
    0 2px 6px rgba(10, 6, 24, 0.12),
    0 20px 48px -8px rgba(10, 6, 24, 0.45),
    0 40px 80px -16px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: visible;
}

.cinematic-hero .screen-glare {
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 45%);
}

.cinematic-hero .floating-ui-badge {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    inset 0 -1px 1px rgba(0, 0, 0, 0.5);
}

.cinematic-hero__intro {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 0 1rem;
  will-change: transform;
  transform-style: preserve-3d;
}

.cinematic-hero__intro h2 {
  font-size: clamp(1.85rem, 5.5vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.35rem;
}

.cinematic-hero__intro h2.cinematic-hero__line-2 {
  font-weight: 800;
  letter-spacing: -0.05em;
}

.cinematic-hero__cta {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 42rem;
  padding: 0 1.25rem;
  pointer-events: auto;
  will-change: transform;
}

.cinematic-hero__cta h2 {
  font-size: clamp(1.75rem, 4.5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.cinematic-hero__cta p {
  color: #4a4458;
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  margin-bottom: 1.75rem;
  max-width: 34rem;
  font-weight: 400;
  line-height: 1.65;
}

.cinematic-hero__cta-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.cinematic-hero__cta-row.store-badges {
  animation: none;
  /* .store-badges starts at opacity 0 for its entrance animation, which is off here */
  opacity: 1;
  /* The web-app link sits on its own line under the badges */
  flex-wrap: wrap;
}

.cinematic-hero__cta-row .store-badge-link {
  display: inline-flex;
  line-height: 0;
  transition: transform 0.25s ease;
}

.cinematic-hero__cta-row .store-badge-link:hover {
  transform: translateY(-3px);
}

.cinematic-hero__cta-row .store-badge-link:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 3px;
  border-radius: 8px;
}

.cinematic-hero__cta-row .store-badge-link img {
  display: block;
  width: auto;
  height: clamp(44px, 7vw, 56px);
}

.cinematic-hero__stage {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  perspective: 1500px;
}

.cinematic-hero .main-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  width: min(96vw, 1400px);
  height: min(92svh, 900px);
  border-radius: clamp(18px, 2.5vw, 36px);
}

.cinematic-hero__card-grid {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(0.75rem, 2vw, 1.5rem) clamp(0.75rem, 2.5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(0.5rem, 1.5vh, 1.25rem);
  z-index: 10;
}

.cinematic-hero__card-grid--desktop-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.5rem, 1.5vw, 1.25rem);
}

.cinematic-hero__card-grid--desktop-copy .cinematic-hero__mockup-wrap {
  max-width: none;
  width: auto;
  height: auto;
  order: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  transform: none !important;
}

.cinematic-hero__card-grid--desktop-copy > * {
  order: 0;
}

.cinematic-hero__card-grid--desktop-copy .cinematic-hero__phone {
  width: min(72vw, calc(58svh * 220 / 460), 280px);
  max-height: min(58svh, 520px);
  border-radius: 22px;
}

/* Mobile summary: desktop flanking copy condensed */
.cinematic-hero__mobile-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 22rem;
  padding: 0 0.75rem;
  z-index: 20;
}

.cinematic-hero__mobile-title {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.cinematic-hero__mobile-lead {
  margin: 0.45rem 0 0;
  color: rgba(237, 233, 254, 0.78);
  font-size: clamp(0.82rem, 3.2vw, 0.95rem);
  line-height: 1.45;
  max-width: 19rem;
}

/* Flanking copy: desktop only */
.cinematic-hero__side {
  display: none;
  flex-direction: column;
  justify-content: center;
  z-index: 20;
  max-width: 26rem;
  /* Keep GSAP from shifting columns with leftover transforms */
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.cinematic-hero__side--intro {
  text-align: right;
}

.cinematic-hero__side--cta {
  text-align: left;
  position: relative;
}

.cinematic-hero__side-line {
  font-size: clamp(1.85rem, 3.1vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 0;
}

.cinematic-hero__side-line--accent {
  margin-top: 0.15rem;
}

.cinematic-hero__side-heading {
  font-size: clamp(1.85rem, 3.1vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 0 0 1rem;
}

.cinematic-hero__side-copy {
  color: rgba(237, 233, 254, 0.72);
  font-size: clamp(0.88rem, 1.05vw, 1.02rem);
  line-height: 1.55;
  margin: 0 0 1.1rem;
}

.cinematic-hero__side .cinematic-hero__cta-row {
  justify-content: flex-start;
  margin-top: 1.15rem;
}

.cinematic-hero__side .store-badge-link img {
  height: clamp(44px, 4.8vw, 56px);
}

@media (min-width: 900px) {
  .cinematic-hero__card-grid--desktop-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    justify-items: stretch;
    column-gap: clamp(1.5rem, 3.5vw, 3.5rem);
    padding-inline: clamp(1.25rem, 3.5vw, 3.25rem);
  }

  .cinematic-hero__mobile-copy {
    display: none;
  }

  .cinematic-hero__card-grid--desktop-copy .cinematic-hero__mockup-wrap {
    gap: 0;
  }

  .cinematic-hero__side {
    display: flex;
    width: 100%;
    min-height: 0;
    align-self: center;
    justify-content: center;
  }

  .cinematic-hero__side--intro {
    justify-self: stretch;
    align-items: flex-end;
  }

  .cinematic-hero__side--cta {
    justify-self: stretch;
    align-items: flex-start;
  }

  /* Keep headlines vertically aligned with the left; badges sit below without shifting text */
  .cinematic-hero__side--cta .cinematic-hero__cta-row {
    position: absolute;
    left: 0;
    top: calc(50% + 3.25rem);
    margin-top: 0;
    width: 100%;
  }

  .cinematic-hero__card-grid--desktop-copy .cinematic-hero__phone {
    width: min(34vw, calc(74svh * 220 / 460), 320px);
    max-height: min(74svh, 680px);
  }
}

.cinematic-hero__brand {
  order: 1;
  display: flex;
  justify-content: center;
  z-index: 20;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 1100px) {
  .cinematic-hero__brand {
    order: 3;
    justify-content: flex-end;
  }
}

.cinematic-hero__brand h3 {
  font-size: clamp(1.35rem, 3.8vw + 0.4rem, 4.75rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  line-height: 0.95;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (min-width: 1100px) {
  .cinematic-hero__brand h3 {
    text-align: right;
  }
}

.cinematic-hero__mockup-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  perspective: 1000px;
}

.cinematic-hero__phone-cluster {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.cinematic-hero__phone {
  position: relative;
  width: clamp(148px, 34vw, 260px);
  aspect-ratio: 220 / 460;
  height: auto;
  max-height: min(52svh, 540px);
  box-sizing: border-box;
  will-change: transform;
  transform-style: preserve-3d;
}

@media (min-width: 1100px) {
  .cinematic-hero__phone {
    width: clamp(200px, 18vw, 280px);
    max-height: min(64svh, 580px);
  }
}

.cinematic-hero__phone .phone-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.cinematic-hero__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  color: #fff;
  z-index: 10;
  isolation: isolate;
}

.cinematic-hero__screen .screen-glare {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  border-radius: inherit;
}

.cinematic-hero__video {
  position: absolute;
  /* 1px bleed kills subpixel hairlines at rounded corners */
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  max-width: none;
  object-fit: cover;
  object-position: center center;
  background: #000;
  display: block;
  border: 0;
  outline: none;
}

.cinematic-hero__sound {
  position: absolute;
  bottom: 0.85rem;
  right: 0.75rem;
  z-index: 45;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
}

.cinematic-hero__sound:hover {
  background: rgba(75, 0, 130, 0.75);
}

.cinematic-hero__sound:focus-visible {
  outline: 2px solid #c4b5fd;
  outline-offset: 2px;
}

.cinematic-hero__sound svg {
  width: 1.1rem;
  height: 1.1rem;
}

.cinematic-hero__sound[aria-pressed="false"] .icon-sound,
.cinematic-hero__sound[aria-pressed="true"] .icon-muted {
  display: none;
}

.cinematic-hero__sound[aria-pressed="false"] .icon-muted,
.cinematic-hero__sound[aria-pressed="true"] .icon-sound {
  display: block;
}

.cinematic-hero__copy {
  order: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  z-index: 20;
  width: 100%;
  padding: 0 0.5rem;
  max-width: 28rem;
}

@media (min-width: 1100px) {
  .cinematic-hero__copy {
    order: 1;
    text-align: left;
    padding: 0;
    max-width: none;
  }
}

.cinematic-hero__copy h3 {
  color: #fff;
  font-size: clamp(1.1rem, 2vw + 0.4rem, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

@media (min-width: 1100px) {
  .cinematic-hero__copy h3 {
    margin-bottom: 0.9rem;
  }
}

.cinematic-hero__copy p {
  display: none;
  color: rgba(237, 233, 254, 0.72);
  font-size: clamp(0.85rem, 1.2vw, 1.05rem);
  font-weight: 400;
  line-height: 1.6;
}

@media (min-width: 700px) {
  .cinematic-hero__copy p {
    display: block;
    margin: 0 auto;
  }
}

@media (min-width: 1100px) {
  .cinematic-hero__copy p {
    margin: 0;
  }
}

/* Badges: stacked above/below phone on small screens; flanks on desktop */
.cinematic-hero__badge {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  z-index: 30;
  border-radius: 0.9rem;
  padding: 0.55rem 0.8rem;
  width: min(100%, 220px);
  flex-shrink: 0;
}

@media (min-width: 1100px) {
  .cinematic-hero__badge {
    width: auto;
    max-width: 200px;
    gap: 0.75rem;
    border-radius: 1.1rem;
    padding: 0.85rem 1rem;
  }

  .cinematic-hero__badge--booking {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    margin-bottom: 12%;
  }

  .cinematic-hero__badge--payout {
    grid-column: 3;
    grid-row: 3;
    align-self: start;
    justify-self: start;
    margin-top: 12%;
  }
}

.cinematic-hero__badge-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196, 181, 253, 0.35);
  background: linear-gradient(180deg, rgba(147, 51, 234, 0.25) 0%, rgba(75, 0, 130, 0.12) 100%);
  flex-shrink: 0;
}

@media (min-width: 1100px) {
  .cinematic-hero__badge-icon {
    width: 2.25rem;
    height: 2.25rem;
  }
}

.cinematic-hero__badge-icon svg {
  width: 0.9rem;
  height: 0.9rem;
  color: #c4b5fd;
}

.cinematic-hero__badge-title {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (min-width: 1100px) {
  .cinematic-hero__badge-title {
    font-size: 0.85rem;
  }
}

.cinematic-hero__badge-sub {
  color: rgba(196, 181, 253, 0.55);
  font-size: 10px;
  font-weight: 500;
}

@media (min-width: 1100px) {
  .cinematic-hero__badge-sub {
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinematic-pin-space {
    height: auto;
  }

  .cinematic-hero {
    position: relative;
    height: auto;
    min-height: 100svh;
    padding: 3rem 0;
  }

  .gsap-reveal {
    visibility: visible;
  }

  .cinematic-hero__stage {
    position: relative;
    min-height: 70vh;
  }

  .cinematic-hero .main-card {
    width: min(94vw, 1100px);
    height: auto;
    min-height: 70vh;
    margin: 0 auto;
  }
}

.cinematic-hero__web-link {
  flex-basis: 100%;
  color: rgba(237, 233, 254, 0.85);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cinematic-hero__web-link:hover {
  color: #fff;
}

.cinematic-hero__mobile-lead a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
