:root {
  --black: #000;
  --ink: #1d1d1f;
  --paper: #f5f5f7;
  --white: #fff;
  --muted-dark: #86868b;
  --muted-light: #6e6e73;
  --lcd: #d3e5da;
  --lcd-ghost: #c8dbcf;
  --lcd-ink: #1c211e;
  --gold: #d6b46c;
  --blue: #2997ff;
  --radius-xl: 28px;
  --gutter: max(22px, env(safe-area-inset-left));
  --dot: 4px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
h1, h2, h3, p, figcaption { text-wrap: pretty; }
.hero-sub, .lede, .section-head p { text-wrap: balance; }
body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
sup { font-size: 0.6em; vertical-align: super; line-height: 0; opacity: 0.8; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ Section skins */
section { position: relative; padding: 140px var(--gutter); }
.dark { background: var(--black); color: var(--paper); }
.dark-soft { background: #0b0b0d; color: var(--paper); }
.light { background: var(--paper); color: var(--ink); }
.light-white { background: var(--white); color: var(--ink); }

.section-head { max-width: 980px; margin: 0 auto 72px; text-align: center; }
.eyebrow { font-size: 21px; font-weight: 600; letter-spacing: 0.004em; margin: 0 0 14px; color: var(--muted-dark); }
.eyebrow-ink { color: var(--muted-light); }
.eyebrow-gold { color: var(--gold); }
.lede { font-size: 21px; line-height: 1.38; font-weight: 500; max-width: 760px; margin: 28px auto 0; color: inherit; opacity: 0.86; }
.light .lede, .light-white .lede { color: var(--muted-light); opacity: 1; }
.light .lede, .light-white .lede { font-weight: 500; }

/* ------------------------------------------------------------ Dot headings */
.dot { margin: 0; font-weight: 700; font-size: 0; line-height: 0; --dot: 4.6px; }
.dot canvas { display: block; margin: 0 auto; }
.dot .dot-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hero-title { --dot: 6px; }
@media (max-width: 1068px) { .dot { --dot: 3.6px; } .hero-title { --dot: 5px; } }
@media (max-width: 734px) { .dot { --dot: 2.4px; } .hero-title { --dot: 3.2px; } }
@media (max-width: 380px) { .dot { --dot: 2.1px; } .hero-title { --dot: 2.7px; } }

/* ------------------------------------------------------------ Buttons */
.pill {
  display: inline-block; background: var(--blue); color: #fff; border-radius: 980px;
  padding: 12px 24px; font-size: 17px; font-weight: 400; letter-spacing: -0.01em;
  transition: background 0.2s;
}
.pill:hover { background: #0077ed; }
.pill-small { padding: 4px 12px; font-size: 12px; }
.link-arrow { color: var(--blue); font-size: 17px; }
.link-arrow::after { content: " ›"; }
.link-arrow:hover { text-decoration: underline; }

/* ------------------------------------------------------------ Local nav */
.localnav {
  position: sticky; top: 0; z-index: 50; height: 52px;
  background: rgba(22, 22, 23, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.localnav-inner { max-width: 1024px; height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.localnav-title { display: flex; align-items: center; margin-right: auto; }
.logo-canvas { display: block; }
.localnav-links { display: flex; gap: 22px; font-size: 12px; color: rgba(255,255,255,0.8); }
.localnav-links a:hover { color: #fff; }
@media (max-width: 734px) { .localnav-links { display: none; } }

/* ------------------------------------------------------------ Hero */
.hero { padding-top: 64px; padding-bottom: 0; text-align: center; overflow: hidden; }
.hero .eyebrow { font-size: 24px; color: #f5f5f7; margin-bottom: 24px; }
.hero-sub { font-size: 28px; line-height: 1.14; font-weight: 600; margin: 28px auto 0; max-width: 680px; letter-spacing: 0.007em; }
.hero-cta { display: flex; gap: 28px; justify-content: center; align-items: center; margin-top: 30px; flex-wrap: wrap; }
.hero-stage { position: relative; margin: 72px auto 0; width: min(380px, 78vw); }
.hero-glow {
  position: absolute; inset: 10% -60% -10%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(211, 229, 218, 0.28), rgba(211, 229, 218, 0.08) 55%, transparent 75%);
  filter: blur(10px);
}
.hero-phone { position: relative; z-index: 1; margin: 0 auto; transform: translateY(var(--hero-shift, 0px)); will-change: transform; }
@media (max-width: 734px) { .hero-sub { font-size: 21px; } section { padding: 96px var(--gutter); } .hero { padding-top: 48px; padding-bottom: 0; } }

/* ------------------------------------------------------------ Phone frame */
.phone {
  --bezel: 3.2%;
  position: relative; margin: 0; width: 100%;
  padding: var(--bezel);
  border-radius: 13.5% / 6.2%;
  background: linear-gradient(145deg, #3c3c40, #121214 35%, #2a2a2e 70%, #0c0c0e);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.14),
    inset 0 0 0 4px #050506,
    0 40px 80px -20px rgba(0,0,0,0.55),
    0 18px 36px -18px rgba(0,0,0,0.5);
}
.phone::before { /* punch-hole camera */
  content: ""; position: absolute; z-index: 3; top: calc(var(--bezel) + 1.6%); left: 50%;
  width: 3.4%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2b3640, #050608 60%);
  box-shadow: 0 0 0 1.5px #000;
}
.phone::after { /* side buttons */
  content: ""; position: absolute; right: -1.1%; top: 20%; width: 1.3%; height: 15%;
  border-radius: 0 3px 3px 0; background: linear-gradient(90deg, #1a1a1c, #3a3a3e);
  box-shadow: 0 160% 0 0 #2a2a2e;
}
.phone img { width: 100%; border-radius: 11% / 5%; background: #252525; }
.light .phone, .light-white .phone { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.18), inset 0 0 0 4px #050506, 0 40px 70px -24px rgba(0,0,0,0.35), 0 12px 24px -14px rgba(0,0,0,0.3); }

/* ------------------------------------------------------------ Intro scrub */
.intro { padding: 200px var(--gutter) 140px; }
.scrub { max-width: 920px; margin: 0 auto; font-size: clamp(30px, 4.6vw, 56px); line-height: 1.12; font-weight: 700; letter-spacing: -0.015em; }
.scrub span { color: #f5f5f7; opacity: 0.18; transition: opacity 0.25s linear; }
.scrub span.on { opacity: 1; }

/* ------------------------------------------------------------ Pixel zoom */
.zoom { padding: 0; height: 320vh; }
.zoom-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.zoom-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.zoom-card { position: absolute; left: 50%; transform: translate(-50%, 0); text-align: center; width: min(1100px, calc(100% - 44px)); transition: opacity 0.5s, transform 0.5s; }
.zoom-card-a { top: max(76px, 8vh); }
.zoom-card-b {
  bottom: 9vh; padding: 32px 36px; border-radius: var(--radius-xl);
  background: rgba(0,0,0,0.62); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  opacity: 0; transform: translate(-50%, 30px); max-width: 640px;
}
.zoom-card-b.show { opacity: 1; transform: translate(-50%, 0); }
.zoom-card-a.hide { opacity: 0; transform: translate(-50%, -20px); }
.zoom-card-b p { margin: 0; font-size: 19px; color: #d2d2d7; }
.big-num { font-size: clamp(48px, 8vw, 96px) !important; line-height: 1.05; font-weight: 700; color: #fff !important; margin-bottom: 14px !important; letter-spacing: -0.03em; }

/* ------------------------------------------------------------ Math */
.phone-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 64px); max-width: 1000px; margin: 0 auto; }
.phone-col { margin: 0; }
.phone-col figcaption { margin-top: 28px; text-align: center; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.lcd-chip {
  display: block; width: max-content; margin: 0 auto 12px; padding: 6px 14px; border-radius: 10px;
  background: var(--lcd); color: var(--lcd-ink); font-weight: 700; font-size: 19px; letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 980px; margin: 110px auto 0; text-align: center; }
.mini-stats p { margin: 0; color: var(--muted-light); font-weight: 600; }
.mini-num { font-size: clamp(36px, 4.8vw, 56px); line-height: 1.1; color: var(--ink) !important; font-weight: 700 !important; letter-spacing: -0.03em; margin-bottom: 10px !important; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; font-size: 0.5em; line-height: 1.05; text-align: center; }
.frac span:first-child { border-bottom: 3px solid currentColor; padding: 0 4px 2px; }
@media (max-width: 734px) {
  .phone-row { grid-template-columns: 1fr; max-width: 300px; gap: 72px; }
  .mini-stats { grid-template-columns: 1fr; gap: 48px; }
}

/* ------------------------------------------------------------ Equation */
.equation { background: radial-gradient(120% 90% at 80% 40%, #4d1b27 0%, #1d0a0f 45%, #000 80%); overflow: hidden; }
.equation-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; max-width: 1100px; margin: 0 auto; }
.equation-copy .dot canvas { margin: 0; }
.equation-copy .lede { margin-left: 0; color: #d2c3c6; }
.ticks { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 12px; font-weight: 600; font-size: 19px; }
.ticks li::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--gold); margin-right: 14px; box-shadow: 0 0 0 2px rgba(214,180,108,0.25); }
.equation-phones { position: relative; height: 640px; }
.eq-back, .eq-front { position: absolute; width: 270px; }
.eq-back { left: 4%; top: 0; transform: rotate(-6deg); opacity: 0.85; }
.eq-front { right: 4%; top: 70px; transform: rotate(4deg); }
.equation-phones .eq-back.in { transform: rotate(-6deg); }
.equation-phones .eq-front.in { transform: rotate(4deg); }
@media (max-width: 900px) {
  .equation-grid { grid-template-columns: 1fr; text-align: center; }
  .equation-copy .dot canvas { margin: 0 auto; }
  .equation-copy .lede { margin-left: auto; }
  .ticks { justify-items: center; }
  .equation-phones { height: 560px; max-width: 420px; width: 100%; margin: 0 auto; }
  .eq-back, .eq-front { width: 58%; }
}

/* ------------------------------------------------------------ Apps scrollytelling */
.apps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; max-width: 1040px; margin: 0 auto; }
.apps-sticky { position: sticky; top: 12vh; height: 76vh; display: flex; align-items: center; justify-content: center; }
.apps-phone { width: auto; height: 100%; max-height: 720px; aspect-ratio: 0.465; }
.apps-phone img { position: absolute; inset: var(--bezel); width: calc(100% - 2 * var(--bezel)); opacity: 0; transition: opacity 0.6s ease; }
.apps-phone img.is-on { opacity: 1; }
.app-panel { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; opacity: 0.28; transition: opacity 0.5s; }
.app-panel.is-on { opacity: 1; }
.app-panel h3 { font-size: 40px; line-height: 1.1; margin: 22px 0 14px; letter-spacing: -0.02em; }
.app-panel p { font-size: 19px; color: var(--muted-light); margin: 0; font-weight: 500; }
.app-panel p.panel-extra { margin-top: 14px; color: var(--ink); }
.phone-inline { display: none; }
@media (max-width: 834px) {
  .apps-grid { grid-template-columns: 1fr; }
  .apps-sticky { display: none; }
  .app-panel { min-height: 0; opacity: 1; text-align: center; padding: 48px 0; align-items: center; }
  .phone-inline { display: block; width: min(280px, 72vw); margin-top: 36px; }
}

/* LCD tiles (HOME icons drawn from the app's own bitmaps) */
.lcd-tile {
  display: inline-block; padding: 10px; border-radius: 14px;
  background: var(--lcd); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), inset 0 2px 6px rgba(0,0,0,0.08);
  line-height: 0; width: max-content;
}
.lcd-tile canvas { display: block; }

/* ------------------------------------------------------------ Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1040px; margin: 0 auto; }
.tile { background: #fff; border-radius: var(--radius-xl); padding: 40px; overflow: hidden; position: relative; min-height: 380px; display: flex; flex-direction: column; }
.tile h3 { font-size: 26px; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.015em; }
.tile p { margin: 0; color: var(--muted-light); font-weight: 500; }
.tile-wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.tile-dark { background: #000; color: #f5f5f7; }
.tile-dark p { color: #a1a1a6; }
.tile-lcd { background: var(--lcd); color: var(--lcd-ink); justify-content: flex-end; background-image: radial-gradient(rgba(0,0,0,0.06) 1px, transparent 1.4px); background-size: 6px 6px; }
.tile-lcd p { color: #42514a; font-size: 19px; }
.tile-kicker { font-weight: 700 !important; color: var(--lcd-ink) !important; }
.tile .tile-big { font-size: 120px; line-height: 1; font-weight: 800; color: var(--lcd-ink) !important; letter-spacing: -0.05em; margin: 6px 0 12px !important; }
.tile-image { justify-content: flex-end; }
.crop { border-radius: 16px; overflow: hidden; margin: -10px -10px 28px; flex: 1; position: relative; min-height: 160px; }
.crop img { position: absolute; left: 0; width: 100%; }
.crop-lcd img { top: -25%; width: 104%; left: -2%; }
.crop-keys { height: 100%; min-height: 280px; margin: 0; border-radius: 20px; }
.crop-keys img { top: -6%; }
.keycaps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.key {
  aspect-ratio: 1.25; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 30%, #4a4a4c, #2a2a2c 70%); color: #fff; font-weight: 700; font-size: 18px;
  box-shadow: 0 5px 0 #0c0c0d, inset 0 1px 0 rgba(255,255,255,0.12);
  transition: transform 0.12s, box-shadow 0.12s;
}
.key-shift { background: radial-gradient(ellipse at 50% 30%, #e8d3a6, #b99d64 70%); color: #2a2216; font-size: 22px; }
.key-format { grid-column: span 2; aspect-ratio: auto; border-radius: 30px; font-size: 14px; }
.key-exe, .key-ac { font-size: 16px; }
.key-exe { grid-column: span 2; aspect-ratio: auto; border-radius: 30px; }
.key.press { transform: translateY(4px); box-shadow: 0 1px 0 #0c0c0d, inset 0 1px 0 rgba(255,255,255,0.08); }
.tile-haptic { justify-content: flex-end; }
.haptic { position: relative; flex: 1; display: grid; place-items: center; min-height: 160px; }
.haptic b { position: relative; z-index: 2; width: 76px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 500; color: #fff; background: radial-gradient(ellipse at 50% 30%, #4a4a4c, #2a2a2c 70%); box-shadow: 0 5px 0 #0c0c0d; animation: tap 2.4s infinite; }
.haptic span { position: absolute; width: 76px; height: 64px; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; animation: ripple 2.4s infinite; }
.haptic span:nth-child(2) { animation-delay: 0.15s; }
.haptic span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ripple { 0%, 8% { transform: scale(1); opacity: 0; } 10% { opacity: 0.9; } 60%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes tap { 0%, 6%, 16%, 100% { transform: translateY(0); box-shadow: 0 5px 0 #0c0c0d; } 9% { transform: translateY(4px); box-shadow: 0 1px 0 #0c0c0d; } }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-wide { grid-column: span 2; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; grid-template-columns: 1fr; }
  .tile { padding: 32px 28px; min-height: 0; }
  .tile-image .crop { min-height: 200px; }
  .tile .tile-big { font-size: 96px; }
}

/* ------------------------------------------------------------ Colours */
.colour-stage { width: min(340px, 70vw); margin: 0 auto; }
.colour-phone img { transition: opacity 0.45s ease; }
.colour-phone img + img { position: absolute; inset: var(--bezel); width: calc(100% - 2 * var(--bezel)); }
.colour-name { text-align: center; font-size: 17px; font-weight: 600; margin: 40px 0 18px; min-height: 1.5em; }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 520px; margin: 0 auto; }
.swatches button {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18), inset 0 -6px 10px rgba(0,0,0,0.12);
  outline: none; position: relative;
}
.swatches button::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; transition: border-color 0.2s; }
.swatches button[aria-checked="true"]::after { border-color: #0071e3; }
.swatches button:focus-visible::after { border-color: #0071e3; }

/* ------------------------------------------------------------ Privacy */
.privacy { text-align: center; }
.lock-canvas { display: block; margin: 0 auto 40px; }
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 980px; margin: 90px auto 0; text-align: left; }
.privacy-grid p { margin: 0; color: #a1a1a6; font-weight: 500; }
.privacy-big { font-size: 32px; font-weight: 700 !important; color: #fff !important; margin-bottom: 10px !important; letter-spacing: -0.02em; }
@media (max-width: 734px) { .privacy-grid { grid-template-columns: 1fr; text-align: center; } }

/* ------------------------------------------------------------ Coming soon */
.soon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1040px; margin: 0 auto; }
.soon-tile { background: #161618; border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 18px; border: 1px solid rgba(255,255,255,0.06); }
.soon-tile p { margin: 0; color: #a1a1a6; font-size: 15px; font-weight: 500; }
.soon-tile .lcd-tile { opacity: 0.92; }
.soon-tile .lcd-tile::after { content: ""; }
.soon-more { justify-content: flex-end; background: linear-gradient(160deg, #2a2112, #161618 60%); }
.soon-more-title { font-size: 28px !important; color: #fff !important; font-weight: 700 !important; }
.soon-phone { width: min(320px, 70vw); margin: 100px auto 0; }
@media (max-width: 900px) { .soon-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .soon-grid { grid-template-columns: 1fr; } .soon-tile { align-items: center; text-align: center; } }

/* ------------------------------------------------------------ CTA */
.cta { text-align: center; padding-top: 160px; padding-bottom: 140px; }
.cta-title { display: block; margin: 0 auto; max-width: 100%; }
.cta-sub { font-size: clamp(24px, 3.2vw, 40px); font-weight: 700; margin: 48px 0 10px; letter-spacing: -0.02em; }
.cta-avail { color: var(--muted-dark); font-size: 19px; margin: 0; }
.spec-strip { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 900px; margin: 90px auto 0; border-top: 1px solid #333336; }
.spec-strip div { padding: 28px 12px 0; display: flex; flex-direction: column; gap: 6px; }
.spec-strip b { font-size: 32px; letter-spacing: -0.02em; }
.spec-strip span { color: var(--muted-dark); font-size: 14px; }
@media (max-width: 734px) { .spec-strip { grid-template-columns: 1fr 1fr; row-gap: 32px; } }

/* ------------------------------------------------------------ Footer */
.footer { background: var(--paper); color: var(--muted-light); padding: 40px var(--gutter) 60px; font-size: 12px; line-height: 1.5; letter-spacing: -0.01em; }
.footnotes, .fine { max-width: 980px; margin: 0 auto; }
.footnotes { padding-left: 16px; border-bottom: 1px solid #d2d2d7; padding-bottom: 20px; margin-bottom: 20px; }
.footnotes li { margin-bottom: 10px; }
.fine { margin-top: 10px; margin-bottom: 0; }

/* ------------------------------------------------------------ Reveal */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.eq-back.reveal { transform: rotate(-6deg) translateY(60px); }
.eq-front.reveal { transform: rotate(4deg) translateY(90px); transition-delay: 0.12s; }
.eq-back.reveal.in { transform: rotate(-6deg); }
.eq-front.reveal.in { transform: rotate(4deg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .haptic b, .haptic span { animation: none; }
}
