/* ============================================================
   HERO SPLIT  (shared) — kwizzbit/about-hero · story · more-story
   Two-column photo + copy. Base is image-LEFT / copy-RIGHT;
   .hero-split--reverse flips it. Variants:
     --mission        (About page H1 hero, larger title + word-swap)
     --about-story    (founder story)
     --more-story-*   (Leeds / paper, stacked pair w/ phased float)
   Keyframes are hs- prefixed so they never clash with modes.css /
   the global cursor-blink defined across other components.
   ============================================================ */
.hero-split {
  background: var(--wp--preset--color--cream);
  /* 50px of breathing room below each block → 50px between stacked blocks.
     Top stays 0 so the gap is never doubled where blocks meet. */
  padding-block: 0 50px;
}

/* Keep the top at 0 for consecutive splits too (more-story pair) */
.hero-split + .hero-split { padding-top: 0; }

/* Extra breathing room around the whole story run:
   more above the first block, more below the last. */
.hero-split--about-story      { padding-top: clamp(4rem, 8vw, 8rem); }
.hero-split--more-story-paper { padding-bottom: clamp(5rem, 9vw, 9rem); }

.hero-split__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-split__inner {
    grid-template-columns: 524px 1fr;
    gap: 70px;
    align-items: center;
    max-width: 1100px;
    margin-inline: auto;
  }
  /* Default: image LEFT, copy RIGHT */
  .hero-split__media   { grid-column: 1; grid-row: 1; }
  .hero-split__content { grid-column: 2; grid-row: 1; }

  /* Reverse: image RIGHT, copy LEFT — flip so the image always keeps 524px */
  .hero-split--reverse .hero-split__inner { grid-template-columns: 1fr 524px; }
  .hero-split--reverse .hero-split__media   { grid-column: 2; grid-row: 1; }
  .hero-split--reverse .hero-split__content { grid-column: 1; grid-row: 1; }
}

/* ── Media ───────────────────────────────────────────────── */
.hero-split__media {
  position: relative;
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
  padding-bottom: 0;
}
@media (min-width: 1024px) {
  .hero-split__media { width: 524px; max-width: none; margin-inline: 0; }
}

.hero-split__image-wrap {
  width: 524px;
  height: 492px;
  max-width: 100%;
  overflow: hidden;
  background: var(--wp--preset--color--cream-soft);
  display: block;
  will-change: transform;
  /* Gentle drift — single image variants (mission / story) use this default */
  animation: hs-image-float 5s ease-in-out 1s infinite;
}
.hero-split__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes hs-image-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* more-story pair — phase the two so they're never in sync */
.hero-split--more-story-leeds .hero-split__image-wrap { animation-delay: 1s; }
.hero-split--more-story-paper .hero-split__image-wrap { animation-delay: 3.5s; }

@media (prefers-reduced-motion: reduce) {
  .hero-split__image-wrap { animation: none; }
}

/* ── Content ─────────────────────────────────────────────── */
@keyframes hs-content-rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-split__content {
  text-align: center;
  animation: hs-content-rise 0.72s var(--wp--custom--motion--ease-out) both;
  animation-delay: 0.12s;
}
@media (min-width: 1024px) {
  .hero-split__content {
    max-width: 32rem;
    margin-inline: auto;
    padding-top: 0;
    align-self: center;
  }
}

/* ── Eyebrow ─────────────────────────────────────────────── */
.hero-split__eyebrow {
  display: block;
  font-family: 'Pixelar', monospace;
  font-weight: 400;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--wp--preset--color--coral);
  margin: 0 0 0.25rem;
}

/* ── Title ───────────────────────────────────────────────── */
.hero-split__title {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 0.25rem + 3.5vw, 3.5rem);
  line-height: 0.889;
  letter-spacing: -0.10764em;
  color: var(--wp--preset--color--ink);
  margin: 0 0 var(--wp--preset--spacing--50);
  text-wrap: balance;
}

@keyframes hs-cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.hero-split__title-accent {
  color: var(--wp--preset--color--coral);
  animation: hs-cursor-blink 1.1s step-end infinite;
}

/* ── Lead ────────────────────────────────────────────────── */
.hero-split__lead {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.412;
  letter-spacing: 0;
  color: var(--wp--preset--color--ink-soft);
  margin: 0 auto var(--wp--preset--spacing--60);
  width: 300px;
  max-width: 100%;
}
.hero-split__lead:last-child { margin-bottom: 0; }

/* ── Stat pill ───────────────────────────────────────────── */
.hero-split__stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1;
  color: var(--wp--preset--color--ink-soft);
  background: transparent;
  border: 1px solid rgba(26, 26, 26, 0.18);
  border-radius: 0;
  margin-top: -0.75rem;
}
.hero-split__stat-em {
  color: var(--wp--preset--color--coral);
  margin: 0 0.3em;
  font-weight: 600;
}
.hero-split__stat-num {
  display: inline-block;
  vertical-align: baseline;
}
@keyframes hs-stat-tick {
  from { transform: translateY(4px); opacity: 0.5; }
  to   { transform: translateY(0);   opacity: 1;   }
}
.hero-split__stat-num--tick {
  animation: hs-stat-tick 0.14s var(--wp--custom--motion--ease-out) both;
}

/* ── MISSION variant — larger H1 + coral word-swap ───────── */
@keyframes hs-coral-breathe {
  0%, 100% { color: var(--wp--preset--color--coral); }
  50%       { color: rgba(255, 54, 35, 0.25); }
}
.hero-split__title-swap {
  font-style: italic;
  color: var(--wp--preset--color--coral);
}
.hero-split__title-swap--a { animation: hs-coral-breathe 3s ease-in-out 1.5s infinite; }
.hero-split__title-swap--b { animation: hs-coral-breathe 3s ease-in-out 3s   infinite; }

/* Mission title: text-wrap:wrap at ALL sizes so <br> tags are always honoured */
.hero-split--mission .hero-split__title { text-wrap: wrap; }

@media (min-width: 1024px) {
  .hero-split--mission .hero-split__content { max-width: 36rem; }
  .hero-split--mission .hero-split__title {
    /* Fluid: 3rem @ 1024px → 5rem @ 1920px — keeps lines within the
       ~350-506px content column at every desktop width so the explicit
       <br> groups ("Bringing your" / "room to life" / …) each stay on
       one line and the composition matches the source design. */
    font-size: clamp(3rem, 4vw, 5rem);
    line-height: 0.875;
    letter-spacing: -0.10775em;
    max-width: 508px;
    margin-inline: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-split__title-accent,
  .hero-split__title-swap { animation: none !important; }
  .hero-split__title-accent { opacity: 1 !important; }
}

/* ── Tablet ≤1023 ────────────────────────────────────────── */
@media (max-width: 1023px) {
  .hero-split { padding-block: 0 50px; }
  .hero-split__inner { max-width: 700px; margin-inline: auto; }
  .hero-split__image-wrap {
    width: 100%;
    max-width: 419px;
    height: auto;
    aspect-ratio: 524 / 492;
    margin-inline: auto;
  }
  .hero-split__media   { margin-inline: auto; }
  .hero-split__content { margin-top: 8px; text-align: center; margin-inline: auto; }
  .hero-split__title   { font-size: 3.25rem; max-width: 470px; margin-inline: auto; }
  .hero-split__lead    { margin-inline: auto; }
}

/* ── Mobile ≤640 ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-split { padding-block: 0 50px; }
  .hero-split__inner { width: 100%; padding-inline: 4vw; box-sizing: border-box; }
  .hero-split__media { width: min(330px, 92vw); margin-inline: auto; }
  .hero-split__image-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 524 / 492;
    margin-inline: auto;
  }
  .hero-split__title {
    font-size: clamp(1.875rem, 10.13vw, 2.375rem);
    line-height: 0.95;
    letter-spacing: -0.10763em;
    margin-bottom: var(--wp--preset--spacing--40);
  }
  .hero-split--mission .hero-split__title { max-width: min(332px, 88vw); }
  .hero-split__eyebrow { font-size: 18px; }
  .hero-split__lead { font-size: 1rem; width: auto; max-width: 72%; }
}

/* ── MOBILE (≤640) — About story segment only ──────────────────────────
   The story segment is 3 hero-split blocks across two full-bleed wrappers:
   .kwb-segment--story (1 block) + .kwb-segment--more-story (2 blocks). */
@media (max-width: 640px) {
  /* +60px top & bottom around the combined story segment. Padding the
     wrappers adds the space cleanly without fighting the per-block
     hero-split padding cascade. */
  .kwb-segment--story      { padding-top: 60px; }
  .kwb-segment--more-story { padding-bottom: 60px; }

  /* +12px of space beneath each story image (added to the grid's 2rem gap
     between the image and its copy). */
  .kwb-segment--story      .hero-split__inner,
  .kwb-segment--more-story .hero-split__inner { gap: calc(2rem + 12px); }

}

/* ── Story image plate shadows — ALL breakpoints ───────────────────────
   Offset solid-colour plates (zero blur) on the three story images,
   mirroring the Modes page treatment. Direction alternates per block.
   Global (was mobile-only) so desktop & tablet carry them too. */
.hero-split--about-story      .hero-split__image-wrap { box-shadow:  20px 20px 0 0 #FDDCD2; }
.hero-split--more-story-leeds .hero-split__image-wrap { box-shadow: -20px 20px 0 0 #FDDCD2; }
.hero-split--more-story-paper .hero-split__image-wrap { box-shadow:  20px 20px 0 0 #FDDCD2; }

/* ── Desktop — +24px between each of the 3 story blocks ─────────────────
   The inter-block gap is each block's 50px bottom padding. Adding 24px to
   the first two blocks widens both gaps (story→leeds and leeds→paper) by
   ~24px. The last block (paper) and the run's outer spacing stay untouched. */
@media (min-width: 1024px) {
  .hero-split--about-story,
  .hero-split--more-story-leeds { padding-bottom: 74px; }
}
