/* ===== FONTS ===== */
@font-face {
    font-family: 'Souvenir';
    src: url('fonts/Souvenir.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Souvenir';
    src: url('fonts/SouvenirB.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Souvenir';
    src: url('fonts/SouvenirI.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Nunito', sans-serif;
    background: #F4F4F1;
    color: #2F4F3F;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== PALETTE ===== */
:root {
    --moss:     #6B8F71;
    --forest:   #2F4F3F;
    --sage:     #ABC3A0;
    --bark:     #8B5E3C;
    --gold:     #E6C27A;
    --clay:     #D97B4A;
    --blue:     #6FA3C8;
    --pink:     #E8A7A7;
    --leaf:     #8BCF7B;
    --white:    #FFFFFF;
    --stone:    #F4F4F1;
    --nav-h:    72px;
}

/* ===== NAV ===== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--nav-h);
    background: rgba(47, 79, 63, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(171, 195, 160, 0.18);
    transition: background 0.3s ease;
}
.nav.scrolled {
    background: rgba(47, 79, 63, 0.99);
}
.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.logo-text {
    font-family: 'Souvenir', Georgia, serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: #fff;
    letter-spacing: -0.01em;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-link {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.82);
    transition: color 0.2s;
    letter-spacing: 0.02em;
}
.nav-link:hover, .nav-link.active { color: var(--gold); }
.nav-social {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.75);
    transition: color 0.2s;
}
.nav-social:hover { color: var(--gold); }
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
}
.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}
.nav-mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--forest);
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.nav-mobile-menu.open { display: flex; }
.mobile-link {
    font-weight: 700;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-link:hover { color: var(--gold); }
.mobile-socials {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
}
.mobile-socials a {
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-gradient-fallback {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        160deg,
        #1e3829 0%,
        #2F4F3F 35%,
        #3d6b4f 60%,
        #4a7c5c 80%,
        #2b4e3a 100%
    );
    transition: opacity 1s ease;
}
.hero-gradient-fallback::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 60%, rgba(107,143,113,0.45) 0%, transparent 60%),
                radial-gradient(ellipse at 75% 20%, rgba(230,194,122,0.2) 0%, transparent 50%);
}
.hero-gradient-fallback.hidden {
    opacity: 0;
    pointer-events: none;
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}
/* Dark overlay on video for text legibility */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 1.5rem;
    max-width: 780px;
}
.hero-eyebrow {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.hero-title {
    font-family: 'Souvenir', Georgia, serif;
    font-weight: 700;
    font-size: clamp(3rem, 9vw, 7.5rem);
    line-height: 1.0;
    letter-spacing: -0.02em;
    margin-bottom: 1.4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.15s, transform 0.8s ease 0.15s;
}
.hero-sub {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255,255,255,0.85);
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease 0.45s, transform 0.7s ease 0.45s;
}
.reveal.visible,
.hero-content .reveal.visible,
.hero .reveal.visible {
    opacity: 1 !important;
    transform: none !important;
}

/* Hero auto-reveal on load */
.hero-eyebrow.loaded,
.hero-title.loaded,
.hero-sub.loaded,
.hero-actions.loaded {
    opacity: 1;
    transform: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 100px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}
.btn-primary {
    background: var(--gold);
    color: var(--forest);
}
.btn-primary:hover {
    background: #d4af5e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.btn-ghost {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.22);
    transform: translateY(-2px);
}

/* Scroll cue */
.scroll-cue {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,0.6);
    animation: bounce 2.2s ease-in-out infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== SECTION COMMONS ===== */
.section-tag {
    display: inline-block;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--moss);
    background: rgba(107,143,113,0.12);
    border-radius: 100px;
    padding: 0.35rem 1rem;
    margin-bottom: 1.2rem;
}
.section-title {
    font-family: 'Souvenir', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.15;
    color: var(--forest);
    margin-bottom: 1.2rem;
}
.section-body {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    color: rgba(47,79,63,0.72);
    max-width: 620px;
}

/* ===== PAGE HEADER (worksheets page) ===== */
.page-header {
    padding: calc(var(--nav-h) + 4rem) 2rem 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--white);
    border-bottom: 1px solid rgba(47,79,63,0.08);
}
.worksheets-page {
    padding-top: 3rem;
}

/* ===== ABOUT ===== */
.about {
    background: var(--white);
    padding: 7rem 2rem 0;
    overflow: hidden;
}
.about-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.about-header {
    text-align: center;
    margin-bottom: 4.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
}
.feature-card {
    background: var(--stone);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s ease calc(var(--delay, 0s)), transform 0.65s ease calc(var(--delay, 0s));
}
.feature-card.visible {
    opacity: 1;
    transform: none;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(47,79,63,0.1);
}
.card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
}
.card-icon svg {
    width: 100%;
    height: 100%;
}
.feature-card h3 {
    font-family: 'Souvenir', Georgia, serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--forest);
    margin-bottom: 0.75rem;
}
.feature-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(47,79,63,0.7);
}

.shapes-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 0 3.5rem;
    overflow: hidden;
    flex-wrap: wrap;
}
.shape {
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.85;
}
.shape-squircle {
    border-radius: 30%;
}

/* ===== REVEAL ANIMATION ===== */
.reveal-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up.visible {
    opacity: 1;
    transform: none;
}

/* ===== WORKSHEETS ===== */
.worksheets-section {
    background: var(--stone);
    padding: 7rem 2rem 6rem;
}
.worksheets-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Filter */
.filter-wrap {
    max-width: 1300px;
    margin: 0 auto 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}
.sub-filter-row {
    min-height: 40px;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    background: var(--white);
    color: var(--forest);
    border: 2px solid transparent;
    transition: all 0.18s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.filter-pill:hover {
    border-color: var(--moss);
    color: var(--moss);
}
.filter-pill.active {
    background: var(--forest);
    color: var(--white);
    border-color: var(--forest);
}
.filter-pill.sub-pill {
    background: transparent;
    border: 2px solid rgba(47,79,63,0.2);
    color: rgba(47,79,63,0.65);
    font-size: 0.82rem;
    padding: 0.4rem 1rem;
}
.filter-pill.sub-pill:hover {
    border-color: var(--moss);
    color: var(--moss);
}
.filter-pill.sub-pill.active {
    background: var(--moss);
    color: #fff;
    border-color: var(--moss);
}

/* Masonry Grid */
.ws-grid-container {
    max-width: 1300px;
    margin: 0 auto;
}
.masonry-grid {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.masonry-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 1.25rem;
}
.ws-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    background: var(--white);
}
.ws-card.visible {
    opacity: 1;
    transform: none;
}
.ws-card:hover {
    box-shadow: 0 10px 32px rgba(0,0,0,0.14);
    transform: translateY(-3px);
}
.ws-thumb {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
/* Portrait: 8.5 x 11 */
.ws-thumb.portrait { aspect-ratio: 85 / 110; }
/* Landscape: 11 x 8.5 */
.ws-thumb.landscape { aspect-ratio: 110 / 85; }

.ws-inner-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    gap: 0.5rem;
}
.ws-inner-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.ws-inner-title {
    font-family: 'Souvenir', Georgia, serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: rgba(0,0,0,0.65);
    text-align: center;
    line-height: 1.3;
}
.ws-inner-sub {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.4);
}
.ws-info {
    padding: 0.85rem 1rem;
}
.ws-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--forest);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ws-meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(47,79,63,0.5);
    letter-spacing: 0.05em;
}
.ws-download-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255,255,255,0.92);
    border-radius: 100px;
    padding: 0.3rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--forest);
    letter-spacing: 0.08em;
    opacity: 0;
    transition: opacity 0.2s;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}
.ws-card:hover .ws-download-badge { opacity: 1; }

.ws-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(47,79,63,0.45);
    font-size: 1rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--forest);
    color: rgba(255,255,255,0.7);
    padding: 4rem 2rem;
    text-align: center;
}
.footer-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}
.footer-logo {
    font-family: 'Souvenir', Georgia, serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #fff;
    letter-spacing: -0.01em;
}
.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}
.footer-socials {
    display: flex;
    gap: 2rem;
    margin: 0.5rem 0;
}
.footer-socials a {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--gold);
    letter-spacing: 0.05em;
    transition: opacity 0.2s;
}
.footer-socials a:hover { opacity: 0.75; }
.footer-copy {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
    margin-top: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .feature-cards { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto 4rem; }
    .nav-links { display: none; }
    .nav-mobile-toggle { display: flex; }
}
@media (max-width: 640px) {
    .about, .worksheets-section { padding-left: 1.25rem; padding-right: 1.25rem; }
    .shapes-row { gap: 1rem; }
    .hero-actions { flex-direction: column; align-items: center; }
}
