/* ==========================================================================
   FTPSync — Landing Page
   Design system: "The Wire" — ink & paper base, electric blue + signal lime
   Every structural element is flex or grid. All type sizes are clamp().
   ========================================================================== */

/* ---------- Tokens ---------- */

:root {
  /* brand: taken from the app icon (orange folder → green folder) */
  --accent: #EE5A24;          /* primary: icon orange */
  --accent-ink: #FFFFFF;
  --signal: #38C98F;          /* secondary: icon green */
  --signal-ink: #0B1F17;
  --brand-teal: #04B5B9;      /* icon teal (green folder, bottom) */
  --brand-magenta: #B44DB3;   /* icon magenta (back folder) */
  --brand-amber: #F9912D;     /* icon orange, light end */
  --success: #22A877;

  /* light theme surfaces — white + accent blue */
  --bg-a: #FFFFFF;            /* pure white */
  --bg-b: #0E9F86;            /* stats: deep icon teal-green */
  --bg-c: #EE5A24;            /* demo + CTA: icon orange */
  --bg-ink: #F4F4F2;          /* contrast sections (soft paper grey in light) */
  --on-ink-rgb: 14, 15, 19;   /* text on contrast sections */
  --signal-text: #0B8A63;     /* icon green, darkened to read on white */
  --surface: #FAFAFA;
  --surface-2: #F0F0F0;

  --ink: #0E0F13;
  --ink-soft: #5A5A5A;
  --ink-faint: #8A8A8A;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.16);

  --placeholder-bg: #E8E8E8;
  --placeholder-ink: #A0A0A0;

  --header-bg: rgba(255, 255, 255, 0.88);
  --shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.12);

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", monospace;

  /* clamp type scale */
  --fs-hero: clamp(2.5rem, 5vw, 5.6rem);
  --fs-cta: clamp(2.6rem, 8vw, 7.5rem);
  --fs-h2: clamp(2rem, 4.4vw, 4rem);
  --fs-h3: clamp(1.5rem, 2.6vw, 2.4rem);
  --fs-lead: clamp(0.95rem, 1.25vw, 1.12rem);
  --fs-body: clamp(0.95rem, 1.2vw, 1.1rem);
  --fs-small: clamp(0.78rem, 1vw, 0.9rem);
  --fs-stat: clamp(3rem, 7vw, 6.5rem);
  --fs-step: clamp(3.5rem, 9vw, 9rem);

  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --pad-y: clamp(4rem, 10vh, 8rem);
  --header-h: clamp(4rem, 8vh, 5rem);
  --radius: clamp(0.75rem, 1.5vw, 1.25rem);
  --marquee-h: clamp(2.5rem, 5vh, 3rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg-a: #1A1A1A;            /* charcoal */
  --bg-b: #0E9F86;            /* stats: deep icon teal-green */
  --bg-c: #EE5A24;            /* demo + CTA: icon orange */
  --bg-ink: #0F0F0F;          /* contrast sections (nearly black) */
  --on-ink-rgb: 242, 241, 236;
  --signal-text: #38C98F;
  --surface: #2A2A2A;
  --surface-2: #333333;

  --ink: #E8E8E8;             /* light grey, not pure white */
  --ink-soft: #B0B0B0;        /* mid grey */
  --ink-faint: #808080;       /* darker grey */
  --line: rgba(232, 232, 232, 0.12);
  --line-strong: rgba(232, 232, 232, 0.22);

  --placeholder-bg: #333333;
  --placeholder-ink: #888888;

  --header-bg: rgba(26, 26, 26, 0.88);
  --shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.55);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  width: 100%;
  /* clip instead of hidden: hidden creates a scroll container and can
     break position: sticky (the horizontal features scroller) */
  overflow-x: hidden;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-a);
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
}

body.is-locked {
  overflow: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-optical-sizing: auto;
  text-wrap: balance;
}

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

kbd.key-hint {
  display: inline-flex;
  align-items: center;
  padding: 0.05em 0.45em;
  font-family: var(--font-display);
  font-size: 0.85em;
  border: 1px solid var(--line-strong);
  border-radius: 0.4em;
  background: var(--surface);
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.page {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Lucide sizing default inside text contexts */
.lucide {
  width: 1.15em;
  height: 1.15em;
  stroke-width: 2;
  flex-shrink: 0;
}

/* ---------- Shared section headings ---------- */

.section-kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-kicker::before {
  content: "";
  display: block;
  width: 2.2rem;
  height: 2px;
  background: var(--accent);
}

.section-kicker-ondark {
  color: var(--signal-text);
}

.section-kicker-ondark::before {
  background: var(--signal);
}

.section-title {
  font-size: var(--fs-h2);
  max-width: 18ch;
}

.section-title-ondark {
  color: rgb(var(--on-ink-rgb));
}

.section-sub {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 56ch;
}

/* SplitText generated wrappers */
.split-line {
  display: block;
  overflow: hidden;
}

.split-word {
  display: inline-block;
  will-change: opacity, transform;
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 100px;
  border: 2px solid transparent;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
              transform 0.35s var(--ease-out);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateY(101%);
  border-radius: inherit;
  transition: transform 0.45s var(--ease-out);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateY(0);
}

.btn:active {
  transform: scale(0.97);
}

.btn-label {
  display: inline-flex;
  align-items: center;
  transition: transform 0.35s var(--ease-out);
}

.btn-icon {
  display: inline-flex;
  transition: transform 0.35s var(--ease-out);
}

.btn:hover .btn-icon {
  transform: translateY(0.15em);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary::before {
  background: var(--signal);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: var(--signal-ink);
  border-color: var(--signal);
}

.btn-lg {
  padding: 0.75rem 1.4rem;
  gap: 0.5rem;
  font-size: var(--fs-body);
}

.btn-header {
  padding: 0.6rem 1.2rem;
  font-size: var(--fs-small);
}

.btn-mega {
  padding: clamp(1.2rem, 2.5vw, 1.8rem) clamp(2.2rem, 5vw, 4rem);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  /* sits on the orange CTA: white pill, fills near-black on hover */
  background: #FFFFFF;
  color: #C9461A;
  border-color: #FFFFFF;
}

.btn-mega::before {
  background: #0E0F13;
}

.btn-mega:hover,
.btn-mega:focus-visible {
  color: #FFFFFF;
  border-color: #0E0F13;
}

/* ---------- Splash ---------- */

.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
}

.splash.is-done {
  display: none;
}

.splash-panel {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50.5%;
  background: var(--bg-ink);
  display: flex;
}

.splash-panel-top { top: 0; }
.splash-panel-bottom { bottom: 0; }

.splash-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 3vh, 1.75rem);
  color: rgb(var(--on-ink-rgb));
}

.splash-mark {
  display: flex;
  width: clamp(4rem, 9vw, 5.5rem);
  height: clamp(4rem, 9vw, 5.5rem);
}

.splash-mark-icon {
  width: 100%;
  height: 100%;
  border-radius: 23%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.splash-word {
  display: flex;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.splash-letter {
  display: inline-block;
  will-change: transform, opacity;
}

/* mini upload card: same construct as the hero sync panel */
.splash-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: min(26rem, calc(100vw - 2rem));
  padding: 0.7rem 1.1rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.splash-rows {
  display: flex;
  flex-direction: column;
  list-style: none;
}

.splash-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.15rem;
}

.splash-row-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

/* clips the filename while it slides to the next one */
.splash-row-file-wrap {
  display: block;
  overflow: hidden;
  height: 1.2em;
}

.splash-row-file {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.splash-row-conn {
  font-size: 0.68rem;
  color: var(--ink-faint);
}

.splash-row-state {
  display: grid;
  justify-items: end;
  min-width: 4.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.splash-row-up,
.splash-row-ok {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.splash-row-state .lucide {
  width: 0.85rem;
  height: 0.85rem;
}

.splash-row-up { color: var(--accent); }
.splash-row-ok { color: var(--success); opacity: 0; transform: translateY(0.4rem); }
.splash-row.is-done .splash-row-up { opacity: 0; transform: translateY(-0.4rem); }
.splash-row.is-done .splash-row-ok { opacity: 1; transform: none; }
/* short per-file check while the upload moves to the next file */
.splash-row.is-flash .splash-row-up { opacity: 0; transform: translateY(-0.4rem); }
.splash-row.is-flash .splash-row-ok { opacity: 1; transform: none; }

.splash-meter {
  display: flex;
  width: 100%;
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.splash-meter-fill {
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--signal));
  transition: background 0.4s var(--ease-out);
}

.splash-card.is-success .splash-meter-fill {
  background: var(--success);
}

.splash-count {
  display: flex;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

/* ---------- Scroll progress ---------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  display: flex;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  height: var(--header-h);
  padding: 0 var(--pad-x);
  background: transparent;
  transition: transform 0.45s var(--ease-out), background-color 0.35s var(--ease-out),
              box-shadow 0.35s var(--ease-out), backdrop-filter 0.35s var(--ease-out);
}

.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header.is-hidden {
  transform: translateY(-110%);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  letter-spacing: 0.02em;
}

/* the real app icon, cut to a macOS-style rounded square */
.header-logo-mark {
  display: block;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 23%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.4s var(--ease-out);
}

.header-logo:hover .header-logo-mark {
  transform: scale(1.08) rotate(-4deg);
}

.header-logo-text {
  display: inline-flex;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.15rem, 0.6vw, 0.5rem);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border-radius: 100px;
  isolation: isolate;
  transition: color 0.3s var(--ease-out);
}

/* pill that scales in behind the label */
.nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  opacity: 0;
  transform: scale(0.55);
  transition: transform 0.35s var(--ease-out), opacity 0.3s var(--ease-out),
              background-color 0.3s var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--ink);
}

.nav-link:hover::before,
.nav-link:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

/* current section (scrollspy) or just clicked */
.nav-link.is-active {
  color: var(--accent-ink);
}

.nav-link.is-active::before {
  opacity: 1;
  transform: scale(1);
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* theme toggle */
.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  /* own surface + ink, so the icon stays readable over the blue hero glow */
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(15deg);
}

.theme-icon {
  grid-area: 1 / 1;
  display: inline-flex;
  width: 1.05rem;
  height: 1.05rem;
  transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out);
}

.theme-icon-sun { opacity: 1; transform: scale(1); }
.theme-icon-moon { opacity: 0; transform: scale(0.5); }

[data-theme="dark"] .theme-icon-sun { opacity: 0; transform: scale(0.5); }
[data-theme="dark"] .theme-icon-moon { opacity: 1; transform: scale(1); }

/* burger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  width: 2.4rem;
  height: 2.4rem;
}

.menu-toggle-bar {
  display: block;
  width: 1.4rem;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform 0.4s var(--ease-out);
}

.menu-toggle.is-open .menu-toggle-bar:first-child {
  transform: translateY(0.3rem) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-bar:last-child {
  transform: translateY(-0.3rem) rotate(-45deg);
}

/* ---------- Mobile menu ---------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 2rem) var(--pad-x) 3rem;
  background: var(--bg-a);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-2%);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out),
              visibility 0s linear 0.45s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  padding: 0.6rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  transition: color 0.3s var(--ease-out), padding-left 0.3s var(--ease-out);
}

.mobile-nav-link:hover {
  color: var(--accent);
  padding-left: 0.6rem;
}

.mobile-nav-link.is-active {
  color: var(--accent);
  padding-left: 0.6rem;
  border-bottom-color: var(--accent);
}

.mobile-menu-foot {
  display: flex;
}

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

.hero {
  position: relative;
  display: grid;
  align-items: center;
  width: 100%;
  min-height: 100svh;
  padding: calc(var(--header-h) + 2rem) var(--pad-x) calc(var(--marquee-h) + 4rem);
  background: var(--bg-a);
  overflow: hidden;
  transition: background-color 0.5s var(--ease-out);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  pointer-events: none;
}

.hero-orb {
  grid-area: 1 / 1;
  justify-self: end;
  align-self: start;
  width: clamp(20rem, 55vw, 50rem);
  height: clamp(20rem, 55vw, 50rem);
  margin: -10% -12% 0 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent) 0%, transparent 62%);
  opacity: 0.35;
  filter: blur(40px);
}

.grid-lines {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: clamp(3rem, 8vw, 6rem) clamp(3rem, 8vw, 6rem);
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  opacity: 0.6;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  width: 100%;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.2rem, 3vh, 2rem);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow-dot {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 25%, transparent);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}

.hero-title {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-hero);
}

.hero-line {
  display: block;
  overflow: hidden;
}

.hero-line-inner {
  display: inline-block;
  will-change: transform;
}

.hero-line-accent {
  color: var(--accent);
}

.hero-sub {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* hero visual */
.hero-visual {
  position: relative;
  display: grid;
  width: 100%;
}

.sync-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sync-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sync-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.sync-live {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  border-radius: 100px;
  background: color-mix(in srgb, var(--signal) 22%, transparent);
  color: var(--ink);
}

.sync-live-dot {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--signal);
  animation: pulse 1.6s infinite;
}

.sync-rows {
  display: flex;
  flex-direction: column;
}

.sync-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.2rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
}

.sync-row:last-child {
  border-bottom: 0;
}

.sync-row-icon {
  display: inline-flex;
  color: var(--ink-faint);
}

.sync-row-name {
  display: flex;
  flex: 1;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.sync-row-state {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.sync-state-done { color: var(--success); }
.sync-state-up { color: var(--accent); }
.sync-state-queue { color: var(--ink-faint); }

.sync-progress {
  display: flex;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  overflow: hidden;
}

.sync-progress-fill {
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0.84);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--signal));
  animation: progressShift 3s var(--ease-out) infinite alternate;
}

@keyframes progressShift {
  from { transform: scaleX(0.55); }
  to   { transform: scaleX(0.92); }
}

.float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  will-change: transform;
}

.float-badge-a {
  top: -1.4rem;
  right: 6%;
  color: var(--accent);
}

.float-badge-b {
  bottom: -1.2rem;
  left: 4%;
  color: var(--ink);
}

/* ---------- Marquee ---------- */

/* lives inside the hero, pinned full-bleed to its bottom edge */
.marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--marquee-h);
  background: var(--accent);
  color: var(--accent-ink);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  animation: marqueeScroll 20s linear infinite;
  will-change: transform;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-25%); }  /* one of four identical groups */
}

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 clamp(1rem, 2vw, 1.8rem);
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 1vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

/* ---------- Features (pinned horizontal) ---------- */

.features {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  /* JS extends this into a scroll runway; the sticky child stays put */
  background: var(--bg-ink);
  color: rgb(var(--on-ink-rgb));
}

.features-pin {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 auto;
  gap: clamp(1.5rem, 4vh, 3rem);
  width: 100%;
  height: 100vh;
  height: 100svh;
  padding: calc(var(--header-h) + 1rem) 0 2.5rem;
  overflow: hidden;
}

.features-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 var(--pad-x);
}

.features-title {
  color: rgb(var(--on-ink-rgb));
}

.features-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.features-progress-label {
  display: flex;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--signal-text);
}

.features-progress-bar {
  display: flex;
  width: clamp(6rem, 12vw, 10rem);
  height: 3px;
  border-radius: 2px;
  background: rgba(var(--on-ink-rgb), 0.18);
  overflow: hidden;
}

.features-progress-fill {
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--signal-text);
}

.features-track {
  display: flex;
  align-items: stretch;
  width: max-content;
  will-change: transform;
}

/* JS adds this when no scroller is available (GSAP missing / reduced motion) */
.features-static .features-pin {
  position: static;
  height: auto;
}

.features-static .features-track {
  flex-direction: column;
  width: 100%;
}

.features-static .feature-panel {
  width: 100%;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.feature-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(1rem, 3vh, 2rem);
  width: 100vw;
  flex-shrink: 0;
  padding: 0 var(--pad-x);
}

.feature-index {
  display: flex;
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 700;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(var(--on-ink-rgb), 0.3);
}

.feature-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(0.9rem, 2.2vh, 1.4rem);
  max-width: 46rem;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: clamp(3.2rem, 5vw, 4.2rem);
  height: clamp(3.2rem, 5vw, 4.2rem);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 0.45s var(--ease-out), background-color 0.45s var(--ease-out);
}

.feature-panel:hover .feature-icon {
  transform: rotate(-8deg) scale(1.08);
  background: var(--signal);
  color: var(--signal-ink);
}

.feature-icon .lucide {
  width: 45%;
  height: 45%;
}

.feature-title {
  font-size: var(--fs-h3);
  color: rgb(var(--on-ink-rgb));
}

.feature-desc {
  font-size: var(--fs-lead);
  color: rgba(var(--on-ink-rgb), 0.68);
  max-width: 52ch;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
}

.feature-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(var(--on-ink-rgb), 0.85);
}

.feature-list-item .lucide {
  color: var(--signal-text);
}

/* ---------- Demo ---------- */

.demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 6vh, 4rem);
  width: 100%;
  min-height: 100svh;
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg-c);
  transition: background-color 0.5s var(--ease-out);
  color: #FFFFFF;
}

/* in light mode, demo has blue bg, so invert text */
.demo .section-kicker {
  color: rgba(255, 255, 255, 0.88);
}

.demo .section-kicker::before {
  background: rgba(255, 255, 255, 0.88);
}

.demo .section-title {
  color: #FFFFFF;
}

.demo .section-sub {
  color: rgba(255, 255, 255, 0.78);
}

.demo .demo-caption {
  color: rgba(255, 255, 255, 0.68);
}

[data-theme="dark"] .demo {
  color: #FFFFFF;
}

[data-theme="dark"] .demo .section-kicker {
  color: rgba(255, 255, 255, 0.88);
}

[data-theme="dark"] .demo .section-kicker::before {
  background: rgba(255, 255, 255, 0.88);
}

[data-theme="dark"] .demo .section-title {
  color: #FFFFFF;
}

[data-theme="dark"] .demo .section-sub {
  color: rgba(255, 255, 255, 0.78);
}

[data-theme="dark"] .demo .demo-caption {
  color: rgba(255, 255, 255, 0.68);
}

.demo-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}

.demo-head .section-kicker {
  justify-content: center;
}

/* ---------- Steps ---------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 7vh, 5rem);
  width: 100%;
  min-height: 100svh;
  justify-content: center;
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg-a);
  transition: background-color 0.5s var(--ease-out);
}

.steps-head {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.steps-list {
  display: flex;
  flex-direction: column;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.6rem, 4vh, 3rem) 0;
  border-top: 1px solid var(--line-strong);
  transition: padding-left 0.45s var(--ease-out);
}

.step:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.step:hover {
  padding-left: clamp(0.5rem, 2vw, 1.5rem);
}

.step-num {
  display: flex;
  font-family: var(--font-display);
  font-size: var(--fs-step);
  font-weight: 700;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line-strong);
  transition: color 0.45s var(--ease-out);
}

.step:hover .step-num {
  color: var(--accent);
  -webkit-text-stroke: 1.5px var(--accent);
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.step-title {
  font-size: var(--fs-h3);
}

.step-desc {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 52ch;
}

.step-icon {
  display: grid;
  place-items: center;
  width: clamp(3rem, 5vw, 4rem);
  height: clamp(3rem, 5vw, 4rem);
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out),
              border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.step:hover .step-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: rotate(-10deg);
}

/* ---------- Stats ---------- */

.stats {
  display: flex;
  width: 100%;
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg-b);
  transition: background-color 0.5s var(--ease-out);
  color: #FFFFFF;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  width: 100%;
}

/* orange section in both themes — text stays white */
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-left: 2px solid rgba(255, 255, 255, 0.35);
  padding-left: clamp(1rem, 2vw, 1.6rem);
}

.stat-value {
  display: flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: var(--fs-stat);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

.stat-number {
  display: inline-flex;
}

.stat-suffix {
  display: inline-flex;
  font-size: 0.5em;
  color: var(--signal);
}

.stat-label {
  display: flex;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- Security ---------- */

.security {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100svh;
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg-ink);
  color: rgb(var(--on-ink-rgb));
}

.security-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6rem);
  width: 100%;
}

.security-copy {
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 3vh, 2rem);
}

.security-lead {
  font-size: var(--fs-lead);
  color: rgba(var(--on-ink-rgb), 0.68);
  max-width: 50ch;
}

.security-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.2rem, 3vh, 2rem);
}

.security-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding-bottom: clamp(1.2rem, 3vh, 2rem);
  border-bottom: 1px solid rgba(var(--on-ink-rgb), 0.14);
}

.security-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.security-item-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--signal-text) 12%, transparent);
  color: var(--signal-text);
}

.security-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.security-item-title {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: rgb(var(--on-ink-rgb));
}

.security-item-desc {
  font-size: var(--fs-body);
  color: rgba(var(--on-ink-rgb), 0.62);
  max-width: 44ch;
}

/* ---------- FAQ ---------- */

.faq {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg-a);
  transition: background-color 0.5s var(--ease-out);
}

.faq-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 6vw, 6rem);
  width: 100%;
}

.faq-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: start;
  gap: 1.1rem;
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line-strong);
}

.faq-item:first-child {
  border-top: 1px solid var(--line-strong);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: clamp(1.2rem, 3vh, 1.8rem) 0;
  text-align: left;
  transition: color 0.3s var(--ease-out);
}

.faq-q:hover {
  color: var(--accent);
}

.faq-q-text {
  display: flex;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
}

.faq-q-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: transform 0.45s var(--ease-out), background-color 0.35s var(--ease-out),
              color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

.faq-item.is-open .faq-q-icon {
  transform: rotate(135deg);
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease-out);
}

.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
}

.faq-a-text {
  overflow: hidden;
  font-size: var(--fs-body);
  color: var(--ink-soft);
  max-width: 60ch;
  padding-bottom: 0;
  transition: padding-bottom 0.5s var(--ease-out);
}

.faq-item.is-open .faq-a-text {
  padding-bottom: clamp(1.2rem, 3vh, 1.8rem);
}

/* ---------- CTA ---------- */

.cta {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100svh;
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg-c);
  transition: background-color 0.5s var(--ease-out);
  color: #FFFFFF;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 4vh, 2.5rem);
  text-align: center;
}

/* orange section in both themes — text stays white */
.cta-title {
  display: flex;
  flex-direction: column;
  font-size: var(--fs-cta);
  color: #FFFFFF;
}

.cta-line {
  display: block;
  overflow: hidden;
}

.cta-line-inner {
  display: inline-block;
  will-change: transform;
}

.cta-line-accent {
  color: #FFFFFF;
}

.cta-sub {
  font-size: var(--fs-lead);
  color: rgba(255, 255, 255, 0.78);
  max-width: 44ch;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.cta-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.68);
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 6vh, 4rem);
  width: 100%;
  padding: var(--pad-y) var(--pad-x) 2rem;
  background: var(--bg-ink);
  color: rgb(var(--on-ink-rgb));
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  width: 100%;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
}

.footer-logo {
  color: rgb(var(--on-ink-rgb));
}

.footer-tagline {
  font-size: var(--fs-body);
  color: rgba(var(--on-ink-rgb), 0.6);
  max-width: 34ch;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
}

.footer-col-title {
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(var(--on-ink-rgb), 0.5);
  margin-bottom: 0.4rem;
}

.footer-link {
  position: relative;
  display: inline-flex;
  font-size: var(--fs-body);
  color: rgba(var(--on-ink-rgb), 0.78);
  transition: color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.footer-link:hover {
  color: var(--signal-text);
  transform: translateX(0.3rem);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(var(--on-ink-rgb), 0.14);
}

.footer-copy {
  /* block, not flex: flex would swallow the spaces around the inline link */
  display: block;
  font-size: var(--fs-small);
  color: rgba(var(--on-ink-rgb), 0.5);
}

.footer-copy-link {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.2em;
  transition: color 0.25s var(--ease-out), text-decoration-color 0.25s var(--ease-out);
}

.footer-copy-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(var(--on-ink-rgb), 0.78);
  transition: color 0.3s var(--ease-out);
}

.footer-top:hover {
  color: var(--signal-text);
}

.footer-top .lucide {
  transition: transform 0.35s var(--ease-out);
}

.footer-top:hover .lucide {
  transform: translateY(-0.2em);
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-visual {
    max-width: 34rem;
  }

  .security-inner {
    grid-template-columns: 1fr;
  }

  .faq-inner {
    grid-template-columns: 1fr;
  }

  .faq-head {
    position: static;
  }

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

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

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

  .btn-header {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding-bottom: calc(var(--marquee-h) + 3rem);
  }

  .features-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .features-progress {
    align-items: flex-start;
  }

  .feature-panel {
    grid-template-rows: auto 1fr;
  }

  .step {
    grid-template-columns: auto 1fr;
  }

  .step-icon {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .float-badge-a {
    right: 2%;
  }

  .float-badge-b {
    left: 2%;
  }
}

/* ---------- Reduced motion ---------- */

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

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

  .marquee-track {
    animation: none;
  }

  .splash {
    display: none;
  }

  /* horizontal scroller falls back to a vertical stack */
  .features-pin {
    position: static;
    height: auto;
  }

  .features-track {
    flex-direction: column;
    width: 100%;
  }

  .feature-panel {
    width: 100%;
  }

  .feature-panel {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* ==========================================================================
   Refresh (Nov 2026): Bricolage Grotesque + Geist, two-line hero,
   screenshots in feature panels, swipeable screenshot gallery
   ========================================================================== */

/* ---------- Type: tracked labels in mono ---------- */

.section-kicker,
.hero-eyebrow,
.features-progress-label,
.splash-count,
.sync-live,
.footer-col-title,
.stat-label {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
}

.stat-label {
  letter-spacing: 0.06em;
}

kbd.key-hint {
  font-family: var(--font-mono);
  font-size: 0.8em;
}

.hero-sub,
.section-sub,
.feature-desc,
.security-lead {
  line-height: 1.55;
  text-wrap: pretty;
}

.feature-list-item,
.sync-row-name {
  font-family: var(--font-body);
  letter-spacing: 0;
}

.btn {
  letter-spacing: -0.005em;
}

/* ---------- Hero: two lines, balanced columns ---------- */

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: clamp(2rem, 5vw, 5rem);
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: clamp(2.3rem, 10.5vw, 3.2rem);
  }

  .hero-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-line {
  padding-bottom: 0.06em; /* keep descenders inside the reveal mask */
}

@media (min-width: 1024px) {
  .hero-line-inner {
    white-space: nowrap;
  }
}

.hero-copy {
  gap: clamp(1.4rem, 3.2vh, 2.2rem);
}

.hero-sub {
  max-width: 44ch;
}

/* ---------- Walkthrough video ---------- */

.walkthrough {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vh, 3.5rem);
  width: 100%;
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg-ink);
  color: rgb(var(--on-ink-rgb));
  transition: background-color 0.5s var(--ease-out);
}

.walkthrough-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}

.walkthrough-head .section-title,
.walkthrough-head .section-sub {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
}

.walkthrough-head .section-title {
  font-size: clamp(2.5rem, 6.2vw, 5.75rem);
  line-height: 1;
}

.walkthrough-head .section-sub {
  color: rgba(var(--on-ink-rgb), 0.68);
}

.walkthrough-frame {
  position: relative;
  display: flex;
  width: min(100%, 68rem);
}

.walkthrough-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 1.25% / 2%;   /* matches the recorded window's own corners (20 px on the 1600 x 1000 video) */
  background: var(--surface-2);
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(var(--on-ink-rgb), 0.1),
    0 40px 90px -30px rgba(0, 0, 0, 0.35),
    0 0 140px -20px color-mix(in srgb, var(--accent) 30%, transparent);
}

[data-theme="dark"] .walkthrough-video {
  box-shadow:
    0 0 0 1px rgba(var(--on-ink-rgb), 0.1),
    0 40px 90px -30px rgba(0, 0, 0, 0.8),
    0 0 140px -20px color-mix(in srgb, var(--accent) 30%, transparent);
}

.walkthrough-toggle {
  position: absolute;
  right: clamp(0.6rem, 1.4vw, 1rem);
  bottom: clamp(0.6rem, 1.4vw, 1rem);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(14, 15, 19, 0.6);
  color: #FFFFFF;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.walkthrough-toggle:hover,
.walkthrough-toggle:focus-visible {
  background: var(--accent);
  transform: scale(1.06);
}

.walkthrough-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.walkthrough-toggle .lucide {
  width: 1.05rem;
  height: 1.05rem;
}

.walkthrough-icon-sound,
.walkthrough-toggle.is-on .walkthrough-icon-muted {
  display: none;
}

.walkthrough-toggle.is-on .walkthrough-icon-sound {
  display: block;
}

/* ---------- Features: copy left, screenshot right ---------- */

.feature-panel {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  column-gap: clamp(2rem, 5vw, 5rem);
}

.feature-index {
  grid-column: 1;
  grid-row: 1;
  font-size: clamp(3rem, 7vw, 6rem);
}

.feature-main {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
}

.feature-media {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}

/* width follows the height cap, so the box (shadow, radius) is exactly the image */
.feature-media img {
  display: block;
  width: min(100%, calc(min(70svh, 46rem) * 1.6));
  height: auto;
  aspect-ratio: 16 / 10;
  /* the macOS window's own corner: 54 px on the 2880 x 1800 shot, so it scales with the image */
  border-radius: 1.875% / 3%;
  box-shadow:
    0 0 0 1px rgba(var(--on-ink-rgb), 0.1),
    0 40px 90px -30px rgba(0, 0, 0, 0.35),
    0 0 120px -20px color-mix(in srgb, var(--accent) 35%, transparent);
}

[data-theme="dark"] .feature-media img {
  box-shadow:
    0 0 0 1px rgba(var(--on-ink-rgb), 0.1),
    0 40px 90px -30px rgba(0, 0, 0, 0.8),
    0 0 120px -20px color-mix(in srgb, var(--accent) 35%, transparent);
}

.features-static .feature-media img {
  width: 100%;
}

@media (max-width: 1023px) {
  .feature-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-content: start;
    row-gap: clamp(1rem, 2.5vh, 1.6rem);
  }

  .feature-media {
    grid-column: 1;
    grid-row: 3;
  }

  .feature-media {
    justify-content: flex-start;
  }

  .feature-media img {
    width: min(100%, calc(26svh * 1.6));
  }

  .feature-index {
    font-size: clamp(2.6rem, 10vw, 4rem);
  }
}

@media (max-width: 767px) {
  .feature-desc {
    font-size: var(--fs-body);
  }
}

/* ---------- Steps: aligned columns ---------- */

.step {
  grid-template-columns: clamp(3.5rem, 8vw, 7.5rem) minmax(0, 1fr) auto;
}

@media (max-width: 767px) {
  .step {
    grid-template-columns: 3rem minmax(0, 1fr);
  }
}

/* ---------- Stats ---------- */

.stat-glyph {
  font-weight: 600;
  line-height: 0.95;
}

/* ---------- Swipeable screenshot gallery ---------- */

.gallery {
  --slide-w: min(62rem, 76vw, calc((100svh - 15rem) * 1.6));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vh, 2rem);
  /* bleed past the section padding so neighbours peek in from the edges */
  width: calc(100% + 2 * var(--pad-x));
  margin-inline: calc(-1 * var(--pad-x));
}

.gallery-track {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  width: 100%;
  padding: 1rem calc((100% - var(--slide-w)) / 2) 0.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  outline: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.gallery-track:focus-visible .gallery-slide.is-current img {
  box-shadow:
    0 0 0 3px var(--signal),
    0 30px 60px -30px rgba(8, 16, 70, 0.6);
}

.gallery-slide {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  flex: 0 0 var(--slide-w);
  scroll-snap-align: center;
  /* scale + opacity are driven per frame from the scroll position (JS) */
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.gallery-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 1.875% / 3%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 30px 60px -30px rgba(8, 16, 70, 0.6);
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.gallery-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.6rem;
  padding: 0 1rem;
  text-align: center;
  font-size: var(--fs-body);
  color: rgba(255, 255, 255, 0.72);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.gallery-slide.is-current .gallery-caption {
  opacity: 1;
}

.gallery-caption strong {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.gallery-controls {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.75rem);
}

.gallery-arrow {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), opacity 0.25s;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--accent);
  outline: none;
}

.gallery-arrow:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.gallery-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gallery-dot {
  display: block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.4s var(--ease-out), background-color 0.3s var(--ease-out);
}

.gallery-dot:hover {
  background: rgba(255, 255, 255, 0.75);
}

.gallery-dot[aria-current="true"] {
  width: 1.9rem;
  background: var(--signal);
}

/* bigger hit area without changing the visual */
.gallery-dot {
  position: relative;
}

.gallery-dot::after {
  content: "";
  position: absolute;
  inset: -0.7rem -0.25rem;
}

@media (max-width: 767px) {
  .gallery {
    --slide-w: 86vw;
  }

  .gallery-caption {
    flex-direction: column;
    align-items: center;
    font-size: var(--fs-small);
  }
}

@media (hover: none) {
  .gallery-track {
    cursor: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-slide {
    transform: none !important;
  }
}

/* ---------- Hero live feed (self-running loop, js/main.js initHeroFeed) ---------- */

.sync-row-name {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.sync-row-conn {
  flex-shrink: 0;
  color: var(--ink-faint);
}

.sync-row-file {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sync-row-state {
  justify-content: flex-end;
  min-width: 5.6rem;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s var(--ease-out);
}

.sync-state-saved { color: var(--ink-faint); }

.sync-rows.is-live {
  position: relative;
  display: block;
  overflow: hidden;
}

.sync-rows.is-live .sync-row {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--row-h, 2.9rem);
  border-bottom: 1px solid var(--line);
  transition: transform 0.7s var(--ease-out), opacity 0.5s var(--ease-out), background-color 0.6s var(--ease-out);
  will-change: transform, opacity;
}

/* per-row upload bar along the bottom edge */
.sync-rows.is-live .sync-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  opacity: var(--bar, 0);
  transition: opacity 0.4s var(--ease-out);
}

.sync-rows.is-live .sync-row.is-flash {
  background: color-mix(in srgb, var(--signal) 7%, transparent);
}

.sync-progress-fill.is-live {
  animation: none;
  transition: transform 0.25s linear;
}

.sync-panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.sync-foot-num {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.sync-icon-set {
  display: none;
}

/* ---------- Hero panel: connection sidebar + feed ---------- */

:root {
  /* connection colours drawn from the icon */
  --conn-live: #EE5A24;
  --conn-staging: #F9B12D;
  --conn-portfolio: #B44DB3;
  --conn-video: #04B5B9;
  --conn-docs: #8B6BD6;
  --conn-shop: #38C98F;
}

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  }
}

:root {
  --fs-hero: clamp(2.5rem, 4.4vw, 5.1rem);
}

.sync-body {
  display: grid;
  grid-template-columns: minmax(0, 10.5rem) minmax(0, 1fr);
  gap: clamp(0.75rem, 1.4vw, 1.1rem);
}

.sync-conns {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-right: clamp(0.6rem, 1.2vw, 0.9rem);
  border-right: 1px solid var(--line);
}

.sync-conn {
  display: grid;
  grid-template-columns: 0.55rem minmax(0, 1fr) 0.9rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.5rem;
  border-radius: 0.6rem;
  transition: background-color 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.sync-conn.is-selected {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}

.sync-conn-dot,
.sync-row-dot {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--c, var(--accent));
}

.sync-conn-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.sync-conn-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.45s var(--ease-out);
}

.sync-conn.is-selected .sync-conn-name {
  color: var(--ink);
}

.sync-conn-host {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--ink-faint);
}

.sync-conn-state {
  display: grid;
  place-items: center;
  color: var(--accent);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.sync-conn-state .lucide {
  width: 0.85rem;
  height: 0.85rem;
  stroke-width: 2.4;
}

.sync-conn.is-syncing .sync-conn-state {
  opacity: 1;
  transform: none;
}

.sync-conn.is-syncing .sync-conn-state .lucide {
  animation: connSpin 1.1s linear infinite;
}

@keyframes connSpin {
  to { transform: rotate(360deg); }
}

.sync-conn-more {
  display: flex;
  padding: 0.35rem 0.5rem 0.35rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-faint);
}

.sync-feed {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  min-width: 0;
}

.sync-row {
  gap: 0.65rem;
}

.sync-row-name {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  line-height: 1.2;
}

.sync-row-file {
  max-width: 100%;
  color: var(--ink);
}

.sync-row-conn {
  font-size: 0.68rem;
  color: var(--ink-faint);
}

.sync-row-state {
  min-width: 4.6rem;
  font-size: 0.8rem;
}

/* rows of the selected connection stay bright, the rest step back */
.sync-row > * {
  transition: opacity 0.45s var(--ease-out);
}

.sync-rows.has-focus .sync-row:not(.is-focus) > * {
  opacity: 0.5;
}

.sync-rows.is-live .sync-row.is-focus {
  background: color-mix(in srgb, var(--c) 9%, transparent);
}

.sync-rows.is-live .sync-row::after {
  background: var(--c, var(--accent));
}

.sync-panel-foot .sync-foot-item:nth-child(2) {
  text-align: center;
}

@media (max-width: 560px) {
  .sync-body {
    grid-template-columns: minmax(0, 7rem) minmax(0, 1fr);
  }

  .sync-conn {
    grid-template-columns: 0.5rem minmax(0, 1fr) 0.8rem;
    gap: 0.4rem;
    padding: 0.4rem 0.35rem;
  }

  .sync-conn-host,
  .sync-row-conn {
    display: none;
  }

  .sync-row-state {
    min-width: 3.6rem;
    font-size: 0.72rem;
  }

  .sync-panel-foot .sync-foot-item:nth-child(2) {
    display: none;
  }
}

/* ---------- Responsive pass ---------- */

/* below desktop the five nav links no longer fit next to the actions: use the menu */
@media (max-width: 1023px) {
  .header-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .btn-header {
    white-space: nowrap;
  }
}

/* stacked hero (below desktop): height follows the content instead of 100vh,
   so the whole live panel is visible above the marquee */
@media (max-width: 1023px) {
  .hero {
    align-items: start;
    min-height: 0;
    padding-bottom: calc(var(--marquee-h) + clamp(3rem, 7vw, 4.5rem));
  }

  .hero-inner {
    gap: clamp(3.5rem, 8vw, 5rem);
  }
}

/* tablet: copy runs wide and centred, the live panel spans the full width */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-copy {
    align-items: center;
    text-align: center;
  }

  .hero-title {
    font-size: clamp(3.2rem, 7.6vw, 4.8rem);
  }

  .hero-sub {
    max-width: 60ch;
    margin-inline: auto;
  }

  .hero-visual {
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }
}

/* phones: "What's under the hood" is a swipeable carousel, not tied to the page scroll */
@media (max-width: 767px) {
  .features-swipe .features-pin {
    position: static;
    height: auto;
    padding: 4.5rem 0 3.5rem;
  }

  .features-swipe .features-track {
    flex-direction: row;
    gap: 1rem;
    width: 100%;
    padding: 0 var(--pad-x);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad-x);
    scrollbar-width: none;
    transform: none !important;
    will-change: auto;
  }

  .features-swipe .features-track::-webkit-scrollbar {
    display: none;
  }

  /* trailing gap, since overflow containers drop their end padding */
  .features-swipe .features-track::after {
    content: "";
    flex: 0 0 1px;
  }

  .features-swipe .feature-panel {
    flex: 0 0 86%;
    width: 86%;
    padding: 0;
    scroll-snap-align: start;
  }

  .features-swipe .feature-media img {
    width: 100%;
  }

  /* the long store button stays on one line */
  .btn-mega {
    white-space: nowrap;
    padding-inline: 1.5rem;
    font-size: 1rem;
  }
}
