/* Finovas Global — reset, typography & utilities */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.66;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html[lang="zh"] body { font-family: var(--font-zh); }

img, video { display: block; max-width: 100%; height: auto; }
svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: var(--sky-strong); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--navy); }
ul, ol { padding: 0; list-style: none; }

/* ── Headings ── */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.018em;
  color: var(--navy);
}
h1, .h1 { font-size: clamp(2.15rem, 1.35rem + 3.4vw, 3.7rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
h2, .h2 { font-size: clamp(1.7rem, 1.18rem + 2.2vw, 2.7rem); line-height: 1.14; letter-spacing: -0.022em; }
h3, .h3 { font-size: clamp(1.24rem, 1.08rem + 0.7vw, 1.6rem); }
h4, .h4 { font-size: 1.08rem; }

p { text-wrap: pretty; }
strong { font-weight: 600; color: var(--navy); }

/* ── Focus & accessibility ── */
:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--sky); color: #fff; }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 999;
  background: var(--navy); color: #fff;
  padding: 10px 18px; border-radius: var(--r-sm);
  transform: translateY(-160%); transition: transform var(--t-base);
}
.skip-link:focus { transform: translateY(0); color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Utilities ── */
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.accent { color: var(--sky-strong); }
.hide { display: none !important; }

/* ── Scroll-reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }

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