:root {
  --ink: #111827;
  --muted: #5f6b7a;
  --paper: #f6f7fb;
  --panel: #ffffff;
  --line: rgba(17, 24, 39, 0.12);
  --red: #f40d0d;
  --red-dark: #9a0808;
  --navy: #101827;
  --navy-2: #17243a;
  --gold: #ffd45d;
  --radius: 20px;
  --shadow: 0 18px 46px rgba(10, 18, 32, 0.14);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(244, 13, 13, 0.13), transparent 33rem),
    radial-gradient(circle at 100% 10%, rgba(47, 111, 237, 0.14), transparent 34rem),
    linear-gradient(180deg, #f1f3f8 0%, var(--paper) 48%, #ffffff 100%);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

[id] {
  scroll-margin-top: 104px;
}

.skip-link,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 0.75rem;
  z-index: 100;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.65rem 0.85rem;
  clip: auto;
  white-space: normal;
  background: #ffffff;
  color: var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

/* Header and navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 251, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.topbar {
  position: relative;
  z-index: 30;
  width: min(var(--max-width), calc(100% - 2rem));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.30), transparent 1.2rem),
    linear-gradient(135deg, var(--red), var(--red-dark));
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 22px rgba(244, 13, 13, 0.22);
}

.brand-text {
  display: grid;
  line-height: 1.12;
}

.brand-text strong {
  font-size: 1.02rem;
  letter-spacing: 0.08em;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.82rem;
}

.nav-include {
  margin-left: auto;
}

.nav-include .main-nav {
  margin-left: 0;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.main-nav a,
.nav-parent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.45rem 0.66rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"],
.nav-group:hover .nav-parent,
.nav-group:focus-within .nav-parent,
.nav-group.is-open .nav-parent {
  background: #ffe7e7;
  color: var(--red-dark);
  outline: none;
}

.nav-group {
  position: relative;
  z-index: 40;
}

.nav-parent::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.nav-menu {
  position: absolute;
  z-index: 100;
  top: calc(100% + 0.45rem);
  left: 0;
  min-width: 230px;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.nav-menu a {
  width: 100%;
  justify-content: flex-start;
  border-radius: 13px;
  color: var(--ink);
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu,
.nav-group.is-open .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Roll-away header panel */

.header-panel {
  position: relative;
  z-index: 10;
  overflow: hidden;
  max-height: 172px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 300ms ease, opacity 210ms ease, transform 210ms ease;
}

.site-header.is-collapsed .header-panel {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
}

.header-panel-inner {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.5rem 0 0.4rem;
  display: grid;
  grid-template-columns: clamp(240px, 31vw, 360px) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: center;
}

.logo-panel {
  margin: 0;
  width: 100%;
  padding: 0.28rem;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(10, 18, 32, 0.11);
  overflow: hidden;
}

.hero-logo {
  width: 100%;
  border-radius: 20px;
}

.hero-copy {
  position: relative;
  min-height: 110px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(
      90deg,
      rgba(8, 12, 20, 0.94) 0%,
      rgba(8, 12, 20, 0.84) 34%,
      rgba(8, 12, 20, 0.58) 58%,
      rgba(8, 12, 20, 0.18) 100%
    ),
    url("images/location-map.png");
  background-size: cover;
  background-position: center center;
  box-shadow: 0 12px 28px rgba(10, 18, 32, 0.13);
}

.hero-copy-content {
  position: relative;
  z-index: 1;
  max-width: 470px;
  padding: 0.8rem 1rem;
}

.eyebrow,
.section-kicker,
.card-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  color: #ffd6d6;
}

.hero-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.22rem, 2.3vw, 2rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.hero-location {
  margin: 0.42rem 0 0;
  color: #edf3ff;
  font-size: 0.94rem;
  line-height: 1.35;
}

.toggle-row {
  position: relative;
  z-index: 20;
  width: min(var(--max-width), calc(100% - 2rem));
  height: 24px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.header-toggle {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 64px;
  height: 44px;
  margin-top: -5px;
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 9px 23px rgba(10, 18, 32, 0.16);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, outline-color 160ms ease;
}

.header-toggle img {
  width: 48px;
  height: auto;
}

.header-toggle:hover,
.header-toggle:focus-visible {
  background: #ffffff;
  outline: 3px solid rgba(244, 13, 13, 0.22);
  outline-offset: 3px;
  transform: translateY(-1px);
}

/* Page layout */

.page-shell {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 2rem auto 0;
}

.intro-panel,
.wide-panel,
.feature-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 50px rgba(10, 18, 32, 0.08);
}

.intro-panel,
.wide-panel {
  padding: clamp(1.35rem, 3vw, 2.4rem);
}

.intro-panel--with-image {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.intro-panel-text {
  min-width: 0;
}

.intro-panel-image {
  margin: 0;
  align-self: stretch;
}

.intro-panel-image img {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 10px 26px rgba(10, 18, 32, 0.12);
}

.section-kicker,
.card-kicker {
  color: var(--red-dark);
}

.intro-panel h2,
.wide-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.intro-panel p,
.wide-panel p {
  max-width: 860px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.feature-card {
  min-height: 250px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.feature-card p:not(.card-kicker) {
  color: var(--muted);
}

.feature-card a {
  margin-top: auto;
  color: var(--red-dark);
  font-weight: 800;
  text-decoration: none;
}

.feature-card a:hover,
.feature-card a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.wide-panel {
  margin-top: 1rem;
}

.muted-panel {
  background: rgba(255, 255, 255, 0.58);
}

/* Wide panels with right-hand images */

.wide-panel--with-image {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.75fr);
  gap: 1.5rem;
  align-items: center;
}

.wide-panel-text {
  min-width: 0;
}

.wide-panel-image {
  margin: 0;
  justify-self: end;
}

.wide-panel-image img {
  width: 100%;
  max-width: 340px;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 10px 26px rgba(10, 18, 32, 0.12);
}

/* Centred caption */

.wide-panel-image {
  margin: 0;
  justify-self: end;
  width: min(100%, 340px);
  text-align: center;
}

.wide-panel-image img {
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 10px 26px rgba(10, 18, 32, 0.12);
}

.wide-panel-image figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
}

/* Floating thumbnail style used in text cards */

.card-flow-text {
  display: flow-root;
}

.card-flow-text p {
  margin-top: 0;
}

.card-float-thumb {
  float: right;
  width: 112px;
  margin: 0.15rem 0 0.65rem 0.9rem;
}

.card-float-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(10, 18, 32, 0.12);
}

/* Earlier grid thumbnail style retained in case it is used elsewhere */

.card-thumb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 0.9rem;
  align-items: start;
}

.card-thumb-text {
  min-width: 0;
}

.card-thumb-text p {
  margin-top: 0;
}

.card-thumb {
  margin: 0;
}

.card-thumb img {
  width: 112px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(10, 18, 32, 0.12);
}

/* CW / Marconi card */

#cw {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #ffffff;
  background: #2a211b;
  justify-content: space-between;
  min-height: 250px;
}

#cw::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("images/marconi-sepia.png");
  background-size: cover;
  background-position: left center;
  opacity: 0.58;
}

#cw::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(20, 14, 9, 0.78) 0%,
      rgba(20, 14, 9, 0.18) 42%,
      rgba(20, 14, 9, 0.88) 100%
    );
}

#cw .feature-card-heading,
#cw .feature-card-lower {
  position: relative;
  z-index: 1;
}

#cw .feature-card-lower {
  margin-top: auto;
}

#cw .card-kicker {
  color: #ffd7c2;
}

#cw h3 {
  color: #ffffff;
}

#cw p:not(.card-kicker) {
  color: #f5eadf;
}

#cw a {
  margin-top: 1rem;
  color: #ffe0c8;
}

/* Station card thumbnails */

#station .station-card-copy {
  display: flow-root;
}

#station .station-card-copy p {
  margin-top: 0;
}

#station .station-thumb {
  margin: 0;
}

#station .station-thumb img {
  display: block;
  width: 120px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(10, 18, 32, 0.12);
}

#station .station-thumb--right {
  float: right;
  margin: 0.1rem 0 0.75rem 0.9rem;
}

#station .station-thumb--left {
  float: left;
  clear: left;
  margin: 0.2rem 0.9rem 0.5rem 0;
}

#station .station-thumb--bottom-right {
  float: right;
  clear: right;
  width: 96px;
  margin: 0.2rem 0 0.45rem 0.85rem;
}

/*
  The Sculpture paddle is a transparent PNG. These rules intentionally remove
  the generic thumbnail background, crop, radius and shadow so the transparency
  remains visible against the card.
*/

#station .station-thumb--bottom-right img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

#station a {
  margin-top: auto;
}

/* Footer */

.site-footer {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 2rem auto 0;
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer p:last-child {
  font-size: 0.78rem;
  opacity: 0.82;
}

/* Responsive layout */

@media (max-width: 980px) {
  .topbar {
    min-height: auto;
    padding: 0.75rem 0 0.55rem;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-include {
    width: 100%;
    margin-left: 0;
  }

  .main-nav {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .header-panel-inner {
    grid-template-columns: clamp(230px, 42vw, 340px) minmax(0, 1fr);
  }

  .hero-copy {
    min-height: 96px;
  }

  .hero-location {
    font-size: 0.88rem;
  }

  .intro-panel--with-image {
    grid-template-columns: 1fr;
  }

  .intro-panel-image img {
    max-height: 320px;
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .header-panel {
    max-height: 258px;
  }

  .header-panel-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 0.45rem;
  }

  .logo-panel {
    width: min(100%, 330px);
  }

  .hero-copy {
    width: 100%;
    min-height: 92px;
  }

  .hero-copy-content {
    max-width: 100%;
  }

  .wide-panel--with-image {
    grid-template-columns: 1fr;
  }

  .wide-panel-image {
    justify-self: start;
  }

  .wide-panel-image img {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .brand-text span {
    font-size: 0.8rem;
  }

  .main-nav a,
  .nav-parent {
    min-height: 36px;
    padding: 0.42rem 0.54rem;
    font-size: 0.92rem;
  }

  .nav-menu {
    left: auto;
    right: 0;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .page-shell,
  .site-footer,
  .topbar,
  .toggle-row,
  .header-panel-inner {
    width: calc(100% - 1rem);
  }

  .card-thumb-row {
    grid-template-columns: 1fr;
  }

  .card-thumb img,
  .card-float-thumb img {
    width: 100%;
    max-height: 180px;
  }

  .card-float-thumb {
    float: none;
    width: 100%;
    margin: 0 0 0.85rem;
  }

  #station .station-thumb--right,
  #station .station-thumb--left,
  #station .station-thumb--bottom-right {
    float: none;
    clear: none;
    width: 100%;
    margin: 0 0 0.85rem 0;
  }

  #station .station-thumb img {
    width: 100%;
    max-height: 180px;
  }

  #station .station-thumb--bottom-right img {
    max-height: 160px;
    object-fit: contain;
  }
}