/* RDMS website: tokens, base, layout, header, footer.
   Hero styles live in hero.css; sections and pages in sections.css. */

@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  /* Latin letters, digits and ASCII punctuation only: Chinese punctuation
     (quotes, dashes, middle dot, ellipsis) stays in the Chinese face. */
  unicode-range: U+0020-007E, U+00A0-00B6, U+00B8-00FF, U+2212;
}

:root {
  --sky: #0593C6;
  --white: #FCFFFF;
  --pink: #D83995;
  /* derived */
  --ink: #0C2330;          /* text: the sky hue taken to near-black, 16:1 on white */
  --ink-2: #4A5F6B;        /* secondary text, 6.6:1 on white */
  --sky-deep: #036E96;     /* links and small text in blue, 5.7:1 on white */
  --sky-night: #04324B;    /* deep end of the hero field */
  --pink-deep: #B82A7C;    /* pink for small text, 5.7:1 on white */
  --mist: #EEF6FA;         /* light sky band */
  --line: rgba(12, 35, 48, .12);
  --line-2: rgba(12, 35, 48, .06);
  --shadow-shot: 0 1px 2px rgba(12, 35, 48, .06), 0 12px 32px -8px rgba(12, 35, 48, .14), 0 40px 80px -32px rgba(12, 35, 48, .16);

  --font-cjk: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font: "Manrope", var(--font-cjk);

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius-panel: 32px;
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 0;
}
[hidden] { display: none !important; }
img, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--sky-deep); text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 300; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

:focus-visible {
  outline: 2px solid var(--sky-deep);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-dark :focus-visible, .hero :focus-visible, .over-hero :focus-visible, .closing:not(.quiet) :focus-visible { outline-color: var(--white); }
.nav a:focus-visible, .btn:focus-visible { border-radius: 999px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 16px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 32px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  height: 48px; padding: 0 24px; border-radius: 999px;
  font: inherit; font-size: 16px; font-weight: 500; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .3s var(--ease), transform .25s var(--ease);
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { color: var(--white); background: #12384C; box-shadow: 0 10px 30px -10px rgba(216, 57, 149, .55); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { color: var(--ink); box-shadow: 0 12px 34px -10px rgba(216, 57, 149, .7); }
.btn-small { height: 38px; padding: 0 18px; font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 32px; }
.link-quiet { display: inline-flex; align-items: center; gap: .55em; color: inherit; text-decoration: none; font-weight: 500; background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 2px; }
.link-quiet:hover { text-decoration: underline; color: inherit; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), color .4s var(--ease), padding .4s var(--ease);
  background: rgba(252, 255, 255, .92);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.site-header .bar { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 16px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { font-family: "Manrope", sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .08em; opacity: .7; }
.nav { margin-inline: auto; }
.nav ul { display: flex; list-style: none; gap: 2px; padding: 4px; border-radius: 999px; }
.nav a { display: block; padding: 7px 16px; border-radius: 999px; color: inherit; text-decoration: none; font-size: 15px; }
.nav a:hover { background: var(--line-2); }
.nav a[aria-current="page"] { background: var(--mist); color: var(--sky-deep); }
.menu-btn { display: none; }

/* On the home page, over the hero: transparent, white text, glass pill nav */
.site-header.over-hero { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--white); padding-top: 12px; }
.over-hero .bar { width: min(100% - 2 * var(--gutter) - 24px, 1320px); }
.over-hero .nav ul {
  background: rgba(252, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(252, 255, 255, .26), 0 8px 30px -12px rgba(4, 50, 75, .4);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.over-hero .nav a:hover { background: rgba(252, 255, 255, .16); }
.over-hero .btn-primary { background: var(--white); color: var(--ink); }

/* small screens: nav folds into a sheet */
@media (max-width: 900px) {
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; margin-left: auto; border-radius: 999px;
    background: transparent; color: inherit; border: 1px solid var(--line); cursor: pointer;
  }
  .over-hero .menu-btn { border-color: rgba(252, 255, 255, .4); background: rgba(252, 255, 255, .12); }
  .site-header .bar { gap: 12px; }
  .site-header .bar > .btn { display: none; }
  .nav { position: absolute; inset: 100% 12px auto; margin: 0; display: none; }
  .nav.open { display: block; }
  .nav ul, .over-hero .nav ul {
    flex-direction: column; gap: 0; padding: 8px; border-radius: 20px;
    background: var(--white); color: var(--ink); box-shadow: 0 20px 50px -16px rgba(12, 35, 48, .35);
    backdrop-filter: none;
  }
  .nav a { padding: 12px 16px; font-size: 16px; }
  .over-hero .nav a:hover { background: var(--line-2); }
  .nav .nav-cta { display: block; }
}
@media (min-width: 901px) { .nav .nav-cta { display: none; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; font-size: 15px; color: var(--ink-2); }
.site-footer .grid { row-gap: 32px; }
.foot-brand { grid-column: span 5; display: grid; gap: 14px; align-content: start; }
.foot-brand .brand { color: var(--ink); }
.foot-nav { grid-column: 7 / span 2; }
.foot-contact { grid-column: span 4; }
.site-footer h2 { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 12px; letter-spacing: 0; }
.site-footer ul { list-style: none; display: grid; gap: 6px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--sky-deep); text-decoration: underline; }
.foot-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 24px; border-top: 1px solid var(--line-2); font-size: 13px; }
.contact-list { display: grid; gap: 6px; }
.contact-list dt { font-size: 13px; }
.contact-list div { display: flex; gap: 12px; }
.contact-list dd { margin: 0; color: var(--ink); }
@media (max-width: 760px) {
  .foot-brand, .foot-nav, .foot-contact { grid-column: 1 / -1; }
}

/* ---------- video lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; width: min(1200px, 100vw - 32px); max-width: none; max-height: none; overflow: visible; }
.lightbox::backdrop { background: rgba(4, 22, 33, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lightbox[open] { animation: lb-in .45s var(--ease); }
.lightbox video { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #04060c; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .6); }
.lightbox .close {
  position: absolute; right: 0; top: -52px; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid rgba(252, 255, 255, .35); background: rgba(252, 255, 255, .1); color: var(--white); cursor: pointer;
  display: grid; place-items: center;
}
.lightbox .close:hover { background: rgba(252, 255, 255, .22); }
@keyframes lb-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
