/* BBS Tech — site styles
   Tokens, base, then sections in page order. Single file, no build step. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Surfaces */
  --dark: #0a171b;
  --dark-2: #0d1d22;
  --darkest: #07111a;
  --light: #f5f7f7;
  --card: #ffffff;
  --card-border: #dfe6e8;
  --card-shadow: 0 1px 2px rgba(16, 24, 32, 0.04), 0 10px 30px -12px rgba(16, 24, 32, 0.12);
  --rule-dark: rgba(255, 255, 255, 0.1);
  --rule-light: #e3e9ea;

  /* Accents */
  --teal: #1d9e8f;
  --teal-strong: #167f73;   /* button fill, 4.9:1 with white */
  --teal-deep: #126a60;
  --green: #3fbf8f;
  --navy: #1f4e8c;
  --amber: #c8842c;

  /* Text */
  --on-dark: #ffffff;
  --on-dark-2: #b8c4c6;
  --on-dark-eyebrow: #7fa3a3;
  --on-light: #101820;
  --on-light-2: #5a6670;
  --on-light-eyebrow: #3f6b69;

  /* Type */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-xs: 0.75rem;                                  /* 12 */
  --text-sm: 0.875rem;                                 /* 14 */
  --text-md: 0.9375rem;                                /* 15 */
  --text-base: 1.0625rem;                              /* 17 */
  --text-lg: 1.125rem;                                 /* 18 */
  --h2: clamp(1.75rem, 1.15rem + 1.6vw, 2.375rem);     /* 28 → 38 */
  --h1: clamp(2.25rem, 1.2rem + 2.6vw, 3rem);          /* 36 → 48 */

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4.5vw, 4rem);
  --section: clamp(4rem, 7vw, 6.5rem);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 76px;

  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--on-light);
  background: var(--light);
  font-feature-settings: "cv11", "ss01", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--green); }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--teal-strong);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* ---------- Shared type ---------- */
.eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-light-eyebrow);
  margin-bottom: 1.1rem;
}
.dark .eyebrow { color: var(--on-dark-eyebrow); }

h1, h2 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
}
h2 { font-size: var(--h2); }
h2 .teal { color: var(--teal); }
h2 .green { color: var(--green); }
.dark h2 .teal { color: var(--teal); }

.grad {
  color: var(--green);
  background: linear-gradient(90deg, var(--green) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.72rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--teal-strong); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-outline { border-color: rgba(255, 255, 255, 0.35); color: #fff; background: transparent; }
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--dark);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background-color 200ms ease;
  color: var(--on-dark);
}
.site-header.is-scrolled { border-bottom-color: var(--rule-dark); background: rgba(10, 23, 27, 0.88); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: #fff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.site-nav a { font-size: var(--text-sm); font-weight: 500; text-decoration: none; color: rgba(255, 255, 255, 0.86); }
.site-nav a:not(.btn):hover { color: #fff; }
.site-nav .btn { margin-left: 0.5rem; }

/* ---------- Dark / light section helpers ---------- */
.dark { background: var(--dark); color: var(--on-dark-2); }
.dark h1, .dark h2, .dark h3 { color: var(--on-dark); }
.light { background: var(--light); color: var(--on-light-2); }
.light h2, .light h3 { color: var(--on-light); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero .container {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(640px, 82vh);
  padding-block: clamp(3rem, 6vw, 5rem) clamp(3.5rem, 7vw, 6rem);
}
.hero-copy { position: relative; z-index: 2; max-width: 720px; }
.hero-br { display: none; }
@media (min-width: 861px) { .hero-br { display: inline; } }
.hero h1 { font-size: var(--h1); color: #fff; margin-bottom: 1.5rem; }
.hero p { font-size: var(--text-base); max-width: 29rem; }

.hero-media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 60%;
  z-index: 1;
  background: radial-gradient(ellipse 70% 80% at 65% 45%, #16474a 0%, #0f2c31 45%, var(--dark) 100%);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  color: transparent; /* hide alt text while the file is missing */
}
.hero-media picture { display: block; height: 100%; }
.hero-media img.is-missing { visibility: hidden; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--dark) 0%, rgba(10, 23, 27, 0.85) 18%, rgba(10, 23, 27, 0.35) 45%, rgba(10, 23, 27, 0) 70%),
    linear-gradient(270deg, var(--dark) 0%, rgba(10, 23, 27, 0.6) 5%, rgba(10, 23, 27, 0) 16%),
    linear-gradient(180deg, rgba(10, 23, 27, 0.55) 0%, rgba(10, 23, 27, 0) 30%, rgba(10, 23, 27, 0) 70%, var(--dark) 100%);
  pointer-events: none;
}
.hero-arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
}

/* ---------- Sectors ---------- */
.section { padding-block: var(--section); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 4rem;
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head p { max-width: 30rem; font-size: var(--text-md); }
.section-head .lede-right { justify-self: end; margin-bottom: 0.3rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #1b3a40 0%, #0f2529 55%, #1d5a5a 100%);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; color: transparent; }
.card-media img.is-missing { visibility: hidden; }
.card-body { padding: 2rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.badge {
  position: absolute;
  left: 1.5rem;
  bottom: 0;
  transform: translateY(50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 0 0 4px var(--card);
}
.badge svg { width: 22px; height: 22px; }
.badge-green { background: #2f9f74; }
.badge-teal { background: var(--teal); }
.badge-navy { background: var(--navy); }
.badge-amber { background: var(--amber); }

.card h3 { font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.75rem; }
.card-lines { font-size: var(--text-sm); line-height: 1.65; }
.card-lines li + li { margin-top: 0.2rem; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1.5rem;
}
.chips span {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #eef3f2;
  color: var(--on-light-eyebrow);
}

/* ---------- Approach ---------- */
.approach { position: relative; overflow: hidden; }
.approach::before,
.approach::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(29, 158, 143, 0.16);
  pointer-events: none;
}
.approach::before {
  width: 140vw;
  height: 140vw;
  left: -70vw;
  top: 60%;
  box-shadow: 0 0 0 60px rgba(29, 158, 143, 0.03);
}
.approach::after {
  width: 60vw;
  height: 60vw;
  right: -30vw;
  top: -30vw;
  background: radial-gradient(circle, rgba(29, 158, 143, 0.12) 0%, rgba(29, 158, 143, 0) 65%);
}
.approach .container { position: relative; z-index: 1; }
.approach-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  gap: 2.5rem 0;
  align-items: center;
}
.approach-head { padding-right: 3rem; }
.approach-head h2 { max-width: 12ch; }
.pillar {
  padding: 0.5rem 2.5rem 0.5rem 2rem;
  border-left: 1px solid var(--rule-dark);
}
.pillar svg { width: 30px; height: 30px; color: var(--green); margin-bottom: 1.4rem; }
.pillar h3 { font-size: var(--text-md); font-weight: 600; margin-bottom: 0.6rem; }
.pillar p { font-size: var(--text-sm); line-height: 1.65; max-width: 18rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 3rem 5rem;
  align-items: start;
}
.contact-copy h2 { max-width: 12ch; margin-bottom: 1.25rem; }
.contact-copy p { font-size: var(--text-md); max-width: 30rem; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.25rem;
}
.form-grid .full { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 0.45rem; }
.form-field label { font-size: var(--text-sm); font-weight: 500; color: var(--on-light); }
.form-field label span { color: var(--on-light-2); font-weight: 400; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--on-light);
  font-size: var(--text-md);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.form-field input:hover,
.form-field textarea:hover { border-color: #c5d0d3; }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29, 158, 143, 0.22);
}
.form-field textarea { min-height: 150px; resize: vertical; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.form-status { font-size: var(--text-sm); min-height: 1.4em; color: var(--on-light-2); }
.form-status[data-state="success"] { color: #1a6b3a; }
.form-status[data-state="error"] { color: #a32f2f; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--darkest);
  color: var(--on-dark-2);
  padding-block: 3.5rem 1.75rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule-dark);
}
.footer-top .wordmark { display: inline-block; margin-bottom: 0.7rem; }
.tagline { font-size: var(--text-sm); max-width: 16rem; line-height: 1.5; }
.footer-nav { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav a { font-size: var(--text-sm); text-decoration: none; color: rgba(255, 255, 255, 0.86); }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  font-size: var(--text-xs);
}
.legal-links { display: flex; align-items: center; gap: 0.75rem; }
.legal-links a { text-decoration: none; color: rgba(255, 255, 255, 0.86); }
.legal-links a:hover { color: #fff; }
.legal-links .sep { color: rgba(255, 255, 255, 0.3); }

/* ---------- Legal pages ---------- */
.legal { background: var(--light); padding-block: clamp(3rem, 6vw, 5rem) var(--section); }
.legal .container { max-width: 760px; }
.legal h1 { font-size: var(--h2); margin-bottom: 0.5rem; color: var(--on-light); }
.legal .updated { font-size: var(--text-sm); color: var(--on-light-2); margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.25rem; margin: 2.25rem 0 0.75rem; letter-spacing: -0.01em; color: var(--on-light); }
.legal p, .legal li { font-size: var(--text-md); line-height: 1.7; color: #2c3742; }
.legal p + p { margin-top: 0.9rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; margin: 0.75rem 0; }
.legal li + li { margin-top: 0.5rem; }
.legal a { color: var(--teal-strong); text-underline-offset: 0.15em; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approach-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem 0; }
  .approach-head { grid-column: 1 / -1; padding-right: 0; }
  .pillar:nth-child(2) { border-left: 0; padding-left: 0; }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .hero .container { display: block; min-height: 0; padding-bottom: 0; }
  .hero-copy { max-width: none; }
  .hero-media {
    position: relative;
    inset: auto;
    width: auto;
    margin: 2.5rem calc(-1 * var(--gutter)) 0;
    height: min(86vw, 480px);
  }
  .hero-media img { object-position: center; }
  .hero-media::after {
    background:
      linear-gradient(180deg, var(--dark) 0%, rgba(10, 23, 27, 0.2) 35%, rgba(10, 23, 27, 0) 60%, var(--dark) 100%);
  }
  .hero-arcs { display: none; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .section-head .lede-right { justify-self: start; margin-bottom: 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .site-nav { gap: 1rem; }
  .site-nav a:not(.btn) { display: none; }
  .site-nav .btn { margin-left: 0; }
  .approach-grid { grid-template-columns: 1fr; gap: 0; }
  .approach-head { margin-bottom: 1.5rem; }
  .pillar { border-left: 0; border-top: 1px solid var(--rule-dark); padding: 1.75rem 0; }
  .pillar:last-child { padding-bottom: 0; }
  .pillar svg { margin-bottom: 1rem; }
}

@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
