/* ═══════════════════════════════════════════════════════════════
   TrendWeave — v9
   v8 craft × deeper product truth from chat.md + peyvast.pdf
   Logo palette: indigo #4E6BFF → teal #1DBFA4
   ═══════════════════════════════════════════════════════════════ */

/* ─── Tokens & themes ─────────────────────────────────────────── */
:root {
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --teal: #1dbfa4;
  --indigo: #4e6bff;
  --navy: #1e2a5e;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-luxe: cubic-bezier(0.65, 0.05, 0, 1);

  --nav-h: 84px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

:root[data-theme="dark"] {
  --bg: #0e0e10;
  --bg-2: #131316;
  --panel: #17171b;
  --panel-2: #1d1d23;
  --text: #f8f6f2;
  --text-2: rgba(248, 246, 242, 0.62);
  --text-3: rgba(248, 246, 242, 0.38);
  --line: rgba(248, 246, 242, 0.1);
  --line-2: rgba(248, 246, 242, 0.18);
  --accent: var(--teal);
  --accent-2: var(--indigo);
  --accent-soft: rgba(29, 191, 164, 0.12);
  --thread-alpha: 0.55;
  --grain-alpha: 0.06;
  --glow: rgba(29, 191, 164, 0.16);
  --btn-solid-bg: #f8f6f2;
  --btn-solid-fg: #0e0e10;
  --nav-glass: rgba(14, 14, 16, 0.72);
  --shadow-lux: 0 40px 90px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f8f6f2;
  --bg-2: #f1eee7;
  --panel: #ffffff;
  --panel-2: #faf8f4;
  --text: #101014;
  --text-2: rgba(16, 16, 20, 0.64);
  --text-3: rgba(16, 16, 20, 0.4);
  --line: rgba(16, 16, 20, 0.1);
  --line-2: rgba(16, 16, 20, 0.2);
  --accent: #0e9d86;
  --accent-2: #3d55d6;
  --accent-soft: rgba(14, 157, 134, 0.1);
  --thread-alpha: 0.4;
  --grain-alpha: 0.035;
  --glow: rgba(61, 85, 214, 0.12);
  --btn-solid-bg: #101014;
  --btn-solid-fg: #f8f6f2;
  --nav-glass: rgba(248, 246, 242, 0.78);
  --shadow-lux: 0 40px 90px -35px rgba(30, 42, 94, 0.28);
  color-scheme: light;
}

/* ─── Base ────────────────────────────────────────────────────── */
* { -webkit-tap-highlight-color: transparent; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

html.is-loading { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: 0.005em;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Theme cross-fade: enabled briefly by JS on toggle */
html.theme-fade body,
html.theme-fade body * {
  transition:
    background-color 0.55s var(--ease-out),
    border-color 0.55s var(--ease-out),
    color 0.55s var(--ease-out),
    fill 0.55s var(--ease-out),
    stroke 0.55s var(--ease-out),
    box-shadow 0.55s var(--ease-out) !important;
}

::selection { background: var(--accent); color: #0e0e10; }

/* Film grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 2000;
  pointer-events: none;
  opacity: var(--grain-alpha);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(6) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(4%, -7%); }
  60% { transform: translate(-3%, -3%); }
  80% { transform: translate(6%, 5%); }
}

/* ─── Typography ──────────────────────────────────────────────── */
.display-serif {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.6vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 1.4rem;
  text-wrap: balance;
}

.serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.eyebrow::before {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  flex: 0 0 auto;
}

.lede {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  font-weight: 300;
  color: var(--text-2);
  max-width: 34em;
}

.section { padding: clamp(6rem, 12vh, 10rem) 0; position: relative; }

.container-xxl { padding-inline: var(--gutter); }

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

/* ─── Intro loader ────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.7s var(--ease-luxe), visibility 0.7s;
}

.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-inner { display: grid; justify-items: center; gap: 1.4rem; }

.loader-mark { width: clamp(72px, 10vw, 104px); height: auto; overflow: visible; }

.loader-mark .lm {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 0.9s var(--ease-luxe) forwards;
}
.loader-mark .lm-1 { animation-delay: 0.05s; }
.loader-mark .lm-2 { animation-delay: 0.16s; }
.loader-mark .lm-3 { animation-delay: 0.27s; }
.loader-mark .lm-4 { animation-delay: 0.44s; }
.loader-mark .lm-5 { animation-delay: 0.62s; }

@keyframes draw { to { stroke-dashoffset: 0; } }

.loader-word {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0;
  padding-left: 0.42em;
  opacity: 0;
  animation: loader-word 0.8s var(--ease-out) 0.55s forwards;
}

@keyframes loader-word {
  from { opacity: 0; transform: translateY(10px); letter-spacing: 0.6em; }
  to { opacity: 1; transform: none; letter-spacing: 0.42em; }
}

/* ─── Custom cursor ───────────────────────────────────────────── */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 4000;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent);
  display: grid;
  place-items: center;
  transition:
    width 0.35s var(--ease-out),
    height 0.35s var(--ease-out),
    background-color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    opacity 0.3s;
}

.cursor-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0e0e10;
  opacity: 0;
  transition: opacity 0.25s;
}

body.has-cursor .cursor-dot,
body.has-cursor .cursor-ring { opacity: 1; }

body.cursor-view .cursor-ring,
body.cursor-drag .cursor-ring {
  width: 76px;
  height: 76px;
  background: var(--accent);
  border-color: var(--accent);
}
body.cursor-view .cursor-label,
body.cursor-drag .cursor-label { opacity: 1; }
body.cursor-view .cursor-dot,
body.cursor-drag .cursor-dot,
body.cursor-hide .cursor-dot { opacity: 0; }
body.cursor-hide .cursor-ring { opacity: 0.35; width: 14px; height: 14px; }

@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ─── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  transition: background-color 0.5s var(--ease-out), border-color 0.5s, backdrop-filter 0.5s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: var(--nav-glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
}

.nav-inner {
  height: var(--nav-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; }

.brand-mark { width: 34px; height: 34px; flex: 0 0 auto; }

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: 0.01em;
}

.nav-links { display: flex; gap: 2.4rem; }

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-luxe);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-actions { display: flex; align-items: center; gap: 1.1rem; }

/* theme toggle */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}

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

.theme-toggle svg {
  width: 19px;
  height: 19px;
  grid-area: 1 / 1;
  transition: transform 0.55s var(--ease-luxe), opacity 0.4s;
}

:root[data-theme="dark"] .tt-moon { opacity: 0; transform: translateY(130%) rotate(40deg); }
:root[data-theme="dark"] .tt-sun { opacity: 1; transform: none; }
:root[data-theme="light"] .tt-sun { opacity: 0; transform: translateY(-130%) rotate(-40deg); }
:root[data-theme="light"] .tt-moon { opacity: 1; transform: none; }

/* burger */
.nav-burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.4s var(--ease-luxe);
}

.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 850;
  background: var(--bg);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}

.mobile-menu.is-open { opacity: 1; visibility: visible; }

.mobile-menu nav { display: grid; gap: 1.6rem; text-align: center; }

.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.6s var(--ease-luxe), opacity 0.6s;
}

.mobile-menu.is-open a { transform: none; opacity: 1; }
.mobile-menu.is-open a:nth-child(2) { transition-delay: 0.06s; }
.mobile-menu.is-open a:nth-child(3) { transition-delay: 0.12s; }
.mobile-menu.is-open a:nth-child(4) { transition-delay: 0.18s; }
.mobile-menu.is-open a:nth-child(5) { transition-delay: 0.24s; }

.mobile-menu .mm-cta { color: var(--accent); font-style: italic; }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.9rem 1.9rem;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: color 0.35s var(--ease-out), border-color 0.35s, background-color 0.35s;
  will-change: transform;
}

.btn .btn-text { position: relative; z-index: 1; display: inline-block; will-change: transform; }

.btn-solid { background: var(--btn-solid-bg); color: var(--btn-solid-fg); }

.btn-solid::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--indigo), var(--teal));
  transform: translateY(101%);
  transition: transform 0.5s var(--ease-luxe);
}

.btn-solid:hover::before { transform: translateY(0); }
.btn-solid:hover { color: #0e0e10; }

.btn-ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 1.05rem 2.3rem; }
.btn-xl { padding: 1.25rem 3rem; font-size: 0.88rem; }

/* ─── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: grid;
  align-content: center;
  justify-items: start;
  position: relative;
  padding: calc(var(--nav-h) + 4vh) var(--gutter) 12vh;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-threads { width: 100%; height: 100%; display: block; }

.thread {
  stroke-width: 1.4;
  opacity: var(--thread-alpha);
  stroke-dasharray: 14 10;
  animation: thread-drift 26s linear infinite;
}

.thread.th-slow { animation-duration: 40s; stroke-width: 1; }
.thread.th-faint { animation-duration: 58s; opacity: calc(var(--thread-alpha) * 0.45); stroke-width: 0.8; }

@keyframes thread-drift { to { stroke-dashoffset: -480; } }

/* faint vertical warp lines to suggest weave */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 96px);
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(90% 90% at 50% 45%, #000 30%, transparent 100%);
  mask-image: radial-gradient(90% 90% at 50% 45%, #000 30%, transparent 100%);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 30%, transparent 40%, var(--bg) 100%);
  pointer-events: none;
}

:root[data-theme="dark"] .hero-vignette {
  background:
    radial-gradient(60% 50% at 72% 20%, var(--glow), transparent 70%),
    radial-gradient(120% 90% at 50% 30%, transparent 40%, var(--bg) 100%);
}

.hero-content { position: relative; z-index: 1; max-width: 920px; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 1.5rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  animation: live-pulse 2s ease-out infinite;
  flex: 0 0 auto;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-meta-idx { margin-left: auto; color: var(--text-3); letter-spacing: 0.18em; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.9rem, 8.4vw, 7.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 1.8rem;
  max-width: 12em;
}

.hero-title .title-line {
  display: block;
}

.hero-title .title-italic {
  font-style: italic;
  font-weight: 400;
}

.hero-title .title-italic .w > span {
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-index {
  position: absolute;
  right: var(--gutter);
  bottom: 4.5vh;
  z-index: 2;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-3);
}

@media (max-width: 640px) {
  .hero-index { display: none; }
  .hero-meta { flex-wrap: wrap; }
  .hero-meta-idx { margin-left: 0; width: 100%; }
}

/* word-by-word reveal (spans injected by JS) */
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.12em; margin-bottom: -0.12em; }

.hero-title .w > span {
  display: inline-block;
  transform: translateY(115%) rotate(3deg);
  transform-origin: 0 100%;
  transition: transform 1.1s var(--ease-luxe);
}

html.ready .hero-title .w > span { transform: none; }

.reveal-eyebrow,
.hero-sub,
.hero-ctas,
.scroll-hint {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-luxe);
}

html.ready .reveal-eyebrow { opacity: 1; transform: none; transition-delay: 0.1s; }
html.ready .hero-sub { opacity: 1; transform: none; transition-delay: 0.55s; }
html.ready .hero-ctas { opacity: 1; transform: none; transition-delay: 0.7s; }
html.ready .scroll-hint { opacity: 1; transform: none; transition-delay: 1.1s; }

.hero-sub {
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  font-weight: 300;
  color: var(--text-2);
  max-width: 33em;
  margin-bottom: 2.6rem;
}

.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.scroll-hint {
  position: absolute;
  left: var(--gutter);
  bottom: 4.5vh;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.scroll-hint-label {
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-3);
}

.scroll-hint-line {
  width: 72px;
  height: 1px;
  background: var(--line-2);
  position: relative;
  overflow: hidden;
}

.scroll-hint-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: hint-sweep 2.4s var(--ease-luxe) infinite;
}

@keyframes hint-sweep {
  0% { transform: translateX(-100%); }
  55% { transform: translateX(0); }
  100% { transform: translateX(101%); }
}

/* ─── Marquee ─────────────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 0;
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.marquee-inner { display: flex; width: max-content; animation: mq 36s linear infinite; }

.marquee-inner.mq-reverse { animation-direction: reverse; }

.marquee:hover .marquee-inner { animation-play-state: paused; }

@keyframes mq { to { transform: translateX(-50%); } }

.mq-group { display: flex; align-items: center; flex: 0 0 auto; }

.mq-group em {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  white-space: nowrap;
  color: var(--text-2);
}

.mq-group i {
  font-style: normal;
  color: var(--accent);
  margin: 0 1.6rem;
}

.marquee-proof { border-bottom: none; margin-bottom: clamp(3rem, 7vh, 5rem); }
.marquee-proof .mq-group em { text-transform: uppercase; font-style: normal; font-family: var(--font-body); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.3em; color: var(--text-3); }

/* ─── Reveal system ───────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-luxe);
  transition-delay: var(--rd, 0s);
}

[data-reveal].in { opacity: 1; transform: none; }

/* ─── Why (problem → solution) ────────────────────────────────── */
.why { background: var(--bg); overflow: hidden; }

.pain-list { list-style: none; margin: 2.4rem 0 0; padding: 0; display: grid; gap: 0; }

.pain-list li {
  border-top: 1px solid var(--line);
  padding: 1.1rem 0;
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  color: var(--text-2);
  font-weight: 300;
}

.pain-list li:last-child { border-bottom: 1px solid var(--line); }

.pain-list li::before {
  content: "✕";
  font-size: 0.7rem;
  color: var(--accent);
  flex: 0 0 auto;
}

/* fabric → data visual */
.why-visual {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 4.6;
  max-height: 620px;
  box-shadow: var(--shadow-lux);
}

.why-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 1.2s var(--ease-luxe);
}

.why-visual:hover > img { transform: scale(1.06); }

.why-visual-overlay {
  position: absolute;
  left: 1.3rem;
  top: 1.3rem;
  z-index: 2;
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  max-width: 11rem;
}

.why-visual-overlay span {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}

.why-visual-overlay strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.1;
}

.why-visual-overlay small {
  font-size: 0.72rem;
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.35;
}

/* curtain wipe (clip-path would zero the element's IO intersection area) */
.clip-reveal::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 3;
  background: var(--bg);
  transform: scaleX(1);
  transform-origin: 100% 50%;
  transition: transform 1.25s var(--ease-luxe) 0.15s;
}

.clip-reveal.in::after { transform: scaleX(0); }

.why-visual-fabric {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(78, 107, 255, 0.22) 0 9px, transparent 9px 18px),
    repeating-linear-gradient(-45deg, rgba(29, 191, 164, 0.2) 0 9px, transparent 9px 18px),
    linear-gradient(160deg, #1a1a24, #102b28 60%, #0e0e10);
  animation: fabric-shift 14s ease-in-out infinite alternate;
}

:root[data-theme="light"] .why-visual-fabric {
  background:
    repeating-linear-gradient(45deg, rgba(61, 85, 214, 0.18) 0 9px, transparent 9px 18px),
    repeating-linear-gradient(-45deg, rgba(14, 157, 134, 0.18) 0 9px, transparent 9px 18px),
    linear-gradient(160deg, #eef0f6, #e3efec 60%, #f1eee7);
}

@keyframes fabric-shift { to { background-position: 60px 30px, -40px 20px, 0 0; } }

.why-visual-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(29, 191, 164, 0.16) 48%, var(--accent) 50%, rgba(29, 191, 164, 0.16) 52%, transparent 100%);
  background-size: 100% 60%;
  background-repeat: no-repeat;
  animation: scan 4.6s var(--ease-luxe) infinite;
  mix-blend-mode: screen;
}

:root[data-theme="light"] .why-visual-scan { mix-blend-mode: multiply; opacity: 0.5; }

@keyframes scan {
  0% { background-position: 0 -80%; }
  60%, 100% { background-position: 0 220%; }
}

.why-visual-chips {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text-2);
  white-space: nowrap;
}

.chip b { color: var(--accent); font-weight: 600; margin-left: 0.3em; }

/* ─── TrendWeave way — timed selectable stage ─────────────────── */
.tw-way {
  margin-top: clamp(2.4rem, 5vh, 3.6rem);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  min-height: clamp(420px, 52vh, 560px);
}

.tw-way-visual {
  position: relative;
  min-height: 360px;
  background: #0a0a0c;
  overflow: hidden;
}

.twv-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.7s var(--ease-out), transform 1.1s var(--ease-luxe);
}

.twv-img.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.tw-way-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 50%, color-mix(in srgb, var(--panel) 70%, transparent) 100%),
    linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.55) 100%);
}

/* Light mode: no milky white wash — keep the photo rich, soft dark vignette only */
:root[data-theme="light"] .tw-way-veil {
  background:
    linear-gradient(90deg, transparent 78%, rgba(16, 16, 20, 0.06) 100%),
    linear-gradient(180deg, transparent 52%, rgba(16, 16, 20, 0.38) 100%);
}

:root[data-theme="light"] .tw-way {
  box-shadow:
    0 1px 0 rgba(16, 16, 20, 0.04),
    0 18px 48px -28px rgba(16, 16, 20, 0.18);
  border-color: rgba(16, 16, 20, 0.08);
}

:root[data-theme="light"] .tw-way-visual {
  box-shadow: inset -1px 0 0 rgba(16, 16, 20, 0.06);
}

.tw-way-stat {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 3;
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 1.05rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  max-width: 13rem;
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-luxe);
}

:root[data-theme="light"] .tw-way-stat {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(16, 16, 20, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 10px 28px -14px rgba(16, 16, 20, 0.28);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.tw-way-stat.is-swap {
  opacity: 0;
  transform: translateY(8px);
}

.tw-way-stat span {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}

.tw-way-stat strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.1;
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tw-way-stat small {
  font-size: 0.72rem;
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.35;
}

.tw-way-board {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 2.8vw, 2.2rem);
  background: var(--panel);
}

.tw-way-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin-bottom: 1.4rem;
}

.tw-tab {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.65rem 0.55rem;
  text-align: left;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.tw-tab:hover,
.tw-tab:focus-visible {
  border-color: var(--line-2);
  color: var(--text);
  outline: none;
}

.tw-tab.is-on {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-soft);
  color: var(--text);
}

.tw-tab-top {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.65rem;
}

.tw-tab-top em {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--text-3);
}

.tw-tab.is-on .tw-tab-top em { color: var(--accent); }

.tw-tab-top b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.tw-tab-bar {
  display: block;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.tw-tab-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
}

.tw-tab.is-on .tw-tab-bar i {
  transform: scaleX(0);
}

.tw-way.is-playing:not(.is-held) .tw-tab.is-on .tw-tab-bar i {
  animation: tw-progress var(--tw-dur, 5.2s) linear forwards;
}

.tw-way.is-held .tw-tab.is-on .tw-tab-bar i {
  animation: none;
  transform: scaleX(1);
}

@keyframes tw-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.tw-way-panel { flex: 1; min-height: 11rem; }

.tw-way-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 600;
  margin: 0 0 0.55rem;
  line-height: 1.2;
}

.tw-way-lead {
  margin: 0 0 1.1rem;
  color: var(--text-2);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 34em;
}

.tw-way-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.tw-way-list li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--text-2);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  animation: tw-li-in 0.45s var(--ease-out) forwards;
}

.tw-way-list li:nth-child(1) { animation-delay: 0.05s; }
.tw-way-list li:nth-child(2) { animation-delay: 0.12s; }
.tw-way-list li:nth-child(3) { animation-delay: 0.19s; }

.tw-way-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

@keyframes tw-li-in {
  to { opacity: 1; transform: none; }
}

@media (max-width: 991.98px) {
  .tw-way { grid-template-columns: 1fr; }
  .tw-way-visual { min-height: 240px; aspect-ratio: 16 / 10; }
  .tw-way-veil {
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.5) 100%);
  }
  :root[data-theme="light"] .tw-way-veil {
    background: linear-gradient(180deg, transparent 48%, rgba(16, 16, 20, 0.36) 100%);
  }
  :root[data-theme="light"] .tw-way-visual {
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .tw-way-tabs { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tw-tab.is-on .tw-tab-bar i { animation: none; transform: scaleX(1); }
  .twv-img { transition: opacity 0.3s ease; transform: none; }
  .tw-way-list li { opacity: 1; transform: none; animation: none; }
}

/* ─── Feature showcase (horizontal gallery) ───────────────────── */
.features { background: var(--bg-2); padding-bottom: clamp(3rem, 6vh, 5rem); }

.features-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }

.features-head .display-serif { margin-bottom: 0; }

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

.drag-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0;
}

.hscroll-nav { display: flex; gap: 0.55rem; }

.hscroll-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, transform 0.35s var(--ease-out), opacity 0.3s;
}

.hscroll-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hscroll-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.hscroll {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-inline: var(--gutter);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
  user-select: none;
}

.hscroll::-webkit-scrollbar { display: none; }
.hscroll.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.hscroll:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }

.hscroll-track {
  display: flex;
  gap: clamp(1.2rem, 2vw, 2rem);
  width: max-content;
  padding-bottom: 0.5rem;
}

.fcard {
  width: clamp(280px, 30vw, 400px);
  flex: 0 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.4rem 1.4rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  transition: border-color 0.4s, transform 0.6s var(--ease-luxe);
  user-select: none;
  opacity: 1;
  transform: none;
}

.fcard:hover { border-color: var(--line-2); transform: translateY(-8px); }

.fcard-visual {
  border-radius: 3px;
  aspect-ratio: 4 / 3.4;
  margin-bottom: 1.6rem;
  overflow: hidden;
  position: relative;
  transform: translateZ(0);
  transition: transform 0.7s var(--ease-luxe);
  background: var(--bg-2);
}

.fcard-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fcard:hover .fcard-visual { transform: scale(1.035); }

.fcard-media h3 {
  font-size: clamp(1.35rem, 1.8vw, 1.7rem);
  line-height: 1.15;
}

/* recognition demo */
.recognition-demo .focus-box {
  position: absolute;
  inset: 18% 22%;
  border: 1px solid rgba(248, 246, 242, 0.85);
  z-index: 2;
  display: grid;
  place-items: center;
  animation: focus-pulse 2.4s var(--ease-out) infinite;
}

.recognition-demo .focus-box i {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--accent);
}
.recognition-demo .focus-box i:nth-child(1) { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.recognition-demo .focus-box i:nth-child(2) { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.recognition-demo .focus-box i:nth-child(3) { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.recognition-demo .focus-box i:nth-child(4) { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.recognition-demo .focus-box span {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f8f6f2;
  background: rgba(14, 14, 16, 0.55);
  padding: 0.3rem 0.55rem;
}

@keyframes focus-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.85; }
}

.recognition-demo .confidence {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
}

.recognition-demo .confidence span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}

.recognition-demo .confidence b {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--accent);
}

/* visual search demo */
.search-demo {
  display: grid !important;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.55rem;
  padding: 0.7rem;
  background: var(--bg-2) !important;
}

.search-source {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

.search-source img { width: 100%; height: 100%; object-fit: cover; }
.search-source span {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.2rem 0.4rem;
  background: rgba(14, 14, 16, 0.65);
  color: #f8f6f2;
  border-radius: 4px;
}

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.match-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.match-grid b {
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #0e0e10;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
}

.match-grid b small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.25rem;
  font-weight: 600;
}

/* mini chart card */
.mini-chart {
  display: grid !important;
  align-content: space-between;
  padding: 1rem;
  background: linear-gradient(160deg, #121218, #10262c) !important;
}

:root[data-theme="light"] .mini-chart {
  background: linear-gradient(160deg, #f0eee9, #e2eeec) !important;
}

.mini-chart > span {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.mini-chart svg { width: 100%; height: 90px; }
.mini-chart .mc-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.mini-chart .mc-fill { fill: var(--accent-soft); stroke: none; }
.mini-chart strong {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

/* report demo */
.report-demo {
  display: grid !important;
  place-items: center;
  gap: 0.85rem;
  padding: 1.1rem;
  background:
    repeating-linear-gradient(0deg, rgba(248,246,242,.08) 0 2px, transparent 2px 18px),
    linear-gradient(160deg, #191922, #232335 55%, #10201f) !important;
}

:root[data-theme="light"] .report-demo {
  background:
    repeating-linear-gradient(0deg, rgba(16,16,20,.08) 0 2px, transparent 2px 18px),
    linear-gradient(160deg, #efede8, #e4e6f2 55%, #e3efeb) !important;
}

.report-page {
  width: min(70%, 180px);
  aspect-ratio: 3 / 3.6;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 0.9rem;
  display: grid;
  align-content: start;
  gap: 0.45rem;
  box-shadow: var(--shadow-lux);
}

.report-page > span {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.report-page h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

.report-lines {
  height: 42px;
  margin: 0.3rem 0;
  background:
    linear-gradient(var(--line-2), var(--line-2)) 0 6px / 100% 1px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) 0 16px / 88% 1px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) 0 26px / 72% 1px no-repeat,
    linear-gradient(var(--line-2), var(--line-2)) 0 36px / 60% 1px no-repeat;
}

.report-page small {
  font-size: 0.62rem;
  color: var(--text-3);
  line-height: 1.35;
}

.report-tags { display: flex; gap: 0.4rem; }
.report-tags b {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font-weight: 600;
}

/* review demo */
.review-demo {
  display: grid !important;
  place-items: center;
  align-content: center;
  gap: 0.7rem;
  background: linear-gradient(105deg, #14141c 0 49.6%, rgba(29,191,164,.35) 49.6% 50.4%, #22303c 50.4% 100%) !important;
}

:root[data-theme="light"] .review-demo {
  background: linear-gradient(105deg, #eceae4 0 49.6%, rgba(14,157,134,.35) 49.6% 50.4%, #dfe7ee 50.4% 100%) !important;
}

.review-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}

.review-ring small { font-size: 0.85rem; color: var(--accent); }

.review-demo > p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.review-actions { display: flex; gap: 0.45rem; }
.review-actions span {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
}
.review-actions span:last-child {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e0e10;
  font-weight: 600;
}

.fcard-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 28%, transparent), transparent 55%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
  z-index: 1;
}

.fcard:hover .fcard-visual::after { opacity: 1; }
.search-demo::after,
.mini-chart::after,
.report-demo::after,
.review-demo::after { display: none; }

/* per-card abstract textile patterns */
.fv-1 { background: repeating-linear-gradient(90deg, rgba(78,107,255,.5) 0 3px, transparent 3px 16px), repeating-linear-gradient(0deg, rgba(29,191,164,.35) 0 3px, transparent 3px 22px), linear-gradient(150deg, #141420, #0f2320); }
.fv-2 { background: radial-gradient(circle at 30% 35%, rgba(29,191,164,.55) 0 5px, transparent 6px), radial-gradient(circle at 70% 60%, rgba(78,107,255,.55) 0 5px, transparent 6px), radial-gradient(circle at 50% 85%, rgba(248,246,242,.28) 0 4px, transparent 5px), linear-gradient(200deg, #12121c, #101f2b); background-size: 84px 84px, 96px 96px, 72px 72px, 100% 100%; }
.fv-3 { background: repeating-radial-gradient(circle at 50% 50%, transparent 0 22px, rgba(29,191,164,.3) 22px 24px, transparent 24px 52px, rgba(78,107,255,.24) 52px 54px), linear-gradient(180deg, #111119, #0e2220); }
.fv-4 { background: linear-gradient(90deg, #b45f45 0 20%, #96a97c 0 40%, #33427c 0 60%, #cfc6b4 0 80%, #57222c 0 100%); background-blend-mode: multiply; box-shadow: inset 0 0 0 100vmax rgba(14,14,16,.24); }
.fv-5 { background: linear-gradient(0deg, rgba(29,191,164,.4) 1px, transparent 1px), linear-gradient(90deg, rgba(29,191,164,.16) 1px, transparent 1px), linear-gradient(20deg, #121218 30%, #10262c); background-size: 100% 24%, 20% 100%, 100% 100%; }
.fv-6 { background: repeating-linear-gradient(0deg, rgba(248,246,242,.16) 0 2px, transparent 2px 18px), linear-gradient(160deg, #191922, #232335 55%, #10201f); }
.fv-7 { background: linear-gradient(105deg, #14141c 0 49.6%, rgba(29,191,164,.65) 49.6% 50.4%, #22303c 50.4% 100%); }

:root[data-theme="light"] .fv-1 { background: repeating-linear-gradient(90deg, rgba(61,85,214,.4) 0 3px, transparent 3px 16px), repeating-linear-gradient(0deg, rgba(14,157,134,.3) 0 3px, transparent 3px 22px), linear-gradient(150deg, #eceef6, #e2efeb); }
:root[data-theme="light"] .fv-2 { background: radial-gradient(circle at 30% 35%, rgba(14,157,134,.5) 0 5px, transparent 6px), radial-gradient(circle at 70% 60%, rgba(61,85,214,.5) 0 5px, transparent 6px), radial-gradient(circle at 50% 85%, rgba(16,16,20,.2) 0 4px, transparent 5px), linear-gradient(200deg, #f0eee9, #e7eef4); background-size: 84px 84px, 96px 96px, 72px 72px, 100% 100%; }
:root[data-theme="light"] .fv-3 { background: repeating-radial-gradient(circle at 50% 50%, transparent 0 22px, rgba(14,157,134,.32) 22px 24px, transparent 24px 52px, rgba(61,85,214,.26) 52px 54px), linear-gradient(180deg, #f3f1ec, #e5efec); }
:root[data-theme="light"] .fv-4 { box-shadow: inset 0 0 0 100vmax rgba(248,246,242,.16); }
:root[data-theme="light"] .fv-5 { background: linear-gradient(0deg, rgba(14,157,134,.38) 1px, transparent 1px), linear-gradient(90deg, rgba(14,157,134,.16) 1px, transparent 1px), linear-gradient(20deg, #f0eee9 30%, #e2eeec); background-size: 100% 24%, 20% 100%, 100% 100%; }
:root[data-theme="light"] .fv-6 { background: repeating-linear-gradient(0deg, rgba(16,16,20,.12) 0 2px, transparent 2px 18px), linear-gradient(160deg, #efede8, #e4e6f2 55%, #e3efeb); }
:root[data-theme="light"] .fv-7 { background: linear-gradient(105deg, #eceae4 0 49.6%, rgba(14,157,134,.6) 49.6% 50.4%, #dfe7ee 50.4% 100%); }

.fcard-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--text-3);
  position: absolute;
  top: 2.2rem;
  right: 2rem;
  z-index: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.fcard h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  margin: 0;
}

.fcard p { color: var(--text-2); font-weight: 300; font-size: 0.94rem; margin: 0; }

.fcard-end {
  justify-content: center;
  align-items: flex-start;
  gap: 1.4rem;
  background: linear-gradient(150deg, var(--accent-soft), transparent 60%), var(--panel);
  border-color: var(--line-2);
}

.fcard-end h3 { font-size: 2rem; font-weight: 500; }

.fcard-end-arrow { color: var(--accent); transition: transform 0.5s var(--ease-luxe); }
.fcard-end:hover .fcard-end-arrow { transform: translateX(12px); }

.hscroll-progress {
  height: 1px;
  background: var(--line);
  margin: clamp(2rem, 4vh, 3rem) var(--gutter) 0;
  position: relative;
}

.hscroll-progress span {
  position: absolute;
  left: 0;
  top: -1px;
  height: 3px;
  width: 10%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.2s linear;
}

/* ─── Why customers use TrendWeave ────────────────────────────── */
.customers { background: var(--bg); overflow: hidden; }

.customers-head { text-align: center; margin-bottom: clamp(2rem, 5vh, 3.2rem); }
.customers-head .eyebrow { justify-content: center; }
.customers-head .eyebrow::after { content: ""; width: 2.4rem; height: 1px; background: linear-gradient(-90deg, var(--accent), transparent); }
.customers-lede { margin-inline: auto; }
.customers-lede strong { color: var(--text); font-weight: 600; }

.customers-promise {
  max-width: 780px;
  margin: 0 auto clamp(2.8rem, 6vh, 4rem);
  text-align: center;
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.2rem, 3vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--panel);
}

.cq-label {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.customers-promise-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
  text-wrap: balance;
}

.customers-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.cust-audience {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: clamp(1.5rem, 2.5vw, 2.1rem);
}

.cust-audience-tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 1rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
}

.cust-audience h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 600;
  margin: 0 0 0.85rem;
  line-height: 1.2;
}

.cust-audience-lead {
  color: var(--text-2);
  font-weight: 300;
  font-size: 0.95rem;
  margin: 0 0 1.1rem;
}

.cust-audience ul {
  list-style: none;
  margin: 0 0 1.3rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.cust-audience li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--text-2);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.45;
}

.cust-audience li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}

.cust-outcome {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text-2);
  font-weight: 300;
}

.cust-outcome strong { color: var(--text); font-weight: 600; }

.impact {
  margin-bottom: clamp(2.5rem, 6vh, 3.5rem);
  padding-top: clamp(0.5rem, 2vh, 1.2rem);
  border-top: 1px solid var(--line);
}

.impact-head {
  text-align: center;
  max-width: 22em;
  margin: 0 auto clamp(2.2rem, 5vh, 3.2rem);
}

.impact-head .eyebrow {
  justify-content: center;
}

.impact-head .eyebrow::after {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: linear-gradient(-90deg, var(--accent), transparent);
}

.impact-head .display-serif {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 500;
  margin: 0;
  line-height: 1.25;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.impact-metric {
  padding: clamp(1.5rem, 3vw, 2.1rem) clamp(1rem, 2vw, 1.6rem);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 100%;
}

.impact-metric:last-child {
  border-right: none;
}

.im-label {
  margin: 0;
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  line-height: 1.4;
}

.im-pair {
  margin: 0;
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.im-before {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 400;
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--text-3) 55%, transparent);
  line-height: 1.2;
}

.im-arrow {
  display: none;
}

.im-after {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.im-delta {
  margin: auto 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.35;
}

.customers-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  padding-top: 0.5rem;
}

.customers-cta-row p {
  margin: 0;
  max-width: 36em;
  color: var(--text-2);
  font-weight: 300;
  font-size: 0.95rem;
}

@media (max-width: 991.98px) {
  .customers-split { grid-template-columns: 1fr; }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .impact-metric:nth-child(2n) { border-right: none; }
  .impact-metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .impact-grid { grid-template-columns: 1fr; }
  .impact-metric {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .impact-metric:last-child { border-bottom: none; }
  .customers-cta-row { flex-direction: column; align-items: flex-start; }
  .features-controls { align-items: flex-start; width: 100%; }
  .features-controls .hscroll-nav { margin-left: auto; }
}

/* ─── Roles — cinematic who-it's-for ──────────────────────────── */
.roles {
  background: var(--bg);
  overflow: hidden;
  padding: clamp(3rem, 7vh, 5rem) 0;
}

.roles-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  min-height: clamp(620px, 84vh, 820px);
  margin-inline: var(--gutter);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.roles-visual {
  position: relative;
  overflow: hidden;
  background: #0a0a0c;
  min-height: 420px;
}

.rv-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity 0.85s var(--ease-out),
    transform 1.4s var(--ease-luxe);
  filter: saturate(0.92) contrast(1.04);
}

.rv-img.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.roles-visual-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 40%, color-mix(in srgb, var(--panel) 88%, transparent) 96%),
    linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 35%, rgba(0,0,0,0.45) 100%);
}

/* Light mode: same clean treatment as TrendWeave way — no milky white wash */
:root[data-theme="light"] .roles-visual-veil {
  background:
    linear-gradient(90deg, transparent 78%, rgba(16, 16, 20, 0.06) 100%),
    linear-gradient(180deg, transparent 52%, rgba(16, 16, 20, 0.38) 100%);
}

:root[data-theme="light"] .roles-stage {
  box-shadow:
    0 1px 0 rgba(16, 16, 20, 0.04),
    0 18px 48px -28px rgba(16, 16, 20, 0.18);
  border-color: rgba(16, 16, 20, 0.08);
}

:root[data-theme="light"] .roles-visual {
  box-shadow: inset -1px 0 0 rgba(16, 16, 20, 0.06);
}

:root[data-theme="light"] .roles-panel {
  background: var(--panel);
  backdrop-filter: none;
}

.roles-visual-scan {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(29, 191, 164, 0.12) 48%,
    transparent 62%
  );
  mix-blend-mode: soft-light;
  animation: roles-scan 7s var(--ease-out) infinite;
  opacity: 0.7;
}

@keyframes roles-scan {
  0%, 100% { transform: translateX(-30%); opacity: 0.2; }
  50% { transform: translateX(30%); opacity: 0.75; }
}

.roles-panel {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.6rem, 3.5vw, 3rem) clamp(1.4rem, 3vw, 2.6rem);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(8px);
}

.roles-head { margin-bottom: 1.1rem; }
.roles-head .eyebrow { margin-bottom: 0.65rem; }
.roles-head .display-serif {
  font-size: clamp(1.85rem, 3.3vw, 2.85rem);
  line-height: 1.12;
  margin: 0 0 0.7rem;
}
.roles-lede {
  margin: 0;
  max-width: 34em;
  font-size: 0.9rem;
}

.roles-active {
  margin: 0 0 1rem;
  padding: 0.85rem 0 0.95rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 4.6rem;
}

.ra-kicker {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.55rem;
}

.ra-copy {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  max-width: 28em;
}

.roles-rail {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.05rem;
  max-height: none;
  overflow: visible;
}

.roles-rail li {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-2);
  transition: background-color 0.35s var(--ease-out), color 0.35s;
  outline: none;
}

.roles-rail li:hover,
.roles-rail li:focus-visible {
  background: var(--accent-soft);
  color: var(--text);
}

.roles-rail li.is-on {
  background: color-mix(in srgb, var(--accent-soft) 80%, transparent);
  color: var(--text);
}

.rr-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--text-3);
}

.roles-rail li.is-on .rr-num { color: var(--accent); }

.rr-name {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.rr-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line-2);
  transition: background-color 0.35s, border-color 0.35s, transform 0.35s var(--ease-luxe);
}

.roles-rail li.is-on .rr-dot {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent;
  transform: scale(1.15);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.roles .roles-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: auto;
  padding-top: 0.4rem;
}

.roles .roles-cta-row p {
  margin: 0;
  max-width: 28em;
  color: var(--text-2);
  font-weight: 300;
  font-size: 0.88rem;
}

@media (max-width: 991.98px) {
  .roles-stage {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .roles-visual {
    min-height: 280px;
    aspect-ratio: 16 / 10;
  }
  .roles-visual-veil {
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.5) 100%);
  }
  :root[data-theme="light"] .roles-visual-veil {
    background: linear-gradient(180deg, transparent 48%, rgba(16, 16, 20, 0.36) 100%);
  }
  :root[data-theme="light"] .roles-visual {
    box-shadow: none;
  }
  .roles-rail {
    max-height: none;
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scroll-snap-type: x mandatory;
  }
  .roles-rail li {
    flex: 0 0 auto;
    scroll-snap-align: start;
    grid-template-columns: auto 1fr;
    white-space: nowrap;
    border: 1px solid var(--line);
    background: var(--bg-2);
  }
  .roles-rail li .rr-dot { display: none; }
}

@media (max-width: 640px) {
  .roles-stage { margin-inline: 1rem; border-radius: 10px; }
  .roles-panel { padding: 1.35rem 1.15rem 1.5rem; }
  .roles .roles-cta-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .roles-visual-scan { animation: none; opacity: 0.35; }
  .rv-img { transition: opacity 0.3s ease; transform: none; }
}

/* ─── System map (peyvast) ────────────────────────────────────── */
.system { background: var(--bg); }

.system-head { text-align: center; margin-bottom: clamp(2.2rem, 5vh, 3.5rem); }
.system-head .eyebrow { justify-content: center; }
.system-head .eyebrow::after {
  content: "";
  width: 2.4rem;
  height: 1px;
  background: linear-gradient(-90deg, var(--accent), transparent);
}
.system-lede { margin-inline: auto; max-width: 42em; }

.system-modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 1.5rem;
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
  list-style: none;
  padding: 0;
}

.sys-mod {
  padding: 1.4rem 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
}

.sys-mod-n {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.sys-mod h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 0.55rem;
}

.sys-mod p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.5;
}

.lifecycle {
  padding: clamp(1.8rem, 4vh, 2.6rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 5vh, 3.2rem);
}

.lifecycle-head { margin-bottom: 1.5rem; }
.lifecycle-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 500;
  margin: 0.4rem 0 0;
}

.lifecycle-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: life;
}

.lifecycle-track li {
  position: relative;
  padding-top: 1.6rem;
}

.lifecycle-track li::before {
  counter-increment: life;
  content: counter(life, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.lifecycle-track b {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.lifecycle-track span {
  display: block;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.4;
}

.system-split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
}

.sys-fields h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
}

.sys-fields > p {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-2);
}

.sys-fields ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sys-fields ul:not(.sys-tag-cloud) li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text);
}

.sys-fields ul:not(.sys-tag-cloud) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.35rem;
  height: 1px;
  background: var(--accent);
}

.sys-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sys-tag-cloud li {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-weight: 400;
}

@media (max-width: 991.98px) {
  .system-modules,
  .system-split { grid-template-columns: 1fr 1fr; }
  .lifecycle-track { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .system-modules,
  .system-split { grid-template-columns: 1fr; }
  .lifecycle-track { grid-template-columns: 1fr; }
}

/* ─── Pilot strip ─────────────────────────────────────────────── */
.pilot {
  background: var(--bg-2);
  padding-block: clamp(3.5rem, 8vh, 5.5rem);
}

.pilot-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem 3rem;
  align-items: end;
}

.pilot-copy .eyebrow { margin-bottom: 0.8rem; }
.pilot-copy .display-serif { margin-bottom: 1rem; }
.pilot-copy .lede { margin: 0; max-width: 36em; }

.pilot-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pilot-kpis li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.pilot-kpis b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.pilot-kpis span {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

@media (max-width: 860px) {
  .pilot-inner { grid-template-columns: 1fr; }
}

/* ─── How it works ────────────────────────────────────────────── */
.how { background: var(--bg); overflow: hidden; }

.how-head { text-align: center; margin-bottom: clamp(2.2rem, 4.5vh, 3.2rem); }
.how-head .eyebrow { justify-content: center; }
.how-head .eyebrow::after { content: ""; width: 2.4rem; height: 1px; background: linear-gradient(-90deg, var(--accent), transparent); }
.how-head .display-serif { max-width: 20em; margin-inline: auto; }

.how .tw-way { margin-top: 0; }

.how-capabilities {
  margin-top: clamp(3.5rem, 8vh, 5.5rem);
  padding-top: clamp(2.4rem, 5vh, 3.2rem);
  border-top: 1px solid var(--line);
}

.how-cap-kicker {
  margin: 0 0 clamp(1.6rem, 3.5vh, 2.2rem);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
  text-align: center;
}

.how-cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.how-cap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.95rem 1.05rem;
  align-items: start;
  padding: clamp(1.35rem, 2.4vw, 1.85rem) clamp(1.1rem, 2vw, 1.55rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.35s var(--ease-out);
}

.how-cap:hover {
  background: color-mix(in srgb, var(--panel) 70%, transparent);
}

.how-cap-num {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  line-height: 1.6;
  padding-top: 0.2rem;
  font-style: normal;
}

.how-cap-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  font-weight: 600;
  margin: 0 0 0.55rem;
  line-height: 1.25;
}

.how-cap-body p {
  margin: 0;
  color: var(--text-2);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 991.98px) {
  .how-cap-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .how-cap-grid { grid-template-columns: 1fr; }
}

.timeline { position: relative; }

.timeline-rail {
  position: absolute;
  top: 9px;
  left: 0;
  width: 100%;
  height: 4px;
  overflow: visible;
}

.timeline-rail path { stroke-width: 2; fill: none; }
.rail-base { stroke: var(--line); }

.rail-draw {
  stroke: url(#twg);
  stroke: var(--accent);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 2.8s var(--ease-luxe) 0.2s;
}

.timeline.in .rail-draw { stroke-dashoffset: 0; }

.timeline-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}

.tstep { position: relative; padding-top: 3rem; }

.tstep-node {
  position: absolute;
  top: 4px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--bg);
  transition: background-color 0.5s var(--ease-out) 0.9s, box-shadow 0.5s 0.9s;
}

.timeline.in .tstep-node { background: var(--accent); box-shadow: 0 0 0 7px var(--accent-soft); }

.draw-icon { width: 46px; height: 46px; margin-bottom: 1.2rem; overflow: visible; }

.draw-icon path {
  stroke: var(--text);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s var(--ease-luxe);
}

.tstep:nth-child(1) .draw-icon path { transition-delay: 0.4s; }
.tstep:nth-child(2) .draw-icon path { transition-delay: 0.75s; }
.tstep:nth-child(3) .draw-icon path { transition-delay: 1.1s; }
.tstep:nth-child(4) .draw-icon path { transition-delay: 1.45s; }

.timeline.in .draw-icon path { stroke-dashoffset: 0; }

.tstep h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.tstep-i { font-style: italic; font-weight: 400; color: var(--accent); margin-right: 0.35em; }

.tstep p { color: var(--text-2); font-weight: 300; font-size: 0.94rem; margin: 0; max-width: 24em; }

/* ─── Dashboard preview ───────────────────────────────────────── */
.insights { background: var(--bg); overflow: hidden; }

.insights-head { text-align: center; margin-bottom: clamp(1.8rem, 4vh, 2.6rem); }
.insights-head .eyebrow { justify-content: center; }
.insights-head .eyebrow::after { content: ""; width: 2.4rem; height: 1px; background: linear-gradient(-90deg, var(--accent), transparent); }
.insights-head .lede { margin-inline: auto; }

.platform-pillars {
  list-style: none;
  margin: 0 auto clamp(2.2rem, 5vh, 3.2rem);
  padding: 0;
  max-width: 920px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.platform-pillars li {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 1rem;
  border-right: 1px solid var(--line);
  text-align: center;
}

.platform-pillars li:last-child { border-right: none; }

.platform-pillars b {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
}

.platform-pillars span {
  font-size: 0.78rem;
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .platform-pillars { grid-template-columns: 1fr 1fr; }
  .platform-pillars li:nth-child(2n) { border-right: none; }
  .platform-pillars li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

.dash-snapshot-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 auto 1.1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  width: fit-content;
  justify-self: center;
}

.dash-wrap {
  perspective: 1600px;
  max-width: 1180px;
  margin-inline: auto;
  display: grid;
  justify-items: center;
}

.dash-snapshot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  animation: live-pulse 2s ease-out infinite;
}

.dash {
  position: relative;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow-lux);
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
}

.dash-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(40% 40% at 70% 10%, var(--glow), transparent 70%);
  pointer-events: none;
}

.dash-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.dash-chrome span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }

.dash-chrome b {
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 1rem;
}

.dash-body { display: grid; grid-template-columns: 168px 1fr; }

.dash-side {
  border-right: 1px solid var(--line);
  padding: 1rem 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  background: color-mix(in srgb, var(--bg) 45%, var(--panel));
}

.ds-brand {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.35rem 1.25rem 1rem;
  color: var(--text);
}

.ds-item {
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--text-3);
  padding: 0.48rem 1.25rem;
  border-left: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ds-item.is-on { color: var(--text); border-left-color: var(--accent); background: var(--accent-soft); }

.ds-count {
  margin-left: auto;
  font-style: normal;
  font-size: 0.62rem;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #0e0e10;
  font-weight: 700;
}

.dash-main { padding: 1.15rem 1.25rem 1.35rem; display: grid; gap: 0.95rem; }

.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.dt-chip {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-3);
}

.dt-chip.is-on {
  border-color: transparent;
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  color: #0e0e10;
  font-weight: 600;
}

.dt-search {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  min-width: 160px;
}

.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }

.kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  display: grid;
  gap: 0.1rem;
  background: color-mix(in srgb, var(--bg) 35%, transparent);
}

.kpi b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
.kpi:nth-child(2) b { color: var(--accent); }
.kpi:nth-child(4) b { color: #d8a24e; }
.kpi span { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }

.dash-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 0.95rem;
  background: color-mix(in srgb, var(--bg) 28%, transparent);
}

.dp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.dp-head strong {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.dp-head em {
  font-style: normal;
  font-size: 0.68rem;
  color: var(--text-3);
}

.dash-grid-main {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 0.85rem;
}

.dash-chart { overflow: hidden; padding-bottom: 0.4rem; }
.dash-chart svg { display: block; width: 100%; height: clamp(110px, 14vw, 150px); }

.dc-grid { stroke: var(--line); stroke-width: 1; }
.dc-area { fill: var(--accent-soft); }

.dc-line {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 2s var(--ease-luxe) 0.5s;
}

.dash.in .dc-line, .dash-wrap.in .dc-line { stroke-dashoffset: 0; }
.dc-dot { fill: var(--accent); }

.dm-list { display: grid; gap: 0.55rem; }

.dm-list > span {
  display: grid;
  grid-template-columns: 72px 1fr 36px;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-2);
}

.dm-list b { font-weight: 500; color: var(--text); }
.dm-list em { font-style: normal; color: var(--accent); text-align: right; font-size: 0.68rem; }

.dm-list i {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line-2) 70%, transparent);
  position: relative;
  overflow: hidden;
}

.dm-list i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--w) * 100%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease-luxe);
}

.dash-wrap.in .dm-list i::after { transform: scaleX(1); }
.dm-list span:nth-child(2) i::after { transition-delay: 0.08s; }
.dm-list span:nth-child(3) i::after { transition-delay: 0.16s; }
.dm-list span:nth-child(4) i::after { transition-delay: 0.24s; }
.dm-list span:nth-child(5) i::after { transition-delay: 0.32s; }
.dm-list span:nth-child(6) i::after { transition-delay: 0.4s; }

.dash-row { display: grid; gap: 0.85rem; }
.dash-row-3 { grid-template-columns: repeat(3, 1fr); }
.dash-row-bottom { grid-template-columns: 1.35fr 1fr; }

.dash-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  height: 120px;
}

.db { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.35rem; height: 100%; }

.db i {
  display: block;
  height: calc(var(--h) * 100%);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 1.1s var(--ease-luxe);
}

.db:nth-child(2) i { transition-delay: 0.12s; }
.db:nth-child(3) i { transition-delay: 0.24s; }
.db:nth-child(4) i { transition-delay: 0.36s; }
.db:nth-child(5) i { transition-delay: 0.48s; }

.dash-wrap.in .db i { transform: scaleY(1); }

.db em {
  font-style: normal;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: var(--text-3);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-list { display: grid; align-content: start; gap: 0.15rem; }

.dl {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.74rem;
  color: var(--text-2);
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--line);
}

.dl:last-child { border-bottom: none; }
.dl b { margin-left: auto; font-weight: 600; color: var(--accent); }
.dl-low b { color: #d8a24e; }

.sw { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.sw-1 { background: #b45f45; }
.sw-2 { background: #33427c; }
.sw-3 { background: #96a97c; }
.sw-4 { background: #cfc6b4; }

.ds-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.45rem;
}

.dst {
  aspect-ratio: 1;
  border-radius: 5px;
  border: 1px solid var(--line);
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.dr-copy {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.45;
}

.dr-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.dr-pill {
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
}

.dr-pill.is-live {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ─── Stats ───────────────────────────────────────────────────── */
.proof { background: var(--bg); padding-top: 0; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}

.stat { border-top: 1px solid var(--line-2); padding-top: 1.6rem; }

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.stat-num b { font-weight: inherit; }

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ─── Final CTA ───────────────────────────────────────────────── */
.cta {
  background: var(--bg-2);
  text-align: center;
  overflow: hidden;
  position: relative;
  padding: clamp(8rem, 18vh, 13rem) 0;
}

:root[data-theme="dark"] .cta { background: #0a0a0c; }

.cta-bg { position: absolute; inset: 0; opacity: 0.8; }
.cta-bg svg { width: 100%; height: 100%; }

.cta-inner { position: relative; z-index: 1; }

.cta .eyebrow { justify-content: center; }
.cta .eyebrow::after { content: ""; width: 2.4rem; height: 1px; background: linear-gradient(-90deg, var(--accent), transparent); }

.cta-title {
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  margin-bottom: 3rem;
}

.cta-note { margin-top: 1.8rem; color: var(--text-3); font-size: 0.85rem; font-weight: 300; }

/* ─── Footer ──────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: clamp(3rem, 7vh, 5rem) 0 2rem; background: var(--bg); }

.footer-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2.6rem; }

.footer-tag { font-size: 1.3rem; }

.footer-mid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.6rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.footer-links { display: flex; flex-wrap: wrap; gap: 1.8rem; }

.footer-links a { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); transition: color 0.3s; }
.footer-links a:hover { color: var(--accent); }

.footer-social { display: flex; gap: 0.7rem; }

.footer-social a {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
}

.footer-social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

.footer-copy { margin: 1.6rem 0 0; font-size: 0.72rem; letter-spacing: 0.12em; color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */
.login-body { min-height: 100svh; }

.login-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; }

.login-visual {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  display: grid;
  align-content: end;
  padding: clamp(2rem, 5vw, 4.5rem);
}

:root[data-theme="dark"] .login-visual { background: #0a0a0c; }

.login-visual svg.login-threads { position: absolute; inset: 0; width: 100%; height: 100%; }

.login-visual-vignette { position: absolute; inset: 0; background: radial-gradient(110% 90% at 30% 40%, transparent 30%, var(--bg-2) 100%); }
:root[data-theme="dark"] .login-visual-vignette { background: radial-gradient(70% 55% at 65% 25%, var(--glow), transparent 70%), radial-gradient(110% 90% at 30% 40%, transparent 30%, #0a0a0c 100%); }

.login-visual-quote { position: relative; z-index: 1; max-width: 26em; }

.login-visual-quote h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.8rem, 2.8vw, 2.7rem); line-height: 1.15; margin-bottom: 1rem; }

.login-visual-quote p { color: var(--text-2); font-weight: 300; font-size: 0.94rem; margin: 0; }

.login-panel {
  display: grid;
  align-content: center;
  padding: clamp(2rem, 6vw, 6rem);
  position: relative;
}

.login-panel-inner { width: 100%; max-width: 420px; margin-inline: auto; }

.login-brand { margin-bottom: clamp(2.5rem, 6vh, 4rem); }

.login-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.2rem, 3.6vw, 3.1rem); line-height: 1.1; margin-bottom: 0.7rem; }

.login-sub { color: var(--text-2); font-weight: 300; margin-bottom: 2.8rem; }

/* floating-label fields */
.field { position: relative; margin-bottom: 1.9rem; }

.field input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-body);
  padding: 1.1rem 0 0.65rem;
  outline: none;
  transition: border-color 0.3s;
}

.field label {
  position: absolute;
  left: 0;
  top: 1.05rem;
  color: var(--text-3);
  font-size: 0.95rem;
  font-weight: 300;
  pointer-events: none;
  transition: transform 0.35s var(--ease-luxe), font-size 0.35s, color 0.35s, letter-spacing 0.35s;
  transform-origin: 0 0;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-1.5rem);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.field-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease-luxe);
}

.field input:focus ~ .field-line { transform: scaleX(1); }

.field.has-error input { border-bottom-color: #c65454; }
.field.has-error label { color: #c65454; }
.field.has-error .field-line { background: #c65454; transform: scaleX(1); }

.field-error {
  display: block;
  font-size: 0.74rem;
  color: #c65454;
  margin-top: 0.45rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.4s var(--ease-out), opacity 0.4s, transform 0.4s;
}

.field.has-error .field-error { max-height: 2.4em; opacity: 1; transform: none; }

.login-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.2rem; }

/* custom checkbox */
.check { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: 0.84rem; color: var(--text-2); user-select: none; }

.check input { position: absolute; opacity: 0; pointer-events: none; }

.check-box {
  width: 17px;
  height: 17px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: background-color 0.3s, border-color 0.3s;
  flex: 0 0 auto;
}

.check-box svg { width: 10px; height: 10px; stroke: #0e0e10; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.35s var(--ease-out); }

.check input:checked ~ .check-box { background: var(--accent); border-color: var(--accent); }
.check input:checked ~ .check-box svg { stroke-dashoffset: 0; }
.check input:focus-visible ~ .check-box { outline: 2px solid var(--accent); outline-offset: 2px; }

.login-forgot { font-size: 0.84rem; color: var(--text-2); border-bottom: 1px solid transparent; transition: color 0.3s, border-color 0.3s; }
.login-forgot:hover { color: var(--accent); border-bottom-color: var(--accent); }

.login-submit { width: 100%; }

.login-form.form-shake { animation: shake 0.45s var(--ease-out); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

.login-success {
  margin-top: 1.2rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--accent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-luxe);
}

.login-success.is-visible { opacity: 1; transform: none; }

.login-request { margin-top: 2.4rem; text-align: center; font-size: 0.86rem; color: var(--text-3); }

.login-request a { color: var(--text); border-bottom: 1px solid var(--accent); transition: color 0.3s; }
.login-request a:hover { color: var(--accent); }

.login-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--gutter);
  pointer-events: none;
}

.login-top > * { pointer-events: auto; }

.login-back { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-2); transition: color 0.3s; }
.login-back:hover { color: var(--accent); }
.login-back svg { transition: transform 0.4s var(--ease-luxe); }
.login-back:hover svg { transform: translateX(-4px); }

/* page-enter animation for login panel */
.login-enter { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-luxe); }

html.ready .login-enter { opacity: 1; transform: none; }
html.ready .login-enter:nth-child(2) { transition-delay: 0.08s; }
html.ready .login-enter:nth-child(3) { transition-delay: 0.16s; }
html.ready .login-enter:nth-child(4) { transition-delay: 0.24s; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .timeline-steps { grid-template-columns: repeat(2, 1fr); row-gap: 3.5rem; }
  .timeline-rail { display: none; }
  .tstep { padding-top: 2.4rem; }
  .tstep-node { display: none; }
  .tstep { border-top: 1px solid var(--line); }
}

@media (max-width: 991.98px) {
  :root { --nav-h: 72px; }
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-burger { display: flex; }
  .login-split { grid-template-columns: 1fr; }
  .login-visual { min-height: 34svh; order: 2; }
  .login-panel { padding-top: calc(var(--nav-h) + 3rem); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .dash-body { grid-template-columns: 1fr; }
  .dash-side {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 0.55rem 0.7rem;
    align-items: center;
  }
  .ds-brand { display: none; }
  .ds-item { border-left: none; border-bottom: 2px solid transparent; white-space: nowrap; padding: 0.45rem 0.7rem; }
  .ds-item.is-on { border-bottom-color: var(--accent); }
  .ds-count { margin-left: 0.35rem; }
}

@media (max-width: 640px) {
  .hero { padding-bottom: 16vh; }
  .hero-ctas .btn { width: 100%; }
  .dash-row,
  .dash-row-3,
  .dash-row-bottom,
  .dash-grid-main { grid-template-columns: 1fr; }
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3),
  .kpi:nth-child(4) { grid-column: span 1; }
  .dt-search { margin-left: 0; width: 100%; }
  .ds-thumbs { grid-template-columns: repeat(3, 1fr); }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 2rem 1.2rem; }
  .timeline-steps { grid-template-columns: 1fr; }
  .features-head { flex-direction: column; align-items: flex-start; }
  .why-visual { aspect-ratio: 4 / 4; }
  .scroll-hint { display: none; }
}

/* touch devices: no heavy hover motion */
@media (hover: none), (pointer: coarse) {
  .fcard:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .marquee-inner { animation: none; flex-wrap: wrap; width: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .clip-reveal::after { display: none; }
}
