/* The hero uses the approved 1672 × 941 composition as its desktop coordinate system. */
.hero--character {
  --scene-height: 100svh;
  --scene-ratio: 1.776833;
  --scene-image-height: max(var(--scene-height), 56.2799vw);
  --word-font: min(18vw, 32svh);
  height: var(--scene-height);
  min-height: 0;
  padding: 0;
  display: block;
  font-family: Montserrat, Arial, sans-serif;
}
.hero--character .wrap { width: 89.5%; max-width: none; }
.hero--character .hero-media { z-index: 0; }
.hero--character .hero-media::after { display: none; }
.hero--character .hero-media .hero-scene,
.hero--character .hero-ridge .hero-scene,
.hero--character .hero-ground .hero-scene {
  position: absolute;
  inset: 50% auto auto 50%;
  width: max(100%, calc(var(--scene-height) * var(--scene-ratio)));
  height: max(var(--scene-height), 56.2799vw);
  max-width: none;
  object-fit: fill;
  transform: translate(-50%, -50%);
}
.hero-ridge { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-ground { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero-ground .hero-scene {
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 77.5%, #000 81%, #000 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 77.5%, #000 81%, #000 100%);
}
/* Pixel-traced skyline from the 1672 × 941 source image. The PNG has an
   antialiased alpha channel: sky transparent, mountain and apron opaque.
   Applying it directly to the identically positioned image keeps the mask
   in source-image coordinates at every cover size and aspect ratio. */
.hero-ridge .hero-scene {
  -webkit-mask: url("perron-ridge-mask-v7.png") center / 100% 100% no-repeat;
  mask: url("perron-ridge-mask-v7.png") center / 100% 100% no-repeat;
  mask-mode: alpha;
}
.hero--character::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, #041a3424 0%, #041a3410 32%, transparent 55%);
}
.hero-wordmark {
  position: absolute;
  top: calc(50% - var(--scene-image-height) * .17 - var(--word-font) * .8585);
  left: 1%; width: 100%; z-index: 1;
  text-align: center; user-select: none; pointer-events: none;
  color: transparent;
  background: linear-gradient(180deg,
    #f5fbff 9%, #e3f6ff 27%, #b3e5fb 50%, #85cdeb 69%, #85cdeb94 88%, #85cdeb00 100%);
  /* Preserve the approved width and cap line; bury the lower cap edge behind
     the lowest central ridge rather than leaving a flat typographic cutoff. */
  transform: scaleY(1.19); transform-origin: 50% 0;
  background-clip: text; -webkit-background-clip: text;
  font-family: Montserrat, Arial, sans-serif; font-size: var(--word-font);
  line-height: .88; font-weight: 900; letter-spacing: -.055em;
}
.hero--character .topbar { z-index: 8; }
.hero--character .topbar-inner {
  min-height: 8%; height: clamp(62px, 8svh, 86px); border: 0;
  position: relative; display: flex; justify-content: space-between; align-items: center;
  padding: 0; gap: 20px;
}
.hero--character .brand-wordmark {
  font-family: Montserrat, Arial, sans-serif; font-size: clamp(24px, 1.98vw, 38px);
  font-weight: 850; letter-spacing: .055em; line-height: 1; color: #fff;
}
.hero--character .top-nav {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; justify-content: center; gap: clamp(28px, 3.2vw, 60px);
  white-space: nowrap; font-size: clamp(15px, 1.3vw, 23px); font-weight: 550;
}
.hero--character .top-nav a { min-height: 44px; }
.top-install {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 9.1vw; min-height: 39px; padding: 5px 23px;
  border: 1.5px solid #e6f4ff; border-radius: 15px;
  font-size: clamp(14px, 1.1vw, 20px); font-weight: 650; color: #fff;
  background: #a8d9ff08; transition: background .2s ease;
}
.top-install:hover { background: #bde8ff22; }
.hero--character .hero-layout {
  position: absolute; z-index: 4; inset: 0; transform: none;
  width: 100%; height: 100%; max-width: none; margin: 0; display: block;
}
.hero-copy { position: absolute; z-index: 3; left: 6.45%; top: 38.8%; width: 32.7%; padding: 0; }
.hero--character .hero-eyebrow {
  font-size: clamp(12px, 1.2vw, 22px); letter-spacing: .18em; font-weight: 700;
  color: #b3d9f5; line-height: 1.4;
}
.hero--character h1 {
  font-family: Montserrat, Arial, sans-serif; font-size: clamp(37px, 3.48vw, 72px);
  line-height: 1.03; letter-spacing: -.028em; font-weight: 800; margin-top: 21px;
  text-shadow: 0 2px 15px #081b2d30;
}
.hero--character .hero-lede {
  font-size: clamp(18px, 1.72vw, 33px); color: #b6d8ee; font-weight: 500;
  line-height: 1.22; max-width: 31ch; margin-top: 22px; letter-spacing: -.022em;
}
.hero-install { display: inline-flex; flex-direction: column; align-items: center; margin-top: 39px; }
.hero--character .glass-action {
  width: clamp(225px, 18.9vw, 380px); min-height: clamp(59px, 8.2svh, 90px);
  margin: 0; padding: 12px 22px; border: 0; border-radius: 24px;
  color: white; background: linear-gradient(135deg, #ff8c18, #f76b04);
  font-size: clamp(24px, 2.05vw, 39px); font-weight: 800; line-height: 1.2;
  box-shadow: 0 11px 30px #13243620; backdrop-filter: none;
}
.hero--character .glass-action:hover { background: linear-gradient(135deg, #ff9b2b, #ff7911); }
.android-caption { margin-top: 10px; font-size: clamp(14px, 1.18vw, 23px); font-weight: 500; color: #99bed9; line-height: 1.3; }
.hero-character { position: absolute; left: 34.8%; top: 23.5%; bottom: 1.2%; width: 34.7%; z-index: 2; min-width: 0; }
.character-viewport { position: relative; width: 100%; height: 100%; container-type: size; }
.character-viewport::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  left: var(--foot-x, calc(50% - min(5.05cqh, 7.8125cqw)));
  top: calc(var(--foot-y, calc(100% - min(10.606cqh, 16.406cqw))) - 4px);
  width: var(--shadow-width, min(46cqw, 34cqh)); height: 4.6%; transform: translate(-50%, -25%);
  background: radial-gradient(ellipse, #06142670 0%, #06142636 36%, transparent 72%);
  filter: blur(3px);
}
.character-viewport canvas { position: absolute; z-index: 1; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.character-poster { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; transition: opacity .3s ease; pointer-events: none; }
.character-viewport.is-ready canvas { opacity: 1; }
.character-viewport.is-ready .character-poster { opacity: 0; }
.hero-phone {
  position: absolute; z-index: 5; right: 11.8%; bottom: 8.9%;
  width: min(20vw, 31.25svh); margin: 0;
  transform: perspective(1250px) rotateY(-5deg) rotateZ(-.7deg);
  transform-origin: center bottom;

}
.hero-phone::before {
  content: ""; position: absolute; inset: 5px -5px 1px 4px; z-index: -1;
  border-radius: 13% / 6%; background: linear-gradient(90deg, #091b2e, #5ca9db 65%, #0d2440);
  box-shadow: 22px 22px 27px #00162c4d, 7px 3px 2px #071729;
}
.hero-phone::after {
  content: ""; position: absolute; z-index: -2; left: -13%; bottom: -4%; width: 145%; height: 9%;
  background: radial-gradient(ellipse, #00152d7a, #00152d20 49%, transparent 72%);
  transform: skewX(-20deg); filter: blur(5px); pointer-events: none;
}
.phone-shell {
  position: relative; overflow: hidden; padding: 7px; border: 1px solid #c2e8ff;
  border-radius: 13% / 6%; background: #05172a;
  box-shadow: -2px -2px 1px #d2f1ff, inset 0 0 0 2px #4073a8, inset 0 0 0 4px #07162a;
}
.phone-shell::before {
  content: ""; position: absolute; z-index: 7; width: 4.6%; aspect-ratio: 1; top: 2.7%; left: 48%;
  border-radius: 50%; background: radial-gradient(circle, #152a42 0 23%, #020916 26% 59%, #0e2946 63%);
  box-shadow: 0 0 0 1px #3a5c7d50; pointer-events: none;
}
.hero-phone figcaption, .hero-bottom, .character-motion { display: none; }

@media (max-width: 1100px) and (min-width: 761px) {
  .hero--character .top-nav { gap: 25px; font-size: 15px; }
  .hero--character .brand-wordmark { font-size: 25px; }
  .top-install { min-width: 110px; padding-inline: 14px; min-height: 36px; }
  .hero-copy { left: 5.2%; width: 34%; }
  .hero--character h1 { font-size: 3.5vw; margin-top: 15px; }
  .hero--character .hero-lede { font-size: 1.75vw; margin-top: 18px; }
  .hero-install { margin-top: 26px; }
  .hero--character .glass-action { width: 22vw; min-height: 60px; font-size: 24px; border-radius: 19px; }
  .hero-phone { right: 7%; width: min(21vw, 32.2svh); }
  .hero-character { left: 34%; width: 36%; }
}
@media (max-width: 760px) {
  .hero--character { --scene-height: 100svh; }
  .hero--character .wrap { width: calc(100% - 40px); }
  .hero--character .topbar-inner {
    height: 97px; min-height: 0; display: grid; grid-template-columns: 1fr auto;
    align-content: start; align-items: center; gap: 12px 14px; padding: 18px 0 0;
  }
  .hero--character .brand-wordmark { font-size: 22px; letter-spacing: .045em; }
  .top-install { min-height: 32px; min-width: 0; padding: 4px 13px; font-size: 12px; border-radius: 10px; }
  .hero--character .top-nav {
    position: static; grid-column: 1 / -1; grid-row: 2; transform: none;
    font-size: 12px; gap: 22px; justify-content: center;
  }
  .hero--character .top-nav a { min-height: 30px; }
  .hero-wordmark { left: 0; top: 12.7%; transform: none; font-size: 19.4vw; line-height: .9; letter-spacing: -.057em; }
  .hero--character .hero-layout { width: 100%; }
  .hero-copy { top: 22.7%; left: 20px; width: calc(100% - 40px); text-align: center; }
  .hero--character .hero-eyebrow { font-size: 10px; letter-spacing: .16em; }
  .hero--character h1 { font-size: clamp(29px, 7.9vw, 43px); line-height: 1.03; margin-top: 10px; letter-spacing: -.025em; }
  .hero--character .hero-lede { font-size: 14px; line-height: 1.35; max-width: 32ch; margin: 13px auto 0; }
  .hero-install { margin-top: 16px; }
  .hero--character .glass-action { width: 194px; min-height: 45px; padding: 9px 18px; border-radius: 15px; font-size: 21px; }
  .android-caption { font-size: 12px; margin-top: 6px; }
  .hero-character { left: -1%; top: 50%; bottom: 1%; width: 70%; }
  .hero-phone { display: block; right: 6%; bottom: 7%; width: 30%; transform: perspective(800px) rotateY(-6deg) rotateZ(-.7deg); }
  .phone-shell { padding: 4px; border-radius: 13% / 6%; }
  .hero-phone::before { inset: 3px -3px 1px 2px; box-shadow: 11px 12px 16px #00162c60, 3px 1px 1px #071729; }
  .hero--character::after { background: linear-gradient(180deg, #04172e20, #04172e35 28%, #04172e30 49%, transparent 72%); }
}
@media (max-width: 359px) {
  .hero--character { --scene-height: 100svh; }
  .hero--character .top-nav { gap: 16px; font-size: 11px; }
  .hero--character .brand-wordmark { font-size: 20px; }
  .hero-copy { left: 16px; width: calc(100% - 32px); }
  .hero--character h1 { font-size: 28px; }
  .hero--character .hero-lede { font-size: 13px; }
}
@media (max-height: 740px) and (max-width: 760px) {
  .hero-copy { top: 23%; }
  .hero--character h1 { font-size: 28px; margin-top: 7px; }
  .hero--character .hero-lede { font-size: 13px; margin-top: 9px; }
  .hero-install { margin-top: 11px; }
  .android-caption { font-size: 11px; margin-top: 5px; }
  .hero-character { top: 53%; }
  .hero-phone { width: min(30%, 21svh); }
}
@media (max-height: 620px) and (max-width: 760px) {
  .hero--character .topbar-inner { height: 80px; padding-top: 10px; gap: 5px 12px; }
  .hero-wordmark { top: 16%; font-size: 16vw; }
  .hero-copy { top: 29%; }
  .hero-eyebrow { display: none; }
  .hero--character h1 { font-size: 25px; margin-top: 0; }
  .hero--character .hero-lede { font-size: 12px; max-width: 33ch; margin-top: 7px; }
  .hero-install { margin-top: 8px; }
  .hero--character .glass-action { min-height: 36px; padding-block: 6px; font-size: 19px; }
  .hero-character { top: 59%; }
  .hero-phone { width: min(29%, 19svh); }
}
@media (max-height: 680px) and (min-width: 761px) {
  .hero--character .topbar-inner { height: 58px; }
  .hero-wordmark { --word-font: min(18vw, 23svh); }
  .hero-copy { top: 36%; }
  .hero--character h1 { font-size: 3.2vw; margin-top: 12px; }
  .hero--character .hero-lede { font-size: 1.45vw; margin-top: 14px; }
  .hero-install { margin-top: 20px; }
  .hero--character .glass-action { min-height: 47px; font-size: 25px; border-radius: 17px; }
  .android-caption { font-size: 13px; margin-top: 6px; }
  .hero-character { top: 25%; }
  .hero-phone { width: 31svh; }
}
@media (prefers-reduced-motion: reduce) { .character-viewport canvas, .character-poster { transition: none; } }

/* Portrait tablets need room for the character below the introduction. */
@media (min-width: 761px) and (max-width: 1100px) and (max-aspect-ratio: 1/1) {
  .hero-copy { top: 37%; left: 10%; width: 80%; text-align: center; }
  .hero--character .hero-eyebrow { font-size: 12px; }
  .hero--character h1 { font-size: clamp(34px, 4.4vw, 45px); margin-top: 12px; }
  .hero--character .hero-lede { font-size: 17px; max-width: 34ch; margin: 14px auto 0; }
  .hero-install { margin-top: 18px; }
  .hero--character .glass-action { width: 225px; min-height: 50px; font-size: 24px; }
  .android-caption { font-size: 13px; margin-top: 6px; }
  .hero-character { left: 4%; top: 57%; bottom: 0; width: 58%; }
  .hero-phone { right: 9%; bottom: 6%; width: 25%; }
}

/* A masked mirrored screen grounds the physical phone on the reflective apron. */
.phone-reflection {
  position: absolute; z-index: -2; top: calc(100% + 5px); left: 0; width: 100%;
  aspect-ratio: 9 / 19.3; padding: 7px; border: 1px solid #b4dbf6;
  border-radius: 13% / 6%; background: #06182a; overflow: hidden;
  transform: scaleY(-1); opacity: .27; pointer-events: none;
  mask-image: linear-gradient(to top, #000 0%, #00000088 9%, transparent 24%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, #00000088 9%, transparent 24%);
  filter: blur(.9px);
}
.phone-reflection img { width: 100%; height: 100%; max-width: none; object-fit: fill; border-radius: 10.5% / 4.9%; }
@media(max-width:760px) { .phone-reflection { padding: 4px; opacity: .2; } }
