/* Codeman site styles.
   Tokens first, then components (one block each, named after the design canvas), then pages.
   Pages compose components; they don't set colours or sizes of their own. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #FFFFFF;
  --surface: #F5F6F3;
  --surface2: #ECEEE9;
  --line: #DFE2DB;
  --line2: #C9CEC5;
  --ink: #1D1F21;
  --ink2: #53585D;
  --lime: #8DC63F;
  --on-lime: #15200A;
  --lime-text: #467314;
  --lime-tint: #EEF6E3;
  --graphite: #1B1D1F;
  --danger: #B3261E;
  --danger-tint: #FBEAE8;
  --logo-blend: multiply;

  /* Always-dark surfaces (footer, CTA band, console) */
  --on-dark: #EDEFEB;
  --on-dark2: #A9AFAA;
  --dark-line: #33373A;
  --dark-lime: #9BD14C;
  --dark-link: #A9DA66;

  --font-head: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --wrap: 1200px;
  --gutter: 24px;
  --radius-s: 8px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius-xl: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111312;
    --surface: #191C1A;
    --surface2: #222623;
    --line: #2F3430;
    --line2: #454B46;
    --ink: #EDEFEB;
    --ink2: #A7AEA9;
    --lime: #9BD14C;
    --lime-text: #A9DA66;
    --lime-tint: #1E2915;
    --graphite: #0A0B0A;
    --danger: #F2A49D;
    --danger-tint: #3A1F1C;
    --logo-blend: screen;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
img, svg { display: block; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); }
p { margin: 0; }
a { color: var(--lime-text); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 4px; }
[id] { scroll-margin-top: 16px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: var(--radius-m);
  background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Logo ---------- */
.logo img { height: 40px; width: auto; mix-blend-mode: var(--logo-blend); }
.logo--footer img { height: 36px; mix-blend-mode: screen; }

/* ---------- Site header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner {
  min-height: 88px; padding-top: 12px; padding-bottom: 12px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
}
.site-header .logo { display: flex; align-items: center; min-height: 44px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.nav__link {
  min-height: 44px; display: flex; align-items: center; padding: 0 12px;
  border-radius: var(--radius-s); text-decoration: none;
  font-size: 15px; font-weight: 500; color: var(--ink2);
}
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--lime); }
.nav .btn { margin-left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 18px; border-radius: var(--radius-m); border: 0;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn--lg { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn--primary { background: var(--lime); color: var(--on-lime); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--outline { background: transparent; color: var(--ink); border: 1.5px solid var(--line2); }
.btn--outline:hover { border-color: var(--ink2); }
.btn--on-dark { background: var(--dark-lime); color: var(--on-lime); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Text link with arrow ---------- */
.arrow-link {
  min-height: 44px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 16px; font-weight: 600; color: var(--lime-text); text-decoration: none;
}
.arrow-link:hover { text-decoration: underline; }

/* ---------- Section heading ---------- */
.eyebrow { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--lime-text); }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.section-head h2 { font-weight: 700; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -.01em; }
.section-head p { font-size: 17px; line-height: 27px; color: var(--ink2); max-width: 600px; }
.page-head { display: flex; flex-direction: column; gap: 12px; }
.page-head h1 { font-weight: 700; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.1; letter-spacing: -.015em; }
.page-head .lead { font-size: 18px; line-height: 28px; color: var(--ink2); max-width: 560px; }
.page-head .meta { font-size: 15px; color: var(--ink2); }

/* ---------- Sections ---------- */
.section { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 48px; }
.band--surface { background: var(--surface); }
.band--ruled { border-top: 1px solid var(--line); }

/* ---------- Tech chip ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.chip { font-family: var(--font-mono); font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--surface2); color: var(--ink); }
.chips--lg { gap: 8px; }
.chips--lg .chip { font-size: 13px; padding: 4px 10px; }

/* ---------- Service card ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.service-card { background: var(--bg); border-radius: var(--radius-l); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.service-card h3 { font-weight: 600; font-size: 22px; }
.service-card p { font-size: 15px; line-height: 24px; color: var(--ink2); flex: 1; }
.icon-tile {
  width: 48px; height: 48px; border-radius: 12px; background: var(--lime-tint);
  display: flex; align-items: center; justify-content: center; color: var(--lime-text);
}
.icon-tile svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 32px 40px; }
.step { display: flex; gap: 16px; }
.step__num { font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: var(--lime-text); flex: none; width: 44px; }
.step__body { display: flex; flex-direction: column; gap: 6px; }
.step h3 { font-weight: 600; font-size: 20px; }
.step p { font-size: 15px; line-height: 24px; color: var(--ink2); }

/* ---------- App card ---------- */
.app-card { border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 32px; display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: center; }
.app-card__icon { width: 96px; height: 96px; flex: none; border-radius: 24px; background: #1E2633; display: flex; align-items: center; justify-content: center; }
.app-card__body { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.app-card__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.app-card h3 { font-weight: 600; font-size: 26px; }
.app-card p { font-size: 16px; line-height: 26px; color: var(--ink2); max-width: 620px; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--lime-tint); color: var(--lime-text); }

/* ---------- Info card (aside boxes) ---------- */
.info-card { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px 28px; display: flex; flex-direction: column; gap: 10px; }
.info-card--filled { background: var(--surface); border-color: transparent; padding: 28px; gap: 18px; }
.info-card h2 { font-weight: 600; font-size: 18px; }
.info-card--filled h2 { font-size: 20px; }
.info-card p { font-size: 15px; line-height: 23px; color: var(--ink2); }
.info-card a { min-height: 40px; display: flex; align-items: center; font-size: 15px; font-weight: 500; }
.num-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 23px; color: var(--ink2); }
.num-list li { display: flex; gap: 12px; }
.num-list__n { font-family: var(--font-mono); color: var(--lime-text); flex: none; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 12px; }
.alert svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alert__body { display: flex; flex-direction: column; gap: 2px; }
.alert__body b { font-size: 15px; color: var(--ink); }
.alert__body span { font-size: 14px; line-height: 21px; color: var(--ink2); }
.alert--error { background: var(--danger-tint); color: var(--danger); }
.alert--success { background: var(--lime-tint); color: var(--lime-text); padding: 24px; border-radius: var(--radius-l); gap: 14px; }
.alert--success svg { width: 26px; height: 26px; }
.alert--success .alert__body { gap: 6px; }
.alert--success .alert__body b { font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.alert--success .alert__body span { font-size: 15px; line-height: 24px; }
.alert--success .btn { margin-top: 8px; align-self: flex-start; }

/* ---------- Form fields ---------- */
.form { display: flex; flex-direction: column; gap: 20px; max-width: 600px; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field label .opt { font-weight: 400; color: var(--ink2); }
.field input, .field textarea {
  width: 100%; padding: 0 14px; border-radius: var(--radius-m);
  border: 1.5px solid var(--line2); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 16px;
}
.field input { height: 48px; }
.field textarea { padding-top: 12px; padding-bottom: 12px; line-height: 24px; resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--lime); outline: none; box-shadow: 0 0 0 3px var(--lime-tint); }
.field--hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile-slot { min-height: 65px; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form__note { font-size: 13px; line-height: 20px; color: var(--ink2); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--graphite); color: var(--on-dark); }
.cta-band__inner { padding-top: 72px; padding-bottom: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band__text { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.cta-band h2 { font-weight: 700; font-size: clamp(28px, 3vw, 36px); line-height: 1.2; }
.cta-band p { font-size: 17px; line-height: 27px; color: var(--on-dark2); }

/* ---------- Site footer ---------- */
.site-footer { background: var(--graphite); color: var(--on-dark); }
.site-footer__inner { padding-top: 48px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 32px; }
.site-footer__top { display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; }
.site-footer__brand { flex: 1 1 280px; display: flex; flex-direction: column; gap: 12px; max-width: 380px; }
.site-footer__brand p { font-size: 14px; line-height: 22px; color: var(--on-dark2); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px 56px; }
.footer-nav__col { display: flex; flex-direction: column; gap: 2px; }
.footer-nav__label { font-family: var(--font-mono); font-size: 12px; color: var(--dark-link); margin-bottom: 6px; }
.footer-nav a { min-height: 32px; display: flex; align-items: center; font-size: 14px; color: var(--on-dark); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.site-footer__legal {
  border-top: 1px solid var(--dark-line); padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  font-size: 13px; line-height: 20px; color: var(--on-dark2);
}
.site-footer :focus-visible, .cta-band :focus-visible { outline-color: var(--dark-lime); }

/* ---------- Console ---------- */
.console {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #141615; border: 1px solid #141615;
  box-shadow: 0 24px 48px rgba(17, 19, 18, .22);
  font-family: var(--font-mono); color: #D9DED8;
}
@media (prefers-color-scheme: dark) { .console { border-color: #2F3430; } }
.console__bar { display: flex; align-items: center; gap: 12px; padding: 0 8px 0 16px; min-height: 44px; background: #1F2220; border-bottom: 1px solid #2F3430; }
.console__glyph { font-size: 13px; font-weight: 500; color: #9BD14C; }
.console__title { flex: 1; font-size: 12px; color: #8E968F; }
.console__btn {
  min-height: 36px; padding: 0 12px; border-radius: var(--radius-s);
  border: 1px solid #3A3F3B; background: transparent; color: #D9DED8;
  font: inherit; font-size: 12px; cursor: pointer;
}
.console__btn:hover { border-color: #8E968F; }
.console :focus-visible { outline-color: #9BD14C; }
.console__body {
  height: 480px; overflow-y: auto; overflow-x: hidden;
  padding: 16px 18px 18px; container-type: inline-size;
  font-size: 13px; line-height: 20px;
}
.console__line { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 20px; }
.console__line--logo { white-space: pre; font-size: min(13px, 2.2cqw); line-height: 1.25; min-height: 1.25em; }
.console__cursor { display: inline-block; width: 8px; height: 15px; vertical-align: -2px; background: #9BD14C; }
.console__cursor.is-off { opacity: 0; }
.console__input-row { display: flex; align-items: center; min-height: 32px; cursor: text; }
.console__input-row span { white-space: pre; }
.console__input {
  flex: 1; min-width: 0; border: 0; padding: 0; background: transparent;
  color: #D9DED8; font: inherit; font-size: 16px; line-height: 20px; caret-color: #9BD14C;
}
.console__input:focus { outline: none; }
.console__input-row:focus-within { box-shadow: inset 0 -1px 0 #3A3F3B; }
.console__body a { text-underline-offset: 3px; }
.c-fg { color: #D9DED8; }
.c-mute { color: #8E968F; }
.c-lime { color: #9BD14C; }
.c-logo { color: #B4BAB4; }
.c-word { color: #EEF0EC; }
.c-err { color: #F2A49D; }
.c-link { color: #A9DA66; }

/* ---------- Home ---------- */
.hero { padding-top: 88px; padding-bottom: 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px 64px; }
.hero__text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero__text h1 { font-weight: 700; font-size: clamp(36px, 4.4vw, 54px); line-height: 1.08; letter-spacing: -.015em; }
.hero__lead { font-size: 19px; line-height: 30px; color: var(--ink2); max-width: 600px; }
.hero__text .btn-row { margin-top: 4px; }
.hero__console { flex: 1 1 560px; min-width: 0; }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 14px; color: var(--ink2); margin: 0; padding: 0; list-style: none; }
.facts__avail { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.facts__dot { width: 8px; height: 8px; border-radius: 4px; background: var(--lime); }
.about { padding-top: 96px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 32px 64px; }
.about .section-head { flex: 1 1 280px; }
.about__body { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 28px; color: var(--ink2); }
.about__body .chips { margin-top: 4px; }

/* ---------- Contact ---------- */
.contact { padding-top: 80px; padding-bottom: 112px; display: flex; flex-wrap: wrap; gap: 48px 80px; }
.contact__main { flex: 1.4 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.contact__aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact__aside .info-card a { font-weight: 600; }

/* ---------- Prose pages (privacy) ---------- */
.prose-page { max-width: 760px; margin: 0 auto; padding: 80px var(--gutter) 112px; display: flex; flex-direction: column; gap: 40px; }
.prose-page .lead { max-width: none; font-size: 18px; line-height: 29px; }
.prose { display: flex; flex-direction: column; gap: 36px; font-size: 16px; line-height: 27px; }
.prose section { display: flex; flex-direction: column; gap: 10px; }
.prose h2 { font-weight: 600; font-size: 24px; }
.prose p { color: var(--ink2); }

/* ---------- 404 ---------- */
.not-found { padding-top: 112px; padding-bottom: 128px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.not-found pre { margin: 0; font-family: var(--font-mono); font-size: 14px; line-height: 22px; color: var(--ink2); white-space: pre-wrap; }

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .hero { padding-top: 48px; padding-bottom: 64px; }
  .section, .about { padding-top: 64px; padding-bottom: 64px; }
  .contact, .prose-page { padding-top: 48px; padding-bottom: 72px; }
  .console__body { height: 420px; padding: 12px; }
  .app-card, .service-card { padding: 24px; }
  .nav .btn { margin-left: 0; }
}
.not-found h1 { font-weight: 700; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.1; }
.not-found .lead { font-size: 18px; line-height: 28px; color: var(--ink2); }
