/* Shared by the fixed masthead, the opening grid, and the following story. */
:root {
  --bar-height: clamp(60px, 7.3svh, 66px);
  --masthead: calc(var(--bar-height) + clamp(14px, 2svh, 24px) + env(safe-area-inset-top, 0px));
  --opening-edge: max(clamp(20px, 5vw, 88px), calc((100vw - 1440px) / 2), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
}

.site-header.opening-masthead {
  --bar-ivory: #FFFFFF;
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  width: auto;
  height: var(--masthead);
  display: grid;
  place-items: center;
  padding-top: env(safe-area-inset-top, 0px);
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
  pointer-events: none;
  transition: none;
}
.opening-masthead .header-inner {
  /* The paper extends past the controls, not the other way around. Changing
     surfaces must not move a link out from under a pointer or a fingertip. */
  --bar-pad: clamp(14px, 1.55vw, 24px);
  --bar-edge: max(10px, calc(var(--opening-edge) - var(--bar-pad) - 1px));
  width: calc(100% - 2 * var(--bar-edge));
  max-width: none;
  height: var(--bar-height);
  margin: 0;
  padding: 0 var(--bar-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  background: var(--bar-ivory);
  box-shadow: 0 4px 18px rgba(0, 51, 102, .12);
  backdrop-filter: none;
  pointer-events: auto;
  /* Never fade the paper: the first compact frame must already mask the page. */
  transition: transform .23s var(--ease);
}
.opening-masthead[data-masthead="hero"] .header-inner {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
.opening-masthead a { pointer-events: auto; }
.opening-masthead .brand {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}
.opening-masthead .opening-mark { width: clamp(27px, 2.3vw, 33px); height: auto; }
.opening-masthead .opening-wordmark { display: none; width: clamp(91px, 7.6vw, 115px); height: auto; }
.opening-masthead[data-masthead="hero"] .opening-mark { display: none; }
.opening-masthead[data-masthead="hero"] .opening-wordmark { display: block; }
.opening-masthead[data-masthead-away]:not(:focus-within) .header-inner {
  transform: translateY(calc(-100% - var(--masthead)));
  pointer-events: none;
}
.opening-masthead[data-masthead-away]:not(:focus-within) a { pointer-events: none; }
/* Keep the real links in the tab order and landmarks. Focus reveals them in
   the same paint, even halfway through an exit. No scroll or focus is forced. */
.opening-masthead:focus-within .header-inner { transform: none; transition: none; }
.opening-masthead a:focus-visible {
  outline: 3px solid #003366;
  outline-offset: 1px;
}
@media (prefers-reduced-motion: reduce) {
  .opening-masthead .header-inner { transition: none; }
}
.opening-masthead .header-actions { gap: clamp(4px, .6vw, 10px); }
.opening-masthead .header-login {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 clamp(12px, 1.2vw, 18px);
  border-radius: 999px;
  background: var(--bar-ivory);
  color: var(--navy);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 700;
}
.opening-masthead .header-login:hover { text-decoration: underline; text-underline-offset: .25em; }
.opening-masthead .header-actions .button {
  min-height: 44px;
  padding: 9px clamp(14px, 1.4vw, 23px);
  background: var(--navy);
  border-color: var(--navy);
  color: #F8FAFC;
  font-size: clamp(12px, 1vw, 14px);
  white-space: nowrap;
}
.opening-masthead .header-actions .button:hover { background: #00417F; }

.hero.opening-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  background: var(--paper);
}
.opening-hero .hero-copy {
  min-height: max(540px, calc(100svh - 52px));
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--masthead) + clamp(20px, 4svh, 56px)) clamp(28px, 4vw, 72px) clamp(46px, 8svh, 116px) var(--opening-edge);
  background: var(--paper);
}
.opening-hero h1 {
  max-width: 11ch;
  margin: 0;
  color: var(--navy);
  font: 550 clamp(54px, 5.4vw, 90px)/.98 var(--sans);
  letter-spacing: -.064em;
  text-wrap: balance;
}
.opening-hero h1 em {
  display: block;
  color: var(--gold-deep);
  font: italic 400 1.12em/.99 var(--editorial);
  letter-spacing: -.035em;
}
.opening-hero .hero-subtitle {
  max-width: 40ch;
  margin: clamp(22px, 3.5svh, 38px) 0 0;
  color: var(--graphite);
  font-size: clamp(15px, 1.23vw, 19px);
  line-height: 1.56;
  text-wrap: pretty;
}
.opening-hero .hero-actions { display: flex; margin-top: clamp(24px, 3.5svh, 38px); }
.opening-hero .hero-actions .hero-discover {
  min-height: 50px;
  width: auto;
  padding-inline: 23px;
  background: var(--navy);
  border-color: var(--navy);
  color: #F8FAFC;
}
.opening-hero .hero-actions .hero-discover:hover { background: #00417F; }
.opening-hero .hero-visual { min-height: 0; min-width: 0; background: var(--paper); isolation: isolate; }
.opening-hero .hero-photo {
  object-fit: cover;
  object-position: 50% 56%;
  /* Both ends of the tonal scale stay inside the output range; the bright
     clouds and reflections retain their texture, as do the darkest treads. */
  filter: grayscale(1) contrast(.86) brightness(.96);
  -webkit-mask-image: none;
  mask-image: none;
}
.opening-hero .hero-visual::after { content: none; background: none; }

/* The phone uses the same photograph and no graphics of its own. */
@media (max-width: 47.99rem), (max-width: 55rem) and (orientation: portrait), (max-width: 60rem) and (max-height: 32rem) and (pointer: coarse) {
  .hero.opening-hero { grid-template-columns: minmax(0, 1fr); }
  .opening-hero .hero-copy {
    min-height: 0;
    padding: calc(var(--masthead) + clamp(19px, 5.8vw, 39px)) var(--opening-edge) clamp(25px, 5.5vw, 42px);
  }
  .opening-hero h1 { max-width: 11ch; font-size: clamp(40px, 11.6vw, 70px); }
  .opening-hero .hero-subtitle { max-width: 42ch; margin-top: 17px; font-size: 16px; line-height: 1.5; }
  .opening-hero .hero-actions { margin-top: 20px; }
  .opening-hero .hero-actions .hero-discover { min-height: 46px; padding-inline: 20px; }
  .opening-hero .hero-visual { height: clamp(242px, 80vw, 452px); }
  .opening-hero .hero-photo { object-position: 50% 79%; }
}

/* Without JS, or with reduced motion, the one source list is fully readable. */
.opening-marquee {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-block: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: var(--navy);
}
.opening-marquee-window { min-width: 0; overflow: hidden; }
.opening-messages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin: 0;
  padding: 14px var(--opening-edge);
  list-style: none;
}
.opening-messages li {
  display: flex;
  align-items: center;
  gap: 14px;
  font: 550 clamp(12px, .95vw, 14px)/1.5 var(--sans);
}
.opening-messages li::before {
  content: "";
  flex: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.opening-marquee[data-moving] .opening-marquee-track { display: flex; width: max-content; }
.opening-marquee[data-moving] .opening-messages {
  flex: none;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0;
}
.opening-marquee[data-moving] li { min-height: 50px; padding-inline: clamp(18px, 2vw, 34px); white-space: nowrap; }
.opening-marquee-toggle {
  display: grid;
  place-items: center;
  width: 50px;
  min-height: 44px;
  padding: 0;
  border-left: 1px solid #E2E8F0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
}
.opening-marquee-toggle[hidden], .opening-marquee-toggle .opening-play { display: none; }
.opening-marquee-toggle[data-paused] .opening-pause { display: none; }
.opening-marquee-toggle[data-paused] .opening-play { display: block; }
.opening-marquee-toggle:hover { background: #F1F5F9; }
.opening-marquee-toggle:focus-visible { outline-offset: -4px; }

.intelligence.opening-model {
  padding: clamp(80px, 8vw, 138px) var(--opening-edge) clamp(76px, 8vw, 132px);
  background: var(--paper);
  color: var(--ink);
}
.opening-model-inner { max-width: 1140px; margin-inline: auto; }
.opening-model h2 {
  margin: 0;
  text-align: center;
  font: 550 clamp(37px, 4.15vw, 66px)/1.04 var(--sans);
  letter-spacing: -.055em;
  text-wrap: balance;
}
.opening-model h2 em { color: var(--gold-deep); font: italic 400 1.09em/1 var(--editorial); letter-spacing: -.034em; }
.opening-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(160px, 20vw, 280px) minmax(0, 1fr);
  grid-template-rows: auto repeat(4, auto);
  margin-top: clamp(52px, 6vw, 96px);
}
.opening-human { grid-column: 1; text-align: right; }
.opening-ai { grid-column: 3; text-align: left; }
.opening-comparison h3 {
  grid-row: 1;
  align-self: end;
  margin: 0 0 23px;
  font: 550 clamp(31px, 3vw, 47px)/1.02 var(--sans);
  letter-spacing: -.055em;
}
.opening-comparison h3 span {
  display: block;
  margin-bottom: 7px;
  color: var(--graphite);
  font: 650 11px/1.2 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.opening-comparison ul {
  grid-row: 2 / span 4;
  display: grid;
  grid-template-rows: subgrid;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.opening-comparison li {
  align-content: center;
  padding: 11px 0;
  border-top: 1px solid #E2E8F0;
  color: var(--ink);
  font: 450 clamp(13px, 1.03vw, 16px)/1.45 var(--sans);
  text-wrap: pretty;
}
.opening-comparison li:last-child { border-bottom: 1px solid #E2E8F0; }
.opening-nexus {
  grid-column: 2;
  grid-row: 1 / span 5;
  align-self: center;
  justify-self: center;
  width: 79%;
  color: var(--gold-deep);
  text-align: center;
}
.opening-nexus svg { width: 100%; height: auto; }
.opening-nexus p {
  margin: 12px 0 0;
  color: var(--gold-deep);
  font: 650 11px/1.45 var(--sans);
  letter-spacing: .085em;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  :root {
    --opening-edge: max(clamp(18px, 5vw, 32px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  }
  .opening-marquee[data-moving] li { min-height: 44px; }
  .opening-marquee-toggle { width: 44px; }
  .opening-messages { justify-content: flex-start; }

  .intelligence.opening-model { padding-block: clamp(62px, 12vw, 86px); }
  .opening-model h2 { font-size: clamp(35px, 7.8vw, 48px); }
  .opening-model h2 em { display: block; }
  .opening-comparison { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 39px; }
  .opening-comparison h3 { align-self: center; margin: 0; font-size: clamp(25px, 5.8vw, 34px); }
  .opening-comparison h3 span { margin-bottom: 4px; font-size: 10px; letter-spacing: .04em; }
  h3.opening-human { grid-column: 1 / 3; text-align: center; }
  h3.opening-ai { grid-column: 5 / 7; text-align: center; }
  .opening-nexus { grid-column: 3 / 5; grid-row: 1; width: min(100%, 142px); }
  .opening-nexus p { max-width: 13ch; margin: 5px auto 0; font-size: 9px; letter-spacing: .045em; }
  .opening-comparison ul { margin-top: 25px; text-align: left; }
  ul.opening-human { grid-column: 1 / 4; padding-right: 10px; }
  ul.opening-ai { grid-column: 4 / 7; padding-left: 10px; }
  .opening-comparison li { font-size: clamp(13px, 2.8vw, 15px); }
}

@media (max-width: 360px) {
  .opening-masthead .opening-wordmark { width: 78px; }
  .opening-masthead .header-actions { gap: 4px; }
  .opening-masthead .header-login { padding-inline: 7px; }
  .opening-masthead .header-actions .button { padding-inline: 11px; }
  .opening-comparison { grid-template-rows: auto auto repeat(4, auto); margin-top: 26px; }
  .opening-nexus { grid-column: 1 / -1; width: 100px; }
  .opening-nexus p { max-width: none; }
  .opening-comparison h3 { grid-row: 2; margin-top: 20px; text-align: left; }
  h3.opening-human { grid-column: 1 / 4; }
  h3.opening-ai { grid-column: 4 / 7; padding-left: 10px; }
  .opening-comparison ul { grid-row: 3 / span 4; margin-top: 13px; }
}
