/* ==========================================================================
   DP WORLD · LG200 — Location
   Sections, in document order:
     1. Hero              .page-hero (shared, theme.css)
     2. Multi-modal claim .loc-intro       (light)
     3. Connections       .loc-connections
     4. 90+ ports         .loc-ports
     5. Map               .loc-map         (light)

   Sections 2 and 5 run on light artwork, so they set their own ink colour —
   the site's default type colour is white.
   ========================================================================== */

:root {
  --loc-ink:      #1F174F;   /* indigo type on the light sections */
  --loc-ink-soft: #3B3B4F;   /* body copy on the light sections */
  --loc-rule:     rgba(255, 255, 255, 0.28);
}

/* Hero type runs to the same scale as the other interior pages. The measure is
   what folds this headline to three lines — see docs/LOCATION.md. */
.page-hero--location {
  --hero-title-size: clamp(1.9rem, 5.885vw, 67px);
  --hero-title-measure: 57rem;
}

/* ==========================================================================
   2 · Multi-modal claim — one centred paragraph on light.
   ========================================================================== */
.loc-intro {
  color: var(--loc-ink);
  background: rgba(231, 231, 231, 1);
  padding-block: clamp(3.25rem, 7vw, 6rem);
}
.loc-intro__inner {
  text-align: center;
}
/* Pilat Wide Book at 21px on 25px leading — 450 selects the Book face, the same
   way the h1 does. The clamp only scales it down on narrow screens; 21px is the
   ceiling. */
.loc-intro__copy {
  font-family: var(--font-heading);
  font-weight: 450;
  font-size: clamp(1rem, 1.55vw, 21px);
  line-height: calc(25 / 21);
  letter-spacing: 0;
  max-width: 52rem;
  margin: 0 auto;
}

/* ==========================================================================
   3 · Connections — the UK map beside the schedules, on the brand gradient.
   ========================================================================== */
/* No padding above or below: the map artwork runs to the section's edges. */
.loc-connections {
  background: linear-gradient(120deg, var(--c-indigo-800) 0%, var(--c-purple-500) 100%);
}
/* 50/50 — the map, then the schedules. Both columns run the full height of the
   section so the schedules can sit against the top and the figures against the
   bottom. */
.loc-connections__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(2rem, 4.5vw, 4rem);
}
.loc-connections__map img {
  display: block;
  width: 100%;
  height: auto;
}
/* The map bleeds to the section's edges; the copy beside it does not. */
.loc-connections__col {
  display: flex;
  flex-direction: column;
  padding-block: clamp(2rem, 4.4vw, 3.5rem);
}
.loc-connections__copy {
  font-weight: 300;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.42;
  max-width: 44rem;
  margin: 0 0 clamp(1.5rem, 3.2vw, 2.5rem);
}

/* ---- Schedules ---- */
.loc-tables {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.4vw, 3rem);
}
.loc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.loc-table__caption {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.75rem, 0.95vw, 0.875rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding-bottom: clamp(0.6rem, 1.2vw, 0.9rem);
}
/* Column headings sit above a mint rule, as drawn. */
.loc-table th[scope="col"] {
  font-weight: 600;
  font-size: clamp(0.6rem, 0.72vw, 0.6875rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0 0.5rem;
  border-bottom: 1px solid var(--c-green);
  white-space: nowrap;
}
.loc-table th[scope="row"],
.loc-table td {
  font-weight: 300;
  font-size: clamp(0.6875rem, 0.85vw, 0.8125rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: clamp(0.4rem, 0.8vw, 0.6rem) 0;
  border-bottom: 1px solid var(--loc-rule);
}
.loc-table th[scope="row"] { font-weight: 400; }
.loc-table td { font-variant-numeric: tabular-nums; }
.loc-table tbody tr:last-child th,
.loc-table tbody tr:last-child td { border-bottom: 0; }

/* ---- Catchment figures ---- */
/* `margin-top: auto` is what pins the figures to the foot of the column, with
   the copy and schedules staying at the top. */
.loc-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2.25rem);
  margin: auto 0 0;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  border-top: 1px solid var(--c-green);
  list-style: none;
}
.loc-stat__figure {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.75vw, 1.55rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.loc-stat__label {
  display: block;
  font-weight: 300;
  font-size: clamp(0.7rem, 0.88vw, 0.8125rem);
  line-height: 1.32;
  margin-top: clamp(0.4rem, 0.9vw, 0.7rem);
  max-width: 18ch;
}
/* The three rings step back as the catchment widens, as drawn. */
.loc-stat:nth-child(2) { opacity: 0.82; }
.loc-stat:nth-child(3) { opacity: 0.62; }

/* ==========================================================================
   4 · 90+ ports — the photograph sets the height: it runs at its own ratio,
       full width and uncropped, with the copy over its sky.
   ========================================================================== */
.loc-ports {
  position: relative;
  isolation: isolate;
}
.loc-ports__media img {
  display: block;
  width: 100%;
  height: auto;
}
/* Blue wash over the top of the photograph so the copy reads against the sky —
   the same treatment as the ESG features band, carried further down here
   because this photograph's horizon sits lower in the frame. */
.loc-ports::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 55%;
  z-index: 0;
  background: linear-gradient(180deg, #0178DE 0%, rgba(1, 120, 222, 0) 100%);
  pointer-events: none;
}
.loc-ports__inner {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 1;
  padding-block: clamp(2.25rem, 4.6vw, 3.75rem) 0;
}

.loc-ports__head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 3.4vw, 3rem);
  margin-bottom: clamp(2rem, 4.4vw, 3.5rem);
}
.loc-ports__title {
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 1.02;
  margin: 0;
}
.loc-ports__copy {
  font-weight: 300;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.42;
  margin: 0;
  max-width: 44rem;
  /* Clear of the badge, which sits in the corner of the row. */
  padding-right: clamp(4rem, 9vw, 9rem);
}
/* Solid disc, 40% larger than the ring it replaced. */
.loc-ports__badge {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: clamp(4.9rem, 8.4vw, 7.7rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #004BC6;
}
.loc-ports__badge img { width: 52%; height: auto; }

.loc-port-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.8vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Every column carries a hairline down its left edge, fading toward the foot —
   the same rule as the ESG cards. */
.loc-port {
  position: relative;
  padding-left: clamp(1rem, 2.2vw, 2.25rem);
}
.loc-port::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule-fade);
  pointer-events: none;
}
.loc-port__icon {
  display: block;
  width: auto;
  height: clamp(2rem, 3vw, 2.85rem);
  margin-bottom: clamp(0.9rem, 2vw, 1.6rem);
}
.loc-port__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.32vw, 1.2rem);
  line-height: 1.22;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0 0 clamp(0.6rem, 1.3vw, 1rem);
}
.loc-port__copy {
  font-weight: 300;
  font-size: clamp(0.8rem, 1.02vw, 0.95rem);
  line-height: 1.36;
  margin: 0;
  max-width: 26ch;
}

/* ==========================================================================
   5 · Map — the styled Google map on a light plate.
   ========================================================================== */
.loc-map {
  background: linear-gradient(180deg, #E5E5E5 0%, #93BDEA 100%);
  padding-block: clamp(2rem, 4.4vw, 3.5rem);
}
/* The plate keeps its shape whether or not the Maps script ever answers. */
.loc-map__canvas {
  width: 100%;
  aspect-ratio: 1441 / 700;
  border-radius: 12px;
  overflow: hidden;
  background: #eff0f3;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .loc-connections__inner { grid-template-columns: 1fr; }
  .loc-connections__map { max-width: 32rem; margin-inline: auto; }
}

@media (max-width: 900px) {
  /* Two rows of cards no longer fit inside the sky, so the section unstacks:
     the copy and cards sit on the brand gradient above the photograph, which
     still runs full width and uncropped beneath them. */
  .loc-ports {
    background: linear-gradient(120deg, var(--c-indigo-800) 0%, var(--c-purple-500) 100%);
  }
  .loc-ports::before { display: none; }
  .loc-ports__inner {
    position: static;
    padding-block: clamp(2.25rem, 6vw, 3.25rem);
  }
  .loc-ports__head { grid-template-columns: 1fr; }
  .loc-ports__copy { padding-right: clamp(4rem, 14vw, 7rem); }
  .loc-port-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: clamp(2rem, 5vw, 3rem); }

  .loc-map__canvas { aspect-ratio: 4 / 3; }
}

@media (max-width: 640px) {
  .loc-tables { grid-template-columns: 1fr; }
  .loc-stats { grid-template-columns: 1fr; }
  .loc-stat__label { max-width: none; }
  /* Two up rather than one. */
  .loc-port-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loc-port__copy { max-width: none; }   /* the column is the measure now */
}
