/* Workmode's site. Dark, glassy and quiet, like the Mac app. The iPhone/Android chapter swaps to Material 3
   Expressive as you scroll, so the page's design language changes with the phone. */

:root {
  --bg: #05060a;
  --bg-2: #0b0d14;
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --dim: #6e6e78;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #2f7bff;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --teal: #2dd4bf;
  --green: #3ddc84;
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --flex: "Roboto Flex", "Roboto", "Google Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 5vw, 48px);
  --nav-h: 52px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sf);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.022em; }
p { margin: 0; }

/* ---------- Shared bits ---------- */

.eyebrow {
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 14px;
}
.big {
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.lede {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
  color: var(--muted);
  max-width: 34em;
}
.lede.center { margin: 28px auto 0; text-align: center; }
.grad {
  background: linear-gradient(100deg, #b69cff 0%, #6aa6ff 45%, #ff8ac2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-green {
  background: linear-gradient(100deg, #3ddc84, #b4f26a 60%, #7fe3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dim-text { color: var(--dim); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  transition: transform 0.4s var(--ease), background 0.3s, box-shadow 0.3s;
  box-shadow: 0 8px 30px -8px rgba(47, 123, 255, 0.6);
}
.btn:hover { transform: translateY(-1px) scale(1.02); background: #4189ff; }
.btn:focus-visible { outline: 3px solid #9cc2ff; outline-offset: 3px; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn-small { padding: 7px 15px; font-size: 14px; box-shadow: none; }
.btn[aria-disabled="true"] { cursor: default; }

/* Fade-up reveal, driven by an IntersectionObserver in main.js. */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Wordmark: the "o" is a little Tesla screen, as in the app ---------- */

.wordmark {
  display: inline-flex; align-items: baseline;
  font-weight: 600; font-size: 21px; letter-spacing: -0.03em;
  text-decoration: none; color: var(--text);
}
.wm-o { display: inline-block; width: 0.78em; margin: 0 0.04em; transform: translateY(0.04em); }
.wm-o svg { width: 100%; height: auto; display: block; overflow: visible; }
.wm-bezel { fill: #0d0f14; stroke: rgba(255,255,255,0.25); stroke-width: 1; }
.wm-glass { fill: #1b2130; }
.wm-strip { fill: rgba(255,255,255,0.07); }
.wm-route { fill: none; stroke: #4f8cff; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- Nav ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(8, 9, 14, 0.55);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  height: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-links { display: flex; gap: 28px; font-size: 13px; }
.nav-links a { color: #d1d1d6; text-decoration: none; opacity: 0.85; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(56px, 11vh, 120px)) var(--gutter) clamp(60px, 10vh, 120px);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-copy { max-width: 980px; margin: 0 auto; }
.hero-title {
  font-size: clamp(44px, 8.4vw, 104px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.hero-sub {
  margin: 26px auto 0;
  max-width: 620px;
  font-size: clamp(18px, 2.1vw, 23px);
  color: #c7c7cc;
  line-height: 1.4;
}
.hero-ctas { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero .reveal:nth-child(4) { transition-delay: 0.24s; }

/* The moving colour behind the hero, like the app's welcome window. */
.mesh { position: absolute; inset: -10% -10% auto; height: 120%; z-index: -1; filter: blur(90px); opacity: 0.5; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite alternate; }
.b1 { width: max(46vw, 320px); height: max(46vw, 320px); left: 8%; top: 4%; background: #6d4cff; }
.b2 { width: max(38vw, 260px); height: max(38vw, 260px); right: 4%; top: 0%; background: #2a5bff; animation-delay: -6s; }
.b3 { width: max(34vw, 260px); height: max(34vw, 260px); left: 32%; top: 34%; background: #d3457e; animation-delay: -12s; }
.b4 { width: max(30vw, 220px); height: max(30vw, 220px); left: -6%; top: 40%; background: #138a8a; animation-delay: -3s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vh) scale(1.12); }
  100% { transform: translate(-4vw, -3vh) scale(0.94); }
}

/* The car's screen, tilted back. main.js flattens it as you scroll. */
.hero-stage {
  --tilt: 1;
  position: relative;
  margin: clamp(48px, 9vh, 96px) auto 0;
  max-width: 1080px;
  perspective: 1600px;
}
.car-screen {
  position: relative;
  aspect-ratio: 16 / 9.6;
  border-radius: clamp(14px, 2.4vw, 30px);
  background: #000;
  padding: clamp(6px, 1vw, 12px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12),
    0 1px 0 0 rgba(255,255,255,0.25) inset,
    0 60px 120px -30px rgba(80, 60, 255, 0.45),
    0 30px 60px -20px rgba(0,0,0,0.8);
  transform: rotateX(calc(var(--tilt) * 24deg)) scale(calc(1 - var(--tilt) * 0.08)) translateY(calc(var(--tilt) * -10px));
  transform-origin: 50% 100%;
  will-change: transform;
  text-align: left;
  overflow: hidden;
}
.car-screen::after { /* glass glare */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,0.12), rgba(255,255,255,0) 38%);
}
.car-dash {
  height: clamp(18px, 3vw, 36px);
  margin: -2px 8% 0;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: linear-gradient(#15171e, #07080b);
  opacity: calc(var(--tilt) * 0.9 + 0.1);
}
.car-browserbar {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: clamp(16px, 2.6vw, 30px);
  font-size: clamp(7px, 1.1vw, 13px);
  color: #b5b8c2;
  background: #15171d;
  border-radius: clamp(8px, 1.6vw, 20px) clamp(8px, 1.6vw, 20px) 0 0;
}
.lock { width: 0.8em; height: 0.7em; border-radius: 2px; background: #8d919c; position: relative; }
.lock::before { content: ""; position: absolute; left: 50%; bottom: 80%; width: 0.5em; height: 0.45em; transform: translateX(-50%); border: 1.5px solid #8d919c; border-bottom: 0; border-radius: 1em 1em 0 0; }

/* A Mac desktop, in CSS. */
.desk {
  position: relative;
  height: calc(100% - clamp(16px, 2.6vw, 30px));
  border-radius: 0 0 clamp(8px, 1.6vw, 20px) clamp(8px, 1.6vw, 20px);
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 20% 30%, #7b55ff 0%, transparent 60%),
    radial-gradient(50% 70% at 85% 20%, #2f6bff 0%, transparent 60%),
    radial-gradient(60% 70% at 60% 100%, #e04c8a 0%, transparent 60%),
    linear-gradient(#1b1640, #0e1230);
  font-size: clamp(6px, 1.05vw, 13px);
}
.desk-menubar {
  display: flex; align-items: center; gap: 1.4em;
  height: 1.9em; padding: 0 1em;
  background: rgba(20, 18, 40, 0.35);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff; font-weight: 500;
}
.desk-menubar b { width: 0.9em; height: 1em; background: #fff; border-radius: 40% 40% 45% 45%; }
.desk-menubar span:first-of-type { font-weight: 700; }
.desk-menubar i { margin-left: auto; font-style: normal; }
.win {
  position: absolute;
  background: rgba(30, 30, 36, 0.82);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 0.9em;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 2em 4em -1em rgba(0,0,0,0.6);
  overflow: hidden;
}
.win-bar { display: flex; gap: 0.45em; padding: 0.75em 0.9em; }
.win-bar i { width: 0.8em; height: 0.8em; border-radius: 50%; background: #ff5f57; }
.win-bar i:nth-child(2) { background: #febc2e; }
.win-bar i:nth-child(3) { background: #28c840; }
.win-mail { left: 6%; top: 12%; width: 60%; height: 66%; }
.mail { display: grid; grid-template-columns: 38% 1fr; height: calc(100% - 2.3em); }
.mail-list { border-right: 1px solid rgba(255,255,255,0.08); padding: 0 0.5em; }
.mail-item { padding: 0.6em 0.6em; border-radius: 0.5em; display: grid; gap: 0.15em; }
.mail-item b { color: #fff; font-weight: 600; }
.mail-item span { color: #9a9aa5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-item.on { background: #2f6bff; }
.mail-item.on span { color: #dbe5ff; }
.mail-body { padding: 0.6em 1.2em; display: grid; align-content: start; gap: 0.7em; color: #fff; }
.mail-body b { font-size: 1.3em; }
.mail-body p { height: 0.55em; border-radius: 1em; background: rgba(255,255,255,0.14); }
.mail-body p.short { width: 60%; }
.chart { display: flex; align-items: end; gap: 0.6em; height: 6em; margin-top: 0.4em; }
.chart span { flex: 1; height: var(--h); border-radius: 0.3em 0.3em 0 0; background: linear-gradient(#7aa7ff, #3d6bff); }
.win-code { right: 5%; top: 30%; width: 38%; height: 44%; background: rgba(16, 18, 26, 0.88); }
.code { padding: 0.2em 1.1em; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: #e6e6ea; line-height: 1.9; }
.code p { white-space: nowrap; }
.code .in { padding-left: 1.6em; }
.code em { color: #ff7ab2; font-style: normal; }
.code u { color: #67d4ff; text-decoration: none; }
.desk-dock {
  position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%);
  display: flex; gap: 0.6em; padding: 0.55em;
  border-radius: 1.2em;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
.desk-dock i { width: 3em; height: 3em; border-radius: 0.8em; background: var(--c); box-shadow: inset 0 0.2em 0.4em rgba(255,255,255,0.35); }
.cursor {
  position: absolute; left: 40%; top: 40%;
  width: 1.4em; height: 2em;
  background: #fff;
  clip-path: polygon(0 0, 0 78%, 22% 60%, 40% 100%, 55% 94%, 38% 56%, 70% 56%);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6));
  animation: roam 9s var(--ease) infinite;
}
@keyframes roam {
  0%, 8% { left: 40%; top: 40%; }
  25%, 33% { left: 22%; top: 30%; }
  50%, 58% { left: 78%; top: 52%; }
  75%, 83% { left: 50%; top: 86%; }
  100% { left: 40%; top: 40%; }
}

/* ---------- A world first ---------- */

.first { max-width: 1080px; margin: 0 auto; padding: clamp(80px, 16vh, 180px) var(--gutter); }
.first-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 80px); margin-top: clamp(32px, 6vh, 64px); align-items: start; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.stats li { border-top: 1px solid var(--line); padding-top: 14px; }
.stats b { display: block; font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stats span { color: var(--muted); font-size: 15px; }

/* ---------- Story intro ---------- */

.story-intro { text-align: center; padding: clamp(80px, 18vh, 200px) var(--gutter) clamp(60px, 12vh, 140px); max-width: 1100px; margin: 0 auto; }
.strike { position: relative; color: var(--dim); white-space: nowrap; }
.strike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 54%; height: 0.08em;
  background: var(--pink); border-radius: 1em;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.9s 0.5s var(--ease);
}
.isnt { display: inline-block; color: var(--text); max-width: 0; opacity: 0; overflow: hidden; vertical-align: bottom; white-space: nowrap; transition: max-width 0.9s 1.1s var(--ease), opacity 0.6s 1.2s; }
.reveal.in .strike::after { transform: scaleX(1); }
.reveal.in .isnt { max-width: 4em; opacity: 1; }

/* ---------- iPhone… or Android ---------- */
/* main.js sets --t on .morph-stage: 0 is iOS, 1 is Material 3 Expressive. --a and --b fade the headlines. */

.morph { position: relative; height: 420vh; }
.morph-stage {
  --t: 0; --a: 1; --b: 0;
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 0.9fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: var(--nav-h) var(--gutter) 28px;
  max-width: none;
  isolation: isolate;
}
.m-bg { position: absolute; inset: 0; z-index: -1; }

/* iOS: deep colour, light through glass */
.ios-bg {
  background: radial-gradient(120% 90% at 20% 10%, #1a2a6c 0%, #0b1030 45%, #05060a 100%);
  opacity: calc(1 - var(--t));
}
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.8; }
.o1 { width: 40vw; height: 40vw; left: -8vw; top: 10vh; background: #3b5bff; }
.o2 { width: 32vw; height: 32vw; right: 4vw; top: -6vh; background: #a34bff; }
.o3 { width: 30vw; height: 30vw; right: 18vw; bottom: -10vh; background: #ff4f9a; opacity: 0.55; }
.bubble {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.5), inset 0 -1px 1px rgba(255,255,255,0.1), 0 20px 40px -20px rgba(0,0,0,0.5);
  transform: translateY(calc(var(--p, 0) * -120px));
}
.u1 { width: 14vw; height: 14vw; left: 38vw; top: 12vh; }
.u2 { width: 8vw; height: 8vw; left: 6vw; bottom: 14vh; }
.u3 { width: 10vw; height: 10vw; right: 6vw; bottom: 22vh; }

/* Material 3 Expressive: tonal light surface, big playful shapes (drawn by main.js) */
.md-bg {
  background: #f4efe4;
  opacity: var(--t);
  overflow: hidden;
}
.md-shape { position: absolute; display: block; will-change: transform; }

.morph-copy { position: relative; display: grid; align-self: center; }
.m-head { grid-area: 1 / 1; max-width: 12em; line-height: 1.02; font-weight: 700; }
.m-kicker { display: block; font-size: clamp(14px, 1.4vw, 17px); letter-spacing: 0; margin-bottom: 16px; font-weight: 600; }
.m-ios {
  font-family: var(--sf);
  font-size: clamp(38px, 6.2vw, 84px);
  letter-spacing: -0.04em;
  color: #fff;
  opacity: var(--a);
  transform: translateY(calc((1 - var(--a)) * -40px));
  filter: blur(calc((1 - var(--a)) * 8px));
}
.m-ios .m-kicker { color: #9fb4ff; }
.m-md {
  font-family: var(--flex);
  font-size: clamp(40px, 6.8vw, 96px);
  letter-spacing: -0.02em;
  color: #1d1b20;
  opacity: var(--b);
  transform: translateY(calc((1 - var(--b)) * 50px)) scale(calc(0.92 + var(--b) * 0.08));
  transform-origin: left bottom;
  font-variation-settings: "wdth" 100, "wght" 800, "opsz" 144;
}
.m-md .m-kicker {
  font-family: var(--flex);
  display: inline-block;
  font-variation-settings: "wdth" 100, "wght" 600;
  background: #c8e86a; color: #1f2a00;
  padding: 6px 14px; border-radius: 999px;
}

/* The phone in the middle, which turns from an iPhone into an Android phone. */
.morph-device { position: relative; display: grid; place-items: center; height: 100%; min-height: 0; }
.phone {
  --r: calc(54px - var(--t) * 12px);
  position: relative;
  height: min(68vh, 640px);
  height: min(68svh, 640px);
  aspect-ratio: 9 / 19.2;
  border-radius: var(--r);
  padding: 11px;
  background: linear-gradient(145deg, #3a3d44, #15161a 40%, #2b2d33);
  box-shadow:
    0 0 0 calc((1 - var(--t)) * 2px) rgba(200, 205, 215, 0.45),
    0 0 0 calc(var(--t) * 3px) #48415a,
    0 50px 100px -30px rgba(0,0,0,0.7);
  transform: rotate(calc((1 - var(--t)) * -4deg + var(--t) * 3deg));
  z-index: 2;
  container-type: inline-size;
}
.phone .screen {
  position: absolute; inset: 11px;
  border-radius: calc(var(--r) - 10px);
  overflow: hidden;
  padding: 14% 7% 6%;
}
/* Dynamic Island shrinks to a punch-hole camera */
.phone-cam {
  position: absolute; left: 50%; top: calc(11px + 3%);
  width: calc((30 - var(--t) * 25) * 1cqw);
  height: calc((8.8 - var(--t) * 3.8) * 1cqw);
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
  z-index: 5;
}

/* iOS screen */
.ios-screen { background: #000; color: #fff; font-family: var(--sf); opacity: calc(1 - var(--t) * 2); font-size: clamp(10px, 1.45vh, 14px); }
.sb { display: flex; justify-content: space-between; align-items: center; position: absolute; top: 4.2%; left: 9%; right: 9%; font-size: 1.05em; }
.sb-icons { display: flex; gap: 4px; align-items: end; }
.sb-icons i { width: 4px; height: 7px; border-radius: 1px; background: currentColor; }
.sb-icons i:nth-child(2) { height: 9px; }
.sb-icons i:nth-child(3) { width: 18px; height: 9px; border-radius: 3px; }
.ios-back { color: #0a84ff; margin-top: 8%; }
.ios-title { font-size: 2.1em; font-weight: 700; letter-spacing: -0.02em; margin: 4% 0 7%; line-height: 1.1; }
.ios-group { background: #1c1c1e; border-radius: 1.1em; padding: 0 0.9em; }
.ios-row { display: flex; justify-content: space-between; align-items: center; padding: 0.85em 0; gap: 8px; }
.ios-row + .ios-row { border-top: 0.5px solid #38383a; }
.ios-row .dim { color: #8e8e93; font-size: 0.9em; }
.ios-toggle { flex: none; width: 3.6em; height: 2.2em; border-radius: 999px; background: #39393d; position: relative; }
.ios-toggle::after { content: ""; position: absolute; top: 0.18em; left: 0.18em; width: 1.84em; height: 1.84em; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.ios-toggle.on { background: #34c759; }
.ios-toggle.on::after { left: auto; right: 0.18em; }
.ios-foot { color: #8e8e93; font-size: 0.85em; padding: 0.6em 0.9em 1.4em; line-height: 1.35; }
.ios-pill {
  position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%);
  padding: 0.6em 1.2em; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  font-weight: 600; font-size: 0.95em;
}

/* Android screen, Material 3 Expressive */
.md-screen {
  background: #fdf8ff; color: #1d1b20;
  font-family: var(--flex);
  opacity: calc(var(--t) * 2 - 1);
  font-size: clamp(10px, 1.45vh, 14px);
  font-variation-settings: "wdth" 100, "wght" 400;
}
.md-screen .sb { font-variation-settings: "wght" 600; }
.md-back { font-size: 1.5em; margin-top: 7%; }
.md-title { font-family: var(--flex); font-size: 2.4em; line-height: 1.02; letter-spacing: -0.01em; margin: 6% 0 9%; font-variation-settings: "wdth" 115, "wght" 750, "opsz" 72; }
.md-list { display: grid; gap: 3px; border-radius: 1.6em; overflow: hidden; }
.md-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f0e8f7; padding: 1em 1em; border-radius: 0.35em; }
.md-row:first-child { border-radius: 1.6em 1.6em 0.35em 0.35em; }
.md-row:last-child { border-radius: 0.35em 0.35em 1.6em 1.6em; }
.md-row.hl { background: #e3d5ff; }
.md-row b { display: block; font-variation-settings: "wght" 650; font-weight: 650; }
.md-row small { color: #625b71; font-size: 0.85em; }
.md-switch { flex: none; width: 3.9em; height: 2.4em; border-radius: 999px; border: 2px solid #79747e; background: #e6e0e9; position: relative; }
.md-switch::after { content: ""; position: absolute; top: 50%; left: 0.45em; width: 1.1em; height: 1.1em; border-radius: 50%; background: #79747e; transform: translateY(-50%); }
.md-switch.on { background: #6750a4; border-color: #6750a4; }
.md-switch.on::after { left: auto; right: 0.25em; width: 1.75em; height: 1.75em; background: #fff; }
.md-fab {
  position: absolute; right: 8%; bottom: 9%;
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 1.05em 1.4em 1.05em 1.1em;
  background: #c8e86a; color: #1f2a00;
  border-radius: 1.4em;
  font-variation-settings: "wght" 650; font-weight: 650;
  box-shadow: 0 6px 14px -6px rgba(60, 80, 0, 0.5);
}
.md-fab svg { width: 1.3em; height: 1.3em; }
.md-gesture { position: absolute; left: 50%; bottom: 2.4%; width: 30%; height: 4px; border-radius: 4px; background: #1d1b20; transform: translateX(-50%); opacity: 0.8; }

/* Floating cards beside the phone */
.fcard {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px;
  white-space: nowrap;
}
.fcard b { display: block; font-size: 15px; }
.fcard small { display: block; font-size: 13px; }
.c-left { left: -6%; top: 14%; }
.c-right { right: -6%; bottom: 16%; }
.fc-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; }
.fc-icon svg { width: 22px; height: 22px; }

.ios-card {
  border-radius: 22px;
  color: #fff;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), inset 0 0 0 1px rgba(255,255,255,0.12), 0 20px 40px -16px rgba(0,0,0,0.6);
  font-family: var(--sf);
  opacity: calc(1 - var(--t) * 2.2);
  transform: translateY(calc(var(--t) * -30px)) scale(calc(1 - var(--t) * 0.1));
}
.ios-card small { color: rgba(255,255,255,0.65); }
.ios-icon { border-radius: 11px; background: #34c759; color: #fff; }
.ios-card.c-left .ios-icon { background: #30d158; }
.ios-icon.green { background: #0a84ff; }

.md-card {
  border-radius: 28px;
  background: #fff;
  color: #1d1b20;
  font-family: var(--flex);
  box-shadow: 0 2px 6px rgba(60, 40, 100, 0.12), 0 12px 24px -10px rgba(60, 40, 100, 0.25);
  opacity: calc((var(--t) - 0.45) * 2.2);
  transform: scale(calc(0.6 + min(1, var(--t) * 1.1) * 0.4)) rotate(calc((1 - var(--t)) * -8deg));
}
.md-card b { font-variation-settings: "wght" 700; font-weight: 700; }
.md-card small { color: #625b71; }
.md-icon {
  width: 46px; height: 46px; background: #6750a4; color: #fff;
  /* 8-lobe "cookie", one of M3 Expressive's shapes */
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
}
.md-icon.alt { background: #c8e86a; color: #1f2a00; border-radius: 14px; transform: rotate(8deg); }
.md-icon.alt svg { transform: rotate(-8deg); }

.morph-chips { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; position: relative; min-height: 44px; }
.chip { padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.ios-chip {
  position: absolute; left: 50%; transform: translateX(-50%);
  color: #fff; background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
  opacity: calc(1 - var(--t) * 2);
}
.md-chip {
  font-family: var(--flex); font-variation-settings: "wght" 600;
  background: #e8def8; color: #1d192b; border-radius: 12px;
  opacity: calc((var(--t) - 0.5) * 2.5);
  transform: translateY(calc((1 - var(--t)) * 20px));
}
.md-chip:nth-of-type(3) { background: #ffd8e4; color: #31111d; border-radius: 999px; }
.md-chip:nth-of-type(4) { background: #c8e86a; color: #1f2a00; }

/* ---------- Setup steps ---------- */

.steps {
  position: relative;
  max-width: 1200px; margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 5vw, 72px);
}
.steps-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: grid; place-items: center;
  grid-column: 1; grid-row: 1;
}
.steps-media { position: relative; width: 100%; aspect-ratio: 1400 / 1027; }
.shot {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transform: scale(0.96) translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
  filter: drop-shadow(0 40px 60px rgba(0,0,0,0.55)) drop-shadow(0 0 1px rgba(255,255,255,0.25));
}
.shot.on { opacity: 1; transform: none; }
.shot-car { display: grid; place-items: center; filter: none; }
.car-screen.small { width: 100%; transform: none; box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 40px 80px -30px rgba(80,60,255,0.5); }
.car-screen.small .desk { font-size: clamp(5px, 0.9vw, 11px); }
.car-screen.small .win-mail { width: 70%; left: 15%; top: 16%; }
.car-ok {
  position: absolute; bottom: -8%; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: 14px; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.car-ok span { width: 8px; height: 8px; border-radius: 50%; background: #30d158; box-shadow: 0 0 10px #30d158; }

.steps-dots { position: absolute; left: 50%; bottom: 7vh; transform: translateX(-50%); display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.steps-dots li { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,0.25); transition: width 0.5s var(--ease), background 0.3s; }
.steps-dots li.on { width: 26px; background: var(--accent); }

.steps-text { grid-column: 2; grid-row: 1; padding: 30vh 0 40vh; }
.step {
  min-height: 78vh;
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0.25;
  transition: opacity 0.6s var(--ease);
}
.step.on { opacity: 1; }
.step-n { color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.step h3 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 16px; }
.step p:not(.step-n) { color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); max-width: 26em; }
.step b { color: var(--text); }

/* ---------- Flow diagram ---------- */

.flow { max-width: 1080px; margin: 0 auto; padding: clamp(100px, 18vh, 200px) var(--gutter) clamp(60px, 10vh, 120px); text-align: center; }
.flow-diagram {
  margin-top: clamp(40px, 7vh, 72px);
  display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 10px;
}
.node { display: grid; justify-items: center; gap: 4px; width: clamp(110px, 16vw, 170px); }
.node-icon {
  display: grid; place-items: center;
  width: clamp(76px, 10vw, 110px); aspect-ratio: 1;
  border-radius: 28%;
  background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), inset 0 0 0 1px rgba(255,255,255,0.08);
  margin-bottom: 10px;
  color: #e5e5ea;
}
.node-icon svg { width: 52%; height: 52%; }
.node b { font-size: 17px; }
.node span { color: var(--muted); font-size: 14px; }
.link { position: relative; display: grid; gap: 8px; justify-items: center; margin-top: -40px; }
.link-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.link-line { width: 100%; height: 3px; border-radius: 3px; background-size: 24px 3px; animation: flow 1s linear infinite; }
.link-line.usb { background-image: linear-gradient(90deg, var(--green) 50%, transparent 50%); }
.link-line.wifi { background-image: linear-gradient(90deg, #6aa6ff 50%, transparent 50%); }
@keyframes flow { to { background-position: 24px 0; } }

/* ---------- Features bento ---------- */

.features { max-width: 1080px; margin: 0 auto; padding: clamp(80px, 14vh, 160px) var(--gutter); }
.bento { margin-top: clamp(36px, 6vh, 64px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile {
  position: relative;
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(180deg, #13151d, #0c0d13);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  min-height: 280px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.t-wide { grid-column: span 2; }
.tile h3 { font-size: 24px; margin-bottom: 8px; }
.tile p { color: var(--muted); font-size: 16px; max-width: 28em; }
.tile-big { font-size: clamp(56px, 7vw, 84px) !important; font-weight: 800; letter-spacing: -0.05em; line-height: 1; margin-bottom: auto !important; color: transparent !important;
  background: linear-gradient(120deg, #9ec1ff, #b69cff 60%, #ff8ac2); -webkit-background-clip: text; background-clip: text; }
.tile-art { margin-bottom: auto; }
.cursor-art { position: relative; height: 110px; }
.ca-dot { position: absolute; width: 22px; height: 30px; background: #fff; clip-path: polygon(0 0, 0 78%, 22% 60%, 40% 100%, 55% 94%, 38% 56%, 70% 56%); animation: swoop 3.2s var(--ease) infinite; }
.ca-trail { position: absolute; left: 0; top: 50%; height: 2px; width: 60%; background: linear-gradient(90deg, transparent, rgba(106,166,255,0.8)); animation: trail 3.2s var(--ease) infinite; transform-origin: left; }
@keyframes swoop { 0% { left: 0; top: 60%; } 50% { left: 60%; top: 10%; } 100% { left: 0; top: 60%; } }
@keyframes trail { 0%, 100% { transform: scaleX(0.1); opacity: 0; } 50% { transform: scaleX(1); opacity: 1; } }
.lock-art svg { width: 54px; height: 54px; color: #30d158; }
.wave-art { display: flex; gap: 6px; align-items: center; height: 70px; }
.wave-art i { width: 7px; border-radius: 7px; background: linear-gradient(#ff8ac2, #b69cff); animation: eq 1.2s ease-in-out infinite; }
.wave-art i:nth-child(1) { animation-delay: -0.2s; } .wave-art i:nth-child(2) { animation-delay: -0.5s; } .wave-art i:nth-child(3) { animation-delay: -0.9s; }
.wave-art i:nth-child(4) { animation-delay: -0.3s; } .wave-art i:nth-child(5) { animation-delay: -0.7s; } .wave-art i:nth-child(6) { animation-delay: -0.1s; } .wave-art i:nth-child(7) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { height: 14px; } 50% { height: 64px; } }
.menubar-art {
  display: flex; gap: 14px; align-items: center; justify-content: flex-end;
  height: 40px; padding: 0 18px; margin: 0 -30px auto; border-radius: 0;
  background: rgba(255,255,255,0.06); box-shadow: inset 0 -1px 0 var(--line);
}
.menubar-art span { width: 18px; height: 12px; border-radius: 3px; background: rgba(255,255,255,0.35); }
.menubar-art .mb-wm { width: 24px; height: 16px; border-radius: 4px; background: #1b2130; box-shadow: 0 0 0 1.5px #fff, 0 0 18px rgba(79,140,255,0.8); position: relative; }
.menubar-art .mb-wm::after { content: ""; position: absolute; inset: 4px 3px 3px 9px; border-top: 2px solid #4f8cff; border-radius: 50% 0 0 0; transform: rotate(-20deg); }

/* ---------- Closing ---------- */

.get { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: clamp(120px, 22vh, 240px) var(--gutter); }
.mesh-soft { opacity: 0.45; }

.foot {
  max-width: 1080px; margin: 0 auto; padding: 28px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  color: var(--dim); font-size: 12px; line-height: 1.6;
  display: grid; gap: 8px;
}
.foot p:first-child { color: var(--muted); }

/* ---------- Phones and small tablets ---------- */

@media (max-width: 900px) {
  .nav-links { display: none; }
  .first-grid { grid-template-columns: 1fr; }

  .morph-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    padding-top: calc(var(--nav-h) + 18px);
    gap: 10px;
  }
  .m-head { max-width: none; }
  .m-ios { font-size: clamp(32px, 8.6vw, 54px); }
  .m-md { font-size: clamp(36px, 10vw, 62px); }
  .m-kicker { margin-bottom: 10px; }
  .phone { width: auto; height: min(56svh, 520px); }
  .fcard { padding: 8px 12px 8px 8px; gap: 8px; }
  .fcard b { font-size: 13px; }
  .fcard small { font-size: 11px; }
  .fc-icon { width: 32px; height: 32px; }
  .md-icon { width: 36px; height: 36px; }
  .fc-icon svg { width: 18px; height: 18px; }
  .c-left { left: 0; top: 10%; }
  .c-right { right: 0; bottom: 8%; }
  .chip { padding: 8px 14px; font-size: 13px; }

  /* Steps: screenshot pinned at the top, text cards scroll up under it */
  .steps { grid-template-columns: 1fr; }
  .steps-sticky { top: var(--nav-h); height: auto; padding: 16px 0 12px; z-index: 2; background: linear-gradient(var(--bg) 82%, transparent); }
  .steps-dots { position: static; transform: none; justify-content: center; margin-top: 14px; }
  .steps-text { grid-column: 1; grid-row: 2; padding: 4vh 0 30vh; }
  .step { min-height: 62vh; justify-content: flex-start; padding-top: 6vh; }
  .car-ok { bottom: -14%; font-size: 12px; }

  .flow-diagram { grid-template-columns: 1fr; justify-items: center; gap: 0; }
  .link { margin: 0; width: 3px; height: 70px; grid-template-columns: auto; position: relative; }
  .link-line { width: 3px; height: 70px; background-size: 3px 18px; animation-name: flowv; }
  .link-line.usb { background-image: linear-gradient(180deg, var(--green) 50%, transparent 50%); }
  .link-line.wifi { background-image: linear-gradient(180deg, #6aa6ff 50%, transparent 50%); }
  .link-label { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); white-space: nowrap; }
  .node { width: auto; margin: 8px 0; }

  .bento { grid-template-columns: 1fr; }
  .t-wide { grid-column: auto; }
  .tile { min-height: 230px; padding: 24px; }
  .menubar-art { margin: 0 -24px auto; }
}
@keyframes flowv { to { background-position: 0 18px; } }

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 20px 16px; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .c-right { right: -2%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .cursor, .ca-dot, .ca-trail, .wave-art i, .link-line { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-stage { --tilt: 0 !important; }
}
