/* ─────────────────────────────────────────────────────────────────────
   INDEX — shared marketing stylesheet
   Used by: index.html, pricing.html, features.html, about.html,
            manifesto.html, docs.html
   Brand tokens & motifs per DOCUMENTS/STUDIO_BRIEF.md §2.
   ───────────────────────────────────────────────────────────────────── */

:root {
  --teal:       #6C86B5;
  --teal-dim:   #4d6495;
  --teal-hi:    #8aa0c0;
  --bg:         #0f0f0f;
  --surface:    #141414;
  --surface2:   #1a1a1a;
  --surface3:   #1f1f1f;
  --border:     #232323;
  --border2:    #2e2e2e;
  --text:       #e0e0e0;
  --text-mid:   #888;
  --text-dim:   #444;
  --text-mute:  #2a2a2a;
  --ok:         #7aad6c;
  --err:        #c0635a;
  --warn:       #c0935a;

  --font-sans:  'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --radius-0:   0;
  --radius-1:   2px;
  --radius-2:   4px;

  --topbar-h:   56px;
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--teal); }

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

button { font: inherit; cursor: pointer; }

::selection { background: rgba(108, 134, 181, 0.35); color: #fff; }

/* ── Topbar ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: rgba(15, 15, 15, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--text);
}

.topbar-logo:hover { color: var(--teal); }

.topbar-logo-img {
  height: 18px;
  width: auto;
  filter: brightness(1.05);
}

.topbar-logo-wordmark { display: inline-block; }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar-nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-mid);
  transition: color 120ms ease;
}

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

.topbar-nav a.topbar-cta {
  color: var(--teal);
  border: 1px solid var(--teal);
  padding: 7px 14px;
  letter-spacing: 1px;
}

.topbar-nav a.topbar-cta:hover {
  background: var(--teal);
  color: #0f0f0f;
}

.topbar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text-mid);
  padding: 6px 10px;
  font-size: 16px;
}

@media (max-width: 760px) {
  .topbar { padding: 0 18px; }
  .topbar-nav {
    position: absolute;
    top: var(--topbar-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 18px 14px;
    display: none;
  }
  .topbar-nav.open { display: flex; }
  .topbar-nav a {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
  .topbar-nav a:last-child { border-bottom: none; }
  .topbar-nav a.topbar-cta {
    margin-top: 8px;
    text-align: center;
  }
  .topbar-toggle { display: inline-flex; }
}

/* ── Section primitives ─────────────────────────────────────────────── */
.section {
  position: relative;
  padding: 96px 32px;
}

.section-narrow { max-width: 760px; margin: 0 auto; }
.section-medium { max-width: 1040px; margin: 0 auto; }
.section-wide   { max-width: 1280px; margin: 0 auto; }

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(28px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 22px;
}

.section-title em {
  font-style: normal;
  color: var(--teal);
}

.section-lede {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
  color: var(--text-mid);
  max-width: 60ch;
}

@media (max-width: 760px) {
  .section { padding: 64px 20px; }
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  align-items: stretch;
  padding: 0;
}

.hero-frame {
  position: relative;
  margin: 18px;
  flex: 1;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #000;
  display: flex;
  flex-direction: column;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.62);
}

.hero-media::after {
  /* gradient + noise overlay */
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15,15,15,0.45) 0%, rgba(15,15,15,0.0) 35%, rgba(15,15,15,0.85) 95%),
    linear-gradient(90deg, rgba(15,15,15,0.35) 0%, rgba(15,15,15,0.0) 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 32px 40px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: end;
}

.hero-wordmark {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(54px, 13vw, 184px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  color: var(--text);
  text-shadow: 0 4px 28px rgba(0,0,0,0.55);
}

.hero-wordmark .hero-wordmark-asterisk {
  display: inline-block;
  vertical-align: super;
  font-size: 0.3em;
  color: var(--teal);
  margin-left: 0.08em;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 360px;
  justify-self: end;
  padding-bottom: 6px;
}

.hero-lede {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(224, 224, 224, 0.82);
}

.hero-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .hero-frame { margin: 10px; }
  .hero-content {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 18px 24px;
  }
  .hero-side { max-width: 100%; justify-self: stretch; }
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 11px 18px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.btn:hover { border-color: var(--teal); color: var(--teal); }

.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #0f0f0f;
}

.btn-primary:hover {
  background: var(--teal-dim);
  border-color: var(--teal-dim);
  color: #0f0f0f;
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.08);
  color: var(--text-mid);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-color: rgba(255,255,255,0.18);
}

.btn-arrow::after {
  content: '→';
  margin-left: 4px;
  transition: transform 160ms var(--ease-out);
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* ── Cards / feature blocks ─────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  transition: border-color 140ms ease, transform 140ms ease;
}

.card:hover { border-color: var(--border2); }
.card.card-interactive { cursor: pointer; }
.card.card-interactive:hover { border-color: var(--teal); transform: translateY(-2px); }

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.card-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card-body {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.65;
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.card-list li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 6px;
}

.card-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-size: 10px;
  top: 2px;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

/* ── Stats row ──────────────────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 24px;
}

.stat-value {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 30px;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 6px;
}

/* ── Tabs ───────────────────────────────────────────────────────────── */
.tabs {
  display: inline-flex;
  border: 1px solid var(--border2);
  padding: 4px;
  background: var(--surface);
}

.tab-button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: transparent;
  border: none;
  color: var(--text-mid);
  padding: 8px 16px;
  transition: background 130ms ease, color 130ms ease;
}

.tab-button:hover { color: var(--text); }

.tab-button.active {
  background: var(--teal);
  color: #0f0f0f;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Pricing plans ──────────────────────────────────────────────────── */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

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

.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.plan-card.featured {
  border-color: var(--teal);
  background: linear-gradient(180deg, rgba(108,134,181,0.06) 0%, var(--surface) 80%);
}

.plan-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  background: var(--teal);
  color: #0f0f0f;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 4px 10px;
}

.plan-name {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-mid);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-price-amount {
  font-size: 42px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.03em;
}

.plan-price-cadence {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1.2px;
}

.plan-tagline {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.55;
  min-height: 42px;
}

.plan-cta { margin-top: auto; }
.plan-cta .btn { width: 100%; justify-content: center; }

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 0;
}

.plan-features li {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-mid);
  line-height: 1.5;
}

.plan-features li::before {
  content: '✓';
  color: var(--teal);
  flex-shrink: 0;
  font-weight: 600;
  margin-top: 1px;
}

.plan-features li.muted { color: var(--text-dim); }
.plan-features li.muted::before { content: '–'; color: var(--text-dim); }

/* ── Form fields ────────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.input, .textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color 120ms ease, background 120ms ease;
}

.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--surface2);
}

.input::placeholder, .textarea::placeholder {
  color: var(--text-dim);
}

.textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-top: 8px;
  min-height: 18px;
}

.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }

/* ── Dividers, decorations, motifs ──────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

.divider-glow {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal) 50%, transparent);
  opacity: 0.35;
  margin: 0;
}

.dot-grid-bg {
  background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}

.scanlines {
  position: relative;
}
.scanlines::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,0) 0,
    rgba(255,255,255,0) 2px,
    rgba(255,255,255,0.018) 3px,
    rgba(255,255,255,0) 4px
  );
  z-index: 0;
}

.noise {
  position: relative;
}
.noise::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.tower-svg {
  width: 100%;
  height: auto;
  color: var(--text-mute);
  opacity: 0.85;
}

/* Pixel-grid corner brackets — purely decorative */
.bracket-corners {
  position: relative;
}
.bracket-corners::before,
.bracket-corners::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--teal);
  pointer-events: none;
}
.bracket-corners::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.bracket-corners::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ── Animations ─────────────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.fade-up.delay-1 { transition-delay: 80ms; }
.fade-up.delay-2 { transition-delay: 160ms; }
.fade-up.delay-3 { transition-delay: 240ms; }
.fade-up.delay-4 { transition-delay: 320ms; }
.fade-up.delay-5 { transition-delay: 400ms; }
.fade-up.delay-6 { transition-delay: 480ms; }

.pull-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  will-change: opacity, transform;
}

.pull-word.in {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .fade-up { opacity: 1; transform: none; }
  .pull-word { opacity: 1; transform: none; }
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 64px 32px 32px;
  font-size: 13px;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 36px;
  max-width: 1280px;
  margin: 0 auto;
}

.site-footer-brand p {
  color: var(--text-mid);
  margin-top: 12px;
  max-width: 30ch;
  line-height: 1.55;
}

.site-footer-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--teal);
}

.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 14px;
}

.site-footer a {
  display: block;
  font-size: 13px;
  color: var(--text-mid);
  padding: 4px 0;
}

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

.site-footer-meta {
  max-width: 1280px;
  margin: 36px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .site-footer { padding: 48px 20px 24px; }
  .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .site-footer-meta { flex-direction: column; gap: 10px; }
}

/* ── Utility helpers ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-teal   { color: var(--teal); }
.text-mid    { color: var(--text-mid); }
.text-dim    { color: var(--text-dim); }
.mono        { font-family: var(--font-mono); letter-spacing: 1.5px; }

.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

.relative { position: relative; }

/* ── Print-safe, just in case ───────────────────────────────────────── */
@media print {
  .topbar, .site-footer, .hero-media video { display: none; }
  body { background: #fff; color: #000; }
}
