/* KonstrukThor — Shared Styles */
/* Used by landing.html and docs.html */

/* ── THEME TOKENS ─────────────────────────────────────────── */
:root {
  --bg:#ffffff; --bg2:#f7f7f8; --bg3:#f0f0f2; --bg4:#e8e8ec;
  --wire:#e0e0e5; --wire2:#d0d0d8;
  --dim:#9898a8; --muted:#686880; --body:#444458; --bright:#1a1a2e;
  --red:#e8192c; --red2:#ff3347; --red3:#c0101f; --redlight:#fff1f2; --redborder:#ffd0d4;
  --green:#16a34a; --greenlight:#f0fdf4; --greenborder:#bbf7d0;
  --blue:#2563eb; --bluelight:#eff6ff; --blueborder:#bfdbfe;
 --primary:var(--red); --primary-light:var(--redlight); --primary-border:var(--redborder);
 /*  --primary:var(--blue); --primary-light:var(--bluelight); --primary-border:var(--blueborder); */
  --amber:#d97706; --amberlight:#fffbeb; --amberborder:#fde68a;
}
[data-theme="dark"] {
  --bg:#1c1c24; --bg2:#22222c; --bg3:#2a2a36; --bg4:#323240;
  --wire:#38384a; --wire2:#46465a;
  --dim:#686880; --muted:#8888a0; --body:#b8b8d0; --bright:#e8e8f8;
  --red:#ff4d5e; --red2:#ff6675; --red3:#e83040; --redlight:#2a1820; --redborder:#5a2030;
  --green:#4ade80; --greenlight:#0a2018; --greenborder:#1a5030;
  --blue:#60a5fa; --bluelight:#0a1828; --blueborder:#1e3a5a;
 --primary:var(--red); --primary-light:var(--redlight); --primary-border:var(--redborder);
 /*  --primary:var(--blue); --primary-light:var(--bluelight); --primary-border:var(--blueborder); */
  --amber:#fbbf24; --amberlight:#1c1400; --amberborder:#4a3000;
}

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--wire2); border-radius: 2px; }

/* ── TYPOGRAPHY CLASSES ───────────────────────────────────── */
h1, h2, h3, .heading { font-family: 'Manrope', sans-serif; }
.mono, code, pre, button { font-family: 'JetBrains Mono', monospace; }

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; color: var(--bright); }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--bright); }
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; color: var(--bright); }

p { color: var(--body); line-height: 1.75; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--bright); font-weight: 600; }

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 14px; display: block;
}
.text-muted { color: var(--muted); }
.text-dim   { color: var(--dim); }

/* ── LAYOUT HELPERS ───────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
section { padding: 96px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-2-span { grid-column: span 2; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 11px 24px; border-radius: 6px;
  border: none; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.18s;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(232,25,44,0.28); text-decoration: none; color:#fff; }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--wire); }
.btn-ghost:hover { border-color: var(--wire2); color: var(--bright); text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary-border); }
.btn-outline:hover { background: var(--primary-light); text-decoration: none; color: var(--primary); }

/* ── THEME TOGGLE ─────────────────────────────────────────── */
.theme-toggle {
  width: 36px; height: 36px;
  border: 1.5px solid var(--wire);
  border-radius: 8px;
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.18s;
  font-size: 0.9rem;
  color: var(--muted);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--wire2); color: var(--bright); background: var(--bg3); }

/* ── NAVIGATION ───────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 56px;
  display: flex; align-items: center;
  padding: 0 32px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--wire);
  transition: background 0.2s, border-color 0.2s;
}
[data-theme="dark"] nav { background: rgba(28,28,36,0.92); }
.nav-logo {
  font-family: 'Manrope', sans-serif; font-weight: 800;
  font-size: 1.1rem; color: var(--bright); text-decoration: none;
  letter-spacing: -0.03em;
}
.nav-logo span { color: var(--primary); }
.nav-links { display: flex; gap: 28px; list-style: none; margin-left: 40px; }
.nav-links a {
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
  text-decoration: none; transition: color 0.15s;
}
.nav-links a:hover { color: var(--bright); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  padding-top: 140px; padding-bottom: 80px;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 50% at 60% 30%, rgba(232,25,44,0.07) 0%, transparent 65%);
}
[data-theme="dark"] .hero-bg {
  background: radial-gradient(ellipse 70% 50% at 60% 30%, rgba(255,77,94,0.1) 0%, transparent 65%);
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--wire) 1px, transparent 1px),
                    linear-gradient(90deg, var(--wire) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 75%);
  opacity: 0.5;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-light); border: 1px solid var(--primary-border);
  border-radius: 100px; padding: 5px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 28px; width: fit-content;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.25;} }

h1 em { font-style: normal; color: var(--primary); }
.hero-sub {
  margin-top: 24px; max-width: 520px;
  font-size: 1rem; color: var(--muted); font-weight: 400; line-height: 1.8;
}
.hero-ctas { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 40px; margin-top: 60px;
  padding-top: 40px; border-top: 1px solid var(--wire);
}
.stat-num {
  font-family: 'Manrope', sans-serif;
  font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; color: var(--bright);
  display: block;
}
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dim); margin-top: 2px;
}
.stat-divider { width: 1px; background: var(--wire); align-self: stretch; }

/* ── TECH STRIP ───────────────────────────────────────────── */
.tech-strip {
  background: var(--bg2); border-top: 1px solid var(--wire); border-bottom: 1px solid var(--wire);
  padding: 18px 32px; display: flex; gap: 28px; align-items: center; overflow: hidden;
}
.tech-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dim); flex-shrink: 0;
}
.tech-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tech-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 500;
  color: var(--muted); background: var(--bg3);
  border: 1px solid var(--wire); border-radius: 4px; padding: 3px 10px;
  white-space: nowrap;
}

/* ── SPEED SECTION ────────────────────────────────────────── */
.speed-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  margin-top: 52px; border: 1px solid var(--wire); border-radius: 12px; overflow: hidden;
}
.speed-col { padding: 40px; background: var(--bg2); position: relative; }
.speed-col.new { background: var(--primary-light); border-left: 1px solid var(--wire); }
[data-theme="dark"] .speed-col.new { background: var(--bg3); }
.speed-col-tag {
  position: absolute; top: 20px; right: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dim);
}
.speed-col.new .speed-col-tag { color: var(--primary); }
.tl-item { display: flex; gap: 16px; margin-bottom: 18px; }
.tl-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--dim); min-width: 76px; padding-top: 1px;
}
.tl-time.fast { color: var(--green); }
.tl-wrap { flex: 1; }
.tl-name { font-size: 0.82rem; color: var(--body); margin-bottom: 5px; }
.tl-track { height: 5px; border-radius: 3px; background: var(--bg4); overflow: hidden; }
.tl-fill { height: 100%; border-radius: 3px; background: var(--wire2); }
.tl-fill.fast { background: var(--green); }
.speed-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--wire);
}
.speed-total-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim);
}
.speed-total-val { font-family: 'Manrope', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--bright); }
.speed-total-val.fast { color: var(--green); }

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--bg2); border: 1px solid var(--wire);
  border-radius: 10px; padding: 28px;
  transition: border-color 0.18s, transform 0.18s;
}
.card:hover { border-color: var(--wire2); transform: translateY(-2px); }
.card-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--primary-light); border: 1px solid var(--primary-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }

.card-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 16px; margin-top: 48px;
}
.card.wide { grid-column: span 2; }

/* ── ROI SECTION ──────────────────────────────────────────── */
.roi-section { background: var(--bg2); border-top: 1px solid var(--wire); border-bottom: 1px solid var(--wire); }
.roi-card {
  background: var(--bg); border: 1px solid var(--wire);
  border-radius: 10px; padding: 24px 28px;
  border-left: 3px solid var(--wire2);
}
.roi-card.highlight { border-left-color: var(--green); }
.roi-card-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim);
  margin-bottom: 6px;
}
.roi-card-val { font-family: 'Manrope', sans-serif; font-size: 2rem; font-weight: 800; color: var(--bright); letter-spacing: -0.04em; }
.roi-card.highlight .roi-card-val { color: var(--green); }
.roi-card-sub { font-size: 0.8rem; color: var(--dim); margin-top: 4px; }
.roi-stack { display: flex; flex-direction: column; gap: 16px; }
h2 em { font-style: normal; color: var(--primary); }

/* ── USE CASES ────────────────────────────────────────────── */
.usecase-grid {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 16px; margin-top: 48px;
}
.usecase-card {
  background: var(--bg2); border: 1px solid var(--wire); border-radius: 10px; padding: 32px;
  transition: border-color 0.18s;
}
.usecase-card:hover { border-color: var(--primary-border); }
.usecase-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-light);
  border: 1px solid var(--primary-border); border-radius: 4px; padding: 3px 10px;
  display: inline-block; margin-bottom: 16px;
}
.usecase-card h3 { margin-bottom: 10px; }
.usecase-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }
.usecase-example {
  margin-top: 16px; padding: 12px 14px;
  background: var(--bg3); border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--muted);
}
.usecase-example strong { color: var(--primary); font-weight: 500; }

/* ── PERSONAS ─────────────────────────────────────────────── */
.personas-section { background: var(--bg2); border-top: 1px solid var(--wire); border-bottom: 1px solid var(--wire); }
.persona-card {
  background: var(--bg); border: 1px solid var(--wire); border-radius: 10px; padding: 24px;
  transition: border-color 0.18s, transform 0.18s;
}
.persona-card:hover { border-color: var(--primary-border); transform: translateY(-2px); }
.persona-role { font-family: 'Manrope', sans-serif; font-size: 0.95rem; font-weight: 700; color: var(--bright); margin-bottom: 8px; }
.persona-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.65; }

/* ── PRICING ──────────────────────────────────────────────── */
.pricing-toggle {
  display: inline-flex; gap: 0; margin-top: 36px; margin-bottom: 48px;
  background: var(--bg2); border: 1px solid var(--wire); border-radius: 8px; padding: 3px;
}
.toggle-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 8px 18px; border: none; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer; transition: all 0.18s;
}
.toggle-btn.active { background: var(--primary); color: #fff; }
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.pricing-card {
  background: var(--bg2); border: 1px solid var(--wire);
  border-radius: 12px; padding: 36px; position: relative;
  transition: transform 0.18s;
}
.pricing-card:hover { transform: translateY(-3px); }
.pricing-card.featured { background: var(--primary-light); border-color: var(--primary-border); }
[data-theme="dark"] .pricing-card.featured { background: var(--bg3); }
.pricing-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 14px; border-radius: 100px; white-space: nowrap;
}
.pricing-tier {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.pricing-price {
  font-family: 'Manrope', sans-serif;
  font-size: 2.2rem; font-weight: 800; letter-spacing: -0.04em; color: var(--bright);
  margin: 16px 0 4px;
}
.pricing-period { font-size: 0.78rem; color: var(--dim); margin-bottom: 24px; }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pricing-features li {
  font-size: 0.82rem; color: var(--muted);
  display: flex; gap: 8px; align-items: flex-start;
}
.pricing-features li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }
.pricing-cta { display: block; text-align: center; margin-top: 28px; width: 100%; }
.pricing-cta.solid { background: var(--primary); color: #fff; }
.pricing-cta.solid:hover { filter: brightness(1.1); text-decoration: none; color:#fff; }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-wrap { max-width: 720px; margin: 48px auto 0; }
.faq-item { border-bottom: 1px solid var(--wire); }
.faq-q {
  width: 100%; text-align: left; padding: 20px 0;
  background: transparent; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem; font-weight: 500; color: var(--bright);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  transition: color 0.15s;
}
.faq-q:hover { color: var(--primary); }
.faq-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem; color: var(--primary); transition: transform 0.25s; flex-shrink: 0;
}
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.2s;
  font-size: 0.875rem; color: var(--muted); line-height: 1.75;
}
.faq-item.open .faq-a { max-height: 400px; padding-bottom: 20px; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ── CTA SECTION ──────────────────────────────────────────── */
.cta-section {
  text-align: center;
  background: var(--bright);
  padding: 96px 32px;
  position: relative; overflow: hidden;
}
[data-theme="dark"] .cta-section { background: var(--bg3); }
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(232,25,44,0.2) 0%, transparent 70%);
}
.cta-section h2 { color: #fff; position: relative; }
[data-theme="dark"] .cta-section h2 { color: var(--bright); }
.cta-section p { color: rgba(255,255,255,0.65); font-size: 1rem; max-width: 460px; margin: 16px auto 36px; position: relative; }
[data-theme="dark"] .cta-section p { color: var(--muted); }
.cta-btns { display: flex; gap: 12px; justify-content: center; position: relative; }
.cta-note { margin-top: 18px; font-size: 0.75rem; color: rgba(255,255,255,0.35); position: relative; }
[data-theme="dark"] .cta-note { color: var(--dim); }
.cta-section .btn-white { background: #fff; color: var(--primary); }
.cta-section .btn-white:hover { background: var(--primary-light); text-decoration: none; }
.cta-section .btn-ghost { border-color: rgba(255,255,255,0.25); color: rgba(255,255,255,0.7); }
.cta-section .btn-ghost:hover { border-color: rgba(255,255,255,0.5); color: #fff; }
[data-theme="dark"] .cta-section .btn-ghost { border-color: var(--wire); color: var(--body); }

/* ── CALLOUTS ─────────────────────────────────────────────── */
.callout {
  padding: 14px 18px; border-radius: 8px; margin: 20px 0;
  display: flex; gap: 10px; font-size: 0.82rem; line-height: 1.65;
}
.callout.info { background: var(--primary-light); border: 1px solid var(--primary-border); color: var(--primary); }
.callout.warning { background: var(--amberlight); border: 1px solid var(--amberborder); color: var(--amber); }
.callout.success { background: var(--greenlight); border: 1px solid var(--greenborder); color: var(--green); }

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  padding: 32px; border-top: 1px solid var(--wire);
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg2);
}
.footer-logo { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1rem; color: var(--bright); }
.footer-logo span { color: var(--primary); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.78rem; color: var(--dim); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--bright); }
.footer-copy { font-size: 0.72rem; color: var(--dim); }

/* ── SCROLL REVEAL ────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}
.hero-pill { animation: fadeUp 0.45s ease both; }
.hero h1   { animation: fadeUp 0.45s ease 0.08s both; }
.hero-sub  { animation: fadeUp 0.45s ease 0.16s both; }
.hero-ctas { animation: fadeUp 0.45s ease 0.22s both; }
.hero-stats{ animation: fadeUp 0.45s ease 0.3s both; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav-links { display: none; }
  nav { padding: 0 20px; }
  .container { padding: 0 20px; }
  section { padding: 64px 0; }
  .grid-2, .speed-grid, .card-grid, .usecase-grid, .pricing-grid { grid-template-columns: 1fr; }
  .card.wide, .grid-2-span { grid-column: span 1; }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  footer { flex-direction: column; gap: 16px; text-align: center; }
}
