/* FlowSwitch marketing — brand tokens (dark shell + sky trust accents) */

:root {
  color-scheme: dark;
  --void: #000000;
  --bg: #0b0c10;
  --bg-elevated: #0f1115;
  --bg-card: #161a22;
  --border: rgba(255, 255, 255, 0.06);
  --border-bright: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --brand-primary: #0ea5e9;
  --brand-primary-mid: #38bdf8;
  --brand-primary-deep: #0284c7;
  --brand-cta: #f97316;
  --accent-blue: var(--brand-primary);
  --accent-blue-deep: var(--brand-primary-deep);
  --radius: 14px;
  --radius-lg: 24px;
  --font: 'Work Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Work Sans', system-ui, sans-serif;
  --header-h: 4.5rem;
}

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

html {
  background-color: var(--void);
}

html:not(.lenis) {
  scroll-behavior: smooth;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.55s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background-color: var(--void);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
  z-index: -1;
  pointer-events: none;
}

h1, h2, h3, h4, h5, h6, .brand {
  font-family: var(--font-heading);
}

/* Scroll Animations — legacy .reveal + section-reveal fallback */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.section-reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .download-glow-ring {
    transition: none;
    animation: none;
  }
  .download-glow-ring:hover {
    transform: none;
  }
  .section-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

a {
  color: #7dd3fc;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #bae6fd;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--accent-blue);
  color: #fff;
  z-index: 100;
  font-weight: 700;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}

.nav {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 2rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
  cursor: pointer;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--text);
}

.btn-header-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  background: var(--brand-cta);
  color: #fff !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-header-cta:hover {
  background: #ea580c;
}

@media (max-width: 720px) {
  .site-header__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding-bottom: 0.75rem;
    padding-top: 0.5rem;
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  padding: 5rem 0 0;
  overflow: visible;
  background: var(--void);
  z-index: 1;
}

.hero-inner {
  text-align: center;
  max-width: 58rem;
  margin: 0 auto;
  padding: 0 1rem;
  perspective: 1100px;
  transform-style: preserve-3d;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto 1.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: background 0.15s ease, color 0.15s;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-blue);
}

.hero-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hero-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.headline-gradient {
  background: linear-gradient(180deg, #ffffff 0%, var(--brand-primary-mid) 55%, var(--brand-primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff;
}

.hero-lead {
  margin: 0 auto 2.5rem;
  max-width: 44rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-download {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

.download-glow-ring {
  position: relative;
  display: inline-flex;
  border-radius: 999px;
  padding: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1),
    rgba(14, 165, 233, 0.55),
    rgba(255, 255, 255, 0.1),
    rgba(14, 165, 233, 0.55)
  );
  background-size: 300% 100%;
  animation: borderPan 4s linear infinite;
  z-index: 1;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

@keyframes borderPan {
  0% { background-position: 0% 50%; }
  100% { background-position: 150% 50%; }
}

.download-glow-ring:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px -5px rgba(14, 165, 233, 0.35);
}

.download-glow-ring__inner {
  position: relative;
  z-index: 2;
  border-radius: 998px;
  background: #14181d;
  transition: background 0.3s ease;
}

.download-glow-ring:hover .download-glow-ring__inner {
  background: #1a1f26;
}

.btn-split {
  display: flex;
  align-items: stretch;
  min-height: 52px;
  border-radius: 998px;
  overflow: hidden;
}

.btn-split-seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: #ffffff !important;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-split-seg--main {
  flex: 1 1 auto;
  padding-left: 1.75rem;
}

.btn-split-seg--menu {
  flex: 0 0 52px;
  min-width: 52px;
  padding: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-split-seg:hover {
  background: rgba(255, 255, 255, 0.06);
}

.hero-download-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.download-error {
  max-width: 36rem;
  margin: 1.25rem auto 0;
  padding: 1rem 1.15rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #fecaca;
  text-align: center;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: var(--radius);
}

.download-error a {
  color: #fde68a;
}

.download-error code {
  font-size: 0.85em;
  color: #fecaca;
}

.link-portable {
  font-weight: 500;
  color: var(--text-secondary) !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 1px;
}
.link-portable:hover {
  color: #fff !important;
  border-bottom-color: rgba(255,255,255,0.3);
}

/* —— Hero Media Showcase —— */
.hero-media-showcase {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.showcase-3d-wrap {
  perspective: 1400px;
  perspective-origin: 50% 35%;
  transform-style: preserve-3d;
}

.showcase-3d {
  transform-style: preserve-3d;
  will-change: transform;
  backface-visibility: hidden;
}

.showcase-frame {
  background: #0f1115;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.showcase-controls {
  height: 38px;
  background: #1a1d24;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding-left: 1rem;
  gap: 8px;
}
.showcase-controls span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
}
.showcase-video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* —— Bento Grid System —— */
.bento-grid-section {
  padding: 8rem 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 10;
}

/* Bento Grid Container */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  grid-auto-rows: 320px;
  perspective: 960px;
  transform-style: preserve-3d;
}

/* Layout Modifiers */
.bento-wide { grid-column: span 2; }
.bento-tall { grid-row: span 2; }

/* Bento Card Frame */
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.bento-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: 
    0 12px 24px -10px rgba(0, 0, 0, 0.5), 
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* Bento Content */
.bento-content {
  padding: 2.25rem 2.25rem 0;
  position: relative;
  z-index: 2;
}

.bento-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.bento-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* Media Housing */
.bento-media {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem 2.25rem 0;
  transform: translateZ(0);
}

/* Image Assets */
.bento-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: none;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.4);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-focus { align-items: center; padding-bottom: 2.25rem; }
.bottom-focus img {
  object-position: bottom right;
  border-radius: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.bento-card:hover .bento-media img {
  transform: scale(1.03) translateY(-4px);
}

/* Responsive Overrides */
@media (max-width: 1000px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-tall { grid-row: span 1; }
  .bento-wide { grid-column: span 2; }
}
@media (max-width: 650px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .bento-wide, .bento-tall { grid-column: span 1; grid-row: span 1; }
  .bento-media { min-height: 200px; }
}

/* —— General Sections —— */
.section {
  padding: 6rem 0;
  background: var(--bg);
}

.section--alt {
  background: var(--bg-elevated);
}

.section-head {
  margin-bottom: 3rem;
  text-align: center;
}
.section-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.section h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.75vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.section-intro {
  margin: 1rem auto 0;
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.section-rule {
  height: 1px;
  margin: 0;
  border: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(56, 189, 248, 0.35) 35%,
    rgba(249, 115, 22, 0.25) 65%,
    transparent
  );
  opacity: 0.85;
}

.story-section {
  position: relative;
  z-index: 2;
}

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

.story-step {
  position: relative;
  padding: 2rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(22, 26, 34, 0.95), rgba(15, 17, 21, 0.98));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.story-step:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-3px);
}

.story-step-num {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--brand-primary-mid);
  margin-bottom: 1rem;
}

.story-step h3 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.story-step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.6;
}

.stats-strip {
  padding: 4rem 0;
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-pill {
  text-align: center;
  padding: 1.75rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}

.stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, var(--brand-primary-mid) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fff;
}

.stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.faq-section {
  padding-bottom: 7rem;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.faq-trigger:hover {
  background: rgba(255, 255, 255, 0.04);
}

.faq-trigger:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}

.faq-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(225deg);
  border-color: var(--brand-primary-mid);
}

.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.faq-panel-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 1.35rem 1.15rem;
}

.faq-panel-inner p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-panel-inner code {
  font-size: 0.88em;
}

@media (max-width: 900px) {
  .story-grid {
    grid-template-columns: 1fr;
  }
  .stats-inner {
    grid-template-columns: 1fr;
  }
}

.grid.two { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  transition: transform 0.2s;
}
.card:hover { border-color: var(--border-bright); transform: translateY(-2px); }

@media (max-width: 720px) {
  .grid.two {
    grid-template-columns: 1fr;
  }
}

.inner-page {
  padding: 5rem 0 4rem;
  min-height: 50vh;
}

.prose {
  max-width: 44rem;
}

.prose h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 4vw, 2.5rem);
}

.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
}

.prose p,
.prose li {
  color: var(--text-secondary);
}

.prose .list {
  margin: 0;
  padding-left: 1.25rem;
}

/* —— Footer —— */
.site-footer {
  padding: 4rem 0 2rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem 2.5rem;
  text-align: left;
  align-items: start;
}

.site-footer__brand .brand--footer {
  margin-bottom: 0.75rem;
}

.site-footer__tagline {
  margin: 0;
  max-width: 16rem;
  line-height: 1.5;
}

.site-footer__heading {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer__links a:hover {
  color: #fff;
}

.site-footer__fine {
  margin: 0;
  line-height: 1.55;
}

.site-footer__bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8125rem;
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer a:hover {
  color: #fff;
}

@media (max-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}
