/* AutoSmart approved beach hero, isolated from the site's existing styles. */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('./fonts/jost-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('./fonts/jost-latin-600-normal.woff2') format('woff2');
}

.as-hero {
  --as-bg: #0a1020;
  --as-ink: #f6f3ec;
  --as-text-shadow: 0 0.03em 0.08em rgba(11, 26, 51, 0.45);
  --copy-left: clamp(16px, 8cqw - 18.4px, 6.67cqw);
  --copy-top: clamp(8px, 8.61cqw - 29px, 6.19cqw);
  --wm-size: max(clamp(26px, 7.2cqw, 30px), 5.63cqw);
  --tl-size: max(16px, 2.70cqw);
  --gap: max(6px, 0.32em);
  --wm-tracking: 0.08em;
  --tl-tracking: 0.01em;
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  justify-items: center;
  color: var(--as-ink);
  background: var(--as-bg);
  -webkit-font-smoothing: antialiased;
}
.as-hero, .as-hero *, .as-hero *::before, .as-hero *::after { box-sizing: border-box; }

/* The stage is the displayed 16:9 image, not the surrounding letterbox. */
.as-hero .as-stage {
  position: relative;
  width: min(100%, calc((100svh - 180px) * 16 / 9));
  max-width: 100%;
  container-type: inline-size;
}
.as-hero .as-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #06101c;
  overflow: hidden;
}
.as-hero .as-media > video, .as-hero .as-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.as-hero .as-media .as-plate { z-index: 0; }
.as-hero .as-media video { z-index: 1; opacity: 0; }
.as-hero .as-media .as-still { z-index: 2; display: none; }

/* Recovery / explicit reduced-motion playback control. */
.as-hero .as-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 44px;
  padding: 0.7em 1.2em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(8, 18, 36, .62);
  color: #fff;
  font: 600 clamp(0.9rem, 1.3cqw, 1.25rem)/1 system-ui, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  white-space: nowrap;
}
.as-hero .as-play::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 0.9em solid #fff;
  border-top: 0.55em solid transparent;
  border-bottom: 0.55em solid transparent;
}
.as-hero .as-play:focus-visible,
.as-hero .as-pause:focus-visible,
.as-hero .as-hero-caption a:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 3px;
}
.as-hero .as-stage.needs-play .as-play,
.as-hero .as-stage.reduced .as-play { display: inline-flex; }
.as-hero .as-stage.reduced .as-media video { visibility: hidden; }
.as-hero .as-stage.reduced .as-media .as-still { display: block; }
.as-hero .as-stage.reduced.manual-video .as-media video { visibility: visible; }
.as-hero .as-stage.reduced.manual-video .as-media .as-still { display: none; }
.as-hero .as-stage.reduced.manual-video .as-play { display: none; }
.as-hero .as-stage.fallback .as-media .as-still { display: block; }
.as-hero .as-stage.fallback .as-media video { visibility: hidden; }
.as-hero .as-stage.fallback .as-play { display: inline-flex; }
.as-hero .as-stage.reduced.manual-video.needs-play .as-play { display: inline-flex; }
.as-hero .as-stage.reduced.manual-video.fallback .as-media .as-still { display: block; }
.as-hero .as-stage.reduced.manual-video.fallback .as-media video { visibility: hidden; }

/* Approved Jost geometry and one-time entrance; text remains over the sky. */
.as-hero .as-copy {
  position: absolute;
  left: var(--copy-left);
  top: var(--copy-top);
  width: max-content;
  max-width: calc(100% - var(--copy-left) - 8px);
  pointer-events: none;
  z-index: 4;
}
.as-hero .as-wordmark {
  margin: 0;
  padding: 0;
  display: block;
  font: 600 var(--wm-size)/1 'Jost', system-ui, sans-serif;
  letter-spacing: var(--wm-tracking);
  color: var(--as-ink);
  text-shadow: var(--as-text-shadow);
  white-space: nowrap;
  width: max-content;
  transform-origin: 0% 100%;
}
.as-hero .as-wordmark .l { display: inline-block; }
.as-hero .as-tagline {
  margin: 0;
  padding: 0;
  display: block;
  font: 400 var(--tl-size)/1.25 'Jost', system-ui, sans-serif;
  letter-spacing: var(--tl-tracking);
  color: var(--as-ink);
  text-shadow: var(--as-text-shadow);
  white-space: nowrap;
  width: max-content;
  margin-top: var(--gap);
  transform-origin: 0% 0%;
}
.as-hero .as-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Icon-only 44px control leaves the mobile title and tagline unobscured. */
.as-hero .as-pause {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  background: rgba(8,18,36,.65);
  color: #fff;
  font: 0/1 system-ui, sans-serif;
  cursor: pointer;
}
.as-hero .as-pause[hidden] { display: none; }
.as-hero .as-pause::before { content: "Ⅱ"; font: 600 18px/1 system-ui, sans-serif; }
.as-hero .as-pause[data-paused="true"]::before { content: "▶"; }
.as-hero .as-pause:hover { background: rgba(8,18,36,.85); }

.as-hero .as-hero-caption {
  width: 100%;
  max-width: 1120px;
  padding: 20px 16px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 24px;
  text-align: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.as-hero .as-hero-caption h1 {
  margin: 0;
  padding: 0;
  color: #f6f3ec;
  font: 600 clamp(21px, 2.2vw, 28px)/1.25 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.as-hero .as-hero-caption a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid #e8600a;
  border-radius: 999px;
  background: #e8600a;
  color: #fff;
  font: 600 14px/1.25 system-ui, sans-serif;
  text-decoration: none;
}
.as-hero .as-hero-caption a:hover { background: #f97316; border-color: #f97316; }

@media (max-width: 767px) {
  .as-hero .as-stage { width: 100%; }
  .as-hero .as-pause { top: 8px; right: 8px; }
  .as-hero .as-hero-caption { flex-direction: column; padding-top: 18px; gap: 12px; }
}

/* startup-v1: the plate is now <picture> (lossless WebP + PNG fallback). Same geometry as the direct <img> rule above;
   display: contents keeps the <img> laid out as a direct child of .as-media. Nothing else changes. */
.as-hero .as-media > picture { display: contents; }
.as-hero .as-media > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
