/* Bridgeworks design system.
   Rules: no rounded corners, no borders unless unavoidable (separate by tone and space instead).
   Headings, nav, buttons: Montserrat (closest free match to the logo). Body: Source Serif 4. */
@import url('fonts.css');

:root {
  /* colour */
  --blue: #0c3a50;        /* logo */
  --blue-deep: #072634;   /* hover, text on tint */
  --white: #ffffff;
  --paper: #f4f4f4;       /* the logo's own ground */
  --steel: #6e8294;       /* secondary text, quiet UI */
  --steel-light: #cdd6de; /* subdued surfaces, the arch motif */
  --yellow: #e3a52a;      /* attention only: focus, current item, hover */
  --green: #3e7d63;       /* confirmation only */
  --red: #a33a2a;         /* errors only */
  --ink: var(--blue-deep);

  /* type */
  --sans: 'Montserrat', system-ui, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --step--1: 0.9rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem);
  --step-4: clamp(1.8rem, 1.1rem + 3vw, 3.1rem);

  /* layout */
  --max: 1120px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space: 1.5rem;
  --section: clamp(3rem, 6vw, 5.5rem);
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { font: 400 var(--step-0)/1.65 var(--serif); color: var(--ink); background: var(--white); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
::selection { background: var(--yellow); color: var(--blue-deep); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; color: var(--blue); }
h1, h2 { text-transform: uppercase; letter-spacing: .05em; }
h3, h4 { letter-spacing: -0.01em; }
h1 { font-size: var(--step-3); font-weight: 800; }
h2 { font-size: var(--step-2); margin-top: 1.5em; }
h3 { font-size: var(--step-1); }
p, ul, ol { margin: 0 0 1em; }
.prose { max-width: 65ch; }
.prose h2:first-child { margin-top: 0; }
.prose img { margin: 1.5rem 0; }
.lead { font-size: var(--step-1); line-height: 1.45; color: var(--steel); max-width: 40ch; margin-bottom: 1.5rem; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; z-index: 10; background: var(--yellow); color: var(--blue-deep); padding: .5rem 1rem; font-family: var(--sans); font-weight: 700; }
.skip:focus { left: var(--gutter); }

/* header: a solid blue deck carrying the arch */
.site-header { background: var(--blue); color: var(--white); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 2.5rem; padding: 1.25rem 0; }
.brand { color: var(--white); text-decoration: none; font-family: var(--sans); font-weight: 800; font-size: 1.3rem; letter-spacing: .06em; line-height: 1; display: inline-grid; gap: .3rem; justify-items: center; }
.brand svg { width: 5.6em; fill: currentColor; }
.brand:hover { color: var(--white); }
.site-header nav { margin-inline-start: auto; }
.site-header nav ul, .lang { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-header nav a, .lang a { display: inline-block; text-decoration: none; font-family: var(--sans); font-weight: 700; font-size: var(--step--1); padding: .5rem 0 .4rem; box-shadow: inset 0 -3px 0 transparent; }
.site-header nav a { color: var(--white); }
.site-header nav a:hover { color: var(--steel-light); }
.site-header nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--yellow); }
.lang { gap: .75rem; }
.lang a { color: var(--steel-light); }
.lang a[aria-current] { color: var(--yellow); }

/* main + sections: separated by tone, never by lines */
main { flex: 1; }
.section { padding-block: var(--section); }
.section--paper { background: var(--paper); }
.section--blue { background: var(--blue); color: var(--white); }
.section--blue h1, .section--blue h2, .section--blue h3, .section--blue a { color: var(--white); }
.section--blue .lead { color: var(--steel-light); }
.page-header { background: var(--blue); color: var(--white); padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.page-header h1 { color: var(--white); margin-bottom: .35em; }
.page-header .lead { color: var(--steel-light); margin-bottom: 0; }
.page-header .back { color: var(--steel-light); margin: 0 0 1.5rem; }
.page-header .back:hover { color: var(--yellow); }
.page-body { padding-block: clamp(2.5rem, 5vw, 4rem) var(--section); }
.back { font-family: var(--sans); font-weight: 700; font-size: var(--step--1); text-decoration: none; display: inline-block; }

/* hero: the one bold element is the arch */
.hero { position: relative; overflow: hidden; padding: var(--section) 0 0; background: var(--white); }
.hero h1 { font-size: var(--step-4); max-width: 22ch; margin-bottom: 1rem; }
.hero .prose { font-size: var(--step-1); line-height: 1.5; max-width: 50ch; color: var(--steel); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 0; }
.hero .arch { width: 100%; fill: var(--steel-light); margin-top: clamp(2rem, 5vw, 4rem); }

/* buttons */
.button { display: inline-block; font-family: var(--sans); font-weight: 700; font-size: var(--step--1); line-height: 1; padding: 1rem 1.5rem; background: var(--blue); color: var(--white); text-decoration: none; cursor: pointer; border: 0; transition: background-color .15s, color .15s; }
.button:hover { background: var(--yellow); color: var(--blue-deep); }
.button--quiet { background: var(--paper); color: var(--blue); }
.button--quiet:hover { background: var(--steel-light); color: var(--blue-deep); }
.section--blue .button { background: var(--white); color: var(--blue); }
.section--blue .button:hover { background: var(--yellow); color: var(--blue-deep); }

/* cards: tone, not lines */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 2rem; }
.card { background: var(--paper); display: flex; flex-direction: column; }
.section--paper .card { background: var(--white); }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card__body { padding: 1.25rem 1.5rem 1.5rem; }
.card h3 { margin-bottom: .35rem; }
.card h3 a { color: var(--blue); text-decoration: none; }
.card h3 a:hover { color: var(--blue-deep); text-decoration: underline; }
.card p { margin: 0; color: var(--steel); font-size: var(--step--1); line-height: 1.5; }
.hero-image { margin: 0 0 2rem; }

/* job list: rows separated by tone */
.jobs { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: 44rem; display: grid; gap: .5rem; }
.jobs li { background: var(--paper); padding: 1.25rem 1.5rem; }
.jobs h3 { margin-bottom: .25rem; }
.jobs h3 a { text-decoration: none; }
.jobs h3 a:hover { text-decoration: underline; }
.jobs p { margin: 0; color: var(--steel); font-size: var(--step--1); }

/* forms: fields are paper blocks, no outlines until focus */
.contact-form { max-width: 36rem; margin-top: 2.5rem; }
.contact-form p { margin: 0 0 1.25rem; }
label { display: block; font-family: var(--sans); font-weight: 700; font-size: var(--step--1); margin-bottom: .4rem; color: var(--blue); }
input, textarea { width: 100%; font: inherit; font-size: var(--step-0); padding: .85rem 1rem; background: var(--paper); border: 0; color: var(--ink); }
input:focus, textarea:focus { outline: 3px solid var(--yellow); outline-offset: 0; }
[aria-invalid="true"] { box-shadow: inset 4px 0 0 var(--red); }
.error { display: block; color: var(--red); font-size: var(--step--1); margin-top: .35rem; }
.notice { padding: 1rem 1.25rem; font-family: var(--sans); font-weight: 700; font-size: var(--step--1); }
.notice--ok { background: var(--green); color: var(--white); }
.notice--error { background: var(--red); color: var(--white); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.site-footer { background: var(--blue-deep); color: var(--steel-light); font-family: var(--sans); font-size: var(--step--1); padding: 2rem 0; }
.site-footer p { margin: 0; }

/* style guide only */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.swatch { aspect-ratio: 4 / 3; padding: 1rem; font-family: var(--sans); font-weight: 700; font-size: var(--step--1); display: flex; flex-direction: column; justify-content: flex-end; }
.swatch small { font-weight: 400; opacity: .8; }
.specimen > * { margin-bottom: .25em; }
.specimen .lead { color: var(--steel); }
.specimen small { font-family: var(--sans); color: var(--steel); font-size: var(--step--1); display: block; margin-bottom: 1.5rem; }
.row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
