:root {
  /* Health Mirror — locked slate foundation */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  /* Light theme */
  --background-primary: var(--slate-50);
  --background-secondary: #ffffff;
  --surface-primary: #ffffff;
  --surface-secondary: var(--slate-100);
  --border-primary: var(--slate-200);
  --border-secondary: var(--slate-100);

  --text-primary: var(--slate-900);
  --text-secondary: var(--slate-500);
  --text-tertiary: var(--slate-400);

  --atmosphere-primary: #e0f2fe;
  --atmosphere-secondary: var(--slate-100);

  /* Accent remains atmospheric / non-semantic */
  --accent-warm: #fcd34d;
  --accent-cool: #67e8f9;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-text-block: 20px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-section: 48px;
  --space-hero: 64px;

  --screen-padding: 24px;
  --content-max-width: 520px;
  --page-max-width: 1120px;

  /* Type */
  --hero-size: 42px;
  --hero-line: 50px;

  --hero-subtitle-size: 17px;
  --hero-subtitle-line: 26px;

  --title-size: 24px;
  --title-line: 32px;

  --body-large-size: 18px;
  --body-large-line: 28px;

  --body-size: 16px;
  --body-line: 24px;

  --caption-size: 14px;
  --caption-line: 20px;

  --label-size: 12px;
  --label-line: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 88% 4%,
      rgba(224, 242, 254, 0.9) 0,
      rgba(224, 242, 254, 0.5) 20%,
      rgba(224, 242, 254, 0) 48%
    ),
    radial-gradient(
      circle at 8% 92%,
      rgba(241, 245, 249, 0.95) 0,
      rgba(241, 245, 249, 0.6) 24%,
      rgba(241, 245, 249, 0) 52%
    ),
    var(--background-primary);
  color: var(--text-primary);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: var(--body-size);
  line-height: var(--body-line);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover,
a:focus-visible {
  color: var(--slate-600);
}

.page {
  width: min(100%, var(--page-max-width));
  margin: 0 auto;
  padding: 0 var(--screen-padding);
}

.reading-column {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
}

.language-nav {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
  padding: var(--space-lg) 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  color: var(--text-tertiary);
  font-size: var(--caption-size);
  line-height: var(--caption-line);
}

.language-link {
  text-decoration: none;
  white-space: nowrap;
}

.language-link.is-current {
  color: var(--text-primary);
  font-weight: 500;
}

.hero {
  min-height: min(820px, 88vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-hero) 0;
  text-align: center;
}

.hero-inner {
  width: min(100%, var(--content-max-width));
}

.logo {
  width: 108px;
  height: 108px;
  display: block;
  margin: 0 auto var(--space-lg);
}

.brand-name {
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero-title {
  margin: var(--space-xl) 0 var(--space-md);
  font-size: var(--hero-size);
  font-weight: 300;
  line-height: var(--hero-line);
}

html:lang(zh) .hero-inner {
  width: min(100%, 640px);
}

html:lang(ja) .hero-inner {
  width: min(100%, 640px);
}

.hero-subtitle {
  margin: 0 auto;
  max-width: 420px;
  color: var(--text-secondary);
  font-size: var(--hero-subtitle-size);
  font-weight: 400;
  line-height: var(--hero-subtitle-line);
}

.page-meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--hero-subtitle-size);
  font-weight: 400;
  line-height: var(--hero-subtitle-line);
}

.section {
  padding: var(--space-section) 0;
}

.section + .section {
  padding-top: calc(var(--space-section) + var(--space-md));
}

.section-label {
  margin: 0 0 var(--space-md);
  color: var(--text-secondary);
  font-size: var(--label-size);
  font-weight: 500;
  line-height: var(--label-line);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.section-title {
  margin: 0 0 var(--space-text-block);
  color: var(--text-primary);
  font-size: var(--title-size);
  font-weight: 500;
  line-height: var(--title-line);
}

.lede {
  margin: 0 0 var(--space-text-block);
  color: var(--text-primary);
  font-size: var(--body-large-size);
  font-weight: 400;
  line-height: var(--body-large-line);
}

.copy {
  margin: 0;
  color: var(--text-secondary);
}

.copy + .copy {
  margin-top: var(--space-md);
}

.quiet-list {
  margin: var(--space-text-block) 0 0;
  padding: 0;
  list-style: none;
}

.quiet-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-secondary);
}

.quiet-list li + li {
  margin-top: var(--space-sm);
}

.quiet-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
}

.contact {
  padding-bottom: calc(var(--space-hero) + var(--space-section));
}

.contact-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: var(--space-sm);
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
}

.contact-link::after {
  content: "→";
  color: var(--text-secondary);
}

.footer {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
  padding: var(--space-lg) 0 var(--space-xl);
  border-top: 1px solid var(--border-primary);
  color: var(--text-tertiary);
  font-size: var(--caption-size);
  line-height: var(--caption-line);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer a {
  text-decoration: none;
}

@media (max-width: 640px) {
  :root {
    --hero-size: 36px;
    --hero-line: 44px;
  }

  .hero {
    min-height: 76vh;
    padding-top: var(--space-hero);
    padding-bottom: var(--space-hero);
  }

  .logo {
    width: 96px;
    height: 96px;
  }

  .section {
    padding: 40px 0;
  }

  .footer-row {
    flex-direction: column;
  }
}

/* Multilingual safety:
   Latin tracking and uppercase conventions should not be imposed
   on Chinese, Japanese, or Korean typography. */
html:lang(zh) .brand-name,
html:lang(zh) .section-label,
html:lang(ja) .brand-name,
html:lang(ja) .section-label,
html:lang(ko) .brand-name,
html:lang(ko) .section-label {
  letter-spacing: 0;
  text-transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-inner {
    animation: hero-arrive 1200ms ease-out both;
  }

  @keyframes hero-arrive {
    from {
      opacity: 0;
      transform: translateY(24px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
