/*
 * School Console — component styles for the 14 reusable components in Components/Shared/
 * + the two layout components (TopNav, SiteFooter).
 * Every selector under a component prefix to avoid bleed.
 */

/* ===== Logo (sc-logo) ===== */
.sc-logo { display: inline-flex; align-items: center; }
.sc-logo img, .sc-logo svg { display: block; height: 40px; width: auto; }
.sc-logo--header img, .sc-logo--header svg { height: 44px; }
.sc-logo--footer img, .sc-logo--footer svg { height: 56px; }

/* ===== Buttons (sc-btn) ===== */
.sc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sc-s-2);
    padding: var(--sc-s-3) var(--sc-s-5);
    border: 1px solid transparent;
    border-radius: var(--sc-radius);
    font-family: var(--sc-font-sans);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 80ms ease;
    white-space: nowrap;
}
.sc-btn:focus-visible { outline: 2px solid var(--sc-primary); outline-offset: 2px; }
.sc-btn:active { transform: translateY(1px); }

.sc-btn--primary {
    background: var(--sc-primary);
    color: var(--sc-ink-inverse);
}
.sc-btn--primary:hover { background: var(--sc-primary-600); color: var(--sc-ink-inverse); text-decoration: none; }

.sc-btn--ghost {
    background: transparent;
    color: var(--sc-ink);
    border-color: var(--sc-border-2);
}
.sc-btn--ghost:hover { background: var(--sc-surface-2); text-decoration: none; }

.sc-btn--link {
    background: transparent;
    color: var(--sc-primary);
    padding: var(--sc-s-2) var(--sc-s-3);
}
.sc-btn--link:hover { color: var(--sc-primary-700); text-decoration: none; }

.sc-btn--lg { padding: var(--sc-s-4) var(--sc-s-6); font-size: 16px; }

/* ===== Spinner inside primary buttons (used by LeadForm + NewsletterCta during submit) =====
   `.sc-busy` is added by /js/form-busy.js on submit (and removed on response /
   pageshow / Blazor enhancedload). Spinner element is always in the DOM but
   hidden until .sc-busy is on the button — so the spinner pulses for the entire
   network round-trip, regardless of whether enhanced form handling fires or
   the page does a classic full-reload roundtrip. */
.sc-btn--with-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 7em; /* prevent layout jump when text swaps to "Sending…" */
}
.sc-btn--with-spinner .sc-spinner { display: none; }
.sc-btn--with-spinner .sc-btn__label-busy { display: none; }
.sc-btn--with-spinner.sc-busy .sc-spinner { display: inline-block; }
.sc-btn--with-spinner.sc-busy .sc-btn__label-busy { display: inline; }
.sc-btn--with-spinner.sc-busy .sc-btn__label-idle { display: none; }
.sc-btn--with-spinner.sc-busy { opacity: 0.85; cursor: progress; }
.sc-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: sc-spin 0.7s linear infinite;
    flex: 0 0 auto;
}
@keyframes sc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .sc-spinner { animation: none; border-right-color: currentColor; opacity: 0.6; }
}

/* ===== Chip / pill ===== */
.sc-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sc-s-2);
    padding: 6px var(--sc-s-3);
    border-radius: var(--sc-radius-pill);
    background: var(--sc-primary-50);
    color: var(--sc-primary-700);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}
.sc-chip--neutral { background: var(--sc-surface-2); color: var(--sc-ink-3); }
.sc-chip--accent  { background: var(--sc-accent-2-50); color: #006B5C; }
.sc-chip--new     { background: var(--sc-success); color: white; }

/* ===== TopNav — pure CSS, details-based dropdowns + checkbox-hack burger ===== */
.sc-topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    /* Solid translucent background — was rgba(.92) + backdrop-filter, but
       backdrop-filter creates a new containing block for `position: fixed`
       descendants (per CSS spec), which collapsed the mobile drawer's
       inset: 64px 0 0 0 into a tiny strip. Dropping backdrop-filter so the
       drawer correctly sizes against the viewport. The .96 alpha preserves
       most of the soft-translucent look without the blur. */
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--sc-border);
}
.sc-topnav__inner {
    display: flex;
    align-items: center;
    gap: var(--sc-s-5);
    padding: var(--sc-s-3) 0;
}

/* Burger checkbox — always hidden (used as state toggle only) */
.sc-topnav__burger-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0; height: 0;
}

/* Burger label — visible only on mobile */
.sc-topnav__burger {
    display: none;
    cursor: pointer;
    border: 1px solid var(--sc-border-2);
    border-radius: var(--sc-radius-sm);
    padding: 10px 12px;
    background: var(--sc-surface);
    margin-left: auto;
    user-select: none;
}
.sc-topnav__burger-icon {
    display: block;
    width: 20px; height: 2px;
    background: var(--sc-ink);
    position: relative;
    transition: background 80ms;
}
.sc-topnav__burger-icon::before,
.sc-topnav__burger-icon::after {
    content: '';
    position: absolute; left: 0;
    width: 20px; height: 2px;
    background: var(--sc-ink);
    transition: transform 160ms ease, top 160ms ease, bottom 160ms ease;
}
.sc-topnav__burger-icon::before { top: -6px; }
.sc-topnav__burger-icon::after  { bottom: -6px; }
/* When checkbox is checked, morph hamburger to X */
.sc-topnav__burger-toggle:checked ~ .sc-topnav__burger .sc-topnav__burger-icon { background: transparent; }
.sc-topnav__burger-toggle:checked ~ .sc-topnav__burger .sc-topnav__burger-icon::before { top: 0; transform: rotate(45deg); }
.sc-topnav__burger-toggle:checked ~ .sc-topnav__burger .sc-topnav__burger-icon::after  { bottom: 0; transform: rotate(-45deg); }

/* Links list — flex on desktop, drawer on mobile */
.sc-topnav__links {
    display: flex;
    align-items: center;
    gap: var(--sc-s-2);
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: auto;
}
.sc-topnav__item { display: block; }
.sc-topnav__item--cta { margin-left: var(--sc-s-3); }

/* The <details> wrapping each dropdown group */
.sc-topnav__group {
    position: relative;
}
.sc-topnav__group > summary {
    list-style: none;
    cursor: pointer;
    padding: var(--sc-s-2) var(--sc-s-3);
    color: var(--sc-ink-2);
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--sc-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.sc-topnav__group > summary::-webkit-details-marker { display: none; }
.sc-topnav__group > summary:hover { background: var(--sc-surface-2); color: var(--sc-ink); }
.sc-topnav__group[open] > summary { background: var(--sc-surface-2); color: var(--sc-ink); }
.sc-topnav__chev { font-size: 10px; transition: transform 160ms ease; }
.sc-topnav__group[open] > summary > .sc-topnav__chev { transform: rotate(180deg); }

/* Dropdown menu panel */
.sc-topnav__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 240px;
    /* Allow long labels (e.g. "School ERP (K-12)", "Coaching & training",
       "Implementation") to fit on one line instead of truncating into the
       neighbouring dropdown when both are open. */
    white-space: nowrap;
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    box-shadow: var(--sc-shadow-lg);
    padding: var(--sc-s-2);
    list-style: none;
    margin: 0;
    z-index: 110;
}
.sc-topnav__menu a {
    display: block;
    padding: var(--sc-s-3) var(--sc-s-4);
    border-radius: var(--sc-radius-sm);
    color: var(--sc-ink-2);
    font-size: 14px;
    text-decoration: none;
}
.sc-topnav__menu a:hover { background: var(--sc-surface-2); color: var(--sc-ink); text-decoration: none; }

/* ----- Mobile (≤ 960px) ----- */
@media (max-width: 960px) {
    .sc-topnav__burger { display: inline-flex; }

    .sc-topnav__links {
        position: fixed;
        /* Explicit edges instead of `inset` shorthand — more predictable across
           browsers. Top:64px clears the sticky nav; full viewport width/height. */
        top: 64px;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: calc(100vh - 64px);
        /* Dynamic viewport height for mobile browsers that retract URL bar on scroll. */
        height: calc(100dvh - 64px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #FFFFFF; /* explicit white — was var(--sc-bg) which can shift under dark theme */
        padding: var(--sc-s-5);
        overflow-y: auto;
        overscroll-behavior: contain; /* don't scroll the page behind when the drawer end-scrolls */
        z-index: 95;
        transform: translateX(100%);
        transition: transform 240ms ease;
        margin-left: 0;
        /* Important: ensure flex doesn't squash children when content is short.
           Without this, `align-items: stretch` + short content collapses items. */
        justify-content: flex-start;
    }
    /* Toggle drawer when burger checkbox is checked */
    .sc-topnav__burger-toggle:checked ~ .sc-topnav__links {
        transform: translateX(0);
    }

    .sc-topnav__item { width: 100%; border-bottom: 1px solid var(--sc-border); }
    .sc-topnav__item--cta { border-bottom: none; margin-left: 0; margin-top: var(--sc-s-4); }
    .sc-topnav__item--cta .sc-btn { width: 100%; }

    .sc-topnav__group > summary { padding: var(--sc-s-4) 0; font-size: 16px; }

    /* Inline-expand dropdowns on mobile (no absolute positioning) */
    .sc-topnav__menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 var(--sc-s-3) var(--sc-s-4);
        background: transparent;
        min-width: 0;
        /* Reset desktop's white-space: nowrap so long labels wrap inside the
           drawer instead of forcing horizontal overflow. */
        white-space: normal;
    }
    .sc-topnav__menu a { padding: var(--sc-s-3) 0; }

    /* Lock body scroll while the drawer is open — otherwise the page behind
       scrolls under your finger when you swipe the drawer. */
    .sc-topnav__burger-toggle:checked ~ .sc-topnav__links { overflow-y: auto; }
    body:has(.sc-topnav__burger-toggle:checked) { overflow: hidden; }
}

/* ===== SiteFooter ===== */
.sc-footer {
    background: var(--sc-ink);
    color: rgba(255, 255, 255, .8);
    /* Top padding is sc-s-7 (48 px), not sc-s-9 — the preceding .sc-section--cta-last
       already drops its bottom padding so the footer top doesn't need to compensate.
       (2026-05-13: total gap CTA→footer cut from ~288 px → ~64 px.) */
    padding: var(--sc-s-7) 0 var(--sc-s-5) 0;
}
.sc-footer h5 { color: var(--sc-ink-inverse); margin-bottom: var(--sc-s-4); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.sc-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--sc-s-7);
    margin-bottom: var(--sc-s-7);
}
@media (max-width: 760px) { .sc-footer__grid { grid-template-columns: 1fr; gap: var(--sc-s-6); } }
.sc-footer ul { list-style: none; margin: 0; padding: 0; }
.sc-footer ul li { margin-bottom: var(--sc-s-2); }
.sc-footer a { color: rgba(255, 255, 255, .75); font-size: 14px; }
.sc-footer a:hover { color: white; text-decoration: none; }
.sc-footer__pitch { font-size: 14px; line-height: 1.7; max-width: 360px; margin-bottom: var(--sc-s-5); }
.sc-footer__stores { display: flex; gap: var(--sc-s-3); margin-top: var(--sc-s-4); }
.sc-footer__stores img { height: 40px; width: auto; }
.sc-footer__bottom {
    padding-top: var(--sc-s-5);
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sc-s-5);
    justify-content: space-between;
}
.sc-footer__newsletter {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--sc-s-6);
    align-items: center;
    padding-bottom: var(--sc-s-6);
    margin-bottom: var(--sc-s-6);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.sc-footer__newsletter-copy { font-size: 15px; }
@media (max-width: 760px) {
    .sc-footer__newsletter { grid-template-columns: 1fr; gap: var(--sc-s-3); }
}

/* Inline footer brand — cyan-S mark + wordmark. No SVG / font dependency. */
.sc-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.sc-footer-brand:hover { text-decoration: none; }
.sc-footer-brand__mark {
    width: 44px; height: 44px;
    background: var(--sc-accent-2);
    color: #FFFFFF;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 26px;
    font-family: var(--sc-font-sans);
    line-height: 1;
}
.sc-footer-brand__text {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.01em;
}

/* ===== Hero ===== */
.sc-hero {
    background: var(--sc-hero-grad);
    padding: var(--sc-s-9) 0 var(--sc-s-9) 0;
    overflow: hidden;
}
.sc-hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--sc-s-9);
    align-items: center;
}
@media (max-width: 960px) { .sc-hero__inner { grid-template-columns: 1fr; gap: var(--sc-s-7); } }

.sc-hero__eyebrow { color: var(--sc-primary); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--sc-s-4); }
.sc-hero__title { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: var(--sc-s-5); }
.sc-hero__sub { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--sc-ink-3); margin-bottom: var(--sc-s-6); max-width: 560px; }
.sc-hero__ctas { display: flex; flex-wrap: wrap; gap: var(--sc-s-3); }

.sc-hero__visual {
    border-radius: var(--sc-radius-lg);
    box-shadow: var(--sc-shadow-lg);
    overflow: hidden;
    background: white;
    aspect-ratio: 16 / 11;
    position: relative;
}

/* ===== SectionTitle ===== */
.sc-section-title {
    text-align: center;
    margin-bottom: var(--sc-s-7);
}
.sc-section-title__eyebrow {
    color: var(--sc-primary);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--sc-s-3);
    display: inline-block;
}
.sc-section-title h2 { margin-bottom: var(--sc-s-3); }
.sc-section-title p { color: var(--sc-ink-3); max-width: 640px; margin: 0 auto; font-size: 17px; }

/* ===== ModuleCard ===== */
.sc-module-card {
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    padding: var(--sc-s-5);
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.sc-module-card:hover {
    border-color: var(--sc-primary-100);
    box-shadow: var(--sc-shadow);
    transform: translateY(-2px);
}
.sc-module-card__icon {
    width: 44px; height: 44px;
    border-radius: var(--sc-radius-sm);
    background: var(--sc-primary-50);
    color: var(--sc-primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--sc-s-4);
}
.sc-module-card__title {
    font-size: 17px; font-weight: 700; color: var(--sc-ink);
    margin-bottom: var(--sc-s-2);
    display: flex; align-items: center; gap: var(--sc-s-2);
}
.sc-module-card__desc { font-size: 14px; color: var(--sc-ink-3); line-height: 1.5; }

/* ===== FeatureTile ===== */
.sc-feature-tile {
    display: flex;
    gap: var(--sc-s-4);
    padding: var(--sc-s-4);
}
.sc-feature-tile__icon {
    flex: 0 0 32px;
    width: 32px; height: 32px;
    color: var(--sc-primary);
    display: flex; align-items: center; justify-content: center;
}
.sc-feature-tile__body { min-width: 0; }
.sc-feature-tile__title { font-size: 16px; font-weight: 600; color: var(--sc-ink); margin-bottom: var(--sc-s-2); }
.sc-feature-tile__desc { font-size: 14px; color: var(--sc-ink-3); margin: 0; line-height: 1.55; }
.sc-feature-tile__bullets { margin: 0; padding-left: var(--sc-s-5); list-style: disc; }
.sc-feature-tile__bullets li { font-size: 14px; color: var(--sc-ink-3); margin-bottom: var(--sc-s-1); line-height: 1.5; }
.sc-feature-tile__bullets li::marker { color: var(--sc-primary); }

/* Card variant — stack vertically, with bordered surface */
.sc-feature-tile--card {
    flex-direction: column;
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    padding: var(--sc-s-5);
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
    height: 100%;
}
.sc-feature-tile--card:hover {
    border-color: var(--sc-primary-100);
    box-shadow: var(--sc-shadow);
    transform: translateY(-2px);
}
.sc-feature-tile--card .sc-feature-tile__icon {
    width: 48px; height: 48px;
    background: var(--sc-primary-50);
    border-radius: var(--sc-radius-sm);
    margin-bottom: var(--sc-s-2);
    flex: none;
}

/* ===== StatRow + StatTile ===== */
.sc-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--sc-s-5);
}
.sc-stat {
    text-align: center;
    padding: var(--sc-s-5);
}
.sc-stat__value {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    font-weight: 700;
    color: var(--sc-primary);
    line-height: 1.1;
    margin-bottom: var(--sc-s-2);
    white-space: nowrap;          /* values like "1.2 Lakh+" must not wrap mid-text */
    overflow: hidden;
    text-overflow: ellipsis;
}
.sc-stat__label { font-size: 14px; color: var(--sc-ink-3); }

/* ===== TestimonialQuote ===== */
.sc-testimonial {
    padding: var(--sc-s-6);
    background: var(--sc-surface-2);
    border-radius: var(--sc-radius);
    max-width: 720px;
    margin: 0 auto;
}
.sc-testimonial__quote { font-size: 18px; line-height: 1.6; color: var(--sc-ink); margin-bottom: var(--sc-s-4); font-style: italic; }
.sc-testimonial__attr { font-size: 14px; color: var(--sc-ink-3); }

/* ===== CtaBanner ===== */
.sc-cta-banner {
    background: var(--sc-ai-grad);
    color: var(--sc-ink-inverse);
    padding: var(--sc-s-9) var(--sc-s-7);
    border-radius: var(--sc-radius-lg);
    text-align: center;
    margin: var(--sc-s-9) 0;
}
.sc-cta-banner h2 { color: var(--sc-ink-inverse); margin-bottom: var(--sc-s-4); }
.sc-cta-banner p { color: rgba(255, 255, 255, .85); margin-bottom: var(--sc-s-6); }
.sc-cta-banner .sc-btn--primary { background: white; color: var(--sc-ink); }
.sc-cta-banner .sc-btn--primary:hover { background: var(--sc-primary-50); }

/* ===== TrustStrip ===== */
.sc-trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sc-s-3);
    justify-content: center;
    padding: var(--sc-s-6) var(--sc-s-5);
    border-block: 1px solid var(--sc-border);
}

/* ===== BlogCard / CaseStudyCard ===== */
.sc-content-card {
    display: block;
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    overflow: hidden;
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
    text-decoration: none;
    color: inherit;
}
.sc-content-card:hover {
    border-color: var(--sc-primary-100);
    box-shadow: var(--sc-shadow);
    transform: translateY(-2px);
    text-decoration: none;
}
.sc-content-card__cover {
    background: var(--sc-surface-3);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}
.sc-content-card__body { padding: var(--sc-s-5); }
.sc-content-card__category {
    display: inline-block;
    background: var(--sc-primary-50);
    color: var(--sc-primary-700);
    padding: 4px var(--sc-s-3);
    border-radius: var(--sc-radius-pill);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: var(--sc-s-3);
}
.sc-content-card__title { font-size: 18px; font-weight: 700; color: var(--sc-ink); margin-bottom: var(--sc-s-3); line-height: 1.3; }
.sc-content-card__meta { font-size: 13px; color: var(--sc-ink-mute); }

/* ===== FaqAccordion ===== */
.sc-faq details {
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    padding: var(--sc-s-4) var(--sc-s-5);
    margin-bottom: var(--sc-s-3);
    background: var(--sc-surface);
}
.sc-faq summary {
    font-weight: 600;
    color: var(--sc-ink);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sc-s-4);
}
.sc-faq summary::-webkit-details-marker { display: none; }
.sc-faq summary::after {
    content: '+';
    font-size: 22px;
    color: var(--sc-primary);
    flex: 0 0 auto;
    transition: transform 120ms ease;
}
.sc-faq details[open] summary::after { content: '−'; }
.sc-faq details > *:not(summary) { margin-top: var(--sc-s-4); color: var(--sc-ink-3); }

/* ===== LeadForm ===== */
.sc-form { display: grid; gap: var(--sc-s-4); max-width: 560px; }
.sc-form__field { display: flex; flex-direction: column; gap: var(--sc-s-2); }
.sc-form__label { font-size: 14px; font-weight: 600; color: var(--sc-ink); }
.sc-form__input, .sc-form__textarea, .sc-form__select {
    width: 100%;
    padding: var(--sc-s-3) var(--sc-s-4);
    border: 1px solid var(--sc-border-2);
    border-radius: var(--sc-radius-sm);
    font-family: var(--sc-font-sans);
    font-size: 15px;
    color: var(--sc-ink);
    background: var(--sc-surface);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.sc-form__input:focus, .sc-form__textarea:focus, .sc-form__select:focus {
    outline: none;
    border-color: var(--sc-primary);
    box-shadow: 0 0 0 3px var(--sc-primary-100);
}
.sc-form__textarea { min-height: 120px; resize: vertical; }
.sc-form__hint { font-size: 12px; color: var(--sc-ink-mute); }
.sc-form__error { font-size: 13px; color: var(--sc-danger); }
.sc-form__success { padding: var(--sc-s-4); background: #ECFDF5; color: #047857; border-radius: var(--sc-radius); }

/* ===== Markdown content rendering ===== */
.sc-md { font-size: 17px; line-height: 1.8; color: var(--sc-ink-2); }
.sc-md h1, .sc-md h2, .sc-md h3 { margin-top: var(--sc-s-7); margin-bottom: var(--sc-s-4); }
.sc-md h1 { font-size: 2.25rem; }
.sc-md h2 { font-size: 1.75rem; }
.sc-md h3 { font-size: 1.375rem; }
.sc-md p { margin-bottom: var(--sc-s-5); }
.sc-md ul, .sc-md ol { padding-left: var(--sc-s-5); margin-bottom: var(--sc-s-5); }
.sc-md li { margin-bottom: var(--sc-s-2); }
.sc-md blockquote {
    padding: var(--sc-s-4) var(--sc-s-5);
    margin: var(--sc-s-5) 0;
    background: var(--sc-primary-50);
    border-left: 4px solid var(--sc-primary);
    border-radius: var(--sc-radius-sm);
    color: var(--sc-ink);
}
.sc-md code {
    background: var(--sc-surface-2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--sc-font-mono);
    font-size: 0.9em;
}
.sc-md pre { background: var(--sc-ink); color: white; padding: var(--sc-s-5); border-radius: var(--sc-radius); overflow-x: auto; }
.sc-md pre code { background: transparent; padding: 0; color: inherit; }
.sc-md img { border-radius: var(--sc-radius); margin: var(--sc-s-5) 0; }

/* ===== Case-study profile box ===== */
.sc-cs-profile {
    background: var(--sc-surface-2);
    border-radius: var(--sc-radius);
    padding: var(--sc-s-5);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--sc-s-4);
    margin-bottom: var(--sc-s-7);
}
.sc-cs-profile__field { display: flex; flex-direction: column; gap: var(--sc-s-1); }
.sc-cs-profile__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--sc-ink-mute); font-weight: 600; }
.sc-cs-profile__value { font-size: 15px; color: var(--sc-ink); font-weight: 600; }

/* ============================================================
 * Component-level responsive adjustments — mobile/tablet
 * ============================================================ */

@media (max-width: 760px) {
    /* Buttons stack full-width on mobile when in a CTA cluster */
    .sc-hero__ctas { width: 100%; }
    .sc-hero__ctas .sc-btn { flex: 1 1 auto; min-width: 0; }
    .sc-hero { padding-block: var(--sc-s-7); }
    .sc-hero__visual { aspect-ratio: 4 / 3; }

    /* Forms full width */
    .sc-form { max-width: 100%; }

    /* CTA banner pads in tighter */
    .sc-cta-banner { padding: var(--sc-s-7) var(--sc-s-5); margin-block: var(--sc-s-7); border-radius: var(--sc-radius); }

    /* Module cards single-column with tighter padding */
    .sc-module-card { padding: var(--sc-s-4); }
    .sc-module-card__icon { width: 40px; height: 40px; }

    /* Section title — center stays, narrower */
    .sc-section-title { margin-bottom: var(--sc-s-6); }
    .sc-section-title p { font-size: 16px; }

    /* Stat row — 2-up on phones (auto-fit already does this; explicit for clarity) */
    .sc-stat-row { grid-template-columns: repeat(2, 1fr); }
    .sc-stat__value { font-size: 1.75rem; }

    /* TopNav burger drawer styling already in main file's max-width:960 block */

    /* Footer — already collapses at 760px in main file */
    .sc-footer { padding-top: var(--sc-s-7); }
    .sc-footer__bottom { flex-direction: column; gap: var(--sc-s-3); text-align: center; }

    /* Trust strip — wrap with smaller gaps */
    .sc-trust-strip { gap: var(--sc-s-2); padding: var(--sc-s-5) var(--sc-s-3); }
    .sc-trust-strip .sc-chip { font-size: 12px; padding: 4px 10px; }

    /* Testimonial — less padding */
    .sc-testimonial { padding: var(--sc-s-5); }
    .sc-testimonial__quote { font-size: 16px; }

    /* Markdown content — slightly smaller */
    .sc-md { font-size: 16px; line-height: 1.7; }
    .sc-md h1 { font-size: 1.875rem; }
    .sc-md h2 { font-size: 1.5rem; }
    .sc-md h3 { font-size: 1.25rem; }
    .sc-md pre { padding: var(--sc-s-4); font-size: 13px; }
    .sc-md blockquote { padding: var(--sc-s-3) var(--sc-s-4); }

    /* Case-study profile — 2-up grid */
    .sc-cs-profile { grid-template-columns: repeat(2, 1fr); padding: var(--sc-s-4); gap: var(--sc-s-3); }

    /* Content cards — tighter body padding */
    .sc-content-card__body { padding: var(--sc-s-4); }

    /* Logo scaling for header */
    .sc-logo--header img, .sc-logo--header svg { height: 36px; }
    .sc-logo--footer img, .sc-logo--footer svg { height: 48px; }
}

@media (max-width: 480px) {
    .sc-hero__title { font-size: 2rem; }
    .sc-hero__sub { font-size: 1rem; }
    .sc-cs-profile { grid-template-columns: 1fr; }
    .sc-stat-row { grid-template-columns: 1fr 1fr; }
    .sc-btn { font-size: 14px; padding: var(--sc-s-3) var(--sc-s-4); }
}
