/* =========================================================================
   SNT EDUCATION ACADEMY — DESIGN SYSTEM v3.1 "GRAPHITE & VERMILION"
   -------------------------------------------------------------------------
   Palette ... Graphite   #1E2128 / #141618 / #0C0D0F   (solid fills)
               Vermilion  #E4572E / #FF7A52             (accent)
               Bone       #F7F3EB / #FCFAF5             (backgrounds)
   Type  ..... Bricolage Grotesque (display) · Onest (body) · DM Mono (labels)
   Rules ..... Solid fills only · squared buttons · no pill shapes
               hairline-bordered cards · outlined icon chips
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wdth,wght@12..96,75..100,200..800&family=Onest:wght@300..800&family=DM+Mono:wght@400;500&display=swap');

:root {
    /* Brand — graphite charcoal */
    --ink: #1E2128;
    --primary: #1E2128;
    --primary-dark: #141618;
    --primary-darker: #0C0D0F;
    --primary-light: #3C4148;
    --primary-vibrant: #4A5058;
    --primary-50: #F4F5F6;
    --primary-100: #E9EBEE;

    /* Accent — vermilion */
    --accent: #E4572E;
    --accent-dark: #BC3F1C;
    --accent-light: #FF7A52;
    --accent-50: #FDF0EB;

    /* Secondary */
    --secondary: #4A5058;

    /* Surfaces + ink */
    --bone: #F7F3EB;
    --bone-2: #FCFAF5;
    --line: rgba(30, 33, 40, 0.13);
    --line-strong: rgba(30, 33, 40, 0.26);
    --muted: #6B7280;

    --slate-900: #16131D;
    --slate-800: #272430;
    --slate-700: #3D3A47;
    --slate-600: #54515F;
    --slate-500: #716E80;
    --slate-100: #EFEEF3;
    --slate-50: #F7F7F9;

    --radius: 6px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================== Base ==================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--slate-900);
    background-color: var(--bone);
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    line-height: 1.65;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

/* Display type — expressive grotesque, slightly condensed at large sizes */
h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Bricolage Grotesque', 'Anton', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.06;
    font-variation-settings: "opsz" 40, "wdth" 97;
    text-wrap: balance;
}

h1 { font-variation-settings: "opsz" 72, "wdth" 94; }

::selection { background: var(--accent); color: #fff; }

/* Mono label voice */
.font-mono, .eyebrow-hl, .label-mono {
    font-family: 'DM Mono', ui-monospace, SFMono-Regular, monospace;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
}

/* Highlighted-text label (replaces the old pill badge) */
.eyebrow-hl {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.68rem;
    color: var(--accent-dark);
}
.eyebrow-hl::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    background: var(--accent);
}

/* ======================= Texture + chrome overlays ===================== */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.05;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
    display: none !important;
}

/* ===================== Fixed top bar navigation ======================== */
.site-header {
    background: color-mix(in srgb, var(--bone-2) 88%, transparent);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid transparent;
    transition: background .35s var(--ease), border-color .35s var(--ease);
}
.site-header.scrolled {
    background: color-mix(in srgb, var(--bone-2) 97%, transparent);
    border-bottom-color: var(--line);
}

.nav-link {
    position: relative;
    color: var(--slate-600);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.4rem 0.1rem;
    transition: color .25s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 600; }
.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 1.5px;
    background: var(--accent);
    transform-origin: left;
    animation: underlineIn .5s var(--ease) both;
}
@keyframes underlineIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Mobile dropdown panel — full width, hairline dividers */
.mobile-panel {
    background: var(--bone-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.5rem;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
}
.mobile-panel a {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--slate-700);
    border-radius: 0;
    transition: color .25s var(--ease), padding-left .25s var(--ease);
}
.mobile-panel a:last-child { border-bottom: 0; }
.mobile-panel a:active,
.mobile-panel a:hover { color: var(--accent); padding-left: 0.6rem; }

/* ============================== Buttons ================================ */
/* Squared, mono-labelled. No pill shapes anywhere. */
.btn-solid,
.btn-accent,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1.6rem;
    border-radius: 2px;
    border: 1px solid transparent;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

.btn-ghost { background: transparent; color: inherit; border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px); }

/* Highlighted-text action — the marker sweep IS the button */
.hl-cta,
.hl-link {
    background-image: linear-gradient(to right, var(--hl, var(--accent)), var(--hl, var(--accent)));
    background-repeat: no-repeat;
    background-position: 0 92%;
    background-size: 0% 0.42em;
    transition: background-size .45s var(--ease), color .3s var(--ease);
}
.hl-cta { font-weight: 600; padding: 0.35rem 0.1rem; white-space: nowrap; }
.hl-cta:hover,
.hl-link:hover { background-size: 100% 0.42em; }
.hl-cta svg { transition: transform .3s var(--ease); }
.hl-cta:hover svg { transform: translateX(4px); }

/* ======================== Cards (hairline, flat) ======================= */
section { counter-reset: card; }

.package-card,
.feature-card,
.chip-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
    transition: transform .4s var(--ease), border-color .4s var(--ease), background-color .4s var(--ease);
}
.package-card:hover,
.feature-card:hover,
.chip-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}

/* A vermilion rule slides along the top of the card */
.package-card::after,
.feature-card::after {
    content: "";
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--ease);
}
.package-card:hover::after,
.feature-card:hover::after { transform: scaleX(1); }

.package-card.featured {
    background: var(--bone);
    border-color: var(--line-strong);
}

/* Dark feature/exam cards */
.exam-card {
    position: relative;
    background: var(--primary-dark);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius);
    box-shadow: none;
    overflow: hidden;
    transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.exam-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.22); }

/* Editorial index numbers on uniform card grids */
.feature-card,
.exam-card { counter-increment: card; }
.feature-card::before,
.exam-card::before {
    content: counter(card, decimal-leading-zero);
    position: absolute;
    top: 1.15rem;
    right: 1.2rem;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: color-mix(in srgb, currentColor 38%, transparent);
    pointer-events: none;
}

/* Outlined icon chip — replaces the pastel rounded tile */
.icon-chip {
    background: transparent;
    border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
    border-radius: 3px;
    transition: border-color .35s var(--ease), background-color .35s var(--ease), color .35s var(--ease);
}
.icon-chip:hover { border-color: color-mix(in srgb, currentColor 55%, transparent); }

/* Dark surface helper */
.surface-ink {
    background: var(--primary-darker);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
}

/* ======================= Hero photo composition ======================== */
.collage-frame {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-static-frame { animation: none !important; }

@keyframes floatSlow { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floatReverse { 0%,100% { transform: translateY(0); } 50% { transform: translateY(12px); } }
@keyframes sparklePulse { 0%,100% { transform: scale(1) rotate(0); opacity: .8; } 50% { transform: scale(1.18) rotate(14deg); opacity: 1; } }
.animate-float-slow { animation: floatSlow 5s ease-in-out infinite; }
.animate-float-reverse { animation: floatReverse 5.5s ease-in-out infinite; }
.animate-sparkle { animation: sparklePulse 3.2s ease-in-out infinite; }

.stat-divider { width: 1px; height: 40px; background: var(--line); }

/* ============================ Marquee band ============================= */
.marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 2.5rem;
    padding-right: 2.5rem;
    animation: marquee 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ========================= Scroll reveal (stagger) ===================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .85s var(--ease), transform .85s var(--ease);
}
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }

.stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .75s var(--ease), transform .75s var(--ease);
}
.stagger.revealed > * { opacity: 1; transform: translateY(0); }
.stagger.revealed > *:nth-child(1) { transition-delay: .04s; }
.stagger.revealed > *:nth-child(2) { transition-delay: .11s; }
.stagger.revealed > *:nth-child(3) { transition-delay: .18s; }
.stagger.revealed > *:nth-child(4) { transition-delay: .25s; }
.stagger.revealed > *:nth-child(5) { transition-delay: .32s; }
.stagger.revealed > *:nth-child(6) { transition-delay: .39s; }
.stagger.revealed > *:nth-child(7) { transition-delay: .46s; }
.stagger.revealed > *:nth-child(8) { transition-delay: .53s; }

/* ========================== Custom scrollbar =========================== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bone); }
::-webkit-scrollbar-thumb { background: #C6BFB0; border: 3px solid var(--bone); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ============================== Mobile ================================= */
@media (max-width: 767px) {
    html { scroll-padding-top: 76px; }

    h1 { letter-spacing: -0.01em; }
    .marquee__track { animation-duration: 20s; gap: 1.75rem; padding-right: 1.75rem; }
    .eyebrow-hl { font-size: 0.62rem; letter-spacing: 0.14em; }

    /* comfortable tap targets, no accidental overflow */
    .btn-solid, .btn-accent, .btn-ghost { padding: 1rem 1.4rem; font-size: 0.7rem; }
    .mobile-panel a { min-height: 48px; display: flex; align-items: center; }

    /* keep long words and wide media inside the viewport */
    img, iframe, table { max-width: 100%; }
    .marquee, .marquee__track { max-width: 100%; }
}

/* ============================ Reduced motion =========================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .scroll-reveal, .stagger > * { opacity: 1; transform: none; }
    .marquee__track { animation: none; }
}

/* ===================== Compact Nav Enroll Button ======================= */
.nav-enroll-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.25rem 0.625rem !important; /* 4px 10px */
    font-size: 0.6875rem !important;      /* 11px */
    line-height: 1.15 !important;
    white-space: nowrap !important;
    border-radius: 2px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    height: auto !important;
}
@media (min-width: 640px) {
    .nav-enroll-btn {
        padding: 0.45rem 1rem !important;
        font-size: 0.75rem !important;   /* 12px */
    }
}

/* ================ Responsive Floating Action Buttons ================== */
.floating-btn-call,
.floating-btn-whatsapp {
    width: 2.5rem !important;  /* 40px */
    height: 2.5rem !important; /* 40px */
    bottom: 1rem !important;   /* 16px */
    border-radius: 9999px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.floating-btn-call {
    left: 1rem !important;
    background-color: var(--color-primary, #1E2128) !important;
    color: #ffffff !important;
}
.floating-btn-whatsapp {
    right: 1rem !important;
    background-color: #25D366 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45) !important;
}
.floating-btn-whatsapp:hover {
    background-color: #20ba5a !important;
    transform: scale(1.08);
}
.floating-btn-whatsapp svg {
    width: 1.35rem !important;
    height: 1.35rem !important;
    fill: currentColor !important;
}

#back-to-top {
    width: 2.25rem !important; /* 36px */
    height: 2.25rem !important;
    bottom: 4.25rem !important; /* 68px */
    right: 1rem !important;
    border-radius: 9999px !important;
}

@media (min-width: 640px) {
    .floating-btn-call,
    .floating-btn-whatsapp {
        width: 2.75rem !important;  /* 44px */
        height: 2.75rem !important; /* 44px */
        bottom: 1.5rem !important;  /* 24px */
    }
    .floating-btn-call {
        left: 1.5rem !important;
    }
    .floating-btn-whatsapp {
        right: 1.5rem !important;
    }
    .floating-btn-whatsapp svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    #back-to-top {
        width: 2.25rem !important;  /* 36px */
        height: 2.25rem !important;
        bottom: 4.75rem !important;
        right: 1.5rem !important;
    }
}

