/* ═══════════════════════════════════════════════════════════════
   ENSOAGENCY CLIENT PORTAL — styles.css
   Built for clienti.adin.ro  |  No frameworks, no build step.
   Light theme — authority, clarity, craft.
   ═══════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────────
   THEME
   ───────────────────────────────────────────────────────────── */
:root {
  /* surfaces */
  --bg:            #ffffff;
  --bg-elevated:   #f7f8fa;
  --bg-inset:      #eef0f4;
  --bg-hero:       #f4f5f8;

  /* borders */
  --border-subtle:  rgba(0, 0, 0, 0.06);
  --border-medium:  rgba(0, 0, 0, 0.10);
  --border-strong:  rgba(0, 0, 0, 0.16);

  /* accent — deeper, more confident blue */
  --accent:         #1d4ed8;
  --accent-hover:   #1e40af;
  --accent-soft:    rgba(29, 78, 216, 0.07);
  --accent-softer:  rgba(29, 78, 216, 0.03);

  /* text */
  --text-heading:   #0f172a;
  --text-main:      #1e293b;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  /* status */
  --green:          #16a34a;
  --green-soft:     rgba(22, 163, 74, 0.10);

  /* spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  /* radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* shadows — layered for realism */
  --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg:   0 12px 40px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl:   0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);

  /* transitions */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration:    0.5s;
  --duration-fast: 0.2s;

  /* layout */
  --container: 1100px;
}


/* ─────────────────────────────────────────────────────────────
   DARK THEME
   ───────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:            #0f1117;
  --bg-elevated:   #181a22;
  --bg-inset:      #22252f;
  --bg-hero:       #12141c;

  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-medium:  rgba(255, 255, 255, 0.10);
  --border-strong:  rgba(255, 255, 255, 0.16);

  --accent:         #6384f5;
  --accent-hover:   #7c9aff;
  --accent-soft:    rgba(99, 132, 245, 0.12);
  --accent-softer:  rgba(99, 132, 245, 0.05);

  --text-heading:   #f1f5f9;
  --text-main:      #cbd5e1;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  --green:          #22c55e;
  --green-soft:     rgba(34, 197, 94, 0.12);

  --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-lg:   0 12px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-xl:   0 20px 60px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);

  color-scheme: dark;
}

/* dark overrides for colored tags */
[data-theme="dark"] .sw-card-tag--design { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
[data-theme="dark"] .sw-card-tag--dev    { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
[data-theme="dark"] .sw-card-tag--ops    { background: rgba(52, 211, 153, 0.15); color: #34d399; }

[data-theme="dark"] .sw-file-icon--img  { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
[data-theme="dark"] .sw-file-icon--doc  { background: rgba(96, 165, 250, 0.12); color: #60a5fa; }
[data-theme="dark"] .sw-file-icon--code { background: rgba(52, 211, 153, 0.12); color: #34d399; }

[data-theme="dark"] .comparison-icon--before { background: rgba(239, 68, 68, 0.12); color: #f87171; }
[data-theme="dark"] .comparison-col--before  { background: var(--bg-inset); }

[data-theme="dark"] .site-header.scrolled {
  background: rgba(15, 17, 23, 0.92);
  box-shadow: 0 1px 0 var(--border-subtle);
}
@supports (backdrop-filter: blur(12px)) {
  [data-theme="dark"] .site-header.scrolled {
    background: rgba(15, 17, 23, 0.78);
  }
}
[data-theme="dark"] .main-nav {
  background: rgba(15, 17, 23, 0.96);
}
@supports (backdrop-filter: blur(16px)) {
  [data-theme="dark"] .main-nav {
    background: rgba(15, 17, 23, 0.82);
  }
}
[data-theme="dark"] .sw-avatar {
  border-color: var(--bg-elevated);
}
[data-theme="dark"] .btn--primary {
  box-shadow: 0 1px 3px rgba(99, 132, 245, 0.3);
}
[data-theme="dark"] .btn--ghost {
  background: var(--bg-elevated);
  color: var(--text-main);
}
[data-theme="dark"] .proof-metrics {
  background: var(--bg-elevated);
}

/* ─────────────────────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(0.94rem, 0.88rem + 0.3vw, 1.06rem);
  line-height: 1.7;
  color: var(--text-main);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: #fff;
}

img, svg { display: block; max-width: 100%; }


/* ─────────────────────────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-heading);
}

h1 {
  font-size: clamp(2.5rem, 1.8rem + 3.5vw, 4.2rem);
  letter-spacing: -0.035em;
  font-weight: 800;
}
h2 {
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem);
  letter-spacing: -0.025em;
}
h3 {
  font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.18rem);
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--accent-hover); }


/* ─────────────────────────────────────────────────────────────
   LAYOUT
   ───────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.section {
  padding: var(--sp-10) 0;
  position: relative;
}

.section--alt {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* section label — the small "Capabilities" etc. above titles */
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-align: center;
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
}
.section-label::before,
.section-label::after {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.3;
}

.section-title {
  margin-bottom: var(--sp-3);
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--text-secondary);
  max-width: 500px;
  margin-inline: auto;
  margin-bottom: var(--sp-8);
}


/* ─────────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7em 1.65em;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  border: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 50%, #1d4ed8 100%);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.3), 0 1px 2px rgba(0, 0, 0, 0.06);
  animation: btnShimmer 4s ease-in-out infinite;
}
@keyframes btnShimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.btn--primary:hover {
  background: linear-gradient(135deg, #1e40af 0%, #4338ca 50%, #1e40af 100%);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35), 0 1px 3px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--bg);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--sp-4) 0;
  transition: background var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out),
              padding var(--duration) var(--ease-out);
}

.site-header.scrolled {
  padding: var(--sp-2) 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 var(--border-subtle);
}

@supports (backdrop-filter: blur(12px)) {
  .site-header.scrolled {
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    background: rgba(255, 255, 255, 0.78);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.98rem;
  color: var(--text-secondary);
  font-weight: 400;
}
.logo strong { color: var(--text-heading); font-weight: 700; }
.logo:hover  { color: var(--text-secondary); }
.logo-icon   { flex-shrink: 0; }

.main-nav ul {
  display: flex;
  gap: var(--sp-5);
  list-style: none;
}
.main-nav a {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-out);
}
.main-nav a:hover { color: var(--text-heading); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform var(--duration-fast) var(--ease-out),
              opacity var(--duration-fast) var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 120px;
  padding-bottom: 0;
  background: var(--bg-hero);
}

/* animated gradient mesh */
.hero-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}
.hero-mesh-orb--1 {
  width: 50vw;
  height: 50vw;
  max-width: 700px;
  max-height: 700px;
  background: rgba(29, 78, 216, 0.12);
  top: -10%;
  left: 10%;
  animation: meshOrb1 20s ease-in-out infinite;
}
.hero-mesh-orb--2 {
  width: 40vw;
  height: 40vw;
  max-width: 550px;
  max-height: 550px;
  background: rgba(124, 58, 237, 0.10);
  top: 15%;
  right: 5%;
  animation: meshOrb2 25s ease-in-out infinite;
}
.hero-mesh-orb--3 {
  width: 35vw;
  height: 35vw;
  max-width: 450px;
  max-height: 450px;
  background: rgba(14, 165, 233, 0.08);
  bottom: 0%;
  left: 30%;
  animation: meshOrb3 22s ease-in-out infinite;
}
@keyframes meshOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(8%, 12%) scale(1.1); }
  66%      { transform: translate(-5%, -8%) scale(0.95); }
}
@keyframes meshOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-12%, 8%) scale(1.08); }
  66%      { transform: translate(6%, -12%) scale(1.12); }
}
@keyframes meshOrb3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(12%, -6%) scale(1.1); }
  66%      { transform: translate(-8%, 8%) scale(0.92); }
}

/* bottom gradient fade into next section */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 740px;
  margin-inline: auto;
  padding-bottom: var(--sp-8);
}

.hero-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.35em 1em;
  border-radius: 100px;
  margin-bottom: var(--sp-5);
}

.hero-title {
  margin-bottom: var(--sp-5);
}

.hero-sub {
  color: var(--text-secondary);
  max-width: 540px;
  margin-inline: auto;
  margin-bottom: var(--sp-6);
  font-size: clamp(1.02rem, 0.94rem + 0.4vw, 1.16rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}

/* social proof metrics strip */
.hero-proof {
  display: flex;
  justify-content: center;
}

.proof-metrics {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-4) var(--sp-6);
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.proof-metric {
  text-align: center;
}

.proof-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.proof-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-top: var(--sp-1);
}

.proof-divider {
  width: 1px;
  height: 36px;
  background: var(--border-medium);
}

/* product preview — the mock portal app inside hero */
.hero-preview-wrap {
  position: relative;
  z-index: 1;
  padding-bottom: var(--sp-10);
}

.hero-preview {
  max-width: 960px;
  margin-inline: auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-medium);
  background: var(--bg);
}


/* ═══════════════════════════════════════════════════════════════
   SHOWCASE WINDOW (used inside hero)
   ═══════════════════════════════════════════════════════════════ */
.showcase-window {
  display: grid;
  grid-template-columns: 52px 1fr;
  min-height: 380px;
}

.sw-sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-subtle);
  padding: var(--sp-4) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}
.sw-logo { margin-bottom: var(--sp-2); }

.sw-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.sw-nav-item {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.sw-nav-item--active {
  background: var(--accent-soft);
  color: var(--accent);
}

.sw-main {
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.sw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  gap: var(--sp-4);
}
.sw-breadcrumb {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.sw-topbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.sw-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.sw-status-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}
.sw-avatars {
  display: flex;
  margin-left: var(--sp-2);
}
.sw-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: hsl(var(--hue, 210) 50% 50%);
  border: 2px solid var(--bg);
  margin-left: -5px;
}
.sw-avatar:first-child { margin-left: 0; }

/* mini assignee avatar on cards */
.sw-card-assignee {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: hsl(var(--hue, 210) 50% 50%);
  flex-shrink: 0;
}

/* ─── sw-content: vertical accordion ─── */
.sw-content {
  display: flex;
  flex-direction: column;
  padding: var(--sp-4) var(--sp-5);
  gap: var(--sp-2);
  flex: 1;
}

/* ─── accordion section ─── */
.sw-section {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--duration-fast) var(--ease-out);
}
.sw-section--open {
  border-color: var(--border-medium);
}

.sw-section-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-3) var(--sp-3);
  background: var(--bg-elevated);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--duration-fast) var(--ease-out);
}
.sw-section-header:hover {
  background: var(--bg-inset);
}

.sw-section-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sw-section-indicator--todo     { background: var(--accent); }
.sw-section-indicator--progress { background: #f59e0b; }
.sw-section-indicator--done     { background: var(--green); }

.sw-section-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.sw-section-count {
  font-size: 0.62rem;
  background: var(--bg-inset);
  border-radius: 100px;
  padding: 0.1em 0.5em;
  font-weight: 600;
  color: var(--text-muted);
}

.sw-section-chevron {
  margin-left: auto;
  color: var(--text-muted);
  transition: transform var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
}
.sw-section--open .sw-section-chevron {
  transform: rotate(180deg);
}

/* body — collapsed by default, open when .sw-section--open */
.sw-section-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease-out);
}
.sw-section--open .sw-section-body {
  grid-template-rows: 1fr;
}
.sw-section-body > * {
  /* wrapper needed for grid animation — but we use direct children */
}

/* inner wrap for the grid collapse trick */
.sw-section-body {
  overflow: hidden;
}
/* We animate max-height as fallback since grid-template-rows
   needs an inner wrapper. Using a simpler approach: */
.sw-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out),
              padding 0.35s var(--ease-out);
  padding: 0 var(--sp-3);
}
.sw-section--open .sw-section-body {
  max-height: 500px;
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
}

/* ─── cards ─── */
.sw-card {
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.sw-card:first-child {
  margin-top: 0;
}
.sw-card-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
}
.sw-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.sw-card-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15em 0.55em;
  border-radius: 4px;
  background: var(--bg-inset);
  color: var(--text-muted);
  width: fit-content;
}
.sw-card-tag--design { background: #fef3c7; color: #92400e; }
.sw-card-tag--dev    { background: #dbeafe; color: #1e40af; }
.sw-card-tag--ops    { background: #d1fae5; color: #065f46; }

.sw-card--accent {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.sw-card--done {
  opacity: 0.45;
}
.sw-card--done .sw-card-title {
  text-decoration: line-through;
}

/* ─── Panel system (sidebar tab switching) ─── */
.sw-panels {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.sw-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  animation: swPanelIn 0.25s var(--ease-out);
}
.sw-panel--active {
  display: flex;
}

@keyframes swPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sw-panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.sw-panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ─── Notes panel ─── */
.sw-note {
  padding: var(--sp-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-2);
}
.sw-note--pinned {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.sw-note-top {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.sw-note-author {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.sw-note-date {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: auto;
}
.sw-note-pin {
  color: var(--accent);
}
.sw-note-text {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* ─── Timeline panel ─── */
.sw-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.sw-tl-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  position: relative;
}
.sw-tl-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 5px;
  top: calc(var(--sp-3) + 12px);
  bottom: 0;
  width: 1px;
  background: var(--border-subtle);
}
.sw-tl-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-inset);
  border: 2px solid var(--border-medium);
  flex-shrink: 0;
  margin-top: 2px;
}
.sw-tl-dot--accent { background: var(--accent); border-color: var(--accent); }
.sw-tl-dot--green  { background: var(--green);  border-color: var(--green); }
.sw-tl-dot--amber  { background: #f59e0b;       border-color: #f59e0b; }

.sw-tl-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sw-tl-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.sw-tl-text strong {
  color: var(--text-main);
  font-weight: 600;
}
.sw-tl-text em {
  font-style: normal;
  color: var(--text-main);
  font-weight: 500;
}
.sw-tl-time {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ─── Files panel ─── */
.sw-file-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.sw-file {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: background var(--duration-fast) var(--ease-out);
}
.sw-file:hover {
  background: var(--bg-inset);
}
.sw-file-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sw-file-icon--img  { background: #fef3c7; color: #92400e; }
.sw-file-icon--doc  { background: #dbeafe; color: #1e40af; }
.sw-file-icon--code { background: #d1fae5; color: #065f46; }

.sw-file-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.sw-file-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-file-detail {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ─── nav-item as button reset ─── */
.sw-nav-item {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
}


/* ═══════════════════════════════════════════════════════════════
   FEATURES
   ═══════════════════════════════════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
/* bento hero cards — span 2 cols with horizontal layout */
.feature-card:nth-child(1),
.feature-card:nth-child(4) {
  grid-column: span 2;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--sp-5);
  align-items: start;
}
.feature-card:nth-child(1) .feature-icon,
.feature-card:nth-child(4) .feature-icon {
  grid-row: 1 / 3;
  width: 52px;
  height: 52px;
  margin-bottom: 0;
  align-self: center;
}

.feature-card {
  position: relative;
  overflow: hidden;
  padding: var(--sp-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  will-change: transform;
}
.feature-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-4);
  color: var(--accent);
}

.feature-card h3 {
  margin-bottom: var(--sp-2);
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}


/* ═══════════════════════════════════════════════════════════════
   FLOW
   ═══════════════════════════════════════════════════════════════ */
.flow-steps {
  display: grid;
  gap: 0;
  max-width: 640px;
  margin-inline: auto;
}

.flow-step {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.flow-step:last-child {
  border-bottom: none;
}

.step-number {
  flex-shrink: 0;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  opacity: 0.15;
  letter-spacing: -0.04em;
  min-width: 52px;
}

.flow-step-body h3 {
  margin-bottom: var(--sp-2);
}
.flow-step-body p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}


/* ─── scroll-driven reveal ─── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}
.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* stagger */
.features-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.06s; }
.features-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.12s; }
.features-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.18s; }

.flow-steps .animate-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.flow-steps .animate-on-scroll:nth-child(3) { transition-delay: 0.16s; }

.platform-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.05s; }
.platform-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.10s; }
.platform-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.15s; }
.platform-grid .animate-on-scroll:nth-child(5) { transition-delay: 0.20s; }
.platform-grid .animate-on-scroll:nth-child(6) { transition-delay: 0.25s; }


/* ═══════════════════════════════════════════════════════════════
   COMPARISON (WHY US)
   ═══════════════════════════════════════════════════════════════ */
.comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.comparison-col {
  padding: var(--sp-7) var(--sp-6);
}

.comparison-col--before {
  background: var(--bg-elevated);
}
.comparison-col--after {
  background: var(--bg);
}

.comparison-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.comparison-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.comparison-icon--before {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}
.comparison-icon--after {
  background: var(--green-soft);
  color: var(--green);
}

.comparison-header h3 {
  font-size: 0.92rem;
  font-weight: 700;
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.comparison-col--before .comparison-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: var(--sp-5);
  position: relative;
  line-height: 1.5;
}
.comparison-col--before .comparison-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.25);
}

.comparison-col--after .comparison-list li {
  font-size: 0.88rem;
  color: var(--text-main);
  font-weight: 500;
  padding-left: var(--sp-5);
  position: relative;
  line-height: 1.5;
}
.comparison-col--after .comparison-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.comparison-divider {
  width: 1px;
  background: var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.comparison-divider-label {
  position: absolute;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: var(--sp-2) var(--sp-1);
  border-radius: 4px;
}

/* stats strip — sits below comparison */
.stats-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  margin-top: var(--sp-7);
  padding: var(--sp-4) 0;
}

.stats-strip-item {
  text-align: center;
}
.stats-strip-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stats-strip-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-top: var(--sp-1);
}
.stats-strip-divider {
  width: 1px;
  height: 28px;
  background: var(--border-medium);
}


/* ═══════════════════════════════════════════════════════════════
   PLATFORM GRID
   ═══════════════════════════════════════════════════════════════ */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

.platform-card {
  position: relative;
  overflow: hidden;
  padding: var(--sp-5);
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}
.platform-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.platform-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-3);
  color: var(--accent);
}

.platform-card h3 {
  font-size: 0.94rem;
  margin-bottom: var(--sp-2);
}
.platform-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
}


/* ═══════════════════════════════════════════════════════════════
   CTA CARD
   ═══════════════════════════════════════════════════════════════ */
.cta-card {
  position: relative;
  overflow: hidden;
  max-width: 680px;
  margin-inline: auto;
  padding: var(--sp-9) var(--sp-6);
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(29, 78, 216, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(124, 58, 237, 0.04) 0%, transparent 50%);
  pointer-events: none;
}
.cta-card > * {
  position: relative;
  z-index: 1;
}
.cta-card h2 {
  margin-bottom: var(--sp-3);
}
.cta-card > p {
  color: var(--text-secondary);
  margin-bottom: var(--sp-6);
}
.cta-actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
}


/* ═══════════════════════════════════════════════════════════════
   FOOTER (multi-column)
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--sp-9) 0 var(--sp-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-8);
}

.footer-brand .logo {
  margin-bottom: var(--sp-3);
}

.footer-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 260px;
}

.footer-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-col a {
  font-size: 0.86rem;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}
.footer-col a:hover {
  color: var(--text-heading);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-subtle);
}
.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: var(--sp-5);
}
.footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text-heading); }


/* ═══════════════════════════════════════════════════════════════
   THEME TOGGLE
   ═══════════════════════════════════════════════════════════════ */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}
.theme-toggle:hover {
  color: var(--text-heading);
  border-color: var(--border-medium);
  background: var(--bg-elevated);
}
.theme-toggle-moon { display: none; }
[data-theme="dark"] .theme-toggle-sun  { display: none; }
[data-theme="dark"] .theme-toggle-moon { display: block; }


/* ═══════════════════════════════════════════════════════════════
   ACTIVE NAV HIGHLIGHTING (scroll spy)
   ═══════════════════════════════════════════════════════════════ */
.main-nav a.nav-active {
  color: var(--accent);
}


/* ═══════════════════════════════════════════════════════════════
   TRUSTED-BY STRIP
   ═══════════════════════════════════════════════════════════════ */
.trusted-strip {
  text-align: center;
  padding: var(--sp-6) 0 var(--sp-4);
}

.trusted-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}

.trusted-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-7);
  flex-wrap: wrap;
}

.trusted-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-muted);
  opacity: 0.6;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.trusted-logo:hover {
  opacity: 1;
}
.trusted-logo svg {
  flex-shrink: 0;
}
.trusted-name {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}


/* ═══════════════════════════════════════════════════════════════
   TESTIMONIALS
   ═══════════════════════════════════════════════════════════════ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}

.testimonial-card {
  position: relative;
  overflow: hidden;
  padding: var(--sp-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-5);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}
.testimonial-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.testimonial-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
}
.testimonial-text::before {
  content: '';
  display: block;
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: var(--sp-4);
  opacity: 0.5;
}

.testimonial-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: hsl(var(--hue, 210) 50% 50%);
  flex-shrink: 0;
}

.testimonial-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  font-style: normal;
  color: var(--text-main);
}

.testimonial-role {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* stagger testimonials */
.testimonials-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.testimonials-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.16s; }


/* ═══════════════════════════════════════════════════════════════
   SCROLL-TO-TOP
   ═══════════════════════════════════════════════════════════════ */
.scroll-top {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease-out),
              visibility 0.3s var(--ease-out),
              transform 0.3s var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}
.scroll-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}


/* ═══════════════════════════════════════════════════════════════
   PREMIUM LAYER — grain, entrance, glow, card glow, gradient text
   ═══════════════════════════════════════════════════════════════ */

/* ─── gradient text utility ─── */
.text-gradient {
  background: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 50%, #1d4ed8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: textGradient 6s ease-in-out infinite;
}
@keyframes textGradient {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ─── hero entrance choreography ─── */
.js .hero .hero-badge,
.js .hero .hero-title,
.js .hero .hero-sub,
.js .hero .hero-actions,
.js .hero .hero-proof,
.js .hero .trusted-strip,
.js .hero .hero-preview-wrap {
  opacity: 0;
  transform: translateY(28px);
}

.js .hero--loaded .hero-badge,
.js .hero--loaded .hero-title,
.js .hero--loaded .hero-sub,
.js .hero--loaded .hero-actions,
.js .hero--loaded .hero-proof,
.js .hero--loaded .trusted-strip,
.js .hero--loaded .hero-preview-wrap {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.js .hero--loaded .hero-badge         { transition-delay: 0.05s; }
.js .hero--loaded .hero-title         { transition-delay: 0.15s; transition-duration: 1s; }
.js .hero--loaded .hero-sub           { transition-delay: 0.40s; }
.js .hero--loaded .hero-actions       { transition-delay: 0.55s; }
.js .hero--loaded .hero-proof         { transition-delay: 0.70s; }
.js .hero--loaded .trusted-strip      { transition-delay: 0.90s; }
.js .hero--loaded .hero-preview-wrap  {
  transition-delay: 1.1s;
  transition-duration: 1.4s;
}

/* preview enters with lift + scale for drama */
.js .hero .hero-preview-wrap {
  transform: translateY(60px) scale(0.94);
}

/* ─── interactive card glow (cursor-following radial) ─── */
.feature-card::before,
.testimonial-card::before,
.platform-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  background: radial-gradient(
    500px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(29, 78, 216, 0.06) 0%,
    transparent 40%
  );
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}
.feature-card:hover::before,
.testimonial-card:hover::before,
.platform-card:hover::before {
  opacity: 1;
}

/* keep card content above the glow */
.feature-icon,
.feature-card h3,
.feature-card p,
.testimonial-text,
.testimonial-footer,
.platform-card-icon,
.platform-card h3,
.platform-card p {
  position: relative;
  z-index: 2;
}


/* ─── infinite marquee (trusted logos) ─── */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.trusted-logos.marquee-track {
  flex-wrap: nowrap;
  justify-content: initial;
  width: max-content;
  animation: marquee 35s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}


/* ═══════════════════════════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════════════════════════ */
.faq-list {
  max-width: 680px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}
.faq-item[open] {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-heading);
  cursor: pointer;
  list-style: none;
  transition: background var(--duration-fast) var(--ease-out);
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { display: none; content: ''; }

.faq-question:hover {
  background: var(--bg-elevated);
}
.faq-question::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-out);
  margin-top: -4px;
}
.faq-item[open] .faq-question::after {
  transform: rotate(-135deg);
  margin-top: 2px;
}

.faq-answer {
  padding: 0 var(--sp-5) var(--sp-4);
}
.faq-answer p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* stagger FAQ */
.faq-list .animate-on-scroll:nth-child(2) { transition-delay: 0.06s; }
.faq-list .animate-on-scroll:nth-child(3) { transition-delay: 0.12s; }
.faq-list .animate-on-scroll:nth-child(4) { transition-delay: 0.18s; }
.faq-list .animate-on-scroll:nth-child(5) { transition-delay: 0.24s; }


/* ═══════════════════════════════════════════════════════════════
   DARK MODE — premium layer additions
   ═══════════════════════════════════════════════════════════════ */
[data-theme="dark"] .hero-mesh-orb--1 { background: rgba(99, 132, 245, 0.18); }
[data-theme="dark"] .hero-mesh-orb--2 { background: rgba(167, 139, 250, 0.15); }
[data-theme="dark"] .hero-mesh-orb--3 { background: rgba(56, 189, 248, 0.12); }

[data-theme="dark"] .hero-preview {
  border-color: rgba(99, 132, 245, 0.12);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99, 132, 245, 0.08);
}

[data-theme="dark"] .text-gradient {
  background: linear-gradient(135deg, #6384f5 0%, #a78bfa 50%, #6384f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
}
[data-theme="dark"] .btn--primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6384f5 50%, #4f46e5 100%);
  background-size: 200% 200%;
  animation: btnShimmer 4s ease-in-out infinite;
  box-shadow: 0 1px 3px rgba(99, 132, 245, 0.3);
}

[data-theme="dark"] .feature-card::before,
[data-theme="dark"] .testimonial-card::before,
[data-theme="dark"] .platform-card::before {
  background: radial-gradient(
    500px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(99, 132, 245, 0.08) 0%,
    transparent 40%
  );
}

[data-theme="dark"] .cta-card::before {
  background: radial-gradient(circle at 30% 30%, rgba(99, 132, 245, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(167, 139, 250, 0.05) 0%, transparent 50%);
}

[data-theme="dark"] .faq-question:hover {
  background: var(--bg-inset);
}

[data-theme="dark"] .hero::after {
  background: linear-gradient(to bottom, transparent, var(--bg));
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .feature-card:nth-child(1),
  .feature-card:nth-child(4) {
    grid-column: span 1;
    display: block;
  }
  .feature-card:nth-child(1) .feature-icon,
  .feature-card:nth-child(4) .feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: var(--sp-4);
  }
  .marquee-track {
    animation: none !important;
  }
  .trusted-logos.marquee-track {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .trusted-logos {
    gap: var(--sp-4);
  }
  .trusted-logo svg { display: none; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .comparison {
    grid-template-columns: 1fr;
  }
  .comparison-divider {
    width: 100%;
    height: 1px;
    flex-direction: row;
  }
  .comparison-divider-label {
    position: static;
    padding: var(--sp-1) var(--sp-3);
  }
  .showcase-window {
    min-height: auto;
  }
  .sw-topbar-right .sw-status-text {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --sp-8: 3rem;
    --sp-9: 4rem;
    --sp-10: 5rem;
  }

  .hero {
    padding-top: 100px;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.96);
    padding: 80px var(--sp-5) var(--sp-5);
    transform: translateX(100%);
    transition: transform var(--duration) var(--ease-out);
    z-index: 999;
    border-left: 1px solid var(--border-subtle);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
  }

  @supports (backdrop-filter: blur(16px)) {
    .main-nav {
      background: rgba(255, 255, 255, 0.82);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }
  }

  .main-nav.open {
    transform: translateX(0);
  }
  .main-nav ul {
    flex-direction: column;
    gap: var(--sp-5);
  }
  .main-nav a {
    font-size: 1rem;
    color: var(--text-secondary);
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .proof-metrics {
    flex-direction: column;
    gap: var(--sp-4);
    padding: var(--sp-5);
  }
  .proof-divider {
    width: 60px;
    height: 1px;
  }

  .flow-step {
    flex-direction: column;
    gap: var(--sp-3);
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .comparison-col {
    padding: var(--sp-5) var(--sp-4);
  }

  .stats-strip {
    flex-direction: column;
    gap: var(--sp-4);
  }
  .stats-strip-divider {
    width: 60px;
    height: 1px;
  }

  /* ─── Mobile showcase: sidebar becomes top icon bar ─── */
  .showcase-window {
    grid-template-columns: 1fr;
  }
  .sw-sidebar {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--sp-2) var(--sp-3);
    gap: var(--sp-1);
    overflow-x: auto;
    justify-content: center;
  }
  .sw-nav {
    flex-direction: row;
  }
  .sw-logo { margin-bottom: 0; margin-right: var(--sp-2); }
  .sw-nav-item {
    width: 28px;
    height: 28px;
  }

  /* compact topbar */
  .sw-topbar {
    padding: var(--sp-2) var(--sp-3);
  }
  .sw-breadcrumb {
    font-size: 0.72rem;
  }
  .sw-avatars {
    margin-left: 0;
  }
  .sw-avatar {
    width: 22px;
    height: 22px;
    font-size: 0.45rem;
    margin-left: -6px;
  }
  .sw-avatar:first-child { margin-left: 0; }

  /* accordion on mobile: tighter spacing */
  .sw-content {
    padding: var(--sp-3);
    gap: var(--sp-2);
  }
  .sw-section-header {
    padding: var(--sp-2) var(--sp-3);
  }
  .sw-card {
    padding: var(--sp-2) var(--sp-3);
  }
  .sw-card-title {
    font-size: 0.76rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-3);
  }

  .hero-mesh-orb {
    filter: blur(70px);
  }
}


/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.12s !important;
  }

  html { scroll-behavior: auto; }

  .animate-on-scroll {
    opacity: 0;
    transform: none;
  }
  .animate-on-scroll.in-view {
    opacity: 1;
    transform: none;
  }

  .btn--primary:hover {
    transform: none;
  }

  .btn--primary {
    animation: none;
  }

  .text-gradient {
    animation: none;
  }

  /* instant entrance — no choreography */
  .js .hero .hero-badge,
  .js .hero .hero-title,
  .js .hero .hero-sub,
  .js .hero .hero-actions,
  .js .hero .hero-proof,
  .js .hero .trusted-strip,
  .js .hero .hero-preview-wrap {
    opacity: 1;
    transform: none;
  }

  /* stop marquee */
  .marquee-track { animation: none !important; }
}