@font-face {
  font-family: "Instrument Serif";
  src: url(/assets/instrument-serif.woff2) format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url(/assets/dm-sans.woff2) format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf8f4;
  --surface: #fffefa;
  --ink: #172a48;
  --muted: #4e596a;
  --line: #dfded9;
  --red: #a8203d;
  --blue: #193a73;
  --navy: #142741;
  --pale-blue: #e9eef6;
  --display: "Instrument Serif", Georgia, serif;
  --body: "DM Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.55 var(--body);
}

a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 3px solid #476ac5;
  outline-offset: 4px;
}

section[id], article[id] { scroll-margin-top: 1.5rem; }

.shell {
  width: min(100% - 5rem, 75rem);
  margin-inline: auto;
}

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 5;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 1rem;
  background: white;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  min-height: 4.6rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  white-space: nowrap;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.075em;
}

.brand-accent { color: var(--red); }

.brand-mark {
  display: inline-block;
  position: relative;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 0.4rem;
  background: var(--navy);
}

.brand-mark::before, .brand-mark::after, .brand-mark i {
  position: absolute;
  content: "";
  width: 0.32rem;
  border-radius: 0.1rem;
  background: white;
}

.brand-mark::before { top: 29%; bottom: 27%; left: 27%; }
.brand-mark::after { top: 40%; bottom: 27%; left: 50%; }
.brand-mark i { top: 20%; left: 51%; height: 0.32rem; border-radius: 50%; background: #ef5c64; }

.main-nav, .header-actions, .language-switch {
  display: flex;
  align-items: center;
}

.main-nav { gap: clamp(0.9rem, 2.2vw, 2.05rem); }
.main-nav a, .mobile-nav nav a {
  font-size: 0.9rem;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover, .mobile-nav nav a:hover { color: var(--red); }
.header-actions { gap: 0.65rem; }

.language-switch {
  gap: 0.12rem;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 0.38rem;
  background: var(--paper);
}

.language-switch a {
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.25rem 0.36rem;
  border-radius: 0.21rem;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 710;
}

.language-switch a[aria-current] {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 3px #172a4822;
}

.search-trigger, .mobile-nav summary {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  gap: 0.48rem;
  padding: 0.4rem 0.65rem;
  border: 0;
  border-radius: 0.3rem;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
  font-size: 0.9rem;
}

.search-trigger:hover, .mobile-nav summary:hover { background: var(--pale-blue); }
.mobile-nav { position: relative; display: none; }
.mobile-nav summary { list-style: none; cursor: pointer; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav {
  position: absolute;
  z-index: 2;
  top: calc(100% + 0.55rem);
  right: 0;
  display: grid;
  min-width: 12rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  box-shadow: 0 12px 32px #172a4825;
}

.mobile-nav nav a { padding: 0.6rem 0.65rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.83fr) minmax(0, 1.17fr);
  align-items: stretch;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  margin-block: clamp(1.7rem, 3vw, 2.7rem) 0;
}

.hero-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  padding-block: 0.75rem;
}

.hero-marker {
  width: 2.6rem;
  height: 0.25rem;
  margin-bottom: 1.42rem;
  border-radius: 1rem;
  background: var(--red);
}

.hero h1, .section-heading h2, .crossing-copy h2, .story h3, .dialog-top h2 {
  font-family: var(--display);
  font-weight: 400;
}

.hero h1 { font-size: clamp(4.1rem, 7.4vw, 7.15rem); line-height: 0.84; letter-spacing: -0.027em; }
[lang="ms-MY"] .hero h1 { line-height: 0.94; }
.hero h1 span, .hero h1 em { display: block; }
.hero h1 em { color: var(--red); font-style: normal; }
.hero-copy > p {
  max-width: 25rem;
  margin-top: 1.55rem;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.4vw, 1.22rem);
  line-height: 1.48;
  text-wrap: pretty;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.64rem; margin-top: 1.65rem; }
.button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.94rem;
  border: 1px solid transparent;
  border-radius: 0.3rem;
  font-size: 0.93rem;
  text-decoration: none;
  line-height: 1.25;
  font-weight: 710;
}

.button-primary { background: var(--blue); color: white; }
.button-primary:hover { background: var(--navy); }
.button-secondary { border-color: #b9bfc8; }
.button-secondary:hover { border-color: var(--blue); background: var(--pale-blue); }

.hero-photo, .crossing-photo { position: relative; overflow: hidden; background: var(--navy); }
.hero-photo { height: clamp(23rem, 34vw, 30rem); border-radius: 0.48rem; }
.hero-photo img, .crossing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo img { object-position: 54% center; }
.hero-photo figcaption, .crossing-photo figcaption {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.36rem 0.62rem;
  border-radius: 0.24rem;
  background: #142741ec;
  color: white;
  font-size: 0.875rem;
  line-height: 1.35;
  font-weight: 580;
}

.hero-photo figcaption span { width: 0.38rem; height: 0.38rem; border-radius: 50%; background: #ff7781; }

.essentials { margin-top: 2.55rem; }
.essentials h2 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.82rem;
  font-size: 0.98rem;
  font-weight: 800;
}

.essentials h2::after { flex: 1; height: 1px; background: var(--line); content: ""; }
.utility-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.74rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.utility-link {
  display: flex;
  min-height: 4.9rem;
  height: 100%;
  align-items: center;
  gap: 0.72rem;
  padding: 0.7rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: 0.42rem;
  background: var(--surface);
  text-decoration: none;
}

.utility-link:hover { border-color: #9baccc; background: #fff; }
.utility-link strong, .utility-link small { display: block; }
.utility-link strong { font-size: 1rem; line-height: 1.25; font-weight: 780; }
.utility-link small { margin-top: 0.25rem; color: var(--muted); font-size: 0.875rem; line-height: 1.2; }
.utility-icon {
  display: grid;
  place-items: center;
  flex: 0 0 2.65rem;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.37rem;
  background: var(--pale-blue);
  color: var(--blue);
}

.icon { display: inline-block; position: relative; width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
.icon::before, .icon::after, .icon i { position: absolute; content: ""; }
.icon-search::before { inset: 0.04rem 0.28rem 0.28rem 0.04rem; border: 1.8px solid currentColor; border-radius: 50%; }
.icon-search::after { right: 0.02rem; bottom: 0.13rem; width: 0.5rem; height: 1.8px; border-radius: 1px; background: currentColor; transform: rotate(48deg); }
.icon-menu::before { inset: 0.12rem 0 0.12rem; border-block: 2px solid currentColor; }
.icon-menu::after { top: calc(50% - 1px); width: 100%; height: 2px; background: currentColor; }
.icon-prayer::before { inset: 0.08rem 0.18rem 0.08rem 0.03rem; border-radius: 50%; background: currentColor; }
.icon-prayer::after { top: 0.02rem; right: 0.07rem; width: 0.86rem; height: 0.86rem; border-radius: 50%; background: var(--pale-blue); }
.icon-prayer i { z-index: 1; top: 0.27rem; right: 0.04rem; width: 0.22rem; height: 0.22rem; border-radius: 50%; background: currentColor; }
.icon-weather::before { top: 0; left: 0.15rem; width: 0.67rem; height: 0.67rem; border: 1.65px solid currentColor; border-radius: 50%; }
.icon-weather::after { right: 0; bottom: 0.16rem; width: 0.9rem; height: 0.51rem; border: 1.65px solid currentColor; border-radius: 0.65rem; background: var(--pale-blue); }
.icon-calendar::before { inset: 0.22rem 0.05rem 0.06rem; border: 1.7px solid currentColor; border-radius: 0.14rem; }
.icon-calendar::after { top: 0.47rem; left: 0.1rem; right: 0.1rem; border-top: 1.7px solid currentColor; }
.icon-calendar i { top: 0.06rem; left: 0.27rem; right: 0.27rem; height: 0.34rem; border-inline: 1.7px solid currentColor; }
.icon-traffic::before { inset: 0.19rem 0.05rem 0.23rem; border: 1.7px solid currentColor; border-radius: 0.24rem; }
.icon-traffic::after { top: 0.47rem; left: 0.17rem; right: 0.17rem; border-top: 1.7px solid currentColor; }
.icon-traffic i { bottom: 0.07rem; left: 0.24rem; right: 0.24rem; height: 0.2rem; border-inline: 2px solid currentColor; }

.explore { margin-top: 3.2rem; }
.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 0.88rem;
}

.section-heading h2, .crossing-copy h2 { font-size: clamp(2.8rem, 4vw, 4rem); line-height: 1; letter-spacing: -0.025em; }
.section-heading p { color: var(--muted); }
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.story {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.42rem;
  background: var(--surface);
}

.story img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.story-laksa img { object-position: center 48%; }
.story-copy { display: flex; flex: 1; align-items: flex-start; flex-direction: column; padding: 1.1rem 1rem 1.2rem; }
.story-location { margin-bottom: 0.32rem; color: var(--red); font-size: 0.875rem; font-weight: 750; }
.story h3 { margin-bottom: 0.43rem; font-size: clamp(1.9rem, 3vw, 2.55rem); line-height: 1; letter-spacing: -0.018em; }
.story-copy p:not(.story-location) { color: var(--muted); margin-bottom: 1rem; }
.text-link { color: var(--blue); text-underline-offset: 0.2em; text-decoration-thickness: 1px; font-weight: 730; }
.text-link:hover { color: var(--red); text-decoration-thickness: 2px; }
.story-copy a { margin-top: auto; }
.zoo-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
}

.zoo-link span { font-weight: 650; }
.crossing { margin-block: 3.35rem; }
.crossing-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--navy);
  color: white;
}

.crossing-copy { padding: clamp(1.45rem, 3.3vw, 2.65rem); }
.crossing-copy > p { margin-top: 0.62rem; color: #dce5f2; }
.transport-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.15rem 0 0.92rem; }
.transport-tabs button {
  min-height: 2.4rem;
  padding: 0.36rem 0.85rem;
  border: 1px solid #8092ae;
  border-radius: 0.27rem;
  background: transparent;
  color: white;
  font-size: 0.94rem;
  font-weight: 700;
}

.transport-tabs button[aria-pressed="true"] { border-color: white; background: white; color: var(--navy); }
.transport-tabs button:hover:not([aria-pressed="true"]) { background: #274162; }
.route-option { padding-block: 0.5rem; }
.route-option h3 { margin-bottom: 0.25rem; font-size: 1.1rem; line-height: 1.25; }
.route-option p { max-width: 34ch; margin-bottom: 0.65rem; color: #dce5f2; }
.route-option .text-link { color: white; }
.route-option .text-link:hover { color: #ffc0c8; }
.route-options { min-height: 8.1rem; }
.crossing-photo { min-height: 18rem; }
.crossing-photo img { position: absolute; inset: 0; object-position: 67% 53%; }
.site-footer { padding-block: 1.5rem 1.9rem; border-top: 1px solid var(--line); background: var(--surface); }
.footer-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.footer-row p { margin-top: 0.4rem; color: var(--muted); font-size: 0.95rem; }
.photo-credits { margin-top: 1rem; color: var(--muted); font-size: 0.875rem; }
.photo-credits summary { width: fit-content; cursor: pointer; font-weight: 700; }
.photo-credits ul { margin-bottom: 0; padding-left: 1.1rem; }
.photo-credits li + li { margin-top: 0.32rem; }

.search-dialog {
  width: min(100% - 2rem, 37rem);
  max-height: min(86vh, 46rem);
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 18px 72px #101e3b52;
}

.search-dialog::backdrop { background: #13253f88; }
[data-analytics-settings] {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-decoration: underline;
}
.analytics-dialog { max-width: 32rem; }
.analytics-dialog[data-prompt="true"] {
  margin: auto 1rem 1rem auto;
  inset: auto 0 0 auto;
  max-width: calc(100% - 2rem);
  box-shadow: 0 0.5rem 2rem #13253f33;
}
.analytics-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.dialog-top h2 { font-size: 2.7rem; line-height: 1; }
.dialog-close { min-width: 2.5rem; min-height: 2.5rem; border: 0; border-radius: 0.25rem; background: var(--pale-blue); color: var(--ink); font-size: 1.55rem; line-height: 1; }
.search-dialog input {
  width: 100%;
  min-height: 3rem;
  padding: 0.58rem 0.72rem;
  border: 1px solid #98a5b8;
  border-radius: 0.3rem;
  color: var(--ink);
  background: white;
}
.search-status { margin-top: 0.85rem; color: var(--muted); font-size: 0.875rem; }
.search-results { display: grid; gap: 0.28rem; margin: 0.45rem 0 0; padding: 0; list-style: none; }
.search-results a { display: block; padding: 0.47rem 0.57rem; border-radius: 0.3rem; background: var(--paper); text-decoration: none; }
.search-results a:hover { background: var(--pale-blue); }
.search-results span { display: block; color: var(--muted); font-size: 0.875rem; }

@media (max-width: 990px) {
  .shell { width: min(100% - 3rem, 75rem); }
  .header-inner { gap: 0.6rem; }
  .main-nav { gap: 0.85rem; }
  .main-nav a { font-size: 0.875rem; }
  .search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .hero h1 { font-size: clamp(4.1rem, 8.55vw, 5.55rem); }
  .hero-photo { height: clamp(22rem, 41vw, 27rem); }
  .utility-link { padding: 0.65rem 0.55rem; gap: 0.5rem; }
  .utility-icon { flex-basis: 2rem; width: 2rem; height: 2rem; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 2.25rem); }
  .header-inner { min-height: 3.95rem; }
  .header-actions { gap: 0.22rem; }
  .main-nav { display: none; }
  .mobile-nav { display: block; }
  .search-trigger, .mobile-nav summary { padding-inline: 0.5rem; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 1.3rem; margin-top: 1.55rem; }
  .hero-copy { padding-block: 0.45rem 0; }
  .hero-marker { margin-bottom: 0.9rem; width: 2rem; height: 0.2rem; }
  .hero h1 { font-size: clamp(4rem, 15vw, 6.6rem); }
  .hero-copy > p { margin-top: 1rem; }
  .hero-actions { margin-top: 1.1rem; }
  .hero-photo { height: clamp(14rem, 59vw, 25rem); }
  .hero-photo img { object-position: 52% center; }
  .hero-photo figcaption, .crossing-photo figcaption { left: 0.75rem; bottom: 0.75rem; }
  .essentials { margin-top: 1.9rem; }
  .utility-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .utility-link { min-height: 4.45rem; }
  .utility-link strong { font-size: 0.94rem; }
  .explore { margin-top: 2.35rem; }
  .section-heading { margin-bottom: 0.9rem; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
  .crossing { margin-block: 2.35rem; }
  .crossing-card { grid-template-columns: minmax(0, 1fr); }
  .crossing-photo { min-height: 15.5rem; }
}

@media (max-width: 480px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .story img { aspect-ratio: 16 / 9; }
  .brand { font-size: 1.12rem; gap: 0.4rem; }
  .brand-mark { width: 1.8rem; height: 1.8rem; }
}

@media (max-width: 350px) {
  .shell { width: calc(100% - 1.5rem); }
  .header-actions { gap: 0.1rem; }
  .search-trigger, .mobile-nav summary { padding-inline: 0.34rem; }
  .utility-link { gap: 0.42rem; }
  .utility-icon { flex-basis: 1.65rem; width: 1.65rem; height: 1.65rem; }
}
