/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Design tokens ---------- */
:root {
  --bg: #faf6ee;
  --bg-alt: #f2ebdb;
  --surface: #ffffff;
  --surface-2: #fbf8f1;
  --ink: #14213d;
  --ink-soft: #52596e;
  --muted: #7c8195;
  --coral: #e8734a;
  --coral-dark: #cf5a34;
  --wine: #7a2048;
  --peach: #f0a878;
  --border: rgba(20, 33, 61, 0.1);
  --shadow-c: 20, 33, 61;
  --band-ink: #12203c;
  --band-ink-2: #0b1526;
  --cream-fixed: #faf6ee;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 5rem;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --shadow-sm: 0 1px 2px rgba(var(--shadow-c), 0.06), 0 1px 1px rgba(var(--shadow-c), 0.04);
  --shadow-md: 0 12px 24px -12px rgba(var(--shadow-c), 0.22), 0 4px 10px -6px rgba(var(--shadow-c), 0.12);
  --shadow-lg: 0 24px 48px -16px rgba(var(--shadow-c), 0.28);
}

:root[data-theme="dark"] {
  --bg: #030304;
  --bg-alt: #0a0a0c;
  --surface: #131316;
  --surface-2: #17171b;
  --ink: #f5f1e8;
  --ink-soft: #c7c6cf;
  --muted: #90909b;
  --coral: #ff9166;
  --coral-dark: #ffa982;
  --wine: #ec6199;
  --peach: #f0a878;
  --border: rgba(245, 241, 232, 0.12);
  --shadow-c: 0, 0, 0;
}

/* fallback for browsers/JS-disabled: honor OS preference before data-theme is set */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #030304;
    --bg-alt: #0a0a0c;
    --surface: #131316;
    --surface-2: #17171b;
    --ink: #f5f1e8;
    --ink-soft: #c7c6cf;
    --muted: #90909b;
    --coral: #ff9166;
    --coral-dark: #ffa982;
    --wine: #ec6199;
    --peach: #f0a878;
    --border: rgba(245, 241, 232, 0.12);
    --shadow-c: 0, 0, 0;
  }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem); }
h3 { font-size: 1.15rem; }
p { color: var(--ink-soft); }

.container {
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--coral-dark);
  margin-bottom: var(--space-3);
}

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-4);
  z-index: 200;
  background: var(--ink);
  color: var(--cream-fixed);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-4); }

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Icons ---------- */
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
#icon-bolt, #icon-moon { fill: currentColor; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 30px; height: 30px; color: var(--ink); }
.icon-accent { color: var(--coral); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 0.9rem 1.6rem;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn .icon { width: 18px; height: 18px; }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.0625rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }

.btn-primary {
  background: var(--coral);
  color: #fff8f4;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(var(--shadow-c), 0.04); }

.btn-invert {
  background: var(--cream-fixed);
  color: var(--wine);
  box-shadow: var(--shadow-md);
}
.btn-invert:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.logo-mark { width: 34px; height: 34px; }
.logo-mark-sm { width: 28px; height: 28px; }
.logo-l1 { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.logo-l2 { fill: none; stroke: var(--wine); stroke-width: 2; }
.logo-l3 { fill: none; stroke: var(--peach); stroke-width: 2; }
.logo-dot { fill: var(--coral); }
.logo-glyph { fill: var(--ink); stroke: none; }

.site-nav { display: flex; align-items: center; gap: var(--space-6); }
.site-nav a:not(.btn) { font-weight: 600; font-size: 0.95rem; color: var(--ink-soft); }
.site-nav a:not(.btn):hover { color: var(--ink); }
.nav-cta .icon { width: 15px; height: 15px; }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}
.icon-btn:hover { background: rgba(var(--shadow-c), 0.06); }
.theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: block; }

.nav-toggle { display: none; }
.menu-icon-close { display: none; }
.nav-toggle.open .menu-icon-open { display: none; }
.nav-toggle.open .menu-icon-close { display: block; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 5vw + 1rem, 6rem) clamp(2rem, 3vw, 3rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 { font-size: clamp(2.5rem, 1.9rem + 3vw, 4.1rem); }
.lede { font-size: 1.15rem; margin-top: var(--space-5); max-width: 46ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); }
.cta-row-center { justify-content: center; }

.hero-note {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: var(--space-6);
  font-size: 0.9rem;
  color: var(--muted);
}

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35c46a;
  flex-shrink: 0;
  align-self: center;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #35c46a;
  opacity: 0.45;
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Hero visual: browser-chrome mockup */
.hero-visual {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-visual:hover { transform: translateY(-3px); }

.browser-chrome {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.chrome-dots { display: flex; gap: 6px; }
.chrome-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); display: block; }
.chrome-url {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}
.chrome-live {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2a9d55;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.justified-mock { display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.mock-row { display: flex; gap: 4px; height: var(--rh); }
.mock-tile {
  flex-grow: var(--g);
  flex-basis: 0;
  min-width: 0;
  border-radius: 5px;
  overflow: hidden;
}
.mock-tile img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.mock-row:nth-child(1) .mock-tile:nth-child(4n+1) { background: var(--peach); }
.mock-row:nth-child(1) .mock-tile:nth-child(4n+2) { background: color-mix(in srgb, var(--wine) 22%, var(--surface-2)); }
.mock-row:nth-child(1) .mock-tile:nth-child(4n+3) { background: color-mix(in srgb, var(--coral) 30%, var(--surface-2)); }
.mock-row:nth-child(1) .mock-tile:nth-child(4n+4) { background: var(--bg-alt); }
.mock-row:nth-child(2) .mock-tile:nth-child(5n+1) { background: color-mix(in srgb, var(--coral) 24%, var(--surface-2)); }
.mock-row:nth-child(2) .mock-tile:nth-child(5n+2) { background: var(--bg-alt); }
.mock-row:nth-child(2) .mock-tile:nth-child(5n+3) { background: var(--peach); }
.mock-row:nth-child(2) .mock-tile:nth-child(5n+4) { background: color-mix(in srgb, var(--wine) 18%, var(--surface-2)); }
.mock-row:nth-child(2) .mock-tile:nth-child(5n+5) { background: color-mix(in srgb, var(--coral) 30%, var(--surface-2)); }
.mock-row:nth-child(3) .mock-tile:nth-child(3n+1) { background: var(--bg-alt); }
.mock-row:nth-child(3) .mock-tile:nth-child(3n+2) { background: color-mix(in srgb, var(--wine) 22%, var(--surface-2)); }
.mock-row:nth-child(3) .mock-tile:nth-child(3n+3) { background: var(--peach); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 7vw, 6.5rem); }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: var(--space-10); }
.section-head h2 { margin-top: 0.25rem; }
.section-lede { font-size: 1.05rem; margin-top: var(--space-4); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Cards / grids ---------- */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
}
.card-grid .card {
  flex: 0 1 260px;
  min-width: 260px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: var(--space-4); margin-bottom: var(--space-2); font-size: 1.1rem; }
.card p { font-size: 0.95rem; }
.card-pillar { position: relative; }

/* ---------- Demo spotlight (fixed dark band) ---------- */
.section-spotlight {
  background: linear-gradient(160deg, var(--band-ink), var(--band-ink-2));
  color: var(--cream-fixed);
}
.section-spotlight .eyebrow { color: var(--peach); }
.section-spotlight h2 { color: var(--cream-fixed); }
.section-spotlight .section-lede { color: rgba(250, 246, 238, 0.72); }
.section-spotlight .section-head { max-width: 680px; margin-inline: auto; text-align: center; }

.demo-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-full);
  background: rgba(250, 246, 238, 0.06);
  border: 1px solid rgba(250, 246, 238, 0.16);
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.demo-chip:hover { background: rgba(250, 246, 238, 0.12); border-color: rgba(250, 246, 238, 0.3); transform: translateY(-1px); }
.chip-arrow { opacity: 0.6; }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6) var(--space-8);
}
.feature-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: var(--space-4); }
.feature-head .icon { color: var(--coral); }
.feature-head h3 { font-size: 1.05rem; }
.feature-group ul { display: flex; flex-direction: column; gap: 0.55rem; }
.feature-group li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.feature-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--peach);
}

/* ---------- How it's built ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}
.stack-item h3 { margin-top: var(--space-4); margin-bottom: var(--space-2); }
.stack-item p { font-size: 0.93rem; }

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: var(--space-4) var(--space-5);
  min-width: 130px;
  text-align: center;
}
.flow-node .icon { color: var(--coral); }
.flow-node span { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.flow-arrow { color: var(--border); width: 26px; height: 26px; flex-shrink: 0; }

/* ---------- Final CTA ---------- */
.section-final-cta {
  background: linear-gradient(135deg, var(--wine), var(--coral-dark));
  color: var(--cream-fixed);
}
.final-cta-inner { max-width: 620px; margin-inline: auto; text-align: center; }
.final-cta-inner h2 { color: var(--cream-fixed); }
.final-cta-inner p { color: rgba(250, 246, 238, 0.85); margin-top: var(--space-4); font-size: 1.05rem; }
.fine-print { margin-top: var(--space-6); font-size: 0.85rem; color: rgba(250, 246, 238, 0.65); }

/* ---------- Footer ---------- */
.site-footer { background: var(--band-ink-2); color: var(--cream-fixed); padding-block: var(--space-8); }
.site-footer .logo-l1 { fill: var(--band-ink-2); stroke: var(--cream-fixed); }
.site-footer .logo-glyph { stroke: var(--cream-fixed); }
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
}
.footer-demo-link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; color: var(--peach); }
.footer-demo-link:hover { color: var(--cream-fixed); }
.footer-demo-link .icon { width: 15px; height: 15px; }
.footer-copy { margin-left: auto; font-size: 0.82rem; color: rgba(250, 246, 238, 0.55); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 560px; margin-inline: auto; width: 100%; }
}

@media (max-width: 760px) {
  .site-nav {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-6) clamp(1.25rem, 4vw, 2.5rem);
    gap: var(--space-5);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav a:not(.btn) { font-size: 1.15rem; }
  .nav-cta { width: 100%; justify-content: center; margin-top: var(--space-2); }
  .nav-toggle { display: inline-flex; }

  .footer-copy { margin-left: 0; width: 100%; order: 3; }
}

@media (max-width: 560px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { justify-content: center; }
  .cta-row-center { align-items: center; }
  .demo-chip { width: 100%; justify-content: space-between; }
  .demo-links { flex-direction: column; }

  .flow-diagram { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
}
