/* Approved homepage polish: typography, components and rhythm only.
   Text colours, existing artwork, content and interactions remain authoritative. */
body.home-with-whale {
  --polish-font-ui: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --polish-font-display: "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
  --polish-gutter: clamp(24px, 7vw, 112px);
  --polish-radius: 6px;
  --polish-control-radius: 4px;
  --polish-shadow: 0 6px 22px rgba(5, 18, 13, .09);
  font-family: var(--polish-font-ui);
  font-size: 16px;
  line-height: 1.8;
}

body.home-with-whale :is(h1, h2, h3, h4),
body.home-with-whale :is(.metric strong, .ai-proof strong, .whb-audio-label) {
  font-family: var(--polish-font-display);
}

body.home-with-whale :is(.btn, .nav-links, .language-switch, .section-kicker,
  .eyebrow, .domain-number, .domain-action, .field-tag, .field-meta,
  .field-card-action, .field-filter button, .card-action, .media-item > span,
  .media-link, .ai-fact dt, .metric span, .download-file-list, .footer,
  .whb-section, .whb-eyebrow, .whb-publisher, .whb-chapter, .whb-audio-meta,
  .whb-listen-button) {
  font-family: var(--polish-font-ui);
}

body.home-with-whale .section-kicker {
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: .2em;
  margin-bottom: 12px;
}

body.home-with-whale :is(.section-head h2, .hedge-title h2, .contact-panel h2) {
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.25;
  text-wrap: balance;
}

body.home-with-whale :is(.section-head p, .hero-subtitle, .ai-fde-lead p) {
  line-height: 1.85;
}

body.home-with-whale .hero-subtitle {
  font-weight: 500;
  letter-spacing: .01em;
}

body.home-with-whale :is(.domain p, .ai-fde-card p, .field-card p,
  .media-item p, .writing-card p, .service-item p, .ai-fact dd) {
  font-size: 15px;
  line-height: 1.85;
}

body.home-with-whale :is(.media-link small, .metric span, .ai-proof span) {
  font-size: 13px;
  line-height: 1.75;
}

body.home-with-whale :is(.domain h3, .media-item h3, .writing-card h3, .ai-fde-card h3) {
  font-size: 24px;
  line-height: 1.4;
  text-wrap: pretty;
}

body.home-with-whale .field-chapter-grid :is(h3, h4) {
  margin-top: 0;
  line-height: 1.45;
  text-wrap: pretty;
}

body.home-with-whale .field-chapter-grid .field-tag {
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

body.home-with-whale :is(.field-card-footer .field-meta, .field-card-action) {
  font-size: 12px;
  line-height: 1.65;
}

/* Align the book feature with every other homepage section. */
body.home-with-whale main > section:not(.whb-section) {
  padding-block: clamp(72px, 6.5vw, 96px);
  padding-inline: var(--polish-gutter);
}

body.home-with-whale .whb-section {
  padding-inline: var(--polish-gutter);
}

body.home-with-whale .whb-inner {
  width: 100%;
  gap: clamp(28px, 3.1vw, 45px);
}

body.home-with-whale :is(.site-nav, .homepage-topic-links, .footer) {
  padding-inline: var(--polish-gutter);
}

body.home-with-whale .section-head {
  gap: clamp(24px, 4vw, 64px);
  margin-bottom: 36px;
}

body.home-with-whale :is(.ai-fde-panel, .hedge-panel, .ai-index-panel) {
  padding: clamp(28px, 3.3vw, 48px);
  gap: clamp(28px, 3vw, 44px);
}

body.home-with-whale .contact-panel {
  padding: clamp(28px, 3.3vw, 48px);
}

@media (min-width: 1101px) {
  body.home-with-whale .ai-fde-lead {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 2.2vw, 36px);
  }

  body.home-with-whale .ai-fde-lead h2 {
    font-size: clamp(34px, 3vw, 44px);
    line-height: 1.25;
    text-wrap: balance;
  }

  html[lang="en"] body.home-with-whale .ai-fde-lead h2 {
    font-size: clamp(30px, 2.35vw, 34px);
  }

  html[lang="en"] body.home-with-whale .ai-proof strong {
    font-size: clamp(26px, 2.2vw, 32px);
    line-height: 1.2;
  }
}

body.home-with-whale .field-chapter-head {
  margin-bottom: 22px;
}

body.home-with-whale .field-filter-shell {
  margin-bottom: clamp(36px, 4vw, 54px);
}

body.home-with-whale .field-chapters {
  gap: clamp(48px, 5vw, 72px);
}

body.home-with-whale :is(.domain, .ai-fde-card, .media-item, .writing-card,
  .timeline-item, .media-more, .media-link, .contact-card, .field-card,
  .ai-fde-panel, .hedge-panel, .contact-panel, .ai-index-panel, .metrics) {
  border-radius: var(--polish-radius);
  border-width: 1px;
  box-shadow: var(--polish-shadow);
}

body.home-with-whale :is(.metrics, .field-card) {
  overflow: hidden;
}

body.home-with-whale :is(.domain, .ai-fde-card, .media-item, .writing-card,
  .field-card) {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.home-with-whale :is(.domain, .ai-fde-card, .media-item, .writing-card,
  .field-card):hover {
  transform: translateY(-2px);
}

/* Keep the established gold hues and every existing text-colour declaration. */
body.home-with-whale :is(.btn, .whb-listen-button) {
  min-height: 50px;
  padding: 12px 22px;
  border-radius: var(--polish-control-radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .035em;
}

html[data-theme] body.home-with-whale .btn.primary {
  background: var(--gold);
  font-weight: 600;
}

html[data-theme] body.home-with-whale .btn.primary:hover {
  background: var(--gold-2);
}

body.home-with-whale :is(.btn, .whb-listen-button):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

body.home-with-whale :is(.language-switch, .language-switch button) {
  border-radius: var(--polish-control-radius);
}

body.home-with-whale .language-switch button {
  font-family: var(--polish-font-ui);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  body.home-with-whale :is(.domain, .ai-fde-card, .media-item, .writing-card,
    .field-card, .btn, .whb-listen-button) {
    transition: none;
  }

  body.home-with-whale :is(.domain, .ai-fde-card, .media-item, .writing-card,
    .field-card, .btn):hover {
    transform: none;
  }
}
