/* CTOLogix — editorial, technical, blog-first */
:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #161616;
  --bg-paper: #fafaf7;
  --bg-paper-2: #f1f0ea;
  --ink: #f5f5f4;
  --ink-dim: #a8a29e;
  --ink-muted: #78716c;
  --paper-ink: #1c1917;
  --paper-ink-dim: #44403c;
  --paper-ink-muted: #78716c;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --paper-line: rgba(28, 25, 23, 0.10);
  --paper-line-strong: rgba(28, 25, 23, 0.20);
  --accent: #a3e635;
  --accent-2: #84cc16;
  --accent-dim: #65a30d;
  --accent-soft: rgba(163, 230, 53, 0.10);
  --card: rgba(255, 255, 255, 0.025);
  --card-strong: rgba(255, 255, 255, 0.045);
  --maxw: 1180px;
  --maxw-narrow: 760px;
  --radius: 6px;
  --radius-lg: 10px;
  --font-display: "Source Serif 4", "Charter", "Iowan Old Style", Georgia, serif;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  width: 100%;
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; position: relative; }
.section.paper { background: var(--bg-paper); color: var(--paper-ink); }
.section.paper .section-title { color: var(--paper-ink); }
.section.paper .section-sub { color: var(--paper-ink-dim); }
.section.paper .eyebrow { color: var(--accent-dim); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.section-head { max-width: 720px; margin: 0 auto 56px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  font-weight: 600;
}
.section-sub {
  font-size: 18px;
  color: var(--ink-dim);
  margin: 0;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: var(--accent);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(163, 230, 53, 0.3), 0 6px 18px rgba(163, 230, 53, 0.25);
}
.brand-mark::after {
  content: "</>";
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--bg);
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-dim);
  border-radius: 4px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--card); }
.nav-links a.active { color: var(--ink); }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  width: 40px; height: 38px;
  color: var(--ink);
  align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: ""; display: block;
  width: 16px; height: 2px; background: var(--ink);
  border-radius: 2px; position: relative;
}
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after { position: absolute; top: 5px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent {
  background: var(--accent);
  color: #0a1a00;
  box-shadow: 0 8px 22px rgba(163, 230, 53, 0.28);
}
.btn-accent:hover { background: var(--accent-2); box-shadow: 0 10px 26px rgba(163, 230, 53, 0.36); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--card); border-color: rgba(255,255,255,0.24); }
.btn-paper {
  background: var(--paper-ink);
  color: var(--bg-paper);
}
.btn-paper:hover { background: #44403c; }
.btn-paper-ghost {
  background: transparent;
  color: var(--paper-ink);
  border-color: var(--paper-line-strong);
}
.btn-paper-ghost:hover { background: rgba(28,25,23,0.04); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* Hero */
.hero {
  position: relative;
  padding: 110px 0 100px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 400px at 80% 0%, rgba(163, 230, 53, 0.10), transparent 60%),
    radial-gradient(500px 400px at 10% 100%, rgba(163, 230, 53, 0.04), transparent 60%),
    var(--bg);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 38px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 30%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 880px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
  margin-bottom: 26px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(163, 230, 53, 0.18);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.2vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  font-weight: 600;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 em { font-style: italic; color: var(--ink-dim); font-weight: 500; }
.hero-sub {
  font-size: 19px;
  color: var(--ink-dim);
  margin: 0 0 32px;
  max-width: 620px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 720px;
}
@media (max-width: 700px) { .hero-meta { grid-template-columns: 1fr; } }
.hero-meta div .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.hero-meta div .value {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}

/* Services grid */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.cell {
  background: var(--bg);
  padding: 32px;
  transition: background .2s;
}
.cell:hover { background: var(--bg-2); }
.cell .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cell h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.cell p { margin: 0; color: var(--ink-dim); font-size: 15.5px; }

.section.paper .grid { background: var(--paper-line); border-color: var(--paper-line); }
.section.paper .cell { background: var(--bg-paper); }
.section.paper .cell:hover { background: var(--bg-paper-2); }
.section.paper .cell h3 { color: var(--paper-ink); }
.section.paper .cell p { color: var(--paper-ink-dim); }
.section.paper .cell .num { color: var(--accent-dim); }

/* Cards (standalone, used for posts) */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .2s, border-color .2s, background .2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); background: var(--card-strong); }

/* Blog list */
.posts { display: flex; flex-direction: column; }
.post-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid var(--paper-line);
  transition: background .2s;
}
.section.paper .post-row:hover { background: rgba(28, 25, 23, 0.02); }
.posts .post-row:last-child { border-bottom: 1px solid var(--paper-line); }
@media (max-width: 700px) {
  .post-row { grid-template-columns: 1fr; gap: 12px; padding: 22px 0; }
}
.post-row .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-ink-muted);
  letter-spacing: 0.04em;
}
.post-row h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  color: var(--paper-ink);
  transition: color .2s;
}
.post-row:hover h3 { color: var(--accent-dim); }
.post-row p {
  margin: 0;
  color: var(--paper-ink-dim);
  font-size: 15.5px;
}
.post-row .arrow {
  color: var(--paper-ink-muted);
  transition: transform .2s, color .2s;
}
.post-row:hover .arrow { color: var(--accent-dim); transform: translateX(4px); }
@media (max-width: 700px) {
  .post-row .arrow { display: none; }
}

.category-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dim);
  font-weight: 500;
  margin-bottom: 8px;
  display: inline-block;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto 40px;
  justify-content: center;
  max-width: 800px;
}
.chip {
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--paper-line-strong);
  color: var(--paper-ink-dim);
  background: transparent;
  transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--accent-dim); color: var(--accent-dim); }
.section:not(.paper) .chip { border-color: var(--line-strong); color: var(--ink-dim); }
.section:not(.paper) .chip:hover { border-color: var(--accent); color: var(--accent); }

/* About / approach */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }
.about-grid h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.about-grid p { font-size: 17px; color: var(--ink-dim); margin: 0 0 18px; }

.principles { list-style: none; padding: 0; margin: 0; }
.principles li {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
}
.principles li:first-child { border-top: 0; padding-top: 0; }
.principles .n {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.principles h4 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.principles p { margin: 0; font-size: 15.5px; color: var(--ink-dim); }

/* Engagement options */
.engage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 900px) { .engage-grid { grid-template-columns: 1fr; } }
.engage {
  background: var(--bg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
}
.engage:hover { background: var(--bg-2); }
.engage .duration {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.engage h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.engage p { color: var(--ink-dim); font-size: 15px; margin: 0 0 18px; }
.engage ul { list-style: none; padding: 0; margin: 0 0 20px; font-size: 14.5px; color: var(--ink-dim); }
.engage ul li {
  padding: 8px 0;
  padding-left: 22px;
  position: relative;
}
.engage ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.engage .price {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-dim);
}

/* Final CTA */
.final-cta {
  padding: 100px 0;
  background: var(--bg);
  position: relative;
  border-top: 1px solid var(--line);
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(163, 230, 53, 0.10), transparent 60%);
  pointer-events: none;
}
.final-cta .container { position: relative; text-align: center; }
.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 50px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 auto 18px;
  max-width: 760px;
}
.final-cta p {
  color: var(--ink-dim);
  font-size: 17px;
  max-width: 580px;
  margin: 0 auto 30px;
}

/* Footer */
footer {
  background: #060606;
  padding: 56px 0 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .foot-grid { grid-template-columns: 1fr; } }
footer .brand { color: var(--ink); margin-bottom: 14px; }
.foot-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin: 0 0 14px;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 8px; font-size: 14px; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.family-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.family-link:hover { color: var(--ink); }

/* Page head */
.page-head {
  padding: 100px 0 60px;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(163, 230, 53, 0.10), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-weight: 600;
  line-height: 1.08;
}
.page-head p {
  max-width: 660px;
  color: var(--ink-dim);
  font-size: 18px;
  margin: 0;
}
.section.paper .page-head { background: var(--bg-paper); }

/* Article (blog post) */
article.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px;
  background: var(--bg-paper);
  color: var(--paper-ink);
}
article.post .post-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-ink-muted);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
article.post h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 22px;
}
article.post .lede {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.45;
  color: var(--paper-ink-dim);
  margin: 0 0 36px;
  font-weight: 400;
}
article.post h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 48px 0 16px;
}
article.post h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 32px 0 12px;
}
article.post p {
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--paper-ink);
  margin: 0 0 18px;
}
article.post ul, article.post ol {
  font-size: 17px;
  line-height: 1.7;
  color: var(--paper-ink);
  padding-left: 22px;
  margin: 0 0 22px;
}
article.post li { margin-bottom: 8px; }
article.post code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--bg-paper-2);
  border: 1px solid var(--paper-line);
  padding: 1px 6px;
  border-radius: 4px;
}
article.post blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--paper-ink-dim);
  font-size: 17px;
}
article.post a {
  color: var(--accent-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}
article.post a:hover { color: var(--paper-ink); }
.post-foot {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.post-foot .author {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--paper-ink-dim);
}

/* Forms */
.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 600px;
  margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); letter-spacing: 0.04em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 6px;
  font: inherit;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 130px; resize: vertical; }
.form .btn { width: 100%; justify-content: center; }

/* Mobile nav */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: rgba(10, 10, 10, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px;
    gap: 4px;
  }
  .nav.open .nav-links a { padding: 12px 14px; font-size: 15px; }
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
