/* ============================================================
   op-partners-page.css — Partners page, redesigned to match the
   homepage "Official OpenAI Partner" section's visual language.
   Prefixed ".op-" throughout (same convention as
   assets/css/openai-partner.css, which this page also loads and reuses
   directly for shared primitives: .op-btn, .op-chip, .op-card,
   .op-blob/.op-orbit, .op-eyebrow, .op-grad-text, .op-stats, etc.)
   Scope: rendered only on the /partners page, inside #op-partners-page.
   ============================================================ */

#op-partners-page {
    /* CHANGED (new): same --op-* palette as the homepage section,
       redeclared here so page-level sections outside .op-section (the
       featured OpenAI partial) can still use the variables. */
    --op-bg: #060A14;
    --op-bg-2: #0A1020;
    --op-blue: #3858D6;
    --op-cyan: #22D3EE;
    --op-violet: #8B5CF6;
    --op-grad: linear-gradient(95deg, var(--op-blue), var(--op-violet) 55%, var(--op-cyan) 105%);
    --op-fg: #F2F5FF;
    --op-fg-muted: #A6B0D6;
    --op-glass: rgba(255, 255, 255, .05);
    --op-glass-brd: rgba(255, 255, 255, .14);

    background: var(--op-bg);
    color: var(--op-fg);
}

/* ============================================================
   1. HERO
   ============================================================ */
.op-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(80px, 10vw, 140px) 0 clamp(64px, 8vw, 100px) !important;
    background: var(--op-bg) !important;
}

html:not([data-theme="dark"]) .op-hero {
    background: linear-gradient(180deg, #0B1020, #060A14) !important;
}

.op-hero__wrap {
    position: relative;
    z-index: 1;
    width: min(1240px, 100% - 2.75rem);
    margin-inline: auto;
    text-align: center;
}

/* dotted grid + radial fade background, same technique as the homepage
   section's .op-bg */
.op-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.op-hero__grid {
    position: absolute;
    inset: -10%;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(60% 55% at 50% 35%, #000 0%, transparent 75%);
    mask-image: radial-gradient(60% 55% at 50% 35%, #000 0%, transparent 75%);
    opacity: .5;
}

/* 3 blurred colored squares + 2 rotating outlined squares behind the
   hero visual — same primitives as the homepage OpenAI section
   (.op-blob / .op-orbit from openai-partner.css), just recentered here
   via a local positioning context. */
.op-hero__shapes {
    position: absolute;
    top: 38%;
    left: 50%;
    width: 1px;
    height: 1px;
    z-index: 0;
}

.op-hero__title {
    font-family: var(--da-display, 'Space Grotesk', 'Inter', system-ui, sans-serif);
    font-weight: 800;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 auto 1.25rem;
    max-width: 16ch;
}

/* Specificity fix (see memory: css-specificity-wars) — main.css's global
   h1/h2 color !important chain otherwise wins over a plain class. Same
   double-id technique used on the homepage section. */
/* FIXED: css/style.css ships a sitewide
   `h1,h2,h3{font-weight:500!important;font-size:22px!important}` rule that
   silently caps every plain-class heading to 22px (same bug found and
   fixed on the homepage's OpenAI section — see openai-partner.css). Must
   counter font-size/font-weight here too, not just color. */
#op-partners-page #op-hero-title.op-hero__title,
html:not([data-theme="dark"]) #op-partners-page #op-hero-title.op-hero__title,
html[data-theme="dark"] #op-partners-page #op-hero-title.op-hero__title,
[data-theme="dark"] #op-partners-page #op-hero-title.op-hero__title {
    color: var(--op-fg) !important;
    font-size: clamp(2.4rem, 5vw, 4rem) !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
}

.op-hero__body {
    font-size: clamp(1.05rem, 1.1vw, 1.15rem);
    line-height: 1.7;
    max-width: 52ch;
    margin: 0 auto 2.75rem;
}

#op-partners-page #op-hero-body.op-hero__body,
html:not([data-theme="dark"]) #op-partners-page #op-hero-body.op-hero__body,
html[data-theme="dark"] #op-partners-page #op-hero-body.op-hero__body,
[data-theme="dark"] #op-partners-page #op-hero-body.op-hero__body {
    color: rgba(255, 255, 255, .68) !important;
}

/* 3-column stat grid with dividers — mirrors .op-stats from the homepage
   section but centered for the hero context */
.op-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 560px;
    margin: 0 auto;
}

.op-hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: 0 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, .1);
}

.op-hero__stat:first-child {
    border-left: none;
}

.op-hero__stat-num {
    font-family: var(--da-display, 'Space Grotesk', sans-serif);
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 700;
    background: var(--op-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.op-hero__stat-label {
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--op-fg-muted);
}

@media (max-width: 480px) {
    .op-hero__stats {
        max-width: 100%;
    }

    .op-hero__stat {
        padding: 0 .6rem;
    }
}

/* ============================================================
   2. FEATURED PARTNER (the homepage's #da-openai-partner partial,
      embedded verbatim below — no page-specific CSS needed here,
      it's fully styled by assets/css/openai-partner.css already).
   ============================================================ */

/* ============================================================
   3. PARTNER GRID
   ============================================================ */
.op-grid-section {
    position: relative;
    padding: clamp(64px, 8vw, 110px) 0 !important;
    background: var(--op-bg) !important;
}

html:not([data-theme="dark"]) .op-grid-section {
    background: linear-gradient(180deg, #060A14, #0B1020) !important;
}

.op-grid-section__wrap {
    width: min(1240px, 100% - 2.75rem);
    margin-inline: auto;
    /* CHANGED: 120px right clearance on desktop so the grid never sits
       under the fixed chatbot/cert-badge stack. */
    padding-right: 120px;
}

@media (max-width: 1023px) {
    .op-grid-section__wrap {
        padding-right: 0;
    }
}

.op-grid-section__head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.op-grid-section__head .op-eyebrow {
    justify-content: center;
}

.op-grid-section__title {
    font-family: var(--da-display, 'Space Grotesk', 'Inter', system-ui, sans-serif);
    font-weight: 800;
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 1rem;
}

/* FIXED: same sitewide 22px h1/h2/h3 trap as .op-hero__title above. */
#op-partners-page #op-grid-title.op-grid-section__title,
html:not([data-theme="dark"]) #op-partners-page #op-grid-title.op-grid-section__title,
html[data-theme="dark"] #op-partners-page #op-grid-title.op-grid-section__title,
[data-theme="dark"] #op-partners-page #op-grid-title.op-grid-section__title {
    color: var(--op-fg) !important;
    font-size: clamp(1.9rem, 3.2vw, 2.6rem) !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
}

.op-grid-section__sub {
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0;
}

#op-partners-page #op-grid-sub.op-grid-section__sub,
html:not([data-theme="dark"]) #op-partners-page #op-grid-sub.op-grid-section__sub,
html[data-theme="dark"] #op-partners-page #op-grid-sub.op-grid-section__sub,
[data-theme="dark"] #op-partners-page #op-grid-sub.op-grid-section__sub {
    color: rgba(255, 255, 255, .68) !important;
}

/* responsive grid: 3 desktop / 2 tablet / 1 mobile */
.op-partner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 1023px) {
    .op-partner-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .op-partner-grid {
        grid-template-columns: 1fr;
    }
}

/* glass card, same recipe as the homepage's .op-card__inner */
.op-partner-card {
    position: relative;
    background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
    border: 1px solid transparent;
    border-radius: 28px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 30px 80px rgba(80, 90, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .1);
    padding: 2rem;
    text-align: center;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
    will-change: transform;
}

.op-partner-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(56, 88, 214, .5), rgba(139, 92, 246, .3), rgba(34, 211, 238, .4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: .6;
    transition: opacity .35s ease;
}

/* hover: lift, glow border, slight tilt */
.op-partner-card:hover {
    transform: translateY(-6px) rotate(-0.6deg);
    box-shadow: 0 40px 90px rgba(80, 90, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.op-partner-card:hover::before {
    opacity: 1;
}

/* logo seated in a rounded light container so any-color logos stay legible
   on the dark card, same idea as the homepage's .op-badge-plate */
.op-partner-card__logo {
    background: #fff;
    border-radius: 16px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}

.op-partner-card__logo img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
}

.op-partner-card__name {
    font-family: var(--da-display, 'Space Grotesk', sans-serif);
    margin: 0 0 .6rem;
}

/* FIXED: same sitewide 22px h1/h2/h3 trap as the section headings above —
   this is an <h3>, so it needs the same !important counter. One ID
   wasn't enough: main.css's h1-h6 chain also carries one ID (from its
   :not(#sticky-cta-bar *) clause) PLUS ~11 classes from its other
   :not() exclusions, which out-specifies a single-ID selector at the
   class tier even with equal ID count. Adding the page wrapper's id
   (#op-partners-page) as a second ID tips it back in our favor, same
   fix pattern used for the homepage's #op-title/#op-body. */
#op-partners-page #op-card-name-1.op-partner-card__name,
#op-partners-page #op-card-name-2.op-partner-card__name,
#op-partners-page #op-card-name-3.op-partner-card__name {
    color: var(--op-fg) !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
}

.op-partner-card__desc {
    font-size: .92rem;
    line-height: 1.6;
    margin: 0;
}

/* FIXED: this <p> is also caught by main.css's light-mode
   `p:not(...)::{color:#3D486B!important}` chain (see memory:
   css-specificity-wars) — same two-ID fix as the card headings above. */
#op-partners-page #op-card-desc-1.op-partner-card__desc,
#op-partners-page #op-card-desc-2.op-partner-card__desc,
#op-partners-page #op-card-desc-3.op-partner-card__desc {
    color: var(--op-fg-muted) !important;
}

.op-partner-card__link {
    display: inline-block;
    margin-top: 1rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--op-cyan);
    text-decoration: none;
    border-radius: 6px;
}

.op-partner-card__link:hover {
    text-decoration: underline;
}

.op-partner-card__link:focus-visible {
    outline: 2px solid var(--op-cyan);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .op-partner-card:hover {
        transform: none;
    }
}

/* ============================================================
   REMOVED: logo marquee/slider section (.op-marquee-section and
   friends) — was here between the partner grid and the CTA band.
   ============================================================ */

/* ============================================================
   5. CTA BAND
   ============================================================ */
.op-cta-band {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(56px, 7vw, 90px) 0 !important;
    background: var(--op-bg) !important;
}

html:not([data-theme="dark"]) .op-cta-band {
    background: linear-gradient(180deg, #0B1020, #060A14) !important;
}

.op-cta-band__glass {
    position: relative;
    z-index: 1;
    width: min(980px, 100% - 2.75rem);
    margin-inline: auto;
    text-align: center;
    background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
    border: 1px solid transparent;
    border-radius: 28px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 30px 80px rgba(80, 90, 255, .25), inset 0 1px 0 rgba(255, 255, 255, .12);
    padding: clamp(2.5rem, 5vw, 4rem);
}

.op-cta-band__glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(56, 88, 214, .6), rgba(139, 92, 246, .35), rgba(34, 211, 238, .5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.op-cta-band__title {
    font-family: var(--da-display, 'Space Grotesk', 'Inter', system-ui, sans-serif);
    font-weight: 800;
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    line-height: 1.15;
    margin: 0 0 1rem;
}

/* FIXED: same sitewide 22px h1/h2/h3 trap as .op-hero__title above. */
#op-partners-page #op-cta-title.op-cta-band__title,
html:not([data-theme="dark"]) #op-partners-page #op-cta-title.op-cta-band__title,
html[data-theme="dark"] #op-partners-page #op-cta-title.op-cta-band__title,
[data-theme="dark"] #op-partners-page #op-cta-title.op-cta-band__title {
    color: var(--op-fg) !important;
    font-size: clamp(1.9rem, 3.4vw, 2.6rem) !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
}

.op-cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 2rem;
}

@media (max-width: 480px) {
    .op-cta-band__actions {
        flex-direction: column;
    }

    .op-cta-band__actions .op-btn {
        width: 100%;
    }
}

/* ============================================================
   Scroll reveal (shared IntersectionObserver hook, see
   assets/js/op-partners-page.js) — reuses the [data-op-reveal]/.op-in
   convention from the homepage section.
   ============================================================ */
#op-partners-page [data-op-reveal] {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity .7s ease, transform .7s ease;
    transition-delay: var(--dly, 0s);
}

#op-partners-page [data-op-reveal].op-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
    #op-partners-page [data-op-reveal] {
        transition-duration: .01ms;
    }
}
