/* CodeKab — one stylesheet, no build step, no framework.

   Design concept: "instrument panel / blueprint." CodeKab is an AI and
   automation company, so the visual language borrows from schematics and
   code rather than the warm organic look of alwaysnoticed.com (site/,
   Chalk & Fern) or a generic SaaS card kit: square-cornered panels with
   bracket corner-marks, a dot-grid ground, a navy/brass/teal duotone, and
   Chakra Petch (a squared, circuit-board-flavoured display face) paired
   with IBM Plex Sans/Mono for body and code-shaped accents.

   Every colour derives from five named hues in :root — --ink, --paper,
   --brass, --teal, --night — the same way in light and dark; dark mode
   swaps which end of the ink/paper pair is "text" and which is
   "background" and the rest of the palette recomputes automatically.
   --night stays a fixed navy in both schemes: it is the terminal/CTA
   surface that is meant to read as "dark" regardless of page theme. */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ink:   #0e1424;   /* deep navy-ink: text on light, background on dark */
  --paper: #f4f6f5;   /* pale cool paper: background on light, text on dark */
  --brass: #a8761f;   /* primary accent — solder-gold, dialled for AA on paper */
  --teal:  #146b61;   /* secondary accent — instrument teal, dialled for AA on paper */
  --night: #0e1424;   /* fixed navy — the terminal/CTA surface, same in both schemes */

  --text: var(--ink);
  --bg:   var(--paper);

  --surface:  color-mix(in oklab, var(--ink) 5%, var(--bg));
  --surface-2: color-mix(in oklab, var(--ink) 9%, var(--bg));
  --line:     color-mix(in oklab, var(--ink) 16%, var(--bg));
  --line-strong: color-mix(in oklab, var(--ink) 30%, var(--bg));

  --muted:    color-mix(in oklab, var(--ink) 62%, var(--bg));
  --faint:    color-mix(in oklab, var(--ink) 44%, var(--bg));

  --brass-tint: color-mix(in oklab, var(--brass) 14%, var(--bg));
  --teal-tint:  color-mix(in oklab, var(--teal) 14%, var(--bg));
  --on-brass: #0b0e08;
  --on-teal:  #eafffb;

  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-sm: 3px;
  --radius-md: 7px;
  --shadow-md: 0 6px 18px color-mix(in srgb, var(--ink) 16%, transparent);
  --shadow-lg: 0 18px 44px color-mix(in srgb, var(--ink) 22%, transparent);

  --gutter: clamp(18px, 4.4vw, 40px);
  --band: clamp(64px, 9vw, 108px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:   #eef1f0;
    --paper: #0a0e18;
    --brass: #e0a83e;
    --teal:  #4fc3b4;
    --on-brass: #14100a;
    --on-teal:  #06110f;
    --shadow-md: 0 6px 18px color-mix(in srgb, #000 45%, transparent);
    --shadow-lg: 0 20px 48px color-mix(in srgb, #000 55%, transparent);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(38px, 5vw, 62px); line-height: 1.04; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 3.2vw, 40px); }
h3 { font-size: clamp(21px, 2.2vw, 25px); }
h4 { font-size: 18px; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 62ch; }
a { color: var(--brass); text-decoration: none; }
a:hover { color: var(--teal); }
strong { font-weight: 600; }
code, .mono { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--brass) 30%, transparent); }

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

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

/* ---------- bracket frame — the one recurring structural device ----------
   Corner marks denote "this is one defined unit." Used on panels that are
   genuinely discrete blocks (a code sample, a service, a product, a plan);
   never applied purely as decoration. */
.frame { position: relative; }
.frame::before, .frame::after {
  content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none;
  border-color: var(--line-strong); border-style: solid; border-width: 0;
}
.frame::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.frame::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.2;
  color: var(--text);
  background: transparent; border: 1.5px solid var(--line-strong);
  padding: 12px 22px; border-radius: var(--radius-sm);
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.btn:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.btn-primary { background: var(--brass); border-color: var(--brass); color: var(--on-brass); }
.btn-primary:hover { background: var(--teal); border-color: var(--teal); color: var(--on-teal); transform: translateY(-1px); }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap { display: flex; align-items: center; gap: 12px 28px; padding-block: 15px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em;
  color: var(--text); white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; flex: none; border-radius: 7px; }
.masthead nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-left: auto; font-size: 15px; }
.masthead nav a:not(.btn) { color: var(--muted); padding: 8px 10px; border-radius: var(--radius-sm); }
.masthead nav a:not(.btn):hover { color: var(--text); background: var(--surface); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .masthead nav {
    position: fixed; top: 65px; left: 0; right: 0; z-index: 70;
    max-height: calc(100vh - 65px); overflow-y: auto;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px; margin: 0;
    padding: 18px var(--gutter) 28px; background: var(--bg);
    border-top: 1px solid var(--line); box-shadow: var(--shadow-lg);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .2s ease, opacity .2s ease, visibility .2s;
    font-size: 18px;
  }
  .masthead nav a:not(.btn) { padding: 13px 10px; }
  .masthead nav .btn { align-self: flex-start; margin-top: 10px; }
  .nav-toggle {
    display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; flex: none;
    border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: transparent;
    color: var(--text);
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 17px; height: 2px; background: currentColor; border-radius: 1px;
    transition: transform .2s, opacity .2s;
  }
  .nav-toggle span { position: relative; }
  .nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }
  body.nav-open .masthead nav { transform: none; opacity: 1; visibility: visible; }
  body.nav-open .nav-toggle span { background: transparent; }
  body.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
  body.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }
  body.nav-open { overflow: hidden; }
}

/* ---------- hero ---------- */
.hero .wrap { padding-block: clamp(48px, 7vw, 88px) 64px; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: center; }
.hero-copy { flex: 1 1 380px; max-width: 560px; }
.status-line {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  margin-bottom: 26px;
}
.status-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--teal); flex: none; }
.hero h1 { margin-bottom: 22px; }
.hero .lede { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 42em; margin-bottom: 30px; }
.hero .actions { margin-bottom: 4px; }

.code-panel {
  flex: 1.1 1 420px; min-width: 0; margin: 0;
  background: var(--night); color: color-mix(in oklab, #fff 84%, var(--night));
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.code-panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid color-mix(in oklab, #fff 14%, var(--night));
  font-family: var(--font-mono); font-size: 12.5px; color: color-mix(in oklab, #fff 55%, var(--night));
}
.code-panel-head .dots { display: flex; gap: 6px; margin-right: 4px; }
.code-panel-head .dots i { width: 9px; height: 9px; border-radius: 999px; background: color-mix(in oklab, #fff 24%, var(--night)); }
.code-panel pre {
  margin: 0; padding: 22px 20px 24px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 14.5px; line-height: 1.75;
}
.code-panel .c1 { color: color-mix(in oklab, #fff 46%, var(--night)); }
.code-panel .c2 { color: #7fd4c4; }
.code-panel .c3 { color: #e6b45a; }
.code-panel .c4 { color: color-mix(in oklab, #fff 86%, var(--night)); }
.code-caption {
  padding: 12px 20px 16px; font-family: var(--font-mono); font-size: 12.5px;
  color: color-mix(in oklab, #fff 44%, var(--night));
  border-top: 1px solid color-mix(in oklab, #fff 10%, var(--night));
}

/* ---------- section scaffolding ---------- */
.band .wrap { padding-block: var(--band); }
.band-top { border-top: 1px solid var(--line); }
.band-tint { background: var(--surface); }
.head { max-width: 44em; margin-bottom: 44px; }
.head p { margin: 0; font-size: 18px; color: var(--muted); }
.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 13px;
  color: var(--brass); margin-bottom: 14px;
}

/* ---------- what we do ---------- */
.pillars {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
}
.pillar {
  padding: 30px 26px 28px; border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.pillar:first-child { border-left: 1px solid var(--line); }
.pillar-icon { width: 34px; height: 34px; margin-bottom: 20px; color: var(--brass); }
.pillar h3 { margin-bottom: 10px; }
.pillar p { font-size: 15.5px; color: var(--muted); margin: 0; }

/* ---------- how we work ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 20px;
  padding: 26px 0; border-top: 1px solid var(--line); counter-increment: step;
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: "0" counter(step);
  grid-column: 1; grid-row: 1 / 3;
  font-family: var(--font-mono); font-weight: 500; font-size: 16px; color: var(--faint);
  padding-top: 3px;
}
.steps h3 { grid-column: 2; grid-row: 1; font-size: 19px; margin: 0 0 6px; }
.steps p { grid-column: 2; grid-row: 2; margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 560px) {
  .steps li { grid-template-columns: 30px minmax(0, 1fr); gap: 4px 12px; }
}

/* ---------- products ---------- */
.product-feature {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden;
  background: var(--surface);
}
.product-feature-body { padding: clamp(26px, 4vw, 42px); }
.product-feature-visual {
  background: var(--night); color: color-mix(in oklab, #fff 80%, var(--night));
  padding: clamp(26px, 4vw, 42px);
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  border-left: 1px solid var(--line);
}
.status-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 12.5px;
  padding: 5px 11px; border-radius: var(--radius-sm); width: fit-content;
}
.status-tag.is-live { background: var(--teal-tint); color: var(--teal); }
.status-tag.is-upcoming { background: var(--brass-tint); color: var(--brass); }
.status-tag .status-dot { background: currentColor; }
.product-feature h3 { margin: 14px 0 12px; font-size: clamp(24px, 2.6vw, 30px); }
.product-feature p { color: var(--muted); font-size: 16.5px; }
.product-feature .actions { margin-top: 20px; }
.visual-label { font-family: var(--font-mono); font-size: 13px; color: color-mix(in oklab, #fff 55%, var(--night)); }
.feature-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.feature-list li {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: baseline;
  font-family: var(--font-mono); font-size: 14px; color: color-mix(in oklab, #fff 78%, var(--night));
}
.feature-list li::before { content: "›"; color: #7fd4c4; font-weight: 600; }

.upcoming-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; margin-top: 20px; }
.upcoming-card {
  padding: 26px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md);
  color: var(--muted);
}
.upcoming-card h4 { color: var(--text); margin-bottom: 8px; }
.upcoming-card p { margin: 0; font-size: 15px; }

/* ---------- tech chips ---------- */
.chip-group { margin-bottom: 28px; }
.chip-group:last-child { margin-bottom: 0; }
.chip-group-label { font-family: var(--font-mono); font-size: 13px; color: var(--faint); margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; padding: 0; margin: 0; list-style: none; }
.chips li {
  font-family: var(--font-mono); font-size: 13.5px; color: var(--muted);
  padding: 7px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line);
}

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 48px; align-items: start; }
.about-grid .prose p { font-size: 17.5px; }
.founder-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.founder-card .role { font-family: var(--font-mono); font-size: 13px; color: var(--faint); margin-bottom: 4px; }
.founder-card h4 { margin-bottom: 14px; }
.founder-card p { font-size: 15px; color: var(--muted); }

/* ---------- CTA / contact ---------- */
.cta { background: var(--night); color: color-mix(in oklab, #fff 84%, var(--night)); border-top: 1px solid color-mix(in oklab, #fff 12%, var(--night)); }
.cta h2 { color: color-mix(in oklab, #fff 96%, var(--night)); }
.cta .lede { font-size: 18px; color: color-mix(in oklab, #fff 62%, var(--night)); max-width: 46em; margin-bottom: 30px; }
.cta .btn-primary { background: var(--brass); border-color: var(--brass); color: var(--on-brass); }
.cta .btn:not(.btn-primary) { border-color: color-mix(in oklab, #fff 26%, var(--night)); color: color-mix(in oklab, #fff 90%, var(--night)); }
.cta .btn:not(.btn-primary):hover { border-color: var(--teal); color: #7fd4c4; }
.contact-line { font-family: var(--font-mono); font-size: 15px; color: color-mix(in oklab, #fff 70%, var(--night)); margin-top: 30px; }
.contact-line a { color: #e6b45a; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { padding-block: 40px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 40px; font-size: 14px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 12px; }
.foot-brand img { width: 24px; height: 24px; border-radius: 5px; }
.foot p { color: var(--faint); margin: 0 0 8px; max-width: 46em; }
.foot p:last-child { margin: 0; }
.foot nav { display: grid; gap: 8px; align-content: start; justify-items: start; }
.foot nav a { color: var(--muted); }
.foot nav a:hover { color: var(--brass); }
@media (max-width: 640px) {
  .foot .wrap { grid-template-columns: 1fr; }
}

/* ---------- prose / 404 ---------- */
.prose-page .wrap { padding-block: clamp(72px, 12vw, 140px); text-align: left; max-width: 640px; }
.prose-page .status-line { margin-bottom: 30px; }
.prose-page h1 { margin-bottom: 16px; }
.prose-page p { font-size: 18px; color: var(--muted); }

/* ---------- responsive tightening ---------- */
@media (max-width: 760px) {
  .product-feature { grid-template-columns: 1fr; }
  .product-feature-visual { border-left: 0; border-top: 1px solid var(--line); }
  .pillar, .pillar:first-child { border-left: 0; }
  .pillars { border-left: 1px solid var(--line); }
}
