/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a2e;
  --color-text-light: #555;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e5e7eb;
  --color-surface: #f9fafb;
  --color-code-bg: #f3f4f6;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
  --max-width: 1100px;
  --nav-height: 72px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Navigation ───────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo:hover { text-decoration: none; }

.nav-logo img { height: 56px; width: auto; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-light);
  font-size: 1.05rem;
  font-weight: 700;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--color-accent); text-decoration: none; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}

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

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

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

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover { background: #eef0f3; }

.btn-large {
  padding: 16px 40px;
  font-size: 1.1rem;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
}

.section-sm { padding: 48px 24px; }

.hero + .section { padding-top: 8px; }

.section-alt { background: var(--color-surface); max-width: none; padding: 80px 24px; }
.section-alt > * { max-width: var(--max-width); margin-left: auto; margin-right: auto; }

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.section-lede {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 100px 24px 12px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 36px;
}

.hero-buttons { display: flex; gap: 16px; justify-content: center; }

.hero-image {
  margin-top: 60px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* ── Features Grid ────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.feature-card {
  padding: 28px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.features-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ── Product Cards (Products page + landing) ────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
  max-width: 960px;
  margin: 0 auto;
}

.product-card {
  position: relative;
  padding: 32px 32px 28px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
}

.product-card-live {
  border: 2px solid var(--color-accent);
}

.product-card-soon {
  background: var(--color-surface);
}

.product-card-tag {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}

.product-card-tag-soon {
  background: var(--color-text-light);
}

.product-card h3 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.product-card-tagline {
  color: var(--color-text-light);
  margin-bottom: 20px;
}

.product-card-features {
  list-style: none;
  margin: 0 0 20px;
  flex-grow: 1;
}

.product-card-features li {
  padding: 6px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--color-border);
}

.product-card-features li:last-child { border-bottom: none; }

.product-card-features li::before {
  content: "\2713  ";
  color: var(--color-accent);
  font-weight: 700;
}

.product-card-price {
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-text);
}

.product-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.product-card-actions .btn { flex: 1 1 auto; text-align: center; padding: 10px 18px; }

/* ── Upgrade tease banner (on product pages) ────────────────────────────── */
.upgrade-tease {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px;
  border-radius: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-align: center;
}

.upgrade-tease h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.upgrade-tease p {
  color: var(--color-text-light);
  margin-bottom: 16px;
}

/* ── About page ─────────────────────────────────────────────────────────── */
.about-section {
  max-width: 760px;
}

.about-section h1 {
  font-size: 2.4rem;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.about-section .lede {
  font-size: 1.2rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.about-section h2 {
  font-size: 1.4rem;
  margin: 40px 0 12px;
}

.about-section p,
.about-section li {
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.about-section ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

/* ── Pricing Card ─────────────────────────────────────────────────────────── */
.pricing-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 16px;
  border: 2px solid var(--color-accent);
  text-align: center;
}

.pricing-card .price {
  font-size: 3rem;
  font-weight: 800;
  margin: 16px 0 8px;
}

.pricing-card .price-note {
  color: var(--color-text-light);
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}

.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.pricing-features li::before {
  content: "\2713  ";
  color: var(--color-accent);
  font-weight: 700;
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-sans);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-card {
  max-width: 500px;
  margin: 0 auto;
  padding: 40px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.form-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  display: none;
}

.form-message.success {
  display: block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-message.error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ── Documentation ────────────────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  align-self: start;
}

.docs-sidebar ul { list-style: none; }

.docs-sidebar li { margin-bottom: 4px; }

.docs-sidebar a {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.docs-sidebar a:hover {
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
}

.docs-content h2 {
  font-size: 1.5rem;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

.docs-content h2:first-child { margin-top: 0; }

.docs-content h3 {
  font-size: 1.15rem;
  margin: 32px 0 12px;
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

.docs-content p,
.docs-content li {
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.docs-content code {
  background: var(--color-code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.docs-content pre {
  background: var(--color-code-bg);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.docs-content pre code {
  background: none;
  padding: 0;
}

/* ── Case Studies ─────────────────────────────────────────────────────────── */
.case-study {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.case-study-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.case-study h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.case-study .lede {
  font-size: 1.15rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.case-study h2 {
  font-size: 1.4rem;
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.case-study h2:first-of-type { border-top: none; padding-top: 0; }

.case-study h3 {
  font-size: 1.1rem;
  margin: 24px 0 10px;
}

.case-study p,
.case-study li {
  color: var(--color-text);
  margin-bottom: 12px;
}

.case-study ul, .case-study ol { padding-left: 24px; margin-bottom: 16px; }

/* Headline-numbers callout: 1 BK7 lens → 3 elements, merit ÷210 */
.case-study-headline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
  padding: 24px;
  border-radius: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.case-study-headline .stat {
  text-align: center;
}

.case-study-headline .stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.case-study-headline .stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* Before/after image grid */
.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 24px;
}

.image-grid figure {
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg);
}

.image-grid img {
  display: block;
  width: 100%;
  height: auto;
}

.image-grid figcaption {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.image-single {
  margin: 16px 0 24px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.image-single img { display: block; width: 100%; height: auto; }

.image-single figcaption {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

/* Trajectory / settings table */
.case-study table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.95rem;
}

.case-study th,
.case-study td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
}

.case-study th {
  background: var(--color-surface);
  font-weight: 600;
}

.case-study td.num { text-align: right; font-variant-numeric: tabular-nums; }

.case-study code {
  background: var(--color-code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* CTA block at the foot of a case study */
.case-study-cta {
  margin-top: 48px;
  padding: 28px 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-align: center;
}

.case-study-cta h3 { font-size: 1.2rem; margin-bottom: 8px; }
.case-study-cta p { color: var(--color-text-light); margin-bottom: 16px; }
.case-study-cta .btn { margin: 0 4px; }

/* Hero teaser on the product page that links into a case study */
.case-tease {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 900px;
  margin: 32px auto 8px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px;
  background: var(--color-bg);
}
.case-tease figure { margin: 0; }
.case-tease figure img { display: block; width: 100%; border-radius: 6px; }
.case-tease figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 4px;
}
.case-tease-link {
  display: block;
  text-align: center;
  margin: 16px auto 32px;
  font-weight: 600;
}

/* Footer ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 24px;
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.footer a { color: var(--color-text-light); }
.footer a:hover { color: var(--color-accent); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1.05rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .nav-links { gap: 16px; }
  .product-grid { grid-template-columns: 1fr; }
  .about-section h1 { font-size: 1.8rem; }
  .image-grid { grid-template-columns: 1fr; }
  .case-tease { grid-template-columns: 1fr; }
  .case-study h1 { font-size: 1.7rem; }
  .case-study-headline .stat-value { font-size: 1.4rem; }
}
