/* AplusGen — reset + typographic baseline */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Sticky header would otherwise cover anchored section headings. */
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Set by nav.js while the mobile menu is open. */
body.is-menu-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: var(--lh-tight);
  margin: 0;
  font-weight: 600;
}

html:lang(zh-CN) h1,
html:lang(zh-CN) h2,
html:lang(zh-CN) h3,
html:lang(zh-CN) h4 {
  letter-spacing: 0;
}

p { margin: 0; }

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

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

/* Markers are never used in this design. Lists that stay semantic carry an
   explicit role="list", because Safari drops list semantics once the marker
   is removed. */
ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; cursor: pointer; }

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

/* Honour the OS "reduce motion" setting: no transitions, no smooth scroll,
   no transforms that read as movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Layout primitives ---- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tint { background: var(--bg-tint); }
.section--tight { padding-block: calc(var(--section-y) * 0.8); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  z-index: 200;
}
.skip-link:focus { left: var(--sp-3); top: var(--sp-3); }

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

/* ---- Image placeholders ----
 * No real assets yet. These hold the correct aspect ratio so layout and
 * rhythm stay verifiable. Delete this block once assets/img/ is populated.
 * Real <img> must carry width/height or aspect-ratio to avoid CLS.
 */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(45deg,
      #e9eef6 0 10px, #eff3f9 10px 20px);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ph::after {
  content: attr(data-ph);
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: var(--sp-3);
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0.01em;
}
.ph--circle { border-radius: 50%; }

/* ---- Build stamp ----
 * Injected by build_preview.py so a reviewer can tell which build they are
 * looking at. Absent from the multi-file source.
 */
.build-stamp {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 300;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: rgba(11, 42, 91, 0.88);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  pointer-events: none;
}
