/* ============================================
   Café Cartographer Website Styles
   Brand Colors & Typography - Strict Adherence
   ============================================ */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Brand Colors - Exact Match */
    --warm-cream: #FFF8F0;
    --coral-bloom: #FF6B47;
    --sage-green: #7BA05B;
    --rich-espresso: #2D1B16;
    --golden-hour: #F4B942;
    
    /* Typography */
    --font-headings: 'Hanken Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Eczar', serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--warm-cream);
    color: var(--rich-espresso);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 600;
    line-height: 1.2;
    color: var(--rich-espresso);
}

p {
    margin-bottom: var(--spacing-sm);
}

blockquote {
    font-family: var(--font-accent);
    font-style: italic;
}

/* ============================================
   Container
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

section {
    padding: var(--spacing-2xl) 0;
}

/* ============================================
   Hero Section - Full Viewport Mobile
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--warm-cream);
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
}

.hero-content {
    max-width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-brand {
    font-family: var(--font-headings);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    color: var(--coral-bloom);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.5px;
}

.hero-eb-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.hero-eb-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid var(--coral-bloom);
    background-color: var(--warm-cream);
    box-shadow: 0 4px 16px rgba(255, 107, 71, 0.2);
    animation: float 3s ease-in-out infinite;
}

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

.hero-headline {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    margin-bottom: 0;
    color: var(--rich-espresso);
}

.hero-subhead {
    font-family: var(--font-accent);
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: var(--rich-espresso);
    margin-bottom: var(--spacing-xl);
}

/* ============================================
   CTA Buttons - Thumb Friendly
   ============================================ */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 400px;
    margin: 0 auto var(--spacing-xl);
}

.btn-primary {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    padding: 1.25rem 2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    text-align: center;
    background-color: var(--coral-bloom);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 107, 71, 0.3);
    min-height: 56px;
}

.btn-primary:hover {
    background-color: #FF5533;
    box-shadow: 0 6px 20px rgba(255, 107, 71, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.store-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.btn-store {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--sage-green);
    background-color: var(--sage-green);
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    min-height: 52px;
}

.btn-store:hover {
    background-color: #6A8F4F;
    border-color: #6A8F4F;
    transform: translateY(-2px);
}

.store-icon {
    width: 24px;
    height: 24px;
}

/* ============================================
   Phone Mockup with Rich Espresso Accent
   ============================================ */
.phone-mockup-container {
    margin-top: var(--spacing-2xl);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-accent-block {
    position: absolute;
    width: 320px;
    height: 280px;
    background-color: var(--rich-espresso);
    border-radius: 24px;
    z-index: 0;
    box-shadow: 0 20px 60px rgba(45, 27, 22, 0.4);
}

.phone-mockup {
    position: relative;
    z-index: 1;
}

.phone-frame {
    width: 280px;
    height: 560px;
    background-color: #1A1410;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 30px 80px rgba(45, 27, 22, 0.5);
    position: relative;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    background-color: #1A1410;
    border-radius: 0 0 20px 20px;
    z-index: 2;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 32px;
    object-fit: cover;
}

/* ============================================
   Features - Horizontally Scrollable
   ============================================ */
.features {
    background-color: var(--warm-cream);
    padding: var(--spacing-2xl) 0;
}

.section-title {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--rich-espresso);
    opacity: 0.7;
    margin-bottom: var(--spacing-xl);
}

.features-scroll {
    display: flex;
    gap: var(--spacing-lg);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: var(--spacing-md) 0;
    margin: 0 calc(-1 * var(--spacing-md));
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
    -webkit-overflow-scrolling: touch;
}

.features-scroll::-webkit-scrollbar {
    height: 8px;
}

.features-scroll::-webkit-scrollbar-track {
    background: rgba(224, 213, 199, 0.3);
    border-radius: 4px;
}

.features-scroll::-webkit-scrollbar-thumb {
    background: var(--golden-hour);
    border-radius: 4px;
}

.feature-card {
    min-width: 220px;
    max-width: 260px;
    flex-shrink: 0;
    background-color: white;
    padding: var(--spacing-lg);
    border-radius: 16px;
    border: 2px solid var(--golden-hour);
    scroll-snap-align: start;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(244, 185, 66, 0.2);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(244, 185, 66, 0.3);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--rich-espresso);
}

.feature-description {
    font-size: 0.9rem;
    color: var(--rich-espresso);
    opacity: 0.8;
    line-height: 1.5;
    margin-bottom: 0;
}

.learn-more-link {
    display: block;
    text-align: center;
    margin-top: var(--spacing-xl);
    font-size: 1.125rem;
    color: var(--coral-bloom);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.learn-more-link:hover {
    color: #FF5533;
}

/* ============================================
   Dual Discovery Modes
   ============================================ */
.discovery-modes {
    background: linear-gradient(135deg, #FBF5ED 0%, var(--warm-cream) 100%);
    padding: var(--spacing-2xl) 0;
}

.discovery-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.discovery-panel {
    background-color: white;
    border-radius: 20px;
    padding: var(--spacing-lg);
    box-shadow: 0 8px 24px rgba(45, 27, 22, 0.1);
    transition: all 0.3s ease;
}

.discovery-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(45, 27, 22, 0.15);
}

.panel-tell-me {
    border: 2px solid var(--coral-bloom);
}

.panel-browse {
    border: 2px solid var(--sage-green);
}

.panel-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--rich-espresso);
}

.panel-benefit {
    font-size: 1rem;
    color: var(--rich-espresso);
    opacity: 0.8;
    margin-bottom: var(--spacing-lg);
}

.panel-demo {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #FBF5ED 0%, #F6F0E8 100%);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   Social Proof & Community
   ============================================ */
.social-proof {
    background-color: white;
    padding: var(--spacing-2xl) 0;
}

.rating-overview {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.stars {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: var(--spacing-sm);
}

.star {
    font-size: 2rem;
    color: #DDD;
}

.star.filled {
    color: var(--golden-hour);
}

.star.half {
    background: linear-gradient(90deg, var(--golden-hour) 50%, #DDD 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rating-text {
    font-size: 1.125rem;
    color: var(--rich-espresso);
    opacity: 0.8;
}

/* Testimonials Carousel */
.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto var(--spacing-2xl);
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-card {
    min-width: 100%;
    padding: var(--spacing-xl);
    text-align: center;
}

.testimonial-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--sage-green);
    margin: 0 auto var(--spacing-md);
    object-fit: cover;
}

.testimonial-quote {
    font-family: var(--font-accent);
    font-size: 1.25rem;
    color: var(--rich-espresso);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.testimonial-author {
    font-size: 1rem;
    color: var(--rich-espresso);
    opacity: 0.7;
    font-weight: 600;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--coral-bloom);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: #FF5533;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: -24px;
}

.carousel-btn.next {
    right: -24px;
}

/* Featured In */
.featured-in {
    text-align: center;
}

.featured-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rich-espresso);
    opacity: 0.6;
    margin-bottom: var(--spacing-md);
}

.publication-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.pub-logo {
    height: 40px;
    width: auto;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.pub-logo:hover {
    opacity: 1;
}

/* ============================================
   Email Capture Sticky Bar
   ============================================ */
.email-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--rich-espresso);
    color: var(--warm-cream);
    padding: var(--spacing-md);
    box-shadow: 0 -4px 16px rgba(45, 27, 22, 0.3);
    z-index: 100;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.email-sticky-bar.hidden {
    transform: translateY(100%);
}

.email-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    position: relative;
}

.email-bar-text {
    flex: 1 1 250px;
    font-size: 1rem;
    margin: 0;
}

.email-bar-form {
    flex: 1 1 300px;
    display: flex;
    gap: var(--spacing-sm);
}

#email-input {
    flex: 1;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--warm-cream);
    border-radius: 8px;
    background-color: rgba(255, 248, 240, 0.1);
    color: var(--warm-cream);
}

#email-input::placeholder {
    color: rgba(255, 248, 240, 0.6);
}

#email-input:focus {
    outline: none;
    background-color: rgba(255, 248, 240, 0.15);
    border-color: var(--coral-bloom);
}

.email-submit-btn {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    background-color: var(--coral-bloom);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.email-submit-btn:hover {
    background-color: #FF5533;
    transform: translateY(-2px);
}

.email-bar-close {
    position: absolute;
    top: -10px;
    right: 0;
    background: none;
    border: none;
    color: var(--warm-cream);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.email-bar-close:hover {
    opacity: 1;
}

/* ============================================
   Footer & Navigation
   ============================================ */
.footer {
    background-color: var(--rich-espresso);
    color: var(--warm-cream);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    /* Space for sticky email bar - uses CSS variable set by JS */
    margin-bottom: var(--email-bar-height, 80px);
}

.footer-nav-main {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xl);
}

.footer-link {
    color: var(--warm-cream);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--coral-bloom);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.social-link {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 248, 240, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sage-green);
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--sage-green);
    color: white;
    transform: translateY(-2px);
}

.social-icon {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 248, 240, 0.2);
}

.footer-brand {
    flex: 1 1 200px;
}

.footer-logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.footer-tagline {
    font-family: var(--font-accent);
    font-size: 0.9375rem;
    opacity: 0.8;
    margin: 0;
}

.footer-copyright {
    flex: 1 1 200px;
    text-align: right;
    font-size: 0.875rem;
    opacity: 0.7;
    margin: 0;
}

/* ============================================
   Modal
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 27, 22, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: var(--spacing-2xl);
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(45, 27, 22, 0.4);
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--rich-espresso);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.modal-close:hover {
    opacity: 1;
    color: var(--coral-bloom);
}

.modal-icon {
    width: 80px;
    height: 80px;
    background-color: var(--sage-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto var(--spacing-lg);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.modal-content p {
    font-size: 1.125rem;
    color: var(--rich-espresso);
    opacity: 0.8;
    margin: 0;
}

/* ============================================
   Responsive - Mobile First
   ============================================ */
@media (max-width: 768px) {
    .discovery-panels {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .carousel-btn.prev {
        left: 0;
    }
    
    .carousel-btn.next {
        right: 0;
    }
    
    .email-bar-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .email-bar-form {
        flex: 1 1 auto;
    }
    
    .footer-nav-main {
        gap: var(--spacing-md);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-copyright {
        text-align: center;
    }
    
    .phone-accent-block {
        width: 280px;
        height: 240px;
    }
}

@media (max-width: 480px) {
    .store-buttons {
        gap: var(--spacing-xs);
    }
    
    .btn-store {
        font-size: 0.9375rem;
        padding: 0.875rem 1.25rem;
    }
    
    .publication-logos {
        gap: var(--spacing-md);
    }
    
    .pub-logo {
        height: 32px;
    }
}

/* ============================================
   Accessibility
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 3px solid var(--coral-bloom);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   Performance Optimizations
   ============================================ */
/* Apply will-change only during interaction to avoid unnecessary memory consumption */
.feature-card:hover,
.discovery-panel:hover,
.testimonial-card:hover,
.btn-primary:hover,
.btn-store:hover,
.email-submit-btn:hover {
    will-change: transform;
}

/* Remove will-change after animation completes */
.feature-card:not(:hover),
.discovery-panel:not(:hover),
.testimonial-card:not(:hover),
.btn-primary:not(:hover),
.btn-store:not(:hover),
.email-submit-btn:not(:hover) {
    will-change: auto;
}

@media (prefers-color-scheme: dark) {
    /* Respect user's dark mode preference */
    /* Keep light theme for brand consistency */
}
