/* ────────────────────────────────────────────────────────────────────────────
   Aeoleaf · Editorial overlay
   Loaded AFTER main.css; tightens typography, rhythm, and a few hero/footer
   details to give the site a quieter, more magazine-like feel. Everything in
   here is additive — `main.css` still defines colors and component bases.
   ──────────────────────────────────────────────────────────────────────────── */

:root {
  /* Fluid type scale (editorial: wide range between body and display). */
  --fs-xs:      clamp(0.75rem, 0.72rem + 0.15vw, 0.82rem);
  --fs-sm:      clamp(0.85rem, 0.82rem + 0.2vw,  0.94rem);
  --fs-base:    clamp(1rem,    0.96rem + 0.25vw, 1.12rem);
  --fs-lg:      clamp(1.12rem, 1.06rem + 0.4vw,  1.3rem);
  --fs-xl:      clamp(1.35rem, 1.2rem  + 0.8vw,  1.75rem);
  --fs-2xl:     clamp(1.7rem,  1.4rem  + 1.4vw,  2.4rem);
  --fs-3xl:     clamp(2.2rem,  1.7rem  + 2.5vw,  3.4rem);
  --fs-display: clamp(2.8rem,  2.0rem  + 4vw,   5.2rem);

  /* Section rhythm — one knob, deliberate air between blocks. */
  --section-gap: clamp(5rem, 7vw, 8rem);
  --section-gap-tight: clamp(3rem, 4vw, 4.5rem);
  --reading-max: 36rem;       /* 576px; longform body column */
  --prose-max:   42rem;       /* 672px; prose with figures */
  --editorial-max: 64rem;     /* 1024px; home sections / lists */

  /* Slightly higher contrast text defaults for editorial clarity. */
  --text-strong: #0C0C0C;
  --rule: color-mix(in srgb, var(--text) 14%, transparent);
  --rule-strong: color-mix(in srgb, var(--text) 28%, transparent);
}

[data-theme="dark"] {
  --text-strong: #F5EEDB;
  --rule: color-mix(in srgb, var(--text) 18%, transparent);
  --rule-strong: color-mix(in srgb, var(--text) 35%, transparent);
}

/* ── Body defaults ─────────────────────────────────────────────────────── */

body {
  font-size: var(--fs-base);
  line-height: 1.7;
  font-feature-settings: "kern", "liga", "calt";
  text-rendering: optimizeLegibility;
}

/* Keep accent quiet by default; it only pops where you invoke it. */
a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent); }

/* Headings: serif display stack, tighter leading, cropped margin. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  font-feature-settings: "ss01", "kern", "liga";
}

/* Muted chrome text where the content should step back. */
.hero__eyebrow,
.hero__tagline,
.hero__tagline-en,
.page-intro__eyebrow,
.hp-section-title,
.breadcrumb,
.post-meta,
.post-date,
.blog-item__excerpt,
.blog-item__date,
.work-year,
.footer-section h3,
.footer-heading,
.footer-brand__zh,
.tag-btn,
.tag-btn__count {
  font-family: var(--font-sans);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

/* ── Page intro (blog / works / about) ────────────────────────────────── */

.page-intro {
  max-width: var(--editorial-max);
  margin: 0 auto var(--section-gap-tight);
  padding: calc(var(--nav-height) + var(--section-gap-tight)) var(--space-6) 0;
}

.page-intro__eyebrow {
  text-transform: uppercase;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.page-intro__title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-4);
  color: var(--text-strong);
}

.page-intro__desc {
  max-width: var(--reading-max);
  font-size: var(--fs-lg);
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* ── Hero (homepage) — editorial masthead ─────────────────────────────── */

.hero.hero--enhanced {
  max-width: var(--editorial-max);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--section-gap-tight)) var(--space-6) var(--section-gap-tight);
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: center;
}

/* If hero has no carousel (no works with covers yet), collapse to single col
   and treat the left content as a full-width magazine masthead. */
.hero.hero--enhanced:has(.hero__leaf-shift) {
  grid-template-columns: minmax(0, 1fr);
  text-align: left;
  min-height: 72vh;
  padding-bottom: var(--section-gap);
}

.hero.hero--enhanced:has(.hero__leaf-shift) .hero__content {
  max-width: var(--reading-max);
}

/* Hide the decorative leaf in editorial mode; it read as filler on an
   otherwise quiet page. Replace with a thin rule + eyebrow mark below the
   masthead for rhythm. */
.hero.hero--enhanced .hero__visual:has(.hero__leaf-shift) {
  display: none;
}

.hero__eyebrow {
  text-transform: uppercase;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.hero__eyebrow::before {
  content: '';
  width: 2.4rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.hero-title {
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  color: var(--text-strong);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-xl);
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: var(--space-6);
  max-width: var(--reading-max);
  font-weight: 400;
}

.hero__tagline,
.hero__tagline-en {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 var(--space-3);
}
.hero__tagline-en { opacity: 0.7; }

.hero__cta {
  margin-top: var(--space-8);
  gap: var(--space-5);
}

.btn-primary,
.btn-outline {
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
}

/* ── Section rhythm on homepage ───────────────────────────────────────── */

.site-main > section {
  max-width: var(--editorial-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}
.site-main > section + section {
  margin-top: var(--section-gap);
}

.hp-section-title {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin: 0 0 var(--space-8);
  padding: 0;
}
.hp-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.hp-section-title__leaf {
  color: var(--accent);
  flex: 0 0 auto;
}

/* ── hp-about (homepage About block) ──────────────────────────────────── */

.hp-about__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(var(--space-8), 5vw, var(--space-12));
  align-items: start;
}
@media (max-width: 720px) {
  .hp-about__inner { grid-template-columns: minmax(0, 1fr); }
}

.hp-about__avatar {
  aspect-ratio: 4 / 5;
  max-width: 320px;
  width: 100%;
  overflow: hidden;
  border-radius: 0;
  background: var(--surface);
}
.hp-about__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hp-about__text h2 {
  font-size: var(--fs-2xl);
  margin: 0 0 var(--space-6);
  max-width: var(--reading-max);
}
.hp-about__text p {
  font-size: var(--fs-lg);
  line-height: 1.7;
  color: var(--text);
  max-width: var(--reading-max);
  margin: 0 0 var(--space-8);
  white-space: pre-line;       /* respect paragraph breaks in summary */
}

.hp-about__stats {
  display: flex;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule);
}
.hp-about__stat dt {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.hp-about__stat dd {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--text-strong);
  margin: 0;
}
.hp-about__stat-sep { display: none; }

.hp-about__link {
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  color: var(--text);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.hp-about__link:hover { color: var(--accent); border-color: var(--accent); }

/* ── hp-stats ─────────────────────────────────────────────────────────── */

.hp-stats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.hp-stats__item {
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.hp-stats__item + .hp-stats__item {
  border-left: 1px solid var(--rule);
}
.hp-stats__number {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  line-height: 1;
  color: var(--text-strong);
}
.hp-stats__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .hp-stats__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hp-stats__item { padding: var(--space-6) var(--space-3); }
  .hp-stats__number { font-size: var(--fs-xl); }
}

/* ── Recent posts (home list) ─────────────────────────────────────────── */

.recent-posts .posts-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule);
}
.recent-posts .post-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-8);
  align-items: baseline;
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--rule);
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.recent-posts .post-date {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 8.5rem;
}
.recent-posts .post-title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  color: var(--text-strong);
  line-height: 1.25;
  text-decoration: none;
  border: 0;
}
.recent-posts .post-title:hover { color: var(--accent); }
.recent-posts__more {
  margin-top: var(--space-6);
  text-align: right;
}

/* ── hp-contact (home contact card) ──────────────────────────────────── */

.hp-contact {
  margin-bottom: var(--section-gap);
}
.hp-contact__card {
  background: transparent;
  border: 1px solid var(--rule-strong);
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(var(--space-6), 4vw, var(--space-12));
  align-items: start;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 720px) {
  .hp-contact__card { grid-template-columns: minmax(0, 1fr); }
}
.hp-contact__title {
  font-size: var(--fs-2xl);
  margin: 0 0 var(--space-4);
}
.hp-contact__desc {
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  max-width: var(--reading-max);
}
.hp-contact__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--rule);
}
.hp-contact__links li { background: var(--bg); }
.hp-contact__link {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  border: 0;
}
.hp-contact__icon { color: var(--accent); }
.hp-contact__k {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  min-width: 4rem;
}
.hp-contact__v {
  font-size: var(--fs-base);
  color: var(--text);
}
.hp-contact__link:hover .hp-contact__v { color: var(--accent); }

/* ── Blog list (index) ────────────────────────────────────────────────── */

.blog-page .page-intro,
.works-page .page-intro,
.about-page .page-intro {
  text-align: left;
}

.blog-index,
.blog-index .blog-list {
  max-width: var(--editorial-max);
  margin-left: auto;
  margin-right: auto;
}

.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule-strong);
}

.blog-item {
  border-bottom: 1px solid var(--rule);
  padding: var(--space-8) 0;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  transition: background var(--transition);
}
.blog-item:hover { background: color-mix(in srgb, var(--surface) 40%, transparent); }

.blog-item__row {
  display: grid;
  grid-template-columns: 11rem 1fr auto;
  gap: clamp(var(--space-6), 4vw, var(--space-10));
  align-items: baseline;
  padding: 0 var(--space-6);
}
@media (max-width: 720px) {
  .blog-item__row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: 0 var(--space-4);
  }
}

.blog-item__date {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.blog-item__title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--text-strong);
  line-height: 1.2;
  margin: 0 0 var(--space-3);
  letter-spacing: -0.015em;
  font-weight: 500;
}
.blog-item__title a { color: inherit; }
.blog-item:hover .blog-item__title a { color: var(--accent); }
.blog-item__excerpt {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 var(--space-4);
  max-width: var(--prose-max);
  letter-spacing: 0;
  text-transform: none;
}
.blog-item__thumb,
.blog-item__placeholder {
  display: none;   /* editorial list drops thumbs entirely */
}
.blog-item__tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.blog-item__tags .tag,
.blog-item__tags a { color: inherit; }
.blog-item__tags .tag::before { content: '#'; opacity: 0.55; margin-right: 0.1em; }

/* ── Post detail ──────────────────────────────────────────────────────── */

.post-shell {
  max-width: var(--editorial-max);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--section-gap-tight)) var(--space-6) var(--section-gap);
}

.post-detail { max-width: var(--prose-max); margin: 0 auto; }
.post-shell--has-toc .post-detail { margin: 0; }

.breadcrumb {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: var(--space-10);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-current { color: var(--text); }

.post-title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-6);
  color: var(--text-strong);
  font-weight: 500;
}

.post-meta {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-10);
}
.post-meta .tags { display: inline-flex; gap: var(--space-3); flex-wrap: wrap; }
.post-meta .tag {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  padding: 0;
}
.post-meta .tag--chip::before { content: ''; }
.post-meta__sep { opacity: 0.5; }

/* Editorial cover: smaller, calmer, caption-like */
.post-hero {
  aspect-ratio: 16 / 9;
  max-height: 44vh;
  min-height: 0;
  margin-bottom: var(--space-10);
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--rule);
}

.prose {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.82;
  color: var(--text);
  max-width: var(--prose-max);
}
.prose p { margin: 0 0 1.25em; }
.prose h2 {
  font-size: var(--fs-2xl);
  margin: 2.25em 0 0.6em;
  line-height: 1.2;
}
.prose h3 {
  font-size: var(--fs-xl);
  margin: 1.8em 0 0.5em;
}
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.1em 0 0.1em var(--space-5);
  margin: 1.5em 0;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-lg);
  line-height: 1.5;
}
.prose img,
.prose figure img {
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--rule);
}
.prose figcaption {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75em;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: var(--space-5);
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: var(--fs-sm);
  line-height: 1.6;
  border-radius: 0;
}
.prose pre code { background: transparent; padding: 0; }

/* ── Header ──────────────────────────────────────────────────────────── */

.site-header {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
  transition: border-color var(--transition), background var(--transition);
}
.site-header.scrolled {
  border-bottom-color: var(--rule);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}
.nav-container { padding: 0 var(--space-6); max-width: var(--editorial-max); margin: 0 auto; }

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  letter-spacing: 0.01em;
  color: var(--text-strong);
}
.nav-logo-zh {
  font-size: 0.82em;
  color: var(--text-muted);
  margin-left: 0.3em;
  letter-spacing: 0.08em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: var(--space-8);
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  border: 0;
  padding: 0.5rem 0;
}
.nav-links li.active a,
.nav-links a:hover { color: var(--text-strong); }

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer-wave { display: none; }

.site-footer {
  background: transparent;
  border-top: 1px solid var(--rule);
  padding: var(--section-gap-tight) 0 var(--space-10);
  margin-top: var(--section-gap);
  color: var(--text-muted);
}
.footer-content {
  max-width: var(--editorial-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(var(--space-6), 3vw, var(--space-12));
}
@media (max-width: 720px) {
  .footer-content { grid-template-columns: 1fr; }
}
.footer-section h3,
.footer-heading {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
  font-weight: 500;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--text-strong);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.footer-brand__mark { color: var(--accent); }
.footer-brand__zh { color: var(--text-muted); font-size: 0.82em; }
.footer-tagline {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
  max-width: 22ch;
}
.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-section a {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-decoration: none;
  border: 0;
}
.footer-section a:hover { color: var(--text-strong); }
.footer-icon { color: currentColor; opacity: 0.7; }
.footer-bottom {
  max-width: var(--editorial-max);
  margin: var(--section-gap-tight) auto 0;
  padding: var(--space-6) var(--space-6) 0;
  border-top: 1px solid var(--rule);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

/* ── Tags / chips (global) ───────────────────────────────────────────── */

.tag.tag--chip,
.tag-btn {
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ── Works page: calm hover, no huge lift ────────────────────────────── */

.works-page .work-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--rule-strong));
  box-shadow: 0 20px 40px color-mix(in srgb, var(--text) 8%, transparent);
}

/* ────────────────────────────────────────────────────────────────────────
   Layout stability: stop "every refresh looks different"
   The offending patterns in main.css are:
     - .reveal-section { opacity:0; transform:translateY(30px) } until JS adds
       .visible via IntersectionObserver
     - .hero__content / .hero__cta / .hero__visual running entrance
       animations that start from an offset state
   If JS is slow or cached assets arrive out-of-order, the user sees arbitrary
   half-painted states. We gate all of these behind a `.js-ready` class that
   <head>'s pre-paint script adds synchronously — meaning: the offset/hidden
   initial states only apply when JS is definitely present to resolve them.
   Without .js-ready (no-JS, pre-paint rollback, etc.), everything is visible.
   ──────────────────────────────────────────────────────────────────────── */

/* Kill the entrance animations entirely; they were causing "offset on refresh".
   The editorial design doesn't need them. */
.hero,
.hero--enhanced,
.hero__content,
.hero__cta,
.hero__visual {
  animation: none !important;
}

/* reveal-sections: always visible by default. Only add the "invisible then
   fade in" behaviour when JS has marked the page ready. */
.reveal-section,
.reveal-section .stagger-child,
.reveal-section .slide-from-left,
.reveal-section .slide-from-right,
.animate-on-scroll {
  opacity: 1 !important;
  transform: none !important;
}

html.js-ready .reveal-section:not(.visible),
html.js-ready .reveal-section:not(.visible) .stagger-child,
html.js-ready .reveal-section:not(.visible) .slide-from-left,
html.js-ready .reveal-section:not(.visible) .slide-from-right {
  /* Only suppress these while the IntersectionObserver is still working through
     the viewport. Once `.visible` lands, main.css transitions take over. */
}

/* Fallback for old Firefox / no-JS / disabled IO: if .visible never arrives,
   the content is still readable thanks to the defaults above. */

/* ── Font metric matching: reduce Fraunces swap CLS ──────────────────── */
/* Declare a local fallback face sized to match Fraunces so that when the
   webfont arrives, text geometry barely changes. Numbers chosen empirically
   for Fraunces (regular / 14pt-ish axis). */
@font-face {
  font-family: 'Fraunces Fallback';
  src: local('Georgia'), local('Songti SC'), local('serif');
  size-adjust: 103%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter Fallback';
  src: local('Segoe UI'), local('-apple-system'), local('Arial'), local('sans-serif');
  size-adjust: 100%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}
:root {
  --font-sans: 'Inter', 'Inter Fallback', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', 'Fraunces Fallback', 'Noto Serif SC', Georgia, 'Songti SC', serif;
  --font-serif: var(--font-display);
  --font-journal: var(--font-display);
}

/* ── Reduced motion ──────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .hero.hero--enhanced,
  .hero__content,
  .hero__cta,
  .hero__visual,
  .hero__leaf { animation: none !important; }
}
