/* ============================================================
   MyChatBot.dev — main.css
   AI Engineering Services site · static HTML/CSS/JS · v1
   Design: dark engineering aesthetic, electric-blue accents,
   JetBrains Mono for execution UI. No external assets/fonts.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces */
  --bg: #0a0a0a;          /* page background   */
  --bg-2: #111111;        /* raised cards      */
  --bg-3: #171717;        /* hover / wells     */
  --ink: #f7f7f5;         /* primary text      */
  --muted: #9a9a95;       /* secondary text    */
  --faint: #5c5c57;       /* captions / rules  */
  --line: rgba(247, 247, 245, 0.08);  /* hairlines   */
  --line-strong: rgba(247, 247, 245, 0.16);

  /* Accent */
  --blue: #3b82f6;        /* electric blue — CTA, nodes, status */
  --blue-bright: #60a5fa;
  --blue-dim: rgba(59, 130, 246, 0.14);  /* node fill / glow   */
  --cyan: #22d3ee;        /* secondary accent (rare)           */

  /* Status */
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;

  /* Type */
  --sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC",
          "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Consolas,
          "Liberation Mono", "Courier New", monospace;

  /* Rhythm */
  --nav-h: 64px;
  --maxw: 1180px;
  --radius: 10px;
  --pad: clamp(20px, 4vw, 32px);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(72px, 9vw, 120px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px)  { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
@media (min-width: 901px) and (max-width: 1160px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
}

/* Eyebrow + headings */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow--muted { color: var(--faint); }
.h-xl { font-size: clamp(40px, 6.2vw, 72px); letter-spacing: -0.035em; }
.h-lg { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -0.03em; }
.h-md { font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; }
.h-sm { font-size: clamp(18px, 2.2vw, 22px); }
.lede { font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); max-width: 56ch; }
.lede strong { color: var(--ink); font-weight: 600; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.center .section-head { margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-block;
  border-radius: 8px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
              transform 0.1s ease;
  border: 1px solid transparent;
  text-decoration: none !important;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-bright); color: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-bright); background: rgba(59,130,246,0.06); }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.btn-row.center { justify-content: center; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); height: var(--nav-h); display: flex; align-items: center; gap: 32px; }
.nav__brand { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.nav__brand:hover { color: var(--ink); }
.nav__brand-mark { width: 26px; height: 26px; flex: none; }
.nav__links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav__links a {
  color: var(--muted); padding: 8px 13px; border-radius: 7px; font-size: 14.5px; font-weight: 500;
}
.nav__links a:hover { color: var(--ink); text-decoration: none; background: rgba(247,247,245,0.05); }
.nav__links a[aria-current="page"] { color: var(--ink); }
.nav__links .btn { margin-left: 8px; }
.nav__toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); color: var(--ink); border-radius: 8px; padding: 8px 12px; font-size: 15px; cursor: pointer; }
@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 20px;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 10px; border-radius: 8px; }
  .nav__links .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: 56px 40px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
.footer__brand { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.footer__tag { color: var(--faint); font-size: 14px; max-width: 30ch; margin-top: 12px; }
.footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; font-weight: 500; }
.footer__col ul li { margin-bottom: 9px; }
.footer__col a { color: var(--muted); font-size: 14.5px; }
.footer__col a:hover { color: var(--ink); }
.footer__note { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 10vw, 132px) 0 clamp(56px, 8vw, 96px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__eyebrow { color: var(--blue); font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 22px; }
.hero h1 { font-size: clamp(42px, 7vw, 84px); letter-spacing: -0.045em; line-height: 1.02; }
.hero h1 .accent { color: var(--blue); }
.hero__sub { margin-top: 18px; font-family: var(--mono); font-size: 15px; letter-spacing: 0.02em; color: var(--cyan); text-transform: uppercase; }
.hero__lede { margin-top: 20px; color: var(--muted); font-size: clamp(17px, 2.1vw, 20px); max-width: 46ch; }
.hero__lede strong { color: var(--ink); }
.hero__note { margin-top: 40px; font-size: 13.5px; color: var(--faint); max-width: 52ch; }

/* ---------- Execution UI (signature visual) ---------- */
.exec { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; font-family: var(--mono); }
.exec__head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.exec__dots { display: flex; gap: 6px; }
.exec__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-3); }
.exec__title { font-size: 12.5px; color: var(--muted); letter-spacing: 0.05em; }
.exec__status { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ok); letter-spacing: 0.08em; }
.exec__status .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52,211,153,0.55); animation: pulse 1.8s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.exec__mission { font-size: 13px; color: var(--ink); line-height: 1.5; margin-bottom: 16px; }
.exec__mission .tag { color: var(--blue); }
.exec__mission .target { color: var(--ink); }
.exec__mission .target.dim { color: var(--muted); }
.steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.step { display: flex; align-items: center; gap: 11px; font-size: 13px; color: var(--muted); }
.step .ico { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 5px; font-size: 10px; }
.step.done { color: var(--ink); }
.step.done .ico { border-color: var(--ok); color: var(--ok); }
.step.run { color: var(--ink); }
.step.run .ico { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.step.wait .ico { color: var(--faint); }
.exec__rows { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 12.5px; color: var(--muted); }
.exec__row { display: flex; justify-content: space-between; gap: 12px; }
.exec__row b { color: var(--ink); font-weight: 600; }
.exec__row .ok { color: var(--ok); }
.exec__row .blue { color: var(--blue-bright); }
.exec__row .warn { color: var(--warn); }

/* ---------- Problem / statement blocks ---------- */
.statement { border-left: 3px solid var(--line-strong); padding-left: 22px; margin-top: 12px; color: var(--muted); }
.statement strong { color: var(--ink); }

/* ---------- Cards ---------- */
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 30px); transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease; }
.card:hover { border-color: var(--line-strong); }
.card--lift:hover { transform: translateY(-3px); background: var(--bg-3); }
.card__num { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.1em; }
.card h3 { margin: 10px 0 8px; font-size: 21px; }
.card p { color: var(--muted); font-size: 15px; }
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tagchip { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 10px; }
.tagchip--blue { color: var(--blue-bright); border-color: rgba(59,130,246,0.4); }
.card--service { display: flex; flex-direction: column; }
.card--service p { flex: 1; }
.card--service .btn { margin-top: 22px; align-self: flex-start; }

/* Build/Fix/Operate flow cards */
.flow { position: relative; }
.flow::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: 1px; height: 32px; background: var(--line-strong); }
.flow:last-child::after { display: none; }
@media (min-width: 901px) {
  .flow-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.flow .card { height: 100%; }

/* ---------- Under the hood ---------- */
.stack { display: flex; flex-direction: column; gap: 0; margin-top: 12px; }
.stack__row { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); background: var(--bg-2); border-radius: 10px; padding: 14px 18px; }
.stack__row + .stack__row { margin-top: -1px; }
.stack__row .edge { color: var(--faint); font-family: var(--mono); font-size: 13px; }
.stack__row .body { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.stack__row .body .dim { color: var(--muted); }
.stack__row .tag { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.stack__row--accent { border-color: rgba(59,130,246,0.45); background: var(--blue-dim); }
.stack__row--accent .body { color: var(--blue-bright); }

/* ---------- Process timeline ---------- */
.timeline { margin-top: 8px; }
.timeline__item { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding-bottom: 30px; position: relative; }
.timeline__item::before { content: ""; position: absolute; left: 30px; top: 34px; bottom: 0; width: 1px; background: var(--line-strong); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item:last-child::before { display: none; }
.timeline__num { font-family: var(--mono); font-size: 13px; color: var(--blue); padding-top: 4px; }
.timeline__body h3 { font-size: 20px; margin-bottom: 6px; }
.timeline__body p { color: var(--muted); font-size: 15px; max-width: 60ch; }

/* ---------- CTA band ---------- */
.cta { background: var(--bg-2); border-top: 1px solid var(--line); }
.cta__inner { padding-block: clamp(72px, 9vw, 110px); text-align: center; }
.cta h2 { font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -0.03em; max-width: 22ch; margin-inline: auto; }
.cta__sub { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 52ch; margin: 20px auto 0; }
.cta__foot { margin-top: 26px; font-family: var(--mono); font-size: 13px; color: var(--faint); letter-spacing: 0.02em; }

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(34px, 5.4vw, 60px); letter-spacing: -0.035em; max-width: 20ch; }
.page-hero .lede { margin-top: 18px; max-width: 60ch; }

/* ---------- Checklist (fix page) ---------- */
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 28px; }
@media (max-width: 700px) { .checks { grid-template-columns: 1fr; } }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); font-size: 15.5px; }
.checks .box { width: 18px; height: 18px; flex: none; margin-top: 2px; border: 1.5px solid var(--line-strong); border-radius: 5px; }

/* ---------- Solutions / vertical anchors ---------- */
.vertical { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); overflow: hidden; }
.vertical__body { padding: clamp(24px, 3vw, 34px); }
.vertical h3 { font-size: 24px; margin-bottom: 8px; }
.vertical p { color: var(--muted); font-size: 15.5px; max-width: 52ch; }
.vertical .chip-line { margin: 16px 0 6px; }
.vertical .btn { margin-top: 18px; }

/* ---------- Pricing / productized ---------- */
.price-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .price-grid { grid-template-columns: 1fr; } }
.price { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.price__step { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.price h3 { font-size: 19px; margin: 8px 0 4px; }
.price p { color: var(--muted); font-size: 14.5px; flex: 1; }
.price .meta { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.price .meta b { color: var(--ink); }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; } }
.form { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: clamp(24px, 3vw, 34px); }
.form label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.form label .req { color: var(--err); }
.form .field { margin-bottom: 22px; }
.form input[type="text"], .form input[type="email"], .form textarea, .form select {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--ink); font: inherit; font-size: 15px; padding: 12px 14px;
}
.form textarea { min-height: 110px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.18); }
.form select { appearance: none; }
.form fieldset { border: none; margin: 0 0 22px; padding: 0; }
.form legend { font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-opt { position: relative; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span {
  display: inline-block; padding: 9px 15px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 14px; color: var(--muted); cursor: pointer; transition: all 0.12s ease; user-select: none;
}
.chip-opt input:checked + span { border-color: var(--blue); color: var(--blue-bright); background: var(--blue-dim); }
.chip-opt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.form .btn { margin-top: 6px; }
.form__note { margin-top: 16px; font-size: 13px; color: var(--faint); }
.contact-side { display: flex; flex-direction: column; gap: 26px; }
.contact-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.contact-card h3 { font-size: 17px; margin-bottom: 6px; }
.contact-card p { color: var(--muted); font-size: 14.5px; }
.contact-card .mono { font-family: var(--mono); font-size: 13px; color: var(--blue-bright); display: block; margin-top: 10px; word-break: break-all; }
.contact-card ul { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.contact-card li { display: flex; gap: 10px; color: var(--muted); font-size: 14.5px; align-items: flex-start; }
.contact-card li .tick { color: var(--ok); font-family: var(--mono); }

/* ---------- Misc ---------- */
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.quote { font-size: clamp(20px, 2.8vw, 26px); color: var(--ink); line-height: 1.4; letter-spacing: -0.01em; }
.quote .accent { color: var(--blue); }
.quote-by { margin-top: 14px; font-family: var(--mono); font-size: 13px; color: var(--faint); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; color: var(--faint); }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.wrap-list, .tagchips { display: flex; flex-wrap: wrap; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
