@font-face {
  font-family: Inter;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif';
  src: url('/fonts/source-serif-4-latin-opsz-normal.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif';
  src: url('/fonts/source-serif-4-latin-opsz-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
}
:root {
  --paper: #fff9ef;
  --ink: #192c48;
  --quiet: #516075;
  --blue: #2356c3;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body, h1, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; height: auto; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.skip { position: fixed; top: -8rem; left: 1rem; z-index: 5; padding: .6rem; background: white; }
.skip:focus { top: 1rem; }

.page {
  --gutter: clamp(22px, 5.5vw, 100px);
  --vertical: clamp(14px, 3.8vh, 44px);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(min-content, 1fr) auto;
  height: 100vh;
  height: 100svh;
  padding: max(var(--vertical), env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right))
    max(var(--vertical), env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  background: radial-gradient(ellipse at 78% 52%, #fff2cf 0%, #fff6e2 27%, transparent 57%), var(--paper);
}
.frame { width: 100%; max-width: 1480px; margin-inline: auto; }
.top, .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand img:first-child { width: clamp(25px, 2.4vw, 34px); border-radius: 24%; }
.wordmark { width: clamp(100px, 10vw, 146px); }
.availability, .foot { color: var(--quiet); font-size: clamp(11px, .94vw, 13px); }
.availability { display: inline-flex; align-items: center; gap: .65em; }
.availability::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #b47a1b; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(14px, 3.7vw, 68px);
  align-items: center;
  min-width: 0;
  padding-block: clamp(8px, 2.4svh, 30px);
}
.copy { min-width: 0; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: .9em;
  font-size: clamp(10px, .85vw, 12px);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--quiet);
}
.eyebrow::before { content: ''; width: 2.15em; height: 1px; background: #b47a1b; }
h1 {
  margin-block: clamp(14px, 2.5svh, 28px) clamp(16px, 2.8svh, 30px);
  font: 450 clamp(40px, min(6.25vw, 10.6svh), 102px)/.99 'Source Serif', Georgia, serif;
  font-optical-sizing: auto;
  letter-spacing: -.055em;
}
h1 span, h1 em { display: block; }
h1 em { color: var(--blue); font-weight: 420; }
.descriptions {
  display: grid;
  max-width: 35ch;
  font-size: clamp(15px, min(1.45vw, 2.6svh), 20px);
  line-height: 1.48;
  color: var(--quiet);
}
.descriptions p, .phone-stack img { grid-area: 1 / 1; }
[data-scene] { visibility: hidden; opacity: 0; pointer-events: none; }
[data-scene].current { visibility: visible; opacity: 1; pointer-events: auto; }
.choices {
  display: inline-flex;
  gap: 3px;
  margin-top: clamp(14px, 3.6svh, 38px);
  padding: 3px;
  border: 1px solid #ddd4c0;
  border-radius: 100px;
  background: #fffcf6;
}
.choices[hidden] { display: none; }
.choices button {
  min-width: 4.1em;
  min-height: 36px;
  padding: .35em .9em;
  border: 0;
  border-radius: inherit;
  font-size: clamp(12px, .95vw, 14px);
  font-weight: 550;
  color: var(--quiet);
  background: transparent;
}
.choices button:hover { color: var(--ink); background: #f3ecdc; }
.choices button[aria-pressed="true"] { background: var(--ink); color: white; }

.visual {
  position: relative;
  align-self: stretch;
  display: grid;
  place-items: center;
  container-type: size;
  min-height: 0;
  min-width: 0;
}
.cluster {
  --unit: min(85cqh, (100cqh - 44px) / 1.09, 84cqw, 570px);
  width: calc(1.12 * var(--unit));
  height: calc(1.09 * var(--unit));
  position: relative;
}
.cluster::before, .cluster::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border: 1px solid #b18b4e28;
  border-radius: 50%;
  width: 90%;
  height: 70%;
  top: 20%;
  left: 6%;
  transform: rotate(-21deg);
}
.cluster::after { width: 98%; height: 77%; top: 16.5%; left: 2%; border-color: #b18b4e16; }
.device {
  position: absolute;
  z-index: 1;
  transform: translate(var(--dx, 0px), var(--dy, 0px));
  transition: transform .65s var(--ease);
}
.device img { width: 100%; user-select: none; -webkit-user-select: none; }
.ipad { width: 68.5%; left: 29.5%; top: 0; --delay: .15s; --lift: -2px; }
.duo { z-index: 2; width: 50%; left: 0; top: 55%; --delay: .28s; --lift: -3px; }
.iphone { z-index: 3; width: 25.4%; left: 71.4%; top: 45.8%; --delay: .41s; --lift: -4px; }
.phone-stack { display: grid; }
.foot { line-height: 1.3; }
.foot nav { display: flex; align-items: center; gap: clamp(12px, 1.75vw, 28px); }
.foot a { display: inline-flex; align-items: center; min-height: 32px; }
.foot a:hover { text-decoration: underline; text-underline-offset: .3em; color: var(--ink); }

@media (orientation: portrait) {
  .page {
    --gutter: clamp(18px, 5.8vw, 64px);
    --vertical: clamp(10px, 2.4svh, 38px);
    background: radial-gradient(ellipse at 54% 73%, #ffedc6, transparent 57%), var(--paper);
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(8px, 2svh, 26px);
    padding-block: clamp(12px, 4.5svh, 72px) clamp(4px, 1svh, 16px);
  }
  .copy { text-align: center; }
  .eyebrow { justify-content: center; }
  .eyebrow::after { content: ''; width: 2.15em; height: 1px; background: #b47a1b; }
  h1 { font-size: clamp(40px, min(8.3vw, 6.7svh), 90px); margin-block: .2em .25em; }
  .descriptions { margin-inline: auto; max-width: 36ch; font-size: clamp(14px, min(2.35vw, 2svh), 20px); }
  .choices { margin-top: clamp(10px, 1.6svh, 22px); }
  .cluster { --unit: min(87cqh, (100cqh - 44px) / 1.09, 84cqw, 680px); }
}
@media (orientation: portrait) and (max-width: 600px) {
  .copy { text-align: left; }
  .eyebrow { justify-content: flex-start; }
  .eyebrow::after { content: none; }
  h1 { font-size: clamp(39px, min(12vw, 7.4svh), 66px); }
  .descriptions { margin-inline: 0; }
  .choices button { min-width: 4.4em; }
}
@media (orientation: landscape) and (max-height: 530px) {
  .page { --vertical: 8px; --gutter: clamp(18px, 4vw, 42px); }
  .eyebrow { display: none; }
  h1 { margin: 0 0 10px; font-size: clamp(32px, min(6.5vw, 11.8svh), 55px); }
  .descriptions { font-size: 14px; line-height: 1.35; }
  .choices { margin-top: 10px; }
  .choices button { min-height: 30px; }
}
@media (orientation: portrait) and (max-height: 680px) {
  .eyebrow { display: none; }
  .hero { padding-top: 10px; gap: 4px; }
  h1 { margin-top: 0; }
}

/* Text and devices settle once. Only a fine pointer adds ongoing movement. */
@media (prefers-reduced-motion: no-preference) {
  html:not(.editing) h1 > *, html:not(.editing) .eyebrow,
  html:not(.editing) .descriptions, html:not(.editing) .choices {
    animation: rise .95s var(--ease) var(--reveal, 0s) backwards;
  }
  h1 span { --reveal: .07s; }
  h1 em { --reveal: .17s; }
  .descriptions { --reveal: .24s; }
  .choices { --reveal: .3s; }
  html:not(.editing) .device-enter { animation: arrive 1.25s var(--ease) var(--delay) backwards; }
  html:not(.editing) .device-enter > * { animation: settle 3.5s ease-in-out calc(1.25s + var(--delay)) 1; }
  [data-scene] { transition: opacity .24s ease, visibility 0s linear .24s; }
  [data-scene].current { transition-delay: 0s; }
  .choices button { transition: background .25s, color .25s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(.2em); } }
@keyframes arrive { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes settle { 50% { transform: translateY(var(--lift)); } }
@media (prefers-reduced-motion: reduce) {
  .device { transform: none; transition: none; }
}
