/* Demo page — uses the existing RoadSafetyInsights design tokens from style.css */

.demo-hero {
  position: relative;
  overflow: hidden;
  padding: 150px 0 112px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(124, 196, 255, 0.13), transparent 32%),
    radial-gradient(circle at 80% 32%, rgba(255, 106, 31, 0.10), transparent 28%),
    var(--navy);
}

.demo-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.demo-hero__inner {
  position: relative;
  z-index: 1;
}

.demo-intro {
  max-width: 780px;
  margin: 0 auto 54px;
  text-align: center;
}

.demo-intro .eyebrow {
  color: var(--orange-2);
}

.demo-intro h1 {
  margin-top: 14px;
  font-size: clamp(48px, 7vw, 86px);
  line-height: .94;
}

.demo-intro h1 em {
  display: block;
  color: var(--sky);
}

.demo-intro > p:last-child {
  max-width: 690px;
  margin: 24px auto 0;
  color: #b9d0e5;
  font-size: clamp(16px, 2vw, 19px);
}

.demo-device-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.android-phone {
  --phone-width: min(390px, 78vw);
  position: relative;
  width: var(--phone-width);
  aspect-ratio: 9 / 19.6;
  padding: 10px;
  border-radius: 52px;
  background: linear-gradient(145deg, #343a41, #050608 24%, #12161a 70%, #3f454c);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow:
    0 38px 90px rgba(0,0,0,.54),
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 0 80px rgba(124,196,255,.09);
}

.android-phone::before,
.android-phone::after {
  content: "";
  position: absolute;
  right: -4px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: #242a30;
}

.android-phone::before {
  top: 23%;
  height: 72px;
}

.android-phone::after {
  top: 35%;
  height: 110px;
}

.android-phone__screen {
  position: absolute;
  inset: 10px;
  overflow: hidden;
  border-radius: 43px;
  background: #05080c;
}

.app-demo-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #05080c;
}

.android-phone__speaker {
  position: absolute;
  z-index: 4;
  top: 17px;
  left: 50%;
  width: 68px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #050505;
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
  pointer-events: none;
}

.android-phone__camera {
  position: absolute;
  z-index: 4;
  top: 15px;
  left: calc(50% + 47px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #071321;
  box-shadow: 0 0 0 2px #050505;
  pointer-events: none;
}

.android-phone__gesture {
  position: absolute;
  z-index: 4;
  bottom: 18px;
  left: 50%;
  width: 112px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: rgba(255,255,255,.78);
  pointer-events: none;
}

.demo-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  color: #a9c8e6;
  font-size: 13px;
  letter-spacing: .025em;
}

.demo-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
}

.demo-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(255,106,31,.14);
}

.demo-architecture {
  background: #fff;
}

.diagram-card {
  margin: 44px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--sh);
}

.diagram-card a {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}

.diagram-card img {
  width: 100%;
  height: auto;
}

.diagram-card figcaption {
  margin-top: 12px;
  color: var(--ink-soft);
  text-align: center;
  font-size: 12px;
}

.demo-details .head {
  margin-bottom: 40px;
}

.demo-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.demo-info-card {
  position: relative;
  min-height: 250px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.demo-info-card__no {
  display: block;
  margin-bottom: 34px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--orange);
}

.demo-info-card h3 {
  font-size: 27px;
  color: var(--navy);
}

.demo-info-card p {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.demo-note {
  margin-top: 22px;
  padding: 20px 24px;
  border-left: 3px solid var(--orange);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.demo-note strong {
  color: var(--ink);
}

.demo-final-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
}

.demo-final-cta h2 {
  margin-top: 10px;
  font-size: clamp(34px, 4.6vw, 58px);
}

.demo-final-cta p:not(.eyebrow) {
  max-width: 650px;
  margin-top: 14px;
  color: var(--ink-soft);
}

@media (max-width: 880px) {
  .demo-hero {
    padding: 130px 0 80px;
  }

  .demo-info-grid {
    grid-template-columns: 1fr;
  }

  .demo-info-card {
    min-height: auto;
  }

  .demo-final-cta__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .android-phone {
    --phone-width: min(340px, 88vw);
    border-radius: 44px;
  }

  .android-phone__screen {
    border-radius: 36px;
  }

  .diagram-card {
    padding: 8px;
    border-radius: 16px;
  }

  .diagram-card a {
    overflow-x: auto;
  }

  .diagram-card img {
    min-width: 820px;
  }
}
