/* ---- Reset ---- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body,
h1, h2, h3, h4,
p, figure, blockquote, ul, ol, dl, dd {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ---- Document ---- */

body {
  background: var(--c-white);
  color: var(--c-ink-mute);
  font-family: var(--f-base);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent background scroll when mobile drawer is open */
body.nav-open {
  overflow: hidden;
  touch-action: none;
}

/* ---- Typography contract ---- */

h1 {
  color: var(--c-ink);
  font-size: var(--t-h1);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2 {
  color: var(--c-ink);
  font-size: var(--t-h2);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h3 {
  color: var(--c-ink);
  font-size: var(--t-h3);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lead {
  color: var(--c-ink-soft);
  font-size: var(--t-lead);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}

.eyebrow {
  display: block;
  margin-bottom: var(--s-2);
  color: var(--c-ink);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* No italics anywhere. */
em, i, address {
  font-style: normal;
}

/* Links: no underline; hover changes color only. */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--c-ink);
}

/* ---- Layout utilities ---- */

.container {
  width: 100%;
  max-width: var(--container, 1200px);
  margin-inline: auto;
  padding-inline: var(--gutter, clamp(1rem, 4vw, 2rem));
}

/* Chinese typography enforcement with Noto Sans SC */
html[lang="zh-CN"],
html[lang^="zh"],
:lang(zh) {
  --f-base: 'Noto Sans SC', 'Hanken Grotesk', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-family: 'Noto Sans SC', 'Hanken Grotesk', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[lang="zh-CN"] body,
html[lang^="zh"] body,
:lang(zh) body {
  font-family: 'Noto Sans SC', 'Hanken Grotesk', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2,
html[lang="zh-CN"] h3,
html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang^="zh"] h3 {
  letter-spacing: -0.01em;
}

.section {
  padding-block: var(--s-5);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--s-7);
  }
}

.section--tint-white,
.section--white {
  background: var(--c-white);
}

.section--tint-pink,
.section--pink,
.section-tint-pink {
  background: var(--c-pink);
}

.section--tint-blue,
.section--blue,
.section-tint-blue {
  background: var(--c-blue);
}

/* ---- 2-Column Composition Grid ---- */

.composition-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: center;
}

.composition-2col img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .composition-2col {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-6);
  }

  .composition-2col--55-45 {
    grid-template-columns: 55fr 45fr;
  }

  .composition-2col--45-55 {
    grid-template-columns: 45fr 55fr;
  }
}

/* ---- Accessibility ---- */

:focus-visible {
  outline: 2px solid var(--c-ink);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: 100;
  padding: var(--s-1) var(--s-2);
  background: var(--c-ink);
  color: var(--c-white);
  border-radius: var(--radius);
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  color: var(--c-white);
  transform: translateY(0);
}

/* ---- Scroll reveal (JS adds .is-visible; see assets/js/main.js) ---- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
