/* 40 Below Labs — site styles
   Brand: logo blue #384ca4, accent purple #b742ed, Cabin (headings) + Roboto (body). */

:root {
  --brand: #384ca4;
  --brand-dark: #263578;
  --brand-light: #e9ecf8;
  --accent: #b742ed;
  --ice: #8fd3ff;
  --navy: #0d1530;
  --navy-2: #151f42;
  --ink: #1b2033;
  --muted: #5a6075;
  --line: #e2e5ee;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(13, 21, 48, .06), 0 8px 24px rgba(13, 21, 48, .06);
  --max: 1140px;
  --font-head: "Cabin", system-ui, sans-serif;
  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 56px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; color: var(--ink); font-family: var(--font-head);
  font-weight: 600; font-size: 1rem;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--brand); }
.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  font: 600 1rem var(--font-head); color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-outline { border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.nav-links .btn { padding: 9px 18px; color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(183, 66, 237, .28), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(56, 76, 164, .55), transparent 60%),
    var(--navy);
  color: #dfe5f7;
  padding: 104px 0 96px;
}
.hero::before { /* faint circuit grid */
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(143, 211, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 211, 255, .06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.hero .container { position: relative; }
.hero h1 { color: #fff; max-width: 19ch; }
.hero .lead { font-size: 1.2rem; max-width: 58ch; color: #c5cde6; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ice); margin-bottom: 18px;
}
[hidden] { display: none !important; }

/* "Is it 40 below at 40 Below?" live wind chill readout, beside the header logo */
.nav-start { display: flex; align-items: center; gap: 18px; min-width: 0; }
.chill {
  display: flex; flex-direction: column; line-height: 1.3;
  padding-left: 18px; border-left: 1px solid var(--line); white-space: nowrap;
}
.chill-q {
  font-family: var(--font-head); font-weight: 600; font-size: .68rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.chill-line { font-size: .92rem; color: var(--ink); }
.chill-answer { font-family: var(--font-head); font-weight: 700; color: var(--brand); }
.chill-answer.is-yes { color: #1a8fd6; }
.chill-detail { color: var(--muted); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 48px; padding: 0; list-style: none; }
.hero-chips li {
  font-size: .85rem; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, .25); color: #b9c4e6;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.page-hero { padding: 72px 0 64px; }
.page-hero h1 { max-width: 20ch; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.kicker {
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px; display: block;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.icon {
  width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-light); color: var(--brand); margin-bottom: 18px;
}
.icon svg { width: 24px; height: 24px; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px;
  border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand);
  transform: rotate(-45deg);
}

/* Project cards */
.project { display: flex; flex-direction: column; }
.project .tag {
  align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); background: var(--brand-light);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; font-family: var(--font-head);
}

.project p.client {
  margin: -6px 0 10px; font-family: var(--font-head); font-weight: 600; color: var(--ink);
}

/* Tech stack */
.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.stack h4 {
  font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 12px;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pills li {
  font-size: .9rem; padding: 5px 11px; border-radius: 6px; background: #fff;
  border: 1px solid var(--line);
}

/* Process steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 56px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: 0; left: 0; font-family: var(--font-head); font-weight: 700;
  font-size: 2rem; color: var(--brand); opacity: .35;
}

/* Split layouts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split .portrait { max-width: 340px; width: 100%; margin: 0 auto; border-radius: 50%; aspect-ratio: 1; object-fit: cover; }

/* Industries strip */
.industries { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0; }
.industries li {
  padding: 10px 18px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 600;
}

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--brand-dark), var(--brand) 55%, #6a3fc0);
  color: #e8ecfa; text-align: center; padding: 80px 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 56ch; margin: 0 auto 28px; font-size: 1.1rem; }
.cta-band .btn-primary { background: #fff; color: var(--brand-dark); }
.cta-band .btn-primary:hover { background: var(--brand-light); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; }
form .field { margin-bottom: 18px; }
label { display: block; font-weight: 500; margin-bottom: 6px; font-size: .95rem; }
input, textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid #cfd4e2; border-radius: 8px;
  font: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(56, 76, 164, .15);
}
textarea { min-height: 160px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.contact-aside .card + .card { margin-top: 20px; }
.form-note { font-size: .9rem; color: var(--muted); }

/* ---------- Blog ---------- */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin-top: 1.8em; font-size: 1.6rem; }
.prose pre {
  background: var(--navy); color: #dfe5f7; padding: 18px; border-radius: 8px;
  overflow-x: auto; font-size: .9rem;
}
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
.post-meta { color: var(--muted); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #9aa5c7; padding: 56px 0 32px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a { color: #c5cde6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-logo { height: 52px; width: auto; filter: brightness(0) invert(1); opacity: .9; margin-bottom: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 40px; padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-start { gap: 12px; }
  .chill { padding-left: 12px; }
  .chill-q { font-size: .6rem; letter-spacing: .04em; }
  .chill-line { font-size: .8rem; }
  .nav-links {
    display: none; position: absolute; top: 80px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 12px 0; }
  .nav-links .btn { text-align: center; margin-top: 8px; }
  section { padding: 64px 0; }
  .hero { padding: 72px 0 64px; }
  .grid-2, .grid-3, .grid-4, .stack, .field-row, .footer-grid { grid-template-columns: 1fr; }
}
