/* ================= Fonts ================= */
@font-face {
  font-family: "Thmanyah Sans";
  src: url("assets/fonts/thmanyahsans-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("assets/fonts/thmanyahsans-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("assets/fonts/thmanyahsans-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Thmanyah Sans";
  src: url("assets/fonts/thmanyahsans-Black.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ================= Tokens ================= */
:root {
  --paper: #FCFCFA;
  --paper-shade: #F4F4EF;
  --ink: #01274C;
  --blue: #027399;
  --yellow: #F2A900;
  --slate: #828B94;
  --line: #E3E2DA;
  --display: "Thmanyah Sans", "Alexandria", sans-serif;
  --body: "Alexandria", "Thmanyah Sans", sans-serif;
  --sketch-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --shadow-soft: 0 14px 40px rgba(1, 39, 76, 0.10);
  --max: 1120px;
}

/* ================= Base ================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.95;
  color: var(--ink);
  background: var(--paper);
}

img, svg, video { display: block; max-width: 100%; }

a { color: var(--blue); text-decoration: none; }

:focus-visible {
  outline: 2px dashed var(--blue);
  outline-offset: 4px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 900;
  line-height: 1.5;
  color: var(--ink);
}

h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; font-weight: 700; }

.en {
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 300;
  font-size: 0.86em;
  color: var(--slate);
  letter-spacing: 0.01em;
}

.eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--blue);
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

.hl {
  background-image: linear-gradient(to top, transparent 8%, rgba(242, 169, 0, 0.34) 8%, rgba(242, 169, 0, 0.34) 46%, transparent 46%);
}

.lede { max-width: 46rem; }

/* ================= Buttons ================= */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1;
  padding: 0.95rem 1.9rem;
  border-radius: var(--sketch-radius);
  border: 2px solid var(--ink);
  transition: transform 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.btn:hover { transform: translateY(-2px) rotate(-0.4deg); box-shadow: var(--shadow-soft); }

.btn-solid { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); }

.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* ================= Header ================= */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: var(--paper);
  border-bottom: 2px dashed transparent;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(1, 39, 76, 0.05);
}

.brand img { height: 46px; width: auto; }

.site-nav {
  display: flex;
  gap: 1.6rem;
  margin-inline-start: auto;
}

.site-nav a {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
  padding-bottom: 2px;
  background-image: linear-gradient(to left, var(--yellow), var(--yellow));
  background-repeat: no-repeat;
  background-position: bottom right;
  background-size: 0% 3px;
  transition: background-size 180ms ease;
}

.site-nav a:hover { background-size: 100% 3px; }

.btn-header { padding: 0.7rem 1.4rem; font-size: 0.95rem; }

/* ================= Hero ================= */
.hero {
  position: relative;
  /* Full viewport on screens the video can fill; on narrow screens, just the
     visible video height (top 90% of 16:9 = 50.625vw) plus breathing room —
     never a video strip lost in white. */
  height: min(100svh, calc(50.625vw + 10rem));
  min-height: 340px;
  background: var(--paper);
}

.hero-stage { position: absolute; inset: 0; container-type: size; }

/* Only the top 90% of the 1280x720 videos is ever shown: the crop box carries
   the visible-content ratio (1280x648) and behaves like object-fit: contain
   for that region; the full video is 10/9 of the box height, its bottom 10%
   overflowing below and hidden. */
.hero-crop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 1280 / 648;
  width: 100%;
  max-height: 100%;
  width: min(100cqw, calc(100cqh * 1280 / 648));
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% * 10 / 9);
  object-fit: cover;
  object-position: top;
  opacity: 0;
}

.hero-video.is-front { opacity: 1; }

.hero-blend {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 90px 60px var(--paper);
}

.hero-play {
  position: absolute;
  bottom: 3.4rem;
  inset-inline-end: 3rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.scroll-cue {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--blue);
  padding: 0.6rem;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(7px); }
}

/* ================= Sections ================= */
.section {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.1rem, 4vw, 2rem);
}

.section-head { margin-bottom: 3rem; }
.section-head .en { margin-top: 0.4rem; }

/* --- Thesis --- */
.thesis { text-align: center; padding-top: clamp(2rem, 5vw, 3.5rem); }
.thesis h1 { max-width: 52rem; margin-inline: auto; }
.thesis .en { margin-top: 0.6rem; }
.thesis .lede { margin: 1.6rem auto 0; }

.tracks {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.6rem;
}

.tracks li {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 1.6rem 1rem 1.4rem;
  border: 2px dashed var(--line);
  border-radius: var(--sketch-radius);
}

.track-icon { width: 64px; height: 44px; color: var(--blue); }

.tracks strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-top: 0.4rem;
}

.tracks span { font-size: 0.88rem; color: var(--slate); line-height: 1.7; }

/* --- Journey --- */
.journey .section-head { text-align: center; }

.route-wrap { position: relative; }

.route-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

#routePath {
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 9 11;
  opacity: 0.9;
}

.route-plane {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  color: var(--yellow);
  filter: drop-shadow(0 2px 3px rgba(1, 39, 76, 0.25));
  will-change: transform;
  pointer-events: none;
}

.stations {
  list-style: none;
  position: relative;
  display: grid;
  gap: clamp(2.2rem, 5vw, 3.6rem);
}

.station { position: relative; display: flex; }

.station:nth-child(odd) { justify-content: flex-start; }
.station:nth-child(even) { justify-content: flex-end; }

.station-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--blue);
  z-index: 1;
}

.station-card {
  width: min(44%, 460px);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px 5px 14px 5px;
  box-shadow: var(--shadow-soft);
  padding: 1.5rem 1.6rem 1.4rem;
  position: relative;
}

.station-num {
  position: absolute;
  top: -1.05rem;
  inset-inline-start: 1.3rem;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
  background: var(--yellow);
  padding: 0.42rem 0.75rem;
  border-radius: 40% 60% 55% 45% / 55% 45% 60% 40%;
}

.station-card h3 { margin-bottom: 0.4rem; }
.station-card p { font-size: 0.95rem; line-height: 1.85; }
.station-card .en { margin-top: 0.5rem; font-size: 0.8rem; }

.journey-cta { text-align: center; margin-top: 3.5rem; }

/* --- Trust --- */
.trust .section-head { text-align: center; }

.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.facts { list-style: none; display: grid; gap: 1.1rem; }

.facts li {
  position: relative;
  padding-inline-start: 2.1rem;
  line-height: 1.85;
}

.facts li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.52em;
  width: 15px; height: 15px;
  border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
  background: rgba(242, 169, 0, 0.85);
}

.photo-cluster {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  align-items: start;
}

.taped {
  background: #fff;
  padding: 0.8rem 0.8rem 1rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transform: rotate(-1.6deg);
  position: relative;
}

.taped-b { transform: rotate(1.4deg); margin-top: 2.2rem; }

.taped::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 92px; height: 26px;
  background: rgba(242, 169, 0, 0.35);
  border-left: 1px dashed rgba(1, 39, 76, 0.15);
  border-right: 1px dashed rgba(1, 39, 76, 0.15);
}

.taped img { width: 100%; height: auto; }

.taped figcaption {
  font-size: 0.82rem;
  color: var(--slate);
  text-align: center;
  padding-top: 0.7rem;
  line-height: 1.7;
}

/* --- Certificate --- */
.certificate { background: var(--paper-shade); max-width: none; }

.cert-grid {
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.cert-copy .en { margin-top: 0.4rem; }
.cert-copy .facts { margin-top: 1.8rem; }

.cert-figure { transform: rotate(1.2deg); padding: 0.9rem; }

/* --- Partners --- */
.partners-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.partners-photo { max-width: 380px; justify-self: center; }

.partners-copy .lede { margin: 1.2rem 0 2rem; }

/* ================= Footer ================= */
.site-footer {
  border-top: 2px dashed var(--line);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.1rem, 4vw, 2rem) 1.6rem;
}

.footer-grid {
  max-width: var(--max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.8fr 1.3fr 1fr 0.85fr 1.15fr;
  gap: 2.5rem;
}

.footer-brand img { height: 44px; width: auto; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.95rem; }

.footer-col h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.footer-col ul { list-style: none; display: grid; gap: 0.45rem; }
.footer-col li, .footer-col a { font-size: 0.92rem; color: var(--ink); }

.footer-map iframe {
  width: 100%;
  height: 190px;
  border: 0;
  border-radius: 12px;
  display: block;
  margin-bottom: 0.6rem;
}
.footer-map a { font-weight: 500; color: var(--blue); }

.footer-note {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #828b94;
}
.footer-note a { color: var(--blue); font-weight: 500; }
.footer-col a:hover { color: var(--blue); }

.footer-line {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--slate);
  text-align: center;
}

/* ================= Reveal ================= */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ================= Responsive ================= */
@media (max-width: 900px) {
  .site-nav a:not(.lang-switch):not(.login-link) { display: none; }
  /* Mobile header, brand-guideline pass: the wordmark logo yields the row to
     the actions; sign-in leads in the navy-yellow contrast pair, the
     language toggle stays the quiet bordered pill. */
  /* The wordmark yields the row to the actions; the square mark keeps the
     header branded (audit 58: no logo at all on phones). */
  .brand img {
    content: url("/landing-assets/assets/icon-blue.svg");
    height: 36px;
    width: 36px;
  }
  .site-nav { margin-inline: auto; gap: 0.5rem; }
  .site-nav .login-link,
  .site-nav .lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.05rem;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1;
  }
  .site-nav .login-link {
    background: var(--ink);
    border: 1.5px solid var(--ink);
    color: var(--yellow);
  }
  .site-nav .lang-switch {
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink);
  }
  .site-nav .lang-switch {
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
  }

  .trust-grid, .cert-grid, .partners-grid { grid-template-columns: 1fr; }

  .cert-grid { gap: 2.5rem; }
  .partners-photo { order: 2; }
  .partners-copy { order: 1; }

  .stations { padding-inline-start: 1.6rem; }
  .station:nth-child(odd), .station:nth-child(even) { justify-content: flex-start; }
  .station-card { width: 100%; }
  .station-dot { left: auto; inset-inline-start: -1.6rem; transform: translate(50%, -50%); }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .tracks { grid-template-columns: 1fr; }
  .hero-play { inset-inline-end: 1.2rem; bottom: 2.6rem; }
  .photo-cluster { grid-template-columns: 1fr; }
  .taped-b { margin-top: 0; }
  .brand img { height: 38px; }
}

/* ================= Reduced motion ================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  .route-plane { display: none; }
}
