/* ==========================================================================
   Our Supporters — 2027 redesign (template-support-supporters-2027.php)
   Source: Figma "SMGLI | Design Devsite" → Phase 1 Closeout → "Our Supporters"
   (node 2421:2043, 1440 wide). Everything is scoped under .sup27 so nothing
   here reaches other templates. Colour and font tokens come from site.css.
   ========================================================================== */

.sup27 {
    --sup27-tan: #e7d8c6;            /* Patrons / Partners bands */
    --sup27-cream: var(--stone);     /* #f2ebe4 — Hero / Sponsors / Join bands */
    --sup27-card: #faf6f0;           /* sponsor card fill */
    --sup27-plum: var(--plum);       /* #47141f headings, names, card text */
    --sup27-clay: var(--clay);       /* #ba4a29 eyebrows, links, level labels */
    --sup27-ochre: var(--ochre);     /* #d68a1c sponsors / partners eyebrow */
    --sup27-ink: #2e2521;            /* join band paragraph */
    --sup27-serif: var(--font-accent);   /* Crimson Text */
    --sup27-mono: var(--font-label);     /* Inconsolata */
    --sup27-sans: var(--font-body);      /* Figtree */
    --sup27-content: 1120px;         /* Figma content column (1440 − 160×2) */
    --sup27-torn: clamp(40px, 6.6vw, 96px);
    color: var(--sup27-plum);
    overflow-x: clip;
}

/* ---- Shared type ------------------------------------------------------- */

.sup27-eyebrow {
    margin: 0 0 14px;
    font-family: var(--sup27-mono);
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--sup27-clay);
}
.sup27-eyebrow--ochre { color: var(--sup27-ochre); }
.sup27-eyebrow--bold  { font-weight: 800; }

.sup27-hero__title,
.sup27-h2 {
    margin: 0;
    font-family: var(--sup27-serif);
    font-weight: 600;
    font-size: clamp(34px, 3.4vw, 48px);
    line-height: 1.05;
    color: var(--sup27-plum);
}

.sup27-intro {
    max-width: 840px;
    margin: 24px auto 0;
    font-family: var(--sup27-sans);
    font-size: 16px;
    line-height: 26px;
    color: var(--sup27-plum);
}
.sup27-intro--wide   { max-width: 840px; }
.sup27-intro--narrow { max-width: 680px; }
.sup27-intro--join   { max-width: 820px; line-height: 25px; color: var(--sup27-ink); }
.sup27-intro p { margin: 0; }
.sup27-intro p + p { margin-top: 1.5em; }
.sup27-intro .sup27-intro__lead { line-height: 27px; }
.sup27-sponsors .sup27-intro,
.sup27-sponsors .sup27-intro--wide { max-width: 750px; }

.sup27-section-head { text-align: center; }

.sup27-textlink {
    font-family: var(--sup27-mono);
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--sup27-clay);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}
.sup27-textlink:hover,
.sup27-textlink:focus-visible { color: var(--clay-hover); }

/* ---- Bands --------------------------------------------------------------- */

.sup27-band {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: transparent;
}

/* The band colour is painted by ::after, starting below the torn strip, so a
   band can be pulled up over the one before it and still show that band
   through its ragged top edge. Collages sit between the colour and the text. */
.sup27-band::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.sup27-band--tan::after   { background: var(--sup27-tan); }
.sup27-band--cream::after { background: var(--sup27-cream); }

/* A collage layer clipped by the band's own torn top edge, so an accent can
   start up in the ragged zone and be cut by the tear (Figma: the partners
   notebook), while the band above still shows through the tear's gaps. */
.sup27-band__accent {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -2%;                           /* same box as the ::before torn strip */
    width: 104%;
    z-index: 2;                          /* over the torn strip (same level, later in paint order) */
    pointer-events: none;
    -webkit-mask-image: url("../img/supporters/torn-up-tan.png"), linear-gradient(#000, #000);
    mask-image: url("../img/supporters/torn-up-tan.png"), linear-gradient(#000, #000);
    -webkit-mask-size: 100% var(--sup27-torn), 100% calc(100% - var(--sup27-torn) + 1px);
    mask-size: 100% var(--sup27-torn), 100% calc(100% - var(--sup27-torn) + 1px);
    -webkit-mask-position: 0 0, 0 calc(var(--sup27-torn) - 1px);
    mask-position: 0 0, 0 calc(var(--sup27-torn) - 1px);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.sup27-band__inner {
    position: relative;
    z-index: 3;
    width: min(100% - (var(--space-page) * 2), var(--sup27-content));
    margin-inline: auto;
}

/* Torn-paper edges: the SVG path is a solid top with a ragged bottom. "Up"
   edges are flipped so the ragged side faces the band above. */
.sup27-band::before {
    content: "";
    position: absolute;
    top: 0;
    left: -2%;
    width: 104%;
    height: var(--sup27-torn);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}
.sup27-band--torn-up {
    margin-top: calc(-1 * var(--sup27-torn) * .5);
}
.sup27-band--torn-up::after {
    top: calc(var(--sup27-torn) * .5);
}
/* Figma "Torn Paper" (1440 x 96 at 1x, ragged edge on top), tinted to the
   band colour: torn-up-tan.png / torn-up-cream.png. No flip needed. */
.sup27-patrons::before  { background-image: url("../img/supporters/torn-up-tan.png"); }   /* up into the hero */
.sup27-sponsors::before { background-image: url("../img/supporters/torn-up-cream.png"); } /* up into patrons */
.sup27-partners::before { background-image: url("../img/supporters/torn-up-tan.png"); }   /* up into sponsors */
.sup27-join::before     { background-image: url("../img/supporters/torn-up-cream.png"); transform: scaleX(-1); } /* up into partners, mirrored */

/* ---- 1. Hero ------------------------------------------------------------- */

.sup27-hero {
    position: relative;
    isolation: isolate;
    padding: clamp(4.5rem, 9.5vw, 9rem) 0 clamp(5rem, 8.5vw, 7.5rem);
    text-align: center;
}
.sup27-hero__inner {
    position: relative;
    z-index: 2;
    width: min(100% - (var(--space-page) * 2), 900px);
    margin-inline: auto;
}
.sup27-hero__title { margin-bottom: 26px; }
.sup27-hero__lede {
    max-width: 640px;
    margin-inline: auto;
    font-family: var(--sup27-sans);
    font-size: 16px;
    line-height: 26px;
    color: var(--color-ink);
}
.sup27-hero__lede p { margin: 0; }
.sup27-hero__lede p + p { margin-top: 1em; }
.sup27-hero__anchors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px clamp(28px, 5vw, 72px);
    margin-top: clamp(40px, 5vw, 68px);
}
.sup27-hero__collage {
    /* Figma: flower-and-manuscript cutout 255 x 526, flush with the left edge,
       its top just above the H1. Opaque on its left side by design. */
    position: absolute;
    z-index: 1;
    left: 0;
    top: clamp(90px, 10.5vw, 150px);
    width: clamp(150px, 17.7vw, 255px);
    height: auto;
    pointer-events: none;
}

/* ---- 2. Patrons ------------------------------------------------------------ */

.sup27-patrons {
    padding: clamp(4rem, 7vw, 88px) 0 clamp(5rem, 9vw, 130px);
}
.sup27-patrons__collage {
    /* Figma "Collage Accent / Architecture / Lower Right": 960x1280 source
       cover-cropped into a 678x904 box, rotated -6.95deg, 12% opacity, box
       centre 1351px from the left and 400px above the band's bottom edge
       (250px of the box off the right, 52px below the band). */
    position: absolute;
    z-index: 1;
    right: max(-250px, -17.36vw);
    bottom: max(-52px, -3.6vw);
    width: min(678px, 47.08vw);
    height: min(904px, 62.78vw);
    overflow: hidden;
    transform: rotate(-6.95deg);
    opacity: .12;
    pointer-events: none;
}
.sup27-levels {
    display: flex;
    flex-direction: column;
    gap: 56px;
    margin-top: clamp(40px, 4vw, 54px);
}
.sup27-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}
.sup27-level__art {
    display: block;
    width: auto;
    max-width: 160px;
    height: auto;
    max-height: 125px;
    object-fit: contain;
}
.sup27-level__label {
    margin: 0;
    font-family: var(--sup27-mono);
    font-weight: 800;
    font-size: 22px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sup27-clay);
}
.sup27-level--1 .sup27-level__label { font-size: 28px; }
.sup27-level--2 .sup27-level__label { font-size: 26px; }
.sup27-level--3 .sup27-level__label { font-size: 24px; }
.sup27-level--4 .sup27-level__label { font-size: 23px; }
.sup27-level--5 .sup27-level__label { font-size: 22px; }
.sup27-level--6 .sup27-level__label { font-size: 20px; }

.sup27-names {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 5px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sup27-names--single { grid-template-columns: minmax(0, 1fr); }
.sup27-names__item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 45px;
    font-family: var(--sup27-serif);
    font-weight: 600;
    font-size: 22px;
    line-height: 1.35;
    color: var(--sup27-plum);
    text-wrap: balance;
}
.sup27-level--1 .sup27-names__item { font-size: 36px; }
.sup27-level--2 .sup27-names__item { font-size: 32px; }
.sup27-level--3 .sup27-names__item { font-size: 27px; }
.sup27-level--4 .sup27-names__item { font-size: 23px; }
.sup27-level--5 .sup27-names__item { font-size: 22px; }
.sup27-level--6 .sup27-names__item { font-size: 21px; }
.sup27-names__note {
    display: block;
    font-family: var(--sup27-sans);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    color: var(--plum-light);
}

/* ---- 3. Sponsors ----------------------------------------------------------- */

.sup27-sponsors {
    padding: clamp(5rem, 8vw, 104px) 0 clamp(5rem, 10vw, 150px);
}
.sup27-sponsors__collage {
    /* Figma "Collage Accent / Books / Right Edge": 1280x1080 source in a
       439x371 box, rotated 5deg, 28% opacity, 111px off the right edge, its
       bottom 18px above the band's bottom edge so the skyline sits in the
       ragged part of the next band's torn separator. */
    position: absolute;
    z-index: 1;
    right: max(-111px, -7.7vw);
    bottom: 18px;
    width: min(439px, 30.5vw);
    height: min(371px, 25.76vw);
    overflow: hidden;
    transform: rotate(5deg);
    opacity: .28;
    pointer-events: none;
}
.sup27-sponsor-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: clamp(48px, 6vw, 70px) 0 0;
    padding: 0;
    list-style: none;
}
.sup27-sponsor-card {
    width: 206px;
    min-height: 170px;
    background: var(--sup27-card);
    border: 1px solid rgba(71, 20, 31, .35);
    border-radius: 16px;
}
.sup27-sponsor-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    height: 100%;
    min-height: 168px;
    padding: 19px 16px 22px;
    color: inherit;
    text-decoration: none;
}
.sup27-sponsor-card__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 72px;
}
.sup27-sponsor-card__logo img {
    display: block;
    max-width: 118px;
    max-height: 64px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.sup27-sponsor-card--logo-large  .sup27-sponsor-card__logo img { max-height: 72px; max-width: 140px; }
.sup27-sponsor-card--logo-xlarge .sup27-sponsor-card__logo img { max-height: 72px; max-width: 174px; }
.sup27-sponsor-card__avatar,
.sup27-partner-card__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(71, 20, 31, .35);
    font-family: var(--sup27-serif);
    font-weight: 600;
    font-size: 24px;
    color: var(--sup27-plum);
}
.sup27-sponsor-card__name {
    display: block;
    font-family: var(--sup27-serif);
    font-weight: 600;
    font-size: 16px;
    line-height: 19px;
    text-align: center;
    color: var(--sup27-plum);
}
a.sup27-sponsor-card__body:hover .sup27-sponsor-card__name,
a.sup27-partner-card__body:hover .sup27-partner-card__name { text-decoration: underline; text-underline-offset: 3px; }

/* ---- 4. Partners ------------------------------------------------------------- */

.sup27-partners {
    padding: clamp(5rem, 9vw, 154px) 0 clamp(6rem, 11vw, 170px);
}
.sup27-partners__collage {
    /* Figma "Collage Accent / Literature / Upper Right": 1000x1280 source in a
       357x457 box, rotated 7deg, 28% opacity, 83px off the left edge, 7px
       above the band's top. */
    position: absolute;
    z-index: 1;
    left: calc(1.92% + max(-83px, -5.8vw));   /* 1.92% of the accent box = the 2% the box is shifted left */
    top: max(-27px, -1.9vw);
    width: min(357px, 24.8vw);
    height: min(457px, 31.74vw);
    overflow: hidden;
    transform: rotate(7deg);
    opacity: .28;
    pointer-events: none;
}
.sup27-patrons__collage img,
.sup27-sponsors__collage img,
.sup27-partners__collage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sup27-partner-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 49px;
    margin: clamp(48px, 6vw, 110px) 0 0;
    padding: 0;
    list-style: none;
}
.sup27-partner-card {
    min-height: 112px;
    background: var(--sup27-cream);
    border: 1px solid rgba(71, 20, 31, .28);
    border-radius: 16px;
}
.sup27-partner-card__body {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    min-height: 110px;
    padding: 12px 20px 12px 11px;
    color: inherit;
    text-decoration: none;
}
.sup27-partner-card__logo {
    display: flex;
    flex: 0 0 64px;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 60px;
}
.sup27-partner-card__logo img {
    display: block;
    max-width: 64px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.sup27-partner-card--logo-large  .sup27-partner-card__logo { flex-basis: 80px; width: 80px; }
.sup27-partner-card--logo-large  .sup27-partner-card__logo img { max-width: 80px; max-height: 70px; }
.sup27-partner-card--logo-xlarge .sup27-partner-card__logo { flex-basis: 96px; width: 96px; }
.sup27-partner-card--logo-xlarge .sup27-partner-card__logo img { max-width: 96px; max-height: 84px; }
.sup27-partner-card__avatar { width: 44px; height: 44px; font-size: 20px; }
.sup27-partner-card__name {
    display: block;
    flex: 1 1 auto;
    font-family: var(--sup27-serif);
    font-weight: 600;
    font-size: 16px;
    line-height: 19px;
    color: var(--sup27-plum);
}

/* ---- 5. Every Story Should Be Heard ------------------------------------------ */

.sup27-join {
    padding: clamp(4rem, 6vw, 92px) 0 clamp(3.5rem, 5vw, 58px);
    min-height: 460px;
}
.sup27-join .sup27-band__inner { width: min(100% - (var(--space-page) * 2), 900px); }
.sup27-join .sup27-h2 { color: #47151e; font-size: clamp(34px, 3.4vw, 48px); line-height: 52px; }
.sup27-join .sup27-intro { margin-top: 22px; }
.sup27-join__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 44px;
}
.sup27-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 192px;
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 4px;
    font-family: var(--sup27-mono);
    font-weight: 800;
    font-size: 13px;
    line-height: 18px;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    color: var(--sup27-cream);
    transition: background-color .15s ease;
}
.sup27-button--plum { background: #47151e; }
.sup27-button--plum:hover, .sup27-button--plum:focus-visible { background: var(--plum-dark); color: var(--sup27-cream); }
.sup27-button--clay { background: var(--sup27-clay); }
.sup27-button--clay:hover, .sup27-button--clay:focus-visible { background: var(--clay-hover); color: var(--sup27-cream); }
.sup27-join__collage {
    position: absolute;
    z-index: 2;                          /* over the torn strip, under the text */
    height: auto;
    pointer-events: none;
}
/* Figma at 1440: left cutout 265 x 621 flush with the page edge, its hummingbird
   up in the torn strip over the partners band; right cutout 242 x 433 at
   x = 1198, flush with the right edge, its bottom on the next band's torn edge. */
.sup27-join__collage--left {
    left: 0;
    top: 0;
    width: min(18.4vw, 265px);
}
.sup27-join__collage--right {
    right: 0;
    top: clamp(48px, 7vw, 96px);
    width: min(16.8vw, 242px);
}

/* The site-wide "Join the Global Institute Community" band that follows has a
   torn top edge; a plain cream run-in under it stops a texture strip showing. */
.sup27-join {
    padding-bottom: calc(clamp(3.5rem, 5vw, 58px) + 64px);
    margin-bottom: -64px;
}
.sup27-join::after { bottom: 0; }

/* ---- Responsive -------------------------------------------------------------- */

@media (max-width: 1100px) {
    .sup27-partner-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
}

@media (max-width: 900px) {
    .sup27-hero__collage { top: auto; bottom: -20%; width: 160px; opacity: .9; }
    .sup27-join__collage--left { width: 150px; }
    .sup27-join__collage--right { width: 130px; top: 40px; }
    .sup27-sponsors__collage, .sup27-partners__collage, .sup27-patrons__collage { display: none; }
}

@media (max-width: 640px) {
    .sup27-names { grid-template-columns: minmax(0, 1fr); }
    .sup27-level--1 .sup27-names__item { font-size: 30px; }
    .sup27-level--2 .sup27-names__item { font-size: 27px; }
    .sup27-level--3 .sup27-names__item { font-size: 24px; }
    .sup27-level--4 .sup27-names__item,
    .sup27-level--5 .sup27-names__item,
    .sup27-level--6 .sup27-names__item { font-size: 21px; }
    .sup27-level__label { font-size: 20px !important; }
    .sup27-partner-cards { grid-template-columns: minmax(0, 1fr); }
    .sup27-sponsor-card { width: calc(50% - 5px); }
    .sup27-hero__collage { display: none; }
    .sup27-join__collage { display: none; }
    .sup27-button { width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
    .sup27 { scroll-behavior: smooth; }
}

/* ---- Shortcode embeds ([smgli_section name="sup27_…"] in Elementor) ---------- */
/* Spacing around the lists belongs to the Elementor containers. */
.sup27-embed .sup27-levels,
.sup27-embed .sup27-sponsor-cards,
.sup27-embed .sup27-partner-cards { margin-top: 0; }
.sup27-embed { width: 100%; }
