/* ==============================================================
   FlowForce — shared site styles
   Used by: flowforce.html, terms/, privacy/, pricing/, security/
   ============================================================== */

/* ================= THEME VARS ================= */
:root {
  color-scheme: dark;
  --bg: #07060d;
  --bg-soft: #0c0a17;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.025);
  --surface-3: #110d1f;
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.05);
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.85);
  --muted: rgba(255, 255, 255, 0.65);
  --muted-2: rgba(255, 255, 255, 0.45);
  --grid: rgba(255, 255, 255, 0.045);
  --glass-bg: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  --glow-1: rgba(109, 87, 255, 0.5);
  --glow-2: rgba(167, 139, 250, 0.35);
  --glow-3: rgba(46, 16, 101, 0.55);

  --soft-radius-sm: 0.5rem;
  --soft-radius-md: 0.75rem;
  --soft-radius-lg: 1rem;
  --soft-radius-xl: 1.25rem;
  --soft-radius-shell: 1.5rem;
}
html:not(.dark) {
  color-scheme: light;
  --bg: #fafafb;
  --bg-soft: #f3f1fb;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-2: rgba(255, 255, 255, 0.6);
  --surface-3: #ffffff;
  --border: rgba(15, 23, 42, 0.12);
  --border-soft: rgba(15, 23, 42, 0.07);
  /* Neutral body copy — purple reserved for accents only */
  --text: #0f172a;
  --text-2: #334155;
  --muted: #475569;
  --muted-2: #64748b;
  --grid: rgba(15, 23, 42, 0.06);
  --glass-bg: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.85),
    rgba(255, 255, 255, 0.6)
  );
  --glow-1: rgba(109, 87, 255, 0.32);
  --glow-2: rgba(167, 139, 250, 0.25);
  --glow-3: rgba(109, 87, 255, 0.22);
}

html,
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-inter), ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}
html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }
:target, section[id] { scroll-margin-top: 24px; }
img { max-width: 100%; height: auto; }
a.site-logo {
  display: inline-flex;
  align-items: center;
  padding-block: 0.125rem;
}
a.site-logo > img.logo-dark,
a.site-logo > img.logo-light {
  width: auto;
  max-width: 5.75rem;
  height: auto;
  max-height: 1.375rem;
  object-fit: contain;
}
a.site-logo--footer {
  padding-block: 0.25rem;
}
a.site-logo--footer > img.logo-dark,
a.site-logo--footer > img.logo-light {
  max-width: 5.25rem;
  max-height: 1.25rem;
}
.font-display {
  font-family: var(--font-bricolage), var(--font-inter), ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
}

/* ================= UTILITIES ================= */
.text-1 { color: var(--text); }
.text-2 { color: var(--text-2); }
.text-mute { color: var(--muted); }
.text-mute-2 { color: var(--muted-2); }
.surface { background: var(--surface); }
.surface-2 { background: var(--surface-2); }
.surface-3 { background: var(--surface-3); }
.border-line { border-color: var(--border); }
.border-line-soft { border-color: var(--border-soft); }

/* Typography scale — large semibold headlines, regular gray body */
.type-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-400, #a78bfa);
}
.type-h2-lg {
  font-family: var(--font-bricolage), var(--font-inter), ui-sans-serif, system-ui, sans-serif;
  font-size: 1.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
@media (min-width: 640px) {
  .type-h2-lg { font-size: 2.25rem; }
}
.type-h3 {
  font-family: var(--font-bricolage), var(--font-inter), ui-sans-serif, system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.type-lead {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--muted);
}
@media (min-width: 640px) {
  .type-lead { font-size: 1.125rem; }
}
.type-body {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--text-2);
}
.type-body-sm {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-2);
}

.glass-nav {
  background: var(--surface-3);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.08);
}
html:not(.dark) .glass-nav {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(15, 23, 42, 0.08);
}
.ring-soft {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(0, 0, 0, 0.3);
}

/* ================= SOFT UI (panels, rows, chips) ================= */
.soft-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--soft-radius-lg);
}
.soft-panel-lg {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--soft-radius-shell);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 1px 0 rgba(0, 0, 0, 0.22);
}
html:not(.dark) .soft-panel-lg {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 1px 2px rgba(15, 23, 42, 0.06);
}
.soft-card {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--soft-radius-md);
}
.soft-bento {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--soft-radius-lg);
}
.soft-inset {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--soft-radius-md);
}
.soft-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
}
.soft-row {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--soft-radius-sm);
}
.soft-row-active {
  background: rgba(109, 87, 255, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: var(--soft-radius-sm);
}
html:not(.dark) .soft-row-active {
  background: rgba(109, 87, 255, 0.06);
  border-color: rgba(91, 69, 224, 0.22);
}
.soft-hover {
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.soft-hover:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--border) 70%, #6d57ff);
}
.soft-tint-brand {
  background: rgba(109, 87, 255, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: var(--soft-radius-md);
}
html:not(.dark) .soft-tint-brand {
  background: rgba(109, 87, 255, 0.06);
  border-color: rgba(91, 69, 224, 0.18);
}
.soft-tint-mint {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: var(--soft-radius-md);
}
html:not(.dark) .soft-tint-mint {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(15, 143, 102, 0.18);
}
.soft-tint-amber {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--soft-radius-md);
}
html:not(.dark) .soft-tint-amber {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(217, 119, 6, 0.28);
}
.soft-tint-violet {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: var(--soft-radius-md);
}
html:not(.dark) .soft-tint-violet {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(124, 58, 237, 0.18);
}

/* Nested surfaces: one shell border, contrast via fill (Linear / Vercel pattern) */
.soft-panel-lg :is(.soft-card, .soft-inset),
.soft-panel :is(.soft-card, .soft-inset),
.soft-bento :is(.soft-card, .soft-inset) {
  border: none;
  box-shadow: none;
}
.soft-panel-lg :is(.soft-card, .soft-inset),
.soft-panel :is(.soft-card, .soft-inset) {
  background: var(--surface-2);
}
.soft-bento .soft-card {
  background: var(--bg);
}
.soft-panel-lg :is(.soft-card, .soft-inset) .soft-inset,
.soft-panel :is(.soft-card, .soft-inset) .soft-inset {
  background: var(--bg);
}
.soft-panel-lg :is(.soft-tint-brand, .soft-tint-mint, .soft-tint-amber, .soft-tint-violet),
.soft-panel :is(.soft-tint-brand, .soft-tint-mint, .soft-tint-amber, .soft-tint-violet),
.soft-card :is(.soft-tint-brand, .soft-tint-mint, .soft-tint-amber, .soft-tint-violet),
.soft-inset :is(.soft-tint-brand, .soft-tint-mint, .soft-tint-amber, .soft-tint-violet) {
  border: none;
}
.soft-panel-lg .soft-row,
.soft-panel-lg .soft-row-active,
.soft-panel .soft-row,
.soft-panel .soft-row-active,
.soft-panel-lg :is(.soft-card, .soft-inset, .soft-tint-brand, .soft-tint-mint, .soft-tint-amber, .soft-tint-violet) .soft-row,
.soft-panel-lg :is(.soft-card, .soft-inset, .soft-tint-brand, .soft-tint-mint, .soft-tint-amber, .soft-tint-violet) .soft-row-active,
.soft-inset .soft-row,
.soft-inset .soft-row-active {
  border: none;
  background: transparent;
}
.soft-panel-lg .soft-row-active,
.soft-panel .soft-row-active,
.soft-panel-lg :is(.soft-card, .soft-inset, .soft-tint-brand, .soft-tint-mint, .soft-tint-amber, .soft-tint-violet) .soft-row-active,
.soft-inset .soft-row-active {
  background: rgba(109, 87, 255, 0.06);
  border-radius: var(--soft-radius-sm);
}

.bg-grid {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
}
.bg-grid-fine {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.mask-radial {
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
}

.gradient-text {
  background: linear-gradient(180deg, var(--text) 0%, var(--text-2) 60%, var(--muted) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.accent-text {
  background: linear-gradient(90deg, #c4b5fd 0%, #a78bfa 40%, #6d57ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html:not(.dark) .accent-text {
  background: linear-gradient(90deg, #6d57ff 0%, #5b45e0 55%, #4c38c2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Light-mode: accessible accent text (WCAG AA on --bg / white surfaces) */
html:not(.dark) .text-brand-200 { color: #3d2d9e !important; }
html:not(.dark) .text-brand-300 { color: #4c38c2 !important; }
html:not(.dark) .text-brand-400 { color: #5b45e0 !important; }
html:not(.dark) .text-accent-400 { color: #4c38c2 !important; }
html:not(.dark) .text-mint-400 { color: #0f8f66 !important; }
html:not(.dark) .text-amber-300 { color: #8a5a00 !important; }
html:not(.dark) .text-rose-300\/90 { color: #b42357 !important; }
html:not(.dark) .text-sky-300\/90 { color: #0b6ea8 !important; }
html:not(.dark) .text-fuchsia-300 { color: #86198f !important; }
html:not(.dark) .text-fuchsia-300\/90 { color: #86198f !important; }
html:not(.dark) .hover\:text-brand-300:hover { color: #3d2d9e !important; }
html:not(.dark) .docs-callout--tip .docs-callout-title { color: #0f8f66 !important; }

/* ================= BUTTONS ================= */
.btn-primary {
  position: relative;
  background: linear-gradient(180deg, #6d57ff 0%, #5b45e0 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 10px 30px -10px rgba(109, 87, 255, 0.7);
  transition: filter 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-ghost:hover { background: var(--surface-2); }
/* ================= HERO ENTRANCE ================= */
@keyframes hf-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hf-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hf-scale { from { opacity: 0; transform: translateY(40px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.anim-nav { opacity: 0; animation: hf-fade .7s ease 0.05s forwards; }
.anim-badge { opacity: 0; animation: hf-rise .7s cubic-bezier(.2,.7,.2,1) .25s forwards; }
.hero-line { display: inline-block; overflow: hidden; }
.hero-line > span { display: inline-block; transform: translateY(110%); animation: lineUp .9s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes lineUp { to { transform: translateY(0); } }
.hero-line.l1 > span { animation-delay: 0.35s; }
.hero-line.l2 > span { animation-delay: 0.5s; }
.anim-sub { opacity: 0; animation: hf-rise .7s ease .8s forwards; }
.anim-cta { opacity: 0; animation: hf-rise .7s ease .95s forwards; }
.anim-fineprint { opacity: 0; animation: hf-fade .7s ease 1.1s forwards; }
.anim-mockup { opacity: 0; animation: hf-scale 1s cubic-bezier(.2,.7,.2,1) 1.05s forwards; }

/* ================= WORKFLOW SCENES (hero product demos) ================= */
:root {
  --motion-fast: 160ms;
  --motion-hero: 280ms;
  --motion-ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --motion-ease-crossfade: cubic-bezier(0.4, 0, 0.2, 1);
}

.workflow-enter-fade {
  opacity: 0;
  transition: opacity var(--motion-fast) var(--motion-ease-out);
}

.workflow-enter-rise {
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity var(--motion-hero) var(--motion-ease-out),
    transform var(--motion-hero) var(--motion-ease-out);
}

.workflow-enter-visible.workflow-enter-fade,
.workflow-enter-visible.workflow-enter-rise {
  opacity: 1;
  transform: translateY(0);
}

.workflow-stagger-1 { transition-delay: 40ms; }
.workflow-stagger-2 { transition-delay: 80ms; }
.workflow-stagger-3 { transition-delay: 120ms; }

.workflow-scene {
  opacity: 0;
  transition: opacity var(--motion-fast) var(--motion-ease-crossfade);
}

.workflow-scene-visible {
  opacity: 1;
}

.workflow-scene-initial {
  transition: none;
}

@keyframes workflow-rise {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.workflow-rise {
  animation: workflow-rise var(--motion-hero) var(--motion-ease-out) forwards;
}
.workflow-hidden {
  opacity: 0;
  pointer-events: none;
}
@keyframes workflow-typing-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
.workflow-thinking-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: currentColor;
  animation: workflow-typing-dot 1.1s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .workflow-enter-fade,
  .workflow-enter-rise,
  .workflow-scene { transition: none; opacity: 1; transform: none; }
  .workflow-rise { animation: none; opacity: 1; transform: none; }
  .workflow-hidden { opacity: 1; pointer-events: auto; }
  .workflow-thinking-dot { animation: none; opacity: 1; }
}

/* ================= DIALER WAVE ================= */
@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
.wave-bar { transform-origin: center; animation: wave 1s ease-in-out infinite; }

/* ================= SCROLL PROGRESS ================= */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, #6d57ff, #a78bfa);
  z-index: 60;
  transition: width 0.08s linear;
}

[id] { scroll-margin-top: 96px; }

/* ================= SCROLLBAR ================= */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(109, 87, 255, 0.45); }

/* ================= FAQ ACCORDION ================= */
details.faq summary { list-style: none; cursor: pointer; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq .chev { transition: transform .25s ease; }
details.faq[open] .chev { transform: rotate(180deg); }
details.faq .body { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .35s ease, opacity .25s ease, padding .25s ease; }
details.faq[open] .body { max-height: 360px; opacity: 1; }

/* ================= LOGO SWAP ================= */
.logo-dark { display: none; }
.logo-light { display: inline-block; }
html.dark .logo-dark { display: inline-block; }
html.dark .logo-light { display: none; }


.marketing-final-cta__content {
  position: relative;
  z-index: 1;
}
.marketing-final-cta__accent {
  color: #ddd6fe;
}
.marketing-final-cta__description {
  color: rgba(221, 214, 254, 0.9);
