/* ---------- Minimal modern reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
figure,
blockquote {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

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

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

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

html {
  scroll-behavior: smooth;
}

/* ---------- Design tokens ---------- */
:root {
  --color-navy: #124C82;
  --color-gold: #A57B0E;
  --color-text: #232323;
  --color-text-muted: #6B7280;
  --color-bg: #FFFFFF;
  --color-bg-soft: #F7F5F1;
  --color-border: #E1E4E8;

  --font-sans: 'Roboto', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-mono: 'Roboto Mono', 'Courier New', monospace;
}

/* ---------- Base typography ---------- */
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  /* Contain any sub-pixel overflow from 100vw full-bleed sections without
     creating a scroll container (which would break the sticky header). */
  overflow-x: clip;
}

h1 {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-navy);
}

h2 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-navy);
}

h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}

.caption {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* ---------- Focus state ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main > section {
  padding: 4rem 0;
  border-bottom: 0.5px solid var(--color-border);
  scroll-margin-top: 80px;
}

main > section:last-child {
  border-bottom: none;
}

/* ---------- Section label (eyebrow) ---------- */
.label {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

/* ---------- Hero (v2: full-bleed, dark, overlay) ---------- */
.hero {
  position: relative;
  min-height: 560px;
  max-height: 75vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(135deg, #0D2845 0%, #1A3E5F 60%, #234D70 100%);
}

.hero-bg { position: absolute; inset: 0; z-index: 1; }

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65) saturate(0.85);
}

.hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 3.5rem 0 3rem;
}

.hero-overlay::before {
  content: '';
  position: absolute;
  inset: -40% 0 0 0;
  background: linear-gradient(to top, rgba(13, 40, 69, 0.7) 0%, rgba(13, 40, 69, 0.2) 60%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.hero-content { max-width: 720px; }

.hero-label {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.hero-display {
  font-size: 2.5rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.005em;
}

.hero-subhead {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
  margin: 0 0 1.25rem;
  max-width: 580px;
}

.hero-rule {
  height: 3px;
  width: 56px;
  background: var(--color-gold);
  margin: 0 0 0.875rem;
}

.hero-tagline {
  font-size: 0.875rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

@media (max-width: 768px) {
  .hero { min-height: 480px; }
  .hero-display { font-size: 1.875rem; }
  .hero-subhead { font-size: 1rem; }
}

.hero-scroll {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  z-index: 3;
  transition: background 120ms ease, border-color 120ms ease;
}

.hero-scroll:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ---------- Split-panel prose ---------- */
.split-panel p + p {
  margin-top: 1rem;
}

/* ---------- Section header (reusable two-column pattern) ---------- */
.section-head {
  display: grid;
  grid-template-columns: 38% 62%;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ---------- Services as phased methodology ---------- */
.services-header {
  margin-bottom: 3rem;
  max-width: 720px;
}

.services-header h2 {
  margin: 0 0 0.75rem;
}

.services-subhead {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0;
}

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

@media (max-width: 900px) {
  .phases {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.phase-header {
  padding-bottom: 0.875rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-gold);
}

.phase-range {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-gold);
  margin-bottom: 0.25rem;
  display: block;
}

.phase-name {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-navy);
  margin: 0;
  line-height: 1.3;
}

.phase-steps {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.phase-step .step-number {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.375rem;
  display: block;
}

.phase-step .step-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-navy);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.phase-step .step-desc {
  font-size: 0.8125rem;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}

/* ---------- Software (v2) ---------- */
.software-header {
  text-align: left;
  margin-bottom: 0;
}

/* ---------- References (v2) ---------- */
.references__list {
  margin-top: 2.5rem;
}

.case-study {
  margin-bottom: 4rem;
}

.case-study:last-of-type {
  margin-bottom: 2rem;
}

.case-study h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-navy);
  margin: 0.25rem 0 1rem;
}

.client-logos {
  margin-top: 4rem;
  text-align: center;
}

.client-logos .section-label-mono {
  text-align: center;
  margin-bottom: 1rem;
}

.client-logos__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.client-logos__row li {
  width: 96px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-logos__row li img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.65;
  transition: filter .25s ease, opacity .25s ease;
  transform-origin: center;
}

.client-logos__row li img:hover {
  filter: none;
  opacity: 1;
}

/* Per-logo scale to normalize visual weight across very different aspect ratios.
   The slot is ~2.4:1; very wide logos (Wiener Linien 5:1, PMDP 5.3:1) end up
   short, square-ish ones end up narrow. Scaling here only changes rendered
   visual size — the bounding box stays inside the cell, so the row layout is
   unaffected and gaps are preserved. */
.client-logos__row img[src*="htm.svg"],
.client-logos__row img[src*="ret.svg"],
.client-logos__row img[src*="gvb.svg"]            { transform: scale(0.85); }
.client-logos__row img[src*="wiener-linien"],
.client-logos__row img[src*="pmdp"]               { transform: scale(1.4); }
.client-logos__row img[src*="yarra-trams"],
.client-logos__row img[src*="dpb"]                { transform: scale(1.2); }
.client-logos__row img[src*="blackpool"]          { transform: scale(1.1); }
.client-logos__row img[src*="tramwaje"]           { transform: scale(1.05); }

/* ---------- Callout ---------- */
.callout {
  background: var(--color-bg-soft);
  border-left: 3px solid var(--color-gold);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
}

.callout-label {
  font-size: 11px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.callout-number {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-gold);
  line-height: 1.2;
  margin: 0.25rem 0;
}

.callout-description {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ---------- Contact (consolidated dark band) ---------- */
.contact {
  background: linear-gradient(135deg, #0D2845 0%, #1A3E5F 100%);
  color: #ffffff;
  padding: 5rem 1.5rem;
  text-align: center;
}

.contact__inner {
  max-width: 720px;
}

.contact__heading {
  font-size: 1.75rem;
  font-weight: 500;
  color: #ffffff;
  margin: 0 0 0.75rem;
  letter-spacing: -0.005em;
}

.contact__sub {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 auto 2.25rem;
  max-width: 540px;
  line-height: 1.5;
}

.contact .contact-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.75rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.contact .contact-list li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.625rem;
  font-size: 14px;
  margin: 0;
}

.contact .contact-list__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact .contact-list a {
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color 120ms ease;
}

.contact .contact-list a:hover {
  border-bottom-color: var(--color-gold);
}

.contact-address {
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ---------- Contact form ---------- */
.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 0.375rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0.5px solid var(--color-border);
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
}

.contact-form textarea {
  resize: vertical;
  min-height: 6rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-navy);
  outline-offset: 0;
  border-color: transparent;
}

.btn-submit {
  background: var(--color-navy);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: 3px;
}

.btn-submit:hover {
  background: #0D3D6B;
}

.contact-thanks {
  background: var(--color-bg-soft);
  border-left: 3px solid var(--color-gold);
  padding: 1rem 1.25rem;
  font-size: 14px;
  color: var(--color-text);
}

/* ---------- Site header (sticky nav) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  background: var(--color-bg);
  border-bottom: 0.5px solid var(--color-border);
}

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

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo__img {
  height: 28px;
  width: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 13px;
  color: var(--color-text);
  transition: color 120ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-navy);
}

.site-nav a.site-nav__app-login {
  color: var(--color-gold);
  font-weight: 500;
}

.site-nav a.site-nav__app-login:hover {
  color: var(--color-gold);
  opacity: 0.75;
}

/* ---------- Mobile nav toggle (hamburger) ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-text);
  transition: transform 180ms ease, opacity 180ms ease;
}

/* Animate the three bars into an "X" when open */
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 60px; /* below the 60px-tall sticky header */
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 0.5px solid var(--color-border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    /* Hidden until toggled open */
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
  }

  .site-nav li a {
    display: block;
    padding: 0.875rem 1.5rem;
    font-size: 15px;
    border-bottom: 0.5px solid var(--color-border);
  }

  .site-nav li:last-child a {
    border-bottom: 0;
  }
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--color-gold);
  z-index: 200;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ---------- Site footer ---------- */
.site-footer {
  background: #ffffff;
  padding: 1.5rem 0;
  border-top: 0.5px solid var(--color-border);
}

.site-footer .container {
  text-align: center;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer__copy,
.site-footer__taxid {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
}

/* === Layout patterns (v2) === */

/* Full-bleed section breaks out of the container's max-width */
.full-bleed {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Split-panel — 50/50 grid that stacks on mobile */
.split-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 768px) {
  .split-panel { grid-template-columns: 1fr; gap: 1.5rem; }
  /* Case studies alternate image/text in source order for the desktop zig-zag.
     When stacked, force the image (+ caption) above the text on every card so
     the reading rhythm stays consistent. */
  .case-study > div:has(.panel-img) { order: -1; }
}

/* Image panel placeholder (until real images are added) */
.panel-img {
  background: var(--color-bg-soft);
  border: 0.5px solid var(--color-border);
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.panel-img-wide { aspect-ratio: 21 / 9; }

.panel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.panel-placeholder-label {
  font-size: 11px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  opacity: 0.45;
}

/* Image captions — italic Roboto Regular (NOT mono) */
.img-caption {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Four-stat breaker */
.stat-breaker-section {
  padding: 3rem 0;
}

.stat-breaker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-breaker > div {
  padding: 0 1.25rem;
  border-left: 1px solid var(--color-border);
}

.stat-breaker > div:first-child {
  border-left: none;
  padding-left: 0;
}

@media (max-width: 768px) {
  .stat-breaker { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1rem; }
  .stat-breaker > div:nth-child(odd) { border-left: none; padding-left: 0; }
}

.stat-label {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.375rem;
}

.stat-value {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-navy);
  line-height: 1.2;
}

/* Pull-quote breaker */
.pullquote {
  text-align: center;
  padding: 4rem 0;
  background: #FAFAF8;
}

.pullquote-mark {
  font-size: 0.6875rem;
  color: var(--color-gold);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.pullquote-text {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-navy);
  line-height: 1.45;
  max-width: 720px;
  margin: 0 auto;
  font-style: italic;
  font-family: var(--font-sans);
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .pullquote { padding: 3rem 0; }
  .pullquote-text { font-size: 1.0625rem; }
}

/* Section labels (used across new split-panel sections) */
.section-label-mono {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
  display: block;
}
