/* ============================================
   Panaderia La Perla — Styles
   ============================================ */

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

:root {
    --green-900: #0D1F17;
    --green-800: #1B4332;
    --green-700: #2D6A4F;
    --green-600: #40916C;
    --green-500: #52B788;
    --green-100: #D8F3DC;
    --green-50:  #F0FFF4;

    --cream:     #FDF8F0;
    --cream-dark:#F5EDE0;
    --cream-mid: #EDE3D0;

    --gold:      #D4A574;
    --gold-dark: #B8864E;
    --gold-light:#E8C9A0;

    --text-dark:  #1A1A1A;
    --text-mid:   #3D3D3D;
    --text-light: #6B6B6B;
    --text-white: #FDF8F0;

    --radius-sm:  8px;
    --radius-md:  14px;
    --radius-lg:  24px;
    --radius-xl:  32px;

    --shadow-sm:  0 2px 8px rgba(27, 67, 50, 0.06);
    --shadow-md:  0 4px 20px rgba(27, 67, 50, 0.10);
    --shadow-lg:  0 8px 40px rgba(27, 67, 50, 0.14);
    --shadow-xl:  0 16px 60px rgba(27, 67, 50, 0.18);

    --font-heading: 'Lora', Georgia, serif;
    --font-body:    'Nunito', 'Segoe UI', sans-serif;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 248, 240, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(27, 67, 50, 0.08);
    transition: box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--green-800);
}

.nav-logo-text {
    letter-spacing: -0.01em;
}

.accent {
    color: var(--gold-dark);
}

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

.nav-link {
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-800);
    transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
    background: var(--green-100);
    color: var(--green-700);
}

.nav-cta {
    background: var(--green-800);
    color: var(--text-white) !important;
    margin-left: 8px;
}

.nav-cta:hover {
    background: var(--green-700);
    color: var(--text-white) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.nav-toggle:hover {
    background: var(--green-100);
}

.hamburger {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--green-800);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .hamburger:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--green-800);
    color: var(--text-white);
    box-shadow: 0 4px 14px rgba(27, 67, 50, 0.25);
}

.btn-primary:hover {
    background: var(--green-700);
    box-shadow: 0 6px 20px rgba(27, 67, 50, 0.35);
}

.btn-secondary {
    background: white;
    color: var(--green-800);
    border: 2px solid var(--green-800);
}

.btn-secondary:hover {
    background: var(--green-50);
    box-shadow: var(--shadow-md);
}

.btn-outline-dark {
    background: transparent;
    color: var(--green-800);
    border: 2px solid var(--green-800);
}

.btn-outline-dark:hover {
    background: var(--green-800);
    color: var(--text-white);
}

.btn-sm {
    padding: 10px 22px;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    background: var(--cream);
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(212, 165, 116, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(45, 106, 79, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green-100);
    color: var(--green-700);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    line-height: 1.15;
    color: var(--green-800);
    margin-bottom: 10px;
    font-weight: 600;
}

.hero-title-accent {
    display: block;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 400;
    font-style: italic;
    color: var(--gold-dark);
    margin-top: 8px;
    line-height: 1.4;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-mid);
    line-height: 1.8;
    margin: 24px 0 36px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 48px;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--green-700);
}

/* Hero Images */
.hero-image-wrap {
    position: relative;
    height: 640px;
}

.hero-image-main {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-image-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image-float {
    position: absolute;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
}

.hero-image-float img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image-bread {
    width: 260px;
    height: 200px;
    bottom: 60px;
    left: -40px;
    animation: floatSlow 6s ease-in-out infinite;
}

.hero-image-coffee {
    width: 220px;
    height: 180px;
    top: 40px;
    right: -30px;
    animation: floatSlow 7s ease-in-out infinite reverse;
}

.hero-accent-circle {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--green-100);
    top: -40px;
    right: 40px;
    z-index: -1;
    opacity: 0.6;
}

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

/* ---------- Section Shared ---------- */
.section-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--green-800);
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-mid);
    max-width: 600px;
    line-height: 1.8;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header .section-subtitle {
    margin: 0 auto;
}

/* ---------- Products ---------- */
.products {
    padding: 100px 0;
    background: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 56px;
}

.product-card {
    background: var(--cream);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-img-wrap {
    height: 220px;
    overflow: hidden;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.06);
}

.product-body {
    padding: 24px 28px 28px;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--green-800);
    margin-bottom: 8px;
}

.product-desc {
    font-size: 0.92rem;
    color: var(--text-mid);
    line-height: 1.7;
}

.products-cta {
    text-align: center;
    padding: 40px;
    background: var(--green-50);
    border-radius: var(--radius-xl);
    border: 1px solid var(--green-100);
}

.products-cta p {
    font-size: 1rem;
    color: var(--text-mid);
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.products-cta .btn {
    margin: 0 auto;
}

/* ---------- About ---------- */
.about {
    padding: 100px 0;
    background: var(--cream);
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-images {
    position: relative;
}

.about-img-main {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-img-secondary {
    position: absolute;
    bottom: -30px;
    right: -20px;
    width: 55%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 5px solid var(--cream);
}

.about-img-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-accent {
    position: absolute;
    top: -20px;
    right: 30px;
    opacity: 0.4;
    animation: spinSlow 20s linear infinite;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.about-content {
    padding: 20px 0;
}

.about-text {
    font-size: 1.02rem;
    color: var(--text-mid);
    line-height: 1.85;
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 36px 0;
    padding: 28px 0;
    border-top: 1px solid var(--cream-mid);
    border-bottom: 1px solid var(--cream-mid);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--green-800);
    line-height: 1;
}

.stat-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

.stat-divider {
    width: 2px;
    height: 40px;
    background: var(--cream-mid);
    border-radius: 2px;
}

/* ---------- Visit ---------- */
.visit {
    padding: 100px 0;
    background: white;
}

.visit-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.visit-text {
    font-size: 1.02rem;
    color: var(--text-mid);
    line-height: 1.85;
    margin-bottom: 36px;
}

.visit-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 36px;
}

.visit-detail {
    display: flex;
    gap: 16px;
}

.visit-detail dt {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--green-800);
    min-width: 100px;
}

.visit-detail dd {
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.7;
}

.visit-detail dd a {
    color: var(--green-700);
    font-weight: 600;
    transition: color var(--transition);
}

.visit-detail dd a:hover {
    color: var(--green-500);
}

.visit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Map */
.visit-map {
    position: sticky;
    top: 100px;
}

.map-placeholder {
    background: var(--green-50);
    border: 2px solid var(--green-100);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.map-placeholder-inner {
    padding: 48px 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.map-label {
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.6;
}

/* ---------- Contact ---------- */
.contact {
    padding: 100px 0;
    background: var(--green-800);
    color: var(--text-white);
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact .section-tag {
    color: var(--gold-light);
}

.contact .section-title {
    color: var(--text-white);
}

.contact-text {
    font-size: 1.02rem;
    color: rgba(253, 248, 240, 0.75);
    line-height: 1.85;
}

.contact-form-wrap {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--green-800);
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--cream-mid);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--cream);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green-600);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Success message */
.form-success {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.form-success.hidden {
    display: none;
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--green-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.success-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--green-800);
}

.success-text {
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.7;
    max-width: 360px;
}

.success-text a {
    color: var(--green-700);
    font-weight: 700;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--green-900);
    color: rgba(253, 248, 240, 0.7);
    padding: 64px 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1.6fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 0.92rem;
    line-height: 1.75;
    max-width: 320px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col li {
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col a {
    transition: color var(--transition);
}

.footer-col a:hover {
    color: var(--gold-light);
}

.footer-bottom {
    border-top: 1px solid rgba(253, 248, 240, 0.1);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: rgba(253, 248, 240, 0.45);
}

/* ---------- Scroll Reveal (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-inner {
        gap: 40px;
    }

    .hero-image-wrap {
        height: 500px;
    }

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(253, 248, 240, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 24px;
        gap: 8px;
        border-bottom: 1px solid rgba(27, 67, 50, 0.1);
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        opacity: 0;
        transition: transform var(--transition), opacity var(--transition);
        pointer-events: none;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px 18px;
    }

    .nav-cta {
        margin-left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-image-wrap {
        height: 380px;
        order: -1;
    }

    .hero-image-bread {
        width: 160px;
        height: 130px;
        left: -10px;
        bottom: 20px;
    }

    .hero-image-coffee {
        width: 150px;
        height: 120px;
        right: -10px;
        top: 10px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        justify-content: center;
    }

    .hero-trust {
        gap: 16px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    .about-inner,
    .visit-inner,
    .contact-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-images {
        order: -1;
        max-width: 480px;
        margin: 0 auto;
    }

    .about-img-secondary {
        width: 60%;
        right: -10px;
        bottom: -20px;
    }

    .visit-map {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-image-wrap {
        height: 300px;
    }

    .hero-image-bread {
        width: 120px;
        height: 100px;
    }

    .hero-image-coffee {
        width: 120px;
        height: 100px;
    }

    .contact-form-wrap {
        padding: 24px;
    }

    .about-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-divider {
        display: none;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}
