/* ══════════════════════════════════════════
   TOGETHERWELEARN — Main Stylesheet
   Aesthetic: Warm editorial children's brand
   Fonts: Fraunces (display) + DM Sans (body)
══════════════════════════════════════════ */

:root {
    /* Colors */
    --cream:        #FDF8F0;
    --cream-deep:   #F5EDD8;
    --warm-white:   #FFFCF7;
    --brown-dark:   #2C1A0E;
    --brown-mid:    #6B3F1A;
    --brown-light:  #C4844A;
    --accent:       #E8612A;
    --accent-soft:  #FF8C5A;
    --accent-light: #FFE8DC;
    --gold:         #D4A043;
    --gold-light:   #FFF0C0;
    --sage:         #7A9E7E;
    --sky:          #5B8DB8;
    --sky-light:    #E0EEF8;
    --text-dark:    #1E0F05;
    --text-mid:     #5C3D1E;
    --text-soft:    #9C7A58;
    --border:       rgba(108, 63, 26, 0.15);

    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;

    /* Spacing */
    --nav-h:        72px;
    --max-w:        1280px;
    --section-py:   96px;

    /* Radius */
    --r-sm:  8px;
    --r-md:  16px;
    --r-lg:  24px;
    --r-xl:  36px;
    --r-full: 999px;

    /* Shadows */
    --shadow-sm:  0 2px 8px rgba(44,26,14,0.08);
    --shadow-md:  0 8px 32px rgba(44,26,14,0.12);
    --shadow-lg:  0 24px 64px rgba(44,26,14,0.18);
    --shadow-book: 12px 12px 40px rgba(44,26,14,0.30), -4px -4px 20px rgba(255,255,255,0.4);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ─── Utilities ────────────────────────── */
.section-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--section-py) clamp(20px, 5vw, 64px);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-light);
    padding: 6px 14px;
    border-radius: var(--r-full);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--brown-dark);
    line-height: 1.15;
}

.section-title.centered { text-align: center; }
.section-subtitle.centered {
    text-align: center;
    color: var(--text-mid);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 16px auto 0;
}

/* ─── Animations ───────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}
@keyframes drawArrow {
    from { stroke-dashoffset: 200; }
    to   { stroke-dashoffset: 0; }
}
@keyframes blobPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50%       { transform: scale(1.08) rotate(5deg); }
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%       { transform: translateY(8px); opacity: 0.4; }
}

[data-animate="fade-up"] {
    animation: fadeUp 0.7s ease both;
}
[data-animate="fade-left"] {
    animation: fadeLeft 0.8s ease both;
    animation-delay: 0.2s;
}

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(253, 248, 240, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}

.navbar.scrolled {
    box-shadow: 0 4px 24px rgba(44,26,14,0.10);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0 clamp(16px, 4vw, 48px);
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.brand-logo-img {
    height: 28px;
    width: auto;
    transform: translateY(-2px);
}

.brand-text {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.logo-together { color: var(--brown-mid); }
.logo-we       { color: var(--accent); }
.logo-learn    { color: var(--brown-mid); }

.nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-mid);
    padding: 8px 14px;
    border-radius: var(--r-sm);
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* Language switcher */
.lang-switcher { position: relative; }

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-mid);
    background: var(--cream-deep);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); }

.lang-chevron {
    transition: transform 0.25s;
}
.lang-btn[aria-expanded="true"] .lang-chevron {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    min-width: 150px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all 0.22s ease;
    z-index: 100;
}
.lang-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--text-mid);
    transition: background 0.15s;
}
.lang-item:hover, .lang-item.active {
    background: var(--accent-light);
    color: var(--accent);
}
.lang-flag { font-size: 1.1rem; }

/* CTA button in nav */
.btn-nav-cta {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: #fff;
    background: var(--accent);
    border-radius: var(--r-sm);
    padding: 9px 20px;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}
.btn-nav-cta:hover {
    background: var(--brown-mid);
    transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    cursor: pointer;
    padding: 8px;
}
.hamburger span {
    display: block;
    height: 2px;
    background: var(--brown-dark);
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 16px clamp(16px, 4vw, 48px) 24px;
    border-top: 1px solid var(--border);
    background: var(--warm-white);
    animation: fadeUp 0.25s ease;
}
.mobile-menu.open { display: flex; }

.mobile-link {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-mid);
    padding: 12px 16px;
    border-radius: var(--r-sm);
}
.mobile-link:hover { background: var(--accent-light); color: var(--accent); }

.mobile-lang {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    padding: 0 16px;
}
.mobile-lang a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-soft);
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
}
.mobile-lang a.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

.btn-mobile-cta {
    display: block;
    text-align: center;
    font-weight: 500;
    color: #fff;
    background: var(--accent);
    border-radius: var(--r-sm);
    padding: 14px;
    margin: 8px 16px 0;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    background: linear-gradient(160deg, var(--cream) 0%, var(--cream-deep) 60%, #EDD9B8 100%);
    padding-top: var(--nav-h);
}

/* Background blobs */
.hero-bg-blobs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: blobPulse 8s ease-in-out infinite;
}
.blob-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #FFD5B5, #FF8C5A);
    top: -200px; right: -100px;
    animation-delay: 0s;
}
.blob-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #C4E0B0, #7A9E7E);
    bottom: -100px; left: -100px;
    animation-delay: 3s;
}
.blob-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #FFE89A, #D4A043);
    top: 40%; right: 30%;
    animation-delay: 6s;
}

.hero-inner {
    position: relative;
    max-width: min(1520px, 100%);
    margin: 0 auto;
    padding: clamp(16px, 3vw, 40px) clamp(16px, 4vw, 48px) clamp(48px, 7vw, 88px);
    display: grid;
    /* 50/50 split: text left, visuals right */
    grid-template-columns: minmax(260px, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    width: 100%;
    min-width: 0;
}

.hero-inner > .hero-visual {
    min-width: 0;
}

/* Hero text */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid rgba(232, 97, 42, 0.25);
    padding: 6px 16px;
    border-radius: var(--r-full);
    margin-bottom: 24px;
    animation: fadeUp 0.6s ease both;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--brown-dark);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.1s;
}

.hero-title em {
    font-style: italic;
    color: var(--accent);
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-mid);
    max-width: 440px;
    line-height: 1.7;
    margin-bottom: 36px;
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.2s;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.3s;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: var(--accent);
    padding: 16px 32px;
    border-radius: var(--r-full);
    box-shadow: 0 8px 32px rgba(232, 97, 42, 0.35);
    transition: all 0.25s;
}
.btn-primary:hover {
    background: var(--brown-mid);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(107, 63, 26, 0.35);
}
.btn-primary svg { transition: transform 0.2s; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-ghost {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-mid);
    padding: 16px 24px;
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    transition: all 0.2s;
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.4s;
}

.trust-avatars {
    display: flex;
}
.trust-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--cream);
    margin-left: -8px;
    object-fit: cover;
    background: var(--cream-deep);
}
.trust-avatars .trust-avatar:first-child { margin-left: 0; }

.trust-text {
    font-size: 0.82rem;
    color: var(--text-soft);
}
.trust-text strong { color: var(--text-dark); }

/* Hero: Netflix-style skewed cover strip (auto-steps left) */
.hero-reading-row {
    margin-top: 28px;
    max-width: 100%;
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.5s;
}

.hero-reading-row__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin: 0 0 12px;
}

.hero-reading-row .book-result-caption {
    text-align: left;
    max-width: 52ch;
    margin-top: 10px;
}

.hero-reading-row__viewport {
    position: relative;
    overflow: hidden;
    padding: 10px 0 18px 6px;
    margin-left: -6px;
    perspective: 1000px;
    perspective-origin: 50% 50%;
}

.hero-reading-row__track {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 14px;
    width: max-content;
    will-change: transform;
}

.hero-reading-tile {
    flex: 0 0 auto;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.hero-reading-tile:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 8px;
}

.hero-reading-tile__inner {
    display: block;
    position: relative;
    width: 107px;
    aspect-ratio: 1 / 1;
    height: auto;
    max-height: 107px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 4px 0 rgba(44, 26, 14, 0.12),
        0 14px 28px rgba(44, 26, 14, 0.22);
    background: var(--cream-deep);
    transform: rotateY(-26deg);
    transform-origin: center bottom;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero-reading-tile:hover .hero-reading-tile__inner,
.hero-reading-tile:focus-visible .hero-reading-tile__inner {
    transform: rotateY(-18deg) translateY(-4px) scale(1.06);
    box-shadow:
        0 6px 0 rgba(44, 26, 14, 0.1),
        0 22px 40px rgba(44, 26, 14, 0.28);
    z-index: 2;
}

.hero-reading-tile__inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .hero-reading-tile__inner {
        transform: none;
        transition: none;
    }
    .hero-reading-tile:hover .hero-reading-tile__inner,
    .hero-reading-tile:focus-visible .hero-reading-tile__inner {
        transform: none;
    }
}

/* ─── Photo Flow Visual ─────────────────── */
.hero-visual {
    display: flex;
    justify-content: stretch;
    align-items: flex-start;
    width: 100%;
    min-width: 0;
    align-self: start;
}

/* Hero: faces + arrows (2×2 grid), then full-width book */
.hero-visual-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(12px, 2.5vw, 24px);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Row1: parent | child · Row2: arrow centered under each photo */
.hero-faces-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(16px, 4vw, 40px);
    row-gap: clamp(6px, 1.2vw, 12px);
    width: 100%;
    justify-items: center;
}

.hero-face-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    max-width: none;
}

.hero-arrow-cell {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

.hero-arrow-down {
    width: clamp(20px, 4vw, 28px);
    height: clamp(36px, 7vw, 56px);
    flex-shrink: 0;
}

.hero-arrow-down .arrow-path {
    animation: drawArrow 1.2s ease forwards;
    animation-delay: 0.6s;
    stroke-dashoffset: 120;
    stroke-dasharray: 8 6;
}

.book-result--hero {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
}

/* Grid: spine fixed column, cover uses all remaining width (flex was shrinking the face) */
.book-result--hero .book-cover {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: unset;
}

.book-spine--hero {
    width: clamp(22px, 3.8vw, 40px);
    flex-shrink: 0;
}

.book-result--hero .book-result-caption {
    text-align: center;
}

/* Photo input cards */
.photo-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.photo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: float 6s ease-in-out infinite;
}
.photo-card--child { animation-delay: -3s; }

.photo-frame {
    position: relative;
    width: clamp(90px, 10vw, 120px);
    height: clamp(90px, 10vw, 120px);
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: var(--shadow-md);
    background: var(--cream-deep);
}

/* Hero parent/child: fixed size (do not grow with layout / book) */
.photo-frame.photo-frame--hero {
    width: 120px;
    height: 120px;
    max-width: 120px;
    max-height: 120px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
}

.photo-img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.photo-upload-hint {
    position: absolute;
    bottom: 8px; right: 8px;
    width: 28px; height: 28px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(232, 97, 42, 0.4);
}

.photo-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Arrows */
.flow-arrows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    width: clamp(28px, 3.2vw, 40px);
}

.arrow-svg {
    width: 100%;
    max-width: clamp(28px, 3.2vw, 40px);
    height: auto;
    overflow: visible;
}

.arrow-path {
    animation: drawArrow 1.5s ease forwards;
    animation-delay: 0.8s;
    stroke-dashoffset: 200;
}

/* Book result */
.book-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.book-cover {
    position: relative;
    display: flex;
    align-items: stretch;
    animation: float 7s ease-in-out infinite;
    animation-delay: -1.5s;
    filter: drop-shadow(var(--shadow-book));
}

.book-spine {
    width: clamp(16px, 2vw, 22px);
    align-self: stretch;
    min-height: 0;
    background: linear-gradient(180deg, var(--brown-mid), var(--brown-dark));
    border-radius: 4px 0 0 4px;
    box-shadow: inset -4px 0 8px rgba(0,0,0,0.2);
}

.book-face {
    position: relative;
    width: clamp(120px, 13vw, 168px);
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    overflow: hidden;
    background: var(--cream-deep);
}

/* After .book-face so width/max-width win — hero cover fills grid column (not 168px cap) */
.book-face.book-face--hero {
    width: 100%;
    min-width: 0;
    max-width: none;
    aspect-ratio: 1 / 1;
    height: auto;
}

.book-cover-img {
    position: absolute;
    inset: 0;
}
.book-bg-img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.book-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(44,26,14,0.1) 0%, rgba(44,26,14,0.7) 100%);
}

/* Inset photos on book cover */
.book-inset-photos {
    position: absolute;
    top: 12px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.inset-photo {
    width: 42px; height: 42px;
    border-radius: var(--r-sm);
    border: 2px solid rgba(255,255,255,0.8);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    background: var(--cream-deep);
}
.inset-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.book-title-on-cover {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 12px 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.book-cover-series {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}

.book-cover-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.book-badge-new {
    position: absolute;
    top: 10px; left: 8px;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--brown-dark);
    background: var(--gold-light);
    padding: 3px 7px;
    border-radius: var(--r-full);
    z-index: 2;
}

.book-result-caption {
    font-size: 0.78rem;
    color: var(--text-soft);
    text-align: center;
    font-style: italic;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}
.scroll-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: scrollBounce 2s ease-in-out infinite;
}

/* ══════════════════════════════════════
   BESTSELLERS
══════════════════════════════════════ */
.bestsellers {
    background: var(--warm-white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.see-all-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--accent);
    transition: opacity 0.2s;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--accent-soft);
    white-space: nowrap;
}
.see-all-link:hover { opacity: 0.75; }

/* Carousel */
.books-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.books-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 8px 4px 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
}
.books-carousel::-webkit-scrollbar { display: none; }

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    color: var(--text-mid);
}
.carousel-nav:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }

/* Book card */
.book-card {
    flex-shrink: 0;
    width: clamp(240px, 30vw, 315px);
    scroll-snap-align: start;
    cursor: pointer;
}

.book-card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
    background: var(--cream-deep);
    transition: transform 0.3s, box-shadow 0.3s;
}
.book-card:hover .book-card-cover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.book-card-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.book-card:hover .book-card-cover img { transform: scale(1.05); }

.book-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(44,26,14,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.book-card:hover .book-card-overlay { opacity: 1; }

.btn-preview {
    font-size: 0.82rem;
    font-weight: 500;
    color: #fff;
    background: var(--accent);
    padding: 10px 18px;
    border-radius: var(--r-full);
    transform: translateY(8px);
    transition: transform 0.3s;
}
.book-card:hover .btn-preview { transform: translateY(0); }

.book-card-badge {
    position: absolute;
    top: 10px; left: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--brown-dark);
    background: var(--gold-light);
    padding: 4px 10px;
    border-radius: var(--r-full);
}

/* For the religion bestseller: place badge bottom-right */
.book-card-badge--br {
    left: auto;
    right: 10px;
    top: 10px;
    bottom: auto;
}

.book-card-cat {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 4px;
}

.book-card-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brown-dark);
    line-height: 1.3;
    margin-bottom: 6px;
}

.book-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}
.book-stars { color: var(--gold); font-size: 0.78rem; }
.book-reviews { font-size: 0.75rem; color: var(--text-soft); }

.book-card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.price-from { font-size: 0.72rem; color: var(--text-soft); }
.price-amount { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--accent); }

/* ══════════════════════════════════════
   HOW IT WORKS
══════════════════════════════════════ */
.how-it-works {
    background: var(--cream);
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 56px;
    flex-wrap: wrap;
}

.step-card {
    flex: 1;
    min-width: 180px;
    text-align: center;
    padding: 32px 24px;
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.step-connector {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-light), var(--accent-soft));
    align-self: center;
    flex-shrink: 0;
    margin: 0 -1px;
    position: relative;
    z-index: 1;
}

.step-number {
    position: absolute;
    top: -16px; left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent);
    background: var(--accent-light);
    border: 2px solid var(--accent-soft);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
    display: block;
}

.step-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 8px;
}

.step-desc {
    font-size: 0.85rem;
    color: var(--text-mid);
    line-height: 1.6;
}

/* ══════════════════════════════════════
   CATEGORIES
══════════════════════════════════════ */
.categories {
    background: var(--cream-deep);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    margin-top: 48px;
}

/* First card takes full width of first 2 columns */
.cat-card--wide {
    grid-column: span 2;
}

.cat-card {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    min-height: 240px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-card--wide { min-height: 540px; }
.cat-card--banner { min-height: 540px; }

.cat-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--cream-deep);
    transition: transform 0.5s;
}
.cat-card:hover .cat-bg { transform: scale(1.05); }

.cat-content {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(44,26,14,0.15) 0%, rgba(44,26,14,0.75) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    transition: background 0.3s;
}
.cat-card:hover .cat-content {
    background: linear-gradient(160deg, rgba(44,26,14,0.25) 0%, rgba(44,26,14,0.85) 100%);
}

.cat-icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.cat-icon img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Full-bleed banner icon (History + Religion) */
.cat-card--banner .cat-icon--banner {
    margin: -28px -28px 16px;
}
.cat-card--banner .cat-icon--banner img {
    border-radius: 0;
}

/* Banner cards: banner + copy should flow from top */
.cat-card--banner .cat-content {
    justify-content: flex-start;
}

.cat-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.cat-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.5;
    margin-bottom: 16px;
    max-width: 320px;
}

.cat-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 18px;
    border-radius: var(--r-full);
    display: inline-block;
    transition: background 0.2s;
    width: fit-content;
}
.cat-link:hover { background: var(--accent); border-color: var(--accent); }

.cat-link--soon {
    cursor: default;
    opacity: 0.9;
}
.cat-link--soon:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.3);
}

/* ══════════════════════════════════════
   TESTIMONIALS
══════════════════════════════════════ */
.testimonials {
    background: var(--warm-white);
    border-top: 1px solid var(--border);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
    margin-top: 48px;
    align-items: start;
}

.testimonial-card {
    padding: 28px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: transform 0.3s, box-shadow 0.3s;
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testimonial-card--featured {
    background: var(--brown-dark);
    border-color: var(--brown-dark);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.testimonial-card--featured:hover { transform: translateY(-12px); }

.testimonial-stars {
    color: var(--gold);
    font-size: 0.9rem;
    margin-bottom: 14px;
    letter-spacing: 2px;
}

.testimonial-text {
    font-family: var(--font-display);
    font-size: 1rem;
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
}
.testimonial-card--featured .testimonial-text { color: rgba(255,255,255,0.9); }

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--cream-deep);
    border: 2px solid var(--border);
}

.testimonial-author strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dark);
}
.testimonial-card--featured .testimonial-author strong { color: #fff; }

.testimonial-author span {
    font-size: 0.78rem;
    color: var(--text-soft);
}
.testimonial-card--featured .testimonial-author span { color: rgba(255,255,255,0.55); }

/* ══════════════════════════════════════
   CTA / PRICING
══════════════════════════════════════ */
.cta-section {
    background: linear-gradient(160deg, var(--brown-dark) 0%, #1A0C05 100%);
    position: relative;
    overflow: hidden;
}

.cta-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(232, 97, 42, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(212, 160, 67, 0.12) 0%, transparent 40%);
    pointer-events: none;
}

.cta-inner {
    position: relative;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: var(--section-py) clamp(20px, 5vw, 64px);
}

.cta-content { text-align: center; }

.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(212, 160, 67, 0.15);
    border: 1px solid rgba(212, 160, 67, 0.3);
    padding: 6px 16px;
    border-radius: var(--r-full);
    margin-bottom: 24px;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 16px;
}
.cta-title em { font-style: italic; color: var(--accent-soft); }

.cta-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.6);
    max-width: 540px;
    margin: 0 auto 56px;
}

.cta-pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 40px;
}

.pricing-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--r-xl);
    padding: 36px 28px;
    position: relative;
    transition: transform 0.3s, background 0.3s;
}
.pricing-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.09);
}
.pricing-card--featured {
    background: rgba(255,255,255,0.10);
    border-color: var(--accent-soft);
    transform: translateY(-8px);
    box-shadow: 0 32px 80px rgba(232, 97, 42, 0.2);
}
.pricing-card--featured:hover { transform: translateY(-12px); }

.pricing-popular {
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    padding: 5px 16px;
    border-radius: var(--r-full);
    white-space: nowrap;
}

.pricing-plan {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 20px;
}

.pricing-price {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    margin-bottom: 16px;
}
.price-currency {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-top: 8px;
}
.price-big {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.price-cents {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-top: 8px;
}

.pricing-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    margin-bottom: 28px;
}

.btn-pricing {
    display: block;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 14px;
    border-radius: var(--r-full);
    transition: all 0.25s;
}
.btn-pricing:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
}
.btn-pricing--featured {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(232,97,42,0.4);
}
.btn-pricing--featured:hover {
    background: var(--accent-soft);
    border-color: var(--accent-soft);
}

.cta-guarantee {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
    background: var(--brown-dark);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 64px clamp(20px, 5vw, 64px) 48px;
    display: grid;
    grid-template-columns: 1.4fr 2fr;
    gap: clamp(32px, 6vw, 80px);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-tagline {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
    max-width: 260px;
    margin-bottom: 24px;
}

.footer-socials {
    display: flex;
    gap: 8px;
}

.social-link {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.55);
    transition: all 0.2s;
}
.social-link:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent-soft); }

.footer-bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 20px clamp(20px, 5vw, 64px);
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-bottom p {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
}

.footer-lang {
    display: flex;
    gap: 4px;
}
.footer-lang a {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.35);
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-sm);
    transition: all 0.2s;
}
.footer-lang a:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

/* ══════════════════════════════════════
   RESPONSIVE — Tablet
══════════════════════════════════════ */
@media (max-width: 1024px) {

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cat-card--wide { grid-column: span 2; }

    .testimonials-grid {
        grid-template-columns: 1fr 1fr;
    }
    .testimonials-grid .testimonial-card:last-child {
        grid-column: span 2;
    }

    .cta-pricing {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .steps-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .step-connector { display: none; }
}

/* ══════════════════════════════════════
   RESPONSIVE — Mobile
══════════════════════════════════════ */
@media (max-width: 768px) {

    :root { --section-py: 64px; }

    /* Navbar */
    .nav-links { display: none; }
    .btn-nav-cta { display: none; }
    .hamburger { display: flex; }

    /* Hero */
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: left;
    }

    .hero-reading-row__label { margin-bottom: 10px; }

    .hero-reading-tile__inner {
        width: 94px;
        aspect-ratio: 1 / 1;
        height: auto;
        max-height: 94px;
    }

    .hero-visual { order: -1; }

    .hero-faces-grid {
        column-gap: 14px;
    }

    .hero-arrow-down {
        width: 22px;
        height: 40px;
    }

    .photo-frame {
        width: 80px;
        height: 80px;
    }

    .photo-frame.photo-frame--hero {
        width: 112px;
        height: 112px;
        max-width: 112px;
        max-height: 112px;
    }

    .book-face {
        width: 112px;
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .book-result--hero .book-face--hero {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .flow-arrows {
        width: 26px;
    }

    .arrow-svg {
        max-width: 26px;
    }

    /* Categories */
    .categories-grid {
        grid-template-columns: 1fr;
    }
    .cat-card--wide { grid-column: span 1; }
    .cat-card { min-height: 200px; }

    /* Steps */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    .testimonials-grid .testimonial-card:last-child {
        grid-column: span 1;
    }
    .testimonial-card--featured {
        transform: none;
        order: -1;
    }

    /* Pricing */
    .cta-pricing {
        grid-template-columns: 1fr;
        max-width: 380px;
    }
    .pricing-card--featured { transform: none; }

    /* Footer */
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    /* Carousel arrows */
    .carousel-prev { left: -10px; }
    .carousel-next { right: -10px; }
}

@media (max-width: 480px) {

    .hero-faces-grid {
        column-gap: 10px;
        row-gap: 6px;
    }

    .hero-arrow-down { width: 18px; height: 34px; }

    .book-spine--hero { width: 14px; }

    .photo-inputs { gap: 12px; }
    .photo-frame { width: 70px; height: 70px; }

    .photo-frame.photo-frame--hero {
        width: 100px;
        height: 100px;
        max-width: 100px;
        max-height: 100px;
    }

    .book-face { width: 96px; aspect-ratio: 1 / 1; height: auto; }

    .book-result--hero .book-face--hero {
        width: 100%;
        max-width: none;
        min-width: 0;
    }
    .book-spine { width: 14px; }
    .flow-arrows { width: 22px; }
    .arrow-svg { max-width: 22px; }
    .inset-photo { width: 32px; height: 32px; }

    .hero-actions { flex-direction: column; align-items: flex-start; width: 100%; }
    .btn-primary, .btn-ghost { width: 100%; justify-content: center; }

    .footer-links { grid-template-columns: 1fr; }

    .section-header { flex-direction: column; align-items: flex-start; }
}
