/* ============================================================
   BiTech — shared stylesheet
   Layout: light, airy agency site. Sticky translucent header,
   generous section rhythm, one gradient accent used sparingly.
   Tokens live on :root and are redefined for dark mode.
   ============================================================ */

:root {
  /* brand */
  --ink:        #0c1424;
  --ink-2:      #152138;
  --brand:      #4f46e5;
  --brand-dark: #4338ca;
  --accent:     #0891b2;
  --accent-br:  #22d3ee;

  /* surfaces */
  --bg:         #ffffff;
  --bg-alt:     #f6f8fc;
  --surface:    #ffffff;
  --border:     #e3e8f1;
  --border-str: #cbd4e2;

  /* text */
  --text:       #0c1424;
  --text-2:     #51607a;
  --text-3:     #7a879c;
  --on-dark:    #eef2f9;
  --on-dark-2:  #9fadc5;

  /* type */
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* shape */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --shadow:    0 1px 2px rgba(12,20,36,.05), 0 10px 26px -14px rgba(12,20,36,.16);
  --shadow-lg: 0 2px 5px rgba(12,20,36,.06), 0 28px 54px -24px rgba(12,20,36,.26);

  --maxw: 1160px;
  --grad: linear-gradient(118deg, var(--brand) 0%, var(--accent) 100%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:         #080d18;
    --bg-alt:     #0d1526;
    --surface:    #111b2e;
    --border:     #1e2b45;
    --border-str: #2b3a59;
    --text:       #eef2f9;
    --text-2:     #a7b4ca;
    --text-3:     #8693ab;
    --brand:      #818cf8;
    --brand-dark: #6366f1;
    --accent:     #22d3ee;
    --shadow:    0 1px 2px rgba(0,0,0,.45), 0 10px 26px -14px rgba(0,0,0,.65);
    --shadow-lg: 0 2px 5px rgba(0,0,0,.45), 0 28px 54px -24px rgba(0,0,0,.75);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:         #080d18;
  --bg-alt:     #0d1526;
  --surface:    #111b2e;
  --border:     #1e2b45;
  --border-str: #2b3a59;
  --text:       #eef2f9;
  --text-2:     #a7b4ca;
  --text-3:     #8693ab;
  --brand:      #818cf8;
  --brand-dark: #6366f1;
  --accent:     #22d3ee;
  color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.025em;
  text-wrap: balance;
}
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.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;
}

/* ---------- demo ribbon ---------- */

.demo-ribbon {
  background: var(--ink);
  color: var(--on-dark-2);
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  padding: 7px 20px;
}
.demo-ribbon strong { color: var(--accent-br); font-weight: 700; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 72px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }

/* Mark: a B built from two equal semicircular bowls — "Bi" = two.
   Stem + upper bowl in brand, lower bowl in accent. */
.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.brand-mark path:first-child { stroke: var(--brand); }
.brand-mark path:last-child  { stroke: var(--accent); }

/* The footer sits on ink in both themes, so it needs the brighter pair. */
.site-footer .brand-mark path:first-child { stroke: #818cf8; }
.site-footer .brand-mark path:last-child  { stroke: var(--accent-br); }

.brand-word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21.5px;
  letter-spacing: -.04em;
}
/* Weight contrast rather than a greyed half: the lockup splits Bi | Tech
   the same way the mark does, without losing contrast on either theme. */
.brand-word em { font-style: normal; font-weight: 500; }

.brand:hover .brand-mark path:first-child,
.brand:hover .brand-mark path:last-child { stroke: var(--brand); transition: stroke .18s; }
.site-footer .brand:hover .brand-mark path:first-child,
.site-footer .brand:hover .brand-mark path:last-child { stroke: var(--accent-br); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav > a {
  padding: 9px 13px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  transition: color .15s, background .15s;
}
.nav > a:hover { color: var(--text); background: var(--bg-alt); }
.nav > a[aria-current="page"] { color: var(--brand); font-weight: 600; }

.header-cta { flex: none; }

.nav-toggle {
  display: none;
  width: 44px; height: 40px;
  background: none;
  border: 1px solid var(--border-str);
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform .12s, box-shadow .16s, background .16s, border-color .16s, color .16s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(79,70,229,.55);
}
.btn-primary:hover { box-shadow: 0 14px 30px -10px rgba(79,70,229,.7); }

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-str);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

.btn-on-dark {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(255,255,255,.3);
}
.btn-on-dark:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.08); }

.btn-sm { padding: 10px 16px; font-size: 14.5px; }
.btn-block { width: 100%; }

/* ---------- sections ---------- */

.section { padding-block: 92px; }
.section-tight { padding-block: 64px; }
.section-alt { background: var(--bg-alt); }

.section-dark {
  background: radial-gradient(120% 120% at 15% 0%, var(--ink-2) 0%, var(--ink) 60%, #060a12 100%);
  color: var(--on-dark);
}
.section-dark .section-sub,
.section-dark .lede { color: var(--on-dark-2); }

.head { max-width: 680px; margin-bottom: 52px; }
.head-center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}
.section-dark .eyebrow { color: var(--accent-br); }

.section-title { font-size: clamp(1.75rem, 3.7vw, 2.55rem); margin-bottom: 14px; }
.section-sub { color: var(--text-2); font-size: 17px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  background: radial-gradient(125% 115% at 12% -10%, var(--ink-2) 0%, var(--ink) 58%, #05090f 100%);
  color: var(--on-dark);
  overflow: hidden;
  padding-block: 86px 0;
}
.hero::after {
  content: "";
  position: absolute;
  right: -12%; top: -28%;
  width: 640px; height: 640px;
  max-width: 90%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(99,102,241,.4), transparent 72%);
  filter: blur(14px);
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 720px; }
.hero .eyebrow { color: var(--accent-br); }

.hero h1 {
  font-size: clamp(2.25rem, 5.6vw, 3.65rem);
  letter-spacing: -.035em;
  margin-bottom: 22px;
}
.grad {
  background: linear-gradient(96deg, var(--accent-br) 5%, #a5b4fc 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(1.02rem, 2vw, 1.19rem);
  color: var(--on-dark-2);
  max-width: 610px;
  margin-bottom: 34px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-note {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--on-dark-2);
}

/* stats band */

.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 72px;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.11);
  border-bottom: none;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden;
}
.stat { background: rgba(8,13,24,.55); padding: 26px 18px; text-align: center; }
.stat dt { font-size: 12.5px; color: var(--on-dark-2); margin-bottom: 7px; }
.stat dd {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(1.45rem, 3.3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: #fff;
}
.stat dd span { color: var(--accent-br); }

/* ---------- page hero (inner pages) ---------- */

.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding-block: 64px 58px;
}
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); margin-bottom: 16px; }
.page-hero p { color: var(--text-2); font-size: 17.5px; max-width: 620px; }

/* ---------- service cards ---------- */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(282px, 1fr));
  gap: 22px;
}
.svc {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-str); }

.svc-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--grad);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  flex: none;
}
.svc-icon svg { width: 21px; height: 21px; stroke: #fff; fill: none; stroke-width: 1.9; }

.svc h3 { font-size: 1.17rem; margin-bottom: 10px; }
.svc > p { color: var(--text-2); font-size: 15.2px; margin-bottom: 20px; }

.ticks { display: grid; gap: 9px; margin-top: auto; }
.ticks li {
  position: relative;
  padding-left: 25px;
  font-size: 14.8px;
  color: var(--text-2);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 8px;
  width: 11px; height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- technologies ---------- */

.tech-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 34px 28px;
}
.tech-group h3 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.tech-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-list li {
  font-size: 14px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.section-alt .tech-list li { background: var(--bg); }

/* ---------- portfolio ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.work {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.work-art {
  height: 136px;
  background: var(--grad);
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
}
.work-art::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 26px 26px;
}
.work-art span {
  position: relative;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(10,16,28,.42);
  border: 1px solid rgba(255,255,255,.28);
  padding: 6px 13px;
  border-radius: 999px;
}
.work-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.work h3 { font-size: 1.14rem; margin-bottom: 10px; }
.work > .work-body > p { color: var(--text-2); font-size: 15px; margin-bottom: 16px; }

.outcomes { display: grid; gap: 7px; margin-bottom: 18px; }
.outcomes li { font-size: 14px; color: var(--text-2); display: flex; gap: 9px; }
.outcomes li strong { color: var(--text); font-variant-numeric: tabular-nums; flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.chips li {
  font-size: 11.8px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--brand) 11%, transparent);
  color: var(--brand);
}

.work-note {
  margin-top: 30px;
  text-align: center;
  font-size: 14.5px;
  color: var(--text-3);
}

/* ---------- process ---------- */

.process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
  counter-reset: step;
}
.process li { position: relative; padding-top: 26px; }
.process li::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--border-str);
}
.process li:first-child::before { background: var(--grad); }
.step-no {
  display: block;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--brand);
  margin-bottom: 9px;
}
.process h3 { font-size: 1.1rem; margin-bottom: 9px; }
.process p { font-size: 14.8px; color: var(--text-2); }
.section-dark .process p { color: var(--on-dark-2); }
.section-dark .process li::before { background: rgba(255,255,255,.16); }
.section-dark .process li:first-child::before { background: var(--grad); }
.section-dark .step-no { color: var(--accent-br); }

/* ---------- value / principle rows ---------- */

.principles { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.principle { background: var(--surface); padding: 28px 26px; }
.principle h3 { font-size: 1.08rem; margin-bottom: 9px; }
.principle p { color: var(--text-2); font-size: 15.2px; }

@media (min-width: 780px) {
  .principles { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- facts list ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.fact {
  border-left: 3px solid var(--brand);
  padding-left: 16px;
}
.fact dt { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 5px; }
.fact dd { margin: 0; font-size: 16px; font-weight: 600; }

/* ---------- careers ---------- */

.roles { display: grid; gap: 14px; }
.role {
  display: grid;
  gap: 6px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  transition: border-color .16s, box-shadow .16s;
}
.role:hover { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.role h3 { font-size: 1.1rem; }
.role-meta { font-size: 14px; color: var(--text-3); }
.role-meta span + span::before { content: "·"; margin: 0 9px; color: var(--border-str); }
.role p { font-size: 14.8px; color: var(--text-2); }
.role .btn { justify-self: start; }

@media (min-width: 760px) {
  .role {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .role h3, .role-meta, .role p { grid-column: 1; }
  .role .btn { grid-column: 2; grid-row: 1 / span 3; justify-self: end; }
}

.referral {
  margin-top: 34px;
  background: var(--surface);
  border: 1px dashed var(--border-str);
  border-radius: var(--r);
  padding: 26px;
}
.referral h3 { font-size: 1.08rem; margin-bottom: 9px; }
.referral p { color: var(--text-2); font-size: 15.2px; }

/* ---------- contact ---------- */

.contact-grid { display: grid; gap: 42px; align-items: start; }
@media (min-width: 920px) { .contact-grid { grid-template-columns: 1fr 1.05fr; gap: 60px; } }

.contact-points { display: grid; gap: 16px; margin-top: 30px; }
.contact-points li { font-size: 15.2px; color: var(--text-2); padding-left: 18px; border-left: 2px solid var(--border-str); }
.contact-points strong { color: var(--text); }

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 17px;
}
.form-row { display: grid; gap: 17px; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg);
  border: 1px solid var(--border-str);
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
.field .is-error, .field input.is-error, .field textarea.is-error { border-color: #dc2626; }

.form-note { font-size: 14px; font-weight: 600; min-height: 1.2em; }
.form-note.is-ok  { color: #047857; }
.form-note.is-bad { color: #dc2626; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-note.is-ok  { color: #34d399; }
  :root:not([data-theme="light"]) .form-note.is-bad { color: #f87171; }
}
.form-fine { font-size: 12.5px; color: var(--text-3); text-align: center; }

/* ---------- closing CTA ---------- */

.closing { text-align: center; }
.closing h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 16px; }
.closing p { color: var(--on-dark-2); font-size: 17.5px; max-width: 540px; margin: 0 auto 30px; }
.closing .cta-row { justify-content: center; }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: var(--on-dark-2); padding-block: 64px 0; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 38px;
  padding-bottom: 46px;
}
.footer-brand .brand { margin-bottom: 15px; }
.footer-brand .brand-word { color: #fff; }
.footer-brand .brand-word em { color: var(--on-dark-2); }
.footer-brand p { font-size: 14.8px; max-width: 290px; }
.footer-dom { margin-top: 12px; color: var(--accent-br); font-weight: 600; font-size: 14.5px; }

.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 3px;
}
.footer-col a { font-size: 14.8px; transition: color .15s; }
.footer-col a:hover { color: var(--accent-br); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-block: 22px 30px;
  font-size: 13px;
}

/* ---------- mobile ---------- */

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
    box-shadow: var(--shadow-lg);
  }
  .nav.is-open { display: flex; }
  .nav > a { padding: 12px; font-size: 16.5px; }
  .nav .nav-cta {
    margin-top: 10px;
    background: var(--grad);
    color: #fff;
    text-align: center;
    font-weight: 600;
  }
  .nav .nav-cta:hover { color: #fff; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding-block: 64px; }
  .hero { padding-block: 58px 0; }
  .head { margin-bottom: 40px; }
}

@media (min-width: 901px) {
  .nav .nav-cta { display: none; }
}

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