/* ============================================================
   Salvara — site styles
   Austere frame, warm voice. Cold near-black structure, warm bone
   ink, one terracotta accent held with discipline. Re-skin by
   editing the tokens below.
   ============================================================ */

:root {
  /* Palette — cold frame, warm light */
  --bg:           #0b0c0e;   /* near-black frame */
  --bg-elev:      #131418;
  --bg-band:      #0f1013;
  --line:         #23252b;   /* hairline rules */
  --text:         #ece7dc;   /* warm bone — the warm light inside the cold frame */
  --text-muted:   #a6a29a;
  --text-dim:     #736f68;

  /* Single accent — terracotta. Change this one value to re-skin. */
  --accent:       #c16a4e;
  --accent-hover: #cf7a5e;
  --accent-soft:  rgba(193, 106, 78, 0.14);
  --accent-line:  rgba(193, 106, 78, 0.35);

  /* Type — structural sans for the frame, mono for the instrument accent */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", "SF Mono",
               Menlo, Consolas, "Liberation Mono", monospace;

  /* Rhythm */
  --container: 1080px;
  --measure:   62ch;
  --pad-x: clamp(1.25rem, 5vw, 3rem);
  --radius: 8px;
  --section-y: clamp(4rem, 9vw, 7rem);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad-x); }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--bg); padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0; font-weight: 600; z-index: 100;
}
.skip-link:focus { left: 0; }

:where(a, button).btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 12, 14, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem 1.5rem; min-height: 64px; flex-wrap: wrap; padding-block: 0.6rem;
}
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: 1.1rem; letter-spacing: 0.04em; }
.wordmark-mark { width: 1.45em; height: 1.45em; flex: none; display: block; }
.nav-links { display: flex; align-items: center; gap: clamp(0.85rem, 2.2vw, 1.7rem); list-style: none; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--font-mono);
  color: var(--text-muted); font-size: 0.82rem; letter-spacing: 0.02em;
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--line);
  padding: 0.4rem 0.85rem; border-radius: var(--radius);
}
.nav-cta:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.nav-cta[aria-current="page"] { border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem; font-weight: 600; line-height: 1;
  padding: 0.8rem 1.3rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-1px); }

/* ---------- Eyebrows / labels (the instrument accent) ---------- */
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.72rem; font-weight: 500; color: var(--text-dim);
  margin-bottom: 1.3rem;
}
.eyebrow.is-accent { color: var(--accent); }

/* ---------- Hero (home) ---------- */
.hero {
  padding-top: clamp(3.5rem, 11vw, 7rem);
  padding-bottom: var(--section-y);
}
.hero-title {
  font-size: clamp(2.3rem, 6vw, 4.1rem);
  letter-spacing: -0.03em; line-height: 1.05;
  max-width: 19ch;
}
.hero-lede {
  max-width: 48ch;
  font-size: clamp(1.1rem, 2.2vw, 1.32rem);
  line-height: 1.5; color: var(--text-muted);
  margin-top: 1.7rem;
}
.hero-founder { margin-top: 1.6rem; color: var(--text-dim); font-size: 0.95rem; }
.founder-name { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }

/* ---------- Inner page intro ---------- */
.page-intro {
  padding-top: clamp(3rem, 8vw, 5.5rem);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}
.page-title {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  letter-spacing: -0.03em; line-height: 1.12;
  max-width: 24ch;
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.section.is-flush { border-top: 0; padding-top: 0; }
.section-head { max-width: 48ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-label {
  font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.72rem; color: var(--text-dim); margin-bottom: 1rem;
}
.section-head h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.section-sub { margin-top: 1rem; color: var(--text-muted); font-size: 1.05rem; max-width: 56ch; }

/* ---------- Numbered sequence (hairline rows, not cards) ---------- */
.sequence { list-style: none; }
.seq-item {
  display: grid; grid-template-columns: 3.25rem 1fr; gap: 1.4rem;
  padding-block: clamp(1.5rem, 3.2vw, 2.2rem);
  border-top: 1px solid var(--line);
}
.seq-item:last-child { border-bottom: 1px solid var(--line); }
.seq-index {
  font-family: var(--font-mono); color: var(--accent);
  font-size: 0.85rem; letter-spacing: 0.06em; padding-top: 0.35rem;
}
.seq-main h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
.seq-main p { margin-top: 0.7rem; color: var(--text-muted); max-width: 60ch; }
.seq-main p + p { margin-top: 0.8rem; }

/* ---------- Single hairline link rows (companies seed, teaser) ---------- */
.linkrow {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem;
  align-items: baseline; justify-content: space-between;
  padding-block: 1.6rem; border-top: 1px solid var(--line);
}
.linkrow:last-child { border-bottom: 1px solid var(--line); }
.linkrow p { color: var(--text-muted); max-width: 60ch; }
.row-link {
  font-family: var(--font-mono);
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); white-space: nowrap;
}
.row-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Companies index (dormant until first launch) ---------- */
.empty-state { color: var(--text-muted); max-width: 54ch; font-size: 1.1rem; line-height: 1.55; }
.company-list { list-style: none; margin-top: clamp(2rem, 5vw, 3rem); }
.company-row {
  display: grid; grid-template-columns: 1fr auto;
  gap: 0.3rem 1.5rem; align-items: baseline;
  padding-block: 1.5rem; border-top: 1px solid var(--line);
}
.company-row:last-child { border-bottom: 1px solid var(--line); }
.company-name { font-size: 1.15rem; font-weight: 600; }
.company-desc { grid-column: 1; color: var(--text-muted); font-size: 0.98rem; margin-top: 0.2rem; }
.status {
  font-family: var(--font-mono);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-dim);
}

/* ---------- Streams (consulting) ---------- */
.streams { list-style: none; }
.stream {
  padding-block: clamp(1.9rem, 4vw, 2.7rem);
  border-top: 1px solid var(--line);
}
.stream:last-child { border-bottom: 1px solid var(--line); }
.stream-label {
  font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 0.74rem; font-weight: 600; color: var(--accent); margin-bottom: 0.9rem;
}
.stream p { color: var(--text-muted); max-width: 64ch; }
.stream p + p { margin-top: 0.85rem; }
.stream .credibility { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Prose (about — the page that breathes) ---------- */
.prose { max-width: var(--measure); }
.prose p { margin-top: 1.5rem; font-size: 1.1rem; line-height: 1.8; color: var(--text); }
.prose p:first-child { margin-top: 0; }
.prose .lead { font-size: 1.28rem; line-height: 1.6; }
.prose a, .text-link {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 2px; text-decoration-thickness: 1px;
}

/* ---------- Closing CTA ---------- */
.cta { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.cta h2 { font-size: clamp(2rem, 5vw, 3rem); }
.cta p { margin-top: 1rem; color: var(--text-muted); max-width: 50ch; }
.cta .btn { margin-top: 1.8rem; }
.contact-email {
  font-family: var(--font-mono);
  display: inline-block; margin-top: 1.6rem;
  font-size: clamp(1rem, 2.4vw, 1.25rem); letter-spacing: 0.01em;
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.contact-email:hover { color: var(--accent-hover); }

/* ---------- Footer (slim, global) ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.4rem; background: var(--bg); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem;
  align-items: center; justify-content: space-between;
}
.footer-legal, .footer-email {
  font-family: var(--font-mono);
  font-size: 0.76rem; letter-spacing: 0.04em;
}
.footer-legal { color: var(--text-dim); }
.footer-email { color: var(--text-muted); }
.footer-email:hover { color: var(--text); }

/* ---------- About: release a little more air ---------- */
body.page-about .page-intro { padding-top: clamp(4rem, 10vw, 7rem); }
body.page-about .prose { padding-bottom: clamp(1rem, 3vw, 2rem); }
