@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Quicksand:wght@400;500;600;700&display=swap');

:root {
    /* Claymorphism — design-guide tokens */
    --color-canvas: #FFFDF9;
    --color-surface-base: #FFFFFF;
    --color-accent-primary: #FF6B35;
    --color-accent-soft: #FFEFED;
    --color-text-main: #2D1E18;
    --color-text-muted: #6E5D53;

    --radius-clay: 2.5rem;
    --radius-dense: 1.5rem;

    --clay-shadow-white:
        12px 16px 32px rgba(45, 30, 24, 0.06),
        inset -6px -8px 12px rgba(45, 30, 24, 0.04),
        inset 6px 8px 12px rgba(255, 255, 255, 1);
    --clay-shadow-white-hover:
        14px 20px 40px rgba(45, 30, 24, 0.05),
        inset -6px -8px 12px rgba(45, 30, 24, 0.05),
        inset 6px 8px 12px rgba(255, 255, 255, 1);
    --clay-shadow-white-active:
        4px 6px 16px rgba(45, 30, 24, 0.04),
        inset -8px -10px 16px rgba(45, 30, 24, 0.06),
        inset 6px 8px 12px rgba(255, 255, 255, 0.9);
    --clay-shadow-accent:
        0px 12px 24px rgba(255, 107, 53, 0.25),
        inset -4px -6px 10px rgba(0, 0, 0, 0.15),
        inset 4px 6px 10px rgba(255, 255, 255, 0.4);
    --clay-shadow-accent-hover:
        0px 16px 32px rgba(255, 107, 53, 0.22),
        inset -4px -6px 10px rgba(0, 0, 0, 0.12),
        inset 4px 6px 10px rgba(255, 255, 255, 0.45);
    --clay-shadow-accent-active:
        0px 4px 8px rgba(255, 107, 53, 0.15),
        inset -6px -8px 14px rgba(0, 0, 0, 0.2),
        inset 4px 6px 10px rgba(255, 255, 255, 0.25);
    --clay-transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.3),
        box-shadow 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.3);

    /* Legacy aliases → clay tokens */
    --brand-50: var(--color-accent-soft);
    --brand-100: #FFE4DE;
    --brand-200: #FFD0C4;
    --brand-300: #FFB89A;
    --brand-400: #FF8F5C;
    --brand-500: var(--color-accent-primary);
    --brand-600: #E85A28;
    --brand-700: #C44A20;

    --primary: var(--color-accent-primary);
    --primary-dark: var(--brand-600);
    --primary-light: var(--color-accent-soft);

    --success: #10b981;
    --accent: #0d9488;
    --danger: #ef4444;

    --bg: var(--color-canvas);
    --surface: var(--color-surface-base);
    --surface-2: rgba(45, 30, 24, 0.04);
    --text: var(--color-text-main);
    --muted: var(--color-text-muted);
    --border: rgba(45, 30, 24, 0.1);

    --bg-body: var(--bg);
    --bg-surface: var(--surface);
    --text-main: var(--text);
    --text-light: var(--muted);
    --border-color: var(--border);

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: var(--radius-dense);
    --radius-xl: var(--radius-clay);

    --shadow-sm: var(--clay-shadow-white);
    --shadow-md: var(--clay-shadow-white);
    --shadow-lg: var(--clay-shadow-white);

    --accent-50: #ecfdf5;
    --accent-100: #ccfbf1;
    --accent-500: var(--accent);
    --accent-600: #0f766e;

    --font-heading: 'Fredoka', 'Outfit', sans-serif;
    --font-body: 'Quicksand', 'Inter', sans-serif;

    /* Joyful Palette */
    --joy-yellow: #FFD93D;
    --joy-teal: #6BCBCA;
    --joy-purple: #9B72AA;
    --joy-pink: #FF6B6B;
    --joy-gradient: linear-gradient(135deg, #FF6B35 0%, #FFD93D 100%);
}

/* Joyful Utility Classes */
.joy-blob {
    position: absolute;
    z-index: 0;
    filter: blur(40px);
    opacity: 0.15;
    pointer-events: none;
}

.joy-blob--1 {
    width: 300px;
    height: 300px;
    background: var(--joy-yellow);
    top: -100px;
    right: -50px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: blob-float 20s infinite alternate;
}

.joy-blob--2 {
    width: 250px;
    height: 250px;
    background: var(--joy-teal);
    bottom: -50px;
    left: -50px;
    border-radius: 60% 40% 30% 70% / 50% 30% 70% 50%;
    animation: blob-float 25s infinite alternate-reverse;
}

@keyframes blob-float {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(30px, -50px) rotate(10deg) scale(1.1); }
    66% { transform: translate(-20px, 20px) rotate(-5deg) scale(0.9); }
    100% { transform: translate(0, 0) rotate(0deg) scale(1); }
}

.joy-text-highlight {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.joy-text-highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: -2px;
    right: -2px;
    height: 8px;
    background: var(--joy-yellow);
    opacity: 0.4;
    z-index: -1;
    border-radius: 4px;
    transform: skewX(-10deg);
}

.joy-card-hover:hover {
    transform: translateY(-8px) scale(1.03) rotate(1deg);
}

.squiggle {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

.squiggle--hero {
    top: 10%;
    right: 15%;
    width: 120px;
    height: auto;
    color: var(--joy-yellow);
    animation: squiggle-float 10s infinite alternate;
}

@keyframes squiggle-float {
    0% { transform: rotate(0deg) translate(0, 0); }
    100% { transform: rotate(10deg) translate(10px, -10px); }
}

.joy-arrow {
    position: absolute;
    width: 60px;
    height: auto;
    color: var(--color-accent-primary);
    opacity: 0.8;
}

.joy-arrow--1 {
    bottom: -40px;
    left: -40px;
    transform: rotate(45deg);
}

.joy-sparkle {
    position: absolute;
    width: 24px;
    height: auto;
    color: var(--joy-yellow);
    animation: sparkle-pulse 2s ease-in-out infinite;
}

@keyframes sparkle-pulse {
    0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.2) rotate(45deg); opacity: 1; }
}


/* Clay utility classes */
.clay-surface-white {
    background-color: var(--color-surface-base);
    border-radius: var(--radius-clay);
    box-shadow: var(--clay-shadow-white);
}

.clay-surface-accent {
    background-color: var(--color-accent-primary);
    color: #FFFFFF;
    border-radius: var(--radius-dense);
    box-shadow: var(--clay-shadow-accent);
}

.clay-interactive {
    transition: var(--clay-transition);
    border: none;
}

.clay-interactive:hover {
    transform: scale(1.015) translateY(-2px);
    box-shadow: var(--clay-shadow-white-hover);
}

.clay-interactive:active {
    transform: scale(0.985) translateY(1px);
    box-shadow: var(--clay-shadow-white-active);
}

.clay-surface-accent.clay-interactive:hover,
.clay-btn:hover,
.btn-primary:hover {
    transform: scale(1.02) translateY(-3px);
    box-shadow: var(--clay-shadow-accent-hover);
}

.clay-surface-accent.clay-interactive:active,
.clay-btn:active,
.btn-primary:active {
    transform: scale(0.97) translateY(1px);
    box-shadow: var(--clay-shadow-accent-active);
}

.clay-card {
    background-color: var(--color-surface-base);
    border-radius: var(--radius-clay);
    box-shadow: var(--clay-shadow-white);
    border: none;
    transition: var(--clay-transition);
}

.clay-card.clay-interactive:hover,
.clay-card:hover {
    transform: scale(1.01) translateY(-4px);
    box-shadow: var(--clay-shadow-white-hover);
}

.clay-card.clay-interactive:active,
.clay-card:active {
    transform: scale(0.99) translateY(1px);
    box-shadow: var(--clay-shadow-white-active);
}


.clay-btn,
.btn-primary {
    background: var(--color-accent-primary);
    color: #FFFFFF;
    border-radius: var(--radius-dense);
    box-shadow: var(--clay-shadow-accent);
    border: none;
    transition: var(--clay-transition);
}

.clay-btn--ghost {
    background: var(--color-surface-base);
    color: var(--color-text-main);
    box-shadow: var(--clay-shadow-white);
}

.clay-input {
    background: var(--color-surface-base);
    border-radius: var(--radius-dense);
    box-shadow: var(--clay-shadow-white);
    border: none;
    color: var(--color-text-main);
    transition: var(--clay-transition);
}

.clay-input:focus {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    :root {
        --clay-shadow-white:
            8px 10px 20px rgba(45, 30, 24, 0.05),
            inset -4px -5px 8px rgba(45, 30, 24, 0.04),
            inset 4px 5px 8px rgba(255, 255, 255, 1);
        --clay-shadow-accent:
            0px 8px 16px rgba(255, 107, 53, 0.2),
            inset -3px -4px 8px rgba(0, 0, 0, 0.15),
            inset 3px 4px 8px rgba(255, 255, 255, 0.35);
    }
}

@media (prefers-reduced-motion: reduce) {
    .clay-interactive,
    .clay-card,
    .clay-btn,
    .btn-primary {
        transition: none;
    }
    .clay-interactive:hover,
    .clay-card:hover,
    .clay-btn:hover,
    .btn-primary:hover {
        transform: none;
    }
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, opacity 0.2s ease;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Container */
.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Sections — single source of truth; overflow clips reveal jitter */
.section {
    padding: clamp(4rem, 10vw, 8rem) 0;
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
}

/* Layout Grids - Mobile First */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    align-items: center;
}

.exercises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

/* Exercises Section Optimization */
.section-exercises {
    background: var(--bg);
    overflow: visible !important; /* Allow 3D transforms to peek out */
    z-index: 1;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        perspective: 2000px;
    }
}

.bento-panel {
    display: flex;
    flex-direction: column;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-clay);
    border: none;
    background: var(--color-surface-base);
    box-shadow: var(--clay-shadow-white);
    transition: var(--clay-transition);
    transform-style: preserve-3d;
    height: 100%;
}

.bento-panel:hover {
    transform: scale(1.02);
    box-shadow: var(--clay-shadow-white-hover);
}

.bento-panel--speed { border-top: 4px solid var(--brand-500); }
.bento-panel--focus { border-top: 4px solid var(--success); }
.bento-panel--comp { border-top: 4px solid var(--accent); }

.bento-panel-head {
    margin-bottom: 2rem;
}

.bento-panel-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
}

/* Hero Card inside Bento - Lab look */
.exercise-card--hero {
    background: var(--color-accent-soft);
    border: none;
    border-radius: var(--radius-dense);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    box-shadow:
        6px 8px 20px rgba(45, 30, 24, 0.04),
        inset -4px -5px 8px rgba(45, 30, 24, 0.03),
        inset 4px 5px 8px rgba(255, 255, 255, 0.9);
}

.exercise-card--hero .card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exercise-card--hero h3 {
    font-size: 1.4rem;
    color: var(--text);
    margin: 0;
}

.exercise-card--hero p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--muted);
}

.exercise-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 99px;
    margin-top: 0.25rem;
    border: 1px solid var(--brand-100);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

/* Sub-cards Grid - Improved responsiveness */
.bento-panel-subs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exercise-card--sub {
    background: var(--color-surface-base);
    border: none;
    border-radius: var(--radius-dense);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    box-shadow:
        6px 8px 18px rgba(45, 30, 24, 0.04),
        inset -3px -4px 8px rgba(45, 30, 24, 0.03),
        inset 3px 4px 8px rgba(255, 255, 255, 1);
    transition: var(--clay-transition);
    -webkit-tap-highlight-color: transparent;
}

.exercise-card--sub:hover {
    background: var(--color-accent-soft);
    transform: scale(1.02);
    box-shadow: var(--clay-shadow-white-hover);
}

.exercise-card--sub:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
}

.exercise-card--sub-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
}

.exercise-card--sub-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.exercise-card--sub-title {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
    color: var(--text);
}

.exercise-card--sub-chevron {
    flex-shrink: 0;
    margin-left: auto;
    color: var(--muted);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.exercise-card--sub[aria-expanded="true"] .exercise-card--sub-chevron {
    transform: rotate(180deg);
}

.exercise-card--sub-chevron-icon {
    display: block;
}

/* max-height accordion: grid 0fr/1fr fails inside flex (min-height:auto blocks collapse) */
.exercise-card--sub-detail {
    flex: 0 0 auto;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.exercise-card--sub[aria-expanded="true"] .exercise-card--sub-detail {
    max-height: 18rem;
}

.exercise-card--sub-detail-inner {
    display: block;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
}

.exercise-card--sub[aria-expanded="true"] .exercise-card--sub-detail-inner {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border);
}

@media (prefers-reduced-motion: reduce) {
    .exercise-card--sub-detail {
        transition: none;
    }
    .exercise-card--sub-chevron {
        transition: none;
    }
}

.exercise-card--sub .icon {
    width: 36px;
    height: 36px;
    color: var(--brand-600);
    flex-shrink: 0;
    opacity: 0.8;
}

/* Lab visualizations — metaphors: rhythm (WPM), scan (focus), left→right flow (comprehension) */
.lab-visualization {
    height: 80px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin: 0.5rem 0;
}

/* Speed: vertical “meter” bars — scale only, bottom-anchored (reading rhythm) */
.lab-visualization--speed .bar-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 36px;
}

.lab-visualization--speed .bar {
    width: 6px;
    height: 32px;
    background: var(--brand-500);
    border-radius: 3px;
    transform-origin: bottom center;
    animation: wpm-meter 1.2s ease-in-out infinite;
}

.lab-visualization--speed .bar:nth-child(1) { animation-delay: 0s; }
.lab-visualization--speed .bar:nth-child(2) { animation-delay: 0.15s; }
.lab-visualization--speed .bar:nth-child(3) { animation-delay: 0.3s; }

@keyframes wpm-meter {
    0%, 100% { transform: scaleY(0.28); opacity: 0.55; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Focus: sweep originates from disc center (radar metaphor) */
.lab-visualization--focus .radar-scene {
    position: relative;
    width: 56px;
    height: 56px;
}

.lab-visualization--focus .radar-circle {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(16, 185, 129, 0.35);
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
}

.lab-visualization--focus .radar-sweep {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50%;
    height: 2px;
    margin-top: -1px;
    transform-origin: 0 50%;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.95), rgba(16, 185, 129, 0));
    border-radius: 1px;
    animation: radar-sweep 2.4s linear infinite;
}

@keyframes radar-sweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Comprehension: path draws left→right; dots reinforce “sequence” */
.lab-visualization--comp {
    color: var(--accent-600);
}

.lab-visualization--comp .comp-flow-svg {
    display: block;
}

.lab-visualization--comp .comp-path {
    stroke: currentColor;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: comp-path-draw 2.5s ease-in-out infinite;
}

.lab-visualization--comp .comp-dot {
    fill: currentColor;
    animation: comp-dot-seq 2.5s ease-in-out infinite;
}

.lab-visualization--comp .comp-dot:nth-child(2) { animation-delay: 0s; }
.lab-visualization--comp .comp-dot:nth-child(3) { animation-delay: 0.35s; }
.lab-visualization--comp .comp-dot:nth-child(4) { animation-delay: 0.7s; }

@keyframes comp-path-draw {
    0% { stroke-dashoffset: 100; opacity: 0.5; }
    35% { stroke-dashoffset: 0; opacity: 1; }
    70% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 100; opacity: 0.5; }
}

@keyframes comp-dot-seq {
    0%, 100% { opacity: 0.35; }
    20%, 60% { opacity: 1; }
}

/* Responsive Adjustments for Bento */
@media (max-width: 640px) {
    .bento-panel-subs {
        grid-template-columns: 1fr;
    }
    .exercise-card--sub-row {
        align-items: flex-start;
    }
    .exercise-card--sub-title {
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .two-col-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }
}

/* Steps Section */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    position: relative;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .steps-grid::before {
        content: '';
        position: absolute;
        top: 32px;
        left: 10%;
        width: 80%;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--brand-200), transparent);
        z-index: 0;
    }
}

.step-item {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 64px;
    height: 64px;
    background: var(--surface);
    border: 2px solid var(--brand-500);
    color: var(--brand-600);
    font-weight: 800;
    font-size: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.step-item:hover .step-number {
    transform: scale(1.08);
    background: var(--color-accent-primary);
    color: white;
    box-shadow: var(--clay-shadow-accent);
}

.step-item h3 { margin-bottom: 0.75rem; font-size: 1.25rem; }
.step-item p { color: var(--muted); font-size: 0.95rem; }

/* User Roles Section */
.section-roles {
    background: var(--surface);
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
}

.roles-wrapper {
    background: var(--color-surface-base);
    border: none;
    border-radius: var(--radius-clay);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--clay-shadow-white);
}

@media (min-width: 992px) {
    .roles-wrapper { flex-direction: row; }
}

.role-side {
    flex: 1;
    padding: clamp(2.5rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.role-side.students {
    background: linear-gradient(135deg, #ffffff 0%, var(--brand-50) 100%);
    border-bottom: 1px solid var(--border);
}

@media (min-width: 992px) {
    .role-side.students {
        border-bottom: none;
        border-right: 1px solid var(--border);
    }
}

.role-side.instructors {
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-50) 100%);
}

.role-side:hover {
    background-color: white;
}

.role-side h3 { font-size: 2rem; margin-bottom: 1rem; }
.role-side p { font-size: 1.1rem; color: var(--muted); margin-bottom: 2rem; }

.role-side ul { list-style: none; }
.role-side ul li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.4;
}

.role-side ul li strong { color: var(--text); }

/* Blog Preview */
.blog-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .blog-preview-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
    background: var(--color-surface-base);
    border-radius: var(--radius-clay);
    overflow: hidden;
    border: none;
    box-shadow: var(--clay-shadow-white);
    transition: var(--clay-transition);
}

.blog-card:hover {
    transform: scale(1.02);
    box-shadow: var(--clay-shadow-white-hover);
}

.blog-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--surface-2);
    object-fit: cover;
}

.blog-body {
    padding: 1.5rem;
}

.blog-body h4 { margin-bottom: 0.75rem; }
.blog-body p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.blog-date { font-size: 0.8rem; color: var(--brand-500); font-weight: 700; text-transform: uppercase; }

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    z-index: 100;
    transition: background 0.4s ease, box-shadow 0.4s ease;
    background: rgba(255, 253, 249, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.8);
}

.navbar.scrolled {
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
    box-shadow:
        0 8px 24px rgba(45, 30, 24, 0.04),
        inset 0 -1px 0 rgba(255, 255, 255, 0.9);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-600);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.brand-logo span {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 0.25rem; /* Tighter gap */
    align-items: center;
    margin-left: auto; /* Force to right */
}

.nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    opacity: 0.8;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-600);
    background: var(--brand-50);
    opacity: 1;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: var(--color-surface-base);
    color: var(--brand-600);
    padding: 0.6rem;
    border-radius: var(--radius-dense);
    box-shadow: var(--clay-shadow-white);
    transition: var(--clay-transition);
}

.mobile-menu-btn:hover {
    background: var(--color-accent-soft);
    transform: scale(1.02);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 253, 249, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.mobile-menu-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-700);
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: var(--brand-100);
    transform: rotate(90deg);
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-link {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(45, 30, 24, 0.06);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Link Animations */
.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-link:nth-child(6) { transition-delay: 0.35s; }

.mobile-link.active {
    color: var(--brand-600);
}

.mobile-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.45s;
}

.mobile-menu.active .mobile-actions {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-dense);
    font-weight: 600;
    transition: var(--clay-transition);
    border: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-ghost {
    background: var(--color-surface-base);
    color: var(--color-text-muted);
    box-shadow:
        6px 8px 18px rgba(45, 30, 24, 0.04),
        inset -3px -4px 8px rgba(45, 30, 24, 0.03),
        inset 3px 4px 8px rgba(255, 255, 255, 1);
}

.btn-ghost:hover {
    background: var(--color-accent-soft);
    color: var(--color-text-main);
    transform: scale(1.02);
    box-shadow: var(--clay-shadow-white-hover);
}

.btn-ghost:active {
    transform: scale(0.96);
    box-shadow: var(--clay-shadow-white-active);
}

/* Utility Classes */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none;
    box-shadow: var(--clay-shadow-white);
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.center-text {
    text-align: center;
}

.section-header {
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.section-sub {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.55;
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 1.5rem;
}

/* Hero Section */
.hero-section {
    --hero-parallax-y: 0px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 100px;
    background:
        radial-gradient(circle at 70% 20%, var(--color-accent-soft) 0%, transparent 45%),
        radial-gradient(circle at 10% 80%, rgba(255, 239, 237, 0.6) 0%, transparent 40%),
        var(--color-canvas);
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

.hero-sub {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--muted);
    max-width: 800px;
    margin: 0 auto 3.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.hero-visual-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    transform: translate3d(0, var(--hero-parallax-y, 0px), 0);
    transition: transform 0.15s ease-out;
}

.floating-fragment {
    position: absolute;
    background: var(--color-surface-base);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 1.25rem;
    border-radius: var(--radius-dense);
    border: none;
    box-shadow: var(--clay-shadow-white);
    z-index: 2;
    transition: var(--clay-transition);
}

.floating-fragment-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Float on inner only — mouse parallax applies to outer .floating-fragment without fighting this */
.frag-1 .floating-fragment-inner { animation: float 7s ease-in-out infinite; }
.frag-2 .floating-fragment-inner { animation: float 9s ease-in-out infinite reverse; }
.frag-3 .floating-fragment-inner { animation: float 8s ease-in-out infinite 0.5s; }

.floating-fragment:hover {
    background: var(--color-surface-base);
    transform: scale(1.02);
    box-shadow: var(--clay-shadow-white-hover);
}

.frag-1 { top: 15%; left: 8%; }
.frag-2 { bottom: 15%; right: 8%; }
.frag-3 { top: 25%; right: 12%; }

@media (max-width: 1400px) {
    .frag-1 { left: 3%; max-width: min(220px, 28vw); }
    .frag-2 { right: 3%; max-width: min(200px, 26vw); }
    .frag-3 { right: 8%; max-width: min(200px, 26vw); }
}

/* Avoid overlap with centered hero copy on mid-width desktops */
@media (max-width: 1300px) and (min-width: 1025px) {
    .floating-fragment { display: none; }
}

@media (max-width: 1200px) {
    .frag-1 { left: 2%; }
    .frag-2 { right: 2%; }
}

@media (max-width: 1024px) {
    .floating-fragment { display: none; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Cards & Components */
.glass-card {
    background: var(--color-surface-base);
    border: none;
    border-radius: var(--radius-clay);
    padding: 2rem;
    box-shadow: var(--clay-shadow-white);
    transition: var(--clay-transition);
}

.glass-card:hover {
    transform: scale(1.02);
    box-shadow: var(--clay-shadow-white-hover);
}

.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: var(--brand-50);
    color: var(--brand-700);
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    border: 1px solid var(--brand-100);
}

/* Feature Cards (for grids) */
.feature-card {
    padding: 2.5rem;
    background: var(--color-surface-base);
    border: none;
    border-radius: var(--radius-clay);
    box-shadow: var(--clay-shadow-white);
    transition: var(--clay-transition);
}

.feature-card:hover {
    transform: scale(1.02);
    box-shadow: var(--clay-shadow-white-hover);
}

.step-icon {
    width: 64px;
    height: 64px;
    background: var(--brand-50);
    color: var(--brand-600);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

/* Lists */
.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.feature-list li strong {
    color: var(--text);
}

/* CTA Block */
.cta-block {
    background: var(--color-accent-primary);
    color: white;
    border-radius: var(--radius-clay);
    padding: 5rem 2rem;
    text-align: center;
    box-shadow: var(--clay-shadow-accent);
}

.cta-block h2 { color: white; }
.cta-block p { color: rgba(255, 255, 255, 0.8); }

/* Footer */
.site-footer {
    background: var(--surface);
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: 1.5fr repeat(3, 1fr);
    }
}

.footer-payment-logos {
    margin-bottom: 1.25rem;
}

.footer-payment-logos-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem 1.75rem;
}

.footer-payment-logos .pay-logo {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
}

.footer-payment-logos .pay-logo--iyzico {
    height: 35px;
}

.footer-payment-logos .pay-logo--mc {
    height: 25px;
}

.footer-payment-logos .pay-logo--visa {
    height: 20px;
}

/* Homepage — packages preview (index.html) */
.section-packages-preview {
    background: linear-gradient(180deg, var(--surface) 0%, var(--brand-50) 35%, var(--surface) 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.home-packages-grid {
    display: grid;
    gap: clamp(1.25rem, 3vw, 1.75rem);
    grid-template-columns: 1fr;
    margin-top: 2.5rem;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .home-packages-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.home-package-card {
    background: var(--color-surface-base);
    border: none;
    border-radius: var(--radius-clay);
    padding: clamp(1.35rem, 3vw, 1.85rem);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    box-shadow: var(--clay-shadow-white);
    transition: var(--clay-transition);
}

.home-package-card:hover {
    transform: scale(1.02);
    box-shadow: var(--clay-shadow-white-hover);
}

.home-package-card--student {
    border-top: 3px solid var(--brand-500);
}

.home-package-card--instructor {
    border-top: 3px solid var(--accent-500);
}

.home-package-card h3 {
    font-size: clamp(1.15rem, 2.5vw, 1.35rem);
    margin-bottom: 0.5rem;
}

.home-package-card .pkg-lead {
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.home-package-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.home-package-list li {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    margin-bottom: 0.65rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text);
}

.home-package-list li:last-child {
    margin-bottom: 0;
}

.home-package-list svg {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.home-packages-preview-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 2.25rem;
}

.home-packages-preview-note {
    text-align: center;
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 1.15rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

/* Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Extra stagger for grid children (blog) */
.blog-preview-grid .blog-card:nth-child(1).reveal-on-scroll { transition-delay: 0s; }
.blog-preview-grid .blog-card:nth-child(2).reveal-on-scroll { transition-delay: 0.08s; }
.blog-preview-grid .blog-card:nth-child(3).reveal-on-scroll { transition-delay: 0.16s; }

.home-packages-grid .home-package-card:nth-child(1).reveal-on-scroll { transition-delay: 0s; }
.home-packages-grid .home-package-card:nth-child(2).reveal-on-scroll { transition-delay: 0.1s; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-section { text-align: center; }
    .hero-content { margin: 0 auto; }
    .floating-fragment { display: none; }
}

@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-menu-btn { display: block; }
}

/* Live Demo Section Styles */
.demo-section {
    scroll-margin-top: 100px;
}

.demo-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    min-height: 400px;
}

.demo-phase {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-phase.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.demo-card {
    background: var(--color-surface-base);
    border-radius: var(--radius-clay);
    padding: clamp(1.25rem, 5vw, 3rem);
    box-shadow: var(--clay-shadow-white);
    border: none;
}

.demo-icon {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    background: var(--brand-50);
    color: var(--brand-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.demo-icon svg {
    width: 50%;
    height: 50%;
}

.demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
}

.demo-timer {
    font-weight: 700;
    color: var(--brand-600);
    font-variant-numeric: tabular-nums;
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    white-space: nowrap;
}

.demo-title {
    font-weight: 600;
    color: var(--muted);
    font-size: clamp(0.75rem, 3vw, 0.9rem);
    text-align: right;
}

.demo-text-content {
    font-size: clamp(1rem, 4.5vw, 1.15rem);
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 2rem;
    text-align: left; /* Changed from justify for better mobile readability */
    user-select: none;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar for demo text */
.demo-text-content::-webkit-scrollbar {
    width: 4px;
}
.demo-text-content::-webkit-scrollbar-track {
    background: var(--brand-50);
}
.demo-text-content::-webkit-scrollbar-thumb {
    background: var(--brand-200);
    border-radius: 2px;
}

.demo-actions {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

/* Question Styles */
.demo-question-content {
    margin-top: 0.5rem;
}

.question-text {
    font-size: clamp(1.1rem, 5vw, 1.25rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
    line-height: 1.4;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: clamp(0.85rem, 4vw, 1.25rem);
    background: var(--color-surface-base);
    border: none;
    border-radius: var(--radius-dense);
    text-align: left;
    box-shadow:
        6px 8px 18px rgba(45, 30, 24, 0.04),
        inset -3px -4px 8px rgba(45, 30, 24, 0.03),
        inset 3px 4px 8px rgba(255, 255, 255, 1);
    transition: var(--clay-transition);
    width: 100%;
    cursor: pointer;
}

.option-btn:hover {
    background: var(--color-accent-soft);
    transform: scale(1.02);
    box-shadow: var(--clay-shadow-white-hover);
}

.option-btn.selected {
    background: var(--color-accent-soft);
    box-shadow: var(--clay-shadow-white-active);
}

.option-btn.correct {
    border-color: var(--success);
    background: #ecfdf5;
}

.option-btn.wrong {
    border-color: var(--danger);
    background: #fef2f2;
}

.option-letter {
    width: 28px;
    height: 28px;
    background: var(--brand-100);
    color: var(--brand-700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.option-text {
    font-size: clamp(0.85rem, 3.5vw, 1rem);
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

/* Results Styles */
.results-card {
    border-top: 5px solid var(--success);
}

.success-icon {
    margin-bottom: 1rem;
}

.results-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--brand-50);
    border-radius: var(--radius-lg);
}

@media (min-width: 640px) {
    .results-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.stat-value {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    font-weight: 800;
    color: var(--brand-600);
    font-family: var(--font-heading);
    line-height: 1.2;
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.3;
}

.results-note {
    font-size: clamp(0.95rem, 4vw, 1.1rem);
    color: var(--text);
    margin-bottom: 2rem;
    font-weight: 500;
}

.results-footer {
    margin-top: 2rem;
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

@media (min-width: 640px) {
    .results-actions {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    
    .results-actions .btn {
        width: auto;
    }
}

/* Legal article pages — flat prose container */
.legal-content {
    padding: var(--spacing-xl) 0;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content .legal-card {
    padding: var(--spacing-lg);
}

.legal-content .legal-card h1 {
    margin-bottom: var(--spacing-md);
    font-size: clamp(2rem, 5vw, 2.5rem);
}

.legal-content .legal-card h2 {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
    color: var(--brand-600);
}

.legal-content .legal-card p,
.legal-content .legal-card li {
    line-height: 1.8;
    color: var(--text);
}

/* CTA on accent block — inverted ghost */
.cta-block .btn-ghost,
.cta-block .clay-btn--ghost,
.cta-block .cta-block-secondary {
    background: var(--color-surface-base);
    color: var(--color-accent-primary);
    box-shadow: var(--clay-shadow-white);
}

.cta-block .cta-block-secondary {
    color: var(--color-text-main);
}
