/* kuzys.com — editorial warm */
/* palette: cream paper / ink / ochre + small structural greys */

:root {
  --bg:        #f7f3ec;
  --paper:     #fdfbf6;
  --ink:       #2a2520;
  --muted:     #6b625a;
  --muted-2:   #8a8079;
  --line:      #e5dccd;
  --line-soft: #efe7d6;
  --accent:    #b67a4d;   /* ochre — primary brand accent */
  --accent-2:  #2a4a5e;   /* deep petrolio — micro detail (code, etc.) */
  --code-bg:   #efe7d4;
  --shadow-sm: 0 4px 12px -8px rgba(42,37,32,0.12);
  --shadow-md: 0 12px 28px -16px rgba(42,37,32,0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }

/* ============ Layout primitives ============ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}
.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ============ Header / nav ============ */
header.site {
  padding: 32px 0 24px;
  position: relative;
}
header.site .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-mark {
  color: var(--accent);
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

nav.primary ul {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
}
nav.primary a {
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
nav.primary a:hover {
  color: var(--accent);
  text-decoration: none;
}
nav.primary a.current {
  color: var(--accent);
}
nav.primary a.current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Dropdown for tools */
nav.primary li.has-dropdown { position: relative; }
nav.primary .dropdown-trigger::after {
  content: " ↓";
  font-size: 11px;
  margin-left: 4px;
  opacity: 0.6;
  vertical-align: 1px;
}
nav.primary .dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: -16px;
  min-width: 240px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 0;
  list-style: none;
  margin: 0;
  display: block;     /* override flex from parent nav ul */
  gap: 0;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 50;
}
nav.primary li.has-dropdown:hover .dropdown,
nav.primary li.has-dropdown:focus-within .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
nav.primary .dropdown li { display: block; }
nav.primary .dropdown a {
  display: block;
  padding: 9px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
nav.primary .dropdown a:hover {
  background: var(--bg);
  color: var(--accent);
}
nav.primary .dropdown a .desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn-accent { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.btn-accent:hover { background: #9a6539; border-color: #9a6539; text-decoration: none; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

.cta-row { display: flex; gap: 18px; flex-wrap: wrap; }

/* ============ Hero ============ */
section.hero { padding: 120px 0 96px; }
section.hero.lg { padding: 160px 0 120px; }
h1.hero-title {
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 32px;
  max-width: 16ch;
}
h1.hero-title em { font-style: normal; color: var(--accent); }
.hero-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0 0 24px;
  text-transform: lowercase;
}
p.hero-sub {
  font-size: 22px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 44px;
  max-width: 58ch;
  font-weight: 400;
}

/* ============ Section blocks ============ */
section.block { padding: 110px 0; }
section.block + section.block { border-top: 1px solid var(--line); }
section.block.tight { padding: 80px 0; }

h2.section-title {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 18px;
}

h2.section-lead {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 56px;
  max-width: 26ch;
}
h2.section-lead.wide { max-width: 38ch; }

p.section-intro {
  font-size: 19px;
  color: var(--muted);
  max-width: 60ch;
  margin: -32px 0 56px;
  line-height: 1.55;
}

/* ============ Tool cards (grid) ============ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tool-card {
  background: var(--paper);
  border-radius: 14px;
  padding: 36px 32px 32px;
  border: 1px solid var(--line);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.tool-card a.full-link {
  color: inherit;
  text-decoration: none;
  display: contents;
}
.tool-mark { width: 36px; height: 36px; color: var(--accent); margin-bottom: 24px; }
.tool-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.tool-desc {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.55;
  flex-grow: 1;
}
.tool-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
.tool-link::after { content: " →"; }

/* Secondary tools (smaller, 4-up grid) */
.tools-mini {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.tool-mini {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
  transition: border-color 0.15s;
}
.tool-mini:hover { border-color: var(--accent); }
.tool-mini-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--ink);
}
.tool-mini-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ============ Code block ============ */
.code-frame {
  background: var(--code-bg);
  border-radius: 12px;
  padding: 28px 32px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: auto;
  margin: 0 0 24px;
}
.code-frame.tight { padding: 18px 22px; font-size: 13.5px; }
.code-frame .prompt { color: var(--accent); user-select: none; font-weight: 500; }
.code-frame .cmd { color: var(--ink); font-weight: 500; }
.code-frame .flag { color: var(--accent-2); }
.code-frame .str { color: #7a5b34; }
.code-frame .key { color: var(--accent-2); }
.code-frame .num { color: #7a5b34; }
.code-frame .comment { color: var(--muted); font-style: italic; }
.code-frame .out { color: var(--muted-2); }

/* ============ Long-form prose (papers/about) ============ */
.prose {
  font-size: 18px;
  line-height: 1.7;
}
.prose h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
}
.prose h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 36px 0 10px;
}
.prose p { margin: 0 0 18px; max-width: 64ch; }
.prose ul { margin: 0 0 18px; padding-left: 22px; max-width: 64ch; }
.prose li { margin: 6px 0; }
.prose strong { font-weight: 700; }
.prose code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.92em;
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink);
}

/* ============ Paper list ============ */
.paper-list { display: flex; flex-direction: column; gap: 28px; }
.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px;
}
.paper-status {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 10px;
}
.paper-status.draft { color: var(--muted); }
.paper-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
  line-height: 1.25;
}
.paper-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 14px;
}
.paper-abstract {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.6;
  max-width: 70ch;
}
.paper-links { display: flex; gap: 14px; font-size: 14px; }
.paper-links a { font-weight: 500; }

/* ============ Consulting section (dark chapter-break) ============ */
section.consulting {
  background: var(--ink);
  color: var(--paper);
  padding: 130px 0;
}
section.consulting .container { color: var(--paper); }
.consulting h2.section-title { color: var(--accent); }
.consulting-lead {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 20ch;
  margin: 0 0 28px;
}
.consulting-body {
  font-size: 19px;
  color: #c9c2b8;
  max-width: 58ch;
  margin: 0 0 36px;
  line-height: 1.55;
}

/* ============ Footer ============ */
footer.site {
  padding: 56px 0 64px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
footer.site .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
footer.site h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  font-weight: 700;
  margin: 0 0 14px;
}
footer.site ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
footer.site li { margin: 6px 0; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent); text-decoration: none; }
footer.site .colophon {
  grid-column: 1 / -1;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted-2);
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .tools-grid { grid-template-columns: 1fr; }
  footer.site .container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .container, .container-narrow { padding: 0 24px; }
  nav.primary ul { gap: 18px; font-size: 14px; }
  nav.primary .dropdown { display: none; }
  section.hero { padding: 72px 0 56px; }
  section.hero.lg { padding: 88px 0 72px; }
  section.block { padding: 72px 0; }
  section.consulting { padding: 80px 0; }
  .tools-mini { grid-template-columns: 1fr; }
  footer.site .container { grid-template-columns: 1fr; }
  h1.hero-title { font-size: clamp(36px, 9vw, 56px); }
}
