/* Screen Door site styles.
   Colors: Apple's web palette (apple.com), system SF type stack. The app icon keeps its own blue.
   Shape rule: panels and media 20px, controls are full pills. Device frames use their own
   hardware proportions (see .device). */

:root {
  /* Apple web palette */
  --blue: #0071e3;          /* Apple button blue */
  --blue-hover: #0066cc;    /* darker on hover so white text stays above 4.5:1 */
  --on-blue: #ffffff;
  --bg: #f5f5f7;            /* Apple light gray page */
  --surface: #ffffff;
  --tint: #fafafc;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --link: #0066cc;          /* Apple link blue */
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 18px 48px -12px rgb(0 0 0 / .14);
  --r: 20px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #161617;
    --tint: #1d1d1f;
    --ink: #f5f5f7;
    --muted: #86868b;
    --line: #424245;
    --link: #2997ff;        /* Apple link blue, dark */
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 24px 56px -16px rgb(0 0 0 / .6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 17px/1.55 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 6px; }
h1, h2 { margin: 0; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap-wide { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* Solid cobalt with the screen-door mesh from the app icon */
.mesh {
  background-color: var(--blue);
  background-image:
    linear-gradient(rgb(255 255 255 / .08) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgb(255 255 255 / .08) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  color: var(--on-blue);
}

/* Device frames around real screenshots. Sizes are in container units (cqw = 1% of the
   device's width), so bezel, corners and the camera keep hardware proportions at any size. */
.device { container-type: inline-size; }
.device-body {
  position: relative;
  background: #0b0c0f;
  box-shadow:
    inset 0 0 0 .35cqw #23262c,          /* inner edge of the bezel */
    0 0 0 .45cqw #61666f,                /* metal rim */
    0 0 0 .7cqw #2a2d33,                 /* outer edge */
    0 2.5cqw 5cqw -1.5cqw rgb(0 0 0 / .22),
    0 8cqw 14cqw -6cqw rgb(0 0 0 / .26);
}
.device-body img { width: 100%; }
.iphone .device-body { padding: 2.9cqw; border-radius: 15.6cqw; }
.iphone .device-body img { border-radius: 12.7cqw; }
.iphone .device-body::after {             /* Dynamic Island */
  content: ""; position: absolute; left: 50%; top: 5.3cqw;
  width: 27cqw; height: 7.9cqw; transform: translateX(-50%);
  background: #000; border-radius: 99px;
}
.ipad .device-body { padding: 2.2cqw; border-radius: 3.9cqw; }
.ipad .device-body img { border-radius: 1.8cqw; }
.ipad .device-body::after {               /* front camera, landscape */
  content: ""; position: absolute; left: 50%; top: .85cqw;
  width: .55cqw; height: .55cqw; transform: translateX(-50%);
  background: #1c2230; border-radius: 50%;
}
@media (prefers-color-scheme: dark) {
  .device-body {
    box-shadow:
      inset 0 0 0 .35cqw #23262c,
      0 0 0 .45cqw #6d727c,
      0 0 0 .7cqw #3a3e46,
      0 2.5cqw 5cqw -1.5cqw rgb(0 0 0 / .5),
      0 8cqw 14cqw -6cqw rgb(0 0 0 / .6);
  }
}
/* A slot that a device overflows; the parent clips it, so only the top of the device shows. */
.device-slot { flex: 1 0 0; min-height: 0; contain: size; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 120px;
}
.hero-icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: var(--shadow); margin-bottom: 32px; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--link); margin-bottom: 12px; }
.hero h1 { font-size: clamp(48px, 5.6vw, 80px); white-space: nowrap; letter-spacing: -0.04em; line-height: 1; }
.lede { font-size: clamp(20px, 1.9vw, 24px); line-height: 1.4; color: var(--muted); margin: 20px 0 36px; max-width: 26ch; }
.lede strong { display: block; margin-top: .3em; color: var(--ink); font-weight: 600; }
.button {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px;
  border-radius: 999px; background: var(--blue); color: var(--on-blue);
  font-weight: 600; font-size: 17px; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, transform .2s var(--ease);
}
.button:hover { background-color: var(--blue-hover); }
.button:active { transform: scale(.98); }

.hero-stage { position: relative; aspect-ratio: 4 / 3; }
.stage-ipad { position: absolute; right: 0; top: 2%; width: 88%; }
.stage-phone { position: absolute; left: 1%; bottom: 0; width: 25%; }

/* Statement band */
.statement { padding-top: 24px; padding-bottom: 120px; }
.statement p {
  font-size: clamp(30px, 4.2vw, 56px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  padding-top: 48px; border-top: 1px solid var(--line);
}

/* Feature bento: 6 items, 6 cells */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(220px, auto);
  gap: 16px;
  padding-bottom: 128px;
}
.cell {
  position: relative; overflow: hidden;
  border-radius: var(--r);
  background-color: var(--surface);
  border: 1px solid var(--line);
  padding: 32px;
  display: flex; flex-direction: column; gap: 10px;
}
.cell h2 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; }
.cell p { color: var(--muted); max-width: 44ch; }
.cell.tint { background: var(--tint); border-color: transparent; }
.cell.accent {
  border: 0;
  background-color: var(--blue);
  background-image:
    linear-gradient(rgb(255 255 255 / .08) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgb(255 255 255 / .08) 1.5px, transparent 1.5px);
}
.cell.accent p { color: var(--on-blue); }
.cell-find { grid-row: span 2; padding-bottom: 0; }
.cell-find .device-slot { padding-top: 28px; min-height: 300px; }
.cell-find .device { width: 72%; margin: 0 auto; }
.cell-install { grid-column: span 2; justify-content: flex-end; }
.cell-install h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.03em; max-width: 16ch; }
.cell-install p { font-size: 19px; max-width: 52ch; }
.cell-touch { justify-content: flex-end; }
.cell-ipad {
  grid-column: span 2;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 32px; align-items: start;
  padding-right: 0; padding-bottom: 0;
}
.cell-ipad .cell-text { display: flex; flex-direction: column; gap: 10px; padding-bottom: 32px; }
.cell-ipad .device-slot { align-self: stretch; position: relative; min-height: 220px; }
.cell-ipad .device { position: absolute; left: 0; top: 4px; width: 150%; }
.cell-away, .cell-private { justify-content: flex-end; }

/* Keys */
.keys { padding-bottom: 128px; }
.keys-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px; align-items: start;
  background: var(--tint); border-radius: var(--r);
  padding: 0 72px 72px; overflow: hidden;
}
.keys-copy { align-self: center; padding-top: 72px; }
.keys-copy h2, .vision-copy h2, .setup h2 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -0.035em; }
.keys-copy p, .vision-copy p { font-size: 19px; color: var(--muted); margin-top: 16px; max-width: 46ch; }
.keys-phone { width: min(100%, 300px); justify-self: center; margin-top: -32%; }

/* Vision Pro */
.vision { padding-bottom: 128px; }
.vision-copy { margin-bottom: 48px; }
.vision-shot { width: 100%; border-radius: var(--r); box-shadow: var(--shadow); }

/* Setup */
.setup { padding-bottom: 120px; }
.steps {
  list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding-top: 24px; border-top: 2px solid var(--blue);
  font-size: 19px; line-height: 1.5;
}
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 12px;
  font-size: 15px; font-weight: 700; color: var(--link);
  font-variant-numeric: tabular-nums;
}
.note { color: var(--muted); margin-top: 48px; max-width: 62ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 48px; }
.site-footer nav { display: flex; flex-wrap: wrap; column-gap: 24px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
.legal { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* Privacy and support */
.doc { max-width: 760px; padding-top: 32px; padding-bottom: 96px; }
.doc .back { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: none; margin-bottom: 40px; }
.doc .back:hover { text-decoration: underline; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.035em; margin-bottom: 16px; }
.doc h2 { font-size: 24px; letter-spacing: -0.02em; margin: 56px 0 12px; }
.doc p, .doc ul { margin: 0 0 16px; max-width: 66ch; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 10px; }
.doc li::marker { color: var(--link); }

/* Motion: hero enters in sequence, sections rise as they scroll in. */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes settle { from { opacity: 0; transform: translateY(32px) scale(.98); } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; }
  .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .hero-copy > :nth-child(4) { animation-delay: .18s; }
  .hero-copy > :nth-child(5) { animation-delay: .24s; }
  .hero-stage { animation: settle 1.1s var(--ease) .15s both; }
  .stage-phone { animation: rise 1.1s var(--ease) .45s both; }
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}

/* Tablet: stack the hero, keep the device pair */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; min-height: 0; padding-top: 56px; padding-bottom: 72px; }
  .lede { max-width: 32ch; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
  .cell-install { grid-column: span 1; }
  .cell-private { grid-column: span 1; }
  .keys-panel { padding: 0 40px 48px; gap: 32px; }
  .keys-copy { padding-top: 48px; }
  .steps { gap: 28px; }
}

/* Mobile: single column everywhere */
@media (max-width: 767px) {
  body { font-size: 16px; }
  .wrap, .wrap-wide { padding: 0 20px; }
  .hero { padding-top: 40px; padding-bottom: 56px; gap: 40px; }
  .hero-icon { width: 72px; height: 72px; border-radius: 16px; margin-bottom: 24px; }
  .stage-phone { width: 31%; left: 0; }
  .stage-ipad { width: 86%; }
  .hero h1 { white-space: normal; font-size: clamp(40px, 12.5vw, 56px); }
  .lede { margin: 16px 0 28px; }
  .statement { padding-bottom: 72px; }
  .statement p { padding-top: 32px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; padding-bottom: 72px; }
  .cell, .cell-find, .cell-install, .cell-ipad, .cell-private { grid-column: auto; grid-row: auto; padding: 28px; }
  .cell-find { padding-bottom: 0; }
  .cell-find .device { width: 66%; }
  .cell-find .device-slot { min-height: 320px; }
  .cell-ipad { grid-template-columns: 1fr; padding-right: 0; padding-bottom: 0; }
  .cell-ipad .cell-text { padding-right: 28px; padding-bottom: 24px; }
  .keys { padding-bottom: 72px; }
  .keys-panel { grid-template-columns: 1fr; padding: 0 28px 36px; gap: 28px; }
  .keys-copy { padding-top: 0; }
  .keys-phone { width: min(78%, 260px); order: -1; margin-top: -30%; }
  .vision { padding-bottom: 72px; }
  .vision-copy { margin-bottom: 32px; }
  .setup { padding-bottom: 72px; }
  .steps { grid-template-columns: 1fr; gap: 28px; margin-top: 32px; }
  .doc { padding-bottom: 72px; }
}

/* Line the footer up with the text column on privacy and support */
.doc + .site-footer .wrap { max-width: 760px; }

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
  .button:active { transform: none; }
}
