/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  /* Device row sizing (desktop). The laptop leads; the phone is sized from it so it stays a bit shorter
     (~93% of the laptop's height). --row-w is the whole phone + laptop row, used to align the header with it. */
  --gap: clamp(24px, 3vw, 56px);
  --avail-h: calc(100svh - 196px);
  --laptop-w: min(calc(var(--avail-h) * .8 / .59), calc((100vw - var(--gap) - 96px) / 1.255), 1400px);
  --phone-w: calc(var(--laptop-w) * .255);
  --row-w: calc(var(--phone-w) + var(--gap) + var(--laptop-w));

  --bg: #f7f6f3;
  --surface: #ffffff;
  --ink: #141416;
  --ink-2: #4f4f57;
  --ink-3: #8b8b93;
  --line: #e7e5e0;
  --line-2: #d9d6cf;
  --accent: #2e5bff;
  --accent-soft: #e8edff;

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* Dot grid runs behind the whole page */
  background-color: var(--bg);
  background-image: radial-gradient(rgba(20, 20, 22, .11) 1px, transparent 1.2px);
  background-size: 22px 22px;
  background-position: center top;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
p { margin: 0; }

/* ==========================================================================
   Floating header
   ========================================================================== */
.site-header {
  /* Small menu pill, top right */
  position: fixed;
  top: 16px;
  right: max(24px, calc((100% - var(--row-w)) / 2)); /* lines up with the laptop's right edge */
  z-index: 50;
  display: flex;
  align-items: center;
  padding: 6px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid rgba(20, 20, 22, .06);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(20, 20, 22, .04), 0 8px 24px -12px rgba(20, 20, 22, .12);
  transition: box-shadow .3s, background .3s;
}
.site-header.is-scrolled { background: rgba(255, 255, 255, .86); box-shadow: 0 1px 2px rgba(20, 20, 22, .05), 0 14px 36px -14px rgba(20, 20, 22, .2); }
/* Logo on the canvas, top-left of the stage */
.hero-brand { position: absolute; z-index: 2; top: 22px; left: max(24px, calc((100% - var(--row-w)) / 2)); pointer-events: none; } /* lines up with the phone's left edge */
.hero-brand h1 { margin: 0; line-height: 0; }
.hero-logo { width: 200px; height: auto; }
.hero-title { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  font-size: 14px; font-weight: 500; text-decoration: none;
  padding: 8px 14px; border-radius: 999px; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.site-nav a:hover { background: rgba(20, 20, 22, .05); color: var(--ink); }
.site-nav a.nav-cta { background: var(--ink); color: #fff; }
.site-nav a.nav-cta:hover { background: #2b2b30; }

/* ==========================================================================
   Stage: dotted canvas with a phone (1/3) and laptop (2/3)
   ========================================================================== */
.stage {
  position: relative;
  min-height: 100svh;
  padding: 92px 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stage-grid {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--gap);
}

/* Figma-style frames around each device */
.frame { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; perspective: 1600px; }
.frame--laptop { padding-top: 0; }
.frame-label {
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .01em;
  color: var(--ink-3); margin-bottom: 14px; transition: color .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.frame--phone .frame-label { align-self: center; }
.frame-glyph { opacity: .7; }
.frame:hover .frame-label, .frame:focus-within .frame-label { color: var(--accent); }
.frame-selection {
  position: absolute; inset: 28px -14px -14px; pointer-events: none;
  border: 1.5px solid var(--accent); border-radius: 4px;
  opacity: 0; transform: scale(.985); transition: opacity .2s, transform .25s var(--ease-out);
}
.frame-selection i { position: absolute; width: 8px; height: 8px; background: #fff; border: 1.5px solid var(--accent); }
.frame-selection i:nth-child(1) { top: -5px; left: -5px; }
.frame-selection i:nth-child(2) { top: -5px; right: -5px; }
.frame-selection i:nth-child(3) { bottom: -5px; left: -5px; }
.frame-selection i:nth-child(4) { bottom: -5px; right: -5px; }
.frame:hover .frame-selection, .frame:focus-within .frame-selection { opacity: 1; transform: none; }
.frame-hint {
  position: absolute; bottom: -42px; left: 50%; transform: translate(-50%, -4px);
  font-family: var(--font-mono); font-size: 11px; color: #fff; background: var(--accent);
  padding: 3px 8px; border-radius: 4px; opacity: 0; transition: opacity .2s, transform .25s var(--ease-out);
  pointer-events: none; white-space: nowrap;
}
.frame:hover .frame-hint { opacity: 1; transform: translate(-50%, 0); }

.tilt {
  width: 100%; display: flex; justify-content: center;
  /* Flat (no preserve-3d): nested 3D layers made the browser hit-test the phone frame instead of the icons. */
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease-out);
}
.frame--phone { width: var(--phone-w); }
.frame--phone .phone { width: var(--phone-w); }
.frame--laptop { width: var(--laptop-w); }
.frame--laptop .laptop { width: 100%; }

.stage-caption {
  position: relative; z-index: 1;
  width: 100%; margin: 36px auto 0; padding: 0 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 14px; color: var(--ink-3);
}
/* Caption as a selected Figma text layer: frame + handles, live caret, size badge. Draggable (text-layer.js). */
.text-layer {
  position: relative; z-index: 3;
  padding: 2px 0; cursor: move; touch-action: none; user-select: none; -webkit-user-select: none;
  color: var(--ink-2);
}
.text-layer-text { font-size: 14px; line-height: 1.4; }
.text-caret {
  display: inline-block; width: 1.5px; height: 1.15em; margin-left: 2px; vertical-align: -0.2em;
  background: var(--accent); animation: blink 1.05s steps(1) infinite;
}
.text-layer-frame {
  position: absolute; inset: -6px -9px; pointer-events: none;
  border: 1.5px solid var(--accent); border-radius: 2px;
}
.text-layer-frame i { position: absolute; width: 8px; height: 8px; background: #fff; border: 1.5px solid var(--accent); }
.text-layer-frame i:nth-child(1) { top: -5px; left: -5px; }
.text-layer-frame i:nth-child(2) { top: -5px; right: -5px; }
.text-layer-frame i:nth-child(3) { bottom: -5px; left: -5px; }
.text-layer-frame i:nth-child(4) { bottom: -5px; right: -5px; }
.text-layer-size {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 11px; line-height: 1; white-space: nowrap;
  color: #fff; background: var(--accent); padding: 4px 6px; border-radius: 4px;
}
.text-layer-size:empty { display: none; }
.text-layer.is-dragging { cursor: grabbing; }
.text-layer.is-dragging .text-caret { visibility: hidden; }

.scroll-cue { font-weight: 500; color: var(--ink); text-decoration: none; display: inline-flex; gap: 6px; }
.scroll-cue span { display: inline-block; animation: bob 2.2s var(--ease-out) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* Ghost collaborator cursor that demos the interactions */
.ghost-cursor {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
  color: var(--accent); display: flex; align-items: flex-start; gap: 2px;
  opacity: 0; transition: opacity .4s;
  filter: drop-shadow(0 2px 4px rgba(46, 91, 255, .25));
}
.ghost-cursor.is-on { opacity: 1; }
.ghost-cursor span {
  margin-top: 16px; font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  background: var(--accent); color: #fff; padding: 2px 7px; border-radius: 4px 10px 10px 10px;
}
.ghost-cursor.is-click svg { animation: press .35s var(--ease-out); }
@keyframes press { 50% { transform: scale(.8); } }

/* ==========================================================================
   Phone (all inner sizes in cqw so it scales as one object)
   ========================================================================== */
.phone { container-type: inline-size; position: relative; aspect-ratio: 9 / 19.4; }
.phone-body {
  position: relative;
  height: 100%;
  padding: 3.6cqw;
  border-radius: 16cqw;
  background: linear-gradient(145deg, #2a2a2e, #0d0d0f 60%);
  box-shadow:
    inset 0 0 0 .6cqw #3a3a3f,
    inset 0 0 0 1.1cqw #121214,
    0 2px 4px rgba(20, 20, 22, .08),
    0 30px 60px -20px rgba(20, 20, 22, .35),
    0 60px 120px -40px rgba(20, 20, 22, .25);
}
.phone-body::before, .phone-body::after { /* side buttons */
  content: ""; position: absolute; width: 1.2cqw; border-radius: 1cqw; background: #1c1c1f;
}
.phone-body::before { left: -.9cqw; top: 22%; height: 9%; box-shadow: 0 13cqw 0 #1c1c1f; }
.phone-body::after { right: -.9cqw; top: 28%; height: 13%; }
.phone-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 12.6cqw;
  background: #fff; isolation: isolate;
}
.island {
  position: absolute; z-index: 10; top: 3.4cqw; left: 50%; transform: translateX(-50%);
  width: 30cqw; height: 8.6cqw; border-radius: 6cqw; background: #000;
}
.home-indicator {
  position: absolute; z-index: 10; bottom: 2.2cqw; left: 50%; transform: translateX(-50%);
  width: 36cqw; height: 4cqw; display: grid; place-items: center; border-radius: 4cqw;
}
.home-indicator::before { content: ""; width: 100%; height: 1.4cqw; border-radius: 1cqw; background: rgba(20, 20, 22, .82); }
.home-indicator:hover::before { background: #000; }
.is-dark-bottom .home-indicator::before { background: rgba(255, 255, 255, .85); }
.is-dark-bottom .app-dots button { background: rgba(255, 255, 255, .35); }
.is-dark-bottom .app-dots button[aria-current="true"] { background: #fff; }
.app-dots[hidden] { display: none; }

/* Home screen */
.ps-home {
  position: absolute; inset: 0;
  padding: 5.4cqw 7cqw 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 70% at 0% 0%, #ffe3d3 0%, rgba(255, 227, 211, 0) 60%),
    radial-gradient(90% 60% at 100% 30%, #dde3ff 0%, rgba(221, 227, 255, 0) 60%),
    radial-gradient(100% 70% at 30% 100%, #d4f1e8 0%, rgba(212, 241, 232, 0) 65%),
    #f6f4f1;
  transition: transform .45s var(--ease-out), filter .45s;
}
.ps-home.is-behind { transform: scale(.92); filter: blur(2px); }
.status {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 4.4cqw; color: var(--ink);
  height: 8.6cqw; padding: 0 3cqw;
}
.status-icons { display: flex; gap: 1.6cqw; align-items: center; }
.status-icons svg { height: 3.6cqw; width: auto; }
.widget {
  margin-top: 8cqw;
  padding: 6cqw;
  border-radius: 7cqw;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 .4cqw 2cqw rgba(20, 20, 22, .05);
}
.widget-day { font-size: 3.8cqw; font-weight: 600; color: #e2553f; text-transform: uppercase; letter-spacing: .04em; }
.widget-time { font-family: var(--font-display); font-weight: 600; font-size: 17cqw; line-height: 1; letter-spacing: -.04em; margin: 1.5cqw 0 3cqw; }
.widget-note { font-size: 3.7cqw; color: var(--ink-2); line-height: 1.35; }
.app-grid {
  margin-top: 8cqw;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6cqw 4.6cqw;
}
.app-icon {
  min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1.8cqw;
  font-size: 3.1cqw; font-weight: 500; color: var(--ink); line-height: 1.15; text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.app-icon-img {
  width: 100%; aspect-ratio: 1; border-radius: 23%; overflow: hidden; display: block;
  box-shadow: 0 .6cqw 1.6cqw rgba(20, 20, 22, .14), inset 0 0 0 .3cqw rgba(255, 255, 255, .25);
  transition: transform .35s var(--ease-spring);
}
.app-icon-img img { width: 100%; height: 100%; object-fit: cover; }
.app-icon:hover .app-icon-img, .app-icon.is-ghost .app-icon-img { transform: translateY(-1cqw) scale(1.06); }
.app-icon:active .app-icon-img { transform: scale(.92); }
.app-icon-label { max-width: 118%; font-size: 2.9cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-icon .badge {
  position: absolute; top: -1.4cqw; right: -1.4cqw;
  min-width: 4.6cqw; height: 4.6cqw; padding: 0 1.2cqw; border-radius: 3cqw;
  background: #ff3b30; color: #fff; font-size: 2.8cqw; font-weight: 600; display: grid; place-items: center;
}
.app-icon { position: relative; }
.spotlight {
  margin: auto auto 11cqw;
  font-size: 3.4cqw; font-weight: 500; color: var(--ink-2);
  padding: 1.6cqw 4cqw; border-radius: 4cqw;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; gap: 1.4cqw; align-items: center;
}

/* App view */
.ps-app {
  position: absolute; inset: 0; z-index: 2; background: #fff;
  padding: 13cqw 0 11cqw;
  display: flex; flex-direction: column;
}
.ps-app[hidden] { display: none; }
.app-track {
  flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.app-track::-webkit-scrollbar { display: none; }
.app-track { cursor: grab; user-select: none; -webkit-user-select: none; }
.app-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.app-track:has(> img:only-child) { cursor: default; }
.app-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; object-position: top; scroll-snap-align: start; }
.app-dots {
  position: absolute; bottom: 6.6cqw; left: 50%; transform: translateX(-50%);
  display: flex; gap: 1.8cqw;
}
.app-dots button { width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: rgba(20, 20, 22, .2); transition: background .2s, width .25s; }
.app-dots button[aria-current="true"] { background: var(--ink); width: 5cqw; border-radius: 1cqw; }

/* ==========================================================================
   Laptop + browser
   ========================================================================== */
.laptop { container-type: inline-size; position: relative; }
.lid {
  width: 88%; margin: 0 auto;
  padding: 1.6cqw 1.6cqw 2.2cqw;
  border-radius: 2.6cqw 2.6cqw .6cqw .6cqw;
  background: linear-gradient(180deg, #1f1f22, #0f0f11);
  box-shadow: inset 0 0 0 .18cqw #3a3a3e, 0 40px 80px -40px rgba(20, 20, 22, .35);
  position: relative;
}
.lid::before { /* camera */
  content: ""; position: absolute; top: .55cqw; left: 50%; width: .55cqw; height: .55cqw; border-radius: 50%;
  transform: translateX(-50%); background: #2c2c31; box-shadow: inset 0 0 0 .12cqw #18181b;
}
.lscreen { aspect-ratio: 16 / 10; border-radius: .5cqw; overflow: hidden; background: #fff; position: relative; }
.base {
  position: relative; height: 2.2cqw;
  border-radius: .3cqw .3cqw 1.8cqw 1.8cqw / .3cqw .3cqw 2.2cqw 2.2cqw;
  background: linear-gradient(180deg, #e9eaec 0%, #d3d4d8 45%, #a9abb0 100%);
  box-shadow: 0 1.6cqw 3cqw -1cqw rgba(20, 20, 22, .35), 0 3cqw 6cqw -2cqw rgba(20, 20, 22, .2);
}
.base::before { /* thumb notch */
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 14%; height: .9cqw; border-radius: 0 0 1cqw 1cqw;
  background: linear-gradient(180deg, #b8babe, #cfd0d4);
}

.browser { position: absolute; inset: 0; display: flex; flex-direction: column; font-family: var(--font-body); background: #fff; }
.b-top {
  display: flex; align-items: flex-end; gap: 1cqw;
  padding: 0 1.2cqw; height: 3.6cqw; background: #eceae6;
}
.b-lights { display: flex; gap: .6cqw; align-self: center; margin-right: .8cqw; }
.b-lights i { width: .95cqw; height: .95cqw; border-radius: 50%; background: #ff5f57; }
.b-lights i:nth-child(2) { background: #febc2e; }
.b-lights i:nth-child(3) { background: #28c840; }
.b-tabs { display: flex; gap: .2cqw; min-width: 0; flex: 1; }
.b-tab {
  display: flex; align-items: center; gap: .7cqw; min-width: 0; max-width: 18cqw;
  height: 2.7cqw; padding: 0 1.2cqw; border-radius: .8cqw .8cqw 0 0;
  font-size: 1.05cqw; color: var(--ink-2); white-space: nowrap;
}
.b-tab span { overflow: hidden; text-overflow: ellipsis; }
.b-tab.is-active { background: #fff; color: var(--ink); }
.b-tab:not(.is-active):hover { background: rgba(255, 255, 255, .5); }
.b-tab .fav { flex: none; }
.b-tab .x { margin-left: auto; padding-left: .8cqw; opacity: .45; font-size: 1.1cqw; }
.b-tab-new { align-self: center; font-size: 1.5cqw; color: var(--ink-3); padding: 0 .6cqw; }

.b-tool {
  display: flex; align-items: center; gap: 1cqw;
  height: 3.8cqw; padding: 0 1.4cqw; border-bottom: 1px solid #eeece8; background: #fff;
}
.b-nav { display: flex; gap: .4cqw; color: var(--ink-3); }
.b-nav button { width: 2.4cqw; height: 2.4cqw; border-radius: .6cqw; display: grid; place-items: center; font-size: 1.4cqw; }
.b-nav button:not(:disabled):hover { background: #f1efeb; color: var(--ink); }
.b-nav button:disabled { opacity: .4; cursor: default; }
.b-url {
  flex: 1; height: 2.5cqw; border-radius: 1.3cqw; background: #f3f1ed;
  display: flex; align-items: center; justify-content: center; gap: .6cqw;
  font-size: 1.1cqw; color: var(--ink-2); font-family: var(--font-body);
}
.b-url svg { width: .9cqw; height: auto; opacity: .55; }
.b-url .caret { width: 1px; height: 1.3cqw; background: var(--accent); margin-left: -.3cqw; opacity: 0; }
.b-url.is-typing .caret { opacity: 1; animation: blink .9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.b-actions { display: flex; gap: 1.2cqw; color: var(--ink-3); font-size: 1.3cqw; }
.b-progress { height: .25cqw; background: transparent; position: relative; }
.b-progress::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--accent); transition: width .5s var(--ease-out), opacity .3s; opacity: var(--po, 0); }

.b-view { position: relative; flex: 1; min-height: 0; }
.b-newtab {
  position: absolute; inset: 0; overflow: hidden;
  padding: 3.4cqw 5cqw 2cqw;
  background: linear-gradient(180deg, #fbfaf8, #f5f3ef);
  transition: opacity .35s, transform .45s var(--ease-out);
}
.b-newtab.is-behind { opacity: 0; transform: scale(.97); }
.nt-greeting { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2.4cqw; }
.nt-greeting h5 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 2.3cqw; letter-spacing: -.02em; }
.nt-greeting span { font-family: var(--font-mono); font-size: .95cqw; color: var(--ink-3); }
.nt-heading { font-size: 1.15cqw; font-weight: 600; color: var(--ink-2); margin: 0 0 1.2cqw; display: flex; justify-content: space-between; }
.nt-heading em { font-style: normal; font-weight: 400; color: var(--ink-3); }
.tiles { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 2cqw; }
.tile { text-align: left; display: flex; flex-direction: column; gap: .9cqw; -webkit-tap-highlight-color: transparent; }
.tile-thumb {
  aspect-ratio: 16 / 10; border-radius: 1cqw; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px rgba(20, 20, 22, .06), 0 .5cqw 1.4cqw -.4cqw rgba(20, 20, 22, .18);
  transition: transform .35s var(--ease-spring), box-shadow .3s;
}
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.tile:hover .tile-thumb, .tile.is-ghost .tile-thumb { transform: translateY(-.6cqw); box-shadow: 0 0 0 1.5px var(--accent), 0 1.6cqw 3cqw -1cqw rgba(20, 20, 22, .25); }
.tile:active .tile-thumb { transform: scale(.97); }
.tile-meta { display: flex; gap: .8cqw; align-items: center; min-width: 0; }
.tile-meta div { min-width: 0; }
.tile-name { display: block; font-size: 1.1cqw; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.tile-sub { display: block; font-size: .95cqw; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.fav {
  width: 1.9cqw; height: 1.9cqw; border-radius: .5cqw; display: grid; place-items: center; flex: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05cqw; color: #fff; background: var(--fav, #333);
}
.b-tab .fav { width: 1.4cqw; height: 1.4cqw; font-size: .8cqw; border-radius: .35cqw; }
.reading { margin-top: 2.6cqw; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6cqw; }
.reading a {
  display: flex; gap: 1cqw; align-items: center; text-decoration: none;
  padding: 1.1cqw 1.2cqw; border-radius: 1cqw; background: rgba(255, 255, 255, .7);
  box-shadow: 0 0 0 1px rgba(20, 20, 22, .05); font-size: 1.05cqw; color: var(--ink-2);
  transition: background .2s, box-shadow .2s;
}
.reading a:hover { background: #fff; box-shadow: 0 0 0 1px rgba(46, 91, 255, .4); }
.reading strong { display: block; color: var(--ink); font-weight: 600; }
.reading .fav { background: var(--ink); }

.b-page {
  position: absolute; inset: 0; overflow-y: auto; background: #fff;
  scrollbar-width: thin; overscroll-behavior: contain;
}
.b-page[hidden] { display: none; }
.b-page img { width: 100%; height: auto; }
.b-page img + img { border-top: 1px solid #eeece8; }
.page-end {
  padding: 3cqw; text-align: center; font-size: 1.2cqw; color: var(--ink-3); background: #fafaf8;
}
.page-end button { color: var(--accent); font-weight: 600; }

/* ==========================================================================
   Focus view
   ========================================================================== */
.focus { position: fixed; inset: 0; z-index: 100; overflow-y: auto; overscroll-behavior: contain; }
.focus[hidden] { display: none; }
.focus-backdrop {
  position: fixed; inset: 0;
  background-color: rgba(247, 246, 243, .97);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  background-image: radial-gradient(rgba(20, 20, 22, .09) 1px, transparent 1.2px);
  background-size: 22px 22px;
  opacity: 0; transition: opacity .45s var(--ease-out);
}
.focus.is-open .focus-backdrop { opacity: 1; }
.focus-close {
  position: fixed; top: 20px; right: 20px; z-index: 3;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 16px; border-radius: 999px;
  background: #fff; box-shadow: 0 0 0 1px rgba(20, 20, 22, .08), 0 8px 24px -10px rgba(20, 20, 22, .25);
  font-size: 14px; font-weight: 500;
  opacity: 0; transform: translateY(-6px); transition: opacity .3s .15s, transform .3s .15s var(--ease-out), background .2s;
}
.focus.is-open .focus-close { opacity: 1; transform: none; }
.focus-close:hover { background: var(--ink); color: #fff; }
.focus-close kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; background: rgba(20, 20, 22, .07); }
.focus-close:hover kbd { background: rgba(255, 255, 255, .16); }

.focus-stage { position: relative; z-index: 1; }
.focus-hero {
  position: relative; min-height: 100svh;
  display: grid; align-items: center; justify-items: center;
  padding: 80px var(--gutter) 72px;
}
.focus-case { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); scroll-margin-top: 24px; }
.focus-case:empty { display: none; }
.focus-case .case { border-top: 1px solid var(--line); padding: 88px 0 120px; }
.focus-layout { width: 100%; max-width: 1280px; display: grid; align-items: center; gap: clamp(24px, 4vw, 64px); }
.focus-layout--phone { grid-template-columns: 1fr auto 1fr; }
.focus-layout--laptop { grid-template-columns: 1fr; justify-items: center; gap: 28px; }
.focus-device { will-change: transform; transform-origin: 0 0; }
.focus-layout--phone .phone { --h: min(78svh, 780px); height: var(--h); width: calc(var(--h) * 9 / 19.4); }
.focus-layout--laptop .laptop { width: min(1120px, 92vw, calc((100svh - 260px) * 1.5)); }

.focus-info { max-width: 360px; opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .5s var(--ease-out); }
.focus-info.is-in { opacity: 1; transform: none; }
.focus-layout--phone .focus-info { justify-self: end; }
.focus-layout--laptop .focus-info {
  max-width: none; width: min(1120px, 92vw, calc((100svh - 260px) * 1.5));
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 14px 32px; align-items: start; /* top-aligned so a 2-line title doesn't push the others down */
}
/* Pre-heading gets its own row above the three columns */
.focus-layout--laptop .focus-info > .kicker { grid-column: 1 / -1; margin: 0; }
.focus-info .kicker { margin-bottom: 10px; }
.focus-info h2 { font-size: clamp(26px, 2.6vw, 38px); }
.focus-info .focus-meta { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.focus-info .focus-summary { margin-top: 16px; color: var(--ink-2); font-size: 15px; }
.focus-layout--laptop .focus-summary { margin-top: 0; }
.focus-metrics { display: flex; gap: 24px; margin: 22px 0 0; }
.focus-layout--laptop .focus-metrics { margin: 0; }
.focus-metrics div { min-width: 0; }
.focus-metrics strong { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.focus-metrics span { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.35; margin-top: 4px; }

.focus-aside { justify-self: start; display: flex; flex-direction: column; gap: 14px; opacity: 0; transition: opacity .45s .1s; }
.focus-aside.is-in { opacity: 1; }
.focus-aside .eyebrow { margin-bottom: 4px; }
.screen-thumbs { display: flex; flex-direction: column; gap: 10px; }
.screen-thumbs.is-grid { display: grid; grid-template-columns: repeat(2, 64px); }
.screen-thumbs button {
  display: block; flex: none; width: 64px; height: 136px; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(20, 20, 22, .1); opacity: .55; transition: opacity .2s, box-shadow .2s, transform .25s var(--ease-out);
}
.screen-thumbs button img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.screen-thumbs button:hover { opacity: .9; transform: translateX(3px); }
.screen-thumbs button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.screen-hint { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); max-width: 90px; line-height: 1.4; }
.switcher { display: flex; flex-wrap: wrap; gap: 8px; }
.focus-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* Spacing lives on the actions row so it's the same with or without a metrics row */
.focus-layout--phone .focus-actions { margin-top: 26px; }

/* ==========================================================================
   Shared bits
   ========================================================================== */
.eyebrow, .kicker {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
}
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background .2s, transform .2s var(--ease-out), box-shadow .2s;
}
.btn:hover { background: #2b2b30; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.btn--small { padding: 8px 14px; font-size: 13px; }
.btn--chip { padding: 7px 12px; font-size: 12.5px; background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.btn--chip:hover { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--chip[aria-current="true"] { background: var(--ink); color: #fff; box-shadow: none; }

/* ==========================================================================
   Case studies
   ========================================================================== */
.case { padding: 72px 0 112px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.case-head { display: block; }
.case-titles .kicker { margin-top: 18px; color: var(--ink-3); }
.case-titles h3 { font-size: clamp(32px, 4.2vw, 56px); letter-spacing: -.03em; margin-top: 10px; }
.case-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.case-meta span { font-size: 13px; color: var(--ink-2); padding: 4px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }

.metrics {
  margin: 56px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px;
}
.metrics div { padding: 22px 0 0; border-top: 2px solid var(--ink); }
.metrics dt { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 3.6vw, 48px); letter-spacing: -.03em; line-height: 1; }
.metrics dd { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; max-width: 240px; }

.star { margin: 72px 0 0; display: grid; gap: 0; max-width: 980px; }
.star-row { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.star-row:first-child { border-top: 0; padding-top: 0; }
.star-row h4 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-top: 5px; }
.star-row p, .star-row li { font-size: 17px; color: var(--ink-2); line-height: 1.65; }
.star-row ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.star-row li { position: relative; padding-left: 22px; }
.star-row li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1.5px; background: var(--accent); }

.gallery { margin-top: 72px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.gallery figure { margin: 0; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery img {
  width: 100%; border-radius: var(--radius); background: #fff;
  box-shadow: 0 0 0 1px rgba(20, 20, 22, .06), 0 20px 40px -28px rgba(20, 20, 22, .3);
}
/* Embedded case study video, 16:9 */
.case-video {
  margin-top: 72px; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(20, 20, 22, .06), 0 20px 40px -28px rgba(20, 20, 22, .3);
}
.case-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.case-video + .gallery { margin-top: 24px; }

/* Lottie animation (lottie.js); sized to the animation's 1377 × 512 canvas */
.lottie-frame { aspect-ratio: 1377 / 512; border-radius: var(--radius); overflow: hidden; background: #2d2926; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(20, 20, 22, .06), 0 20px 40px -28px rgba(20, 20, 22, .3); }
.lottie-frame svg { display: block; }
/* Portrait animation centred in a wide panel that matches its BG layer (#2b2927) */
.lottie-frame--sold { background: #2b2927; }

/* Motion row: Rive panels 25% + 25%, Lottie panels stacked in the last 50% */
.motion-row { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 16px; align-items: stretch; }
.motion-stack { display: grid; gap: 16px; }

/* Rive animations (rive.js); in the motion row they stretch to the stacked column's height */
.rive-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(20, 20, 22, .06), 0 20px 40px -28px rgba(20, 20, 22, .3);
}
.rive-frame canvas { width: 86%; height: 86%; }
.rive-frame--dark { background: #2d2926; }
.rive-frame--dark canvas { width: 90%; height: 60%; }
.rive-frame--light { background: #f7f7f7; }
.rive-frame--icon { cursor: pointer; }
.rive-frame--icon canvas { width: 46%; height: 46%; }
.rive-hint {
  position: absolute; left: 14px; right: 14px; bottom: 12px; line-height: 1.35;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); transition: opacity .2s;
}
.rive-frame--icon:hover .rive-hint, .rive-frame--icon:focus-visible .rive-hint { opacity: 0; }
@media (hover: none) { .rive-hint { font-size: 0; } .rive-hint::after { content: "Tap to make Foxy think"; font-size: 11px; } }

/* Three images sharing one caption (e.g. a design system) */
.ds-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ds-grid img { aspect-ratio: 1.3 / 1; object-fit: cover; object-position: left top; }
/* Images of different shapes in one row, equal height, nothing cropped (set --ratio = width / height) */
.fit-row { display: flex; gap: 24px; align-items: flex-start; }
.fit-row img { flex: var(--ratio) 1 0; width: 0; height: auto; }
/* The desktop case study skips the phone screenshots (the phone above already shows them) */
.focus-case .gallery--screens { display: none; }

/* Phone screenshots: three to a row */
.gallery--screens { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; max-width: 920px; }
.gallery--screens img { border-radius: 28px; aspect-ratio: 1 / 2; object-fit: cover; object-position: top; }
.gallery figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-3); }

/* ==========================================================================
   About + footer
   ========================================================================== */
.about {
  max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  border-top: 1px solid var(--line);
}
.about-photo { margin: 0; }
.about-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 28px; }
.about-copy h2 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -.03em; margin: 14px 0 28px; }
.about-copy p { font-size: 17px; color: var(--ink-2); margin-bottom: 18px; max-width: 620px; }

/* ==========================================================================
   Contact form (desktop section + mobile Contact page)
   ========================================================================== */
.contact {
  max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start;
  border-top: 1px solid var(--line); scroll-margin-top: 80px;
}
.contact-copy h2 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -.03em; margin: 14px 0 20px; }
.contact-copy p { font-size: 17px; color: var(--ink-2); max-width: 420px; }

.contact-form { display: grid; gap: 20px; max-width: 640px; }
.field label { display: block; margin: 0 0 8px 4px; font-size: 14px; font-weight: 500; color: var(--ink); }
.field input, .field textarea {
  width: 100%; display: block;
  padding: 13px 22px; border-radius: 999px; /* pill */
  border: 1px solid #dcd9d3; background: #fff; color: var(--ink);
  font: inherit; font-size: 16px; /* 16px stops iOS from zooming on focus */
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.5; border-radius: 28px; padding: 16px 22px; } /* a full pill radius would pinch a tall box */
.field input:hover, .field textarea:hover { border-color: #c9c5be; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field [aria-invalid="true"], .field [aria-invalid="true"]:focus { border-color: #d93025; }

/* Figma-style selection frame on hover and focus, matching the device frames */
.field label { transition: color .2s; }
.field:hover label, .field:focus-within label { color: var(--accent); }
.control { position: relative; }
.field-frame {
  position: absolute; inset: -7px; pointer-events: none;
  border: 1.5px solid var(--accent); border-radius: 4px;
  opacity: 0; transform: scale(.985); transition: opacity .2s, transform .25s var(--ease-out);
}
.field-frame i { position: absolute; width: 8px; height: 8px; background: #fff; border: 1.5px solid var(--accent); }
.field-frame i:nth-child(1) { top: -5px; left: -5px; }
.field-frame i:nth-child(2) { top: -5px; right: -5px; }
.field-frame i:nth-child(3) { bottom: -5px; left: -5px; }
.field-frame i:nth-child(4) { bottom: -5px; right: -5px; }
.control:hover .field-frame, .control:focus-within .field-frame { opacity: 1; transform: none; }
.control:has([aria-invalid="true"]) .field-frame,
.control:has([aria-invalid="true"]) .field-frame i { border-color: #d93025; }
.field:has([aria-invalid="true"]) label { color: #c5221f; }
.field-error { margin-top: 6px; font-size: 13px; color: #c5221f; }
.field-error:empty { display: none; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form-actions .btn { min-width: 120px; }
.form-status { font-size: 14px; color: var(--ink-2); flex: 1 1 240px; }
.form-status.is-success { color: #1e7d3c; }
.form-status.is-error { color: #c5221f; }
.bot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn:disabled { opacity: .6; cursor: progress; transform: none; }
.form-status:empty { display: none; }

.site-footer {
  max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 48px;
  display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-3);
  border-top: 1px solid var(--line);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .focus-layout--phone { grid-template-columns: 1fr auto; }
  .focus-layout--phone .focus-aside { display: none; }
  .focus-layout--laptop .focus-info { grid-template-columns: 1fr auto; }
  .focus-layout--laptop .focus-summary { display: none; }
}
@media (max-width: 860px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .stage { padding: 104px 16px 32px; min-height: auto; }
  .stage-grid { flex-direction: column; align-items: center; gap: 56px; --phone-w: min(62vw, 280px); --laptop-w: 100%; }
  .frame--phone { order: 2; }
  .frame--laptop { order: 1; }
  .frame-label { align-self: center; }
  .frame-hint, .frame-selection { display: none; }
  .stage-caption { margin-top: 48px; }
  .star-row { grid-template-columns: 1fr; gap: 10px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery--screens { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .ds-grid { grid-template-columns: 1fr; gap: 16px; }
  .fit-row { flex-direction: column; gap: 16px; }
  .motion-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .motion-row .rive-frame { aspect-ratio: 1 / 1; }
  .motion-stack { grid-column: 1 / -1; gap: 12px; }
  .lottie-frame--sold { aspect-ratio: 1 / 1; }
  .fit-row img { width: 100%; flex: none; }
  .gallery--screens img { border-radius: 20px; }
  .about { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; }
  .focus-layout--phone { grid-template-columns: 1fr; justify-items: center; }
  .focus-layout--phone .phone { --h: min(70svh, 640px); }
  .focus-layout--phone .focus-info { order: 2; justify-self: center; text-align: left; max-width: 420px; }
  .focus-layout--laptop .focus-info { grid-template-columns: 1fr; gap: 16px; }
  .focus-metrics { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .ghost-cursor { display: none; }
}

/* ==========================================================================
   Tablet & mobile (<= 1024px): home-screen layout (mobile.js)
   ========================================================================== */
.m-home, .m-page { display: none; }

@media (max-width: 1024px) {
  .site-header, main, .site-footer, .focus { display: none !important; }
  .m-home { display: block; }
  .m-page:not([hidden]) { display: block; }
  html.m-locked { overflow: hidden; }

  .m-home {
    min-height: 100svh;
    padding: max(56px, env(safe-area-inset-top)) 20px 40px;
    background:
      radial-gradient(120% 60% at 0% 0%, #ffe3d3 0%, rgba(255, 227, 211, 0) 60%),
      radial-gradient(90% 50% at 100% 35%, #dde3ff 0%, rgba(221, 227, 255, 0) 60%),
      radial-gradient(100% 60% at 30% 100%, #d4f1e8 0%, rgba(212, 241, 232, 0) 65%),
      #f6f4f1;
    background-attachment: fixed;
    transition: transform .45s var(--ease-out), filter .45s;
  }
  .m-home.is-behind { transform: scale(.94); filter: blur(3px); }

  .m-grid {
    max-width: 520px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 20px; align-items: start;
  }

  /* Widgets */
  .m-widget {
    border-radius: 26px; overflow: hidden; text-align: left;
    background: rgba(255, 255, 255, .66);
    backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
    box-shadow: 0 1px 2px rgba(20, 20, 22, .04), 0 12px 30px -16px rgba(20, 20, 22, .25);
  }
  /* Logo widget spans 3 columns x 2 rows; Calendar and Contact stack in the 4th column */
  .m-brand { grid-column: 1 / span 3; grid-row: 1 / span 2; align-self: stretch; padding: 16px 18px; display: flex; flex-direction: column; }
  .m-app--cal { grid-column: 4; grid-row: 1; }
  .m-app[data-mopen="contact"] { grid-column: 4; grid-row: 2; }
  .m-brand-logo { width: 100%; max-width: 300px; height: auto; margin-top: 4px; }
  .m-brand-title { margin-top: 10px; font-family: var(--font-display); font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--ink); }
  .m-brand-foot { margin-top: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }
  .m-app-img.m-calicon {
    container-type: inline-size; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  }
  /* cqw here is relative to the icon (the container); spacing lives on the children for that reason */
  .m-calicon-day { margin-top: 10cqw; font-size: 15cqw; font-weight: 600; line-height: 1; color: #ff3b30; }
  .m-calicon-date { font-family: var(--font-display); font-size: 52cqw; font-weight: 400; line-height: 1; letter-spacing: -.03em; margin-top: 2cqw; color: var(--ink); }
  .m-about { grid-column: span 2; grid-row: span 2; align-self: stretch; position: relative; padding: 0; }
  .m-about img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .m-about::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .55)); }
  .m-about-label {
    position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px;
    color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.2;
  }
  .m-about-label small { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; opacity: .8; margin-bottom: 3px; }
  .m-about:active { transform: scale(.97); }

  /* App icons */
  .m-app { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; -webkit-tap-highlight-color: transparent; }
  .m-app-img {
    width: 100%; max-width: 76px; aspect-ratio: 1; border-radius: 23%; overflow: hidden; display: block;
    box-shadow: 0 2px 6px rgba(20, 20, 22, .14), inset 0 0 0 1px rgba(255, 255, 255, .25);
    transition: transform .3s var(--ease-spring);
  }
  .m-app-img img { width: 100%; height: 100%; object-fit: cover; }
  .m-app:active .m-app-img { transform: scale(.9); }
  .m-app-label { font-size: 11.5px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); max-width: calc(100% + 18px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-badge {
    position: absolute; top: -6px; right: calc(50% - 44px);
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: #ff3b30; color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center;
  }
  .m-pages { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
  .m-pages i { width: 7px; height: 7px; border-radius: 50%; background: rgba(20, 20, 22, .2); }
  .m-pages i.is-on { background: var(--ink); }

  /* Page view */
  .m-page { position: fixed; inset: 0; z-index: 200; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); -webkit-overflow-scrolling: touch; }
  .m-nav {
    position: sticky; top: 0; z-index: 2;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0;
    background: rgba(247, 246, 243, .82);
    backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border-bottom: 1px solid transparent; transition: border-color .2s;
  }
  .m-page.is-scrolled .m-nav { border-bottom-color: var(--line); }
  .m-back { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 8px 6px; font-size: 17px; color: var(--accent); }
  .m-back span { font-size: 28px; line-height: 0; margin-top: -3px; }
  .m-nav-title { font-weight: 600; font-size: 16px; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
  .m-page.is-scrolled .m-nav-title { opacity: 1; transform: none; }

  .m-hero { margin-top: -1px; }
  .m-hero img { width: 100%; height: auto; display: block; }
  .m-hero--screen { background: linear-gradient(160deg, #f3ebdd, #e4d6c0); padding: 32px 0; display: grid; place-items: center; }
  .m-hero--screen img { width: min(56%, 300px); border-radius: 28px; box-shadow: 0 24px 50px -20px rgba(45, 41, 38, .55); }
  .m-hero--photo img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; }

  .m-body .case { border-top: 0; padding: 32px 20px 72px; max-width: 860px; margin: 0 auto; }
  .m-body .case-titles h3 { font-size: clamp(32px, 8vw, 52px); }
  .m-body .metrics { margin-top: 40px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .m-body .star { margin-top: 48px; }
  .m-body .gallery { margin-top: 48px; }
  .m-body .ds-grid { grid-template-columns: 1fr; gap: 16px; }
  .m-body .fit-row { flex-direction: column; gap: 16px; }
  .m-body .fit-row img { width: 100%; flex: none; }
  .m-body .lottie-frame--sold { aspect-ratio: 1 / 1; }
  .m-body .motion-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .m-body .motion-row .rive-frame { aspect-ratio: 1 / 1; }
  .m-body .motion-stack { grid-column: 1 / -1; gap: 12px; }

  .m-about-page { padding: 32px 20px 72px; max-width: 760px; margin: 0 auto; }
  .m-about-page .about-copy h2 { margin-top: 12px; }

  .m-contact { max-width: 560px; margin: 0 auto; padding: 28px 20px 72px; text-align: center; }
  .m-contact-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; box-shadow: 0 10px 30px -14px rgba(20, 20, 22, .4); }
  .m-contact h2 { font-size: 28px; }
  .m-contact > p { margin-top: 6px; color: var(--ink-3); }
  .m-contact-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 26px 0 22px; }
  .m-contact-actions a {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px;
    border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line);
    font-size: 12px; color: var(--accent); text-decoration: none;
  }
  .m-contact-actions a span { font-size: 22px; line-height: 1.1; }
  .m-contact-card { margin: 0; text-align: left; background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
  .m-contact-card div { padding: 12px 16px; }
  .m-contact-card div + div { border-top: 1px solid var(--line); }
  .m-contact-card dt { font-size: 13px; color: var(--ink-3); }
  .m-contact-card dd { margin: 2px 0 0; font-size: 16px; }
  .m-contact-card a { color: var(--accent); text-decoration: none; }
  .m-contact-form { margin-top: 36px; text-align: left; scroll-margin-top: 64px; }
  .m-contact-form h3 { font-size: 22px; margin-bottom: 18px; }
  .m-contact-form .contact-form { max-width: none; }
  .m-contact-form .form-actions .btn { width: 100%; }
}

/* Tablet: same four-column arrangement, larger and centered */
@media (min-width: 600px) and (max-width: 1024px) {
  .m-home { padding-top: max(72px, env(safe-area-inset-top)); }
  .m-grid { max-width: 600px; gap: 34px 30px; }
  .m-app-img { max-width: 84px; }
  .m-app-label { font-size: 13px; }
  .m-body .case, .m-about-page, .m-contact { padding-left: 40px; padding-right: 40px; }
}
