/* Williz Services - Style Sheet */

:root {
    /* Colors */
    --color-primary: #C45D3E;       /* Terracotta/burnt orange */
    --color-primary-dark: #A34B30;
    --color-primary-light: #E8856A;
    --color-secondary: #2D5F3E;     /* Deep forest green */
    --color-secondary-dark: #1E4A2D;
    --color-secondary-light: #3D7A52;
    --color-accent: #FDF6EC;        /* Warm cream */
    --color-accent-warm: #FAE8D0;
    --color-text: #3B2F2F;          /* Dark brown */
    --color-text-light: #6B5B5B;
    --color-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Fraunces', serif;
    --font-body: 'DM Sans', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;

    /* Layout */
    --max-width: 1200px;
    --nav-height: 72px;

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-2xl) 0;
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(59, 47, 47, 0.06);
    z-index: 100;
    transition: box-shadow 0.3s, background 0.3s;
}

.nav--scrolled {
    background: var(--color-white);
    box-shadow: 0 2px 20px rgba(59, 47, 47, 0.1);
}

.nav__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav__logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.nav__logo-tagline {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    opacity: 0.7;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav__logo-icon {
    font-size: 1.5rem;
}

.nav__toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.nav__toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav__toggle.active .nav__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__toggle.active .nav__toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav__toggle.active .nav__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav__menu {
    display: none;
    list-style: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(59, 47, 47, 0.08);
    box-shadow: 0 4px 20px rgba(59, 47, 47, 0.1);
}

.nav__menu.active {
    display: block;
}

.nav__link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-weight: 500;
    transition: color 0.2s;
}

.nav__link:hover {
    color: var(--color-primary);
}

.nav__link--cta {
    color: var(--color-primary);
    font-weight: 700;
}

/* Desktop nav */
@media (min-width: 768px) {
    .nav__toggle {
        display: none;
    }

    .nav__menu {
        display: flex;
        position: static;
        background: none;
        padding: 0;
        border: none;
        box-shadow: none;
        gap: var(--space-xs);
        align-items: center;
    }

    .nav__link {
        padding: var(--space-xs) var(--space-sm);
    }

    .nav__link--cta {
        background: var(--color-primary);
        color: var(--color-white);
        border-radius: var(--radius-sm);
        padding: var(--space-xs) var(--space-md);
        transition: background 0.2s, transform 0.2s;
    }

    .nav__link--cta:hover {
        background: var(--color-primary-dark);
        color: var(--color-white);
        transform: translateY(-1px);
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 2px 8px rgba(196, 93, 62, 0.25);
}

.btn--primary:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 16px rgba(196, 93, 62, 0.35);
    transform: translateY(-2px);
}

.btn--outline {
    border-color: var(--color-white);
    color: var(--color-white);
    background: transparent;
}

.btn--outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn--lg {
    padding: var(--space-xs) var(--space-lg);
    font-size: 1rem;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .btn--lg {
        padding: var(--space-sm) var(--space-xl);
        font-size: 1.125rem;
    }
}

.btn--whatsapp {
    background: #25D366;
    color: var(--color-white);
}

.btn--whatsapp:hover {
    background: #1DA851;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: url('../images/hero.webp') 70% center/cover no-repeat;
    background-image: image-set(
        url('../images/hero.webp') type('image/webp'),
        url('../images/hero.jpg') type('image/jpeg')
    );
    background-position: 70% center;
    background-size: cover;
    z-index: -3;
}

/* Dark overlay for text legibility */
.hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, rgba(30, 74, 45, 0.82) 0%, rgba(45, 95, 62, 0.7) 40%, rgba(196, 93, 62, 0.65) 100%);
    z-index: -2;
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 50%, rgba(196, 93, 62, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 20%, rgba(45, 95, 62, 0.25) 0%, transparent 50%);
    z-index: -1;
}

.hero__container {
    position: relative;
    z-index: 1;
}

.hero__content {
    max-width: 680px;
    color: var(--color-white);
}

.hero__title {
    font-size: clamp(2.25rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: var(--space-md);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.hero__title span {
    white-space: nowrap;
    font-variation-settings: "opsz" 144;
}

.hero__subtitle {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    opacity: 0.92;
    margin-bottom: var(--space-xl);
    line-height: 1.7;
    max-width: 540px;
}

.hero__actions {
    display: flex;
    gap: var(--space-sm);
}

/* ===== SECTION HEADERS ===== */
.section__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.section__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PRODUCTS ===== */
.products {
    background: var(--color-accent);
    position: relative;
}

.products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s;
    border: 1px solid rgba(59, 47, 47, 0.04);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(59, 47, 47, 0.14);
}

.product-card__image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.product-card__name {
    font-size: 1.125rem;
    font-weight: 700;
    padding: var(--space-sm) var(--space-md) var(--space-xs);
}

.product-card__desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    padding: 0 var(--space-md) var(--space-md);
    line-height: 1.6;
}

.products__cta {
    text-align: center;
    margin-top: var(--space-xl);
}

.products__cta p {
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
}

/* ===== ABOUT ===== */
.about {
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--color-accent-warm);
    opacity: 0.4;
    z-index: 0;
}

.about__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.about__image-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--color-accent-warm), var(--color-accent));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    box-shadow: 0 20px 60px rgba(59, 47, 47, 0.1);
    position: relative;
}

.about__image-placeholder::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px dashed var(--color-primary-light);
    border-radius: calc(var(--radius-lg) + 4px);
    opacity: 0.4;
}

.about__text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.about__text:first-of-type::first-line {
    font-weight: 500;
}

.about__text:last-of-type {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .about__container {
        grid-template-columns: 1fr 1.2fr;
    }
}

/* ===== DELIVERY ===== */
.delivery {
    background: var(--color-accent);
}

.delivery__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.delivery-step {
    text-align: center;
    padding: var(--space-lg);
}

.delivery-step__number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-sm);
    box-shadow: 0 4px 16px rgba(196, 93, 62, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.delivery-step:hover .delivery-step__number {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(196, 93, 62, 0.4);
}

.delivery-step__title {
    font-size: 1.125rem;
    margin-bottom: var(--space-xs);
}

.delivery-step__desc {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.delivery__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
}

.delivery__info-card {
    background: var(--color-white);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary-light);
    transition: box-shadow 0.3s;
}

.delivery__info-card:hover {
    box-shadow: 0 4px 20px rgba(59, 47, 47, 0.08);
}

.delivery__info-card h4 {
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
    font-family: var(--font-heading);
}

.delivery__info-card p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* ===== CONTACT ===== */
.contact {
    background: var(--color-secondary-dark);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

/* Subtle pattern in contact section */
.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        linear-gradient(45deg, transparent 45%, rgba(255,255,255,1) 45%, rgba(255,255,255,1) 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, rgba(255,255,255,1) 45%, rgba(255,255,255,1) 55%, transparent 55%);
    background-size: 40px 40px;
}

.contact .section__title {
    color: var(--color-white);
}

.contact .section__subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    position: relative;
    z-index: 1;
}

.contact__channels {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contact__channel {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: background 0.2s, transform 0.2s;
}

.contact__channel:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.contact__channel--whatsapp {
    background: rgba(37, 211, 102, 0.2);
    border: 1px solid rgba(37, 211, 102, 0.3);
}

.contact__channel--whatsapp:hover {
    background: rgba(37, 211, 102, 0.3);
}

.contact__channel-icon {
    font-size: 2rem;
}

.contact__channel strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.contact__channel span {
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (min-width: 768px) {
    .contact__channels {
        flex-direction: row;
    }

    .contact__channel {
        flex: 1;
    }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-text);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-xl) 0;
    text-align: center;
}

.footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.footer__name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-white);
}

.footer__tagline {
    font-size: 0.95rem;
}

.footer__links {
    display: flex;
    gap: var(--space-md);
}

.footer__links a {
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.footer__copy {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: var(--space-xs);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Stagger children within product grid */
.reveal.revealed .product-card {
    animation: cardReveal 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.reveal.revealed .product-card:nth-child(1) { animation-delay: 0.05s; }
.reveal.revealed .product-card:nth-child(2) { animation-delay: 0.1s; }
.reveal.revealed .product-card:nth-child(3) { animation-delay: 0.15s; }
.reveal.revealed .product-card:nth-child(4) { animation-delay: 0.2s; }
.reveal.revealed .product-card:nth-child(5) { animation-delay: 0.25s; }
.reveal.revealed .product-card:nth-child(6) { animation-delay: 0.3s; }
.reveal.revealed .product-card:nth-child(7) { animation-delay: 0.35s; }
.reveal.revealed .product-card:nth-child(8) { animation-delay: 0.4s; }

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== HERO ANIMATION ===== */
@media (prefers-reduced-motion: no-preference) {
    .hero__content {
        animation: fadeInUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .hero__title {
        animation: fadeInUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
    }

    .hero__subtitle {
        animation: fadeInUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s both;
    }

    .hero__actions {
        animation: fadeInUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(24px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Respect reduced motion for scroll reveals */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .reveal.revealed .product-card {
        animation: none;
    }
}
