/* ============================================================
   Darvin Data Science — Managed Security Services
   main.css — design system + all page styles
   No external dependencies. Edit tokens below to rebrand.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette — change these to rebrand the whole site */
  --bg: #070d1a;
  --bg-2: #0a1322;
  --surface: #0f1a2e;
  --surface-2: #142340;
  --surface-3: #1a2c50;

  --border: rgba(148, 184, 255, 0.12);
  --border-strong: rgba(148, 184, 255, 0.24);

  --text: #eaf1fb;
  --text-muted: #9fb0cc;
  --text-dim: #6d7f9d;

  --accent: #E8631A;         /* brand orange (logo) */
  --accent-2: #FFA45C;       /* light orange highlight */
  --accent-soft: rgba(232, 99, 26, 0.14);
  --trust: #10b981;          /* green "secure" indicator */
  --warn: #f59e0b;
  --danger: #ef4444;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;

  --shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.65);
  --glow: 0 0 60px -12px rgba(232, 99, 26, 0.5);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;

  --maxw: 1180px;
  --nav-h: 72px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(232, 99, 26, 0.35); }

/* subtle scrollbar (Firefox + WebKit) */
html { scrollbar-color: #22344f var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #22344f; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2e4569; }

/* subtle page background texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(232, 99, 26, 0.08), transparent 60%),
    radial-gradient(1000px 700px at 0% 10%, rgba(232, 99, 26, 0.10), transparent 55%),
    var(--bg);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }
.section { padding: 96px 0; }
.section--tight { padding: 72px 0; }
.section--alt { background: linear-gradient(180deg, var(--bg-2), transparent); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--accent-soft);
  margin-bottom: 20px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--trust);
  box-shadow: 0 0 10px var(--trust);
}

.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.section-head p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 1.06rem;
}

.lead { color: var(--text-muted); font-size: 1.1rem; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #C2410C);
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(232, 99, 26, 0.5);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(232, 99, 26, 0.6); }
.btn--ghost {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--accent); }
.btn--lg { padding: 15px 30px; font-size: 1.02rem; }
.btn--sm { padding: 9px 16px; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(7, 13, 26, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); background: rgba(7, 13, 26, 0.9); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.01em; }
.brand__mark { width: 34px; height: 34px; flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; font-size: 1.02rem; }
.brand__name { display: block; white-space: nowrap; }
.brand__text small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  padding: 9px 15px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s ease, background .15s ease;
}
.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav__links a.active { color: var(--text); background: var(--accent-soft); }
/* CTA copy lives in the links list so it appears inside the mobile menu;
   hidden on desktop where the nav__cta button is used instead. */
.nav__links .btn { display: none; }
.nav__cta { display: flex; align-items: center; gap: 12px; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.nav__toggle svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 84px; overflow: hidden; }
.hero__grid-bg {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(148,184,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,184,255,0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%);
}
.hero__glow {
  position: absolute; z-index: -1;
  width: 620px; height: 620px; left: 50%; top: -220px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(232,99,26,0.22), transparent 62%);
  filter: blur(10px);
}
.hero__inner { max-width: 820px; margin: 0 auto; text-align: center; }
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent-2), var(--accent) 60%, #C2410C);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub {
  margin: 24px auto 0;
  max-width: 660px;
  color: var(--text-muted);
  font-size: 1.16rem;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  justify-content: center;
  margin-top: 26px;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 16px; height: 16px; color: var(--trust); }

/* trust strip */
.trustbar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  padding: 26px 0;
}
.trustbar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.trustbar .stat b {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #fff, #b9ccf2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.trustbar .stat span { font-size: 0.86rem; color: var(--text-dim); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* centered card rows for odd counts (e.g. 5 cards on the home page):
   3-up on wide screens, 2-up on tablets, stacked on phones */
.grid--cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.grid--cards .card { width: calc((100% - 44px) / 3); }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent-2);
  margin-bottom: 18px;
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.97rem; }
.card a.more {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 16px; font-weight: 600; font-size: 0.92rem; color: var(--accent-2);
}
.card a.more svg { width: 15px; height: 15px; transition: transform .15s ease; }
.card a.more:hover svg { transform: translateX(4px); }

/* feature list (about / process) */
.feature {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.feature:last-child { border-bottom: 0; }
.feature__n {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent-2);
  font-weight: 800;
}
.feature h3 { font-size: 1.12rem; margin-bottom: 6px; }
.feature p { color: var(--text-muted); font-size: 0.97rem; }

/* badge / chip */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}
.chip svg { width: 16px; height: 16px; color: var(--trust); }
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding: 84px 0 40px; position: relative; overflow: hidden; }
.page-hero__grid-bg {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(148,184,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,184,255,0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 30% 0%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 90% at 30% 0%, #000 30%, transparent 80%);
}
.breadcrumb { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 18px; display: flex; gap: 8px; }
.breadcrumb a:hover { color: var(--accent-2); }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.3rem); letter-spacing: -0.025em; line-height: 1.08; font-weight: 800; max-width: 760px; }
.page-hero p.sub { margin-top: 18px; max-width: 680px; color: var(--text-muted); font-size: 1.1rem; }

/* services detail block */
.service-block {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 46px 0;
  border-bottom: 1px solid var(--border);
}
.service-block:last-of-type { border-bottom: 0; }
.service-block:nth-child(even) .service-block__media { order: -1; }
.service-block h2 { font-size: 1.7rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.service-block p { color: var(--text-muted); margin-bottom: 18px; }
.service-block ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.service-block ul li { display: flex; gap: 11px; align-items: flex-start; color: var(--text-muted); font-size: 0.97rem; }
.service-block ul li svg { width: 19px; height: 19px; color: var(--trust); flex: 0 0 auto; margin-top: 2px; }
.service-block__media {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(420px 220px at 70% 10%, rgba(232,99,26,0.14), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--bg-2));
  min-height: 280px;
  display: grid; place-items: center;
  padding: 34px;
}
.service-block__media svg { width: 120px; height: 120px; color: var(--accent-2); opacity: 0.9; }

/* industry cards */
.industry {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform .18s ease, border-color .18s ease;
}
.industry:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.industry__top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.industry__top .card__icon { margin: 0; }
.industry h3 { font-size: 1.16rem; }
.industry p { color: var(--text-muted); font-size: 0.96rem; margin-bottom: 16px; }
.industry ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.industry ul li { display: flex; gap: 9px; font-size: 0.9rem; color: var(--text-muted); }
.industry ul li svg { width: 16px; height: 16px; color: var(--trust); flex: 0 0 auto; margin-top: 3px; }

/* team */
.team {
  text-align: center;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 22px;
}
.team__avatar {
  width: 92px; height: 92px; margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.7rem; font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #FFA45C);
  border: 2px solid var(--border-strong);
}
.team h3 { font-size: 1.08rem; }
.team .role { color: var(--accent-2); font-size: 0.88rem; font-weight: 600; margin-top: 3px; }
.team p { color: var(--text-dim); font-size: 0.9rem; margin-top: 12px; }

/* values / about two-col */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.two-col--sticky .two-col__side { position: sticky; top: calc(var(--nav-h) + 24px); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  background:
    radial-gradient(600px 260px at 20% 0%, rgba(232,99,26,0.14), transparent 60%),
    radial-gradient(500px 260px at 90% 120%, rgba(232,99,26,0.16), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--bg-2));
  overflow: hidden;
  text-align: center;
}
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -0.02em; margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.field label .req { color: var(--accent-2); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 15px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 99, 26, 0.25);
}
.field textarea { resize: vertical; min-height: 140px; }
.field .hint { font-size: 0.82rem; color: var(--text-dim); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-status { display: none; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.95rem; }
.form-status.is-visible { display: block; }
.form-status--ok { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.4); color: #6ee7b7; }
.form-status--err { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }

/* turnstile wrapper (hidden until a site key is configured) */
.turnstile-wrap { display: none; }
.turnstile-wrap.has-key { display: block; }

/* contact info card */
.contact-info {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  display: grid; gap: 22px;
}
.contact-info__row { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.contact-info__row .card__icon { width: 44px; height: 44px; margin: 0; }
.contact-info__row b { display: block; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 3px; }
.contact-info__row a:hover { color: var(--accent-2); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 64px 0 32px;
  margin-top: 40px;
}
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer__brand p { color: var(--text-muted); font-size: 0.95rem; margin-top: 16px; max-width: 320px; }
.footer h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; display: grid; gap: 11px; }
.footer ul a { color: var(--text-muted); font-size: 0.95rem; transition: color .15s ease; }
.footer ul a[data-email], .footer ul a[data-tel] { color: var(--text); }
.footer ul a:hover { color: var(--text); text-decoration: underline; }
.footer__bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
  color: var(--text-dim); font-size: 0.88rem;
}
.footer__socials svg { width: 18px; height: 18px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .industry { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--cards .card { width: calc((100% - 22px) / 2); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .service-block { grid-template-columns: 1fr; gap: 28px; }
  .service-block:nth-child(even) .service-block__media { order: 0; }
  .service-block__media { min-height: 220px; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .two-col--sticky .two-col__side { position: static; }
  .trustbar .container { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
/* nav collapses to a hamburger below 700px; between 700px and 980px the
   full nav (3 links + wordmark + CTA) still fits and stays visible */
@media (max-width: 700px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav.is-open .nav__links {
    display: flex;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px 24px 22px;
    background: #070d1a;
    border-bottom: 1px solid var(--border);
  }
  .nav.is-open .nav__links a { padding: 13px 16px; font-size: 1rem; }
  .nav.is-open .nav__links .btn { display: inline-flex; margin-top: 8px; }
}
@media (max-width: 760px) {
  .section { padding: 72px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid--cards .card { width: 100%; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 26px; }
  .hero { padding: 72px 0 64px; }
}
