/* ================================================================
   Bridgeward Website — Shared Styles
   ================================================================ */

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

/* === Custom Properties === */
:root {
  --bw-blue:  #3B599B;
  --bw-navy:  #102A43;
  --bw-teal:  #40A5B9;
  --bw-aqua:  #A6DDD4;
  --bw-slate: #889EAF;
  --bw-cloud: #F7FAFC;

  --font-display: "Verdana Pro Black", "Verdana Pro", Verdana, Geneva, sans-serif;
  --font-heading: "Verdana Pro Semibold", "Verdana Pro", Verdana, Geneva, sans-serif;
  --font-body:    "Verdana Pro", Verdana, Geneva, sans-serif;
  --font-compact: "Verdana Pro Condensed", "Verdana Pro", Verdana, Geneva, sans-serif;

  --max-w:  1140px;
  --gutter: 2.25rem;
}

html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 76px;}

body {
  font-family: var(--font-body);
  color: var(--bw-navy);
  background: var(--bw-cloud);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }

/* === Text Wrap Balancing — Bridgeward Standard ===
   Distributes text evenly across lines so no line carries more than
   ~25% empty space relative to the widest line in the block.
   Safe to apply broadly: single-line elements are unaffected. */
h1, h2, h3, h4, h5, h6,
p, li, blockquote, figcaption {
  text-wrap: balance;
}

/* === Layout === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ----------------------------------------------------------------
   Navigation
---------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  height: 76px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(136,158,175,0.2);
  box-shadow: 0 2px 16px rgba(16,42,67,0.07);
}

.site-nav .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img { height: 46px; }

.nav-menu {
  list-style: none;
  display: flex;
  gap: 2.25rem;
  align-items: center;
}

.nav-menu a {
  font-family: var(--font-compact);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bw-slate);
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] { color: var(--bw-teal); }

.nav-cta a {
  background: var(--bw-teal) !important;
  color: #fff !important;
  padding: 0.45rem 1.3rem !important;
  border-radius: 3px;
  transition: background 0.2s !important;
}
.nav-cta a:hover { background: #349ab0 !important; }

/* ----------------------------------------------------------------
   Buttons
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.88rem 2.2rem;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--bw-teal);
  color: #fff;
}
.btn-primary:hover {
  background: #349ab0;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(64,165,185,0.32);
}

.btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.82);
  border: 1.5px solid rgba(255,255,255,0.28);
}
.btn-outline:hover {
  border-color: var(--bw-teal);
  color: var(--bw-teal);
}

/* ----------------------------------------------------------------
   Eyebrow / Labels
---------------------------------------------------------------- */
.eyebrow {
  display: block;
  font-family: var(--font-compact);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bw-teal);
  margin-bottom: 0.8rem;
}

/* ----------------------------------------------------------------
   Hero (Home)
---------------------------------------------------------------- */
.hero {
  position: relative;
  background: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: hidden;
  padding: 1.5rem 0 65px;
}

.hero .container { position: relative; z-index: 1; width: 100%; }

.hero-logo {
  max-width: 480px;  /* 5 inches at 96 dpi */
  width: 100%;
  height: auto;
  margin: 0 auto 2.25rem;   /* center logo; gap below = logo→headline gap */
}

/* Centered content block */
.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;   /* centers h1 lines, logo, etc. */
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 3rem);
  line-height: 1.15;
  color: var(--bw-navy);
  margin-bottom: 1.5rem;
}

/* Each phrase on its own line; JS sizes the font to match logo width exactly */
.hero-line1,
.hero h1 em {
  display: block;
  white-space: nowrap;
}

/* Line 1: Bridgeward Blue (#3B599B) */
.hero-line1 { color: var(--bw-blue); }

/* Line 2: Teal */
.hero h1 em {
  color: var(--bw-teal);
  font-style: normal;
}

/* Subheadline above, button below — always stacked */
.hero-sub-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: #4a5c70;
  line-height: 1.78;
  width: 100%;
  /* No max-width — hero-content's 720px cap keeps this to ~3 lines at largest font size.
     On narrower screens the text naturally wraps to more lines as the container shrinks. */
  /* text-wrap: balance applied globally via h1/h2/.../p rule in base styles */
}

/* Explore Services button — adapts to white hero background */
.hero-cta {
  flex-shrink: 0;
  color: var(--bw-navy);
  border: 1.5px solid rgba(16,42,67,0.22);
  background: transparent;
  white-space: nowrap;
}
.hero-cta:hover {
  border-color: var(--bw-teal);
  color: var(--bw-teal);
}

/* ----------------------------------------------------------------
   Mini Hero (inner pages)
---------------------------------------------------------------- */
.mini-hero {
  background: var(--bw-navy);
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4.5rem;
}

.mini-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.mini-hero-shape {
  position: absolute;
  right: 0; top: 0;
  width: 46%;
  height: 100%;
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0% 100%);
  background: linear-gradient(135deg, rgba(59,89,155,0.38) 0%, rgba(64,165,185,0.07) 100%);
  pointer-events: none;
}

.mini-hero .container { position: relative; z-index: 1; }

/* Flex row: subheadline left, headshot right — image top is anchored
   below the h1 because it sits inside .mini-hero-body which comes after the h1 */
.mini-hero-body {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}

/* Width: 1.5" min → 3.75" max (96 dpi).
   Height & top-offset set by JS. No cropping — image resizes to fit. */
.hero-headshot {
  max-width:  clamp(144px, 22vw, 288px);  /* 1.5" min → 3" max at 96 dpi */
  width:      auto;    /* natural width up to max-width              */
  height:     auto;    /* natural height; JS sets max-height          */
  border:     none;    /* remove any border / white line              */
  outline:    none;
  box-shadow: none;
  flex-shrink: 0;
  align-self:  flex-start;
  display:     block;
}

.mini-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.mini-hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.78;
  flex: 1;   /* fills remaining width beside the headshot */
}

/* ----------------------------------------------------------------
   Section defaults
---------------------------------------------------------------- */
section { padding: 65px 0; }

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--bw-navy);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-intro {
  font-size: 1.03rem;
  color: #4a5c70;
  line-height: 1.78;
}

/* ----------------------------------------------------------------
   Positioning Section (Home)
---------------------------------------------------------------- */
.positioning {
  background: var(--bw-navy);
  text-align: center;
}

.positioning .section-heading {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  color: #fff;
  text-wrap: balance;
  /* font-size synced to hero headline by JS */
}

.body-text {
  max-width: 660px;
  margin: 0 auto;
  font-size: 1.02rem;
  color: #3d5068;
  line-height: 1.82;
}
.body-text + .body-text { margin-top: 1.25rem; }

.positioning .body-text { color: rgba(255,255,255,0.68); }

/* ----------------------------------------------------------------
   Services Section (Home)
---------------------------------------------------------------- */
.services-section { background: var(--bw-cloud); }

/* Convergence diagram (replaces linear flow visualization) */
.services-diagram {
  max-width: 660px;
  width: 100%;
  margin: 2.5rem auto 3rem;
  display: block;
}
.services-diagram svg { width: 100%; height: auto; display: block; }

.services-intro {
  max-width: 740px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.services-intro .section-heading { margin-bottom: 0.75rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.service-card {
  background: #fff;
  border-radius: 6px;
  padding: 2.25rem 2rem;
  border-top: 3px solid var(--bw-teal);
  box-shadow: 0 1px 14px rgba(16,42,67,0.06);
  transition: box-shadow 0.25s, transform 0.22s;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  box-shadow: 0 8px 32px rgba(16,42,67,0.1);
  transform: translateY(-3px);
}

/* Card image — sits above service-num, fills content width, consistent height */
.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 3px;
  margin-bottom: 1.2rem; /* matches area-list padding-top — the card's section-gap value */
}

.service-num {
  font-family: var(--font-compact);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--bw-teal);
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--bw-navy);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.service-card > p {
  font-size: 0.95rem;
  color: #3d5068;
  line-height: 1.78;
  margin-bottom: 1.5rem;
  flex: 1;
}

.area-list {
  list-style: none;
  border-top: 1px solid rgba(136,158,175,0.18);
  padding-top: 1.2rem;
  margin-top: auto;
}

.area-list li {
  font-family: var(--font-compact);
  font-size: 0.8rem;
  color: var(--bw-slate);
  padding: 0.28rem 0 0.28rem 1rem;
  position: relative;
  letter-spacing: 0.02em;
}

.area-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: var(--bw-teal);
  border-radius: 50%;
}

/* ----------------------------------------------------------------
   CTA Section
---------------------------------------------------------------- */
.cta-section {
  background: var(--bw-navy);
  text-align: center;
  padding: 65px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.cta-section .container { position: relative; z-index: 1; }

.cta-section .section-heading {
  color: #fff;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.cta-sub {
  color: rgba(255,255,255,0.62);
  font-size: 1.02rem;
  max-width: 520px;
  margin: 0 auto 2.25rem;
  line-height: 1.75;
}

/* ----------------------------------------------------------------
   About Page — Content Sections
---------------------------------------------------------------- */
.about-section {
  background: #fff;
  padding: 65px 0;
}

.about-section.alt { background: var(--bw-cloud); }

.about-block {
  display: grid;
  grid-template-columns: 1fr 2.6fr;
  gap: 5rem;
  align-items: start;
}

.about-label-col {
  position: sticky;
  top: 96px;
}

.about-service-label {
  display: inline-block;
  background: var(--bw-teal);
  color: #fff;
  font-family: var(--font-compact);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.32rem 0.85rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.about-label-col h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--bw-navy);
  line-height: 1.22;
}

.about-body p {
  font-size: 1.02rem;
  color: #3d5068;
  line-height: 1.85;
  margin-bottom: 1.4rem;
}
.about-body p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------
   Credentials Section (About)
---------------------------------------------------------------- */
.credentials-section {
  background: var(--bw-navy);
  padding: 65px 0;
  position: relative;
  overflow: hidden;
}

.credentials-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.credentials-section .container { position: relative; z-index: 1; }

.credentials-inner {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.credential-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.credential-label {
  font-family: var(--font-compact);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bw-teal);
}

.credential-value {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #fff;
}

.credential-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-compact);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  margin-top: 0.35rem;
}
.linkedin-link:hover { color: var(--bw-teal); }

/* ----------------------------------------------------------------
   Footer
---------------------------------------------------------------- */
.site-footer {
  background: #0a1b2a;
  padding: 3rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand img {
  height: 28px;
  opacity: 0.68;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-family: var(--font-compact);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bw-slate);
}

.footer-nav {
  list-style: none;
  display: flex;
  gap: 2.25rem;
}

.footer-nav a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.38);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--bw-teal); }

.footer-copy {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.38); /* matches footer nav link colour */
  letter-spacing: 0.04em;
}

/* ----------------------------------------------------------------
   Scroll Reveal
---------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ----------------------------------------------------------------
   Responsive
---------------------------------------------------------------- */
@media (max-width: 960px) {
  .services-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .about-block   { grid-template-columns: 1fr; gap: 1.75rem; }
  .about-label-col { position: static; }
}

@media (max-width: 720px) {
  .footer-inner  { flex-direction: column; text-align: center; }
  .footer-nav    { justify-content: center; }
  .credentials-inner { gap: 2rem; }
}

@media (max-width: 600px) {
  :root { --gutter: 1.25rem; }
  section { padding: 40px 0; }
  /* When viewport is narrow enough that the hero-sub-row wraps (button drops below sub),
     set hero padding-bottom = logo margin-bottom (2.25rem) to match the logo→headline gap */
  .hero   { padding: 1.5rem 0 40px; }
  .nav-cta        { display: none; }
  .nav-menu       { gap: 1.5rem; }
  .flow-track     { justify-content: flex-start; }
}

/* ----------------------------------------------------------------
   Contact Page
---------------------------------------------------------------- */
.contact-page {
  background: var(--bw-navy);
  min-height: calc(100vh - 76px);
  padding: 3.5rem var(--gutter) 5rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.contact-wrap {
  width: 100%;
  max-width: 840px;
}

/* Heading sits in the same two-column grid as the form rows so it
   centers over the input boxes, not the full form width */
.contact-heading-wrap {
  display: grid;
  grid-template-columns: 170px 1fr;
  column-gap: 1rem;
  margin-bottom: 2.25rem;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.75vw, 3.375rem);
  color: var(--bw-aqua);
  text-align: center;
  width: 75%;
  line-height: 1.1;
  margin-bottom: 0;
}

.contact-form { width: 100%; }

.form-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  column-gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

/* Align label to top of textarea */
.form-row--top { align-items: start; }
.form-row--top label { padding-top: 0.65rem; }

.form-row label {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--bw-aqua);
  text-align: right;
}

.form-field {
  width: 75%;
  background: #fff;
  border: 3px solid #0c2035;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--bw-navy);
  border-radius: 0;
  outline: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field:focus {
  border-color: var(--bw-teal);
  box-shadow: 0 0 0 2px rgba(64,165,185,0.22);
}

textarea.form-field {
  resize: vertical;
  min-height: 250px;
  line-height: 1.65;
}

.form-status {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 1.4em;   /* prevents layout shift when empty */
}
.form-status--success { color: var(--bw-aqua); }
.form-status--error   { color: #f87171; }       /* soft red — readable on navy */

.form-row--submit { margin-top: 0.5rem; }

.btn-send {
  width: 75%;
  background: var(--bw-teal);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  padding: 1.1rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-send:hover {
  background: #349ab0;
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .contact-heading-wrap {
    grid-template-columns: 1fr;   /* heading centers over full width on mobile */
  }
  .contact-heading-wrap > [aria-hidden] { display: none; }
  .form-row {
    grid-template-columns: 1fr;
    row-gap: 0.4rem;
  }
  .form-row label { text-align: left; }
  .form-row--top label { padding-top: 0; }
}
