/* ============================================================
   Soofos About page — per-page styles
   Enqueued only on the /about/ page via soofos_enqueue_page_styles().
   Targets the native Gutenberg block DOM produced by the
   inc/public-page-migrations/about.php definition (core group / heading /
   paragraph / image / buttons / button), so selectors are scoped to
   .sf-about-page and override core block-library layout (button wrappers,
   figure margins, group inner-container flex/grid). All colours/spacing
   reference CSS custom properties from tokens.css; no raw hex / px / ems.
   ============================================================ */

.sf-about-page,
.sf-about-page * { box-sizing: border-box; }

.sf-about-page {
    font-family: var(--font);
    color: var(--body);
    background: var(--page);
}

/* Neutralise core default block margins; each block below owns its spacing.
   :where() keeps this at zero extra specificity so the rules further down win. */
.sf-about-page :where(p, h1, h2, h3, figure, .wp-block-image) { margin: 0; }
.sf-about-page :where(.wp-block-buttons) { margin: 0; }
.sf-about-page > .wp-block-group__inner-container > * { margin-block-start: 0; }

/* Core groups render a .wp-block-group__inner-container wrapper, so the grid
   rules on the block element would otherwise see a single child and never
   form columns. Make the wrapper transparent to layout for every grid group
   (nothing styles these specific wrappers, so `contents` is safe). */
.sf-about-hero__inner > .wp-block-group__inner-container,
.sf-about-story__grid > .wp-block-group__inner-container,
.sf-about-three__grid > .wp-block-group__inner-container,
.sf-about-team__panel > .wp-block-group__inner-container,
.sf-about-team__grid > .wp-block-group__inner-container,
.sf-about-instructors__grid > .wp-block-group__inner-container,
.sf-about-cta__card > .wp-block-group__inner-container {
    display: contents;
}

/* Shared eyebrow + heading */
.sf-about-eyebrow {
    font-size: var(--soofos-player-text-sm);
    font-weight: var(--soofos-font-weight-black);
    letter-spacing: calc(var(--soofos-space-2xs) * .5);
    color: var(--deep-blue);
    text-transform: uppercase;
    margin: 0 0 var(--soofos-space-sm);
}

.sf-about-heading {
    color: var(--ink);
    font-size: var(--soofos-space-xl);
    font-weight: var(--soofos-font-weight-black);
    line-height: 1.2;
    letter-spacing: calc(var(--soofos-space-2xs) * -.25);
    margin: 0;
}

.sf-about-heading--center { text-align: center; }

.sf-about-sub {
    color: var(--muted);
    font-size: var(--soofos-player-text-md);
    line-height: 1.65;
    margin: 0;
}

.sf-about-text-link {
    margin: var(--soofos-space-md) 0 0;
}

.sf-about-text-link a {
    color: var(--deep-blue);
    font-size: var(--soofos-player-text-md);
    font-weight: var(--soofos-font-weight-extrabold);
    text-decoration: none;
}

.sf-about-text-link a:hover { color: var(--blue-hover); }

.sf-about-text-link a:focus-visible {
    outline: var(--soofos-space-2xs) solid var(--deep-blue);
    outline-offset: var(--soofos-space-2xs);
    border-radius: var(--soofos-radius-sm);
}

/* ---------- Hero ---------- */
.sf-about-page .sf-about-hero {
    background: var(--ink);
    color: var(--white);
    padding: var(--soofos-space-3xl) var(--soofos-space-xl);
}

.sf-about-hero__inner {
    max-width: calc(var(--soofos-space-3xl) * 25);
    margin-inline: auto;
    display: grid;
    gap: var(--soofos-space-2xl);
    align-items: center;
}

.sf-about-hero__copy {
    display: flex;
    flex-direction: column;
}

.sf-about-hero__eyebrow {
    font-size: var(--soofos-player-text-sm);
    font-weight: var(--soofos-font-weight-black);
    letter-spacing: calc(var(--soofos-space-2xs) * .5);
    color: var(--blue);
    text-transform: uppercase;
    margin: 0 0 var(--soofos-space-sm);
}

.sf-about-hero__title {
    color: var(--white);
    font-size: calc(var(--soofos-space-2xl) + var(--soofos-space-md));
    font-weight: var(--soofos-font-weight-black);
    line-height: 1.1;
    letter-spacing: calc(var(--soofos-space-2xs) * -1);
    margin: 0;
}

.sf-about-hero__lead {
    color: var(--faint);
    font-size: var(--soofos-space-lg);
    line-height: 1.65;
    margin: var(--soofos-space-lg) 0 0;
    max-width: calc(var(--soofos-space-3xl) * 12);
}

.sf-about-hero__stats {
    display: flex;
    gap: var(--soofos-space-2xl);
    margin-top: calc(var(--soofos-space-2xl) + var(--soofos-space-sm));
    flex-wrap: wrap;
}

.sf-about-hero__stat { display: flex; flex-direction: column; }

.sf-about-hero__stat-num {
    color: var(--white);
    font-size: var(--soofos-space-2xl);
    font-weight: var(--soofos-font-weight-black);
    line-height: 1.1;
    margin: 0;
}

.sf-about-hero__stat-label {
    color: var(--faint);
    font-size: var(--soofos-player-text-sm);
    font-weight: var(--soofos-font-weight-extrabold);
    line-height: 1.4;
    margin: 0;
}

.sf-about-hero__image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--r-card);
    box-shadow: var(--shadow-soft);
}

/* ---------- Story (sticky left + 3 cards) ---------- */
.sf-about-page .sf-about-story {
    padding: calc(var(--soofos-space-3xl) + var(--soofos-space-md)) var(--soofos-space-xl) 0;
}

.sf-about-story__grid {
    max-width: calc(var(--soofos-space-3xl) * 25);
    margin-inline: auto;
    display: grid;
    gap: calc(var(--soofos-space-3xl) + var(--soofos-space-xs));
    align-items: start;
}

.sf-about-story__head { display: flex; flex-direction: column; }

.sf-about-story__cards { display: flex; flex-direction: column; gap: var(--soofos-space-md); }

.sf-about-card {
    background: var(--white);
    border: thin solid var(--card-border);
    border-radius: var(--r-card);
    padding: calc(var(--soofos-space-xl) + var(--soofos-space-xs)) var(--soofos-space-2xl);
    box-shadow: var(--shadow-soft);
}

.sf-about-card__title {
    color: var(--ink);
    font-size: var(--soofos-player-text-lg);
    font-weight: var(--soofos-font-weight-black);
    line-height: 1.3;
    margin: 0 0 var(--soofos-space-2xs);
}

.sf-about-card__body {
    color: var(--muted);
    font-size: var(--soofos-player-text-md);
    line-height: 1.7;
    margin: 0;
}

/* ---------- Three things every course must be ---------- */
.sf-about-page .sf-about-three {
    padding: calc(var(--soofos-space-3xl) + var(--soofos-space-md)) var(--soofos-space-xl) 0;
}

.sf-about-three__head {
    max-width: calc(var(--soofos-space-3xl) * 13);
    margin: 0 auto var(--soofos-space-2xl);
    text-align: center;
}

.sf-about-three__head .sf-about-eyebrow { margin-bottom: var(--soofos-space-sm); }

.sf-about-three__grid {
    max-width: calc(var(--soofos-space-3xl) * 25);
    margin-inline: auto;
    display: grid;
    gap: var(--soofos-space-lg);
}

.sf-about-three-card {
    background: var(--white);
    border: thin solid var(--card-border);
    border-radius: var(--r-card-lg);
    padding: calc(var(--soofos-space-xl) + var(--soofos-space-sm)) var(--soofos-space-2xl);
    box-shadow: var(--shadow-soft);
}

.sf-about-three-card__badge {
    width: calc(var(--soofos-space-2xl) + var(--soofos-space-md));
    height: calc(var(--soofos-space-2xl) + var(--soofos-space-md));
    border-radius: var(--soofos-space-md);
    background: var(--blue-fill);
    display: grid;
    place-items: center;
    margin-bottom: var(--soofos-space-md);
}

.sf-about-three-card__num {
    color: var(--deep-blue);
    font-size: var(--soofos-space-lg);
    font-weight: var(--soofos-font-weight-black);
    line-height: 1;
    margin: 0;
}

.sf-about-three-card__title {
    color: var(--ink);
    font-size: var(--soofos-space-lg);
    font-weight: var(--soofos-font-weight-black);
    line-height: 1.3;
    margin: 0 0 var(--soofos-space-2xs);
}

.sf-about-three-card__body {
    color: var(--muted);
    font-size: var(--soofos-player-text-md);
    line-height: 1.65;
    margin: 0;
}

/* ---------- Team (founder panel + 4-member grid) ---------- */
.sf-about-page .sf-about-team {
    padding: calc(var(--soofos-space-3xl) + var(--soofos-space-md)) var(--soofos-space-xl) 0;
}

.sf-about-team__panel,
.sf-about-team__grid {
    max-width: calc(var(--soofos-space-3xl) * 25);
    margin-inline: auto;
}

.sf-about-team__panel {
    background: var(--white);
    border: thin solid var(--card-border);
    border-radius: var(--r-card-lg);
    padding: calc(var(--soofos-space-3xl) - var(--soofos-space-sm)) calc(var(--soofos-space-3xl) + var(--soofos-space-xs));
    display: grid;
    gap: calc(var(--soofos-space-2xl) + var(--soofos-space-md));
    align-items: center;
    box-shadow: var(--shadow-soft);
}

.sf-about-team__copy { display: flex; flex-direction: column; }

.sf-about-team__copy .sf-about-heading {
    font-size: calc(var(--soofos-space-xl) + var(--soofos-space-sm));
}

.sf-about-team__founder img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--r-card);
}

.sf-about-team__grid {
    display: grid;
    gap: var(--soofos-space-lg);
    margin-top: var(--soofos-space-lg);
}

.sf-about-team-member {
    background: var(--white);
    border: thin solid var(--card-border);
    border-radius: var(--r-card);
    padding: var(--soofos-space-lg);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.sf-about-team-member__avatar img {
    display: block;
    width: calc(var(--soofos-space-3xl) * 2);
    height: calc(var(--soofos-space-3xl) * 2);
    border-radius: var(--r-pill);
    object-fit: cover;
    background: var(--blue-fill);
    margin: 0 auto;
}

.sf-about-team-member__name {
    color: var(--ink);
    font-size: var(--soofos-player-text-lg);
    font-weight: var(--soofos-font-weight-black);
    line-height: 1.3;
    margin: var(--soofos-space-md) 0 0;
}

.sf-about-team-member__role {
    color: var(--muted-2);
    font-size: var(--soofos-player-text-sm);
    font-weight: var(--soofos-font-weight-bold);
    line-height: 1.4;
    margin: var(--soofos-space-2xs) 0 0;
}

/* ---------- Instructors collage + CTAs ---------- */
.sf-about-page .sf-about-instructors {
    padding: calc(var(--soofos-space-3xl) + var(--soofos-space-md)) var(--soofos-space-xl) 0;
}

.sf-about-instructors__grid {
    max-width: calc(var(--soofos-space-3xl) * 25);
    margin-inline: auto;
    display: grid;
    gap: calc(var(--soofos-space-3xl) + var(--soofos-space-xs));
    align-items: center;
}

.sf-about-instructors__collage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--soofos-space-md);
}

.sf-about-instructors__img img {
    display: block;
    width: 100%;
    height: calc(var(--soofos-space-3xl) * 4);
    object-fit: cover;
    border-radius: var(--r-card);
    box-shadow: var(--shadow-soft);
}

.sf-about-instructors__img--bottom { grid-column: 1 / -1; }

.sf-about-instructors__copy { display: flex; flex-direction: column; }

.sf-about-instructors__buttons {
    display: flex;
    gap: var(--soofos-space-md);
    margin-top: var(--soofos-space-lg);
    flex-wrap: wrap;
}

.sf-about-instructors__buttons .wp-block-button { margin: 0; }

/* ---------- Contact CTA (navy card) ---------- */
.sf-about-page .sf-about-cta {
    padding: calc(var(--soofos-space-3xl) + var(--soofos-space-md)) var(--soofos-space-xl) calc(var(--soofos-space-3xl) + var(--soofos-space-2xl));
}

.sf-about-cta__card {
    max-width: calc(var(--soofos-space-3xl) * 25);
    margin-inline: auto;
    background: var(--ink);
    color: var(--white);
    border: thin solid var(--on-navy-line);
    border-radius: calc(var(--soofos-space-xl) + var(--soofos-space-xs));
    padding: calc(var(--soofos-space-2xl) + var(--soofos-space-md)) calc(var(--soofos-space-3xl) + var(--soofos-space-md));
    display: grid;
    gap: calc(var(--soofos-space-2xl) + var(--soofos-space-md));
    align-items: center;
    box-shadow: var(--shadow-card);
}

.sf-about-cta__copy { display: flex; flex-direction: column; }

.sf-about-cta__title {
    color: var(--white);
    font-size: calc(var(--soofos-space-xl) + var(--soofos-space-sm));
    font-weight: var(--soofos-font-weight-black);
    line-height: 1.2;
    letter-spacing: calc(var(--soofos-space-2xs) * -.25);
    margin: 0;
}

.sf-about-cta__sub {
    color: var(--faint);
    font-size: var(--soofos-player-text-md);
    line-height: 1.65;
    margin: var(--soofos-space-sm) 0 0;
}

.sf-about-cta__buttons {
    display: flex;
    gap: var(--soofos-space-md);
    margin-top: var(--soofos-space-lg);
    flex-wrap: wrap;
}

.sf-about-cta__buttons .wp-block-button { margin: 0; }

.sf-about-cta__image img {
    display: block;
    width: 78%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* ---------- Buttons (shared across the page) ---------- */
.sf-about-page .sf-about-btn .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--soofos-control-min-height);
    padding: var(--soofos-space-md) calc(var(--soofos-space-xl) + var(--soofos-space-xs));
    border-radius: var(--r-btn);
    font-family: var(--font);
    font-size: var(--soofos-player-text-md);
    font-weight: var(--soofos-font-weight-black);
    line-height: 1.4;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.sf-about-btn--primary .wp-block-button__link {
    background: var(--blue);
    color: var(--white);
    border: thin solid var(--blue);
}

.sf-about-btn--primary .wp-block-button__link:hover {
    background: var(--blue-hover);
    border-color: var(--blue-hover);
    color: var(--white);
}

.sf-about-btn--ghost .wp-block-button__link {
    background: var(--white);
    color: var(--ink);
    border: calc(var(--soofos-space-2xs) * 1.5) solid var(--card-border);
}

.sf-about-btn--ghost .wp-block-button__link:hover {
    border-color: var(--blue);
    color: var(--deep-blue);
}

.sf-about-btn--outline .wp-block-button__link {
    background: transparent;
    color: var(--white);
    border: calc(var(--soofos-space-2xs) * 1.5) solid var(--on-navy-line);
}

.sf-about-btn--outline .wp-block-button__link:hover {
    border-color: var(--white);
    color: var(--white);
}

.sf-about-page .sf-about-btn .wp-block-button__link:focus-visible {
    outline: var(--soofos-space-2xs) solid var(--deep-blue);
    outline-offset: var(--soofos-space-2xs);
}

/* ---------- Responsive: tablet / desktop (≥48rem) ---------- */
@media (min-width: 48rem) {
    .sf-about-page .sf-about-hero,
    .sf-about-page .sf-about-story,
    .sf-about-page .sf-about-three,
    .sf-about-page .sf-about-team,
    .sf-about-page .sf-about-instructors,
    .sf-about-page .sf-about-cta {
        padding-right: calc(var(--soofos-space-3xl) + var(--soofos-space-sm));
        padding-left: calc(var(--soofos-space-3xl) + var(--soofos-space-sm));
    }

    .sf-about-hero__inner {
        grid-template-columns: 1fr 1fr;
        gap: calc(var(--soofos-space-3xl) + var(--soofos-space-xs));
    }

    .sf-about-hero__title {
        font-size: var(--soofos-space-3xl);
    }

    .sf-about-hero__stats { gap: calc(var(--soofos-space-3xl) - var(--soofos-space-xs)); }

    .sf-about-story__grid {
        grid-template-columns: 1fr 1.25fr;
        gap: calc(var(--soofos-space-3xl) + var(--soofos-space-xs));
    }

    .sf-about-story__head {
        position: sticky;
        top: var(--soofos-space-3xl);
    }

    .sf-about-story__head .sf-about-heading {
        font-size: var(--soofos-space-2xl);
    }

    .sf-about-three__head .sf-about-heading { font-size: var(--soofos-space-2xl); }

    .sf-about-three__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .sf-about-team__panel { grid-template-columns: 1fr 1fr; }

    .sf-about-team__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .sf-about-instructors__grid { grid-template-columns: 1.1fr 1fr; }

    .sf-about-cta__card { grid-template-columns: 1.2fr 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .sf-about-page * { transition: none !important; }
}
