/* ============================================
   3BP — Brand stylesheet
   Palette taken from the 3BP logo
   ============================================ */
:root {
  --navy: #171d4f;        /* logo wordmark / darkest */
  --navy-2: #1e2563;      /* logo ring */
  --royal: #1c2a7a;       /* navy wave */
  --blue: #2b9ce8;        /* bright wave — buttons, accents */
  --blue-ink: #1173bd;    /* accessible bright blue — small text & links on light bg */
  --sky: #56c1f5;         /* bright wave highlight */
  --ice: #eaf4fc;         /* light tint background */
  --white: #ffffff;
  --ink: #232842;         /* body text */
  --muted: #5a6178;
  --font-display: "Archivo", "Segoe UI", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;
  --radius: 4px;
  --line: #d8dee9;        /* light slate hairline borders */
  --line-strong: #a3adc4; /* hover border */
  --maxw: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: var(--white); font-weight: 700;
  padding: 12px 20px; border-radius: 0 0 4px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 3px solid var(--blue);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 52px; height: 52px; }
.brand-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: var(--navy); letter-spacing: 0.5px; line-height: 1.2; }
.brand-tag { display: block; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; color: var(--blue-ink); letter-spacing: 1.4px; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--navy); font-weight: 600; font-size: 0.95rem;
  padding: 8px 14px; border-radius: 4px; transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: var(--ice); color: var(--royal); }
.nav-links a.active { color: var(--blue-ink); }
.nav-links a.btn-nav {
  background: var(--blue); color: var(--white); margin-left: 8px;
}
.nav-links a.btn-nav:hover { background: var(--royal); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, var(--royal) 55%, #1f4fa3 100%);
  color: var(--white);
  overflow: hidden;
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 96px 24px 120px;
  position: relative; z-index: 2;
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; line-height: 1.12; max-width: 720px; }
.hero h1 em { font-style: normal; color: var(--sky); }
.hero p.lead { font-size: 1.2rem; max-width: 640px; margin: 20px 0 32px; color: #d6e9fa; }
.hero .eyebrow { color: var(--sky); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-cta .btn-outline { margin-left: 0; margin-top: 0; }
.hero-wave {
  position: absolute; bottom: -1px; left: 0; width: 100%; z-index: 1;
}
.hero.compact .hero-inner { padding: 64px 24px 80px; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  font-family: var(--font-display);
  padding: 14px 28px; border-radius: 4px; transition: all 0.2s; font-size: 1rem;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--sky); color: var(--navy); }
.btn-outline { border: 2px solid var(--sky); color: var(--white); margin-left: 12px; }
.btn-outline:hover { background: var(--sky); color: var(--navy); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--royal); }
.btn-light { background: var(--white); color: var(--royal); }
.btn-light:hover { background: var(--ice); color: var(--navy); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.tint { background: var(--ice); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { font-size: 2rem; color: var(--navy); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-cta { text-align: center; margin-top: 36px; }
.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 2.2px; text-transform: uppercase; color: var(--blue-ink); margin-bottom: 10px;
}

/* ---------- Stats band ---------- */
.stats-band { background: var(--navy); color: var(--white); padding: 48px 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px; text-align: center;
}
.stat-num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; color: var(--sky); }
.stat-label { font-size: 0.9rem; color: #c9defa; margin-top: 4px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 32px;
  border: 1px solid var(--line); border-top: 3px solid var(--blue);
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--line-strong); border-top-color: var(--blue); }
.card h3 { color: var(--navy); margin-bottom: 10px; font-size: 1.2rem; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card ul { margin: 12px 0 0 18px; color: var(--muted); font-size: 0.95rem; }
.card-icon { width: 36px; height: 36px; margin-bottom: 22px; }
.card-icon svg { width: 100%; height: 100%; display: block; }
.card-step {
  display: block; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase; color: var(--blue-ink); margin-bottom: 4px;
}

/* ---------- Pillars ---------- */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.pillar {
  background: linear-gradient(160deg, var(--royal), var(--navy));
  color: var(--white); border-radius: var(--radius); padding: 32px 26px;
}
.pillar h3 { color: var(--sky); font-size: 1.05rem; margin-bottom: 10px; }
.pillar p { color: #d6e9fa; font-size: 0.92rem; }

/* ---------- Project / case study ---------- */
.project-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  margin-bottom: 64px;
}
.project-row:last-child { margin-bottom: 0; }
.project-visual {
  background: linear-gradient(150deg, var(--ice), #d4e9f9);
  border-radius: var(--radius); min-height: 280px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); overflow: hidden;
}
.project-visual img { width: 100%; height: 100%; object-fit: cover; }
.project-meta { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--blue-ink); }
.project-row h3 { font-size: 1.5rem; color: var(--navy); margin: 8px 0 14px; }
.feature-list { margin: 14px 0 0 18px; color: var(--muted); }
.feature-list li { margin-bottom: 4px; }
.metric-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  background: var(--ice); color: var(--royal); font-weight: 700; font-size: 0.85rem;
  padding: 8px 14px; border-radius: 3px; border: 1px solid #c6e0f5;
}

/* ---------- Program-effect simulator ---------- */
.sim-card {
  background: var(--white); border-radius: var(--radius); padding: 32px;
  border: 1px solid var(--line); border-top: 3px solid var(--blue);
}
.sim-controls { margin-bottom: 18px; }
.sim-label {
  display: block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase; color: var(--blue-ink); margin-bottom: 10px;
}
.sim-controls input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px; border-radius: 999px; margin: 10px 0 2px;
  background: linear-gradient(90deg, var(--blue) 0%, #d7e5f2 0%);
  cursor: pointer;
}
.sim-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--blue);
  box-shadow: 0 2px 0 rgba(23, 29, 79, 0.25);
  cursor: grab;
}
.sim-controls input[type="range"]::-webkit-slider-thumb:active { cursor: grabbing; }
.sim-controls input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--blue);
  box-shadow: 0 2px 0 rgba(23, 29, 79, 0.25);
  cursor: grab;
}
.sim-controls input[type="range"]::-moz-range-thumb:active { cursor: grabbing; }
.sim-controls input[type="range"]::-moz-range-track { height: 10px; border-radius: 999px; background: transparent; }
.sim-hint {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--blue-ink);
}
.sim-hint-arrow { display: inline-block; animation: sim-nudge 1.6s ease-in-out infinite; }
@keyframes sim-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}
.sim-readout { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sim-panel { margin: 0; }
.sim-panel figcaption {
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  color: var(--navy); margin-bottom: 10px;
}
.sim-panel > svg { width: 100%; height: auto; background: #f4f9fe; border: 1px solid var(--line); border-radius: var(--radius); }
.sim-legend {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px;
  font-size: 0.82rem; color: var(--muted);
}
.sim-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sim-lats line {
  stroke: #c23934; stroke-width: 2.5; stroke-dasharray: 4 3;
  transition: stroke 0.25s, stroke-width 0.25s;
}
.sim-lats line.lined { stroke: #1e9e63; stroke-width: 4; stroke-dasharray: none; }
.sim-mains line {
  stroke: #c23934; stroke-width: 5; stroke-dasharray: 6 4; stroke-linecap: round;
  transition: stroke 0.25s, stroke-width 0.25s;
}
.sim-mains line.lined { stroke: #1e9e63; stroke-width: 6; stroke-dasharray: none; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--royal), var(--blue));
  color: var(--white); text-align: center; padding: 64px 24px;
}
.cta-band h2 { font-size: 2rem; margin-bottom: 12px; }
.cta-band p { color: #e4f2fd; margin-bottom: 28px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-form { background: var(--white); border-radius: var(--radius); padding: 36px; border: 1px solid var(--line); border-top: 3px solid var(--blue); }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; font-size: 0.92rem; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid #ccd6e8; border-radius: 4px;
  font-size: 0.95rem; font-family: inherit; color: var(--ink);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43, 156, 232, 0.15);
}
.form-submit { border: none; cursor: pointer; width: 100%; }
.form-status { display: none; margin-top: 14px; padding: 12px 16px; border-radius: 4px; font-size: 0.92rem; font-weight: 600; }
.form-status.ok { display: block; background: #e7f6ef; color: #14603d; border: 1px solid #bfe5d2; }
.form-status.err { display: block; background: #fdeceb; color: #8c2723; border: 1px solid #f3c9c6; }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 12px; text-align: center; }
.form-note a { color: var(--blue-ink); }
.info-block { margin-bottom: 28px; }
.info-block h3 { color: var(--navy); margin-bottom: 6px; }
.info-block a { color: var(--blue-ink); font-weight: 700; text-decoration: none; }
.info-block a:hover { text-decoration: underline; }

/* ---------- Consent banner ---------- */
.consent-bar {
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 150;
  max-width: 760px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px;
  background: var(--navy); color: #d6e9fa; padding: 14px 20px;
  border-radius: var(--radius); border: 1px solid rgba(86, 193, 245, 0.4);
  box-shadow: 0 3px 0 rgba(23, 29, 79, 0.25);
  font-size: 0.9rem;
}
.consent-bar p { margin: 0; }
.btn-consent {
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 8px 18px; border-radius: 4px;
  background: none; border: 2px solid var(--sky); color: var(--white);
}
.btn-consent.accept { background: var(--blue); border-color: var(--blue); }
.btn-consent.accept:hover { background: var(--sky); color: var(--navy); }
.btn-consent.decline:hover { background: rgba(86, 193, 245, 0.15); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9cce6; padding: 56px 0 28px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
}
.footer-grid h4 { color: var(--white); margin-bottom: 14px; font-size: 1rem; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #b9cce6; text-decoration: none; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--sky); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 44px; height: 44px; }
.footer-brand span { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--white); }
.footer-contact { margin-top: 12px; }
.footer-contact a { color: #b9cce6; }
.footer-contact a:hover { color: var(--sky); }
.footer-bottom {
  text-align: center; margin-top: 40px; padding-top: 20px;
  border-top: 1px solid rgba(185, 204, 230, 0.2); font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--white); padding: 16px 24px 24px;
    border-bottom: 3px solid var(--blue); gap: 8px; align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .nav-links a.btn-nav { margin-left: 0; text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid > div:last-child { grid-column: 1 / -1; }
  .project-row, .form-grid, .sim-grid { grid-template-columns: 1fr; }
  .sim-card { padding: 22px 18px; }
  .btn-outline { margin-left: 0; margin-top: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn, .nav-links a { transition: none; }
  .sim-hint-arrow { animation: none; }
}
