/* eSchoolPoint Public Site v1 */
:root {
    --esp-primary: #1E3A8A;
    --esp-primary-dark: #172554;
    --esp-green: #16A34A;
    --esp-green-dark: #15803D;
    --esp-sky: #38BDF8;
    --esp-bg: #F8FAFC;
    --esp-surface: #FFFFFF;
    --esp-text: #0F172A;
    --esp-muted: #64748B;
    --esp-border: #E2E8F0;
    --esp-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --esp-shadow-lg: 0 12px 40px rgba(30, 58, 138, 0.12);
    --esp-radius: 12px;
    --esp-max: 1140px;
    --esp-nav-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.esp-public {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--esp-text);
    background: var(--esp-bg);
    -webkit-font-smoothing: antialiased;
}

.esp-public a { color: var(--esp-primary); text-decoration: none; }
.esp-public a:hover { color: var(--esp-primary-dark); }

.esp-container {
    width: min(100% - 2rem, var(--esp-max));
    margin-inline: auto;
}

.esp-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--esp-border);
}

.esp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--esp-nav-h);
    gap: 1rem;
}

.esp-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.esp-brand-logo {
    display: block;
    height: 64px;
    width: auto;
    max-width: min(420px, 72vw);
}

@media (max-width: 900px) {
    .esp-brand-logo {
        height: 54px;
        max-width: min(340px, 75vw);
    }
}

@media (max-width: 540px) {
    .esp-brand-logo {
        height: 46px;
        max-width: min(280px, 82vw);
    }
}

.esp-brand:hover { opacity: 0.92; }

.esp-nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--esp-border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: var(--esp-text);
    font-size: 1.25rem;
    line-height: 1;
}

.esp-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.esp-nav a {
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--esp-muted);
    transition: color 0.15s, background 0.15s;
}

.esp-nav a:hover,
.esp-nav a.is-active {
    color: var(--esp-primary);
    background: rgba(30, 58, 138, 0.06);
}

.esp-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
}

.esp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.375rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    text-decoration: none;
    line-height: 1.2;
}

.esp-btn:hover { transform: translateY(-1px); text-decoration: none; }

.esp-btn-primary {
    background: var(--esp-primary);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.25);
}

.esp-btn-primary:hover {
    background: var(--esp-primary-dark);
    color: #fff !important;
}

.esp-btn-secondary {
    background: var(--esp-surface);
    color: var(--esp-primary) !important;
    border: 1px solid var(--esp-border);
}

.esp-btn-secondary:hover {
    border-color: var(--esp-primary);
    color: var(--esp-primary) !important;
}

.esp-btn-green {
    background: var(--esp-green);
    color: #fff !important;
}

.esp-btn-green:hover { background: var(--esp-green-dark); color: #fff !important; }

.esp-btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.esp-btn-block { width: 100%; }

.esp-hero {
    padding: 4rem 0 3rem;
    background: linear-gradient(180deg, #fff 0%, var(--esp-bg) 100%);
    overflow: hidden;
}

.esp-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.esp-eyebrow {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--esp-green);
    margin-bottom: 1rem;
}

.esp-hero h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
    color: var(--esp-text);
}

.esp-hero-lead {
    font-size: 1.125rem;
    color: var(--esp-muted);
    margin: 0 0 2rem;
    max-width: 34rem;
}

.esp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.esp-trust-line { font-size: 0.875rem; color: var(--esp-muted); }
.esp-trust-line strong { color: var(--esp-text); }

.esp-preview-shell {
    background: var(--esp-surface);
    border: 1px solid var(--esp-border);
    border-radius: 16px;
    box-shadow: var(--esp-shadow-lg);
    padding: 1.25rem;
}

.esp-preview-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--esp-border);
}

.esp-preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.esp-preview-dot:nth-child(1) { background: #F87171; }
.esp-preview-dot:nth-child(2) { background: #FBBF24; }
.esp-preview-dot:nth-child(3) { background: #34D399; }

.esp-preview-title {
    margin-left: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--esp-muted);
}

.esp-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.esp-stat-card {
    background: var(--esp-bg);
    border: 1px solid var(--esp-border);
    border-radius: var(--esp-radius);
    padding: 1rem;
}

.esp-stat-card.is-wide { grid-column: 1 / -1; }

.esp-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--esp-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.375rem;
}

.esp-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--esp-primary);
    line-height: 1.2;
}

.esp-stat-value.is-green { color: var(--esp-green); }

.esp-stat-sub { font-size: 0.75rem; color: var(--esp-muted); margin-top: 0.25rem; }

.esp-stat-bar {
    height: 6px;
    background: var(--esp-border);
    border-radius: 99px;
    margin-top: 0.625rem;
    overflow: hidden;
}

.esp-stat-bar span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--esp-primary), var(--esp-sky));
}

.esp-section { padding: 4rem 0; }

.esp-section-alt {
    background: var(--esp-surface);
    border-block: 1px solid var(--esp-border);
}

.esp-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.esp-section-head h2 {
    font-size: clamp(1.625rem, 3vw, 2.125rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
}

.esp-section-head p {
    margin: 0;
    color: var(--esp-muted);
    font-size: 1.0625rem;
}

.esp-pill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.esp-pill {
    background: var(--esp-surface);
    border: 1px solid var(--esp-border);
    border-radius: var(--esp-radius);
    padding: 1.25rem;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.esp-section-alt .esp-pill { background: var(--esp-bg); }

.esp-pill:hover {
    border-color: rgba(30, 58, 138, 0.25);
    box-shadow: var(--esp-shadow);
}

.esp-pill-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.75rem;
    border-radius: 10px;
    background: rgba(30, 58, 138, 0.08);
    color: var(--esp-primary);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
}

.esp-pill h3 { margin: 0 0 0.375rem; font-size: 1rem; font-weight: 700; }
.esp-pill p { margin: 0; font-size: 0.875rem; color: var(--esp-muted); }

.esp-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.esp-feature-card {
    background: var(--esp-surface);
    border: 1px solid var(--esp-border);
    border-radius: var(--esp-radius);
    padding: 1.75rem;
    box-shadow: var(--esp-shadow);
}

.esp-feature-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--esp-primary);
}

.esp-feature-card p { margin: 0 0 1rem; color: var(--esp-muted); font-size: 0.9375rem; }

.esp-feature-list { margin: 0; padding: 0; list-style: none; }

.esp-feature-list li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: var(--esp-text);
    margin-bottom: 0.375rem;
}

.esp-feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--esp-green);
}

.esp-cta {
    padding: 3.5rem 0;
    background: linear-gradient(135deg, var(--esp-primary) 0%, #1e40af 50%, var(--esp-primary-dark) 100%);
    color: #fff;
    text-align: center;
}

.esp-cta h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
}

.esp-cta p { margin: 0 auto 1.5rem; max-width: 520px; opacity: 0.9; }

.esp-cta .esp-btn-primary { background: #fff; color: var(--esp-primary) !important; }

.esp-cta .esp-btn-secondary {
    border-color: rgba(255,255,255,0.4);
    color: #fff !important;
    background: transparent;
}

.esp-page-hero {
    padding: 3rem 0 2rem;
    background: var(--esp-surface);
    border-bottom: 1px solid var(--esp-border);
}

.esp-page-hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.esp-page-hero p {
    margin: 0;
    color: var(--esp-muted);
    font-size: 1.0625rem;
    max-width: 640px;
}

.esp-form-card {
    background: var(--esp-surface);
    border: 1px solid var(--esp-border);
    border-radius: var(--esp-radius);
    padding: 2rem;
    box-shadow: var(--esp-shadow);
}

.esp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.esp-field { margin-bottom: 1rem; }

.esp-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--esp-text);
}

.esp-field input,
.esp-field textarea {
    width: 100%;
    padding: 0.6875rem 0.875rem;
    border: 1px solid var(--esp-border);
    border-radius: 8px;
    font: inherit;
    color: var(--esp-text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.esp-field input:focus,
.esp-field textarea:focus {
    outline: none;
    border-color: var(--esp-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.esp-field textarea { min-height: 120px; resize: vertical; }

.esp-alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

.esp-alert-success { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
.esp-alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.esp-alert-error ul { margin: 0; padding-left: 1.25rem; }

.esp-contact-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

.esp-info-card {
    background: var(--esp-surface);
    border: 1px solid var(--esp-border);
    border-radius: var(--esp-radius);
    padding: 1.5rem;
}

.esp-info-card h3 { margin: 0 0 1rem; font-size: 1rem; font-weight: 700; }
.esp-info-item { margin-bottom: 1.25rem; }
.esp-info-item:last-child { margin-bottom: 0; }

.esp-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--esp-muted);
    margin-bottom: 0.25rem;
}

.esp-info-value { font-size: 0.9375rem; color: var(--esp-text); }

.esp-about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.esp-about-panel {
    background: var(--esp-surface);
    border: 1px solid var(--esp-border);
    border-radius: var(--esp-radius);
    padding: 2rem;
}

.esp-about-panel h2 { margin: 0 0 1rem; font-size: 1.25rem; font-weight: 700; }
.esp-about-panel p { margin: 0 0 1rem; color: var(--esp-muted); }
.esp-about-panel p:last-child { margin-bottom: 0; }

.esp-values { display: grid; gap: 1rem; margin-top: 1.5rem; }

.esp-value {
    padding: 1rem;
    background: var(--esp-bg);
    border-radius: 8px;
    border-left: 3px solid var(--esp-green);
}

.esp-value strong { display: block; margin-bottom: 0.25rem; color: var(--esp-text); }
.esp-value span { font-size: 0.875rem; color: var(--esp-muted); }

.esp-footer {
    background: var(--esp-primary-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 3rem 0 1.5rem;
}

.esp-footer a { color: rgba(255, 255, 255, 0.9); }
.esp-footer a:hover { color: #fff; }

.esp-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.esp-footer-brand { font-size: 1.125rem; font-weight: 700; color: #fff; margin-bottom: 0.75rem; }

.esp-footer-desc {
    font-size: 0.875rem;
    opacity: 0.8;
    max-width: 320px;
    margin: 0;
}

.esp-footer h4 {
    margin: 0 0 0.875rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
}

.esp-footer-links { list-style: none; margin: 0; padding: 0; }
.esp-footer-links li { margin-bottom: 0.5rem; }
.esp-footer-links a { font-size: 0.875rem; opacity: 0.85; }

.esp-footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8125rem;
    opacity: 0.7;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
}

@media (max-width: 900px) {
    .esp-hero-grid,
    .esp-about-grid,
    .esp-contact-grid,
    .esp-feature-grid { grid-template-columns: 1fr; }

    .esp-pill-grid { grid-template-columns: repeat(2, 1fr); }
    .esp-footer-grid { grid-template-columns: 1fr; }
    .esp-nav-toggle { display: block; }

    .esp-nav-wrap {
        position: absolute;
        top: var(--esp-nav-h);
        left: 0;
        right: 0;
        background: var(--esp-surface);
        border-bottom: 1px solid var(--esp-border);
        padding: 1rem;
        display: none;
        box-shadow: var(--esp-shadow);
    }

    .esp-nav-wrap.is-open { display: block; }
    .esp-nav { flex-direction: column; align-items: stretch; }
    .esp-nav a { padding: 0.75rem 1rem; }
    .esp-nav-actions { flex-direction: column; margin-left: 0; margin-top: 0.5rem; }
    .esp-nav-actions .esp-btn { width: 100%; }
    .esp-header-inner { position: relative; }
}

@media (max-width: 540px) {
    .esp-pill-grid { grid-template-columns: 1fr; }
    .esp-form-grid { grid-template-columns: 1fr; }
    .esp-stat-grid { grid-template-columns: 1fr; }
    .esp-stat-card.is-wide { grid-column: auto; }
    .esp-hero { padding-top: 2.5rem; }
}
