:root {
  color-scheme: light dark;
  --ink: #111315;
  --muted: #6d7378;
  --line: #dfe3e6;
  --panel: #f7f8f8;
  --paper: #ffffff;
  --accent: #8bd36a;
  --ember: #ff7a21;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.square-stage {
  width: min(100vw, 100vh);
  aspect-ratio: 1 / 1;
  min-width: 320px;
  min-height: 320px;
  display: grid;
  grid-template-rows: auto 1fr auto auto auto;
  gap: clamp(10px, 1.25vmin, 18px);
  padding: clamp(18px, 3.2vmin, 44px);
  overflow: hidden;
  background: var(--paper);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: clamp(10px, 1.05vmin, 13px);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-home {
  display: inline-flex;
  color: var(--muted);
  font-size: clamp(16px, 1.9vmin, 22px);
  font-weight: 500;
  text-decoration: none;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.brand-home:hover,
.brand-home:focus-visible {
  color: #2f6bd8;
  transform: translateY(-1px);
  outline: none;
}

h1 {
  margin: 0;
  margin-top: 0.22em;
  max-width: 620px;
  font-size: clamp(30px, 6.2vmin, 68px);
  line-height: 0.9;
  letter-spacing: 0;
}

h1 span {
  display: inline-block;
  white-space: nowrap;
}

h1 br + span {
  margin-top: 0.14em;
}

.store-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  max-width: 360px;
}

.store-badge {
  flex: 0 0 auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  font-size: clamp(11px, 1.25vmin, 14px);
  font-weight: 800;
  text-decoration: none;
  background: var(--paper);
  box-shadow: 0 0 0 rgba(17, 19, 21, 0);
  transition:
    transform 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.store-badge::after {
  content: "↗";
  width: 0;
  margin-left: 0;
  overflow: hidden;
  opacity: 0;
  transform: translate(-4px, 2px);
  transition:
    width 160ms ease,
    margin-left 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.store-badge:nth-child(2) {
  border-color: var(--ink);
  color: var(--ink);
}

.store-badge:hover,
.store-badge:focus-visible {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 0 12px 26px rgba(17, 19, 21, 0.18);
  transform: translateY(-2px);
  outline: none;
}

.store-badge:hover::after,
.store-badge:focus-visible::after {
  width: 12px;
  margin-left: 8px;
  opacity: 1;
  transform: translate(0, 0);
}

.store-badge:active {
  box-shadow: 0 6px 14px rgba(17, 19, 21, 0.14);
  transform: translateY(0) scale(0.98);
}

.store-badge:nth-child(2):hover,
.store-badge:nth-child(2):focus-visible {
  border-color: #2f6bd8;
  background: #2f6bd8;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(12px, 2vmin, 28px);
  min-height: 0;
  align-items: end;
}

.hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: end;
  padding-bottom: 3px;
}

.lead {
  margin: 0;
  max-width: 34ch;
  color: #2e3337;
  font-size: clamp(14px, 1.9vmin, 22px);
  line-height: 1.32;
}

.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(16px, 2vmin, 24px);
}

.spec-row span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  color: #34393d;
  font-size: clamp(10px, 1.15vmin, 13px);
  font-weight: 700;
  white-space: nowrap;
}

.video-panel {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  align-self: end;
  overflow: hidden;
  border: 1px solid #cfd5d8;
  border-radius: 8px;
  background: #050607;
}

.video-panel video,
.hero-video-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-open-fullscreen {
  position: absolute;
  inset: 0 0 34px;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(0, 0, 0, 0);
  cursor: pointer;
}

.video-open-fullscreen .play-icon {
  opacity: 0;
}

.video-panel:hover .video-open-fullscreen .play-icon,
.video-open-fullscreen:focus-visible .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.video-open-fullscreen:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.video-caption {
  position: absolute;
  right: 14px;
  top: 12px;
  bottom: auto;
  left: 14px;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-size: clamp(10px, 1.05vmin, 12px);
  font-weight: 800;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}

.modal-youtube-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  color: #fff;
  background: #ff0033;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1.4vmin, 16px);
}

.feature-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(12px, 1.8vmin, 20px);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.index {
  color: var(--muted);
  font-size: clamp(10px, 1.05vmin, 12px);
  font-weight: 900;
}

.feature-item h2 {
  margin: 8px 0 6px;
  font-size: clamp(13px, 1.75vmin, 19px);
  line-height: 1.1;
  letter-spacing: 0;
}

.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(10px, 1.2vmin, 13px);
  line-height: 1.35;
}

.media-strip {
  display: grid;
  grid-template-columns: 1.52fr 1fr 1fr;
  gap: clamp(8px, 1.4vmin, 16px);
  min-height: 0;
}

.preview {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0c0d;
}

.preview > img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.preview-large img {
  object-position: 50% 56%;
}

.compare-card {
  --compare: 100%;
  cursor: ew-resize;
  user-select: none;
}

.compare-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  outline: none;
  touch-action: none;
}

.compare-stage:focus-visible {
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--accent);
}

.compare-stage img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 56%;
  pointer-events: none;
}

.compare-base {
  filter: none;
}

.compare-effect {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 var(--compare));
}

.compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--compare);
  width: 2px;
  transform: translateX(-1px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 18px rgba(139, 211, 106, 0.78);
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: clamp(19px, var(--compare), calc(100% - 19px));
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(6, 8, 9, 0.72);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.compare-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 14px;
}

.compare-icon::before,
.compare-icon::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 8px;
  height: 8px;
  border-color: #fff;
  border-style: solid;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
}

.compare-icon::before {
  left: 1px;
  border-width: 0 0 2px 2px;
  transform: rotate(45deg);
}

.compare-icon::after {
  right: 1px;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}

.compare-labels {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-size: clamp(9px, 1vmin, 12px);
  font-weight: 900;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.82);
}

.preview figcaption {
  position: absolute;
  right: 10px;
  bottom: 9px;
  left: 10px;
  color: #fff;
  font-size: clamp(9px, 1vmin, 12px);
  font-weight: 800;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.75);
}

.video-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #0a0c0d;
  color: inherit;
  cursor: pointer;
}

.video-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: filter 180ms ease, transform 180ms ease;
}

.video-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0);
  transition: background 180ms ease;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: clamp(42px, 5vmin, 58px);
  height: clamp(30px, 3.6vmin, 40px);
  place-items: center;
  transform: translate(-50%, -50%) scale(0.92);
  border-radius: 8px;
  background: #ff0033;
  opacity: 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
  transition: opacity 180ms ease, transform 180ms ease;
}

.play-icon::before {
  display: block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #fff;
  content: "";
}

.video-card:hover img,
.video-card:focus-visible img {
  filter: brightness(0.72);
  transform: scale(1.03);
}

.video-card:hover::after,
.video-card:focus-visible::after {
  background: rgba(0, 0, 0, 0.16);
}

.video-card:hover .play-icon,
.video-card:focus-visible .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.video-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.video-modal[hidden] {
  display: none;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 10, 0.72);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 92vw);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 18px;
  background: #0b0d0e;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

.modal-title {
  margin: 0 92px 14px 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0;
}

.modal-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #000;
}

.modal-youtube-link {
  width: fit-content;
  min-height: 38px;
  margin-top: 14px;
  padding: 0 14px;
  font-size: 13px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.company-footer {
  display: grid;
  grid-template-columns: 1.05fr 2.45fr 0.85fr 1.1fr;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--ink);
  padding-top: clamp(8px, 1.25vmin, 14px);
  color: #363b3f;
  font-size: clamp(8px, 0.95vmin, 11px);
  line-height: 1.2;
}

.company-footer strong {
  color: var(--ink);
  font-size: clamp(13px, 1.75vmin, 20px);
  line-height: 1;
}

.company-footer span {
  overflow-wrap: anywhere;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f5f7;
    --muted: #9aa2aa;
    --line: rgba(255, 255, 255, 0.18);
    --panel: #111417;
    --paper: #000000;
  }

  .lead,
  .feature-item p,
  .company-footer {
    color: #c5cbd1;
  }

  .spec-row span,
  .store-badge:nth-child(2) {
    color: #e2e6ea;
  }

  .store-badge {
    color: var(--ink);
    border-color: rgba(255, 255, 255, 0.72);
  }

  .store-badge:hover,
  .store-badge:focus-visible {
    color: #111315;
    border-color: #f3f5f7;
    background: #f3f5f7;
    box-shadow: 0 12px 26px rgba(255, 255, 255, 0.16);
  }

  .store-badge:nth-child(2):hover,
  .store-badge:nth-child(2):focus-visible {
    color: #fff;
    border-color: #2f6bd8;
    background: #2f6bd8;
  }

  .feature-item {
    background: #0e1012;
  }
}

@media (max-aspect-ratio: 1 / 1) {
  .square-stage {
    width: 100vw;
  }
}

@media (max-width: 680px) {
  .square-stage {
    padding: 16px;
    gap: 9px;
  }

  h1 {
    font-size: clamp(28px, 8.2vw, 46px);
  }

  .store-actions {
    max-width: 220px;
    gap: 16px;
  }

  .store-badge {
    min-height: 34px;
    padding: 0 10px;
    font-size: 10px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .lead {
    max-width: none;
    font-size: 13px;
  }

  .spec-row {
    margin-top: 10px;
  }

  .video-panel {
    min-height: 0;
  }

  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feature-item {
    padding: 9px;
  }

  .feature-item p {
    display: none;
  }

  .media-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .company-footer {
    grid-template-columns: 1fr 1.7fr;
    gap: 6px 10px;
    font-size: 8px;
  }

  .company-footer strong {
    grid-row: span 3;
    font-size: 12px;
  }
}
