/* yako.dev home + /cases styles. Light and dark themes.
   Versioned file name: firebase.json caches .css for a year, so a change goes into home.v2.css
   and every page that uses it points to the new name.
   Theme: <html data-theme="light|dark"> is set by a small script in <head>. Without JS, the
   prefers-color-scheme media query picks the theme. */

/* ═════════ Tokens ═════════ */
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg2: #F5F7FA;
  --fg: #0B1220;
  --muted: #596273;
  --border: #E5E8EE;
  --play-green: #017A55;
  --pano-a: #D6E8F8;
  --pano-b: #EEF5FC;
  --pano-glow: rgba(3, 151, 215, 0.22);
  --shot-ink: #0E1726;
  --sk-screen: #FFFFFF;
  --sk-card: #F1F4F8;
  --sk-line: #E0E5EC;
  --sk-ink: #CBD3DD;
  --sk-blue: #D3E9F7;
  --sk-acc: #2AA4DF;
  --px-body: #1D1E22;
  --px-edge: #4A4C53;
  --border2: #D5DAE2;
  --dashed: #C3C9D3;
  --nav-bg: rgba(255, 255, 255, 0.86);
  --card: #FFFFFF;
  --os-desc: #3A4252;
  --g-under: rgba(11, 18, 32, 0.3);
  --thread: linear-gradient(to bottom, rgba(11, 18, 32, 0) 0%, rgba(11, 18, 32, 0.45) 4%, rgba(11, 18, 32, 0.45) 100%);
  --up: #14A800;
  --stars: #D98A12;
  --tip-bg: #0B1220;
  --tip-border: #0B1220;
  --react: #087EA4;
  --shadow-card: rgba(0, 0, 0, 0.08);
  --shadow-dd: rgba(0, 0, 0, 0.12);
  --foot-bg: #F5F7FA;
  --foot-border: #E5E8EE;
  --foot-logo: #0B1220;
  --invert: 0;
  /* accent */
  --acc: #0397D7;
  --acct: #026E9C;
  --b1: #026F9F;
  --b2: #027CB0;
  --bink: #FFFFFF;
  --soft: rgba(3, 151, 215, 0.12);
  --glow: rgba(3, 151, 215, 0.14);
  --shadow: rgba(3, 151, 215, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #080C14;
    --bg2: #0F1420;
    --fg: #FFFFFF;
    --muted: #858B96;
    --border: rgba(255, 255, 255, 0.07);
    --play-green: #5BC08A;
    --pano-a: #0F2438;
    --pano-b: #15304A;
    --pano-glow: rgba(56, 189, 248, 0.24);
    --shot-ink: #F3F5F8;
    --sk-screen: #10161F;
    --sk-card: #19212C;
    --sk-line: #253041;
    --sk-ink: #34425A;
    --sk-blue: #173A55;
    --sk-acc: #38A8E0;
    --px-body: #24262C;
    --px-edge: #646A78;
    --border2: rgba(255, 255, 255, 0.14);
    --dashed: rgba(255, 255, 255, 0.22);
    --nav-bg: rgba(8, 12, 20, 0.84);
    --card: #0F1420;
    --os-desc: rgba(255, 255, 255, 0.72);
    --g-under: rgba(255, 255, 255, 0.35);
    --thread: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #FFFFFF 4%, #FFFFFF 100%);
    --up: #6FDA44;
    --stars: #F5A424;
    --tip-bg: rgba(20, 20, 22, 0.92);
    --tip-border: rgba(255, 255, 255, 0.12);
    --react: #61DAFB;
    --shadow-card: rgba(0, 0, 0, 0.35);
    --shadow-dd: rgba(0, 0, 0, 0.45);
    --foot-bg: #02050C;
    --foot-border: rgba(255, 255, 255, 0.05);
    --foot-logo: rgba(255, 255, 255, 0.75);
    --invert: 1;
    --acct: #0397D7;
    --soft: rgba(3, 151, 215, 0.14);
    --glow: rgba(3, 151, 215, 0.22);
    --shadow: rgba(3, 151, 215, 0.45);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080C14;
  --bg2: #0F1420;
  --fg: #FFFFFF;
  --muted: #858B96;
  --border: rgba(255, 255, 255, 0.07);
  --play-green: #5BC08A;
  --pano-a: #0F2438;
  --pano-b: #15304A;
  --pano-glow: rgba(56, 189, 248, 0.24);
  --shot-ink: #F3F5F8;
  --sk-screen: #10161F;
  --sk-card: #19212C;
  --sk-line: #253041;
  --sk-ink: #34425A;
  --sk-blue: #173A55;
  --sk-acc: #38A8E0;
  --px-body: #24262C;
  --px-edge: #646A78;
  --border2: rgba(255, 255, 255, 0.14);
  --dashed: rgba(255, 255, 255, 0.22);
  --nav-bg: rgba(8, 12, 20, 0.84);
  --card: #0F1420;
  --os-desc: rgba(255, 255, 255, 0.72);
  --g-under: rgba(255, 255, 255, 0.35);
  --thread: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #FFFFFF 4%, #FFFFFF 100%);
  --up: #6FDA44;
  --stars: #F5A424;
  --tip-bg: rgba(20, 20, 22, 0.92);
  --tip-border: rgba(255, 255, 255, 0.12);
  --react: #61DAFB;
  --shadow-card: rgba(0, 0, 0, 0.35);
  --shadow-dd: rgba(0, 0, 0, 0.45);
  --foot-bg: #02050C;
  --foot-border: rgba(255, 255, 255, 0.05);
  --foot-logo: rgba(255, 255, 255, 0.75);
  --invert: 1;
  --acct: #0397D7;
  --soft: rgba(3, 151, 215, 0.14);
  --glow: rgba(3, 151, 215, 0.22);
  --shadow: rgba(3, 151, 215, 0.45);
}

/* ═════════ Base ═════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 66px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
}

.skip:focus {
  top: 10px;
}

.wrap {
  max-width: 1256px; /* 1200px of content + 28px padding each side */
  margin: 0 auto;
  padding: 0 28px;
}

.sec {
  padding: 100px 60px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--acct);
  margin-bottom: 14px;
}

.sec-h2 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  font-size: clamp(30px, 4vw, 50px);
}

.lift {
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.lift:hover {
  transform: translateY(-4px);
  border-color: var(--acc) !important;
}

/* Links to pages that are still drafts. `tools/build_pages.py --publish` swaps their href for
   data-draft-href (+ hidden); a normal build switches them back on. Hide what would be left empty. */
a[data-draft-href][hidden],
[data-draft-off][hidden],
.dd-col:not(:has(a[href])),
.nav-links > .dd:not(:has(.dd-panel a[href])),
.mm-list > li:has(> .mm-sub):not(:has(a[href])) {
  display: none !important;
}

.case-card:not([href]),
.lift:not([href]) {
  cursor: default;
}

.lift:not([href]):hover {
  transform: none;
  border-color: var(--border) !important;
}

/* ═════════ Buttons ═════════ */
.btn-fill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--b1) 0%, var(--b2) 100%);
  color: var(--bink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 28px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
}

.btn-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.btn-fill:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-fill:hover::after {
  left: 125%;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  color: var(--fg);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: var(--muted);
}

/* ═════════ Nav ═════════ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-row {
  max-width: 1256px;
  height: 66px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  white-space: nowrap;
}

.logo-dot {
  color: var(--acct);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link[aria-current="page"],
.dd.open>.nav-link {
  color: var(--fg);
}

.nav-link svg {
  transition: transform 0.2s ease;
}

.dd.open>.nav-link svg {
  transform: rotate(180deg);
}

.nav-cta {
  min-height: 44px;
  padding: 10px 22px;
  font-size: 14px;
  box-shadow: 0 4px 18px var(--shadow);
}

.dd {
  position: relative;
}

.dd-panel {
  display: none;
  position: absolute;
  top: calc(100% + 11px);
  left: -28px;
  width: 600px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 32px;
  padding: 22px 26px 18px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 14px;
  box-shadow: 0 24px 60px var(--shadow-dd);
}

/* Bridge the gap between the button and the panel so hover doesn't drop. */
.dd-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.dd.open .dd-panel {
  display: grid;
}

@media (hover: hover) and (pointer: fine) {
  .dd:hover .dd-panel {
    display: grid;
  }
}

.dd-head {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.dd-col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dd-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.dd-col a:hover {
  color: var(--fg);
}

.dd-all {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--acct);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--muted);
}

.theme-btn .i-sun {
  display: none;
}

:root[data-theme="dark"] .theme-btn .i-sun {
  display: block;
}

:root[data-theme="dark"] .theme-btn .i-moon {
  display: none;
}

.burger {
  display: none;
}

.burger .i-close {
  display: none;
}

.burger[aria-expanded="true"] .i-open {
  display: none;
}

.burger[aria-expanded="true"] .i-close {
  display: block;
}

.mobile-menu {
  border-top: 1px solid var(--border);
  max-height: calc(100vh - 66px);
  max-height: calc(100dvh - 66px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-menu[hidden] {
  display: none;
}

.mm-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px 24px;
}

.mm-list {
  list-style: none;
  padding: 0;
}

.mm-list>li {
  border-bottom: 1px solid var(--border);
}

.mm-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.mm-link svg {
  transition: transform 0.2s ease;
  color: var(--muted);
}

.mm-link[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.mm-sub {
  padding: 0 0 14px;
}

.mm-sub[hidden] {
  display: none;
}

.mm-sub .dd-head {
  margin: 14px 0 4px;
}

.mm-sub ul {
  list-style: none;
  padding: 0;
}

.mm-sub a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.mm-sub .dd-all {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-top: 6px;
  padding-top: 0;
  color: var(--acct);
  font-weight: 600;
}

.mm-cta {
  width: 100%;
  margin-top: 20px;
}

/* ═════════ Hero ═════════ */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 48px 80px;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: -8%;
  width: 56%;
  height: 80%;
  background: radial-gradient(ellipse at 30% 40%, var(--glow) 0%, transparent 66%);
  pointer-events: none;
}

.hero-body {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 32px;
}

.hero-left {
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  border: 1px solid var(--soft);
  color: var(--acct);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 36px;
}

.hero-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acct);
}

.hero-h1 {
  max-width: 600px;
  margin-bottom: 26px;
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-wrap: balance;
}

.hero-h1 em {
  color: var(--acct);
  font-style: normal;
}

.hero-sub {
  max-width: 560px;
  margin-bottom: 44px;
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--muted);
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-acts {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-right {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
}

#lottie-hero {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  aspect-ratio: 1920 / 1206;
}

/* Claude Code hanging on a thread (drops in after load) */
.hero-spider {
  position: absolute;
  top: 380px;
  right: 14%;
  width: 56px;
  height: 56px;
  z-index: 2;
}

.hero-spider::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 1.5px;
  height: 440px;
  background: var(--thread);
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  transition: transform 0.65s ease-in;
}

.hero-spider img {
  width: 100%;
  height: 100%;
  cursor: help;
  transform: translateY(-440px);
  transition: transform 1.3s cubic-bezier(.34, 1.56, .64, 1);
}

.hero-spider.dropped::before {
  transform: translateX(-50%) scaleY(1);
}

.hero-spider.dropped img {
  transform: translateY(0);
}

.spider-tip {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--tip-bg);
  color: #FFFFFF;
  border: 1px solid var(--tip-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.hero-spider:hover .spider-tip,
.hero-spider:focus-visible .spider-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Stats + ratings row */
.hero-stats {
  max-width: 1200px;
  width: 100%;
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.stat-n {
  font-weight: 700;
  font-size: 38px;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-l {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.stats-divider {
  width: 1px;
  height: 44px;
  background: var(--border2);
  flex-shrink: 0;
}

.rating-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.rating-sep {
  width: 1px;
  height: 30px;
  background: var(--border2);
  flex-shrink: 0;
}

.rating-detail {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rating-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.rating-stars {
  font-size: 13px;
  color: var(--stars);
  letter-spacing: 1.5px;
  line-height: 1;
}

.pl-clutch {
  height: 20px;
  width: auto;
  color: var(--fg);
}

.pl-upwork {
  display: flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 700;
}

.pl-upwork .pu {
  color: var(--up);
  font-weight: 800;
}

.pl-upwork .pw {
  color: var(--fg);
  font-weight: 400;
}

.pl-gf {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
  white-space: nowrap;
}

.gf-icon {
  width: 22px;
  height: 22px;
  background: #2070D8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
}

.gf-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}

.clutch-badge {
  flex-basis: 100%;
  width: 100%;
  height: 130px;
  object-fit: contain;
  margin-top: 20px;
  opacity: 0.88;
}

/* ═════════ Cases ═════════ */
.cases-sec {
  background: var(--bg2);
}

.cases-head {
  margin-bottom: 44px;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.case-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
}

.case-card img {
  width: 100%;
  height: auto;
}

.cases-more {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}

/* Cases page */
.cases-page {
  position: relative;
  overflow: hidden;
  padding: 96px 60px 110px;
  background: var(--bg);
}

.cases-page .page-glow {
  position: absolute;
  top: -40%;
  left: -8%;
  width: 56%;
  height: 160%;
  background: radial-gradient(ellipse at 30% 40%, var(--glow) 0%, transparent 66%);
  pointer-events: none;
}

.cases-page .wrap {
  position: relative;
}

.page-h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.cases-page .cases-grid {
  margin-top: 48px;
}

.cases-page .case-card {
  background: var(--bg2);
}

/* ═════════ Process ═════════ */
.process {
  position: relative;
  margin-top: 56px;
}

.rail-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 22px;
  height: 1px;
  background: var(--border2);
}

.rail {
  position: relative;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 32px 20px;
}

.rail li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rail-num {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--acc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--acct);
  flex: none;
}

.rail h3 {
  margin: 18px 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.rail p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* Daily loop */
.loop {
  margin-top: 48px;
  padding: 52px clamp(20px, 4vw, 56px) 44px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: center;
}

.loop-head {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  text-align: left;
}

.loop-ico {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--acct);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.loop-head h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.loop-lede {
  margin: 0 auto 36px;
  max-width: 560px;
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.7;
}

.loop-box {
  position: relative;
  width: 720px;
  max-width: 100%;
  height: 430px;
  margin: 0 auto;
  text-align: left;
}

.loop-ring {
  position: absolute;
  left: 210px;
  top: 60px;
  width: 300px;
  height: 300px;
}

.loop-ring svg path {
  stroke: var(--acc);
}

.loop-ring marker path {
  fill: var(--acc);
}

.loop-node {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2px solid var(--acc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--acct);
}

.loop-node.n1 {
  left: 130px;
  top: 20px;
}

.loop-node.n2 {
  left: 240px;
  top: 130px;
}

.loop-node.n3 {
  left: 130px;
  top: 240px;
}

.loop-node.n4 {
  left: 20px;
  top: 130px;
}

.loop-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: var(--acct);
}

.loop-center span {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  max-width: 150px;
  color: var(--fg);
}

.loop-steps {
  list-style: none;
  padding: 0;
}

.loop-step {
  position: absolute;
  width: 216px;
}

.loop-step .ls-num {
  display: none;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--acc);
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--acct);
}

.ls-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.ls-note {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.loop-step.s1 {
  left: 360px;
  bottom: 362px;
  transform: translateX(-50%);
  width: 240px;
  text-align: center;
}

.loop-step.s2 {
  left: 504px;
  top: 210px;
  transform: translateY(-50%);
}

.loop-step.s3 {
  left: 360px;
  top: 352px;
  transform: translateX(-50%);
  width: 240px;
  text-align: center;
}

.loop-step.s4 {
  right: 504px;
  top: 210px;
  transform: translateY(-50%);
  text-align: right;
}

/* ═════════ Stack ═════════ */
.stack-head {
  margin-top: 80px;
  padding-top: 72px;
  border-top: 1px solid var(--border);
}

.stack-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.stack-cell {
  padding: 32px;
  min-width: 0;
  background: var(--bg2);
}

.tool-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  margin-bottom: 20px;
}

.tool-icons img,
.tool-icons svg {
  height: 36px;
  width: auto;
  flex: none;
}

.tool-icons .cloud {
  height: 40px;
}

.icon-mono {
  filter: invert(var(--invert));
}

.i-react {
  fill: var(--react);
}

.tool-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--acct);
  background: var(--soft);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.tool-name {
  margin-bottom: 10px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.2;
}

.tool-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.stack-pair {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
  gap: 14px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

.flow {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
}

.flow li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.flow .pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 100px;
  border: 1px solid var(--border2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.flow .arr {
  color: var(--acct);
  font-size: 13px;
}

.chips {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
}

.chips img {
  height: 22px;
  width: auto;
}

.svc-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px;
  padding: 18px 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 15px;
  color: var(--muted);
}

.svc-more-link {
  color: var(--acct);
  font-weight: 600;
}

/* ═════════ Open source ═════════ */
.os-sec {
  border-top: 1px solid var(--border);
}

.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 40px 56px;
  align-items: start;
  margin-top: 28px;
}

.os-h2 {
  max-width: 480px;
  margin-bottom: 28px;
}

.g-mention {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--g-under);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  transition: text-decoration-color 0.2s ease;
}

.g-mention:hover {
  text-decoration-color: var(--fg);
}

.g1 {
  color: #4285F4;
}

.g2 {
  color: #EA4335;
}

.g3 {
  color: #FBBC05;
}

.g4 {
  color: #34A853;
}

.os-lede {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 460px;
}

.os-lede strong {
  color: var(--fg);
  font-weight: 600;
}

.os-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.os-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--fg);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.os-pill svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.os-pill .arrow {
  color: var(--muted);
  font-size: 14px;
  margin-left: 2px;
}

.os-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.os-card {
  display: block;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 26px;
}

.os-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.os-card-name {
  margin-bottom: 4px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.os-card-path {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
}

.os-dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--acct);
  background: var(--soft);
  padding: 5px 11px;
  border-radius: 100px;
  white-space: nowrap;
}

.os-card-desc {
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--os-desc);
  line-height: 1.6;
}

.os-card-foot {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.os-card-foot::before {
  content: "↳";
  color: var(--acct);
  font-weight: 400;
  font-size: 13px;
}

/* YouTube card */
.yt-card {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  padding: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.yt-thumb {
  position: relative;
  flex: 0 1 320px;
  min-width: 0;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #13243B;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.yt-label {
  position: absolute;
  left: 14px;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
}

.yt-label img {
  width: 18px;
  height: 18px;
}

.yt-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-play span {
  width: 64px;
  height: 44px;
  border-radius: 12px;
  background: #FF0000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.yt-card:hover .yt-play span {
  transform: scale(1.06);
}

.yt-text {
  flex: 1 1 300px;
  min-width: 0;
}

.yt-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.yt-title {
  margin: 8px 0 6px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.yt-note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.yt-arrow {
  margin-left: auto;
  padding-right: 10px;
  font-size: 20px;
  color: var(--muted);
}

.os-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 64px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.os-stat-n {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 8px;
}

.os-stat-l {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ═════════ Stores ═════════ */
.stores {
  position: relative;
  overflow: hidden;
  background: var(--bg2);
  padding: 110px 60px 120px;
  border-top: 1px solid var(--border);
}

.stores-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  width: 900px;
  height: 600px;
  max-width: 100%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--glow) 0%, transparent 65%);
  pointer-events: none;
}

.stores .wrap {
  position: relative;
}

.stores-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.big-h2 {
  margin-bottom: 18px;
  font-weight: 700;
  font-size: clamp(34px, 4.8vw, 58px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

.stores-lede {
  margin: 0 auto;
  max-width: 540px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.65;
}

.stores-grid {
  margin: 56px auto 0;
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
  gap: 20px;
}

.store-card {
  background: var(--card);
  border: 1px solid var(--border2);
  box-shadow: 0 24px 60px var(--shadow-card);
  border-radius: 22px;
  padding: 24px;
}

.store-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.store-top svg {
  fill: var(--fg);
}

.store-app {
  display: flex;
  align-items: center;
  gap: 16px;
}

.store-icon {
  width: 84px;
  height: 84px;
  border-radius: 22.5%;
  background: linear-gradient(150deg, #2BB4EE 0%, #0397D7 50%, #026E9C 100%);
  color: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(2, 110, 156, 0.26);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.logo-ph {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: center;
  color: #FFFFFF;
  opacity: 0.95;
}

.store-icon.gp {
  border-radius: 21%;
}

.store-meta {
  min-width: 0;
  flex: 1;
}

.store-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.store-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 2px;
}

.store-dev {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--play-green);
  margin-top: 2px;
}

.store-get {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--b1) 0%, var(--b2) 100%);
  color: var(--bink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.store-install {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 10px;
  background: #017A55;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
}

/* Info row: App Store puts the small label on top, Google Play puts the value on top. */
.store-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  padding: 11px 0;
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
}

.store-info > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 6px;
  text-align: center;
}

.store-info > div + div {
  border-left: 1px solid var(--border2);
}

.store-info span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.store-info b {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.25;
}

.store-info.gp {
  margin-top: 16px;
  padding: 2px 0;
  border: 0;
}

.store-info.gp > div {
  flex-direction: column-reverse;
}

.store-info.gp span {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

/* Example screenshots (Idea A): 3 tiles per store on one continuous background. Every tile holds the same
   .art layer, shifted by its index (--i), so artwork (and the big phone on the seam) runs across the gaps.
   Sizes are in screenshot widths (--tw) so the art scales with the card. Built by make_store_mocks.py. */
.yk-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.shots-scroll {
  container-type: inline-size;
  margin-top: 18px;
}

.store-info.gp ~ .store-install + .shots-scroll {
  margin-top: 16px;
}

.store-shots {
  --g: 8px;
  --tw: calc((100cqw - 2 * var(--g)) / 3);
  display: grid;
  grid-template-columns: repeat(3, var(--tw));
  gap: var(--g);
}

.shot {
  position: relative;
  aspect-ratio: 1290 / 2796;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
}

.store-shots.gp .shot {
  aspect-ratio: 1080 / 2130;
  border-radius: 8px;
}

.shot .art {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(-1 * var(--i) * (var(--tw) + var(--g)));
  width: calc(3 * var(--tw) + 2 * var(--g));
  background:
    radial-gradient(circle calc(0.95 * var(--tw)) at calc(2.1 * var(--tw) + 1.5 * var(--g)) 72%, var(--pano-glow), transparent),
    radial-gradient(circle calc(0.7 * var(--tw)) at calc(0.5 * var(--tw)) 64%, var(--pano-glow), transparent),
    linear-gradient(115deg, var(--pano-a) 0%, var(--pano-b) 55%, var(--pano-a) 100%);
}

.shot p {
  position: absolute;
  z-index: 3;
  top: calc(0.1 * var(--tw));
  left: 8%;
  right: 8%;
  margin: 0;
  font-size: calc(0.098 * var(--tw));
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  color: var(--shot-ink);
}

.ph {
  position: absolute;
  left: calc(var(--x) * var(--tw) + var(--k) * var(--g));
  top: calc(var(--y) * var(--tw));
  width: calc(var(--w) * var(--tw));
  transform: rotate(var(--rot));
  transform-origin: 50% 40%;
  filter: drop-shadow(0 8px 14px rgba(8, 20, 40, 0.22));
}

.ph .scr svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* iPhone: the real frame image on top of the screen. */
.ph.ip {
  aspect-ratio: 1350 / 2760;
}

.ph.ip .scr {
  position: absolute;
  left: 5.333%;
  top: 2.5%;
  width: 89.333%;
  height: 95%;
  border-radius: 13.6% / 6.3%;
  overflow: hidden;
  background: var(--sk-screen);
}

.ph.ip::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url('/images/frames/iphone-17-pro-silver.v1.webp') center / 100% 100% no-repeat;
}

/* Android: a slim Pixel-style body with a punch-hole camera. */
.ph.px {
  padding: calc(0.03 * var(--w) * var(--tw)); /* % padding would follow the art width, not the phone */
  border-radius: 12.5% / 5.8%;
  background: var(--px-body);
  box-shadow: inset 0 0 0 1.5px var(--px-edge);
}

.ph.px .scr {
  position: relative;
  aspect-ratio: 300 / 652;
  border-radius: 10% / 4.6%;
  overflow: hidden;
  background: var(--sk-screen);
}

.ph.px .scr::after {
  content: '';
  position: absolute;
  top: 2.3%;
  left: 50%;
  width: 6.2%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #0B0C0E;
}

/* Contact band (last CTA): css/contact.v1.css, shared by every page. */

/* ═════════ Footer ═════════ */
.site-foot {
  background: var(--foot-bg);
  border-top: 1px solid var(--foot-border);
  padding: 44px 28px 40px;
}

.foot-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.foot-row+.foot-row {
  padding-top: 22px;
  border-top: 1px solid var(--foot-border);
}

.foot-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--foot-logo);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
}

.foot-links a,
.foot-links button {
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s;
}

.foot-links a:hover,
.foot-links button:hover {
  color: var(--fg);
}

.foot-copy {
  font-size: 12.5px;
  color: var(--muted);
}

/* ═════════ Cookie choice ═════════ */
.consent {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 850; /* under the sticky nav, so an open menu covers it */
  width: min(400px, calc(100vw - 40px));
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 14px;
  box-shadow: 0 12px 40px var(--shadow-dd);
  color: var(--fg);
  font-size: 13.5px;
  line-height: 1.5;
}

.consent[hidden] {
  display: none;
}

.consent p {
  margin: 0 0 12px;
}

.consent a {
  color: var(--acct);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-actions {
  display: flex;
  gap: 10px;
}

.consent-btn {
  flex: 1;
  min-height: 40px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--fg);
}

.consent-btn.accept {
  background: var(--b2);
  border-color: var(--b2);
  color: #FFFFFF;
}

.consent-short {
  display: none;
}

/* ═════════ Responsive ═════════ */
@media (max-width: 1080px) {
  .nav-links {
    gap: 22px;
  }
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .nav-tools {
    margin-left: auto;
  }
}

@media (min-width: 961px) {
  .mobile-menu {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rail-line {
    display: none;
  }
}

@media (max-width: 800px) {
  .hero-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hero-spider {
    display: none;
  }

  .hero-sub {
    margin-bottom: 32px;
  }

  .hero-right {
    aspect-ratio: 16 / 11;
  }

  .cases-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The ring + side labels need ~900px; below that the steps become a list under the ring. */
@media (max-width: 1000px) {
  .loop-box {
    width: auto;
    height: auto;
  }

  .loop-ring {
    position: relative;
    left: auto;
    top: auto;
    margin: 0 auto 24px;
  }

  .loop-step {
    position: static;
    transform: none !important;
    width: auto !important;
    text-align: left !important;
    margin: 0 0 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
  }

  .loop-step .ls-num {
    display: inline-flex;
  }

  .loop-steps {
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .sec {
    padding: 72px 20px;
  }

  .wrap {
    padding: 0;
  }

  .nav-row {
    padding: 0 16px 0 20px;
  }

  .hero {
    padding: 56px 20px 64px;
  }

  .hero-badge {
    margin-bottom: 24px;
  }

  .hero-h1 {
    margin-bottom: 18px;
  }

  .hero-acts {
    flex-direction: column;
  }

  .hero-acts a {
    width: 100%;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 22px 10px;
    margin-top: 44px;
    padding-top: 28px;
  }

  .stats-divider {
    display: none;
  }

  .stat-n {
    font-size: 28px;
    margin-bottom: 4px;
  }

  .stat-l {
    font-size: 12px;
    line-height: 1.3;
  }

  .rating-item {
    grid-column: 1 / -1;
  }

  .clutch-badge {
    grid-column: 1 / -1;
    margin-top: 4px;
  }

  .cases-head {
    margin-bottom: 32px;
  }

  .cases-more .btn-outline {
    width: 100%;
  }

  .cases-page {
    padding: 56px 20px 72px;
  }

  .cases-page .cases-grid {
    margin-top: 32px;
  }

  .process {
    margin-top: 40px;
  }

  .rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .rail li {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
    text-align: left;
    padding-bottom: 22px;
    position: relative;
  }

  .rail li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 45px;
    bottom: 0;
    width: 1px;
    background: var(--border2);
  }

  .rail-num {
    grid-row: 1 / span 2;
  }

  .rail h3 {
    margin: 10px 0 4px;
  }

  .loop {
    margin-top: 32px;
    padding: 36px 18px 28px;
  }

  .loop-head {
    gap: 12px;
  }

  .loop-ring {
    transform: scale(0.86);
    margin: -14px auto 6px;
  }

  .stack-head {
    margin-top: 64px;
    padding-top: 56px;
  }

  .stack-grid {
    margin-top: 32px;
  }

  .stack-cell,
  .tool-card {
    padding: 26px 22px;
  }

  .os-stats {
    gap: 24px 40px;
    margin-top: 44px;
    padding-top: 28px;
  }

  .yt-card {
    padding: 12px;
    gap: 16px;
  }

  .yt-thumb {
    flex-basis: 100%;
  }

  .yt-text {
    flex-basis: calc(100% - 40px);
    padding: 0 4px;
  }

  .yt-arrow {
    padding-right: 4px;
  }

  .stores {
    padding: 72px 20px 80px;
  }

  .stores-grid {
    margin-top: 40px;
  }

  .store-card {
    padding: 20px;
  }

  .store-icon {
    width: 72px;
    height: 72px;
  }

  .site-foot {
    padding: 36px 20px 32px;
  }

  .foot-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .foot-links {
    gap: 0 20px;
  }

  .foot-links a,
  .foot-links button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
  }

  .consent {
    left: 10px;
    right: 10px;
    top: 76px;
    bottom: auto;
    width: auto;
    padding: 10px 10px 10px 14px;
    font-size: 12.5px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .consent[hidden] {
    display: none;
  }

  .consent p {
    flex: 1;
    margin: 0;
  }

  .consent-long {
    display: none;
  }

  .consent-short {
    display: inline;
  }

  .consent-actions {
    flex: none;
    gap: 6px;
  }

  .consent-btn {
    flex: none;
    padding: 7px 12px;
    font-size: 12.5px;
  }

  .shots-scroll {
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    scrollbar-width: none;
  }

  .shots-scroll::-webkit-scrollbar {
    display: none;
  }

  .store-shots {
    --tw: 44cqw;
    width: max-content;
  }

  .shot {
    scroll-snap-align: start;
  }

  .store-info b {
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .hero-h1 {
    font-size: 40px;
  }

  .stat-n {
    font-size: 24px;
  }

  .stat-l {
    font-size: 11px;
  }

}

/* ═════════ Entrance + motion ═════════ */
@keyframes up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  animation: up 0.5s ease both;
}

.hero-h1 {
  animation: up 0.5s 0.09s ease both;
}

.hero-sub {
  animation: up 0.5s 0.18s ease both;
}

.hero-acts {
  animation: up 0.5s 0.27s ease both;
}

.hero-stats {
  animation: up 0.5s 0.38s ease both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-spider::before {
    display: none;
  }

  .hero-spider img {
    transform: none;
  }

  .lift:hover,
  .btn-fill:hover,
  .btn-outline:hover {
    transform: none;
  }
}
