:root {
  color-scheme: dark;
  --bg: #050607;
  --panel: #111217;
  --panel-soft: #171920;
  --line: rgba(255, 255, 255, 0.13);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.66);
  --dim: rgba(255, 255, 255, 0.46);
  --racing-red: #e63836;
  --amber: #ffb300;
  --steel: #526e8c;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.app-document {
  background-color: #2a0f13;
}

.logo-stage {
  position: relative;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 72px);
  overflow: hidden;
}

.logo-stage img {
  display: block;
  width: min(1040px, 86vw);
  max-height: calc(100svh - clamp(48px, 12vw, 144px));
  height: auto;
  object-fit: contain;
}

.front-link {
  position: absolute;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.front-link:hover {
  color: var(--text);
}

.app-page {
  --content-gutter: max(32px, calc((100vw - 1480px) / 2));
  position: relative;
  background-color: #2a0f13;
  background:
    linear-gradient(145deg, rgba(230, 56, 54, 0.18), rgba(5, 6, 7, 0) 38%),
    linear-gradient(180deg, #090a0d 0%, var(--bg) 62%);
}

.app-page main {
  width: min(1480px, calc(100% - 64px));
  margin: 0 auto;
}

.app-hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(430px, 0.82fr) minmax(560px, 1.18fr);
  align-items: center;
  gap: clamp(44px, 6vw, 104px);
  padding: clamp(76px, 7vw, 104px) 0 clamp(44px, 7vw, 84px);
}

.app-hero__copy {
  display: grid;
  justify-items: start;
  gap: 24px;
}

.app-hero__media {
  display: grid;
  gap: clamp(56px, 6vw, 88px);
}

.brand-link {
  position: absolute;
  top: clamp(20px, 2.2vw, 32px);
  left: var(--content-gutter);
  z-index: 10;
  display: inline-flex;
  width: clamp(76px, 6vw, 88px);
  opacity: 0.9;
  transition: opacity 160ms ease;
}

.brand-link:hover {
  opacity: 1;
}

.brand-link img,
.app-icon,
.phone-frame img {
  display: block;
  max-width: 100%;
}

.app-title-lockup {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  width: min(100%, 620px);
}

.app-icon {
  width: 88px;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(230, 56, 54, 0.26);
}

.eyebrow {
  margin: 0;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-hero h1,
.section-heading h2,
.split-band h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 0.95;
}

.app-hero h1 {
  max-width: 100%;
  font-size: clamp(3.05rem, 4.6vw, 4.6rem);
  overflow-wrap: normal;
  white-space: nowrap;
}

.hero-copy {
  max-width: 590px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1.02rem, 1.8vw, 1.28rem);
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.app-hero__media .hero-actions {
  justify-content: center;
}

.app-hero__copy .hero-actions--desktop {
  display: flex;
}

.app-hero__media .hero-actions--mobile {
  display: none;
}

.primary-action {
  width: min(100%, 430px);
  min-height: 128px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 12%, rgba(230, 56, 54, 0.2), rgba(230, 56, 54, 0) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028));
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.primary-action:hover {
  transform: translateY(-1px);
  border-color: rgba(230, 56, 54, 0.46);
  box-shadow: 0 28px 76px rgba(230, 56, 54, 0.18);
}

.primary-action__eyebrow {
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.primary-action__title {
  font-size: clamp(1.18rem, 2vw, 1.42rem);
  font-weight: 900;
  line-height: 1.05;
}

.primary-action__subtitle {
  max-width: 32ch;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.42;
}

.phone-showcase {
  min-height: 760px;
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.phone-frame {
  position: absolute;
  width: min(316px, 23vw);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #0b0c10;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.phone-frame--front {
  right: 0;
  top: 34px;
  z-index: 2;
}

.phone-frame--rear {
  left: 0;
  top: 56px;
  opacity: 0.88;
  z-index: 1;
}

.phone-frame--third {
  left: 50%;
  top: 118px;
  transform: translateX(-50%);
  opacity: 0.94;
  z-index: 4;
}

.feature-band,
.split-band {
  border-top: 1px solid var(--line);
  padding: clamp(48px, 8vw, 86px) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2,
.split-band h2 {
  font-size: clamp(2.25rem, 3.8vw, 3.55rem);
  line-height: 1.02;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.feature-grid article {
  min-height: 236px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.feature-grid span {
  color: var(--racing-red);
  font-weight: 900;
}

.feature-grid h3 {
  margin: 0;
  font-size: 1.3rem;
}

.feature-grid p,
.split-band > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.56;
}

.split-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: clamp(28px, 7vw, 80px);
  align-items: start;
}

.split-band > p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.app-footer {
  display: flex;
  justify-content: center;
  padding: 26px 0 42px;
  border-top: 1px solid var(--line);
}

.app-footer a {
  color: var(--muted);
  font-size: 0.94rem;
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--text);
}

@media (max-width: 1180px) {
  .app-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 52px;
  }

  .phone-showcase {
    min-height: 720px;
  }

  .phone-frame {
    width: min(300px, 30vw);
  }

  .phone-frame--front {
    right: 0;
  }

  .phone-frame--rear {
    top: 80px;
  }

  .phone-frame--third {
    left: 50%;
    top: 124px;
    transform: translateX(-50%);
  }

  .app-hero__copy .hero-actions--desktop {
    display: none;
  }

  .app-hero__media .hero-actions--mobile {
    display: flex;
  }
}

@media (max-width: 900px) {
  .app-page {
    --content-gutter: max(14px, calc((100vw - 680px) / 2));
  }

  .app-page main {
    width: min(100% - 28px, 680px);
  }

  .app-hero {
    padding: 104px 0 54px;
  }

  .phone-showcase {
    min-height: 720px;
  }

  .phone-frame {
    width: min(260px, 68vw);
  }

  .phone-frame--front {
    right: 0;
    top: 42px;
  }

  .phone-frame--rear {
    left: 0;
    top: 128px;
  }

  .phone-frame--third {
    left: 50%;
    right: auto;
    top: 92px;
    transform: translateX(-50%);
  }

  .app-title-lockup {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 18px;
    width: 100%;
  }

  .app-icon {
    width: 82px;
  }

  .feature-grid,
  .split-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-hero h1 {
    max-width: 100%;
    font-size: clamp(2.4rem, 11.8vw, 3.05rem);
  }

  .primary-action {
    min-height: 122px;
    padding: 18px;
  }

  .primary-action__subtitle {
    font-size: 0.92rem;
  }

  .brand-link {
    width: 62px;
    top: 24px;
  }

  .app-title-lockup {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
  }

  .app-icon {
    width: 62px;
  }

  .phone-showcase {
    min-height: 660px;
  }

  .phone-frame {
    width: min(236px, 70vw);
  }

  .phone-frame--front {
    right: 0;
    top: 24px;
  }

  .phone-frame--rear {
    left: 0;
    top: 150px;
  }

  .phone-frame--third {
    left: 50%;
    right: auto;
    top: 92px;
    transform: translateX(-50%);
  }

  .feature-grid article {
    min-height: auto;
  }
}
