@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

@font-face {
    font-family: 'Transcity';
    src: url('transcity_regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --beige-bg: #faf8f5;
    --beige-dark: #f0ebe0;
    --beige-mid: #ddd5c0;
    --ink: #2c2416;
    --ink-light: #5a4e3a;
    --ink-faint: #8a7d6a;
    --accent-red: #c44b2b;
    --accent-gold: #b5860d;
    --accent-blue: #2a5e8c;
    --accent-green: #3a6b45;
    --grid-line: rgba(44, 36, 22, 0.12);
}

body {
    font-family: 'EB Garamond', Georgia, serif;
    background-color: var(--beige-bg);
    color: var(--ink);
    overflow-x: hidden;
    position: relative;
}

/* Beige Grid Paper Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: var(--beige-bg);
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* Subtle paper texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg width='300' height='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* ─── Navigation ─── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 14px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--beige-bg);
    border-bottom: 2px solid var(--beige-mid);
    box-shadow: 0 2px 12px rgba(44, 36, 22, 0.08);
}

.logo {
    height: 48px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.04) rotate(-1deg);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: var(--ink);
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-red);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ─── Hero Section ─── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 60px 60px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    gap: 60px;
}

/* Left side: brand + typing */
.hero-left {
    flex: 0 0 520px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.company-name {
    font-family: 'Playfair Display', serif;
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1.05;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.company-name span {
    color: var(--accent-red);
    font-style: italic;
}

.mission-statement {
    font-family: 'EB Garamond', serif;
    font-size: 2rem;
    font-style: italic;
    color: var(--ink-light);
    min-height: 44px;
    line-height: 1.4;
}

.typing-text {
    display: inline-block;
    border-right: 2px solid var(--accent-gold);
    padding-right: 4px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--accent-gold); }
    51%, 100% { border-color: transparent; }
}

.hero-cta {
    display: inline-block;
    margin-top: 10px;
    padding: 14px 34px;
    background: var(--ink);
    color: var(--beige-bg);
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.25s ease;
    width: fit-content;
}

.hero-cta:hover {
    background: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 75, 43, 0.25);
}

/* Right side: fan animation */
.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ─── Flashcard Fan-out ─── */
.flashcard-container {
    position: relative;
    width: 520px;
    height: 420px;
    perspective: 1200px;
}

.fan-cards {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 20px;
}

.fan-card {
    position: absolute;
    width: 210px;
    height: 290px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(44, 36, 22, 0.2);
    border: 3px solid rgba(255,255,255,0.6);
    transform-origin: center bottom;
    bottom: 20px;
    left: 50%;
    margin-left: -105px;
    transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Initial stacked state - slightly fanned even before animation */
.fan-card:nth-child(1) { z-index: 1; }
.fan-card:nth-child(2) { z-index: 2; }
.fan-card:nth-child(3) { z-index: 3; }
.fan-card:nth-child(4) { z-index: 4; }
.fan-card:nth-child(5) { z-index: 5; }

/* Spread state */
.fan-card.spread-0 { transform: rotate(-28deg) translateY(-20px); }
.fan-card.spread-1 { transform: rotate(-14deg) translateY(-10px); }
.fan-card.spread-2 { transform: rotate(0deg) translateY(0px); }
.fan-card.spread-3 { transform: rotate(14deg) translateY(-10px); }
.fan-card.spread-4 { transform: rotate(28deg) translateY(-20px); }

/* ─── Features Section ─── */
.features-section {
    padding: 80px 60px;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
}

.features-title {
    font-family: 'Playfair Display', serif;
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--ink);
    font-style: italic;
}

.features-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--accent-gold);
    margin: 16px auto 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    perspective: 1200px;
}

.feature-card-wrapper {
    height: 280px;
    perspective: 1200px;
    animation: float 4s ease-in-out infinite;
}

.feature-card-wrapper:nth-child(1) { animation-delay: 0s; }
.feature-card-wrapper:nth-child(2) { animation-delay: 0.6s; }
.feature-card-wrapper:nth-child(3) { animation-delay: 1.2s; }
.feature-card-wrapper:nth-child(4) { animation-delay: 1.8s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.feature-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.feature-card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 28px rgba(44, 36, 22, 0.15);
    border: 3px solid rgba(255,255,255,0.5);
}

.card-front {
    transform: rotateY(0deg);
}

.card-back {
    background: var(--ink) !important;
    transform: rotateY(180deg);
}

.card-front.color-1 { background: #4a6741; } /* olive green */
.card-front.color-2 { background: #1e3a5f; } /* navy blue */
.card-front.color-3 { background: #7a3b2e; } /* burnt sienna */
.card-front.color-4 { background: #5c4a1e; } /* dark mustard */

.card-icon-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

.card-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.card-description {
    font-family: 'EB Garamond', serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.9);
}

/* ─── Products Section ─── */
.products-section {
    padding: 100px 60px 60px;
    max-width: 1300px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Playfair Display', serif;
    text-align: center;
    font-size: 2.8rem;
    font-weight: 700;
    font-style: italic;
    margin-bottom: 60px;
    color: var(--ink);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--accent-gold);
    margin: 14px auto 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 32px;
}

.product-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid var(--beige-mid);
    box-shadow: 0 4px 16px rgba(44, 36, 22, 0.08);
    transition: all 0.3s ease;
    transform: rotate(-0.5deg);
}

.product-card:hover {
    transform: rotate(0deg) translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(44, 36, 22, 0.14);
    border-color: var(--accent-gold);
}

.product-image {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #e8e2d6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.9);
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    text-align: center;
    padding: 12px;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ink);
}

.product-price {
    font-family: 'EB Garamond', serif;
    font-size: 1.5rem;
    color: var(--accent-red);
    margin-bottom: 14px;
    font-weight: 600;
}

.add-to-cart-btn {
    width: 100%;
    padding: 11px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--ink);
    color: var(--beige-bg);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.04em;
}

.add-to-cart-btn:hover {
    background: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(196, 75, 43, 0.25);
}

/* ─── Cart Button ─── */
.cart-button {
    position: fixed;
    top: 88px;
    right: 28px;
    background: var(--ink);
    color: var(--beige-bg);
    padding: 12px 22px;
    border-radius: 4px;
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(44, 36, 22, 0.2);
    z-index: 999;
    transition: all 0.25s ease;
    border: 2px solid var(--beige-mid);
}

.cart-button:hover {
    background: var(--accent-red);
    transform: translateY(-2px);
}

.cart-count {
    background: var(--accent-red);
    color: #ffffff;
    border-radius: 50%;
    padding: 2px 7px;
    margin-left: 8px;
    font-size: 0.8rem;
}

/* ─── Cart Sidebar ─── */
.cart-sidebar {
    position: fixed;
    right: -420px;
    top: 0;
    width: 380px;
    height: 100vh;
    background: var(--beige-bg);
    border-left: 3px solid var(--beige-mid);
    box-shadow: -4px 0 24px rgba(44, 36, 22, 0.12);
    z-index: 1001;
    transition: right 0.4s ease;
    padding: 28px;
    overflow-y: auto;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--beige-mid);
}

.cart-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-style: italic;
    color: var(--ink);
}

.close-cart {
    background: none;
    border: none;
    color: var(--ink);
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    line-height: 1;
}

.close-cart:hover {
    transform: rotate(90deg);
    color: var(--accent-red);
}

.cart-items {
    margin-bottom: 24px;
}

.cart-item {
    background: rgba(255,255,255,0.6);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid var(--beige-mid);
}

.cart-item-name {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 8px;
    font-weight: 600;
}

.cart-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-price {
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    color: var(--accent-red);
    font-weight: 600;
}

.remove-item {
    background: none;
    color: var(--ink-faint);
    border: 1px solid var(--beige-mid);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.remove-item:hover {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
}

.cart-total {
    padding: 16px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    margin-bottom: 16px;
    border: 2px solid var(--accent-gold);
}

.cart-total-label {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--ink-light);
    margin-bottom: 6px;
}

.cart-total-amount {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: var(--ink);
    color: var(--beige-bg);
    border: none;
    border-radius: 6px;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.04em;
}

.checkout-btn:hover {
    background: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 75, 43, 0.25);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-left {
        flex: unset;
        align-items: center;
    }

    .company-name {
        font-size: 3rem;
    }

    .mission-statement {
        font-size: 1.2rem;
    }

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

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .navbar {
        padding: 12px 20px;
    }

    .logo {
        height: 36px;
    }

    .nav-links {
        gap: 28px;
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 90px 24px 40px;
    }

    .features-section, .products-section {
        padding-left: 24px;
        padding-right: 24px;
    }
}
/* ─── Decorative Extras ─── */

/* Bee animation */
.bee-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.bee-float {
    position: absolute;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
    will-change: transform;
}

.bee-trail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

/* Ladybug on navbar */
.navbar-bug {
    position: fixed;
    bottom: -2px;
    left: 80px;
    width: 56px;
    height: 56px;
    object-fit: contain;
    mix-blend-mode: multiply;
    z-index: 1001;
    pointer-events: none;
    animation: ladybug-walk 18s linear infinite;
    transform-origin: center bottom;
}

@keyframes ladybug-walk {
    0%   { left: -50px; transform: scaleX(1); }
    48%  { left: calc(100vw + 50px); transform: scaleX(1); }
    49%  { left: calc(100vw + 50px); transform: scaleX(-1); }
    50%  { left: calc(100vw + 50px); transform: scaleX(-1); }
    98%  { left: -50px; transform: scaleX(-1); }
    99%  { left: -50px; transform: scaleX(1); }
    100% { left: -50px; transform: scaleX(1); }
}

/* Sunflower in hero */
.hero-sunflower {
    position: absolute;
    bottom: -30px;
    left: 1300px;
    width: 160px;
    object-fit: contain;
    mix-blend-mode: multiply;
    pointer-events: none;
    opacity: 0.85;
    animation: sway 5s ease-in-out infinite;
    transform-origin: bottom center;
}

@keyframes sway {
    0%, 100% { transform: rotate(-4deg); }
    50%       { transform: rotate(4deg); }
}

/* Butterfly near features title */
.features-butterfly {
    position: absolute;
    top: 100px;
    right: 40px;
    width: 90px;
    object-fit: contain;
    mix-blend-mode: multiply;
    pointer-events: none;
    opacity: 0.9;
    animation: butterfly-hover 4s ease-in-out infinite;
}

@keyframes butterfly-hover {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50%       { transform: translateY(-14px) rotate(4deg); }
}

/* Shop page gingham paper corner */
.shop-paper-corner {
    position: fixed;
    top: 0;
    right: 0;
    width: 220px;
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
    transform: rotate(0deg);
}

/* Animal product images */
.product-image--animal {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-animal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    padding: 8px;
    transition: transform 0.3s ease;
}

.product-card--animal:hover .product-animal-img {
    transform: scale(1.08) translateY(-4px);
}


@keyframes monkey-peek {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50%       { transform: translateY(-8px) rotate(5deg); }
}
/* ─── Home page animal decorations ─── */

/* Dog — bottom-right of hero, sitting quietly */
.hero-dog {
    position: absolute;
    bottom: -50px;
    right: 100px;
    width: 150px;
    object-fit: contain;
    mix-blend-mode: multiply;
    pointer-events: none;
    opacity: 0.88;
    animation: dog-sit 6s ease-in-out infinite;
    transform: scaleX(-1);
    transform-origin: bottom center;
    
}

@keyframes dog-sit {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50%       { transform: rotate(2deg) translateY(-6px); }
    
}

/* Giraffe — peeking up from behind the fan cards */
.features-giraffe {
    position: absolute;
    bottom: -200px;
    right: 1150px;
    width: 130px;
    object-fit: contain;
    mix-blend-mode: multiply;
    pointer-events: none;
    opacity: 0.88;
    animation: giraffe-peek 5s ease-in-out infinite;
    transform-origin: bottom center;
    z-index: 6;
}

@keyframes giraffe-peek {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%       { transform: translateY(-10px) rotate(2deg); }
}

/* Monkey — poking out above the Browse Collections button */
.hero-cta-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 10px;
}

.features-monkey {
    position: absolute;
    width: 95px;
    object-fit: contain;
    mix-blend-mode: multiply;
    pointer-events: none;
    opacity: 0.95;
    bottom: 35px;
    left: 200px;
    margin-bottom: -10px;
    animation: monkey-peek 3.5s ease-in-out infinite;
    transform-origin: bottom center;
    z-index: 10;
}