/* ============================================================
   TeideDB Organization — teidedb.com
   Brand: #4b6777 (steel blue-gray), Oswald headings, Inter body
   ============================================================ */

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

:root {
  --primary: #4b6777;
  --primary-light: #6b8a9e;
  --primary-lighter: #8ba8b8;
  --primary-pale: #dce8ee;
  --primary-bg: #edf3f6;
  --primary-dark: #3a5261;
  --primary-darker: #2a3e4b;
  --cream: #f7f5f2;
  --cream-dark: #eceae6;
  --navy: #0e1b24;
  --navy-light: #162a36;
  --gray-text: #6b7f8e;
  --text: #1c2d38;
  --text-light: #3a5261;
  --white: #ffffff;
  --border: #e2e8ed;
  --border-light: #eef2f5;
  --surface: #ffffff;
  --surface-alt: #f9fafb;
  --max-w: 1200px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Oswald', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background: var(--white);
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }

code {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--primary-pale);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 4px;
}
.code-block code,
.code-block code span,
.getstarted-block code,
.getstarted-block code span {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}
.code-block code,
.getstarted-block code {
  color: inherit;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ── Nav — Floating pill ─────────────────────── */
.nav {
  position: fixed;
  top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(75,103,119,.1);
  border-radius: 100px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0 8px;
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
  transition: box-shadow .3s;
}
.nav.nav-scrolled { box-shadow: 0 4px 30px rgba(0,0,0,.1); }
.nav .container {
  display: flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 16px; max-width: none;
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); font-family: var(--font-heading);
  font-size: 1.2rem; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase;
  margin-right: 16px; text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 28px; height: 28px; }
.nav-links {
  display: flex; align-items: center; gap: 4px; list-style: none;
}
.nav-links a {
  color: var(--gray-text); font-size: .875rem; font-weight: 500;
  padding: 6px 14px; border-radius: 100px; white-space: nowrap;
  transition: color .2s, background .2s; text-decoration: none;
}
.nav-links a:hover {
  color: var(--text); background: rgba(75,103,119,.06);
  text-decoration: none;
}
.nav-links a.active { color: var(--text); background: rgba(75,103,119,.08); }
.nav-github {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text) !important;
  background: var(--primary-pale); padding: 6px 16px;
  border-radius: 100px; font-size: .85rem; font-weight: 600;
  transition: background .2s; margin-left: 8px;
}
.nav-github:hover { background: var(--primary-lighter); color: var(--white) !important; text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: var(--text);
  margin: 4px 0; border-radius: 2px; transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

/* ── Hero ────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  background: var(--cream); overflow: hidden;
  padding: 140px 0 120px;
}
.hero-decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-decor .stripe {
  position: absolute; background: rgba(75,103,119,.04);
  border-radius: 100px; transform: rotate(-12deg);
}
.stripe-1 { width: 600px; height: 80px; top: 10%; right: -100px; }
.stripe-2 { width: 400px; height: 60px; top: 30%; right: 5%; }
.stripe-3 { width: 500px; height: 70px; bottom: 25%; left: -80px; }
.stripe-4 { width: 300px; height: 50px; bottom: 10%; right: 15%; }

.hero-mountain {
  position: absolute; right: -40px; bottom: 0;
  width: 700px; opacity: .06; pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 700px; }
.hero h1 {
  font-family: var(--font-heading);
  font-size: 4.5rem; font-weight: 700;
  line-height: 1.08; color: var(--text);
  margin-bottom: 24px; letter-spacing: -.01em;
}
.hero h1 .accent {
  color: var(--primary); position: relative; display: inline-block;
}
.hero h1 .accent::after {
  content: ''; position: absolute; bottom: 2px; left: 0; right: 0;
  height: 6px; background: var(--primary-pale); border-radius: 4px; z-index: -1;
}
.hero-chips { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 5px 14px; border-radius: 100px;
  font-size: .82rem; font-weight: 600; color: var(--primary-dark);
  background: var(--primary-pale); letter-spacing: .01em;
}
.hero-subtitle {
  font-size: 1.15rem; color: var(--gray-text);
  max-width: 620px; line-height: 1.7; margin-bottom: 36px;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 100px;
  font-size: .95rem; font-weight: 600;
  transition: all .2s ease; border: none; cursor: pointer; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--primary); color: var(--white);
  box-shadow: 0 2px 12px rgba(75,103,119,.25);
}
.btn-primary:hover {
  background: var(--primary-dark); color: var(--white);
  box-shadow: 0 4px 20px rgba(75,103,119,.35); transform: translateY(-1px);
}
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--primary-pale);
}
.btn-outline:hover { background: var(--primary-pale); border-color: var(--primary-lighter); }
.btn-sm { padding: 8px 20px; font-size: .85rem; }
.btn-ghost {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--primary-bg); border-color: var(--primary-pale); color: var(--primary-dark); }

/* ── Section Label ───────────────────────────── */
.section-label {
  font-family: var(--font-heading); font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--gray-text); margin-bottom: 48px;
}

/* ── Features ────────────────────────────────── */
.features-section { padding: 80px 0 100px; background: var(--cream); }
.features-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 36px;
}
.feature-item {
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease, box-shadow .3s ease;
  background: var(--white); border: 1px solid rgba(75,103,119,.08);
  border-radius: 16px; padding: 32px;
}
.feature-item:hover { box-shadow: 0 8px 30px rgba(75,103,119,.1); transform: translateY(-4px); }
.feature-item.visible { opacity: 1; transform: translateY(0); }
.feature-item.visible:hover { transform: translateY(-4px); }
.feature-number {
  font-family: var(--font-heading); font-size: .8rem; font-weight: 500;
  color: var(--primary-lighter); margin-bottom: 16px; letter-spacing: .04em;
}
.feature-icon {
  width: 56px; height: 56px; margin-bottom: 20px;
  color: var(--primary); background: var(--primary-pale);
  border-radius: 14px; display: flex; align-items: center;
  justify-content: center; padding: 12px;
}
.feature-icon svg { width: 100%; height: 100%; }
.feature-item h3 {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 600;
  color: var(--text); margin-bottom: 12px;
}
.feature-item p { color: var(--gray-text); font-size: .95rem; line-height: 1.7; }

/* ── Projects ────────────────────────────────── */
.projects-section { padding: 80px 0 100px; }
.projects-section .section-title {
  font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700;
  margin-bottom: 8px; color: var(--text);
}
.projects-section .section-subtitle {
  color: var(--gray-text); margin-bottom: 48px; font-size: 1.05rem;
}
.projects-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 24px;
}
.project-card {
  background: var(--white); border: 1px solid rgba(75,103,119,.08);
  border-radius: 16px; padding: 28px;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease, box-shadow .3s ease;
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover { box-shadow: 0 8px 30px rgba(75,103,119,.1); transform: translateY(-3px); }
.project-card.visible:hover { transform: translateY(-3px); }
.project-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.project-header h3 { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 600; color: var(--text); }
.project-badge {
  font-size: .65rem; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 100px; font-weight: 700;
}
.badge-c { background: var(--primary-pale); color: var(--primary-dark); }
.badge-rust { background: #fde8d0; color: #9a3412; }
.badge-python { background: #dcfce7; color: #166534; }
.badge-react { background: #ede9fe; color: #5b21b6; }
.badge-bench { background: #fef3c7; color: #92400e; }
.project-card p { color: var(--gray-text); font-size: .93rem; line-height: 1.65; flex: 1; margin-bottom: 16px; }
.project-card .btn { align-self: flex-start; }

/* ── Benchmarks ──────────────────────────────── */
.bench-section { padding: 80px 0 100px; background: var(--cream); }
.bench-section .section-title {
  font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700;
  margin-bottom: 8px; color: var(--text);
}
.bench-section .section-subtitle {
  color: var(--gray-text); margin-bottom: 48px; font-size: 1.05rem; max-width: 640px;
}
.bench-highlights {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 32px;
}
.bench-stat {
  background: var(--white); border: 1px solid rgba(75,103,119,.08);
  border-radius: 16px; padding: 24px; text-align: center;
  transition: box-shadow .3s ease, transform .3s ease;
}
.bench-stat:hover { box-shadow: 0 8px 30px rgba(75,103,119,.1); transform: translateY(-2px); }
.bench-value {
  font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700;
  color: var(--primary); line-height: 1; letter-spacing: -.02em;
}
.bench-label { font-size: .82rem; color: var(--gray-text); margin-top: 6px; }

.bench-table-wrap {
  background: var(--white); border: 1px solid rgba(75,103,119,.08);
  border-radius: 16px; overflow: hidden;
}
.bench-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.bench-table th {
  text-align: left; padding: 12px 16px;
  background: var(--surface-alt); font-weight: 600;
  color: var(--primary-dark); border-bottom: 1px solid var(--border);
  font-family: var(--font-heading); font-size: .75rem;
  text-transform: uppercase; letter-spacing: .06em;
}
.bench-table td {
  padding: 10px 16px; border-bottom: 1px solid var(--border-light);
  color: var(--gray-text);
}
.bench-table tr:last-child td { border-bottom: none; }
.bench-table tr:hover td { background: var(--primary-bg); }
.bench-table .mono { font-family: var(--mono); font-size: .8rem; }
.bench-table .fastest { font-weight: 700; color: var(--primary); }
.bench-table .speedup { font-weight: 700; color: var(--primary); }
.bench-note { font-size: .8rem; color: var(--gray-text); margin-top: 16px; font-style: italic; }

/* ── Code Example ────────────────────────────── */
.code-section { padding: 100px 0; }
.code-section .section-label { text-align: center; }
.code-section-title {
  font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700;
  text-align: center; margin-bottom: 8px; color: var(--text);
}
.code-section-subtitle {
  text-align: center; color: var(--gray-text); margin-bottom: 48px; font-size: 1.05rem;
}
.code-block {
  background: var(--navy); border-radius: 16px;
  overflow: hidden; max-width: 800px; margin: 0 auto;
  box-shadow: 0 24px 80px rgba(14,27,36,.12);
  position: relative;
}
.code-header {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 20px; background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.code-dot { width: 11px; height: 11px; border-radius: 50%; }
.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #eab308; }
.code-dot.green { background: #22c55e; }
.code-filename {
  margin-left: 12px; font-size: .8rem; color: rgba(255,255,255,.3);
  font-family: var(--mono);
}
.code-block pre {
  padding: 24px; overflow-x: auto; font-family: var(--mono);
  font-size: .875rem; line-height: 1.75; color: #e2e8f0;
}
.copy-btn {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.4); padding: 6px 10px; border-radius: 8px;
  font-size: .75rem; font-family: var(--mono); cursor: pointer;
  transition: all .2s; z-index: 5; display: flex; align-items: center; gap: 5px;
}
.copy-btn:hover { background: rgba(255,255,255,.14); color: rgba(255,255,255,.7); }
.copy-btn.copied { color: #4ade80; border-color: rgba(74,222,128,.3); }
.kw { color: #c084fc; }
.fn { color: #60a5fa; }
.str { color: #4ade80; }
.cmt { color: #5a657a; }
.cmd { color: #60a5fa; }
.op { color: #c084fc; }
.num { color: #f59e0b; }

/* ── Get Started ─────────────────────────────── */
.getstarted-section { padding: 80px 0 100px; background: var(--cream); }
.getstarted-section .section-label { text-align: center; }
.getstarted-title {
  font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700;
  text-align: center; margin-bottom: 8px; color: var(--text);
}
.getstarted-subtitle {
  text-align: center; color: var(--gray-text); margin-bottom: 48px; font-size: 1.05rem;
}
.getstarted-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  max-width: 900px; margin: 0 auto;
}
.getstarted-block {
  background: var(--white); border-radius: 16px; padding: 32px;
  border: 1px solid rgba(75,103,119,.08);
  transition: box-shadow .3s ease, transform .3s ease;
}
.getstarted-block:hover { box-shadow: 0 8px 30px rgba(75,103,119,.1); transform: translateY(-3px); }
.getstarted-block h3 {
  font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600;
  margin-bottom: 16px; color: var(--text); text-transform: uppercase; letter-spacing: .02em;
}
.getstarted-block pre {
  background: var(--navy); color: #cbd5e1; padding: 20px;
  border-radius: 12px; font-family: var(--mono); font-size: .82rem;
  line-height: 1.7; overflow-x: auto;
}
.getstarted-block p {
  color: var(--gray-text); font-size: .9rem; margin-top: 16px; line-height: 1.6;
}
.getstarted-block p a { color: var(--primary); font-weight: 500; }
.getstarted-block p a:hover { text-decoration: underline; }

/* ── Footer ──────────────────────────────────── */
.footer {
  padding: 48px 0; text-align: center; font-size: .875rem;
  color: var(--gray-text); border-top: 1px solid rgba(75,103,119,.08);
}
.footer a { color: var(--text-light); transition: color .2s; }
.footer a:hover { color: var(--primary); }
.footer-links {
  display: flex; gap: 28px; justify-content: center; margin-bottom: 12px;
}

/* ── Scroll-to-top ───────────────────────────── */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(75,103,119,.3);
  opacity: 0; transform: translateY(12px);
  transition: opacity .3s, transform .3s, background .2s;
  pointer-events: none; z-index: 999;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-2px); }
.scroll-top svg { width: 20px; height: 20px; }

/* ── Animations ──────────────────────────────── */
.fade-in-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2,1fr); gap: 32px; }
  .hero h1 { font-size: 3.5rem; }
  .bench-highlights { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nav { top: 8px; left: 8px; right: 8px; transform: none; border-radius: 16px; padding: 0; }
  .nav .container { padding: 0 12px; justify-content: space-between; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: rgba(255,255,255,.98); backdrop-filter: blur(20px);
    flex-direction: column; padding: 16px; gap: 4px;
    border-radius: 0 0 16px 16px;
    border-top: 1px solid rgba(75,103,119,.08);
    box-shadow: 0 12px 40px rgba(0,0,0,.08);
  }
  .nav-links.open { display: flex; }
  .hero { min-height: auto; padding: 120px 0 80px; }
  .hero h1 { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1rem; }
  .features-grid { grid-template-columns: 1fr; gap: 40px; }
  .projects-grid { grid-template-columns: 1fr; }
  .getstarted-grid { grid-template-columns: 1fr; }
  .bench-highlights { grid-template-columns: 1fr 1fr; }
  .code-block pre { font-size: .8rem; padding: 18px; }
  .code-section-title, .getstarted-title,
  .bench-section .section-title, .projects-section .section-title { font-size: 2rem; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .container { padding: 0 16px; }
  .bench-highlights { grid-template-columns: 1fr; }
}

/* ── Utilities ───────────────────────────────── */
::selection { background: rgba(75,103,119,.15); color: inherit; }
:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in-up, .feature-item, .project-card { opacity: 1; transform: none; transition: none; }
}
