/* The cinematic sequence is scoped to the first section only. */
.logo18-theme:has(.cinematic-hero) { overflow-x: clip; }
.logo18-theme .hero.cinematic-hero {
  --cinema-progress: 0;
  --cinema-dark: 0;
  --opening-opacity: 1;
  --opening-y: 0px;
  --connection-opacity: 0;
  --connection-y: 55px;
  --finale-opacity: 0;
  --finale-y: 60px;
  --art-scale: 1;
  --art-x: 0%;
  --art-y: 0px;
  --art-rotate: 0deg;
  --art-opacity: 1;
  --cinema-ink: #12151a;
  --hero-title-size: clamp(52px, 5.8vw, 92px);
  display: block;
  position: relative;
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  overflow: visible;
  background: #f3f3ef;
}
.logo18-theme .cinematic-hero.cinema-enabled { height: 310svh; }
.cinema-stage {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 660px;
  isolation: isolate;
  overflow: clip;
  color: var(--cinema-ink);
  background: #f3f3ef;
}
.cinema-enabled .cinema-stage { position: sticky; top: 0; }
.cinema-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, #0a0d15 0%, rgb(10 13 21 / 78%) 28%, transparent 76%);
  opacity: var(--cinema-shade, 0);
  pointer-events: none;
}
.cinema-night {
  position: absolute;
  inset: 0;
  background: #0a0d15;
  opacity: var(--cinema-dark);
  z-index: -1;
}
.cinema-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(to right, currentColor 1px, transparent 1px);
  background-size: 25% 100%;
  opacity: .035;
  mask-image: linear-gradient(transparent 8%, #000 30%, #000 80%, transparent);
  pointer-events: none;
}
.cinema-halo {
  position: absolute;
  width: 68vw;
  height: 68vw;
  right: -17vw;
  top: -12vw;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(111 129 255 / 15%), transparent 65%);
  opacity: calc(.35 + var(--cinema-dark) * .65);
  transform: translateY(var(--art-y));
  pointer-events: none;
}
.cinema-art-zone {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.cinema-art {
  position: absolute;
  top: 50%;
  right: var(--gutter);
  width: min(46vw, 850px);
  aspect-ratio: 1850 / 300;
  z-index: 1;
  pointer-events: none;
  opacity: var(--art-opacity);
  transform: translate(var(--art-x), calc(-50% + var(--art-y))) scale(var(--art-scale)) rotate(var(--art-rotate));
  transform-origin: 50% 50%;
  will-change: transform;
}
.cinema-logo-filters { position: absolute; pointer-events: none; }
.cinema-art { perspective: 1100px; }
.cinema-art::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 118%;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent 40%, #799aff 46%, #fff 50%, #ffa89c 54%, transparent 60%);
  filter: drop-shadow(0 0 8px #799aff);
  background-size: 300% 100%;
  background-position: 100% 0;
}
.cinema-complete .cinema-art::after { animation: cinema-completion-light 5400ms ease-in-out infinite; }
.cinema-complete .cinema-glyph-entry {
  animation: cinema-letter-shimmer 5400ms ease-in-out infinite;
  animation-delay: calc(var(--letter-order) * 110ms);
}
@keyframes cinema-letter-shimmer {
  0%, 28%, 100% { filter: brightness(.75) drop-shadow(0 0 0 transparent); }
  8% { filter: brightness(1.6) drop-shadow(0 0 12px rgb(160 189 255 / 95%)); }
  16% { filter: brightness(1.15) drop-shadow(0 0 5px rgb(255 193 177 / 55%)); }
}
@keyframes cinema-completion-light {
  0% { opacity: 0; background-position: 100% 0; }
  5% { opacity: 1; }
  28% { opacity: 1; background-position: 0% 0; }
  36%, 100% { opacity: 0; background-position: 0% 0; }
}
.cinema-objects {
  position: absolute; width: 44vw; aspect-ratio: 1; right: var(--gutter); top: 50%;
  transform: translateY(-50%) rotate(var(--object-turn, 0deg));
  opacity: var(--object-opacity, 0); pointer-events: none; z-index: 0;
}
.cinema-object { position: absolute; inset: 8%; border: 1px solid rgb(105 118 150 / 35%); border-radius: 50%; }
.cinema-object:first-child {
  border-top: 3px solid var(--coral); border-bottom: 3px solid var(--blue);
  transform: rotate(-32deg) scaleY(.46);
  box-shadow: 0 8px 20px rgb(49 85 223 / 8%);
}
.cinema-object:last-child { inset: 19%; transform: rotate(48deg) scaleY(.65); }
.cinema-object:last-child::after { content: ""; position: absolute; width: 10px; height: 10px; top: 12%; left: 12%; background: var(--coral); border-radius: 50%; box-shadow: 0 0 22px rgb(255 98 90 / 35%); }
.cinema-glyph { position: absolute; top: 0; height: 100%; transform-style: preserve-3d; will-change: transform, opacity; }
.cinema-glyph-entry, .cinema-glyph-crop { display: block; position: relative; width: 100%; height: 100%; }
.cinema-glyph-crop { overflow: hidden; }
.cinema-glyph-entry {
  filter: drop-shadow(5px 9px 1px rgb(38 47 70 / calc(var(--letter-depth, 0) * .18)))
    drop-shadow(0 0 calc(var(--letter-glow, 0) * 24px) rgb(127 160 255 / 90%));
}
.cinema-arrival .cinema-glyph-entry {
  animation: cinema-letter-arrive 1400ms cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--letter-order) * 110ms);
}
@keyframes cinema-letter-arrive {
  from { opacity: 0; transform: translate3d(38vw, 35px, -180px) rotateY(-95deg) rotateZ(22deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotateY(0) rotateZ(0); }
}
.cinema-wordmark { position: absolute; top: 0; display: block; max-width: none; height: 100%; }
.cinema-wordmark-day { opacity: calc(1 - var(--cinema-dark)); }
.cinema-wordmark-night { opacity: var(--cinema-dark); filter: url(#cinema-logo-on-dark); }
.home-page:has(.cinematic-hero[data-cinema-visible="true"][data-cinema-dark="true"]) .page-progress { color: #fff; }
.cinema-opening,
.cinema-connection,
.cinema-finale {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  right: var(--gutter);
  top: 50%;
  pointer-events: none;
}
.cinema-opening {
  top: 24%;
  opacity: var(--opening-opacity);
  transform: translateY(var(--opening-y));
}
.cinema-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .2em;
  font-weight: 600;
}
.cinema-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.logo18-theme .cinematic-hero h1 {
  max-width: 10em;
  margin: 0;
  color: #12151a;
  font-size: var(--hero-title-size);
  letter-spacing: -.065em;
  line-height: 1.15;
  font-weight: 650;
}
.cinematic-hero h1 span { display: block; }
.cinematic-hero .cinema-opening > *,
.cinematic-hero .cinema-connection > *,
.cinematic-hero .cinema-finale > * { width: fit-content; max-width: 100%; }
.cinema-intro {
  margin: 30px 0 0;
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.95;
  letter-spacing: .025em;
  color: #50555d;
}
.cinema-connection {
  opacity: var(--connection-opacity);
  transform: translateY(calc(-50% + var(--connection-y)));
  color: #fff;
  text-shadow: 0 2px 24px rgb(10 13 21 / 25%);
}
.cinema-connection .cinema-eyebrow { color: #bac3d4; }
.cinema-big-type {
  margin: 0;
  font-size: var(--hero-title-size);
  font-weight: 640;
  letter-spacing: -.06em;
  line-height: 1.22;
}
.cinema-big-type em { font-style: normal; }
.cinema-connection em { color: #b7c2dd; }
.cinema-finale {
  opacity: var(--finale-opacity);
  transform: translateY(calc(-50% + var(--finale-y)));
  color: #12151a;
}
.cinema-finale .cinema-big-type { font-size: var(--hero-title-size); }
.cinema-finale em {
  background: linear-gradient(105deg, #d95255 0%, #935887 45%, #3155df 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cinema-finale-note { margin: 34px 0 0; font-size: 14px; line-height: 1.9; color: #50555d; }
.cinema-footer {
  position: absolute;
  z-index: 5;
  bottom: 38px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  color: var(--cinema-ink);
}
.cinema-timeline { width: min(360px, 40vw); }
.cinema-timeline p { display: flex; justify-content: space-between; gap: 24px; margin: 0 0 14px; font-size: 9px; letter-spacing: .12em; font-weight: 600; }
.cinema-timeline p > :last-child { opacity: .5; }
.cinema-timeline-track { position: relative; height: 1px; background: color-mix(in srgb, currentColor 20%, transparent); }
.cinema-timeline-track i { position: absolute; inset: -1px 0; transform: scaleX(var(--cinema-progress)); transform-origin: left; background: linear-gradient(90deg, var(--coral), var(--blue)); }
.cinema-next {
  display: inline-flex;
  align-items: center;
  gap: 50px;
  padding: 14px 0;
  border-bottom: 1px solid currentColor;
  font-size: 13px;
  font-weight: 600;
}
.cinema-next svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; transition: transform 300ms; }
.cinema-next:hover svg { transform: translateX(7px); }
.cinematic-hero:not(.cinema-enabled) .cinema-timeline { display: none; }
.cinematic-hero:not(.cinema-enabled) .cinema-footer { justify-content: flex-end; }
.home-page:has(.cinematic-hero) .site-header:not(.is-scrolled) { background: transparent; }
@media (max-width: 1020px) {
  .cinema-art { width: 44vw; }
  .cinema-opening { top: 27%; }
}
@media (max-width: 820px) {
  .logo18-theme .cinematic-hero.cinema-enabled { height: 270svh; }
  .cinema-stage { min-height: 650px; }
  .cinema-opening { top: 17%; }
  .cinema-eyebrow { font-size: 8px; margin-bottom: 22px; letter-spacing: .16em; }
  .logo18-theme .hero.cinematic-hero { --hero-title-size: clamp(30px, 9.6vw, 64px); }
  .logo18-theme .cinematic-hero h1 { font-size: var(--hero-title-size); line-height: 1.16; }
  .cinema-intro { margin-top: 24px; font-size: 11px; }
  .cinema-art { width: calc(100% - var(--gutter) * 2); top: 72%; right: var(--gutter); transform-origin: 50% 50%; }
  .cinema-connection { top: 44%; }
  .cinema-big-type { font-size: var(--hero-title-size); }
  .cinema-finale { top: 43%; }
  .cinema-finale .cinema-big-type { font-size: var(--hero-title-size); line-height: 1.4; }
  .cinema-objects { width: 85vw; top: 71%; }
  .cinema-finale-note { font-size: 12px; margin-top: 24px; }
  .cinema-footer { bottom: 28px; gap: 26px; align-items: end; }
  .cinema-timeline { flex: 1; min-width: 0; }
  .cinema-timeline p { font-size: 8px; margin-bottom: 12px; }
  .cinema-timeline p > :last-child { display: none; }
  .cinema-next { gap: 15px; font-size: 11px; padding: 8px 0; }
  .cinema-next svg { width: 18px; height: 18px; }
  .cinema-halo { width: 130vw; height: 130vw; top: 20%; right: -50vw; }
}
@media (max-height: 660px) and (min-width: 821px) {
  .cinema-stage { min-height: 580px; }
  .cinema-opening { top: 24%; }
  .logo18-theme .hero.cinematic-hero { --hero-title-size: 52px; }
  .cinema-eyebrow { margin-bottom: 18px; }
  .cinema-intro { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .logo18-theme .cinematic-hero.cinema-enabled { height: auto; }
  .cinema-enabled .cinema-stage { position: relative; }
  .cinema-art { will-change: auto; }
  .cinema-glyph { will-change: auto; }
  .cinema-arrival .cinema-glyph-entry { animation: none; }
  .cinema-glyph-entry { filter: none; }
  .cinema-complete .cinema-art::after { animation: none; opacity: 0; }
  .cinema-complete .cinema-glyph-entry { animation: none; filter: none; }
  .cinema-timeline { display: none; }
  .cinema-footer { justify-content: flex-end; }
  .cinema-next svg { transition: none; }
}
