/* ============================================
   Avocalo — Website Styles
   ============================================ */

/* ---- Reset ---- */

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

/* ---- Custom Properties ---- */

:root {
    --white: #FFFFFF;
    --bg: #F5F5F5;
    --dark: #0A0A0A;
    --green: #4AC860;
    --green-50: #EEFBF0;
    --green-600: #3BAF4F;
    --text-primary: #0F172A;
    --text-muted: #64748B;
    --border: #EAECF0;
    --gray-50: #F9FAFB;
    --gray-200: #E5E7EB;
    --gray-400: #98A2B3;
    --gray-600: #6B7280;
    --gray-800: #1F2937;
    --max-width: 1080px;
    --radius-card: 24px;
    --radius-button: 999px;
    --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ---- Base ---- */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--white);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ---- Typography ---- */

h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ---- Navigation ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 56px;
    transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom-color: var(--border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.nav-brand img:first-child {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 0;
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all var(--transition);
    transform-origin: center;
}

.nav-toggle.open span:first-child {
    transform: rotate(45deg) translate(2.5px, 2.5px);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:last-child {
    transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* ---- Hero ---- */

.hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 160px 24px 120px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    max-width: 480px;
}

.hero-content h1 {
    color: var(--dark);
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.hero-content p {
    margin-top: 20px;
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-ctas {
    display: flex;
    gap: 12px;
    margin-top: 36px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.store-badge {
    height: 48px;
    transition: opacity var(--transition);
}

.store-badge:hover {
    opacity: 0.8;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateX(40px);
    animation: slideInRight 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.hero-phone {
    width: 280px;
    border-radius: 32px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.hero-phone-frame {
    width: 280px;
    height: 590px;
    border-radius: 40px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 6px solid #1a1a1a;
    display: flex;
    align-items: center;
}

.hero-video {
    width: 100%;
    object-fit: cover;
    display: block;
}

.hero-mascot {
    position: absolute;
    bottom: -12px;
    right: -20px;
    width: 100px;
    transform: rotate(8deg);
    animation: mascotFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* ---- Phone Placeholder (until real screenshots are added) ---- */

.phone-placeholder {
    width: 280px;
    height: 560px;
    background: linear-gradient(180deg, var(--green-50) 0%, var(--white) 100%);
    border-radius: 32px;
    border: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
}

.phone-placeholder img {
    width: 80px;
    opacity: 0.6;
}

.phone-placeholder span {
    font-size: 0.8rem;
    color: var(--gray-400);
    text-align: center;
}

/* ---- Section Shared ---- */

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--green);
    margin-bottom: 12px;
}

/* ---- Features ---- */

.features {
    padding: 100px 0 120px;
    background: var(--white);
}

.features-header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    margin-bottom: 56px;
}

.features-header h2 {
    max-width: 420px;
}

.features-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 32px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--green-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.feature-phone {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.feature-phone-frame {
    width: 160px;
    height: 330px;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    border: 4px solid #1a1a1a;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-phone-frame img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.feature-screenshot {
    width: 100%;
    height: 200px;
    background: var(--bg);
    border-radius: 16px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.feature-screenshot span {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* ---- Showcase ---- */

.showcase {
    padding: 100px 0;
    background: var(--bg);
}

.showcase-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.showcase-phone {
    display: flex;
    justify-content: center;
    position: relative;
}

.showcase-phone .phone-placeholder,
.showcase-phone img:not(.showcase-mascot) {
    width: 260px;
    border-radius: 32px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.06);
}

.showcase-phone-frame {
    width: 260px;
    height: 548px;
    border-radius: 40px;
    overflow: hidden;
    background: #000;
    border: 6px solid #1a1a1a;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
}

.showcase-phone-frame video {
    width: 100%;
    object-fit: cover;
    display: block;
}

.showcase-mascot {
    position: absolute;
    bottom: -8px;
    left: -16px;
    width: 80px;
    transform: rotate(-6deg);
    animation: mascotFloat 3s ease-in-out 0.5s infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.showcase-text blockquote {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.showcase-text p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---- Download CTA ---- */

.download-cta {
    padding: 120px 0;
    text-align: center;
}

.download-cta-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

.download-cta h2 {
    margin-bottom: 12px;
}

.download-cta p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 36px;
}

.download-cta .hero-ctas {
    justify-content: center;
    opacity: 1;
    transform: none;
    animation: none;
}

.cta-mascot {
    position: absolute;
    right: 80px;
    bottom: -20px;
    width: 90px;
    transform: rotate(12deg);
    animation: mascotFloat 3s ease-in-out 1s infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* ---- Footer ---- */

.footer {
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-right a {
    font-size: 0.8rem;
    color: var(--gray-600);
    transition: color var(--transition);
}

.footer-right a:hover {
    color: var(--text-primary);
}

/* ---- Legal Pages ---- */

.legal-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.legal-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.legal-nav-brand {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-nav-brand img {
    border-radius: 6px;
}

.legal-nav-back {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.legal-nav-back:hover {
    color: var(--text-primary);
}

.legal-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 80px 24px 120px;
}

.legal-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.legal-content .legal-updated {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 48px;
}

.legal-content h2 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 40px;
    margin-bottom: 12px;
}

.legal-content p {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-content ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

.legal-content li {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 6px;
}

.legal-content a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-content a:hover {
    color: var(--dark);
}

/* ---- Animations ---- */

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes mascotFloat {
    0%, 100% {
        transform: translateY(0) rotate(var(--mascot-rotate, 8deg));
    }
    50% {
        transform: translateY(-8px) rotate(var(--mascot-rotate, 8deg));
    }
}

/* Scroll reveal */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .cta-mascot {
        right: 24px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition);
        z-index: 100;
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        font-size: 1.15rem;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 130px 24px 80px;
        gap: 48px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-visual {
        justify-content: center;
    }

    .hero-phone {
        width: 220px;
    }

    .hero-phone-frame {
        width: 180px;
        height: 370px;
    }

    .phone-placeholder {
        width: 180px;
        height: 370px;
    }

    .hero-mascot {
        width: 60px;
        right: calc(50% - 125px);
        bottom: -8px;
    }

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

    .showcase-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .showcase-phone {
        order: -1;
    }

    .showcase-phone .phone-placeholder,
    .showcase-phone img:not(.showcase-mascot) {
        width: 220px;
    }

    .showcase-phone-frame {
        width: 200px;
        height: 420px;
    }

    .cta-mascot {
        display: none;
    }

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

    .footer-left {
        flex-direction: column;
        gap: 4px;
    }

    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero-ctas {
        flex-direction: column;
        align-items: flex-start;
    }

    .download-cta .hero-ctas {
        align-items: center;
    }
}
