/* ─── BridgeOne · Shared styles · v1 · 2026-06-08 ─── */

:root {
  --midnight: #0B1222;
  --steel-blue: #1E3A5F;
  --deep-navy: #162040;
  --gold: #C4A24E;
  --light-gold: #D4B86A;
  --deep-gold: #A8872E;
  --cream: #FAF7F2;
  --ink: #0F1117;
  --slate: #3A3D47;
  --stone: #8A8D96;
  --mist: #E8E5E0;
  --live: #4CAF50;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 40px; }

/* ─── Top nav (shared) ─── */
nav.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid rgba(30, 58, 95, 0.15);
  gap: 24px;
}

.logo { display: flex; align-items: center; gap: 10px; font-family: 'Instrument Serif', Georgia, serif; font-size: 22px; letter-spacing: -0.01em; }
.logo-mark { width: 28px; height: 28px; }
.logo b { font-weight: 400; }
.logo i { color: var(--gold); font-style: italic; }

.nav-center { display: flex; gap: 32px; font-size: 14px; color: var(--slate); }
.nav-center a { padding: 4px 0; border-bottom: 1px solid transparent; }
.nav-center a:hover { color: var(--gold); }
.nav-center a.active { color: var(--ink); border-bottom-color: var(--gold); }

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--slate);
  letter-spacing: 0.04em;
  padding: 6px 12px;
  background: rgba(30, 58, 95, 0.04);
  border-radius: 100px;
}
.nav-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 1.8s ease-in-out infinite;
}
.nav-status b { color: var(--ink); font-weight: 600; }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
}

.nav-cta {
  font-size: 14px;
  padding: 10px 18px;
  border: 1px solid var(--steel-blue);
  border-radius: 100px;
  transition: all 0.2s ease;
  color: var(--steel-blue);
  white-space: nowrap;
}
.nav-cta:hover { background: var(--steel-blue); color: var(--cream); }

/* Mobile menu toggle (hamburger) — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 8px;
  margin-left: 4px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 1.6px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  transform-origin: center;
}

/* ─── Section primitives ─── */
.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--deep-gold);
  margin-bottom: 24px;
}

.section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 12px;
  margin-bottom: 3px;
}

.section-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
  font-weight: 400;
  max-width: 800px;
}

.section-title em {
  color: var(--gold);
  font-style: italic;
}

/* ─── Page hero (smaller than home hero) ─── */
.page-hero {
  padding: 64px 0 96px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.15);
}

.page-hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--deep-gold);
  margin-bottom: 28px;
}

.page-hero h1 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  max-width: 900px;
  color: var(--ink);
}

.page-hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.page-hero-lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--slate);
  max-width: 680px;
}

.page-hero-lede strong { color: var(--ink); font-weight: 500; }

/* ─── Hand-drawn circle ─── */
.circled { position: relative; display: inline-block; padding: 0 12px; z-index: 1; }
.circled-svg { position: absolute; inset: -4px -8px -10px -8px; width: calc(100% + 16px); height: calc(100% + 14px); z-index: -1; overflow: visible; }

/* ─── Buttons ─── */
.btn-primary {
  background: var(--steel-blue);
  color: var(--cream);
  padding: 14px 26px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { background: var(--gold); color: var(--steel-blue); }

.btn-secondary {
  color: var(--ink);
  padding: 14px 4px;
  font-size: 15px;
  border-bottom: 1px solid var(--steel-blue);
  transition: all 0.2s ease;
  display: inline-block;
}
.btn-secondary:hover { color: var(--deep-gold); border-color: var(--gold); }

/* ─── Marginalia ─── */
.marginalia {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--deep-gold);
  line-height: 1.15;
  max-width: 220px;
  display: inline-block;
}
.marginalia-arrow { display: inline-block; margin-right: 4px; }

/* ─── Punctuation panel (shared) ─── */
.punctuation-wrap { padding: 96px 0; }
.punctuation {
  background: var(--steel-blue);
  color: var(--cream);
  border-radius: 18px;
  padding: 112px 80px;
  position: relative;
  overflow: hidden;
}
.punctuation::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(196, 162, 78, 0.16) 0%, transparent 65%);
  pointer-events: none;
}
.punctuation-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--light-gold);
  margin-bottom: 32px;
  position: relative;
}
.punctuation-quote {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
  max-width: 880px;
  position: relative;
  margin-bottom: 48px;
}
.punctuation-quote em { color: var(--gold); font-style: italic; }
.punctuation-attribution {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.55);
  position: relative;
}

/* ─── Footer (shared) ─── */
footer {
  border-top: 1px solid var(--steel-blue);
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.footer-left { display: flex; align-items: center; gap: 12px; font-family: 'Instrument Serif', Georgia, serif; font-size: 18px; }
.footer-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
}
.footer-deploy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--stone);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-deploy::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
}

/* ─── Responsive ─── */
@media (max-width: 980px) {
  .nav-status { display: none; }
  nav.top { position: relative; }

  /* Show the hamburger */
  .nav-toggle { display: inline-flex; }

  /* Hide center menu by default; show as overlay when open */
  .nav-center {
    display: none;
    position: absolute;
    top: 100%;
    left: -24px;
    right: -24px;
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    padding: 8px 24px 20px;
    border-bottom: 1px solid rgba(30, 58, 95, 0.15);
    box-shadow: 0 12px 32px rgba(15, 17, 23, 0.06);
    z-index: 50;
  }

  nav.top.open .nav-center { display: flex; }

  .nav-center a {
    padding: 16px 4px;
    font-size: 17px;
    color: var(--ink);
    border-bottom: 1px solid rgba(30, 58, 95, 0.08);
  }
  .nav-center a:last-child { border-bottom: none; }
  .nav-center a.active {
    color: var(--deep-gold);
    border-bottom-color: rgba(30, 58, 95, 0.08);
  }

  /* Hamburger → X transition when open */
  nav.top.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(6.6px) rotate(45deg);
  }
  nav.top.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  nav.top.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6.6px) rotate(-45deg);
  }
}

@media (max-width: 520px) {
  /* Compress CTA on narrow screens */
  .nav-cta { padding: 8px 14px; font-size: 13px; }
  .nav-toggle { padding: 10px 4px; }
}

@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .punctuation { padding: 72px 32px; border-radius: 12px; }
  footer { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ─── Animations ─── */

/* Scroll reveals — applied via JS to sections and articles below the fold */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Deploy log row stagger */
.ship-row.reveal {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  transition-delay: var(--reveal-delay, 0s);
}
.ship-row.reveal.in {
  opacity: 1;
  transform: translateX(0);
}

/* SVG self-drawing — hero bridge motif */
.hero-mark svg path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 1.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.hero-mark svg path:nth-child(1)  { animation-delay: 0.15s; }
.hero-mark svg path:nth-child(2)  { animation-delay: 0.25s; }
.hero-mark svg path:nth-child(3)  { animation-delay: 0.30s; }
.hero-mark svg path:nth-child(4)  { animation-delay: 0.35s; }
.hero-mark svg path:nth-child(5)  { animation-delay: 0.40s; }
.hero-mark svg path:nth-child(6)  { animation-delay: 0.50s; }
.hero-mark svg path:nth-child(7)  { animation-delay: 0.55s; }
.hero-mark svg path:nth-child(8)  { animation-delay: 0.60s; }
.hero-mark svg path:nth-child(9)  { animation-delay: 0.65s; }
.hero-mark svg path:nth-child(10) { animation-delay: 0.70s; }
.hero-mark svg path:nth-child(11) { animation-delay: 0.75s; }
.hero-mark svg path:nth-child(12) { animation-delay: 0.80s; }
.hero-mark svg path:nth-child(13) { animation-delay: 0.85s; }
.hero-mark svg path:nth-child(14) { animation-delay: 0.90s; }
.hero-mark svg path:nth-child(15) { animation-delay: 0.95s; }

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* Hand-drawn gold circle around hero word */
.circled-svg path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw 1.1s cubic-bezier(0.65, 0, 0.35, 1) 1.1s forwards;
}

/* Bridge motif sway — kicks in after draw animation */
.hero-mark svg {
  animation: sway 7s ease-in-out 2.2s infinite;
  transform-origin: center bottom;
}

@keyframes sway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-2px) rotate(0.3deg); }
  75%      { transform: translateY(-1px) rotate(-0.2deg); }
}

/* Logo mark gentle pulse on hover */
.logo:hover .logo-mark {
  animation: pulse-mark 1.2s ease-in-out;
}

@keyframes pulse-mark {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* Live ticker in nav — text fade between cycles */
.nav-status .ticker {
  display: inline-block;
  transition: opacity 0.25s ease;
  min-width: 130px;
  text-align: center;
}
.nav-status .ticker.fading {
  opacity: 0;
}

/* Subtle fade-in for the hero copy on load (no scroll trigger needed) */
.hero-content > * {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-content > *:nth-child(3) { animation-delay: 0.25s; }
.hero-content > *:nth-child(4) { animation-delay: 0.35s; }
.hero-content > *:nth-child(5) { animation-delay: 0.45s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Reduced motion — respect the user's accessibility preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-mark svg path,
  .circled-svg path {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
  .hero-content > * {
    opacity: 1;
    transform: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
