@font-face {
  font-family: "Acre";
  src: url("fonts/acre-medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #f3f6ef;
  --muted: #a5aba5;
  --black: #060807;
  --panel: #0b0e0c;
  --line: rgba(255, 255, 255, 0.2);
  --acid: #d9ff43;
  --cyan: #72f7d4;
  --amber: #ffce57;
  --violet: #b8a7ff;
  --sv-purple-deep: #875dff;
  --sv-purple: #ab8eff;
  --sv-purple-soft: #cebeff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--black);
  font-family: "Acre", Arial, Helvetica, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 9px clamp(20px, 3vw, 48px);
  border-bottom: 0;
  background: linear-gradient(180deg, var(--black) 0%, var(--black) 72%, #0a0d0c 100%);
}

.header-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
}

.ose-logo {
  width: clamp(112px, 9vw, 128px);
  height: auto;
  display: block;
}

.brand-rule {
  width: 1px;
  height: 28px;
  flex: 0 0 1px;
  background: rgba(255, 255, 255, 0.42);
}

.sv-logo-crop {
  position: relative;
  display: block;
  flex: 0 0 72px;
  width: 72px;
  height: 29px;
  overflow: hidden;
}

.sv-logo-crop img {
  position: absolute;
  width: 83px;
  height: auto;
  left: -5px;
  top: -17px;
}

.header-title {
  display: flex;
  align-items: baseline;
  gap: 0.28em;
  min-width: 0;
  color: transparent;
  background: linear-gradient(
    100deg,
    var(--sv-purple-deep) 0%,
    var(--sv-purple) 52%,
    var(--sv-purple-soft) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(26px, 2.55vw, 40px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.header-title span,
.header-title strong {
  display: block;
  white-space: nowrap;
}

.header-title span {
  color: inherit;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
  letter-spacing: inherit;
}

.header-title strong {
  font-size: inherit;
  font-weight: 500;
}

.hero {
  position: relative;
  min-height: calc(100svh - 74px);
  overflow: hidden;
  background: #0a0d0c;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 12px;
  font: 11px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 16px var(--acid);
}

.video-controls {
  position: absolute;
  z-index: 4;
  right: clamp(20px, 3vw, 48px);
  bottom: clamp(28px, 4vh, 52px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.round-control {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  background: rgba(4, 6, 5, 0.35);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.round-control:hover,
.round-control:focus-visible {
  background: var(--acid);
  border-color: var(--acid);
  color: #050705;
  transform: scale(1.05);
}

.round-control svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.scroll-cue {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 26px;
  display: grid;
  justify-items: center;
  gap: 7px;
  transform: translateX(-50%);
  font: 10px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scroll-cue svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  animation: drift 1.8s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.programmes {
  position: relative;
  padding: clamp(76px, 10vw, 150px) clamp(16px, 3vw, 48px) clamp(80px, 9vw, 130px);
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 255, 67, 0.09), transparent 28%),
    var(--black);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin: 0 auto clamp(46px, 6vw, 84px);
  max-width: 1560px;
}

.section-heading h2 {
  max-width: 1050px;
  margin: 0;
}

.section-heading .section-logo-title {
  width: min(76vw, 1180px);
  max-width: 100%;
  line-height: 0;
}

.section-logo-title img {
  display: block;
  width: 100%;
  height: auto;
}

.section-note {
  flex: 0 0 auto;
  margin: 0;
  padding-bottom: 5px;
  color: var(--muted);
  font: 11px/1.5 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
}

.programme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1560px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.programme-card {
  --card-image: none;
  --card-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: clamp(360px, 42vw, 620px);
  padding: clamp(20px, 2.5vw, 40px);
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  text-align: left;
  cursor: pointer;
  isolation: isolate;
}

.programme-card::before,
.programme-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.programme-card::before {
  z-index: 0;
  background-image: var(--card-image);
  background-position: var(--card-position);
  background-size: cover;
  filter: saturate(0.92) contrast(1.05);
  transform: scale(1.015);
  transition: filter 360ms ease, transform 560ms cubic-bezier(0.2, 0.65, 0.2, 1);
}

.programme-card::after {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(3, 5, 4, 0.62) 0%, rgba(3, 5, 4, 0.16) 42%, rgba(3, 5, 4, 0.88) 100%),
    linear-gradient(90deg, rgba(3, 5, 4, 0.46) 0%, transparent 72%);
  transition: background-color 260ms ease;
}

.programme-card:hover::before,
.programme-card:focus-visible::before {
  filter: saturate(1.08) contrast(1.08);
  transform: scale(1.05);
}

.programme-card:hover::after,
.programme-card:focus-visible::after {
  background-color: rgba(255, 255, 255, 0.035);
}

.programme-card:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: -3px;
}

.programme-card.emergency {
  --card-image: url("images/emergency007.jpg");
  --card-position: center 48%;
  grid-column: 1 / -1;
  min-height: clamp(500px, 66vw, 800px);
  background: #0a0d0a;
}

.card-topline {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font: 10px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.card-main {
  position: relative;
  z-index: 3;
}

.card-main p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.68);
  font: 11px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-logo-title {
  margin: 0;
  line-height: 0;
}

.programme-logo {
  display: block;
  width: auto;
  max-width: calc(100% - 82px);
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.programme-logo-emergency {
  width: min(92%, 1120px);
}

.programme-logo-mangrove {
  width: min(82%, 470px);
}

.programme-logo-crop {
  width: min(66%, 330px);
}

.programme-logo-malacca {
  width: min(82%, 900px);
}

.card-arrow,
.play-mark {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 2.5vw, 40px);
  bottom: clamp(20px, 2.5vw, 40px);
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  font-size: 24px;
  transition: transform 240ms ease, background 240ms ease, color 240ms ease;
}

.programme-card:hover .card-arrow,
.programme-card:focus-visible .card-arrow,
.programme-card:hover .play-mark,
.programme-card:focus-visible .play-mark {
  color: #050705;
  background: var(--card-accent, var(--acid));
  transform: rotate(8deg) scale(1.08);
}

.play-mark svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.mangrove {
  --card-accent: var(--cyan);
  --card-image: url("images/mangrove007.jpg");
  --card-position: center;
}

.crop {
  --card-accent: var(--amber);
  --card-image: url("images/crop007.jpg");
  --card-position: center;
}

.malacca {
  --card-accent: var(--violet);
  --card-image: url("images/malacca007.jpg");
  --card-position: center;
  grid-column: 1 / -1;
  min-height: clamp(440px, 54vw, 720px);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  padding: 28px clamp(20px, 3vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 10px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer span:last-child {
  text-align: right;
}

.footer-earth-logo {
  display: block;
  width: 94px;
  height: auto;
}

.video-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: rgba(3, 5, 4, 0.93);
}

.video-dialog::backdrop {
  background: rgba(3, 5, 4, 0.92);
  backdrop-filter: blur(18px);
}

.video-dialog[open] {
  animation: dialog-in 260ms ease-out;
}

@keyframes dialog-in {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

.dialog-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  min-height: 100%;
  padding: clamp(18px, 3vw, 46px);
}

.dialog-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
}

.dialog-topbar span {
  display: block;
  margin-bottom: 5px;
  color: var(--acid);
  font: 10px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dialog-topbar h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.dialog-close {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.dialog-close span {
  position: absolute;
  left: 15px;
  top: 25px;
  width: 20px;
  height: 1px;
  margin: 0;
  background: currentColor;
  transform: rotate(45deg);
}

.dialog-close span:last-child {
  transform: rotate(-45deg);
}

.dialog-close:hover,
.dialog-close:focus-visible {
  color: #050705;
  border-color: var(--acid);
  background: var(--acid);
}

.dialog-shell video {
  width: 100%;
  height: calc(100svh - 140px);
  min-height: 0;
  object-fit: contain;
  background: #000;
}

@media (max-width: 740px) {
  .site-header {
    min-height: 64px;
    padding: 9px 18px;
  }

  .ose-logo { width: 84px; }
  .header-logos { gap: 8px; }
  .brand-rule { height: 22px; }
  .sv-logo-crop { flex-basis: 50px; width: 50px; height: 22px; }
  .sv-logo-crop img { width: 58px; left: -4px; top: -12px; }
  .header-title { font-size: 22px; }
  .hero { min-height: calc(100svh - 64px); }
  .video-controls { left: 18px; right: auto; bottom: 28px; }
  .scroll-cue { left: auto; right: 18px; transform: none; }
  .scroll-cue span { display: none; }

  .section-heading {
    display: block;
    margin-bottom: 38px;
  }

  .section-heading .section-logo-title { width: 100%; }
  .section-note { display: none; }
  .programme-grid { grid-template-columns: 1fr; }
  .programme-card.emergency { grid-column: auto; }
  .programme-card,
  .programme-card.emergency { min-height: 430px; }
  .card-main { padding-right: 54px; }
  .card-arrow,
  .play-mark { width: 48px; height: 48px; }
  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer span:nth-child(2) { display: none; }
}

@media (max-width: 480px) {
  .site-header {
    min-height: 58px;
    padding: 8px 14px;
  }

  .header-title { font-size: 18px; }
  .header-logos { gap: 6px; }
  .ose-logo { width: 68px; }
  .brand-rule { height: 18px; }
  .sv-logo-crop { flex-basis: 41px; width: 41px; height: 19px; }
  .sv-logo-crop img { width: 47px; left: -3px; top: -10px; }
  .hero { min-height: calc(100svh - 58px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue svg { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
