/* OpenFlow marketing site — dark-first slate + signal-teal */

:root {
  --bg: oklch(0.15 0.014 258);
  --bg-elevated: oklch(0.19 0.015 258);
  --surface: oklch(0.22 0.016 258);
  --surface-raised: oklch(0.26 0.018 258);
  --border: oklch(0.32 0.02 258);
  --border-subtle: oklch(0.28 0.016 258);
  --fg: oklch(0.95 0.008 250);
  --fg-muted: oklch(0.72 0.02 250);
  --fg-dim: oklch(0.58 0.02 250);
  --primary: oklch(0.78 0.13 178);
  --primary-dim: oklch(0.65 0.11 178);
  --primary-fg: oklch(0.18 0.02 200);
  --primary-glow: oklch(0.78 0.13 178 / 0.18);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --max: 1100px;
  --header-h: 4rem;
  --shadow: 0 12px 40px oklch(0.1 0.02 258 / 0.45);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: oklch(0.85 0.12 178);
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid oklch(0.28 0.016 258 / 0.8);
  background: oklch(0.15 0.014 258 / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--fg);
}

.brand img,
.brand svg {
  width: 2rem;
  height: 2rem;
}

.brand span {
  font-size: 1.125rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--fg);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg) !important;
  font-size: 0.875rem !important;
}

.nav-cta:hover {
  border-color: var(--primary-dim);
  background: var(--surface-raised);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bars {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-cta {
    margin-top: 0.75rem;
    justify-content: center;
  }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 0.6rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary:hover {
  background: oklch(0.84 0.12 178);
  color: var(--primary-fg);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--primary-dim);
}

/* —— Hero —— */
.hero {
  position: relative;
  padding: 5rem 0 4.5rem;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, oklch(0.4 0.02 258) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
  opacity: 0.45;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 90vw);
  height: 320px;
  background: radial-gradient(ellipse, var(--primary-glow), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 48rem;
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid oklch(0.78 0.13 178 / 0.35);
  background: oklch(0.78 0.13 178 / 0.08);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero h1 .accent {
  color: var(--primary);
}

.hero-lead {
  margin: 0 auto 1.75rem;
  max-width: 38rem;
  color: var(--fg-muted);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.stat {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: oklch(0.2 0.015 258 / 0.8);
  color: var(--fg-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.stat strong {
  color: var(--fg);
  font-weight: 600;
}

/* —— Product screenshots —— */
.hero-shot {
  position: relative;
  margin-top: 3rem;
  max-width: min(100% - 2.5rem, 1040px);
}

.shot-frame {
  margin: 0;
  border-radius: calc(var(--radius-lg) + 4px);
  border: 1px solid var(--border);
  background: oklch(0.12 0.014 258);
  box-shadow: 0 24px 80px oklch(0.08 0.02 258 / 0.65), 0 0 0 1px oklch(0.78 0.13 178 / 0.08);
  overflow: hidden;
}

.shot-frame.compact {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.shot-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  background: oklch(0.18 0.015 258);
}

.shot-chrome span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: oklch(0.4 0.02 258);
}

.shot-chrome span:nth-child(1) {
  background: oklch(0.7 0.14 25);
}
.shot-chrome span:nth-child(2) {
  background: oklch(0.82 0.14 95);
}
.shot-chrome span:nth-child(3) {
  background: oklch(0.72 0.14 145);
}

.shot-url {
  margin-left: 0.75rem;
  flex: 1;
  padding: 0.25rem 0.65rem;
  border-radius: 0.35rem;
  background: oklch(0.14 0.014 258);
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shot-frame img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.section-shots {
  padding-top: 1.5rem;
}

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

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

.shot-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shot-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-inline: 0.15rem;
}

.shot-card figcaption strong {
  font-size: 0.975rem;
  letter-spacing: -0.01em;
}

.shot-card figcaption span {
  color: var(--fg-muted);
  font-size: 0.875rem;
}

/* —— Sections —— */
section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border-subtle);
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-head p {
  margin: 0;
  color: var(--fg-muted);
}

/* —— Feature cards —— */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.card {
  padding: 1.35rem 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 0.55rem;
  background: oklch(0.78 0.13 178 / 0.12);
  color: var(--primary);
  font-size: 1.1rem;
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

/* —— How it works —— */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}

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

.step {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.04em;
}

.step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.flow-diagram {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg);
  overflow-x: auto;
}

.flow-diagram svg {
  width: 100%;
  min-width: 520px;
  height: auto;
  margin-inline: auto;
}

/* —— Made —— */
.made-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 800px) {
  .made-layout {
    grid-template-columns: 1fr;
  }
}

.prose p {
  margin: 0 0 1rem;
  color: var(--fg-muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--fg);
  font-weight: 600;
}

.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pipeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
}

.pipeline-num {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: oklch(0.78 0.13 178 / 0.15);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.pipeline-item h4 {
  margin: 0 0 0.2rem;
  font-size: 0.9375rem;
}

.pipeline-item p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 0.8125rem;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.5rem;
}

.tag {
  padding: 0.3rem 0.65rem;
  border-radius: 0.4rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* —— About —— */
.about-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  box-shadow: var(--shadow);
  max-width: 40rem;
  margin-inline: auto;
}

@media (max-width: 520px) {
  .about-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-avatar {
    margin-inline: auto;
  }

  .about-links {
    justify-content: center;
  }
}

.about-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1rem;
  background: oklch(0.2 0.015 258);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.about-avatar img {
  width: 2.5rem;
  height: 2.5rem;
}

.about-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.about-card .role {
  margin: 0 0 0.75rem;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
}

.about-card p {
  margin: 0 0 1rem;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* —— Get started —— */
.start-box {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (max-width: 800px) {
  .start-box {
    grid-template-columns: 1fr;
  }
}

.code-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: oklch(0.12 0.014 258);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--fg-dim);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
}

.code-panel pre {
  margin: 0;
  padding: 1.25rem 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--fg);
}

.code-panel .comment {
  color: var(--fg-dim);
}

.code-panel .cmd {
  color: var(--primary);
}

.side-note {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
}

.side-note h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.side-note p {
  margin: 0 0 1rem;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

/* —— Footer —— */
.site-footer {
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-brand strong {
  font-size: 1rem;
}

.footer-brand span,
.disclaimer {
  color: var(--fg-dim);
  font-size: 0.8125rem;
  max-width: 28rem;
}

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

.footer-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--primary);
}
