/* RAMS homepage. Fonts: Barlow / Barlow Semi Condensed (SIL OFL 1.1), self-hosted. */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --asphalt: #172238;        /* deep navy, echoing the C&W portal header */
  --paper: #f3f5f4;
  --white: #ffffff;
  --ink: #16202a;
  --muted: #4a5560;
  --rule: #d3d9dd;
  --sign: #0c6b3a;        /* guide-sign green */
  --sign-dark: #08542d;
  --blue: #26398c;        /* RAMS logo blue */
  --line: #f2c230;        /* lane-marking yellow */
  --display: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Barlow", "Segoe UI", Arial, sans-serif;
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--blue); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--line); color: var(--ink); padding: .6rem 1rem; font-weight: 600;
}
.skip:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Masthead */
.masthead { background: var(--white); border-bottom: 1px solid var(--rule); }
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding-top: .85rem; padding-bottom: .85rem; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--ink); }
.brand img { width: 64px; height: auto; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.brand__sub { font-size: .875rem; color: var(--muted); }
.govt { display: flex; align-items: center; gap: .75rem; }
.govt img { height: 48px; width: auto; }
.govt__text { font-size: .875rem; line-height: 1.3; color: var(--muted); border-left: 1px solid var(--rule); padding-left: .85rem; }

/* Road: hero with guide signs */
.road { background: var(--asphalt); color: var(--white); position: relative; padding: 3.25rem 0 4.5rem; }
.road :focus-visible { outline-color: var(--line); }
.eyebrow { font-size: .875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #c9d1d6; }
.road h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); margin-top: .5rem; max-width: 18ch; }
.lead { margin-top: 1rem; max-width: 40rem; font-size: 1.1875rem; color: #d6dce0; }
.road__label {
  margin-top: 2.75rem; font-size: 1rem; font-family: var(--body); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--white);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem;
}
.road__label span { text-transform: none; letter-spacing: 0; font-weight: 400; color: #c9d1d6; }
.road__line {
  position: absolute; left: 0; right: 0; bottom: 1.5rem; height: 6px;
  background: repeating-linear-gradient(90deg, var(--line) 0 3rem, transparent 3rem 5rem);
}

.signs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.sign {
  display: block; height: 100%; text-decoration: none; color: var(--white);
  background: var(--sign); border-radius: 14px; padding: 7px;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  transition: background-color .15s ease, transform .15s ease;
}
.sign__panel {
  display: flex; flex-direction: column; height: 100%;
  border: 3px solid var(--white); border-radius: 9px; padding: 1.25rem 1.4rem 1.2rem;
}
.sign__top { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; }
.sign__note { font-family: var(--body); font-weight: 500; font-size: .8125rem; letter-spacing: 0; color: #e3efe8; }
.sign__name { font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.02; margin-top: 1.1rem; }
.sign__desc { margin-top: .6rem; color: #eef5f1; max-width: 34rem; }
.sign__mods { margin-top: .9rem; padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.35); font-size: .875rem; line-height: 1.6; color: #dcebe2; flex: 1; }
.sign__go {
  margin-top: 1.25rem; align-self: flex-start;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--white); color: var(--sign-dark); border-radius: 6px;
  padding: .4rem .7rem .4rem .85rem; font-weight: 600;
}
.sign:hover { background: var(--sign-dark); transform: translateY(-2px); }
.sign:focus-visible { outline-offset: 4px; }

/* Dashboards band */
.band { padding: 3.5rem 0 3rem; }
.band__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; border-bottom: 2px solid var(--ink); padding-bottom: .75rem; }
.band__head h2 { font-size: 2rem; }
.band__head p { color: var(--muted); }
.dash li { border-bottom: 1px solid var(--rule); }
.dash__item {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; align-items: center; gap: 1.25rem;
  padding: 1.25rem .5rem; text-decoration: none; color: var(--ink);
  transition: background-color .15s ease;
}
.dash__tag {
  justify-self: start; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--white); background: var(--blue); border-radius: 4px; padding: .2rem .5rem;
}
.dash__body { display: flex; flex-direction: column; gap: .15rem; }
.dash__name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.15; }
.dash__desc { color: var(--muted); max-width: 42rem; }
.dash__host { display: inline-flex; align-items: center; gap: .35rem; color: var(--blue); font-weight: 500; font-size: .9375rem; white-space: nowrap; }
.dash__item:hover { background: var(--white); }
.dash__item:hover .dash__name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* About */
.about { background: var(--white); border-top: 1px solid var(--rule); padding: 3.5rem 0; }
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; }
.about__intro h2 { font-size: 2rem; margin-bottom: 1rem; }
.about__intro p + p { margin-top: .85rem; }
.mini { font-family: var(--body); font-size: .875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 2.25rem 0 .9rem; }
.timeline { border-left: 3px solid var(--line); padding-left: 1rem; }
.timeline li { padding: .35rem 0; }
.timeline__year { display: inline-block; min-width: 3.25rem; font-family: var(--display); font-weight: 700; font-size: 1.125rem; font-variant-numeric: tabular-nums; }

.duties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; align-content: start; }
.duties > div { border-top: 1px solid var(--rule); padding: 1rem 0 1.25rem; }
.duties > div:nth-child(2) { grid-row: span 2; }
.duties dt { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--sign-dark); }
.duties dd { margin-top: .35rem; }

.equip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.equip figure { margin: 0; }
.equip img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; background: var(--paper); }
.equip figcaption { margin-top: .6rem; display: flex; flex-direction: column; color: var(--muted); font-size: .9375rem; }
.equip figcaption strong { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.note { margin-top: 1.25rem; font-size: .9375rem; color: var(--muted); }

/* Footer */
.foot { background: var(--asphalt); color: #d6dce0; padding: 2.75rem 0 2rem; border-top: 6px solid var(--sign); }
.foot__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.foot__name { font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--white); margin-bottom: .35rem; }
.foot__h { font-family: var(--body); font-size: .875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #c9d1d6; margin-bottom: .6rem; }
.foot__links li + li { margin-top: .35rem; }
.foot a { color: var(--white); text-underline-offset: 3px; }
.foot a:hover { color: var(--line); }
.foot :focus-visible { outline-color: var(--line); }
.foot__small { grid-column: 1 / -1; border-top: 1px solid #34425e; padding-top: 1.25rem; font-size: .875rem; color: #b9c2c8; }

/* Responsive */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 2rem; }
  .equip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .govt__text { display: none; }
  .signs { grid-template-columns: 1fr; }
  .dash__item { grid-template-columns: minmax(0, 1fr); gap: .5rem; padding: 1.1rem .25rem; }
  .dash__host { white-space: normal; overflow-wrap: anywhere; }
  .duties { grid-template-columns: 1fr; }
  .duties > div:nth-child(2) { grid-row: auto; }
  .foot__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .equip { grid-template-columns: 1fr; }
  .brand img { width: 52px; }
  .brand__name { font-size: 1.05rem; }
  .govt img { height: 38px; }
  .road { padding: 2.25rem 0 4rem; }
}
@media (max-width: 400px) {
  .govt { gap: .4rem; }
  .govt img { height: 30px; }
  .brand { gap: .6rem; }
  .brand img { width: 44px; }
  .brand__name { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .sign:hover { transform: none; }
}
