/* ============================================================================
   tulam language website — style.css
   ============================================================================ */

:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-code: #0d0d14;
  --border: #1e1e2e;
  --text: #e0e0e8;
  --text-dim: #8888a0;
  --accent: #7c6ff7;
  --accent-glow: #7c6ff740;
  --accent2: #4ecdc4;
  --accent3: #f7946b;
  --white: #ffffff;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
}

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

html { scroll-behavior: smooth; }

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

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

/* ---- Nav ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
nav .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
nav .logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}
nav .logo span { color: var(--accent); }
nav .links { display: flex; gap: 1.5rem; align-items: center; }
nav .links a {
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
nav .links a:hover { color: var(--white); text-decoration: none; }
nav .links a.gh {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  position: relative;
}
.hero h1 span { color: var(--accent); }
.hero .tagline {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: var(--white);
  margin-top: 1rem;
  max-width: 600px;
  font-weight: 600;
  line-height: 1.4;
}
.hero .tagline-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-dim);
  margin-top: 0.75rem;
  max-width: 600px;
}
.hero .cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: #6b5ce6;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--white);
  text-decoration: none;
}

/* ---- Code showcase ---- */
.hero-code {
  margin-top: 3rem;
  width: 100%;
  max-width: 680px;
  position: relative;
}
.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}
.code-block .bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.code-block .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.code-block .dot.r { background: #ff5f57; }
.code-block .dot.y { background: #febc2e; }
.code-block .dot.g { background: #28c840; }
.code-block .bar .filename {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.code-block pre {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text);
}

/* Syntax colors */
.kw { color: #c678dd; }          /* keywords */
.ty { color: #e5c07b; }          /* types */
.fn { color: #61afef; }          /* function names */
.str { color: #98c379; }         /* strings */
.num { color: #d19a66; }         /* numbers */
.op { color: #56b6c2; }          /* operators */
.cm { color: #5c6370; font-style: italic; }  /* comments */
.ct { color: #e06c75; }          /* constructors */

/* ---- Sections ---- */
section {
  padding: 5rem 2rem;
}
section .inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-title {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.section-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 3rem;
  max-width: 600px;
}

/* ---- Features grid ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.feature-card .icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- Examples section ---- */
.examples {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.example-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.example-text h3 {
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.example-text p {
  color: var(--text-dim);
  font-size: 0.95rem;
}
.example-row .code-block {
  font-size: 0.85rem;
}

/* ---- Primitives strip ---- */
.primitives {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.prim-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent2);
}

/* ---- Benchmarks ---- */
.bench-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-code);
}
.bench-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.bench-table th,
.bench-table td {
  padding: 0.7rem 1rem;
  text-align: right;
  white-space: nowrap;
}
.bench-table th:first-child,
.bench-table td:first-child {
  text-align: left;
  font-weight: 600;
}
.bench-table thead th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}
.bench-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
}
.bench-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}
.bench-table tbody td { color: var(--text-dim); }
.bench-table tbody td:first-child { color: var(--text); }
.bench-table .col-tulam {
  color: var(--accent) !important;
  font-weight: 600;
}
.bench-table .col-ratio {
  font-weight: 600;
  color: var(--text-dim);
}
.bench-table tr.bench-win {
  background: rgba(78, 205, 196, 0.06);
}
.bench-table tr.bench-win td:first-child {
  color: var(--accent2);
}
.bench-table tr.bench-win .col-tulam {
  color: var(--accent2) !important;
}
.bench-table tr.bench-win .col-ratio {
  color: var(--accent2) !important;
}
.bench-table tfoot td {
  border-top: 1px solid var(--border);
  color: var(--white) !important;
  font-weight: 700;
  padding-top: 0.75rem;
}
.bench-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.bench-win-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent2);
  flex-shrink: 0;
}

/* ---- Status ---- */
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}
.status-card h3 {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.status-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.status-list li {
  font-size: 0.9rem;
  padding-left: 1.6rem;
  position: relative;
}
.status-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.85rem;
}
.status-list li.done { color: var(--accent2); }
.status-list li.done::before { content: '\2713'; color: var(--accent2); }
.status-list li.wip { color: var(--accent3); }
.status-list li.wip::before { content: '\25CB'; color: var(--accent3); }
.status-list li.planned { color: var(--text-dim); }
.status-list li.planned::before { content: '\2014'; color: var(--text-dim); }

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

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
footer a { color: var(--accent); }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .example-row {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  nav .links { gap: 1rem; }
}
