/* ==========================================
   AMASE PASTELERÍA — Styles
   Color Palette:
     Navy Blue  #153561  (text, headings)
     Cream      #fffbf3  (background)
     Burgundy   #ae4841  (accents, CTAs)
   ========================================== */

/* ---------- Custom Properties ---------- */
:root {
    color-scheme: only light;
    supported-color-schemes: light;

    --color-navy: #153561;
    --color-cream: #fffbf3;
    --color-burgundy: #ae4841;

    --color-navy-light: #1e4a82;
    --color-navy-dark: #0e2340;
    --color-burgundy-light: #c45a53;
    --color-burgundy-dark: #8c3633;
    --color-cream-dark: #f2ebe0;

    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;

    --nav-height: 80px;
    --section-padding: 6rem 0;
    --container-width: 1200px;
    --transition: 0.3s ease;
    --radius: 12px;
    --radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    color-scheme: only light;
}

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

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

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

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
    color: var(--color-navy);
}

h3 {
    font-size: 1.2rem;
    font-weight: 500;
}

h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-burgundy);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-navy);
    opacity: 0.75;
    max-width: 650px;
    margin: 0 auto 2.5rem;
}

/* ---------- Sections ---------- */
.section {
    padding: var(--section-padding);
    text-align: center;
}

.section-alt {
    background-color: var(--color-cream-dark);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--color-burgundy);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-burgundy-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(174, 72, 65, 0.35);
}

.btn-secondary {
    background-color: var(--color-burgundy);
    color: #fff;
}

.btn-secondary:hover {
    background-color: var(--color-burgundy-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(174, 72, 65, 0.35);
}

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

.btn-outline:hover {
    background-color: var(--color-burgundy);
    color: #fff;
    transform: translateY(-2px);
}

.btn-download {
    background-color: var(--color-burgundy);
    color: #fff;
    font-size: 1.15rem;
    padding: 1.1rem 2.5rem;
}

.btn-download:hover {
    background-color: var(--color-burgundy-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(174, 72, 65, 0.4);
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
    font-size: 1.1rem;
    padding: 1rem 2.2rem;
}

.btn-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 39, 67, 0.4);
    filter: brightness(1.08);
}

/* ==========================================
   HEADER / NAVBAR
   ========================================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-cream);
    box-shadow: 0 2px 20px rgba(21, 53, 97, 0.1);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-width);
    width: 90%;
    margin: 0 auto;
    height: var(--nav-height);
}

.nav-logo img {
    height: 125px;
    width: 125px;
    border-radius: 6px;
    transition: opacity var(--transition);
    object-fit: contain;
}

.nav-logo:hover img {
    opacity: 0.85;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--color-navy);
    padding: 0.3rem 0;
    position: relative;
}

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

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

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2.5px;
    background-color: var(--color-navy);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

/* ==========================================
   HERO
   ========================================== */
.hero {
    position: relative;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: var(--nav-height);
}

.hero-parallax {
    position: absolute;
    inset: -20%;
    background-image: url('img/products/Budines(2).jpg');
    background-size: cover;
    background-position: center;
    will-change: transform;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(21, 53, 97, 0.65);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 700px;
}

.hero-logo {
    width: 200px;
    margin: 0 auto 1rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600;
    color: var(--color-cream);
    margin-bottom: 1rem;
}

.hero-sofia {
    margin: 0 auto 1.5rem;
    width: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 4px solid rgba(255, 251, 243, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.hero-sofia-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.hero-intro {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-cream);
    opacity: 0.85;
    margin-bottom: 2rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.hero-intro strong {
    color: var(--color-cream);
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    text-align: left;
}

.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(21, 53, 97, 0.15);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 5;
}

.about-text h2 {
    margin-bottom: 1.2rem;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    opacity: 0.85;
}

.about-text .btn {
    margin-top: 1rem;
}

/* ==========================================
   PARALLAX DIVIDERS
   ========================================== */
.parallax-divider {
    position: relative;
    height: 350px;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-divider--1 {
    background-image: url('img/products/Budines.jpg');
}

.parallax-divider--2 {
    background-image: url('img/products/chocomani.jpg');
}

.parallax-divider--3 {
    background-image: url('img/products/Brownie 26.jpg');
}

.parallax-divider--4 {
    background-image: url('img/products/Pavlova.jpg');
}

.parallax-divider--5 {
    background-image: url('img/products/clasica(1).jpg');
}

.parallax-divider-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(21, 53, 97, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.parallax-quote {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-style: italic;
    color: var(--color-cream);
    text-align: center;
    max-width: 600px;
}

/* ==========================================
   PRODUCTS GRID
   ========================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--color-cream);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(21, 53, 97, 0.08);
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(21, 53, 97, 0.15);
}

.product-img {
    overflow: hidden;
    aspect-ratio: 1;
}

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

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

.product-card h3 {
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-navy);
}

.products-cta {
    margin-top: 1rem;
}

.products-cta p {
    font-size: 1.05rem;
    opacity: 0.75;
    margin-bottom: 1.2rem;
}

/* ==========================================
   CUSTOM CAKES
   ========================================== */
.custom-cakes-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.custom-cake-img {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(21, 53, 97, 0.1);
    aspect-ratio: 4 / 3;
}

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

.custom-cake-img:hover img {
    transform: scale(1.05);
}

.custom-cakes-info h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background-color: var(--color-cream-dark);
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(21, 53, 97, 0.1);
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    line-height: 1;
}

.info-card h4 {
    margin-bottom: 0.5rem;
    color: var(--color-navy);
}

.info-card p {
    font-size: 0.95rem;
    opacity: 0.8;
}

.custom-cakes-note {
    font-style: italic;
    opacity: 0.7;
    font-size: 0.95rem;
    margin-top: 1rem;
}

/* ==========================================
   CATALOG
   ========================================== */
.catalog-content {
    max-width: 650px;
    padding: 3rem 0;
}

.catalog-content .section-subtitle {
    margin-bottom: 2rem;
}

/* ==========================================
   CONTACT
   ========================================== */
.contact-section {
    background-color: var(--color-cream);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-card {
    background-color: var(--color-cream-dark);
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    transition: transform var(--transition);
}

.contact-card:hover {
    transform: translateY(-4px);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: var(--color-burgundy);
    line-height: 1;
}

.contact-icon svg {
    display: inline-block;
}

.contact-card h3 {
    margin-bottom: 0.6rem;
    color: var(--color-navy);
}

.contact-card p {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.contact-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 700;
    color: var(--color-burgundy);
    font-size: 1.05rem;
    transition: color var(--transition);
}

.contact-link:hover {
    color: var(--color-burgundy-dark);
}

/* ==========================================
   FOOTER
   ========================================== */
#footer {
    background-color: var(--color-navy-dark);
    color: rgba(255, 251, 243, 0.8);
    padding-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 251, 243, 0.12);
}

.footer-logo {
    width: 180px;
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
}

.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-nav h4,
.footer-contact h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-cream);
    margin-bottom: 1rem;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav a {
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--color-cream);
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 0.8rem;
    transition: opacity var(--transition);
}

.footer-social:hover {
    opacity: 1;
}

.footer-contact p {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-bottom {
    text-align: center;
    padding: 1.2rem 0;
    font-size: 0.85rem;
    opacity: 0.5;
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children in grids */
.products-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.05s; }
.products-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.1s; }
.products-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.15s; }
.products-grid .animate-on-scroll:nth-child(5) { transition-delay: 0.2s; }
.products-grid .animate-on-scroll:nth-child(6) { transition-delay: 0.25s; }

/* ==========================================
   RESPONSIVE — Tablet
   ========================================== */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .about-image {
        max-width: 450px;
        margin: 0 auto;
    }

    .about-text {
        text-align: center;
    }

    .about-text .btn {
        margin: 1rem auto 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 0.8rem;
    }
}

/* ==========================================
   RESPONSIVE — Mobile
   ========================================== */
@media (max-width: 768px) {
    :root {
        --nav-height: 100px;
        --section-padding: 4rem 0;
    }

    /* Mobile nav */
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-navy);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.8rem;
        transition: right 0.4s ease;
        z-index: 1000;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        color: var(--color-cream) !important;
        font-size: 1.1rem;
    }

    /* Hero adjustments */
    .hero-logo {
        width: 150px;
    }

    .hero-sofia {
        width: 140px;
        height: 140px;
    }

    .hero-intro {
        font-size: 0.95rem;
    }

    /* Parallax fallback for mobile */
    .parallax-divider {
        background-attachment: scroll;
        height: 250px;
    }

    /* Products */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .product-card h3 {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    /* Custom cakes gallery */
    .custom-cakes-gallery {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
    }

    .custom-cakes-gallery {
        grid-template-columns: 1fr;
    }

    .hero-logo {
        width: 130px;
    }

    .hero-sofia {
        width: 120px;
        height: 120px;
    }
}

/* ==========================================
   MOBILE NAV OVERLAY
   ========================================== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ==========================================
   PRINT STYLES (hide nav/footer)
   ========================================== */
@media print {
    #header,
    .parallax-divider,
    .btn,
    #footer {
        display: none;
    }

    .hero {
        min-height: auto;
        height: auto;
        margin-top: 0;
        padding: 2rem 0;
    }

    .hero-parallax,
    .hero-overlay {
        display: none;
    }

    .hero-content {
        color: var(--color-navy);
    }
}

/* ---------- Force Light Mode (prevent browser auto-dark) ---------- */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: only light !important;
    }

    html {
        background-color: #fffbf3 !important;
        color: #153561 !important;
        filter: none !important;
        -webkit-filter: none !important;
    }

    body {
        background-color: #fffbf3 !important;
        color: #153561 !important;
        filter: none !important;
        -webkit-filter: none !important;
    }

    img, video {
        filter: none !important;
        -webkit-filter: none !important;
    }
}
