/* ============================================================================
   Shahvaiz Ahmed — Portfolio (Command Center concept)
   Design tokens: dark base #0B0B0F, panel #12131A, amber #FF9B21, green #3FB950
   Typography: Inter 400/500/600/700 (body) + JetBrains Mono 400/500 (system chrome)
   ============================================================================ */

/* ---------- RESET + TOKENS ---------- */
:root {
  --bg: #0B0B0F;
  --bg-alt: #0F1016;
  --panel: #12131A;
  --panel-2: #171822;
  --stroke: #1F202A;
  --stroke-2: #252633;
  --text: #F5F5F3;
  --muted: #B8B8BA;
  --dim: #7A7A82;
  --accent: #FF9B21;
  --accent-soft: rgba(255, 155, 33, .14);
  --green: #3FB950;
  --green-soft: rgba(63, 185, 80, .14);
  --red: #F85149;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, Monaco, monospace;

  --max: 1320px;
  --gutter: 24px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--panel-2);
  border: 1px solid var(--stroke-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--muted);
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.dim { color: var(--dim); }
.accent { color: var(--accent); }
.underline { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 155, 33, .5); }
.underline:hover { text-decoration-color: var(--accent); }

/* ---------- SKIP LINK ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #0B0B0F;
  padding: 10px 14px; font-weight: 600; z-index: 100;
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- TOPBAR ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(11, 11, 15, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--stroke);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .01em;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 18px; }
.logo {
  font-family: var(--font-mono); font-weight: 600; font-size: 14px;
  color: var(--text); display: inline-flex; align-items: center; gap: 6px;
}
.logo-mark { color: var(--accent); }
.logo-large { font-size: 22px; }
.topbar-meta { color: var(--dim); }
.topbar-meta strong { color: var(--muted); font-weight: 500; }
.topbar-nav { display: flex; gap: 26px; }
.topbar-nav a { color: var(--muted); position: relative; padding: 6px 0; }
.topbar-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent); transform: scaleX(0);
  transform-origin: left; transition: transform .25s var(--ease);
}
.topbar-nav a:hover { color: var(--text); }
.topbar-nav a:hover::after { transform: scaleX(1); }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted);
}
.status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(63, 185, 80, .6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, .55); }
  50% { box-shadow: 0 0 0 8px rgba(63, 185, 80, 0); }
}

.kbd {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.kbd:hover { border-color: var(--accent); background: var(--panel-2); }

.menu-toggle { display: none; flex-direction: column; gap: 4px; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); }

.mobile-menu {
  position: fixed; top: var(--topbar-h, 56px); left: 0; right: 0; z-index: 49;
  background: var(--bg);
  border-bottom: 1px solid var(--stroke);
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  font-family: var(--font-mono); font-size: 14px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a { color: var(--muted); padding: 10px 0; border-bottom: 1px solid var(--stroke); }
.mobile-menu a:last-of-type { border: 0; }
.mobile-menu .btn { align-self: flex-start; margin-top: 8px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.005em;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s, box-shadow .2s;
  line-height: 1;
  white-space: nowrap;
}
.btn-amber {
  background: var(--accent); color: #0B0B0F;
  box-shadow: 0 4px 24px -6px rgba(255, 155, 33, .4);
}
.btn-amber:hover { transform: translateY(-1px); color: #0B0B0F; box-shadow: 0 8px 32px -8px rgba(255, 155, 33, .55); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--stroke-2);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- CONTAINER / SECTIONS ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 24px;
}
.section-head { max-width: 880px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -.02em;
  font-weight: 500;
  margin: 8px 0 16px;
}
.section-sub { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 72ch; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}
.eyebrow span { color: var(--accent); }

/* ---------- HERO ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 24px 48px;
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 600;
  margin: 0 0 24px;
  max-width: 16ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-desc {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 32px;
}
.hero-desc strong { color: var(--text); font-weight: 600; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

/* Tech chips */
.chip-list {
  list-style: none; padding: 0; margin: 0 0 48px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip-list.small { margin-bottom: 0; gap: 6px; }
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid var(--stroke-2);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  transition: border-color .2s, color .2s, transform .2s;
}
.chip-list.small .chip { font-size: 11px; padding: 4px 10px; }
.chip:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }

/* Hero chatbot preview */
.hero-chatbot {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 18px;
  max-width: 720px;
  box-shadow: 0 24px 64px -24px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .03);
}
.cb-header, .cbw-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--stroke);
  font-family: var(--font-mono); font-size: 12px;
}
.cb-title { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.cb-title strong { color: var(--text); font-weight: 500; }
.cb-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(63, 185, 80, .55);
  animation: pulse 2s infinite;
}
.cb-meta { color: var(--dim); font-family: var(--font-mono); }

.cb-body, .cbw-body { padding: 18px 2px; display: flex; flex-direction: column; gap: 14px; }
.msg-row { display: flex; gap: 10px; align-items: flex-start; animation: bubble-in .4s var(--ease); }
.msg-row.me { justify-content: flex-end; }
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.avatar.bot { background: var(--accent); color: #0B0B0F; }
.avatar.user { background: var(--panel-2); color: var(--muted); border: 1px solid var(--stroke-2); }
.bubble {
  max-width: 82%;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.bubble.me { background: var(--accent-soft); border-color: rgba(255, 155, 33, .3); }
.bubble strong { color: var(--accent); font-weight: 600; }
.bubble.me strong { color: var(--accent); }

.cb-quick, .cbw-quick {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 12px 2px;
  border-top: 1px solid var(--stroke);
}
.quick {
  font-family: var(--font-mono); font-size: 11px;
  padding: 6px 10px;
  border: 1px solid var(--stroke-2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.quick:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.cb-input-row, .cbw-input {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  margin-top: 10px;
  background: var(--bg);
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
}
.cb-prompt { color: var(--accent); font-weight: 700; }
.cb-placeholder { color: var(--dim); flex: 1; }

/* ---------- METRICS DASH ---------- */
.metrics-dash {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px 48px;
}
.metrics-header {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--stroke);
  margin-bottom: 24px;
}
.metrics-header strong { color: var(--accent); font-weight: 500; }
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tile {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.tile::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity .3s;
}
.tile:hover { border-color: var(--stroke-2); transform: translateY(-2px); }
.tile:hover::before { opacity: 1; }
.tile-label {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--dim);
  margin: 0 0 8px;
}
.tile-num {
  font-family: var(--font-sans);
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--text);
  margin: 0;
  display: flex; align-items: baseline; gap: 2px;
}
.tile-num sup { font-size: .45em; color: var(--accent); font-weight: 600; }
.tile-spark { width: 100%; height: 32px; color: var(--accent); margin: 10px 0 8px; opacity: .9; }
.tile-delta { font-family: var(--font-mono); font-size: 11px; color: var(--green); margin: 0; }

/* ---------- SERVICES ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.svc {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; gap: 22px; align-items: flex-start;
  transition: border-color .25s, transform .25s;
}
.svc:hover { border-color: var(--stroke-2); transform: translateY(-2px); }
.svc-icon {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 10px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.svc-body h3 {
  font-size: 22px; line-height: 1.2; letter-spacing: -.015em;
  font-weight: 500; margin: 0 0 10px;
}
.svc-body p {
  color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 10px;
}
.svc-replaces { font-size: 13px !important; color: var(--dim) !important; }
.svc-replaces strong { color: var(--muted); font-weight: 500; }

/* ---------- CASE STUDIES ---------- */
.case-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  margin-bottom: 14px;
  transition: border-color .25s, transform .25s;
}
.case-card:hover { border-color: var(--stroke-2); transform: translateY(-2px); }
.case-visual {
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--panel-2) 100%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}
.case-visual::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 155, 33, .08), transparent 50%);
  pointer-events: none;
}
.case-lbl, .case-lbl-bot {
  font-family: var(--font-mono); font-size: 11px; color: var(--dim);
  letter-spacing: .05em; text-transform: uppercase;
  position: relative; z-index: 1;
}
.case-big {
  font-size: clamp(64px, 8vw, 112px);
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1;
  margin: 0;
  color: var(--text);
  align-self: center;
  display: flex; align-items: baseline;
  position: relative; z-index: 1;
}
.case-big sup { font-size: .4em; color: var(--accent); font-weight: 600; }
.case-kicker {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); letter-spacing: .08em; text-transform: uppercase;
  margin: 0 0 12px;
}
.case-body h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15; letter-spacing: -.02em;
  font-weight: 500; margin: 0 0 14px;
}
.case-body p { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0 0 16px; }

/* ---------- TESTIMONIALS ---------- */
.tml-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.tml {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 26px;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color .25s, transform .25s;
}
.tml:hover { border-color: var(--stroke-2); transform: translateY(-2px); }
.tml-stars {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: .12em;
  line-height: 1;
}
.tml-quote {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  font-weight: 400;
  quotes: "\201C" "\201D";
}
.tml-meta {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 2px;
  font-size: 13px;
  font-family: var(--font-mono);
  padding-top: 14px;
  border-top: 1px solid var(--stroke);
}
.tml-meta strong { color: var(--text); font-weight: 500; }

@media (max-width: 1024px) {
  .tml-grid { grid-template-columns: 1fr; }
}

/* ---------- PROCESS ---------- */
.proc-steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  counter-reset: step;
}
.pstep {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  transition: border-color .25s, transform .25s;
}
.pstep:hover { border-color: var(--stroke-2); transform: translateY(-2px); }
.pstep-num {
  font-family: var(--font-mono);
  font-size: 44px; font-weight: 300;
  color: var(--accent);
  opacity: .4;
  margin: 0 0 18px;
  line-height: 1;
}
.pstep h3 { font-size: 20px; font-weight: 500; margin: 0 0 10px; letter-spacing: -.015em; }
.pstep p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }
.pstep p strong { color: var(--accent); font-weight: 600; }

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-grid h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 500; letter-spacing: -.025em; line-height: 1.05;
  margin: 8px 0 22px;
}
.about-grid .lead {
  font-size: 19px; line-height: 1.55; color: var(--text); margin: 0 0 18px;
}
.about-grid p { color: var(--muted); font-size: 16px; line-height: 1.7; margin: 0 0 16px; }

.about-side {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky; top: 88px;
}
.fact-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; }
.fact-list dt {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--dim); padding-top: 2px;
}
.fact-list dd { margin: 0; font-size: 14px; color: var(--text); }
.dot-green {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(63, 185, 80, .5);
  animation: pulse 2s infinite;
}

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s;
}
.faq-item[open] { border-color: var(--stroke-2); }
.faq-item summary {
  padding: 22px 24px;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  font-size: 17px; font-weight: 500; letter-spacing: -.01em;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item:hover summary { color: var(--accent); }
.faq-icon {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 300;
  color: var(--accent);
  transition: transform .25s var(--ease);
  flex-shrink: 0; line-height: 1;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  padding: 0 24px 24px;
  color: var(--muted); font-size: 15px; line-height: 1.7;
}
.faq-answer p { margin: 0 0 12px; }
.faq-answer ul, .faq-answer ol { margin: 0 0 12px 18px; padding: 0; }
.faq-answer li { margin-bottom: 6px; }
.faq-answer strong { color: var(--text); font-weight: 600; }

/* ---------- CONTACT ---------- */
.contact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: linear-gradient(135deg, var(--panel) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(255, 155, 33, .12), transparent 60%);
  pointer-events: none;
}
.contact-card > * { position: relative; z-index: 1; }
.contact-left h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 500; letter-spacing: -.025em; line-height: 1.1;
  margin: 0 0 16px;
}
.contact-left .lead { font-size: 17px; line-height: 1.6; color: var(--muted); margin: 0 0 24px; }
.contact-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
.contact-meta a { color: var(--text); }

.contact-form { display: flex; flex-direction: column; }
.form-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 8px;
}
.form-field {
  background: var(--bg);
  border: 1px solid var(--stroke-2);
  color: var(--text);
  font: 15px var(--font-sans);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  width: 100%;
  transition: border-color .2s, background .2s;
}
.form-field:focus { border-color: var(--accent); }
.form-field:focus:not(:focus-visible) { outline: none; }
.form-field::placeholder { color: var(--dim); }
textarea.form-field { resize: vertical; min-height: 80px; font-family: var(--font-sans); }

.form-submit {
  margin-top: 20px; align-self: flex-start;
  padding: 14px 22px;
  background: var(--accent); color: #0B0B0F;
  font-weight: 600; font-size: 15px;
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 24px -6px rgba(255, 155, 33, .4);
}
.form-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 32px -8px rgba(255, 155, 33, .55); }
.form-submit[data-state="sending"] { opacity: .7; pointer-events: none; }
.form-submit[data-state="sent"] { background: var(--green); color: #0B0B0F; }
.form-hint { font-size: 12px; margin: 10px 0 0; }

/* ---------- FOOTER ---------- */
.site-footer {
  max-width: var(--max);
  margin: 64px auto 0;
  padding: 56px 24px 32px;
  border-top: 1px solid var(--stroke);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand .footer-tag {
  font-size: 14px; color: var(--muted); line-height: 1.6; margin: 14px 0 0;
  max-width: 40ch;
}
.footer-h {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim); font-weight: 500;
  margin: 0 0 14px;
}
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--accent); }
.footer-legal {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--dim);
  padding-top: 24px;
  border-top: 1px solid var(--stroke);
}
.footer-legal p { margin: 0; }

/* ---------- FLOATING CHATBOT WIDGET ---------- */
.cbw-launcher {
  position: fixed; right: 24px; bottom: 24px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: var(--accent); color: #0B0B0F;
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 32px -8px rgba(255, 155, 33, .55);
  z-index: 55;
  transition: transform .2s, box-shadow .2s;
}
.cbw-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 40px -10px rgba(255, 155, 33, .7); }
.cbw-launcher[hidden] { display: none; }
.cbw-launcher.is-offscreen {
  opacity: 0; pointer-events: none; transform: translateY(24px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}

.noscript-fallback {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
}
.noscript-fallback a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.chatbot-widget {
  position: fixed; right: 24px; bottom: 24px;
  width: min(400px, calc(100vw - 48px));
  max-height: min(640px, calc(100vh - 48px));
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px -20px rgba(0, 0, 0, .7);
  z-index: 60;
  overflow: hidden;
  font-size: 14px;
  animation: cbw-in .3s var(--ease);
}
@keyframes cbw-in {
  from { transform: translateY(20px) scale(.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.chatbot-widget[hidden] { display: none; }
.cbw-header { padding: 14px 18px; border-bottom: 1px solid var(--stroke); margin: 0; }
.cbw-close {
  font-size: 22px; line-height: 1; color: var(--muted);
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.cbw-close:hover { background: var(--panel-2); color: var(--text); }
.cbw-body {
  padding: 18px; flex: 1; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--stroke-2) transparent;
}
.cbw-body::-webkit-scrollbar { width: 6px; }
.cbw-body::-webkit-scrollbar-thumb { background: var(--stroke-2); border-radius: 3px; }
.cbw-quick { padding: 10px 14px; border-top: 1px solid var(--stroke); }
.cbw-input {
  margin: 0; border: 0; border-top: 1px solid var(--stroke);
  border-radius: 0; background: var(--bg);
  padding: 12px 14px;
}
.cbw-input input {
  flex: 1;
  background: transparent; border: 0; color: var(--text);
  font: 13px var(--font-mono);
  padding: 4px 0;
}
.cbw-input input::placeholder { color: var(--dim); }
.cbw-input input:focus { outline: none; }
.cbw-send {
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--accent); color: #0B0B0F;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; transition: transform .2s;
}
.cbw-send:hover { transform: scale(1.05); }

/* Typing indicator */
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dim);
  animation: typing 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- REVEAL ON SCROLL ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .proc-steps { grid-template-columns: repeat(2, 1fr); }
  .svc-grid { grid-template-columns: 1fr; }
  .case-card { grid-template-columns: 1fr; }
  .case-visual { min-height: 180px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-side { position: static; }
  .contact-card { grid-template-columns: 1fr; gap: 32px; padding: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .section { padding: 72px 20px; }
  .hero { padding: 48px 20px 32px; }
  .hero > .chip-list > .chip:nth-child(n+8) { display: none; }
  .topbar { padding: 12px 16px; }
  .topbar-nav, .topbar-right, .topbar-meta { display: none; }
  .menu-toggle { display: flex; }
  body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .menu-toggle span { transition: transform .2s, opacity .2s; transform-origin: center; }
  .hero h1 { max-width: none; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .case-card, .svc, .contact-card, .pstep { padding: 20px; }
  .cbw-launcher { right: 16px; bottom: 16px; padding: 10px 14px; }
  .chatbot-widget { right: 8px; left: 8px; bottom: 8px; width: auto; max-height: calc(100vh - 16px); }
}

@media (max-width: 480px) {
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .proc-steps { grid-template-columns: 1fr; }
  .case-visual { min-height: 160px; padding: 18px; }
  .case-big { font-size: 72px; }
}

/* ---------- PRINT ---------- */
@media print {
  .topbar, .mobile-menu, .cbw-launcher, .chatbot-widget, .contact-form, .hero-chatbot { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
