/* CBOXX — shared stylesheet
   Single sans-serif family (Inter), clean white/neutral background,
   slate blue primary + light gray accent. Standard SaaS-site conventions:
   centered hero, soft-shadow cards, generous whitespace. */

:root {
  --ink: #14161A;
  --ink-soft: #5B6270;
  --ink-faint: #8A909C;
  --paper: #F7F7F5;
  --paper-dim: #D3D3D3;
  --paper-dimmer: #B8B8B8;
  --line: rgba(20, 22, 26, 0.10);
  --red: #4A6FA5;
  --red-dark: #3A5A85;
  --red-soft: #E8EDF5;
  --white: #FFFFFF;
  --band: #14161A;
  --band-text: #FAF7F1;
  --on-ink: #FFFFFF;
  --on-primary: #FFFFFF;
  --radius: 10px;
  --radius-sm: 7px;
  --measure: 62ch;
  --shadow-sm: 0 1px 2px rgba(20,22,26,0.04), 0 1px 1px rgba(20,22,26,0.03);
  --shadow-md: 0 4px 16px rgba(20,22,26,0.06), 0 1px 2px rgba(20,22,26,0.04);
  --step-1: #2a78d6;
  --step-2: #eb6834;
  --step-3: #1baf7a;
  --step-4: #eda100;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html.dark {
  --ink: #F1F2F4;
  --ink-soft: #ABB1BB;
  --ink-faint: #767C86;
  --paper: #0F1013;
  --paper-dim: #17181C;
  --paper-dimmer: #060607;
  --line: rgba(255, 255, 255, 0.16);
  --red: #7EA0D6;
  --red-dark: #9BBAE3;
  --red-soft: #1C2A3B;
  --white: #212328;
  --on-ink: #0F1013;
  --on-primary: #0F1013;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 1px 1px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.4);
  --step-1: #3987e5;
  --step-2: #d95926;
  --step-3: #199e70;
  --step-4: #c98500;
}
html.dark body { background: var(--paper); }
html.dark img { opacity: 0.94; }
html.dark .card, html.dark .switcher-panel-wrap, html.dark .step-row .step {
  border-color: var(--line);
  box-shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.6rem, 5.2vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 6vw; }
@media (min-width: 1300px) { .wrap { padding: 0 2rem; } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  max-width: 1120px; margin: 0 auto; padding: 0 6vw;
  height: 66px; display: flex; align-items: center; justify-content: space-between;
}
@media (min-width: 1300px) { .site-header .bar { padding: 0 2rem; } }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand img { height: 26px; width: auto; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500; text-decoration: none; color: var(--ink-soft);
  border-bottom: 1px solid transparent; padding-bottom: 2px; transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta {
  background: var(--ink); color: var(--on-ink) !important;
  padding: 0.55rem 1.15rem !important; border-radius: var(--radius-sm);
  border-bottom: none !important; font-weight: 600 !important;
  display: inline-flex; align-items: center;
}
.nav-cta:hover { background: var(--red); color: var(--on-primary) !important; }

.nav-burger {
  display: none; background: none; border: 1px solid var(--line); border-radius: 7px;
  width: 42px; height: 42px; cursor: pointer; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
}
.nav-burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-burger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: none; color: var(--ink-soft); cursor: pointer; flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.theme-toggle:hover { background: var(--paper-dim); color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
html.dark .theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-moon { display: block; }
.mobile-nav {
  display: none; position: fixed; inset: 66px 0 0 0; z-index: 99;
  background: var(--paper); padding: 1.5rem 6vw; overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 0.2rem; }
.mobile-nav a {
  display: block; padding: 0.9rem 0; font-size: 1.05rem; font-weight: 500; text-decoration: none;
  color: var(--ink); border-bottom: 1px solid var(--line);
}
.mobile-nav a.nav-cta { color: var(--on-ink) !important; text-align: center; margin-top: 1rem; border: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .site-header .bar { position: relative; justify-content: flex-end; }
  .site-header .brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; font-size: 0.92rem;
  padding: 0.82rem 1.55rem; border-radius: var(--radius-sm); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--red); color: var(--on-primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn-outline:hover { border-color: var(--ink); }

/* ---------- layout helpers ---------- */
.section { padding: 5.5rem 0; }
.section-tight { padding: 3.5rem 0; }
.section-line { border-top: 1px solid var(--line); }
.eyebrow {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--red);
  display: block; margin-bottom: 0.9rem;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: var(--measure); }
.prose { max-width: var(--measure); }
.prose p { color: var(--ink-soft); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem;
  background: var(--white); box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--red-soft); color: var(--red);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.card-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tag {
  display: inline-block; font-size: 0.72rem;
  font-weight: 600; letter-spacing: 0.03em; padding: 0.3rem 0.75rem; border-radius: 100px;
  border: 1px solid var(--line); background: var(--paper-dim); color: var(--ink-soft);
}

hr.rule { border: none; border-top: 1px solid var(--line); margin: 3rem 0; }

/* ---------- hero ---------- */
.hero {
  text-align: center; max-width: 780px; margin: 0 auto;
}
.hero .lede { margin: 1.1rem auto 0; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* Photo-backed sections — light mode only, dark mode stays plain.
   ::before carries the slowly-zooming photo, ::after the readability
   gradient; content sits above both via z-index. */
.hero-photo-section { position: relative; overflow: hidden; min-height: 520px; }
@media (min-width: 860px) { .hero-photo-section { min-height: 680px; } }
.hero-photo-section::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center 30%;
  animation: heroZoom 26s ease-in-out infinite alternate;
}
/* .photo-contain: guarantees the whole photo is visible, no cropping —
   trades edge-to-edge fill for never cutting off the subject. */
.hero-photo-section.photo-contain::before {
  background-size: contain; background-repeat: no-repeat; background-position: center;
  background-color: var(--paper); animation: none;
}
.hero-photo-section::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 25%, transparent) 0%, color-mix(in srgb, var(--paper) 42%, transparent) 60%, color-mix(in srgb, var(--paper) 65%, transparent) 100%);
}
.hero-photo-section > .wrap { position: relative; z-index: 2; }
html.dark .hero-photo-section::before, html.dark .hero-photo-section::after { display: none; }
/* .photo-force pages (the App page) are dark by identity, not by user toggle — keep their photo. */
html.dark .hero-photo-section.photo-force::before, html.dark .hero-photo-section.photo-force::after { display: block; }
.hero-photo-section h1, .hero-photo-section h2, .hero-photo-section .lede, .hero-photo-section .eyebrow { text-shadow: 0 1px 3px color-mix(in srgb, var(--paper) 70%, transparent), 0 2px 24px var(--paper); }
.hero-photo-section [data-count-to] { text-shadow: 0 1px 3px color-mix(in srgb, var(--paper) 70%, transparent), 0 2px 24px var(--paper); }

@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.045); } }
@media (prefers-reduced-motion: reduce) { .hero-photo-section::before { animation: none; } }

.photo-hawker::before { background-image: url('../img/hero-hawker-singapore.jpg'); }
.photo-storefront::before { background-image: url('../img/hero-storefront.jpg'); background-position: center 45%; }
.photo-cafe::before { background-image: url('../img/hero-cafe-interior.jpg'); background-position: center 55%; }
.photo-brand::before { background-image: url('../img/hero-brand-shoot.jpg'); background-position: 78% 22%; }
.photo-team::before { background-image: url('../img/hero-team.jpg'); background-position: 78% 50%; animation: none; filter: blur(2px); transform: scale(1.02); }
@media (max-width: 719px) {
  /* Mobile's narrow portrait viewport crops this image on the X axis instead
     of the Y axis (opposite of desktop), so it needs its own position. */
  .photo-team::before { background-position: 50% 40%; }
}
.photo-street::before { background-image: url('../img/hero-street-shops.jpg'); background-position: 35% 55%; }
.photo-app::before { background-image: url('../img/hero-app-phone.jpg'); background-position: center 35%; }

/* ---------- cta-photo-section: fixed-dark band with a real photo behind the
   text, independent of light/dark theme (mirrors --band's own behavior) ---------- */
.cta-photo-section {
  position: relative; overflow: hidden; padding-top: 6.5rem; padding-bottom: 6.5rem;
}
.cta-photo-section .brand-mark {
  width: 42px; height: auto; margin: 0 auto 1.3rem; display: block; opacity: 0.92;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.35));
}
.cta-photo-section::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image: url('../img/team-three-suits.jpg'); background-size: cover; background-position: center 38%;
}
.cta-photo-section::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20,22,26,0.88), rgba(20,22,26,0.82));
}
@media (max-width: 719px) {
  .cta-photo-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .cta-photo-section::before { background-size: cover; background-position: center 30%; }
}

/* ---------- split gate (index.html) ----------
   position:fixed + inset:0 pins this to the literal viewport edges, so
   there is no percentage/vh rounding gap for any page background (light
   or dark) to show through — that gap was the "glitch after dark mode"
   bug: invisible against a near-white body, a stark seam against a near-
   black one. Grid (not flex-basis %) sizes the two halves together in a
   single pass, which also avoids sub-pixel gaps between them. */
.gate {
  position: relative; min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
  transition: grid-template-columns 0.5s cubic-bezier(0.16,1,0.3,1);
}
.gate:has(.gate-left:hover), .gate:has(.gate-left:active) { grid-template-columns: 58fr 42fr; }
.gate:has(.gate-right:hover), .gate:has(.gate-right:active) { grid-template-columns: 42fr 58fr; }
@media (max-width: 719px) {
  .gate { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .gate:has(.gate-left:hover), .gate:has(.gate-left:active) { grid-template-columns: 1fr; grid-template-rows: 58fr 42fr; }
  .gate:has(.gate-right:hover), .gate:has(.gate-right:active) { grid-template-columns: 1fr; grid-template-rows: 42fr 58fr; }
}
.gate-half {
  position: relative; display: flex; align-items: center; justify-content: center;
  text-decoration: none; overflow: hidden;
}
.gate-half::before {
  content: ''; position: absolute; inset: 0; background-size: cover; background-position: center;
  transform: scale(1.05); transition: transform 0.15s ease;
}
.gate-half:hover::before, .gate-half:active::before { transform: scale(1); }
.gate-left::before { background-image: url('../img/hero-hawker-singapore.jpg'); background-position: center 40%; }
.gate-right::before { background-image: url('../img/hero-app-phone.jpg'); }
.gate-half::after { content: ''; position: absolute; inset: 0; }
.gate-left::after { background: linear-gradient(180deg, rgba(247,247,245,0.90), rgba(247,247,245,0.78)); }
.gate-right::after { background: linear-gradient(180deg, rgba(14,15,18,0.90), rgba(14,15,18,0.80)); }
.gate-content { position: relative; z-index: 2; text-align: center; padding: 2rem; }
.gate-left .gate-content { color: #14161A; }
.gate-right .gate-content { color: #FAF7F1; }
.gate-eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; display: block; margin-bottom: 0.6rem; }
.gate-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.6rem; }
.gate-sub { font-size: 0.98rem; opacity: 0.75; max-width: 30ch; margin: 0 auto; }
.gate-tap-hint {
  display: none; align-items: center; justify-content: center; gap: 0.35rem;
  margin-top: 1.2rem; font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.6;
}
.gate-tap-hint svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: gateTapNudge 1.6s ease-in-out infinite; }
@media (max-width: 719px) { .gate-tap-hint { display: flex; } }
@keyframes gateTapNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .gate-tap-hint svg { animation: none; } }
.gate-logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem; pointer-events: none;
}
.gate-logo img { height: 44px; width: auto; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.25)); }
.gate-logo span { font-size: 1.3rem; font-weight: 800; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.4); }
@media (max-width: 719px) {
  /* On the stacked mobile layout the logo's resting position straddles the
     seam between the light and dark halves; a chip keeps it legible as one
     unit instead of the icon and text splitting across the two colors. */
  .gate-logo {
    background: rgba(110, 112, 122, 0.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-radius: 20px; border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    padding: 1.1rem 1.5rem;
  }
}
@media (prefers-reduced-motion: reduce) { .gate, .gate-half::before { transition: none; } }

.step-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  margin-top: 3.5rem;
}
@media (max-width: 860px) { .step-row { grid-template-columns: 1fr; } }
.step-row .step {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  padding: 1.6rem; box-shadow: var(--shadow-sm); text-align: left;
}
.step-row .step .num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--red-soft); color: var(--red);
  font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.9rem;
}

/* ---------- forms ---------- */
.form-field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.form-field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.form-field input, .form-field select, .form-field textarea {
  font-family: inherit; font-size: 0.95rem;
  padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink); outline: none; transition: border-color 0.15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--red); }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.75rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-dim); }
.footer-grid {
  max-width: 1120px; margin: 0 auto; padding: 3.5rem 6vw 2rem;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem;
}
@media (min-width: 1300px) { .footer-grid { padding: 3.5rem 2rem 2rem; } }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.9rem;
}
.footer-grid a { display: block; font-size: 0.9rem; color: var(--ink-soft); text-decoration: none; margin-bottom: 0.5rem; }
.footer-grid a:hover { color: var(--ink); }
.footer-grid p { font-size: 0.88rem; color: var(--ink-soft); max-width: 30ch; }
.footer-bottom {
  max-width: 1120px; margin: 0 auto; padding: 1.2rem 6vw;
  border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--ink-soft);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
}
@media (min-width: 1300px) { .footer-bottom { padding: 1.2rem 2rem; } }
.footer-bottom a { color: inherit; }

/* ---------- switcher (click-to-change panel) ---------- */
.switcher { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .switcher { grid-template-columns: 1fr; } }
.switcher-tabs { display: flex; flex-direction: column; gap: 0.35rem; }
@media (max-width: 860px) { .switcher-tabs { flex-direction: row; overflow-x: auto; gap: 0.5rem; padding-bottom: 0.3rem; } }
.switcher-tab {
  display: flex; align-items: center; gap: 0.85rem; text-align: left;
  padding: 0.85rem 1rem; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: none; cursor: pointer; font-family: inherit; font-size: 0.94rem; font-weight: 600;
  color: var(--ink-soft); transition: background 0.15s, color 0.15s, border-color 0.15s;
}
@media (max-width: 860px) { .switcher-tab { flex-shrink: 0; } }
.switcher-tab:hover { background: var(--paper-dim); }
.switcher-tab.active { background: var(--white); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.switcher-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--paper-dim); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.switcher-tab.active .switcher-num { background: var(--red); color: white; }
.switcher-panel-wrap {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  box-shadow: var(--shadow-sm); padding: 2.2rem; min-height: 200px; position: relative;
}
.switcher-panel { display: none; }
.switcher-panel.active { display: block; animation: switchIn 0.3s ease; }
@keyframes switchIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- timeline (sequential steps, all visible, no interaction) ---------- */
.timeline { max-width: none; margin: 0 auto; padding: 0 6vw; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.2rem; box-sizing: border-box; }
.timeline::before { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 22px; height: 1px; background: var(--line); z-index: 0; }
/* traveling glow: a small dot that runs left-to-right along the connector
   line, in step with each .timeline-num's own light-up pulse below, then
   loops — runs continuously on its own, no interaction needed to trigger it. */
.timeline::after {
  content: ''; position: absolute; top: 22px; left: 12.5%; width: 10px; height: 10px;
  margin-top: -5px; margin-left: -5px; border-radius: 50%; z-index: 0;
  background: var(--step-1); opacity: 0;
  animation: timelineDotMove 6s linear infinite;
}
@keyframes timelineDotMove {
  0%   { left: 12.5%; opacity: 0; background: var(--step-1); box-shadow: 0 0 12px 3px color-mix(in srgb, var(--step-1) 65%, transparent); }
  4%   { opacity: 1; }
  33%  { background: var(--step-2); box-shadow: 0 0 12px 3px color-mix(in srgb, var(--step-2) 65%, transparent); }
  66%  { background: var(--step-3); box-shadow: 0 0 12px 3px color-mix(in srgb, var(--step-3) 65%, transparent); }
  96%  { opacity: 1; background: var(--step-4); box-shadow: 0 0 12px 3px color-mix(in srgb, var(--step-4) 65%, transparent); }
  100% { left: 87.5%; opacity: 0; background: var(--step-4); }
}
.timeline-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.9rem; }
.timeline-num {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 800;
  animation: timelineLightUp 6s ease-in-out infinite;
}
.timeline-step:nth-child(1) .timeline-num { --step-color: var(--step-1); color: var(--step-1); animation-delay: 0s; }
.timeline-step:nth-child(2) .timeline-num { --step-color: var(--step-2); color: var(--step-2); animation-delay: 2s; }
.timeline-step:nth-child(3) .timeline-num { --step-color: var(--step-3); color: var(--step-3); animation-delay: 4s; }
.timeline-step:nth-child(4) .timeline-num { --step-color: var(--step-4); color: var(--step-4); animation-delay: 5.76s; }
@keyframes timelineLightUp {
  0%, 8% { background: var(--white); color: var(--step-color); transform: scale(1); box-shadow: var(--shadow-sm); }
  14%, 20% {
    background: var(--step-color); color: #fff; transform: scale(1.14);
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--step-color) 22%, transparent), var(--shadow-md);
  }
  30%, 100% { background: var(--white); color: var(--step-color); transform: scale(1); box-shadow: var(--shadow-sm); }
}
.timeline-step h3 { margin-bottom: 0.35rem; font-size: 1.5rem; }
.timeline-step p { color: var(--ink-soft); margin: 0; font-size: 0.92rem; }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; gap: 2.2rem; }
  .timeline::before, .timeline::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .timeline::after { display: none; }
  .timeline-num { animation: none; }
}

/* ---------- swipe-demo (draggable card stack, mirrors the app's own gesture) ---------- */
.swipe-demo { position: relative; max-width: 340px; height: 195px; margin: 2.5rem auto 0; }
.swipe-card {
  position: absolute; inset: 0; border-radius: var(--radius); padding: 1.7rem;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; justify-content: center; cursor: grab; user-select: none;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), opacity 0.35s ease;
}
.swipe-card.dragging { transition: none; cursor: grabbing; }
.swipe-card .num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--red-soft); color: var(--red);
  font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; margin-bottom: 0.9rem;
}
.swipe-card p { margin: 0; color: var(--ink); font-size: 1.02rem; }
.swipe-card[data-pos="0"] { transform: translateY(0) scale(1); z-index: 3; opacity: 1; }
.swipe-card[data-pos="1"] { transform: translateY(12px) scale(0.94); z-index: 2; opacity: 0.6; pointer-events: none; }
.swipe-card[data-pos="2"] { transform: translateY(22px) scale(0.89); z-index: 1; opacity: 0.3; pointer-events: none; }
.swipe-card.fly-left { transform: translateX(-180%) rotate(-14deg) !important; opacity: 0; }
.swipe-card.fly-right { transform: translateX(180%) rotate(14deg) !important; opacity: 0; }
.swipe-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.4rem; }
.swipe-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: none;
  color: var(--ink-soft); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.swipe-btn:hover { background: var(--paper-dim); color: var(--ink); }
.swipe-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.swipe-dots { display: flex; gap: 0.4rem; }
.swipe-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background 0.2s, transform 0.2s; }
.swipe-dot.active { background: var(--red); transform: scale(1.3); }
@media (prefers-reduced-motion: reduce) { .swipe-card { transition: none; } }

/* ---------- pop cards (toast-style, replaces the generic bordered-box comparison) ---------- */
.pop-stack { position: relative; display: flex; flex-direction: column; gap: 1rem; padding: 0.5rem 0; }
.pop-card {
  border-radius: var(--radius); padding: 1.3rem 1.5rem; box-shadow: var(--shadow-md);
  opacity: 0; transform: scale(0.88) translateY(14px);
  transition: opacity 0.5s cubic-bezier(0.34,1.56,0.64,1), transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.js .pop-card.in-view { opacity: 1; transform: scale(1) translateY(0); }
.pop-card.pop-no { background: var(--white); border: 1px solid var(--line); }
.pop-card.pop-yes { background: var(--red); margin-left: 1.8rem; }
.pop-card .pop-label { margin: 0; font-size: 0.8rem; font-weight: 700; }
.pop-card.pop-no .pop-label { color: var(--ink-soft); }
.pop-card.pop-yes .pop-label { color: rgba(255,255,255,0.85); }
.pop-card p:last-child { margin: 0.35rem 0 0; }
.pop-card.pop-no p:last-child { color: var(--ink-soft); }
.pop-card.pop-yes p:last-child { color: #fff; }
@media (prefers-reduced-motion: reduce) { .pop-card { transition: none; opacity: 1; transform: none; } }

/* ---------- scroll-reveal ----------
   Only active once the 'js' class (set synchronously in <head>, before
   paint) confirms JS is actually running. Without it, .reveal carries no
   opacity/transform at all — content is never dependent on an observer
   firing to become visible. */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.js .reveal.in-view { opacity: 1; transform: translateY(0); }

.stat-ring-fill { stroke-dashoffset: 314.16; transition: stroke-dashoffset 1.1s cubic-bezier(0.16,1,0.3,1); }
.in-view .stat-ring-fill { stroke-dashoffset: var(--ring-offset, 41.2); }

.mobile-nav { transition: opacity 0.2s ease; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .stat-ring-fill { transition: none !important; }
}
