@font-face {
  font-family: "Hanken Grotesk";
  src: url("hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Jade platform wall, black enamel signs, yellow panels; lit windows and a lit district sign. */
:root {
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, "PingFang HK", "Noto Sans HK", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
  --wall: #0e6e5c;
  --tile: url("tile.svg");
  --wall-ink: #ffffff;
  --sign: #101715;
  --sign-ink: #ffffff;
  --sign-soft: #c6d3ce;
  --plate: #f6f7f3;
  --plate-ink: #101715;
  --plate-soft: #49534f;
  --route-bg: #f7c948;
  --route-ink: #101715;
  --route-line: #101715;
  --stop: #ffffff;
  --contact-bg: #f7c948;
  --contact-ink: #101715;
  --contact-soft: #4a3b0c;
  --accent: #f7c948;
  --focus: #f7c948;
  --m-tower: #101715;
  --m-ridge: #0a4f42;
  --m-water: #083f35;
  --m-ferry: #f6f7f3;
  --m-hull: #2a7a5e;
  --m-funnel: #f7c948;
  --m-grout: rgb(255 255 255 / 0.09);
  --m-win: #ffd36b;
  --lamp: #f7c948;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--wall);
}

body {
  margin: 0;
  container-type: inline-size;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--wall-ink);
  background: var(--wall);
}

.defs {
  position: absolute;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

/* The tile module. An odd column count keeps a tile on the page centre, so the panels' edges land on grout. */
.wall {
  --n: 9;
  --t: min(calc(100cqw / (var(--n) + 1)), 72px);
  --t: min(round(down, calc(100cqw / (var(--n) + 1)), 2px), 72px);
  --r: calc(var(--t) / 2);
  position: relative;
  overflow: clip;
  min-height: 100vh;
  padding-block: 0 var(--r);
  background: var(--wall) var(--tile) 50% 0 / calc(var(--t) * 5) calc(var(--t) * 3);
}

/* One pass of light across the glaze, like a train going through the station. */
.wall::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(104deg, transparent 38%, rgb(255 255 255 / 0.2) 50%, transparent 62%);
  transform: translateX(100%);
  animation: pass 1900ms var(--ease) 120ms 1 backwards;
}

@keyframes pass {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.probe {
  position: absolute;
  visibility: hidden;
  width: var(--r);
  height: 0;
}

.grid {
  position: relative;
  width: calc(var(--t) * var(--n));
  margin-inline: auto;
}

/* The hanging station sign. */
.ceiling {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  min-height: var(--t);
  margin-bottom: calc(var(--r) * 2);
  padding-inline: var(--r);
  font-weight: 700;
  color: var(--sign-ink);
  background: var(--sign);
}

.ceiling p {
  margin: 0;
}

.ceiling-place span {
  margin-right: 0.3em;
}

.ceiling-hk {
  display: none;
}

.time {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Hero */
.hero {
  display: grid;
  gap: var(--r);
}

.nameplate {
  position: relative;
  margin-bottom: var(--r);
}

/* The name leaves two and a half tiles on the right for the district sign. */
.station {
  margin: 0 0 0 -0.035em;
  font-size: calc(var(--t) * (var(--n) - 2.6) / 3.1);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--wall-ink);
}

.station span {
  display: block;
}

/* A vertical lit sign with the district name, as on a Sheung Wan street. */
.neon {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08em;
  width: calc(var(--t) * 2);
  height: 100%;
  font-size: calc(var(--t) * 1.25);
  font-weight: 700;
  line-height: 1.1;
  color: #fff7dc;
  background: var(--sign);
  border: 3px solid var(--lamp);
  box-shadow: 0 2px 22px rgb(247 201 72 / 0.45), inset 0 2px 18px rgb(247 201 72 / 0.22);
  text-shadow: 0 0 5px var(--lamp), 0 0 22px rgb(247 201 72 / 0.7);
}

.panel {
  padding: var(--r);
}

.enamel {
  color: var(--sign-ink);
  background: var(--sign);
}

.plate {
  color: var(--plate-ink);
  background: var(--plate);
}

.lede {
  display: grid;
  align-items: center;
  margin: 0;
  font-size: clamp(1.45rem, 1.1rem + 1.6cqw, 2.5rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

/* The line diagram: vertical on narrow screens, horizontal like the strip above a train door when wide. */
.route {
  display: grid;
  align-items: center;
  color: var(--route-ink);
  background: var(--route-bg);
}

.route ol {
  --stop-size: 28px;
  position: relative;
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route ol::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: calc(var(--stop-size) / 2 - 5px);
  width: 10px;
  background: var(--route-line);
}

.route a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7em;
  min-height: 48px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}

.stop {
  flex: none;
  width: var(--stop-size);
  height: var(--stop-size);
  background: var(--stop);
  border: 6px solid var(--route-line);
  border-radius: 50%;
  transition: background-color 200ms var(--ease);
}

.route a:hover .stop {
  background: var(--route-line);
}

.arrow {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
  transition: transform 260ms var(--ease);
}

.arrow.out {
  transform: rotate(-45deg);
}

/* Sections */
main {
  display: grid;
  gap: var(--r);
  margin-top: var(--r);
}

section {
  scroll-margin-top: var(--r);
}

h2 {
  margin: 0 0 calc(var(--r) * 0.75);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.product {
  display: grid;
  gap: var(--r);
}

.logo {
  display: block;
  width: min(100%, 300px);
  height: auto;
  margin-left: -1.2%;
}

.product-copy p {
  max-width: 34em;
  margin: calc(var(--r) * 0.75) 0 0;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--sign-soft);
}

.sign-links {
  display: grid;
  align-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sign-links li + li {
  border-top: 1.5px solid rgb(255 255 255 / 0.22);
}

.sign-links a {
  display: flex;
  align-items: center;
  gap: 0.6em;
  min-height: 48px;
  padding-block: 0.4em;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sign-ink);
  text-decoration: none;
}

.sign-links .arrow {
  color: var(--accent);
}

.sign-links a:hover .arrow.out {
  transform: rotate(-45deg) translateX(4px);
}

.pair {
  display: grid;
  gap: var(--r);
}

dl {
  margin: 0;
}

dl > div {
  padding-block: 0.7em;
  border-top: 1.5px solid color-mix(in srgb, currentColor 22%, transparent);
}

dl > div:last-child {
  padding-bottom: 0;
}

dt {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--plate-soft);
}

dd {
  margin: 0.1em 0 0;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
}

.address {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.contact {
  display: flex;
  flex-direction: column;
  color: var(--contact-ink);
  background: var(--contact-bg);
}

.contact dl {
  margin-top: auto;
}

.contact .phone {
  display: inline-block;
  align-self: flex-start;
  margin-block: -0.2em calc(var(--r) * 0.75 - 0.2em);
  padding-block: 0.3em;
  font-size: clamp(2rem, 1.45rem + 2.2cqw, 3.1rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

.contact .phone:hover,
.contact dd a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
}

.contact dt {
  color: var(--contact-soft);
}

.contact dd a {
  display: inline-block;
  margin-block: -0.3em;
  padding-block: 0.45em;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

/* The skyline, set into the wall. */
.mural {
  position: relative;
  height: calc(var(--t) * 6);
  margin-top: var(--r);
  overflow: hidden;
}

.mural-art {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: calc(var(--t) * 21);
  height: calc(var(--t) * 6);
  transform: translateX(-50%);
  max-width: none;
  overflow: visible;
}

.m-tower {
  fill: var(--m-tower);
}

.m-ridge {
  fill: var(--m-ridge);
}

.m-water {
  fill: var(--m-water);
}

.m-ferry {
  fill: var(--m-ferry);
}

.m-hull {
  fill: var(--m-hull);
}

.m-funnel {
  fill: var(--m-funnel);
}

.m-win {
  fill: var(--m-win);
}

.m-brace {
  fill: none;
  stroke: rgb(255 255 255 / 0.42);
  stroke-width: 0.08;
}

.m-grout {
  fill: none;
  stroke: var(--m-grout);
  stroke-width: 0.06;
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25em 1.5em;
  margin-top: var(--r);
  font-weight: 600;
}

.foot p {
  margin: 0;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (hover: none) {
  .sign-links a:hover .arrow.out {
    transform: rotate(-45deg);
  }
  .route a:hover .stop {
    background: var(--stop);
  }
}

@container (min-width: 640px) {
  .wall {
    --n: 15;
  }
  .station {
    font-size: calc(var(--t) * (var(--n) - 2.6) / 6.1);
  }
  .station span {
    display: inline;
  }
  .ceiling-hk {
    display: inline;
    margin-right: 1em;
  }
  .hero {
    grid-template-columns: 8fr 7fr;
  }
  .nameplate {
    grid-column: 1 / -1;
  }
  .product {
    grid-template-columns: 8fr 6fr;
    gap: var(--t);
  }
}

@container (min-width: 1100px) {
  .wall {
    --n: 21;
  }
  .hero {
    grid-template-columns: 13fr 8fr;
  }
  .pair {
    grid-template-columns: 12fr 9fr;
  }
  .product {
    grid-template-columns: 13fr 7fr;
  }
  .route ol {
    grid-template-columns: repeat(3, 1fr);
  }
  .route ol::before {
    top: calc(var(--stop-size) / 2 - 5px);
    bottom: auto;
    left: 16.666%;
    right: 16.666%;
    width: auto;
    height: 10px;
  }
  .route a {
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    min-height: 0;
    padding-block: 0;
    font-size: 1.15rem;
    line-height: 1.15;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .wall::before {
    animation: none;
    display: none;
  }
  .arrow,
  .stop {
    transition: none;
  }
}
