/* ===== School hero (cover-backed layout) ===== */

.school-hero {
    --hero-accent: #0f6cbf;
    --hero-text: #152033;
    --hero-accent-line: #f5c518;
    --school-hero-radius: 1.5rem;
    position: relative;
    margin-bottom: 1.25rem;
}

.school-hero--public {
    padding: 1.5rem 0 2.25rem;
    background: #eef3f8;
}

.school-hero-back-wrap { margin-bottom: 0.85rem; }
.school-hero-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
}
.school-hero-back:hover { color: var(--primary); text-decoration: none; }

.school-hero-panel {
    position: relative;
    overflow: hidden;
    border-radius: var(--school-hero-radius);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.school-hero-media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 36%;
    background-image: var(--hero-cover);
    background-size: cover;
    background-position: center center;
    z-index: 0;
}
.school-hero-media::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        #fff 0%,
        rgba(255, 255, 255, 0.92) 8%,
        rgba(255, 255, 255, 0.35) 28%,
        transparent 48%
    );
    z-index: 1;
    pointer-events: none;
}
.school-hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(255, 255, 255, 0.2) 35%,
            rgba(8, 40, 78, 0.12) 100%);
    z-index: 2;
}

.school-hero-swoosh {
    position: absolute;
    right: -8%;
    top: -20%;
    width: min(52%, 28rem);
    height: 140%;
    background:
        radial-gradient(ellipse 80% 55% at 70% 40%, rgba(15, 108, 191, 0.55), transparent 70%),
        radial-gradient(ellipse 70% 50% at 90% 70%, rgba(6, 50, 100, 0.65), transparent 68%);
    clip-path: ellipse(70% 55% at 75% 45%);
    z-index: 1;
    pointer-events: none;
}

.school-hero-dots {
    position: absolute;
    top: 1.1rem;
    right: 1.25rem;
    width: 4.5rem;
    height: 3rem;
    z-index: 2;
    opacity: 0.55;
    background-image: radial-gradient(circle, rgba(180, 210, 240, 0.95) 1.5px, transparent 2px);
    background-size: 0.7rem 0.7rem;
    pointer-events: none;
}

.school-hero-grid {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(11rem, 0.85fr);
    grid-template-areas:
        "copy visual"
        "signin visual";
    gap: 1rem 1.75rem;
    align-items: center;
    padding: clamp(1.35rem, 3vw, 2.15rem) clamp(1.25rem, 3vw, 2.15rem) 1.15rem;
}
.school-hero-visual { grid-area: visual; }
.school-hero-copy { grid-area: copy; min-width: 0; }
.school-hero-signin { grid-area: signin; }

.school-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hero-accent);
    background: color-mix(in srgb, var(--hero-accent) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--hero-accent) 18%, transparent);
}
.school-hero-kicker i { font-size: 0.75rem; }

.school-hero-name {
    position: relative;
    margin: 0;
    padding-bottom: 0.55rem;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--hero-text);
}
.school-hero-name::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 3.25rem;
    height: 3px;
    border-radius: 999px;
    background: var(--hero-accent-line);
}

.school-hero-tagline {
    margin: 0.75rem 0 0;
    color: var(--hero-accent);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
}

.school-hero-about {
    margin: 0.75rem 0 0;
    color: color-mix(in srgb, var(--hero-text) 68%, transparent);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 34rem;
}

.school-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}
.school-hero-meta li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hero-accent) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--hero-accent) 18%, transparent);
    color: var(--hero-text);
    font-size: 0.78rem;
    font-weight: 600;
}
.school-hero-meta i { color: var(--hero-accent); font-size: 0.7rem; }

.school-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.15rem;
}
.school-hero--continue .school-hero-actions--desktop { display: none; }
.school-hero--public .school-hero-actions--desktop { display: none; }

.school-hero-btn-primary {
    background: var(--hero-accent) !important;
    border-color: var(--hero-accent) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--hero-accent) 32%, transparent);
}
.school-hero-btn-primary:hover { filter: brightness(1.05); }

.school-hero-btn-ghost {
    background: #fff !important;
    border: 2px solid color-mix(in srgb, var(--hero-accent) 35%, transparent) !important;
    color: var(--hero-accent) !important;
}

.school-hero-signin {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    width: 100%;
    max-width: 24rem;
    margin-top: 0.25rem;
    padding: 1.15rem 1.2rem 1.1rem;
    border-radius: 1.15rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}
.school-hero-signin-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    text-align: left;
}
.school-hero-signin-icon {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--hero-accent) 12%, #fff);
    color: var(--hero-accent);
    font-size: 0.95rem;
}
.school-hero-signin-copy h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hero-text);
}
.school-hero-signin-copy p {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--hero-text) 62%, transparent);
}
.school-hero-signin-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
}
.school-hero-signin-btn {
    width: 100%;
    min-height: 3rem;
    justify-content: center;
    font-weight: 700;
    border-radius: 0.8rem;
}
.school-hero-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hero-accent);
    text-decoration: none;
}
.school-hero-page-link:hover { text-decoration: underline; }
.school-hero-page-link--mobile-only { display: none; }

.school-hero-visual {
    position: relative;
    justify-self: center;
    width: min(100%, 17rem);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}
.school-hero-logo-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.school-hero-logo-ring--outer {
    inset: -6%;
    border: 1.5px dashed color-mix(in srgb, var(--hero-accent) 28%, #fff);
    opacity: 0.9;
}
.school-hero-logo-ring--mid {
    inset: -2%;
    border: 2px solid color-mix(in srgb, var(--hero-accent) 18%, #fff);
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--hero-accent) 6%, transparent),
        inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}
.school-hero-logo-glow {
    position: absolute;
    inset: -10%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        color-mix(in srgb, var(--hero-accent) 22%, transparent) 0%,
        transparent 68%
    );
    z-index: 0;
    pointer-events: none;
}
.school-hero-logo-dots {
    position: absolute;
    inset: -12%;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, color-mix(in srgb, var(--hero-accent) 55%, #fff) 1.4px, transparent 1.8px);
    background-size: 0.7rem 0.7rem;
    background-position: center;
    -webkit-mask-image: radial-gradient(circle, transparent 58%, #000 62%, #000 86%, transparent 92%);
    mask-image: radial-gradient(circle, transparent 58%, #000 62%, #000 86%, transparent 92%);
    opacity: 0.7;
}
.school-hero-logo-accent {
    position: absolute;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}
.school-hero-logo-accent--a {
    width: 0.7rem;
    height: 0.7rem;
    top: 4%;
    right: 6%;
    background: var(--hero-accent-line);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hero-accent-line) 28%, transparent);
}
.school-hero-logo-accent--b {
    width: 0.45rem;
    height: 0.45rem;
    bottom: 8%;
    left: 4%;
    background: var(--hero-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hero-accent) 22%, transparent);
}
.school-hero-logo {
    position: relative;
    z-index: 1;
    width: 86%;
    height: 86%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, var(--hero-accent), #095396);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}
.school-hero-logo.school-avatar--image {
    background: #fff;
    padding: 1.1rem;
}
.school-hero-logo .school-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.school-hero-features {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(6px);
}
.school-hero-features li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.1rem 1.15rem;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
}
.school-hero-features li:last-child { border-right: 0; }
.school-hero-features i {
    width: 1.85rem;
    height: 1.85rem;
    margin-bottom: 0.35rem;
    border-radius: 0.55rem;
    display: grid;
    place-items: center;
    color: var(--hero-accent);
    border: 1.5px solid color-mix(in srgb, var(--hero-accent) 35%, transparent);
    font-size: 0.8rem;
}
.school-hero-features strong {
    font-size: 0.875rem;
    color: var(--hero-text);
}
.school-hero-features span {
    font-size: 0.75rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--hero-text) 60%, transparent);
}

/* Preview editor chrome */
.school-hero-editor-preview-frame {
    border-radius: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
    background: #eceff3;
    transition: max-width 0.25s ease;
}
.school-hero-editor-preview-frame.is-desktop { max-width: 100%; }
.school-hero-editor-preview-frame.is-mobile {
    max-width: 390px;
    margin-inline: auto;
}
.school-hero-editor-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.school-hero-editor-mode { display: inline-flex; gap: 0.35rem; }
.school-hero-slot-card {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}
.school-hero-slot-card img {
    width: 9rem;
    height: 9rem;
    object-fit: cover;
    border-radius: 0.85rem;
    border: 1px solid var(--border);
    background: #f4f6f8;
}

/* Mobile — matches landing continue UI (logo left, copy right, sign-in below) */
@media (max-width: 900px) {
    .school-hero-swoosh,
    .school-hero-dots,
    .school-hero-features { display: none; }
    .school-hero-media {
        left: 0;
        filter: grayscale(0.35) saturate(0.75);
        opacity: 0.55;
    }
    .school-hero-media::before { display: none; }
    .school-hero-media::after {
        background: linear-gradient(
            180deg,
            rgba(244, 247, 251, 0.88) 0%,
            rgba(244, 247, 251, 0.94) 55%,
            rgba(244, 247, 251, 0.98) 100%
        );
    }
    .school-hero-panel {
        background: #f4f7fb;
    }
    .school-hero-grid {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "visual copy"
            "signin signin";
        align-items: start;
        text-align: left;
        gap: 0.75rem 0.9rem;
        padding: 1.1rem 1rem 1.15rem;
    }
    .school-hero-visual {
        width: 5.75rem;
        justify-self: start;
        align-self: center;
    }
    .school-hero-logo {
        width: 88%;
        height: 88%;
    }
    .school-hero-logo.school-avatar--image { padding: 0.55rem; }
    .school-hero-logo-ring--outer { inset: -7%; }
    .school-hero-logo-ring--mid { inset: -2.5%; }
    .school-hero-logo-dots { inset: -14%; background-size: 0.55rem 0.55rem; opacity: 0.55; }
    .school-hero-logo-accent--a { width: 0.5rem; height: 0.5rem; top: 2%; right: 4%; box-shadow: 0 0 0 2px color-mix(in srgb, var(--hero-accent-line) 28%, transparent); }
    .school-hero-logo-accent--b { width: 0.35rem; height: 0.35rem; bottom: 4%; left: 2%; }
    .school-hero-kicker {
        margin-bottom: 0.25rem;
        font-size: 0.5625rem;
        padding: 0.2rem 0.45rem;
        letter-spacing: 0.06em;
        max-width: 100%;
        white-space: nowrap;
    }
    .school-hero-kicker i { font-size: 0.6rem; }
    .school-hero-name {
        font-size: 1.15rem;
        line-height: 1.2;
        padding-bottom: 0.35rem;
    }
    .school-hero-name::after {
        left: 0;
        transform: none;
        width: 2.25rem;
    }
    .school-hero-tagline { display: none; }
    .school-hero-about {
        display: block;
        margin-top: 0.4rem;
        font-size: 0.8125rem;
        line-height: 1.45;
        max-width: none;
    }
    .school-hero-meta { display: none; }
    .school-hero-actions--desktop { display: none; }
    .school-hero-signin {
        max-width: none;
        margin-top: 0.15rem;
        gap: 0.7rem;
        padding: 0.95rem 1rem;
        align-items: stretch;
        text-align: left;
    }
    .school-hero-signin-head {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        text-align: left;
        gap: 0.75rem;
    }
    .school-hero-signin-icon {
        width: 2.35rem;
        height: 2.35rem;
    }
    .school-hero-signin-copy h3 { font-size: 1rem; }
    .school-hero-signin-copy p { display: none; }
    .school-hero-page-link--mobile-only { display: inline-flex; }
}

/* Editor forced-mobile preview mirrors real mobile UI */
.school-hero--preview.school-hero--force-mobile .school-hero-swoosh,
.school-hero--preview.school-hero--force-mobile .school-hero-dots,
.school-hero--preview.school-hero--force-mobile .school-hero-features { display: none; }
.school-hero--preview.school-hero--force-mobile .school-hero-media {
    left: 0;
    filter: grayscale(0.35) saturate(0.75);
    opacity: 0.55;
}
.school-hero--preview.school-hero--force-mobile .school-hero-media::before { display: none; }
.school-hero--preview.school-hero--force-mobile .school-hero-media::after {
    background: linear-gradient(
        180deg,
        rgba(244, 247, 251, 0.88) 0%,
        rgba(244, 247, 251, 0.94) 55%,
        rgba(244, 247, 251, 0.98) 100%
    );
}
.school-hero--preview.school-hero--force-mobile .school-hero-panel {
    background: #f4f7fb;
}
.school-hero--preview.school-hero--force-mobile .school-hero-grid {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "visual copy"
        "signin signin";
    align-items: start;
    text-align: left;
    gap: 0.75rem 0.9rem;
    padding: 1.1rem 1rem 1.15rem;
}
.school-hero--preview.school-hero--force-mobile .school-hero-visual {
    width: 5.75rem;
    justify-self: start;
    align-self: center;
}
.school-hero--preview.school-hero--force-mobile .school-hero-logo {
    width: 88%;
    height: 88%;
}
.school-hero--preview.school-hero--force-mobile .school-hero-logo.school-avatar--image { padding: 0.55rem; }
.school-hero--preview.school-hero--force-mobile .school-hero-kicker {
    margin-bottom: 0.25rem;
    font-size: 0.5625rem;
    padding: 0.2rem 0.45rem;
    letter-spacing: 0.06em;
}
.school-hero--preview.school-hero--force-mobile .school-hero-kicker i { font-size: 0.6rem; }
.school-hero--preview.school-hero--force-mobile .school-hero-name {
    font-size: 1.15rem;
    line-height: 1.2;
    padding-bottom: 0.35rem;
}
.school-hero--preview.school-hero--force-mobile .school-hero-name::after {
    left: 0;
    transform: none;
    width: 2.25rem;
}
.school-hero--preview.school-hero--force-mobile .school-hero-tagline,
.school-hero--preview.school-hero--force-mobile .school-hero-meta,
.school-hero--preview.school-hero--force-mobile .school-hero-signin-copy p { display: none; }
.school-hero--preview.school-hero--force-mobile .school-hero-about {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    max-width: none;
}
.school-hero--preview.school-hero--force-mobile .school-hero-signin {
    max-width: none;
    margin-top: 0.15rem;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    text-align: left;
}
.school-hero--preview.school-hero--force-mobile .school-hero-signin-head {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
}
.school-hero--preview.school-hero--force-mobile .school-hero-page-link--mobile-only { display: inline-flex; }

.school-hero--preview.school-hero--force-desktop .school-hero-signin { display: flex; }
.school-hero--preview.school-hero--force-desktop .school-hero-media {
    left: 36%;
    filter: none;
    opacity: 1;
}
.school-hero--preview.school-hero--force-desktop .school-hero-media::before { display: block; }

@media (prefers-reduced-motion: reduce) {
    .school-hero-logo { transition: none; }
}
