/* ==========================================================================
   Bridge Tech: Base styles & design tokens
   style.css      → tokens, reset, typography, layout, buttons, header, footer
   components.css → homepage sections & reusable components
   responsive.css → breakpoints (1280 / 1024 / 768 / 480 / 360)
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand: derived from the official Bridge Tech logo (#1E6FA6 / #0E436F) */
  --c-primary: #216d9b;
  --c-primary-600: #1a5a82;
  --c-logo-blue: #1e6fa6;
  --c-logo-navy: #0e436f;
  --c-electric: #16a6e8;
  --c-electric-300: #5cc4f2;
  --c-navy: #071b33;
  --c-navy-800: #0a2342;
  --c-deep: #050d1c;
  --c-light: #f2f7fc;
  --c-light-200: #e3edf7;
  --c-white: #ffffff;

  /* Text */
  --c-text-dark: #0b1a2e;
  --c-text-body-dark: #3d4f66;
  --c-text-light: #e8f0f8;
  --c-muted: #94a3b8;
  --c-muted-strong: #b4c2d4;

  /* Lines & surfaces */
  --c-line-dark: rgba(148, 196, 232, 0.14);
  --c-line-dark-strong: rgba(148, 196, 232, 0.26);
  --c-line-light: #d6e2ee;
  --c-surface-dark: rgba(255, 255, 255, 0.03);
  --c-surface-dark-2: rgba(255, 255, 255, 0.055);

  /* Gradients */
  --g-brand: linear-gradient(120deg, var(--c-electric) 0%, var(--c-primary) 100%);
  --g-text: linear-gradient(100deg, #ffffff 0%, #9fdcf8 45%, var(--c-electric) 100%);
  --g-border: linear-gradient(140deg, rgba(22, 166, 232, 0.55), rgba(33, 109, 155, 0.08) 45%, rgba(22, 166, 232, 0.35));

  /* Typography */
  --f-display: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --fs-hero: clamp(2.9rem, 1.4rem + 6.2vw, 7.25rem);
  --fs-h2: clamp(2.1rem, 1.35rem + 2.9vw, 3.9rem);
  --fs-h3: clamp(1.3rem, 1.12rem + 0.7vw, 1.7rem);
  --fs-lead: clamp(1.08rem, 1rem + 0.35vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-xs: 0.8125rem;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --section-y: clamp(5rem, 3.5rem + 6vw, 9.5rem);

  /* Layout */
  --container: 1240px;
  --container-wide: 1400px;
  --gutter: clamp(1.25rem, 0.6rem + 2.6vw, 3rem);
  --header-h: 84px;

  /* Radius, shadow, motion */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px -30px rgba(0, 0, 0, 0.65);
  --shadow-light: 0 1px 2px rgba(11, 26, 46, 0.04), 0 20px 50px -28px rgba(11, 26, 46, 0.28);
  --glow: 0 0 0 1px rgba(22, 166, 232, 0.35), 0 18px 60px -18px rgba(22, 166, 232, 0.45);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 180ms;
  --t-med: 360ms;
  --t-slow: 800ms;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--c-text-light);
  background: var(--c-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: rgba(22, 166, 232, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--c-electric);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--c-white);
  color: var(--c-navy);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--t-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 3. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: calc(var(--container-wide) + var(--gutter) * 2);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--dark {
  background: var(--c-deep);
  color: var(--c-text-light);
}

.section--navy {
  background: var(--c-navy);
  color: var(--c-text-light);
}

.section--light {
  background: var(--c-light);
  color: var(--c-text-dark);
}

.section--white {
  background: var(--c-white);
  color: var(--c-text-dark);
}

/* Section heading block */
.section-head {
  max-width: 760px;
  margin-bottom: clamp(2.75rem, 2rem + 3vw, 4.5rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
}

.section-head--split > div {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--sp-5);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-electric);
}

.section--light .eyebrow,
.section--white .eyebrow {
  color: var(--c-primary);
}

.section-title {
  font-size: var(--fs-h2);
}

.section-sub {
  margin-top: var(--sp-5);
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--c-muted-strong);
}

.section--light .section-sub,
.section--white .section-sub {
  color: var(--c-text-body-dark);
}

.text-gradient {
  background: var(--g-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section--light .text-gradient,
.section--white .text-gradient {
  background: linear-gradient(100deg, var(--c-logo-navy) 0%, var(--c-primary) 50%, var(--c-electric) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-pad-y: 0.95rem;
  --btn-pad-x: 1.55rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--r-pill);
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out),
    background-color var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out),
    color var(--t-med) var(--ease-out);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform var(--t-med) var(--ease-out);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  color: #fff;
  background: var(--c-primary);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 10px 30px -10px rgba(22, 166, 232, 0.6);
}

.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--g-brand);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
}

.btn--primary:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 16px 40px -12px rgba(22, 166, 232, 0.8);
}

.btn--primary:hover::before {
  opacity: 1;
}

.btn--ghost {
  color: var(--c-text-light);
  border: 1px solid var(--c-line-dark-strong);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: rgba(22, 166, 232, 0.6);
  background: rgba(22, 166, 232, 0.08);
}

.btn--outline-dark {
  color: var(--c-text-dark);
  border: 1px solid var(--c-line-light);
  background: var(--c-white);
}

.btn--outline-dark:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.btn--sm {
  --btn-pad-y: 0.7rem;
  --btn-pad-x: 1.2rem;
  min-height: 42px;
  font-size: 0.9375rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--c-electric);
}

.text-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-med) var(--ease-out);
}

.text-link:hover svg {
  transform: translateX(4px);
}

/* ---------- 5. Header / navigation ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition:
    background-color var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out),
    height var(--t-med) var(--ease-out),
    backdrop-filter var(--t-med) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  --header-h: 70px;
  background: rgba(5, 13, 28, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--c-line-dark);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

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

.brand img {
  height: 58px;
  width: auto;
  transition: height var(--t-med) var(--ease-out);
}

.site-header.is-scrolled .brand img {
  height: 50px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: var(--r-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--c-muted-strong);
  transition: color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-electric);
  box-shadow: 0 0 10px var(--c-electric);
  transform: translateX(-50%) scale(0);
  transition: transform var(--t-med) var(--ease-out);
}

.nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav__link[aria-current="page"] {
  color: #fff;
}

.nav__link[aria-current="page"]::after {
  transform: translateX(-50%) scale(1);
}

.nav__toggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--c-line-dark-strong);
  background: rgba(255, 255, 255, 0.03);
}

.nav__toggle-bar {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform var(--t-med) var(--ease-out), opacity var(--t-fast);
}

.nav__toggle-bar:nth-child(1) { top: 16px; }
.nav__toggle-bar:nth-child(2) { top: 22px; }
.nav__toggle-bar:nth-child(3) { top: 28px; }

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav__mobile-cta {
  display: none;
}

/* ---------- 6. Footer ---------- */
.site-footer {
  position: relative;
  padding-top: clamp(4rem, 3rem + 4vw, 6.5rem);
  padding-bottom: var(--sp-6);
  background: var(--c-deep);
  border-top: 1px solid var(--c-line-dark);
  color: var(--c-muted-strong);
  font-size: var(--fs-small);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem);
}

.footer__brand img {
  height: 88px;
  width: auto;
  margin-bottom: var(--sp-5);
}

.footer__brand p {
  max-width: 320px;
  line-height: 1.7;
}

.footer__tagline {
  display: inline-block;
  margin-top: var(--sp-5);
  font-family: var(--f-display);
  font-weight: 600;
  color: #fff;
}

.footer__heading {
  margin-bottom: var(--sp-5);
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.footer__links {
  display: grid;
  gap: 0.7rem;
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--t-fast);
}

.footer__links a:hover {
  color: #fff;
}

.footer__links svg {
  width: 13px;
  height: 13px;
  opacity: 0.55;
}

.footer__placeholder {
  color: var(--c-muted);
  font-style: italic;
}

.footer__social {
  display: flex;
  gap: 0.6rem;
  margin-top: var(--sp-5);
}

.footer__social-item {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px dashed var(--c-line-dark-strong);
  color: var(--c-muted);
  cursor: not-allowed;
}

.footer__social-item svg {
  width: 18px;
  height: 18px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--c-line-dark);
  color: var(--c-muted);
  font-size: var(--fs-xs);
}
