/* ============================================
   Tortillería y Panadería Madero
   Clean Minimalist · Emerald + Cream
   ============================================ */

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

:root {
    --emerald-900: #064E3B;
    --emerald-800: #065F46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --cream-50: #FAF8F5;
    --cream-100: #F5F0E8;
    --cream-200: #EDE6D8;
    --cream-300: #E0D5C4;
    --warm-700: #92400E;
    --warm-600: #D4A574;
    --warm-500: #C49A6C;
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-muted: #7A7A7A;
    --white: #FFFFFF;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--text-primary);
    background-color: var(--cream-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    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;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s var(--ease-smooth);
}

.nav.scrolled {
    border-bottom-color: var(--cream-200);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--emerald-900);
}

.nav-logo-mark {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--emerald-900);
    border-radius: 50%;
    color: var(--emerald-900);
}

.nav-logo-text {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

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

.nav-links a {
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color 0.3s var(--ease-smooth);
    position: relative;
}

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

.nav-links a:hover {
    color: var(--emerald-800);
}

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

.nav-cta {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: var(--emerald-800) !important;
    border: 1px solid var(--emerald-700);
    padding: 8px 20px;
    border-radius: 100px;
    transition: background 0.3s, color 0.3s !important;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    background: var(--emerald-800);
    color: var(--white) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--text-primary);
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
    padding-top: 72px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--cream-50);
}

.hero .container {
    flex: 1;
    display: flex;
    align-items: center;
    padding-top: 60px;
    padding-bottom: 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-tag {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--emerald-700);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-tag::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--emerald-700);
}

.hero-headline {
    font-size: clamp(3rem, 5.5vw, 5rem);
    color: var(--text-primary);
    margin-bottom: 28px;
    line-height: 1.05;
}

.hero-headline .accent {
    color: var(--emerald-800);
    font-style: italic;
}

.hero-desc {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 440px;
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 100px;
    transition: all 0.3s var(--ease-smooth);
    white-space: nowrap;
}

.btn-primary {
    background: var(--emerald-800);
    color: var(--white);
    border: 1.5px solid var(--emerald-800);
}

.btn-primary:hover {
    background: var(--emerald-900);
    border-color: var(--emerald-900);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 78, 59, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--cream-300);
}

.btn-ghost:hover {
    border-color: var(--emerald-700);
    color: var(--emerald-800);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 600px;
}

.hero-image-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

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

.hero-image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    border: 1px solid var(--cream-300);
    border-radius: 12px;
    z-index: -1;
}

/* Floating Cards */
.float-card {
    position: absolute;
    background: var(--white);
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.float-card--1 {
    top: 40px;
    left: -40px;
    animation-delay: 0s;
}

.float-card--2 {
    bottom: 100px;
    left: -30px;
    animation-delay: 2s;
}

.float-card--3 {
    bottom: 30px;
    right: -20px;
    animation-delay: 4s;
}

.float-card-number {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--emerald-800);
    line-height: 1;
    margin-bottom: 4px;
}

.float-card-label {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

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

/* Hero Line */
.hero-line {
    height: 1px;
    background: linear-gradient(90deg, var(--cream-200) 0%, transparent 100%);
    margin: 0 24px;
}

/* --- Section Common --- */
.section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 72px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--emerald-700);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: var(--text-primary);
    margin-bottom: 20px;
}

.section-desc {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 300;
}

/* --- Products --- */
.products {
    background: var(--cream-50);
}

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

.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--cream-200);
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-smooth);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.product-card-image {
    height: 240px;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-body {
    padding: 28px 28px 32px;
}

.product-card-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.product-card-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 300;
}

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

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

.about-image-wrap {
    position: relative;
}

.about-image-wrap > img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
}

.about-image-secondary {
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 55%;
    border-radius: 12px;
    overflow: hidden;
    border: 4px solid var(--cream-100);
}

.about-image-secondary img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

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

.about-content .section-tag {
    margin-bottom: 16px;
}

.about-content .section-title {
    margin-bottom: 28px;
}

.about-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 300;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--cream-300);
}

.about-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.about-stat-value {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--emerald-800);
}

.about-stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* --- Visit --- */
.visit {
    background: var(--cream-50);
    padding-bottom: 0;
}

.visit-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    border: 1px solid var(--cream-200);
    border-bottom: none;
}

.visit-content {
    padding: 72px 60px;
}

.visit-content .section-tag {
    margin-bottom: 16px;
}

.visit-content .section-title {
    margin-bottom: 40px;
}

.visit-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

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

.visit-icon {
    color: var(--emerald-700);
    flex-shrink: 0;
    margin-top: 2px;
}

.visit-detail-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.visit-detail-value {
    display: block;
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
}

.visit-detail-value a {
    color: var(--emerald-800);
    transition: color 0.3s;
}

.visit-detail-value a:hover {
    color: var(--emerald-600);
}

.visit-map {
    min-height: 480px;
    background: var(--cream-200);
}

.visit-map iframe {
    width: 100%;
    height: 100%;
    filter: saturate(0.6) brightness(1.05);
    transition: filter 0.4s;
}

.visit-map:hover iframe {
    filter: saturate(1) brightness(1);
}

/* --- Contact --- */
.contact {
    background: var(--cream-100);
}

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

.contact-info .section-tag {
    margin-bottom: 16px;
}

.contact-info .section-title {
    margin-bottom: 20px;
}

.contact-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-weight: 300;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    color: var(--text-primary);
    padding: 12px 0;
    border-bottom: 1px solid var(--cream-300);
    transition: color 0.3s, padding-left 0.3s;
}

.contact-method:hover {
    color: var(--emerald-800);
    padding-left: 8px;
}

.contact-method svg {
    color: var(--emerald-700);
    flex-shrink: 0;
}

/* Form */
.contact-form-wrap {
    background: var(--white);
    border-radius: 20px;
    padding: 48px;
    border: 1px solid var(--cream-200);
}

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

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

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

.form-group label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--text-primary);
    background: var(--cream-50);
    border: 1px solid var(--cream-300);
    border-radius: 10px;
    padding: 14px 16px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--emerald-600);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

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

.form-success {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 10px;
    color: var(--emerald-800);
    font-size: 0.875rem;
    font-weight: 400;
}

.form-success.show {
    display: flex;
}

.form-success svg {
    flex-shrink: 0;
    color: var(--emerald-700);
}

/* --- Footer --- */
.footer {
    background: var(--emerald-900);
    color: var(--cream-200);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--cream-200);
}

.footer-logo-mark {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--cream-300);
    border-radius: 50%;
    color: var(--cream-200);
}

.footer-logo-text {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--white);
}

.footer-tagline {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--cream-300);
    max-width: 280px;
    font-weight: 300;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--cream-300);
    transition: color 0.3s, padding-left 0.3s;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 6px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--cream-300);
    font-weight: 300;
}

.footer-info a {
    color: var(--cream-300);
    transition: color 0.3s;
}

.footer-info a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--cream-300);
    font-weight: 300;
    opacity: 0.7;
}

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
    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; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-grid {
        gap: 40px;
    }
    
    .hero-visual {
        height: 480px;
    }
    
    .about-grid {
        gap: 48px;
    }
    
    .about-image-secondary {
        right: -20px;
        bottom: -20px;
    }
    
    .visit-content {
        padding: 48px 40px;
    }
    
    .contact-grid {
        gap: 48px;
    }
    
    .contact-form-wrap {
        padding: 36px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(250, 248, 245, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 32px 24px;
        gap: 24px;
        border-bottom: 1px solid var(--cream-200);
        transform: translateY(-120%);
        opacity: 0;
        transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
        pointer-events: none;
    }
    
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .hero-visual {
        height: 400px;
        order: -1;
    }
    
    .float-card--1 {
        left: 10px;
        top: 20px;
    }
    
    .float-card--2 {
        left: 10px;
        bottom: 60px;
    }
    
    .float-card--3 {
        right: 10px;
        bottom: 10px;
    }
    
    .hero-line {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }
    
    .about-image-wrap {
        max-width: 400px;
    }
    
    .about-image-secondary {
        right: 0;
        bottom: -20px;
    }
    
    .about-stats {
        gap: 24px;
    }
    
    .visit-card {
        grid-template-columns: 1fr;
    }
    
    .visit-content {
        padding: 48px 28px;
    }
    
    .visit-map {
        min-height: 300px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .section {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-headline {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .float-card {
        padding: 14px 16px;
    }
    
    .float-card-number {
        font-size: 1.2rem;
    }
    
    .contact-form-wrap {
        padding: 28px 20px;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 20px;
    }
}
