/* ============================================================
   TitanStack Labs — shared styles
   Palette: near-black base, cyan cube accent, off-white ink
   ============================================================ */

:root {
  --bg:        #05080b;
  --bg-elev:   #0d1219;
  --ink:       #eef1f5;
  --ink-dim:   #8b94a1;
  --line:      rgba(255, 255, 255, 0.08);
  --accent:     #34c5ec;
  --accent-dim: #176f9c;
  --maxw:      1080px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* subtle ambient glow behind the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% -5%, rgba(50, 210, 239, 0.10), transparent 70%),
    radial-gradient(50% 40% at -5% 30%, rgba(50, 210, 239, 0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

a { color: inherit; }

/* ---------- nav ---------- */
.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}
.brand .mark {
  display: block;
  height: 30px;
  width: auto;
}
.brand .ti { color: var(--accent); }

.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 64px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
h1 .alt { color: var(--accent); }
.lede {
  font-size: 1.15rem;
  color: var(--ink-dim);
  max-width: 30ch;
  margin-bottom: 36px;
}
.meta {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  border-top: 1px solid var(--line);
  padding-top: 22px;
  max-width: 28ch;
}
.meta span { display: block; }
.meta .k { color: var(--ink); letter-spacing: 0.02em; }

/* ---------- the stack (signature) ---------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.layer {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1),
              border-color 0.3s ease;
}
.layer::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(var(--accent), var(--accent-dim));
}
.layer:hover { transform: translateX(8px); border-color: rgba(50, 210, 239, 0.4); }
.layer .idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.layer h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 4px 0 4px;
}
.layer p { font-size: 0.92rem; color: var(--ink-dim); line-height: 1.45; }

/* ---------- footer ---------- */
.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.foot .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
.foot a { color: var(--ink-dim); text-decoration: none; transition: color 0.18s ease; }
.foot a:hover { color: var(--accent); }

/* ---------- legal page ---------- */
.legal {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 56px 0 80px;
}
.legal .wrap { max-width: 760px; }
.legal h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 8px;
}
.legal .updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  margin-bottom: 40px;
}
.legal h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 38px 0 12px;
  letter-spacing: -0.01em;
}
.legal p, .legal li { color: var(--ink-dim); font-size: 1rem; }
.legal p { margin-bottom: 14px; }
.legal ul { margin: 0 0 14px 22px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent); }
.placeholder {
  background: rgba(50, 210, 239, 0.08);
  border: 1px dashed rgba(50, 210, 239, 0.4);
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- focus + motion ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding: 36px 0 60px; }
  .lede { max-width: none; }
  .meta { max-width: none; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 20px; }
  .nav { padding: 20px 0; }
  .brand { font-size: 0.98rem; }
  .nav-links { gap: 18px; }
  .nav-links a[href="#stack"] { display: none; } /* content is right below; keep nav clean */
  body { font-size: 16px; }
}
