/* Theme — responsive + variant CSS
 *
 * What lives here (tier 3): things theme.json + register_block_style can't
 * express — media queries, hover/focus states, pseudo-elements, complex
 * descendant selectors, CSS masks. See playbook §2.
 */

* {-webkit-font-smoothing: antialiased}

/* ─── Section vertical rhythm — scales down on narrow screens ───────────── */
@media (max-width: 900px) {
  .site-section {
    padding-top:    var(--wp--preset--spacing--70) !important; /* 48px */
    padding-bottom: var(--wp--preset--spacing--70) !important;
  }
}
@media (max-width: 600px) {
  .site-section {
    padding-top:    var(--wp--preset--spacing--60) !important; /* 32px */
    padding-bottom: var(--wp--preset--spacing--60) !important;
  }
}

/* ─── Section variants ──────────────────────────────────────────────────── */
.is-style-section-paper { background: var(--wp--preset--color--paper); }
.is-style-section-cream { background: var(--wp--preset--color--cream); }
.is-style-section-dark  {
  background: var(--wp--preset--color--blue-deep);
  color:      var(--wp--preset--color--fg-on-dark);
}
.is-style-section-dark :is(h1, h2, h3, h4, h5, h6) { color: var(--wp--preset--color--fg-on-dark); }
.is-style-section-dark a { color: var(--wp--preset--color--yellow); }

.is-style-section-spotlight {
  background: var(--wp--preset--color--yellow);
  color:      var(--wp--preset--color--blue-deep);
}
.is-style-section-spotlight :is(h1, h2, h3, h4, h5, h6) { color: var(--wp--preset--color--blue-deep); }

/* ─── Card · Module — accent stripe + lift on hover ─────────────────────── */
.is-style-card-module {
  position: relative;
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--line-soft);
  border-radius: var(--wp--custom--radii--lg);
  padding: var(--wp--preset--spacing--60);
  transition:
    transform   var(--wp--custom--dur--med) var(--wp--custom--ease--out),
    box-shadow  var(--wp--custom--dur--med) var(--wp--custom--ease--out),
    border-color var(--wp--custom--dur--med) var(--wp--custom--ease--out);
}
.is-style-card-module::before {
  content: "";
  position: absolute;
  top: var(--wp--preset--spacing--60);
  left: var(--wp--preset--spacing--60);
  width: 24px;
  height: 4px;
  background: var(--wp--preset--color--red);
  border-radius: 2px;
}
.is-style-card-module > *              { margin-top: var(--wp--preset--spacing--40); }
.is-style-card-module > *:first-child  { margin-top: var(--wp--preset--spacing--50); }
.is-style-card-module > h3 {
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.is-style-card-module > p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--wp--preset--color--fg-3);
}
.is-style-card-module:hover {
  transform: translateY(-3px);
  box-shadow: var(--wp--preset--shadow--hover);
}
/* Accent colour overrides — applied via additional class on the same group */
.is-style-card-module.has-blue-accent::before    { background: var(--wp--preset--color--blue); }
.is-style-card-module.has-coral-accent::before   { background: var(--wp--preset--color--coral); }
.is-style-card-module.has-yellow-accent::before  { background: var(--wp--preset--color--yellow-warm); }
.is-style-card-module.has-pink-accent::before    { background: var(--wp--preset--color--pink); }

/* ─── Card · Stat — dark navy + yellow label + serif number ─────────────── */
.is-style-card-stat {
  background: var(--wp--preset--color--blue-deep);
  color: var(--wp--preset--color--fg-on-dark);
  border-radius: var(--wp--custom--radii--lg);
  padding: var(--wp--preset--spacing--60);
}

/* ─── Card · Principle — small h3 + muted body, no chrome ──────────────── */
.is-style-card-principle > h3 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin-bottom: var(--wp--preset--spacing--30);
}
.is-style-card-principle > p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--wp--preset--color--fg-3);
}

/* ─── Paragraph variants ────────────────────────────────────────────────── */
.is-style-eyebrow {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--eyebrow);
  letter-spacing: var(--wp--custom--tracking--eyebrow);
  text-transform: uppercase;
  color: var(--wp--preset--color--red);
}
.is-style-section-dark      .is-style-eyebrow { color: var(--wp--preset--color--yellow); }
.is-style-section-spotlight .is-style-eyebrow { color: var(--wp--preset--color--blue-deep); }

.is-style-stat-label {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px;
  letter-spacing: var(--wp--custom--tracking--eyebrow);
  text-transform: uppercase;
  color: var(--wp--preset--color--yellow);
}
.is-style-stat-big {
  font-family: var(--wp--preset--font-family--serif);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: var(--wp--custom--tracking--tight);
  margin: 14px 0 8px;
  color: var(--wp--preset--color--fg-on-dark);
}
.is-style-stat-desc {
  font-size: 14px;
  color: var(--wp--preset--color--fg-on-dark-2);
}

.is-style-wordmark {
  font-family: var(--wp--preset--font-family--serif);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.005em;
  color: inherit;
}

.is-style-pullquote {
  font-family: var(--wp--preset--font-family--serif);
  font-size: var(--wp--preset--font-size--h-2);
  line-height: 1.08;
  letter-spacing: var(--wp--custom--tracking--tight);
  font-weight: 600;
}

/* ─── Wide separator — full container width ─────────────────────────────── */
.wp-block-separator.is-style-wide {
  border-bottom: 1px solid currentColor;
  border-top: 0;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
/* Footer-scoped separator color — kept in CSS rather than inline so the
   block markup stays minimal and avoids React save() ↔ saved-HTML
   serialization mismatches that the editor flags as invalid content. */
.site-footer .wp-block-separator.is-style-wide {
  color: rgba(255, 255, 255, 0.1);
}

/* ─── Remove WP block-gap above header + footer template parts ──────────── */
.wp-site-blocks > .wp-block-template-part {
  margin-block-start: 0;
}

/* ─── Site chrome ──────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--wp--custom--nav--height);
  background: rgba(251, 247, 240, 0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--wp--preset--color--line-soft);
}

.site-footer {
  background: var(--wp--preset--color--blue-deep);
  color: var(--wp--preset--color--fg-on-dark-2);
  padding: var(--wp--preset--spacing--80) 0 var(--wp--preset--spacing--70);
}
.site-footer a         { color: var(--wp--preset--color--fg-on-dark-2); text-decoration: none; }
.site-footer a:hover   { color: var(--wp--preset--color--yellow); }
.site-footer .is-style-eyebrow  { color: var(--wp--preset--color--yellow); }
.site-footer .is-style-wordmark { color: var(--wp--preset--color--yellow); }

/* ─── Logo · CSS mask for per-context recolouring ───────────────────────── */
.site-logo-icon {
  display: block;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url('../images/logo.svg');
          mask-image: url('../images/logo.svg');
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
}
.site-header .site-logo-icon { width: 46px; height: 50px; }
.site-footer .site-logo-icon { width: 32px; height: 30px; }
.site-logo-mark a { text-decoration: none; color: inherit; }

/* ─── Mobile nav — collapse the desktop links list ──────────────────────── */
@media (max-width: 768px) {
  .site-header .site-nav-links { display: none; }
}
