/* ============================================
   EduCoach — Main Stylesheet
   File: public/css/app.css
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ─── CSS VARIABLES ─── */
:root {
    --ink:     #0d0d0d;
    --cream:   #f5f0e8;
    --gold:    #d4a843;
    --saffron: #e8651a;
    --teal:    #1a7a6e;
    --light:   #faf8f3;
    --card-bg: #ffffff;
    --muted:   #6b6560;
}

/* ─── RESET ─── */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--light);
    color: var(--ink);
    overflow-x: hidden;
}
body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 9999; opacity: 0.4;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
}

/* ─── BUTTONS ─── */
.btn-outline {
    padding: 0.55rem 1.4rem;
    border: 1.5px solid var(--ink);
    border-radius: 2px;
    font-size: 0.85rem; font-weight: 600;
    color: var(--ink); text-decoration: none;
    transition: all 0.25s;
    letter-spacing: 0.03em;
    cursor: pointer; background: transparent;
}
.btn-outline:hover { background: var(--ink); color: var(--cream); }

.btn-fill {
    padding: 0.55rem 1.4rem;
    background: var(--saffron);
    border: 1.5px solid var(--saffron);
    border-radius: 2px;
    font-size: 0.85rem; font-weight: 600;
    color: #fff; text-decoration: none;
    transition: all 0.25s;
    letter-spacing: 0.03em;
    cursor: pointer;
}
.btn-fill:hover { background: #c9561a; border-color: #c9561a; }

.btn-hero {
    padding: 0.9rem 2.2rem;
    background: var(--ink);
    color: var(--cream);
    border-radius: 2px;
    font-size: 0.95rem; font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.25s;
    position: relative; overflow: hidden;
    display: inline-block;
}
.btn-hero::after { content: ' →'; transition: margin 0.2s; }
.btn-hero:hover { background: var(--saffron); color: white; }

.btn-ghost {
    font-size: 0.9rem; font-weight: 500;
    color: var(--muted); text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.4rem;
    transition: color 0.2s;
}
.btn-ghost:hover { color: var(--ink); }

.btn-cta-main {
    padding: 1rem 2rem;
    background: var(--saffron);
    color: white;
    border-radius: 4px;
    font-size: 0.95rem; font-weight: 600;
    text-decoration: none; text-align: center;
    letter-spacing: 0.02em;
    transition: all 0.25s;
    display: block;
}
.btn-cta-main:hover { background: #c9561a; color: white; }

.btn-cta-sec {
    padding: 1rem 2rem;
    border: 1.5px solid var(--ink);
    color: var(--ink);
    border-radius: 4px;
    font-size: 0.95rem; font-weight: 600;
    text-decoration: none; text-align: center;
    transition: all 0.25s;
    display: block;
}
.btn-cta-sec:hover { background: var(--ink); color: var(--cream); }

/* ─── SECTION UTILITIES ─── */
.section-eyebrow {
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 1rem;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.section-sub {
    font-size: 0.95rem; font-weight: 300;
    max-width: 480px;
    line-height: 1.7;
    margin-bottom: 3.5rem;
    color: var(--muted);
}

/* ─── HERO ─── */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 7rem 5% 4rem;
    gap: 4rem;
    position: relative; overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute; right: -10%; top: 10%;
    width: 55%; height: 80%;
    background: radial-gradient(ellipse at center, rgba(212,168,67,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(212,168,67,0.15);
    border: 1px solid rgba(212,168,67,0.4);
    border-radius: 100px;
    padding: 0.35rem 1rem;
    font-size: 0.78rem; font-weight: 600;
    color: #8a6a1a; letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.6s ease both;
}
.badge-dot {
    width: 6px; height: 6px;
    background: var(--gold); border-radius: 50%;
    animation: pulse 1.5s infinite;
}
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.08; letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    animation: fadeUp 0.7s 0.1s ease both;
}
.hero h1 em { font-style: italic; color: var(--saffron); }
.hero p {
    font-size: 1.05rem; color: var(--muted);
    line-height: 1.7; max-width: 480px;
    margin-bottom: 2.5rem; font-weight: 300;
    animation: fadeUp 0.7s 0.2s ease both;
}
.hero-actions {
    display: flex; gap: 1rem; align-items: center;
    flex-wrap: wrap;
    animation: fadeUp 0.7s 0.3s ease both;
}
.hero-stats {
    display: flex; gap: 2.5rem; margin-top: 3rem;
    animation: fadeUp 0.7s 0.4s ease both;
}
.stat-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem; font-weight: 900; color: var(--ink);
}
.stat-item p { font-size: 0.8rem; color: var(--muted); font-weight: 400; margin: 0; }

/* ─── HERO DASHBOARD CARD ─── */
.hero-visual { position: relative; animation: fadeIn 1s 0.3s ease both; }
.dashboard-card {
    background: var(--card-bg);
    border-radius: 16px; padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid rgba(212,168,67,0.15);
}
.dash-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.2rem;
}
.dash-title { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; }
.dash-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--saffron), var(--gold));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; color: white;
}
.dash-stats-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.8rem; margin-bottom: 1.2rem;
}
.dash-stat {
    background: var(--light); border-radius: 10px; padding: 0.8rem 1rem;
}
.dash-stat-label {
    font-size: 0.7rem; color: var(--muted); font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.dash-stat-val {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem; font-weight: 700; color: var(--ink); margin-top: 0.1rem;
}
.dash-stat-val.green  { color: var(--teal); }
.dash-stat-val.orange { color: var(--saffron); }
.progress-bar {
    background: #ede9df; border-radius: 100px;
    height: 6px; overflow: hidden; margin-top: 0.4rem;
}
.progress-fill {
    height: 100%; border-radius: 100px;
    background: linear-gradient(90deg, var(--saffron), var(--gold));
}
.dash-classes { margin-top: 0.8rem; }
.class-item {
    display: flex; align-items: center; gap: 0.8rem;
    padding: 0.6rem 0; border-bottom: 1px solid var(--light);
}
.class-item:last-child { border: none; }
.class-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.class-info { flex: 1; }
.class-name  { font-size: 0.82rem; font-weight: 600; }
.class-time  { font-size: 0.72rem; color: var(--muted); }
.class-badge {
    font-size: 0.68rem; font-weight: 600;
    padding: 0.2rem 0.6rem; border-radius: 100px;
}
.live     { background: rgba(232,101,26,0.12); color: var(--saffron); }
.upcoming { background: rgba(26,122,110,0.1);  color: var(--teal); }

/* Floating cards */
.float-card {
    position: absolute; background: white;
    border-radius: 12px; padding: 0.8rem 1.2rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid rgba(212,168,67,0.2);
    font-size: 0.8rem; font-weight: 600;
    display: flex; align-items: center; gap: 0.5rem;
}
.float-1 { top: -20px; right: -20px; animation: float 3s ease-in-out infinite; }
.float-2 { bottom: 20px; left: -30px; animation: float 3.5s 0.5s ease-in-out infinite; }
.float-icon { font-size: 1.2rem; }

/* ─── ROLES SECTION ─── */
.roles {
    padding: 6rem 5%;
    background: var(--ink);
    position: relative; overflow: hidden;
}
.roles::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(212,168,67,0.08) 0%, transparent 60%);
}
.roles .section-title { color: var(--cream); }
.roles .section-sub   { color: rgba(245,240,232,0.5); }
.roles-grid {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem;
}
.role-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px; padding: 2rem;
    transition: all 0.3s; position: relative; overflow: hidden;
}
.role-card::before {
    content: ''; position: absolute; inset: 0;
    opacity: 0; transition: opacity 0.3s; border-radius: 16px;
}
.role-card.admin::before   { background: radial-gradient(ellipse at top left, rgba(232,101,26,0.15), transparent 70%); }
.role-card.teacher::before { background: radial-gradient(ellipse at top left, rgba(26,122,110,0.15), transparent 70%); }
.role-card.student::before { background: radial-gradient(ellipse at top left, rgba(212,168,67,0.15), transparent 70%); }
.role-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); }
.role-card:hover::before { opacity: 1; }
.role-icon  { font-size: 2.5rem; margin-bottom: 1.2rem; }
.role-name  {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem; font-weight: 700;
    color: var(--cream); margin-bottom: 0.6rem;
}
.role-desc  {
    font-size: 0.85rem; color: rgba(245,240,232,0.5);
    line-height: 1.6; margin-bottom: 1.5rem;
}
.role-features { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.role-features li {
    font-size: 0.82rem; color: rgba(245,240,232,0.7);
    display: flex; align-items: center; gap: 0.5rem;
}
.role-features li::before {
    content: '✓'; font-size: 0.7rem; font-weight: 700;
    width: 16px; height: 16px;
    background: rgba(212,168,67,0.2); color: var(--gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ─── FEATURES ─── */
.features {
    padding: 6rem 5%; background: var(--cream);
}
.features-header { max-width: 560px; margin-bottom: 4rem; }
.features-grid {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem;
}
.feature-card {
    background: white; border-radius: 14px; padding: 1.8rem;
    border: 1px solid rgba(0,0,0,0.06); transition: all 0.3s;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.feature-emoji { font-size: 1.8rem; margin-bottom: 1rem; }
.feature-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-bottom: 0.5rem;
}
.feature-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.6; }

/* ─── CTA ─── */
.cta-section {
    padding: 6rem 5%; background: var(--light);
    display: grid; grid-template-columns: 1fr auto;
    align-items: center; gap: 4rem;
}
.cta-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 900; letter-spacing: -1px; line-height: 1.1; color: var(--ink);
}
.cta-title em { color: var(--saffron); font-style: italic; }
.cta-sub { color: var(--muted); font-size: 0.95rem; margin-top: 0.8rem; font-weight: 300; }
.cta-buttons { display: flex; gap: 1rem; flex-direction: column; min-width: 200px; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; } 50% { opacity: 0.3; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding-top: 6rem; }
    .hero-visual { display: none; }
    .roles-grid, .features-grid { grid-template-columns: 1fr; }
    .cta-section { grid-template-columns: 1fr; }
}