/*
 * Home-page redesign: executive editorial, human, and conversion-led.
 * Loaded after the base theme so existing editor content receives the same
 * stable layout system without requiring brittle inline styles.
 */

:root {
  --smes-shell: min(100% - clamp(2rem, 6vw, 6rem), 78rem);
  --smes-section-space: clamp(4.75rem, 8vw, 7.5rem);
  --smes-card-shadow: 0 1rem 3rem rgba(11, 32, 51, 0.08);
}

/* WordPress' constrained-layout rule was compressing every desktop grid to
 * the 44rem reading measure. Section shells are wide; prose remains narrow. */
.smes-hero > .smes-container,
.smes-section > .smes-container,
.smes-site-footer > .smes-container {
  width: var(--smes-shell) !important;
  max-width: 78rem !important;
  margin-inline: auto !important;
}

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

.smes-section > .smes-container > :first-child,
.smes-section > .smes-container > .wp-block-group:first-child > :first-child {
  margin-top: 0;
}

.smes-eyebrow {
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
}

.smes-eyebrow::before {
  width: 2rem;
  height: 1px;
}

.smes-display {
  max-width: 12ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3.35rem, 5.35vw, 5.35rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
}

.smes-section-title {
  max-width: 18ch;
  font-size: clamp(2.55rem, 4.25vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.smes-lead {
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  line-height: 1.65;
}

/* Hero */
.smes-hero {
  min-height: 0;
  overflow: clip;
  background:
    linear-gradient(90deg, rgba(196, 154, 69, 0.08) 1px, transparent 1px) calc(50% - 39rem) 0 / 6rem 100%,
    var(--smes-paper);
}

.smes-hero::after {
  height: 3px;
  background: linear-gradient(90deg, var(--smes-gold) 0 12%, var(--smes-teal) 12% 31%, transparent 31%);
}

.smes-hero-grid {
  min-height: 0;
  grid-template-columns: minmax(0, 1.25fr) minmax(21rem, 0.75fr);
  gap: clamp(3rem, 7vw, 6.5rem);
  padding-block: clamp(4.5rem, 8vw, 7.5rem);
}

.smes-hero-copy {
  min-width: 0;
}

.smes-hero-copy .smes-lead {
  max-width: 31rem;
}

.smes-hero-actions {
  gap: 0.75rem;
  margin-top: 2.1rem;
}

.smes-hero-actions .wp-block-button__link {
  min-height: 3.35rem;
  padding-inline: 1.35rem;
}

.smes-hero-art {
  width: 100%;
  max-width: 26.5rem;
  min-height: 32rem;
  aspect-ratio: auto;
  justify-self: end;
  margin: 0;
  padding: 2rem;
  background:
    radial-gradient(circle at 88% 12%, rgba(240, 215, 157, 0.22), transparent 27%),
    linear-gradient(145deg, #102a43 0%, #102a43 55%, #123f50 100%);
  box-shadow: 1.25rem 1.25rem 0 rgba(25, 124, 122, 0.13);
}

.smes-hero-art::before {
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255, 255, 255, 0.1) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(255, 255, 255, 0.1) 50%, transparent 50.2%);
}

.smes-hero-art::after {
  position: absolute;
  inset: 8rem auto auto 2rem;
  color: rgba(255, 255, 255, 0.06);
  content: "PD";
  font-family: var(--wp--preset--font-family--serif);
  font-size: 10rem;
  font-weight: 600;
  line-height: 1;
}

.smes-hero-art-label {
  inset: 2rem 2rem auto;
  font-size: 0.68rem;
  line-height: 1.5;
  letter-spacing: 0.13em;
}

.smes-hero-art-copy {
  inset: auto 2rem 2rem;
  max-width: 14rem;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.13;
}

.smes-orbit--one {
  width: 64%;
  inset: 23% auto auto -10%;
}

.smes-orbit--two {
  width: 76%;
  inset: auto -29% 3% auto;
}

.smes-orbit--three {
  width: 42%;
  inset: 47% auto auto 32%;
}

.smes-hero-art-core {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-top: 7rem;
  color: var(--smes-white);
  font-family: var(--wp--preset--font-family--serif);
  font-size: clamp(2.6rem, 4vw, 4rem);
  line-height: 1;
}

.smes-hero-art-core span:nth-child(2) {
  color: var(--smes-gold);
  font-family: var(--wp--preset--font-family--sans);
  font-size: 1.2rem;
}

.smes-hero-art-core span:last-child {
  color: #56aaa7;
}

.smes-hero-art-stages {
  position: absolute;
  z-index: 2;
  inset: auto 2rem 2rem;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--smes-white);
  list-style: none;
}

.smes-hero-art-stages li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding-block: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.8rem;
  line-height: 1.35;
}

.smes-hero-art-stages span {
  color: var(--smes-gold-light);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* Editorial introduction */
.smes-section--white:has(.smes-pull-line) {
  background: var(--smes-white);
}

.smes-section:has(.smes-pull-line) .smes-two-column {
  grid-template-columns: minmax(0, 1.12fr) minmax(18rem, 0.88fr);
  align-items: start;
  gap: clamp(3rem, 8vw, 7rem);
}

.smes-pull-line {
  border-left-width: 2px;
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
}

.smes-pull-line p {
  max-width: 15ch;
  font-size: clamp(2.25rem, 3.65vw, 3.55rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.smes-section:has(.smes-pull-line) .smes-reading {
  padding-top: 0.35rem;
  font-size: 1.08rem;
  line-height: 1.72;
}

/* Three-stage framework */
.smes-journey {
  gap: 1rem;
  margin-block: 3.25rem 2.25rem;
}

.smes-journey::before {
  display: none;
}

.smes-journey-step,
.smes-journey-step + .smes-journey-step {
  min-height: 18rem;
  padding: 5.5rem 2rem 2rem;
  border: 1px solid var(--smes-line);
  border-top: 3px solid var(--smes-gold);
  background: rgba(255, 255, 255, 0.62);
}

.smes-journey-step:nth-child(2) {
  border-top-color: var(--smes-teal);
}

.smes-journey-step:nth-child(3) {
  border-top-color: var(--smes-navy);
}

.smes-journey-step::before,
.smes-journey-step + .smes-journey-step::before {
  inset: 1.55rem auto auto 2rem;
  width: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--smes-teal-dark);
  font-family: var(--wp--preset--font-family--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.smes-journey-step h3 {
  font-size: clamp(1.75rem, 2.35vw, 2.3rem);
  line-height: 1.05;
}

/* Success measures */
.smes-section--teal {
  background: #174f50;
}

.smes-section--teal .smes-section-title {
  max-width: 19ch;
}

.smes-measures {
  gap: 1px;
  margin-top: 3rem;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
}

.smes-measure,
.smes-measure:last-child {
  min-height: 12rem;
  padding: 4.5rem 2rem 2rem;
  border: 0;
  background: #174f50;
}

.smes-measure::before {
  inset: 2.05rem auto auto 2rem;
}

.smes-measure p {
  max-width: 12ch;
  font-size: clamp(1.55rem, 2.35vw, 2.15rem);
  line-height: 1.14;
}

/* Organizational impact */
.smes-section:has(.smes-impact-list) {
  background: #eef1eb;
}

.smes-section:has(.smes-impact-list) .smes-two-column {
  grid-template-columns: minmax(0, 0.9fr) minmax(28rem, 1.1fr);
  align-items: start;
  gap: clamp(3.5rem, 8vw, 7rem);
}

.smes-section:has(.smes-impact-list) .smes-section-title {
  max-width: 11ch;
  font-size: clamp(2.8rem, 4.5vw, 4.25rem);
}

.smes-impact-list {
  min-width: 0;
  margin-top: 0;
}

.smes-impact-list li {
  min-width: 0;
  grid-template-columns: minmax(8rem, 0.55fr) minmax(0, 1.45fr);
  gap: 1.75rem;
  padding-block: 1.5rem;
}

.smes-impact-list strong {
  font-size: 1.12rem;
}

.smes-impact-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Workshops */
.smes-section:has(.smes-workshop-grid) .smes-section-title {
  max-width: 16ch;
}

.smes-workshop-grid,
.smes-story-grid {
  gap: 1.25rem;
  margin-top: 3rem;
}

.smes-workshop-card,
.smes-story-card {
  min-width: 0;
  min-height: 23rem;
  padding: 2rem;
  border: 1px solid var(--smes-line);
  border-top: 3px solid var(--smes-gold);
  box-shadow: var(--smes-card-shadow);
}

.smes-workshop-card h3,
.smes-story-card h3 {
  margin-block: 1.25rem 1rem;
  font-size: clamp(1.8rem, 2.45vw, 2.35rem);
  line-height: 1.03;
  overflow-wrap: normal;
}

.smes-workshop-card h3 a,
.smes-story-card h3 a {
  color: inherit;
  text-decoration: none;
}

.smes-workshop-card h3 a:hover,
.smes-story-card h3 a:hover {
  color: var(--smes-teal-dark);
}

.smes-workshop-card p,
.smes-story-card p {
  font-size: 0.97rem;
  line-height: 1.7;
}

/* Facilitator: a purposeful principles panel instead of a fake portrait. */
.smes-section:has(.smes-facilitator-panel),
.smes-section:has(.smes-editorial-portrait) {
  background: var(--smes-white);
}

.smes-section:has(.smes-facilitator-panel) .smes-two-column,
.smes-section:has(.smes-editorial-portrait) .smes-two-column {
  grid-template-columns: minmax(20rem, 0.78fr) minmax(0, 1.22fr);
  align-items: center;
  gap: clamp(3.5rem, 8vw, 7rem);
}

.smes-section:has(.smes-facilitator-panel) .smes-section-title,
.smes-section:has(.smes-editorial-portrait) .smes-section-title {
  max-width: 13ch;
  font-size: clamp(2.65rem, 4vw, 3.8rem);
}

.smes-facilitator-panel,
.smes-editorial-portrait {
  position: relative;
  display: flex;
  min-height: 29rem;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  padding: 2.25rem;
  overflow: hidden;
  background: var(--smes-navy);
  color: var(--smes-white);
}

.smes-facilitator-panel::before,
.smes-editorial-portrait::before {
  position: absolute;
  width: 18rem;
  aspect-ratio: 1;
  inset: -8rem -7rem auto auto;
  border: 1px solid rgba(240, 215, 157, 0.5);
  border-radius: 50%;
  content: "";
}

.smes-facilitator-panel::after,
.smes-editorial-portrait::after {
  position: absolute;
  width: 13rem;
  aspect-ratio: 1;
  inset: auto auto -6rem -5rem;
  border: 1px solid rgba(86, 170, 167, 0.75);
  border-radius: 50%;
  content: "";
}

.smes-facilitator-panel__label {
  position: relative;
  z-index: 1;
  color: var(--smes-gold-light);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.smes-facilitator-principles {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  margin: 3rem 0 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none;
}

.smes-facilitator-principles li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.8rem;
  padding-block: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.smes-facilitator-principles span {
  color: var(--smes-gold-light);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.smes-facilitator-principles strong {
  font-family: var(--wp--preset--font-family--serif);
  font-size: 1.38rem;
  font-weight: 520;
  line-height: 1.15;
}

.smes-editorial-portrait p {
  max-width: 15rem;
  font-size: 1.65rem;
}

/* Proof and CTA */
.smes-section--navy:has(.smes-empty-state) {
  padding-block: clamp(4rem, 7vw, 6rem);
}

.smes-section--navy .smes-empty-state {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.5rem 3rem;
  max-width: 62rem;
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3.25rem);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.055);
  color: #dce5ea;
  text-align: left;
}

.smes-section--navy .smes-empty-state .smes-eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: var(--smes-gold-light);
}

.smes-section--navy .smes-empty-state h2 {
  max-width: 19ch;
  margin: 0;
  color: var(--smes-white);
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  line-height: 1.04;
}

.smes-section--navy .smes-empty-state p:not(.smes-eyebrow) {
  grid-column: 1;
  max-width: 42rem;
  margin: 0;
  line-height: 1.65;
}

.smes-section--navy .smes-empty-state .smes-text-link {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: center;
  color: var(--smes-gold-light);
}

.smes-cta-band {
  padding-block: clamp(4.5rem, 7vw, 6.5rem);
}

.smes-cta-band > .smes-reading {
  max-width: 58rem !important;
}

.smes-cta-band .smes-section-title {
  max-width: 18ch;
}

/* Header and footer are calmer once the body uses the full shell. */
.smes-header-inner {
  width: var(--smes-shell) !important;
  max-width: 78rem !important;
}

.smes-site-footer {
  padding-top: clamp(3.5rem, 6vw, 5rem);
}

.smes-footer-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  align-items: start;
}

@media (min-width: 961px) {
  .smes-workshop-grid,
  .smes-story-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .smes-display {
    font-size: clamp(3.25rem, 5.7vw, 4.6rem);
  }

  .smes-hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(19rem, 0.8fr);
    gap: 3rem;
  }

  .smes-hero-art {
    min-height: 29rem;
  }
}

@media (max-width: 900px) {
  :root {
    --smes-shell: min(100% - 3rem, 46rem);
  }

  .smes-hero-grid,
  .smes-two-column,
  .smes-section:has(.smes-pull-line) .smes-two-column,
  .smes-section:has(.smes-impact-list) .smes-two-column,
  .smes-section:has(.smes-facilitator-panel) .smes-two-column,
  .smes-section:has(.smes-editorial-portrait) .smes-two-column {
    grid-template-columns: 1fr;
  }

  .smes-hero-grid {
    padding-block: 4rem 5rem;
  }

  .smes-display {
    max-width: 11ch;
    font-size: clamp(3.2rem, 9vw, 4.7rem);
  }

  .smes-hero-art {
    width: min(100%, 38rem);
    min-height: 26rem;
    justify-self: start;
  }

  .smes-journey {
    grid-template-columns: 1fr;
  }

  .smes-journey-step,
  .smes-journey-step + .smes-journey-step {
    min-height: 0;
  }

  .smes-workshop-grid,
  .smes-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .smes-workshop-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .smes-section:has(.smes-impact-list) .smes-section-title {
    max-width: 14ch;
  }

  .smes-impact-list {
    margin-top: 1rem;
  }

  .smes-facilitator-panel,
  .smes-editorial-portrait {
    min-height: 24rem;
  }
}

@media (max-width: 650px) {
  :root {
    --smes-shell: min(100% - 2rem, 40rem);
    --smes-section-space: clamp(3.75rem, 14vw, 5rem);
  }

  .smes-display {
    max-width: 10.5ch;
    font-size: clamp(3rem, 14vw, 4rem);
  }

  .smes-section-title {
    font-size: clamp(2.35rem, 11vw, 3.25rem);
  }

  .smes-hero-grid {
    gap: 2.75rem;
    padding-block: 3rem 4.5rem;
  }

  .smes-hero-art {
    min-height: 25rem;
    padding: 1.5rem;
    box-shadow: 0.7rem 0.7rem 0 rgba(25, 124, 122, 0.13);
  }

  .smes-hero-art-label {
    inset: 1.5rem 1.5rem auto;
  }

  .smes-hero-art-core {
    margin-top: 6.2rem;
  }

  .smes-hero-art-stages,
  .smes-hero-art-copy {
    inset: auto 1.5rem 1.5rem;
  }

  .smes-pull-line p {
    font-size: clamp(2.05rem, 10vw, 2.9rem);
  }

  .smes-measures,
  .smes-workshop-grid,
  .smes-story-grid,
  .smes-section--navy .smes-empty-state {
    grid-template-columns: 1fr;
  }

  .smes-measure,
  .smes-measure:last-child {
    min-height: 0;
  }

  .smes-workshop-card,
  .smes-story-card {
    min-height: 20rem;
  }

  .smes-workshop-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .smes-impact-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .smes-section--navy .smes-empty-state .smes-text-link,
  .smes-section--navy .smes-empty-state p:not(.smes-eyebrow) {
    grid-column: 1;
    grid-row: auto;
  }

  .smes-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .smes-workshop-card,
  .smes-story-card {
    transition: none;
  }
}
