:root {
  color-scheme: light;
  --ink: oklch(24% 0.018 252);
  --muted: oklch(45% 0.018 252);
  --soft: oklch(66% 0.014 252);
  --paper: oklch(97% 0.008 86);
  --surface: oklch(99% 0.006 86);
  --surface-strong: oklch(94% 0.012 86);
  --line: oklch(86% 0.012 252);
  --accent: oklch(49% 0.12 155);
  --accent-ink: oklch(98% 0.006 155);
  --accent-soft: oklch(91% 0.05 155);
  --phone-edge: oklch(17% 0.012 252);
  --phone-metal: oklch(32% 0.014 252);
  --shadow: 0 28px 80px oklch(25% 0.018 252 / 18%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--paper) 0%, oklch(94% 0.014 92) 100%);
  min-width: 320px;
}

body.phone-scroll-locked {
  position: fixed;
  top: var(--locked-scroll-y, 0);
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

a {
  color: inherit;
}

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: oklch(31% 0.076 155);
  font: 0.92em ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  padding: 0.08rem 0.28rem;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: 56px;
  padding: 48px 0 44px;
}

.hero-copy {
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 10ch;
  margin-bottom: 20px;
  font-size: 4rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 62ch;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.62;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 720;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    color 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.primary-link {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 18px;
}

.primary-link:hover {
  background: oklch(43% 0.118 155);
  transform: translateY(-1px);
}

.secondary-link {
  border: 1px solid var(--line);
  background: oklch(98% 0.006 86 / 74%);
  color: var(--ink);
  padding: 0 16px;
}

.secondary-link:hover {
  border-color: oklch(75% 0.022 252);
  background: var(--surface);
  transform: translateY(-1px);
}

.primary-link:focus-visible,
.secondary-link:focus-visible {
  outline: 3px solid oklch(75% 0.08 155 / 52%);
  outline-offset: 3px;
}

.demo-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.demo-facts div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.demo-facts dt {
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 760;
}

.demo-facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.46;
}

.device-area {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.phone-frame {
  width: min(100%, 390px);
  aspect-ratio: 390 / 844;
  filter: drop-shadow(var(--shadow));
  overscroll-behavior: contain;
}

.phone-hardware {
  position: relative;
  width: 100%;
  height: 100%;
  border: 2px solid oklch(11% 0.012 252);
  border-radius: 54px;
  background:
    linear-gradient(135deg, var(--phone-metal), var(--phone-edge) 42%, oklch(43% 0.014 252));
  padding: 13px;
}

.phone-hardware::before {
  position: absolute;
  inset: 5px;
  border: 1px solid oklch(74% 0.01 252 / 32%);
  border-radius: 48px;
  content: "";
  pointer-events: none;
}

.phone-buttons .button {
  position: absolute;
  width: 3px;
  border-radius: 999px;
  background: oklch(28% 0.012 252);
}

.button-left-top {
  height: 46px;
  left: -4px;
  top: 138px;
}

.button-left-bottom {
  height: 64px;
  left: -4px;
  top: 204px;
}

.button-right {
  height: 78px;
  right: -4px;
  top: 178px;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid oklch(6% 0.006 252);
  border-radius: 42px;
  background: oklch(10% 0.01 252);
  isolation: isolate;
  overscroll-behavior: contain;
}

.dynamic-island {
  position: absolute;
  z-index: 3;
  top: 11px;
  left: 50%;
  width: 112px;
  height: 33px;
  border-radius: 999px;
  background: oklch(6% 0.005 252);
  transform: translateX(-50%);
  box-shadow: 0 1px 0 oklch(100% 0 0 / 8%) inset;
  pointer-events: none;
}

.phone-screen iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--surface);
  overscroll-behavior: contain;
}

.iframe-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 32px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
  transition:
    opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.loader {
  width: 34px;
  height: 34px;
  justify-self: center;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

.phone-frame[data-frame-state="loaded"] .iframe-loading {
  visibility: hidden;
  opacity: 0;
}

.phone-frame[data-frame-state="fallback"] .iframe-loading {
  color: var(--ink);
}

.phone-frame[data-frame-state="fallback"] .loader {
  display: none;
}

.frame-caption {
  max-width: 42ch;
  margin: 0;
  color: var(--soft);
  font-size: 0.85rem;
  line-height: 1.48;
  text-align: center;
}

.details {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 36px;
  border-top: 1px solid var(--line);
  padding: 44px 0 64px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 1.8rem;
  line-height: 1.15;
  letter-spacing: 0;
}

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

.detail-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(98% 0.006 86 / 72%);
  padding: 20px;
}

.detail-grid h3 {
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.22;
}

.detail-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.52;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .page-shell {
    width: min(100% - 32px, 760px);
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 38px;
  }

  .hero-copy {
    max-width: none;
  }

  h1 {
    max-width: none;
    font-size: 3.1rem;
  }

  .lede {
    max-width: 66ch;
  }

  .device-area {
    align-self: start;
  }

  .phone-frame {
    width: min(390px, 100%);
  }

  .details {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

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

  .hero {
    gap: 30px;
    padding: 28px 0 34px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .lede {
    font-size: 1rem;
    line-height: 1.56;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 28px;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .demo-facts,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    width: min(100%, 330px);
  }

  .phone-hardware {
    border-radius: 46px;
    padding: 11px;
  }

  .phone-hardware::before {
    border-radius: 41px;
  }

  .phone-screen {
    border-radius: 35px;
  }

  .dynamic-island {
    width: 96px;
    height: 29px;
  }

  .details {
    padding-bottom: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
