/* ===== Design Tokens ===== */
:root {
    --orange: #F4890B;
    --orange-dark: #C9700A;
    --orange-light: #FEF3E2;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-700: #374151;
    --gray-900: #111827;
    --sunshine: #FFD60A;
    --max-width: 1100px;
    --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dark); }

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

/* ===== Nav ===== */
.nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e7eb;
    z-index: 100;
    padding: 12px 0;
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--gray-900);
}

.nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 22%;
}

.nav-title {
    font-size: 20px;
    font-weight: 700;
}

/* ===== Buttons ===== */
.btn-primary {
    background: var(--orange);
    color: white;
    border-radius: var(--radius);
    padding: 14px 28px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--orange-dark);
    color: white;
}

.btn-small {
    padding: 10px 20px;
    font-size: 16px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-tip-nav {
    display: inline-block;
    background: transparent;
    color: var(--gray-700);
    border: 1.5px solid #d1d5db;
    border-radius: var(--radius);
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.btn-tip-nav:hover {
    border-color: var(--orange);
    color: var(--orange);
}

/* ===== Hero ===== */
.hero {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, var(--orange-light) 0%, var(--white) 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 20px;
    margin-bottom: 32px;
    color: var(--gray-700);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-screenshot {
    flex: 0 0 280px;
}

.hero-screenshot img {
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ===== Features ===== */
.features {
    padding: 80px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

/* Center the 5th card when it's alone on the last row */
.feature-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 16px);
    margin: 0 auto;
}

.feature-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 32px;
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 16px;
    color: var(--gray-700);
}

/* ===== Screenshots ===== */
.screenshots {
    padding: 80px 0;
    background: var(--gray-50);
}

.screenshots-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.screenshot-frame {
    flex: 0 0 220px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    transform: rotate(-2deg);
    transition: transform 0.3s;
}

.screenshot-frame:nth-child(2) {
    transform: rotate(0deg);
}

.screenshot-frame:nth-child(3) {
    transform: rotate(2deg);
}

.screenshot-frame:hover {
    transform: rotate(0deg) scale(1.03);
}

.screenshot-frame img {
    width: 100%;
    display: block;
}

/* ===== Preview Video ===== */
.preview {
    padding: 80px 0;
}

.preview-wrapper {
    max-width: 360px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.preview-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== Grade Levels ===== */
.grades {
    padding: 80px 0;
}

.grades-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grade-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--orange-light);
    border-radius: var(--radius);
    color: var(--gray-900);
    text-decoration: none;
    display: block;
    transition: transform 0.2s;
}
.grade-card:hover { transform: translateY(-3px); }

.grade-card h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--orange);
    margin-bottom: 8px;
}

.grade-card .book-count {
    font-size: 40px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.grade-card .book-label {
    font-size: 16px;
    color: var(--gray-700);
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 14px;
    color: var(--gray-700);
}

.footer p {
    margin-bottom: 8px;
}

.footer a {
    color: var(--orange);
}

.btn-tip {
    display: inline-block;
    background: var(--orange-light);
    color: var(--orange-dark);
    border: 1.5px solid var(--orange);
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-tip:hover {
    background: var(--orange);
    color: white;
}

.disclaimer {
    font-style: italic;
    margin-bottom: 12px;
}

/* ===== Privacy Page ===== */
.privacy-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 24px;
}

.privacy-content h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.privacy-content .subtitle {
    font-size: 20px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.privacy-content .last-updated {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 40px;
}

.privacy-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-top: 32px;
    margin-bottom: 12px;
}

.privacy-content p {
    margin-bottom: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-screenshot {
        flex: 0 0 auto;
        max-width: 240px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-row {
        gap: 20px;
    }

    .screenshot-frame {
        flex: 0 0 160px;
    }

    .screenshot-frame,
    .screenshot-frame:nth-child(2),
    .screenshot-frame:nth-child(3) {
        transform: rotate(0deg);
    }

    .grades-grid {
        grid-template-columns: 1fr;
    }

    .nav-title {
        font-size: 16px;
    }

    .btn-primary {
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 28px;
    }

    .section-title {
        font-size: 26px;
    }

    .screenshot-frame {
        flex: 0 0 140px;
    }
}

/* ===== Book Lists — shared ===== */
.nav-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    padding: 8px 6px;
}
.nav-link:hover { color: var(--orange); }

.btn-outline {
    display: inline-block;
    background: transparent;
    color: var(--orange-dark);
    border: 1.5px solid var(--orange);
    border-radius: var(--radius);
    padding: 13px 26px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--orange); color: white; }

.breadcrumb {
    font-size: 14px;
    color: var(--gray-700);
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}
.breadcrumb .sep { color: #cbd5e1; margin: 0 2px; }
.breadcrumb span[aria-current] { color: var(--gray-900); font-weight: 600; }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 14px;
    font-weight: 700;
    color: var(--orange-dark);
    margin-bottom: 8px;
}
.eyebrow a { color: var(--orange-dark); }

/* List + hub pages */
.list-page { padding: 48px 0 72px; }
.list-header { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.list-header h1 {
    font-size: 38px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.15;
    margin-bottom: 16px;
}
.list-header p { font-size: 19px; }
.list-foot { text-align: center; margin-top: 40px; font-weight: 600; }

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 28px 20px;
    margin-bottom: 24px;
}
.book-tile {
    display: flex;
    flex-direction: column;
    text-align: center;
    color: var(--gray-900);
    text-decoration: none;
}
.book-tile-cover {
    width: 100%;
    aspect-ratio: 5 / 7;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.14);
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.book-tile:hover .book-tile-cover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.20);
}
.book-tile-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.book-tile-author { font-size: 13px; color: var(--gray-700); margin-top: 2px; }

/* Hub division cards */
.division-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 56px;
}
.division-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 32px 20px;
    background: var(--orange-light);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--gray-900);
    transition: transform 0.2s;
}
.division-card:hover { transform: translateY(-3px); }
.division-emoji { font-size: 36px; }
.division-name { font-size: 22px; font-weight: 700; color: var(--orange-dark); }
.division-grades { font-size: 15px; color: var(--gray-700); }
.division-count { font-size: 14px; font-weight: 600; color: var(--gray-900); }

.hub-all h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 40px 0 24px;
    padding-top: 8px;
}

/* Book detail */
.book-detail { padding: 40px 0 72px; }
.book-detail-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
}
.book-detail-cover img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 16px 44px rgba(0,0,0,0.20);
}
.book-detail-info h1 {
    font-size: 34px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.15;
    margin-bottom: 6px;
}
.book-author { font-size: 20px; color: var(--gray-700); margin-bottom: 20px; }
.book-synopsis { font-size: 18px; margin-bottom: 24px; }

.book-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
}
.book-meta dt {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-700);
    margin-bottom: 2px;
}
.book-meta dd { font-size: 17px; font-weight: 700; color: var(--gray-900); }

.book-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.affiliate-note { font-size: 13px; color: var(--gray-700); margin-bottom: 32px; }

.app-cta {
    background: linear-gradient(180deg, var(--orange-light) 0%, #fff 100%);
    border: 1px solid #f0d9b5;
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
}
.app-cta p { font-size: 17px; margin-bottom: 18px; color: var(--gray-900); }

/* Article / FAQ */
.article { max-width: 760px; margin: 0 auto; padding: 48px 24px 72px; }
.article h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 28px;
}
.article h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 32px 0 10px;
}
.article p { margin-bottom: 16px; }

@media (max-width: 768px) {
    .book-detail-grid { grid-template-columns: 1fr; gap: 28px; }
    .book-detail-cover { max-width: 240px; margin: 0 auto; }
    .division-cards { grid-template-columns: 1fr; }
    .list-header h1 { font-size: 30px; }
    .book-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 22px 16px; }
}
