/* ==========================================================================
   Mosey Mate Website Styles
   Color palette inspired by the app:
   - Primary Background: #FDF8F3 (warm cream)
   - Primary Text: #5D4E37 (rich brown)
   - Secondary Text: #8B7355 (medium brown)
   - Muted Text: #B8A898 (light brown)
   - Accent Green: #4CAF50, #7CB342
   - Cards: #FFFFFF
   - Borders: #E8DDD4
   ========================================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --color-bg: #FDF8F3;
    --color-bg-alt: #F5EFE7;
    --color-card: #FFFFFF;
    --color-text: #5D4E37;
    --color-text-secondary: #8B7355;
    --color-text-muted: #B8A898;
    --color-accent: #7CB342;
    --color-accent-dark: #5D9C2E;
    --color-accent-light: #E8F5E9;
    --color-border: #E8DDD4;
    --color-gold: #FFD700;
    --color-warm-orange: #F4A261;

    --font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --shadow-sm: 0 2px 8px rgba(93, 78, 55, 0.06);
    --shadow-md: 0 4px 20px rgba(93, 78, 55, 0.1);
    --shadow-lg: 0 8px 40px rgba(93, 78, 55, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-weight: 400;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5em;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

p {
    margin: 0 0 1em;
}

a {
    color: var(--color-accent-dark);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ---------- Skip Link (Accessibility) ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    z-index: 9999;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 1rem;
}

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: 1120px;
    padding: 0 1.5rem;
    margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253, 248, 243, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    border-radius: var(--radius-sm);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
}

.header-nav {
    display: flex;
    gap: 1.5rem;
}

.header-nav a {
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: 0.5rem 0;
    position: relative;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition);
}

.header-nav a:hover {
    color: var(--color-text);
    text-decoration: none;
}

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

/* ---------- Hero Section ---------- */
.hero {
    padding: 4rem 0 5rem;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

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

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    position: relative;
    width: 260px;
    padding: 11px;
    background: linear-gradient(145deg, #333333 0%, #1a1a1a 100%);
    border-radius: 36px;
    box-shadow:
        var(--shadow-lg),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.phone-mockup img {
    border-radius: 24px;
    width: 100%;
    height: auto;
}

.hero-decoration {
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.hero-leaf-1 {
    top: 20%;
    left: 5%;
    animation-delay: 0s;
}

.hero-leaf-2 {
    bottom: 20%;
    right: 5%;
    animation-delay: 2s;
}

.hero-star {
    top: 5%;
    right: 12%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(15deg);
    }
}

/* ---------- Store Buttons ---------- */
.store-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.store-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    min-width: 220px;
    justify-content: center;
}

.store-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.store-button[aria-disabled="true"] {
    opacity: 0.7;
    cursor: not-allowed;
}

.store-button[aria-disabled="true"]:hover {
    transform: none;
}

.store-button span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.store-button em {
    font-style: normal;
    font-weight: 400;
    font-size: 0.85em;
    opacity: 0.9;
}

.store-button-secondary {
    background: linear-gradient(135deg, var(--color-text) 0%, #3a2e2a 100%);
}

.store-icon {
    flex-shrink: 0;
}

/* ---------- Section Titles ---------- */
.section-title {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-warm-orange));
    border-radius: 2px;
    margin: 0.75rem auto 0;
}

/* ---------- How It Works Section ---------- */
.how-it-works {
    padding: 5rem 0;
    background: var(--color-card);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.step-card {
    position: relative;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
}

.step-number {
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2rem;
    height: 2rem;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.step-card h3 {
    color: var(--color-text);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--color-text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

/* ---------- Features Section ---------- */
.features {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.feature-card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.feature-card p {
    color: var(--color-text-secondary);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---------- Gallery Section ---------- */
.gallery {
    padding: 5rem 0;
    background: var(--color-card);
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.gallery-item {
    margin: 0;
    text-align: center;
}

.gallery-item img {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border-width: 4px;
    border-style: solid;
    border-color: var(--color-border);
}

.gallery-item-character img {
    max-width: 200px;
}

.gallery-item figcaption {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* ---------- CTA Section ---------- */
.cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--color-text) 0%, #3a2e2a 100%);
    color: white;
}

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

.cta h2 {
    color: white;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: 0.75rem;
}

.cta p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-buttons .store-button {
    background: white;
    color: var(--color-text);
}

.cta-buttons .store-button:hover {
    background: var(--color-bg);
}

.cta-buttons .store-button-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.cta-buttons .store-button-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cta-buttons {
    justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 3rem 0 2rem;
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.footer-logo {
    border-radius: var(--radius-sm);
}

.footer-tagline {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

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

.footer-copyright {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ---------- Responsive: Tablet and up ---------- */
@media (min-width: 640px) {
    .store-buttons {
        flex-direction: row;
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        align-items: end;
    }
}

@media (min-width: 768px) {
    .hero {
        padding: 5rem 0 6rem;
    }

    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .hero-content {
        text-align: left;
    }

    .hero-subtitle {
        margin: 0 0 2rem;
    }

    .store-buttons {
        justify-content: flex-start;
    }

    .phone-mockup {
        width: 280px;
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-decoration {
        font-size: 2.5rem;
    }

    .hero-leaf-1 {
        left: -5%;
    }

    .hero-leaf-2 {
        right: -5%;
    }
}

@media (min-width: 768px) {
    .cta-buttons {
        justify-content: center;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-decoration {
        animation: none;
    }

    .feature-card:hover,
    .store-button:hover {
        transform: none;
    }
}

/* ---------- Dark Mode Support (optional) ---------- */
@media (prefers-color-scheme: dark) {
    /* Users can implement dark mode by uncommenting and adjusting these values */
    /*
    :root {
        --color-bg: #1a1612;
        --color-bg-alt: #252018;
        --color-card: #2d261f;
        --color-text: #F5EFE7;
        --color-text-secondary: #B8A898;
        --color-text-muted: #8B7355;
        --color-border: #3d352c;
    }
    */
}