:root {
  --bg: #111111;
  --bg-soft: #1a1a1a;
  --text: #f5f5f2;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --button: #0a84ff;
  --shadow-xl: 0 48px 120px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.44);
  --radius-card: 1.35rem;
  --font-sf: "SF Pro Display", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 42%),
    linear-gradient(180deg, #1b1b1b 0%, #131313 36%, #101010 100%);
  color: var(--text);
  font-family: var(--font-sf);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

.viewport-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.page-shell {
  position: relative;
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-copy {
  padding: clamp(24px, 4vw, 56px) 0 0;
}

.hero-visual {
  min-height: 0;
  display: block;
  padding: clamp(28px, 4vw, 44px) 0 clamp(12px, 2vw, 24px);
}

.copy {
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  z-index: 20;
}

h1 {
  margin-inline: auto;
  max-width: 20ch;
  font-size: clamp(1.7rem, 3vw, 2.5em);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 650;
  text-wrap: balance;
}

.subline {
  margin: 18px auto 0;
  max-width: 72ch;
  color: var(--muted);
  font-size: clamp(1rem, 1vw, 1rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.hero-cta {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #1596ff 0%, #0075e8 100%);
  color: #f8fbff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 30px rgba(3, 117, 232, 0.35);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(3, 117, 232, 0.44);
  filter: brightness(1.03);
}

.hero-cta:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.device-stage {
  position: relative;
  width: 100%;
  height: clamp(360px, 50vh, 640px);
  min-height: 360px;
  max-height: 640px;
  margin: 0 auto;
  overflow: visible;
}

.device-stage::before {
  content: "";
  position: absolute;
  inset: 8% -8% -8%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
  filter: blur(18px);
  pointer-events: none;
}

.device-cluster {
  position: relative;
  width: min(1200px, 100%);
  height: 100%;
  margin: 0 auto;
  overflow: visible;
}

.device-frame {
  position: absolute;
  margin: 0;
  filter: drop-shadow(var(--shadow-lg));
  transition: transform 280ms ease, opacity 280ms ease;
}

.device-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.macbook-frame {
  width: min(65%, 760px);
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
  z-index: 1;
}

.ipad-frame {
  width: min(43%, 500px);
  left: 50%;
  bottom: -2%;
  transform: translateX(-72%);
  z-index: 3;
}

.iphone-frame {
  width: min(17%, 196px);
  left: 50%;
  bottom: -1.5%;
  transform: translateX(132%);
  z-index: 4;
}

.page-footer {
  position: relative;
  z-index: 4;
  padding-bottom: 10px;
}

.footer-inner {
  width: min(1380px, calc(100% - 30px));
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.82rem;
}

.footer-inner a,
.footer-inner a:visited {
  color: inherit;
}

@media (max-width: 1023px) {
  .page-shell {
    width: min(100% - 24px, 1100px);
  }

  .hero-copy {
    padding-top: 22px;
  }

  .hero-visual {
    padding-top: clamp(24px, 4vw, 36px);
  }

  .device-stage {
    height: clamp(320px, 44vh, 520px);
    min-height: 320px;
  }

  .macbook-frame {
    width: min(84%, 780px);
    left: 54%;
    bottom: 1%;
    opacity: 0.78;
    transform: translateX(-50%);
    z-index: 1;
  }

  .ipad-frame {
    width: min(64%, 560px);
    left: 50%;
    bottom: 5%;
    transform: translateX(-56%);
    z-index: 3;
  }

  .iphone-frame {
    width: min(20%, 176px);
    left: 50%;
    bottom: 1%;
    opacity: 1;
    transform: translateX(120%);
    z-index: 4;
  }
}

@media (min-width: 1280px) and (min-height: 900px) {
  .device-stage {
    height: clamp(420px, 54vh, 720px);
    max-height: 700px;
  }
}

@media (min-width: 1024px) and (max-height: 820px) {
  .hero-copy {
    padding-bottom: 18px;
  }

  .hero-visual {
    padding-top: clamp(44px, 7vh, 84px);
  }

  .device-stage {
    height: clamp(220px, 30vh, 320px);
    min-height: 220px;
  }

  .macbook-frame {
    width: min(58%, 620px);
    left: 50%;
    bottom: 0;
  }

  .ipad-frame {
    width: min(34%, 340px);
    left: 50%;
    bottom: 2%;
    transform: translateX(-68%);
  }

  .iphone-frame {
    width: min(12%, 136px);
    left: 50%;
    bottom: 1%;
    transform: translateX(124%);
  }
}

@media (max-width: 767px) {
  .viewport-shell {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .page-shell {
    width: min(100% - 18px, 760px);
  }

  .hero-copy {
    padding-top: 18px;
  }

  .hero-visual {
    padding-top: 20px;
  }

  h1 {
    max-width: 11ch;
    font-size: clamp(1.55rem, 7vw, 2.15rem);
  }

  .subline {
    max-width: 36ch;
    font-size: 0.97rem;
  }

  .hero-cta {
    min-height: 46px;
    width: min(100%, 240px);
  }

  .device-stage {
    height: clamp(280px, 40vh, 380px);
    min-height: 280px;
  }

  .macbook-frame {
    width: 132vw;
    left: -18vw;
    bottom: 3%;
    opacity: 1;
    transform: none;
    z-index: 1;
  }

  .ipad-frame {
    width: min(92vw, 520px);
    left: auto;
    right: -34vw;
    bottom: 5%;
    opacity: 1;
    transform: none;
    z-index: 2;
  }

  .iphone-frame {
    width: min(46vw, 188px);
    left: 50%;
    right: auto;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .device-frame,
  .hero-cta {
    transition: none;
  }
}
