/* Shared visual system for public Alfa Chess pages. The pages keep their content and structure. */
:root {
    --school-paper: #faf9f6;
    --school-surface: #ffffff;
    --school-raised: #f2f0eb;
    --school-ink: #10243f;
    --school-text: #172033;
    --school-muted: #596579;
    --school-amber: #d6b565;
    --school-blue: #2457c5;
    --school-line: rgba(16, 36, 63, .12);
    --school-radius-button: 999px;
    --school-radius-input: 22px;
    --school-radius-card: 32px;
    --school-radius-panel: 40px;
    --school-focus: #2457c5;
    --school-ease: cubic-bezier(.22, 1, .36, 1);
}

body.school-site {
    --font-main: "Medeo Sans", Arial, sans-serif;
    --font: var(--font-main);
    min-width: 0;
    color: var(--school-text);
    background-color: var(--school-paper);
    font-family: var(--font-main) !important;
    font-optical-sizing: auto;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.school-site :is(button, input, select, textarea) {
    font-family: var(--font-main) !important;
}

body.school-site :is(h1, h2, h3, h4, h5, h6) {
    color: var(--school-ink);
    font-family: inherit;
    font-weight: 600 !important;
    letter-spacing: 0;
    line-height: 1.2;
}

body.school-site :is(p, li) {
    text-wrap: pretty;
}

body.school-site a {
    text-underline-offset: .18em;
}

body.school-site :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--school-focus) !important;
    outline-offset: 3px !important;
    box-shadow: none !important;
}

/* Quiet shared header; active state is a small neutral surface, not a color stripe. */
body.school-site .header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--school-line) !important;
    border-radius: 0 !important;
    background: rgba(250, 249, 246, .98) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    font-family: inherit !important;
}

body.school-site .header > .container {
    box-sizing: border-box !important;
    width: min(1280px, calc(100% - 64px)) !important;
    max-width: none !important;
    height: 72px !important;
    margin-inline: auto !important;
    padding-inline: 16px !important;
}

body.school-site .header .nav {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 72px !important;
    gap: 20px !important;
}

body.school-site .header .logo {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    gap: 12px !important;
    color: var(--school-ink) !important;
    font-family: inherit !important;
    text-decoration: none !important;
}

body.school-site .header .logo svg,
body.school-site .header .logo .logo-icon {
    width: 39px !important;
    height: 44px !important;
    flex: 0 0 39px !important;
    object-fit: contain !important;
}

body.school-site .logo .logo-icon {
    display: block !important;
    width: 39px !important;
    height: 44px !important;
    flex: 0 0 39px !important;
    object-fit: contain !important;
}

body.school-site .logo .logo-wordmark {
    display: block !important;
    width: clamp(120px, 10.5vw, 150px) !important;
    height: auto !important;
    max-width: min(150px, 42vw) !important;
    flex: 0 1 auto !important;
    object-fit: contain !important;
}

body.school-site :is(.footer, .success-footer) .logo .logo-wordmark {
    padding: 0;
    border-radius: 0;
    background: transparent;
}

body.school-site :is(.footer, .success-footer) .logo {
    display: inline-flex !important;
    width: fit-content !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    background: #fff !important;
}

body.school-site .header .logo-text {
    color: var(--school-ink) !important;
    font-family: inherit !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
}

body.school-site .header .nav-links {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
}

body.school-site .header .nav-links a,
body.school-site .header .nav-mobile-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    padding: 8px 14px !important;
    border-radius: var(--school-radius-button) !important;
    color: var(--school-text) !important;
    background: transparent !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 20px !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    transition: color 160ms ease, background-color 160ms ease !important;
}

body.school-site .header .nav-links a::after {
    display: none !important;
}

body.school-site .header .nav-links a:hover,
body.school-site .header .nav-links a.active,
body.school-site .header .nav-mobile-links a:hover,
body.school-site .header .nav-mobile-links a[aria-current="page"] {
    color: var(--school-ink) !important;
    background: var(--school-raised) !important;
}

body.school-site .header .header-actions {
    display: flex !important;
    align-items: center !important;
}

body.school-site .header .header-cta.btn-primary {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 20px !important;
    border: 1px solid var(--school-blue) !important;
    border-radius: var(--school-radius-button) !important;
    color: #fff !important;
    background: var(--school-blue) !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 20px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
}

body.school-site .hamburger {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    padding: 8px !important;
    border: 1px solid transparent !important;
    border-radius: var(--school-radius-button) !important;
    background: transparent !important;
    transition: background-color 160ms ease, border-color 160ms ease !important;
}

body.school-site .hamburger:hover,
body.school-site .hamburger[aria-expanded="true"] {
    border-color: var(--school-line) !important;
    background: var(--school-raised) !important;
}

body.school-site .hamburger span {
    background: var(--school-ink) !important;
}

body.school-site .nav-mobile {
    border-top: 1px solid var(--school-line) !important;
    background: var(--school-paper) !important;
    box-shadow: none !important;
}

body.school-site .header .nav-mobile-links {
    gap: 4px !important;
    padding: 16px !important;
}

@media (max-width: 1023px) {
    body.school-site .header .nav-links,
    body.school-site .header .header-actions {
        display: none !important;
    }

    body.school-site .hamburger {
        display: inline-flex !important;
    }
}

@media (max-width: 767px) {
    body.school-site .header > .container {
        width: calc(100% - 32px) !important;
        padding-inline: 8px !important;
    }

    body.school-site .header .logo-text {
        font-size: 18px !important;
    }
}

/* Shared controls and forms. Page-specific layouts remain in their own stylesheets. */
body.school-site :is(.btn-primary, .header-cta, .button, .cta a, button[type="submit"], button[type="button"]) {
    border-radius: var(--school-radius-button) !important;
    font-family: inherit;
    font-weight: 600;
    box-shadow: none;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms ease;
}

body.school-site :is(.btn-primary, .button, .cta a, button[type="submit"]) {
    border-color: var(--school-blue) !important;
    color: #fff !important;
    background: var(--school-blue) !important;
}

body.school-site :is(.btn-secondary) {
    border: 1px solid var(--school-line) !important;
    border-radius: var(--school-radius-button) !important;
    color: var(--school-ink) !important;
    background: var(--school-surface) !important;
    box-shadow: none !important;
}

body.school-site :is(.btn-primary, .btn-secondary, .button, .cta a, button[type="submit"], button[type="button"]):active {
    transform: scale(.98);
}

/* Shared no-glow action treatment across all public school pages and states. */
body.school-site :is(
    button,
    [type="button"],
    [type="submit"],
    [type="reset"],
    [role="button"],
    .btn,
    [class*="btn-"],
    .button,
    [class*="button"],
    .cta a,
    .header-cta,
    .action,
    .actions a
),
body.school-site :is(
    button,
    [type="button"],
    [type="submit"],
    [type="reset"],
    [role="button"],
    .btn,
    [class*="btn-"],
    .button,
    [class*="button"],
    .cta a,
    .header-cta,
    .action,
    .actions a
):is(:hover, :active, :focus, :focus-visible),
body.school-site :is(
    button,
    [type="button"],
    [type="submit"],
    [type="reset"],
    [role="button"],
    .btn,
    [class*="btn-"],
    .button,
    [class*="button"],
    .cta a,
    .header-cta,
    .action,
    .actions a
)::before,
body.school-site :is(
    button,
    [type="button"],
    [type="submit"],
    [type="reset"],
    [role="button"],
    .btn,
    [class*="btn-"],
    .button,
    [class*="button"],
    .cta a,
    .header-cta,
    .action,
    .actions a
)::after {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    background-image: none !important;
}

body.school-site :is(
    button,
    [type="button"],
    [type="submit"],
    [role="button"],
    .btn,
    [class*="btn-"],
    .button,
    [class*="button"],
    .cta a,
    .header-cta,
    .action,
    .actions a
):focus-visible {
    outline: 3px solid var(--school-focus) !important;
    outline-offset: 3px !important;
    box-shadow: none !important;
}

body.school-site :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    border: 1px solid var(--school-line) !important;
    border-radius: var(--school-radius-input) !important;
    color: var(--school-text) !important;
    background: var(--school-surface) !important;
    font: inherit;
}

body.school-site :is(.modal-content, .lead-form, .form-card, .contact-card, .success-card) {
    border: 1px solid var(--school-line);
    border-radius: var(--school-radius-panel) !important;
    box-shadow: 0 8px 24px rgba(16, 36, 63, .06) !important;
}

body.school-site .modal-close {
    width: 44px !important;
    height: 44px !important;
    border-radius: var(--school-radius-button) !important;
}

body.school-site :is(.faq-item, .card, .pricing-card, .plan-card, .testimonial-card, .teacher-card, .result-card, .advantage-card, .age-card) {
    border-radius: var(--school-radius-card) !important;
}

body.school-site img:not(.logo-icon) {
    max-width: 100%;
}

body.school-site :is(.footer, .success-footer) {
    color: rgba(255, 255, 255, .82) !important;
    background: var(--school-ink) !important;
    background-image: none !important;
}

body.school-site :is(.footer, .success-footer) :is(h2, h3, h4, .logo-text) {
    color: #fff !important;
}

body.school-site :is(.footer, .success-footer) a {
    color: rgba(255, 255, 255, .86) !important;
    text-decoration: none;
}

body.school-site :is(.footer, .success-footer) a:hover {
    color: #fff !important;
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    body.school-site *,
    body.school-site *::before,
    body.school-site *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
