/* ============================================================
   OSE BUILT — styles.css
   Palette, spacing, and layout live in :root variables below so
   the whole site can be retuned from one place.
============================================================= */

:root {
  /* Brand palette */
  --navy:       #001B2A;
  --blue:       #1D4ED8;
  --gray:       #6B7280;
  --light-gray: #E5E7EB;
  --white:      #FFFFFF;

  /* Derived tones */
  --blue-dark:  #1740b0;
  --ink:        #0b1f2c;   /* primary text */
  --surface:    #f7f9fb;   /* subtle off-white section background */

  /* Type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Rhythm */
  --maxw: 1120px;
  --pad: clamp(1.25rem, 4vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 6rem);
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%; /* stop iOS bumping text on rotate */
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;            /* belt-and-suspenders against side-scroll */
  -webkit-tap-highlight-color: rgba(29, 78, 216, 0.15);
}

/* Anchor targets clear the sticky header when jumped to. */
[id] { scroll-margin-top: 80px; }

h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

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

.section-head { max-width: 42rem; margin-bottom: clamp(2rem, 5vw, 3rem); }

/* Small uppercase mono label above headings — the "technical" cue. */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.75rem;
}
.eyebrow-light { color: #7db0ff; }

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ============================================================
   HEADER / NAV
============================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--light-gray);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

/* Header logo: SVG "OSE" wordmark + "BUILT" text. */
.logo { display: inline-flex; align-items: center; gap: 0.5rem; }
.logo-img {
  height: 30px;         /* controls on-screen size; SVG stays crisp at any DPI */
  width: auto;
  display: block;
}

/* The footer still uses the old text lockup styling below. */
.logo-text {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  color: var(--navy);
}
.logo-text strong { color: var(--blue); font-weight: 700; }

/* Nav */
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin: 0; padding: 0;
}
.nav-menu a {
  font-size: 0.95rem;
  color: var(--gray);
  transition: color 0.15s ease;
}
.nav-menu a:hover { color: var(--navy); }

.nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white) !important;
}
.nav-cta:hover { background: var(--blue); }

/* Hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px; height: 2px;
  background: var(--navy);
  transform: translateX(-50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bar { top: 50%; margin-top: -1px; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

/* ============================================================
   HERO
============================================================= */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--light-gray);
  overflow: hidden;
}
/* Subtle blueprint grid — pure CSS, no image request. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--light-gray) 1px, transparent 1px),
    linear-gradient(90deg, var(--light-gray) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  mask-image: radial-gradient(circle at 70% 30%, #000 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding-block: clamp(4rem, 10vw, 7rem);
  max-width: 46rem;
}
.hero-title {
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.hero-tagline {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--blue);
  margin-top: 0.5rem;
}
/* "Operational Systems Experts" with the O S E accented. */
.hero-acronym {
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--gray);
}
.hero-acronym span {
  color: var(--navy);
  font-weight: 700;
}

.hero-desc {
  margin-top: 1.25rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--gray);
  max-width: 38rem;
}
.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ============================================================
   BUTTONS
============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--light-gray);
}
.btn-secondary:hover { border-color: var(--gray); }

.btn-lg { padding: 0.9rem 1.8rem; font-size: 1.05rem; }

/* ============================================================
   CARDS  (What We Do)
============================================================= */
.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover {
  border-color: #c9d3e0;
  box-shadow: 0 10px 30px -18px rgba(0, 27, 42, 0.35);
  transform: translateY(-2px);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 10px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--blue);
  margin-bottom: 1rem;
}
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.card-body { color: var(--gray); font-size: 0.97rem; }

/* ============================================================
   MANUFACTURING FOCUS  (navy band)
============================================================= */
.section-dark {
  background: var(--navy);
  color: var(--light-gray);
}
.section-dark .section-title { color: var(--white); }

.mfg-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 800px) {
  .mfg-grid { grid-template-columns: 1fr 1fr; }
}
.mfg-lead { margin-top: 1rem; color: #b7c4d0; max-width: 34rem; }

.mfg-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .mfg-list { grid-template-columns: 1fr 1fr; }
}
.mfg-list li {
  position: relative;
  padding: 0.9rem 1rem 0.9rem 2.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  color: var(--white);
  font-weight: 500;
}
/* Non-manufacturer reassurance callout inside the navy band. */
.mfg-note {
  margin-top: clamp(2rem, 5vw, 3rem);
  max-width: 54rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.05);
  color: #cdd8e2;
  font-size: 1.02rem;
}
.mfg-note strong { color: var(--white); font-weight: 700; }

/* Check tick using a border trick — no icon file needed. */
.mfg-list li::before {
  content: "";
  position: absolute;
  left: 1rem; top: 50%;
  width: 6px; height: 11px;
  border: solid var(--blue);
  border-width: 0 2px 2px 0;
  transform: translateY(-60%) rotate(45deg);
}

/* ============================================================
   HOW WE HELP  (steps)
============================================================= */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  counter-reset: step;
}
.step {
  position: relative;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  background: var(--surface);
}
.step-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--blue);
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(29, 78, 216, 0.25);
  border-radius: 6px;
  margin-bottom: 1rem;
}
.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.step-body { color: var(--gray); font-size: 0.97rem; }

/* ============================================================
   CONTACT / CTA
============================================================= */
.contact {
  background:
    radial-gradient(circle at 50% 0%, rgba(29, 78, 216, 0.10), transparent 60%),
    var(--surface);
  border-top: 1px solid var(--light-gray);
  text-align: center;
}
.contact-inner { max-width: 40rem; margin-inline: auto; }
.contact-title {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.contact-desc { margin-top: 1rem; color: var(--gray); font-size: 1.05rem; }
.contact .btn { margin-top: 1.75rem; }

/* ============================================================
   FOOTER
============================================================= */
.site-footer {
  background: var(--navy);
  color: #9fb0bd;
  padding-block: 2.5rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}
.footer-logo { color: var(--white); font-size: 1.05rem; }
.footer-logo strong { color: #7db0ff; }
.footer-note { color: #b7c4d0; }
.footer-copy { font-size: 0.85rem; color: #6f8494; margin-top: 0.4rem; }

/* ============================================================
   RESPONSIVE — mobile nav
============================================================= */
@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .nav-menu {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    padding: 0.5rem var(--pad) 1rem;
    /* Collapsed by default; .is-open (set by script.js) reveals it. */
    display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li { border-top: 1px solid var(--light-gray); }
  .nav-menu li:first-child { border-top: 0; }
  .nav-menu a { display: block; padding: 0.85rem 0.25rem; }
  .nav-cta { margin-top: 0.5rem; text-align: center; }

  /* Animate hamburger into an X when open. */
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateX(-50%) rotate(45deg); top: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { transform: translateX(-50%) rotate(-45deg); top: 0; }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  /* Drop the acronym line in the header lockup to keep it tidy. */
  .logo-sub { display: none; }

  /* Full-width, thumb-friendly buttons that stack cleanly. */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .contact .btn { width: 100%; }

  /* Comfortable minimum tap height on interactive elements. */
  .btn { min-height: 48px; }
  .nav-menu a { padding-block: 1rem; }

  /* Ease the grid gutter so cards get more width. */
  .cards, .steps { gap: 1rem; }
}

/* Ensure the mono email button never overflows its container. */
.contact .btn { max-width: 100%; word-break: break-word; }

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
