/* =========================================================================
   Tuition Manager — Design System
   ========================================================================= */
:root {
    /* Brand */
    --primary-50:  #EEF2FF;
    --primary-100: #E0E7FF;
    --primary-200: #C7D2FE;
    --primary-300: #A5B4FC;
    --primary-400: #818CF8;
    --primary-500: #6366F1;
    --primary-600: #4F46E5;
    --primary-700: #4338CA;
    --primary-800: #3730A3;
    --primary-900: #312E81;

    --accent-50:  #FFFBEB;
    --accent-100: #FEF3C7;
    --accent-300: #FCD34D;
    --accent-400: #FBBF24;
    --accent-500: #F59E0B;
    --accent-600: #D97706;
    --accent-700: #B45309;

    /* Semantic */
    --primary: var(--primary-600);
    --primary-dark: var(--primary-800);
    --accent: var(--accent-500);
    --accent-dark: var(--accent-600);
    --success: #10B981;
    --success-light: #D1FAE5;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: var(--primary-100);

    /* Neutrals */
    --slate-50:  #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1E293B;
    --slate-900: #0F172A;

    --bg: #FFFFFF;
    --bg-alt: var(--slate-50);
    --bg-dark: var(--slate-900);
    --surface: #FFFFFF;
    --text: var(--slate-900);
    --text-muted: var(--slate-500);
    --border: var(--slate-200);

    /* Radius */
    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Shadow */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow:    0 8px 24px -8px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, 0.20);
    --shadow-glow: 0 10px 40px -10px rgba(99, 102, 241, 0.45);
    --shadow-glow-accent: 0 10px 40px -10px rgba(245, 158, 11, 0.45);

    /* Easing */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    /* Layout */
    --container: 1200px;
    --header-h: 72px;
}

/* =========================================================================
   Reset / Base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    color: var(--slate-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.18s var(--ease);
}
a:hover { color: var(--primary-dark); }

img, svg { max-width: 100%; display: block; }

code {
    background: var(--slate-100);
    color: var(--slate-800);
    padding: 0.15em 0.45em;
    border-radius: 5px;
    font-size: 0.88em;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

::selection { background: var(--primary-200); color: var(--primary-900); }

/* =========================================================================
   Layout
   ========================================================================= */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

main { min-height: calc(100vh - var(--header-h)); }

/* =========================================================================
   Header
   ========================================================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--slate-200);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--slate-900);
    letter-spacing: -0.02em;
}
.logo:hover { color: var(--slate-900); text-decoration: none; }

.logo-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: #fff;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0;
    box-shadow: var(--shadow-glow);
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.nav a {
    color: var(--slate-700);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    transition: all 0.18s var(--ease);
}
.nav a:hover {
    color: var(--primary-700);
    background: var(--primary-50);
    text-decoration: none;
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
    position: relative;
    padding: 110px 0 90px;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    background: var(--bg);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -10% -10% auto -10%;
    height: 120%;
    background:
        radial-gradient(60% 60% at 15% 25%, rgba(99, 102, 241, 0.18), transparent 70%),
        radial-gradient(50% 50% at 85% 20%, rgba(245, 158, 11, 0.18), transparent 70%),
        radial-gradient(60% 60% at 50% 100%, rgba(99, 102, 241, 0.12), transparent 70%);
    z-index: -1;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--slate-200) 1px, transparent 1px),
                      linear-gradient(90deg, var(--slate-200) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, #000 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, #000 30%, transparent 70%);
    opacity: 0.55;
    z-index: -1;
}

.hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    margin: 0 0 18px;
    background: linear-gradient(135deg, var(--slate-900), var(--primary-700) 60%, var(--accent-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .tagline {
    font-size: 1.15rem;
    color: var(--accent-600);
    font-weight: 600;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
}

.hero > .container > p {
    max-width: 720px;
    margin: 0 auto 32px;
    color: var(--slate-600);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero .btn-group { margin-top: 8px; }

/* =========================================================================
   Sections
   ========================================================================= */
.section { padding: 100px 0; }
.section-alt {
    background: linear-gradient(180deg, var(--slate-50), var(--bg));
    border-top: 1px solid var(--slate-100);
    border-bottom: 1px solid var(--slate-100);
}

.section-title {
    text-align: center;
    margin: 0 0 14px;
    color: var(--slate-900);
}
.section-subtitle {
    text-align: center;
    color: var(--slate-500);
    max-width: 640px;
    margin: 0 auto 56px;
    font-size: 1.05rem;
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.22s var(--ease);
    white-space: nowrap;
    letter-spacing: -0.005em;
    font-family: inherit;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    color: #fff;
    box-shadow: 0 14px 40px -10px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--accent-400), var(--accent-600));
    color: #fff;
    box-shadow: var(--shadow-glow-accent);
}
.btn-secondary:hover {
    color: #fff;
    box-shadow: 0 14px 40px -10px rgba(245, 158, 11, 0.6);
}

.btn-outline {
    background: var(--surface);
    color: var(--slate-800);
    border-color: var(--slate-300);
    box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
    color: var(--primary-700);
    border-color: var(--primary-300);
    background: var(--primary-50);
}

.btn-group {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* =========================================================================
   Feature cards
   ========================================================================= */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}

.feature-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    box-shadow: var(--shadow-sm);
    transition: all 0.28s var(--ease);
    overflow: hidden;
    isolation: isolate;
}
.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-50), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    z-index: -1;
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-200);
    box-shadow: var(--shadow-lg);
}
.feature-card:hover::before { opacity: 1; }

.feature-card h3 {
    margin: 14px 0 8px;
    color: var(--slate-900);
    font-size: 1.15rem;
    font-weight: 700;
}
.feature-card p {
    margin: 0;
    color: var(--slate-600);
    font-size: 0.95rem;
    line-height: 1.65;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    color: #fff;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.5);
}

/* =========================================================================
   Pricing
   ========================================================================= */
.pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
    max-width: 1080px;
    margin: 0 auto;
}

.price-card {
    background: var(--surface);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    box-shadow: var(--shadow-sm);
    text-align: left;
    transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
    display: flex;
    flex-direction: column;
}
.price-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.price-card h3 {
    margin: 0 0 6px;
    color: var(--slate-900);
    font-size: 1.15rem;
    font-weight: 700;
}

.price-card.featured {
    position: relative;
    border: 2px solid transparent;
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(135deg, var(--primary-500), var(--accent-500)) border-box;
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}
.price-card.featured::after {
    content: "MOST POPULAR";
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.price {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--slate-900);
    margin: 16px 0 10px;
    letter-spacing: -0.03em;
    line-height: 1;
}
.price small {
    font-size: 0.85rem;
    color: var(--slate-500);
    font-weight: 500;
    letter-spacing: 0;
}

.price-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 24px 0 0;
}
.price-card li {
    padding: 10px 0 10px 30px;
    border-bottom: 1px solid var(--slate-100);
    font-size: 0.92rem;
    position: relative;
    color: var(--slate-700);
}
.price-card li:last-child { border-bottom: none; }
.price-card li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success-light) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310B981'><path fill-rule='evenodd' d='M16.7 5.3a1 1 0 010 1.4l-7 7a1 1 0 01-1.4 0l-3-3a1 1 0 011.4-1.4L9 11.6l6.3-6.3a1 1 0 011.4 0z' clip-rule='evenodd'/></svg>") center / 14px no-repeat;
}
.price-card li.no {
    color: var(--slate-400);
    text-decoration: line-through;
    text-decoration-color: var(--slate-300);
}
.price-card li.no:before {
    background: var(--slate-100) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394A3B8'><path fill-rule='evenodd' d='M4.3 4.3a1 1 0 011.4 0L10 8.6l4.3-4.3a1 1 0 111.4 1.4L11.4 10l4.3 4.3a1 1 0 01-1.4 1.4L10 11.4l-4.3 4.3a1 1 0 01-1.4-1.4L8.6 10 4.3 5.7a1 1 0 010-1.4z' clip-rule='evenodd'/></svg>") center / 14px no-repeat;
}

/* =========================================================================
   Content pages
   ========================================================================= */
.content-page {
    background: var(--surface);
    padding: 80px 0 100px;
}
.content-page .container { max-width: 880px; }
.content-page h1 {
    color: var(--slate-900);
    margin: 0 0 8px;
}
.content-page h2 {
    color: var(--slate-900);
    margin-top: 42px;
    padding-top: 8px;
    border-top: 1px solid var(--slate-100);
}
.content-page h2:first-of-type { border-top: none; padding-top: 0; margin-top: 32px; }
.content-page h3 {
    color: var(--slate-800);
    margin-top: 26px;
    font-size: 1.1rem;
}
.content-page .updated {
    color: var(--slate-500);
    font-size: 0.92rem;
    margin: 0 0 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--slate-100);
}
.content-page p,
.content-page li { color: var(--slate-700); }
.content-page ul, .content-page ol { line-height: 1.85; padding-left: 22px; }
.content-page li { margin-bottom: 4px; }
.content-page strong { color: var(--slate-900); }

/* FAQ */
.faq-item {
    background: var(--surface);
    border: 1px solid var(--slate-200);
    border-left: 4px solid var(--accent-500);
    padding: 20px 24px;
    border-radius: var(--radius);
    margin: 14px 0;
    box-shadow: var(--shadow-xs);
    transition: all 0.22s var(--ease);
}
.faq-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
    border-left-color: var(--primary-500);
}
.faq-item h3 {
    margin: 0 0 8px;
    color: var(--slate-900);
    font-size: 1.02rem;
    font-weight: 700;
}
.faq-item p {
    margin: 0;
    color: var(--slate-600);
    font-size: 0.95rem;
}

/* Boxes */
.info-box {
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border: 1px solid var(--primary-200);
    color: var(--primary-900);
    padding: 18px 22px;
    border-radius: var(--radius);
    margin: 20px 0;
    line-height: 1.65;
}
.info-box strong { color: var(--primary-900); }
.info-box p { margin: 6px 0; color: var(--primary-900); }
.info-box p:first-child { margin-top: 0; }
.info-box p:last-child { margin-bottom: 0; }
.info-box a { color: var(--primary-700); font-weight: 600; }

.warning-box {
    background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
    border: 1px solid #FDBA74;
    color: #9A3412;
    padding: 18px 22px;
    border-radius: var(--radius);
    margin: 20px 0;
}
.warning-box ul { margin: 0; color: #9A3412; }

/* =========================================================================
   Forms
   ========================================================================= */
.form-card {
    background: var(--surface);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
    max-width: 720px;
    margin: 0 auto;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--slate-800);
    font-size: 0.9rem;
    letter-spacing: -0.005em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-size: 0.98rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--slate-900);
    transition: all 0.18s var(--ease);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--slate-400); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* =========================================================================
   Contact grid
   ========================================================================= */
.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin: 28px 0;
}
.contact-card {
    background: var(--surface);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-xs);
    transition: all 0.22s var(--ease);
}
.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-200);
    box-shadow: var(--shadow);
}
.contact-card h4 {
    margin: 10px 0 6px;
    color: var(--slate-900);
    font-size: 1rem;
    font-weight: 700;
}
.contact-card p { margin: 0; color: var(--slate-600); font-size: 0.92rem; }
.contact-icon { font-size: 1.6rem; }

/* =========================================================================
   Tables (admin)
   ========================================================================= */
table {
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: var(--radius) !important;
    overflow: hidden;
    border: 1px solid var(--slate-200);
}
table thead tr {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800)) !important;
}
table th {
    color: #fff !important;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
table tbody tr:hover { background: var(--slate-50); }
table tbody td { color: var(--slate-700); font-size: 0.92rem; }

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
    background: linear-gradient(180deg, var(--slate-900), #0a0f1c);
    color: var(--slate-300);
    padding: 70px 0 28px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}
.footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-500), var(--accent-500), transparent);
}
.footer h4 {
    color: #fff;
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.005em;
}
.footer p { color: var(--slate-400); font-size: 0.9rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li {
    padding: 5px 0;
    font-size: 0.9rem;
    color: var(--slate-400);
}
.footer a {
    color: var(--slate-300);
    transition: color 0.18s var(--ease);
}
.footer a:hover { color: #fff; text-decoration: none; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
}

.footer-bottom {
    border-top: 1px solid var(--slate-800);
    margin-top: 44px;
    padding-top: 22px;
    font-size: 0.85rem;
    color: var(--slate-500);
    text-align: center;
}
.footer-bottom p { margin: 0; color: var(--slate-500); }

/* =========================================================================
   Animations
   ========================================================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero h1,
.hero .tagline,
.hero > .container > p,
.hero .btn-group {
    animation: fadeUp 0.7s var(--ease-out) both;
}
.hero .tagline { animation-delay: 0.08s; }
.hero > .container > p { animation-delay: 0.16s; }
.hero .btn-group { animation-delay: 0.24s; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 960px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 720px) {
    :root { --header-h: auto; }
    .container { padding: 0 18px; }
    .header-inner { padding: 14px 0; height: auto; }
    .nav { width: 100%; gap: 2px; overflow-x: auto; padding-bottom: 4px; }
    .nav a { padding: 7px 12px; font-size: 0.88rem; white-space: nowrap; }

    .hero { padding: 70px 0 60px; }
    .section { padding: 70px 0; }
    .content-page { padding: 60px 0 80px; }

    .price-card.featured { transform: none; }
    .form-card { padding: 24px; }
    .footer-grid { grid-template-columns: 1fr; }

    .btn-group { width: 100%; }
    .btn { flex: 1 1 auto; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .section-title { font-size: 1.6rem; }
    .price { font-size: 2.1rem; }
}

/* Print-friendly */
@media print {
    .header, .footer, .btn-group, .btn { display: none !important; }
    .content-page { padding: 0; }
}
