/*
Theme Name: Yolti
Theme URI: https://yolti.mx
Author: Zatelital
Author URI: https://zatelital.com
Description: Tema corporativo para Yolti — crema de cacahuate artesanal premium. Diseño cálido con tonos chocolate, tipografía serif para headings y estética orgánica.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yolti-theme
*/

/* ============================================================
   @FONT-FACE — Awesome Serif (local)
   ============================================================ */
@font-face {
    font-family: 'Awesome Serif';
    src: url('./assets/fonts/AwesomeSerif-SemiBoldTall.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   DESIGN TOKENS — Figma: yolti.com playground
   ============================================================ */
:root {
    /* Brand Colors */
    --y-cafe: #432a18;
    --y-cafe-rgb: 67, 42, 24;
    --y-fondo: #fff9f0;
    --y-cream: #fef5e8;
    --y-cream-dark: #f9ead3;
    --y-badge-border: rgba(238, 207, 161, 0.3);
    --y-muted: #7b6859;
    --y-white: #ffffff;

    /* Typography */
    --y-font-heading: 'Awesome Serif', 'Georgia', 'Times New Roman', serif;
    --y-font-body: 'Rethink Sans', system-ui, -apple-system, sans-serif;
    --y-font-badge: 'Plus Jakarta Sans', 'Rethink Sans', sans-serif;

    /* Spacing — Figma section padding */
    --y-padding-global: 64px;
    --y-padding-section-lg: 112px;
    --y-padding-section-md: 80px;

    /* Radius */
    --y-radius-sm: 10px;
    --y-radius-md: 12px;
    --y-radius-full: 9999px;

    /* Shadows */
    --y-shadow-card: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --y-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --y-duration: 0.3s;

    /* Layout */
    --y-container: 1280px;
    --y-header-h: 72px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--y-font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--y-cafe);
    background-color: var(--y-fondo);
    -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;
    transition: opacity var(--y-duration) ease;
}

a:hover { opacity: 0.8; }

ul, ol { list-style: none; }

button {
    cursor: pointer;
    background: transparent;
    border: none;
    font: inherit;
    color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--y-cafe-rgb), 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--y-cafe-rgb), 0.25); }

::selection {
    background: rgba(var(--y-cafe-rgb), 0.15);
    color: var(--y-cafe);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.y-container {
    width: 100%;
    max-width: var(--y-container);
    margin: 0 auto;
    padding: 0 var(--y-padding-global);
}

.y-section {
    padding: var(--y-padding-section-lg) var(--y-padding-global);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.y-section__inner {
    width: 100%;
    max-width: var(--y-container);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
}

.y-section-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 768px;
    width: 100%;
    text-align: center;
}

.y-section-title__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
    width: 100%;
}

/* ============================================================
   TYPOGRAPHY — Figma Tokens
   ============================================================ */
.y-h1 {
    font-family: var(--y-font-heading);
    font-weight: 600;
    font-size: 56px;
    line-height: 1.2;
    color: var(--y-cafe);
}

.y-h2 {
    font-family: var(--y-font-heading);
    font-weight: 600;
    font-size: 48px;
    line-height: 1.2;
    color: var(--y-cafe);
}

.y-h5 {
    font-family: var(--y-font-heading);
    font-weight: 600;
    font-size: 24px;
    line-height: 1.4;
    color: var(--y-cafe);
}

.y-text-md {
    font-family: var(--y-font-body);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
}

.y-text {
    font-family: var(--y-font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
}

.y-text-sm {
    font-family: var(--y-font-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
}

.y-text-semibold {
    font-weight: 600;
}

/* ============================================================
   BUTTONS — Figma exact
   ============================================================ */
.y-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--y-font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    border-radius: var(--y-radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.y-btn--primary {
    background: var(--y-cafe);
    color: var(--y-white);
    border-color: var(--y-cafe);
    padding: 12px 24px;
}

.y-btn--primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.y-btn--outline {
    background: transparent;
    color: var(--y-cafe);
    border-color: var(--y-cafe);
    padding: 12px 24px;
}

.y-btn--outline:hover {
    background: rgba(var(--y-cafe-rgb), 0.05);
}

.y-btn--sm {
    padding: 8px 20px;
}

.y-btn--full {
    width: 100%;
}

/* ============================================================
   BADGES — Figma pill chips
   ============================================================ */
.y-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 9px 17px;
    border-radius: var(--y-radius-full);
    background: var(--y-cream);
    border: 1px solid var(--y-badge-border);
}

.y-badge--dark {
    background: var(--y-cream-dark);
}

.y-badge__icon {
    width: 16px;
    height: 16px;
    color: var(--y-cafe);
    flex-shrink: 0;
}

.y-badge__icon svg,
.y-badge__icon i {
    width: 16px;
    height: 16px;
}

.y-badge__text {
    font-family: var(--y-font-badge);
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: var(--y-cafe);
    white-space: nowrap;
}

/* ============================================================
   HEADER / NAVBAR — Figma: centered logo, links left/right
   ============================================================ */
.y-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--y-header-h);
    background: var(--y-fondo);
    border-bottom: 1px solid rgba(var(--y-cafe-rgb), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--y-padding-global);
    transition: all 0.3s ease;
}

.y-header--scrolled {
    background: rgba(255, 249, 240, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.y-header__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    width: 100%;
    max-width: var(--y-container);
}

.y-header__left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 32px;
}

.y-header__left .y-header__link {
    font-family: var(--y-font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--y-cafe);
    transition: opacity 0.2s ease;
}

.y-header__left .y-header__link:hover {
    opacity: 0.7;
}

.y-header__logo {
    flex-shrink: 0;
    display: grid;
    place-items: center;
}

.y-header__logo-default,
.y-header__logo-scroll {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s var(--y-ease),
                transform 0.4s var(--y-ease);
}

.y-header__logo-default img,
.y-header__logo-default .custom-logo {
    height: 21px;
    width: auto;
}

/* Scroll logo — hidden by default */
.y-header__logo-scroll {
    opacity: 0;
    transform: translateY(4px) scale(0.8);
    pointer-events: none;
}

.y-header__logo-scroll img {
    height: 18px;
    width: auto;
}

/* === Scrolled state === */
.y-header--scrolled .y-header__logo-default {
    opacity: 0;
    transform: translateY(-4px) scale(0.8);
    pointer-events: none;
}

.y-header--scrolled .y-header__logo-scroll {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.y-header__right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.y-header__icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.y-header__icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--y-radius-full);
    transition: background 0.2s ease;
}

.y-header__icon-btn:hover {
    background: rgba(var(--y-cafe-rgb), 0.06);
}

.y-header__icon-btn svg,
.y-header__icon-btn i {
    width: 24px;
    height: 24px;
    color: var(--y-cafe);
}

/* Mobile toggle */
.y-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
}

.y-mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--y-cafe);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.y-mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--y-fondo);
    z-index: 99;
    padding: 100px var(--y-padding-global) 32px;
    flex-direction: column;
}

.y-mobile-menu.active { display: flex; }

.y-mobile-menu__link {
    display: block;
    padding: 16px 0;
    font-size: 22px;
    font-weight: 500;
    border-bottom: 1px solid rgba(var(--y-cafe-rgb), 0.08);
}

/* ============================================================
   HERO — Figma: centered text, badges row, full-width image
   ============================================================ */
.y-hero {
    padding: var(--y-padding-section-lg) var(--y-padding-global);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.y-hero__inner {
    width: 100%;
    max-width: var(--y-container);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
}

.y-hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    max-width: 768px;
    width: 100%;
    text-align: center;
}

.y-hero__text {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    text-align: center;
    width: 100%;
}

.y-hero__actions {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.y-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.y-hero__image {
    width: 100%;
    aspect-ratio: 1280 / 720;
    border-radius: var(--y-radius-md);
    overflow: hidden;
    position: relative;
}

.y-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--y-radius-md);
}

/* ============================================================
   FEATURES — Figma: 4-col grid with icon + text, centered
   ============================================================ */
.y-section--cream {
    background: var(--y-cream);
}

.y-features__row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    width: 100%;
}

.y-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.y-feature__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--y-cafe);
}

.y-feature__icon svg,
.y-feature__icon i {
    width: 48px;
    height: 48px;
}

.y-feature__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
    width: 100%;
}

/* ============================================================
   PRODUCTS — Figma: 4-col grid with image, name, price, button
   ============================================================ */
.y-products__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    width: 100%;
}

.y-product {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.y-product__image {
    width: 100%;
    aspect-ratio: 395 / 486;
    border-radius: var(--y-radius-sm);
    overflow: hidden;
    position: relative;
    background: var(--y-cream);
}

.y-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--y-ease);
}

.y-product:hover .y-product__image img {
    transform: scale(1.03);
}

.y-product__info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.y-product__header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-height: 48px;
}

.y-product__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.y-product__name {
    font-family: var(--y-font-heading);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.5;
    color: var(--y-cafe);
}

.y-product__variant {
    font-family: var(--y-font-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--y-cafe);
}

.y-product__price {
    font-family: var(--y-font-body);
    font-weight: 600;
    font-size: 20px;
    line-height: 1.5;
    color: var(--y-cafe);
    white-space: nowrap;
    flex-shrink: 0;
}

.y-product__btn {
    width: 100%;
    background: var(--y-cafe);
    color: var(--y-fondo);
    border-color: var(--y-cafe);
    padding: 8px 20px;
    font-family: var(--y-font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    border-radius: var(--y-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--y-cafe);
    transition: all 0.2s ease;
}

.y-product__btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ============================================================
   PROCESS — Figma: dark bg with 4 numbered steps
   ============================================================ */
.y-section--dark {
    background: var(--y-cafe);
    color: var(--y-fondo);
}

.y-section--dark .y-h2,
.y-section--dark .y-h5 {
    color: var(--y-fondo);
}

.y-section--dark .y-text-md,
.y-section--dark .y-text {
    color: var(--y-fondo);
}

.y-process__row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    width: 100%;
}

.y-process-step {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.y-process-step__number {
    font-family: var(--y-font-heading);
    font-weight: 600;
    font-size: 72px;
    line-height: 1;
    color: var(--y-muted);
}

.y-process-step__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================================
   TESTIMONIALS — Figma: 3 cards with stars, quote, avatar
   ============================================================ */
.y-testimonials__row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: 100%;
}

.y-testimonial {
    background: var(--y-white);
    border: 1px solid rgba(var(--y-cafe-rgb), 0.1);
    border-radius: var(--y-radius-md);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow: hidden;
    box-shadow: var(--y-shadow-card);
    transition: transform 0.3s var(--y-ease), box-shadow 0.3s ease;
}

.y-testimonial:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.y-testimonial__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.y-testimonial__stars {
    display: flex;
    gap: 4px;
    color: #f59e0b;
}

.y-testimonial__stars svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.y-testimonial__quote {
    font-family: var(--y-font-body);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: var(--y-cafe);
}

.y-testimonial__avatar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.y-testimonial__avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--y-cream);
}

.y-testimonial__avatar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.y-testimonial__avatar-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.y-testimonial__name {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    color: var(--y-cafe);
}

.y-testimonial__role {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--y-cafe);
}

/* ============================================================
   FOOTER — PetPlate style: columns + massive bottom logotype
   ============================================================ */
.y-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    padding-top: 100px;
}

.y-footer__inner {
    width: 100%;
    max-width: var(--y-container);
    padding: 0 var(--y-padding-global);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 100px;
    margin: 0 auto;
    padding-bottom: 69px;
}

/* ── Seal ── */
.y-footer__seal {
    display: flex;
    justify-content: center;
    width: 100%;
}

.y-footer__seal-img {
    display: block;
    width: 90px;
    height: auto;
    margin: 0 auto;
    opacity: 0.85;
}

/* ── Columns ── */
.y-footer__columns {
    display: flex;
    justify-content: center;
    gap: 120px;
    width: 100%;
}

.y-footer__col-title {
    font-family: var(--y-font-heading);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    color: var(--y-cafe);
    margin-bottom: 16px;
}

.y-footer__col-text {
    font-family: var(--y-font-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.7;
    color: var(--y-muted);
    max-width: 280px;
}

.y-footer__col-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.y-footer__col-links a {
    font-family: var(--y-font-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--y-muted);
    transition: color 0.2s ease;
}

.y-footer__col-links a:hover {
    color: var(--y-cafe);
}

/* ── Copyright (oculto) ── */
.y-footer__copy-row {
    display: none;
}

/* ── Giant Logotype (bottom, cropped) ── */
.y-footer__giant-logo {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: 80px;
    overflow: hidden;
    max-height: 28vw;
    padding: 0 var(--y-padding-global);
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s var(--y-ease), transform 1s var(--y-ease);
}

.y-footer__giant-logo.y-visible {
    opacity: 1;
    transform: translateY(0);
}

.y-footer__giant-svg {
    width: 100%;
    height: auto;
    color: var(--y-cafe);
    display: block;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes y-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes y-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.y-animate {
    opacity: 0;
}

.y-animate--visible {
    animation: y-fade-up 0.6s var(--y-ease) forwards;
}

.y-animate--delay-1 { animation-delay: 0.1s; }
.y-animate--delay-2 { animation-delay: 0.2s; }
.y-animate--delay-3 { animation-delay: 0.3s; }
.y-animate--delay-4 { animation-delay: 0.4s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    :root {
        --y-padding-global: 32px;
        --y-padding-section-lg: 80px;
    }

    .y-h1 { font-size: 42px; }
    .y-h2 { font-size: 36px; }

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

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

    .y-process__row {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px 32px;
    }

    .y-process-step__number {
        font-size: 56px;
    }

    .y-testimonials__row {
        grid-template-columns: 1fr;
    }

    .y-header__left,
    .y-header__right .y-header__icons {
        display: none;
    }

    .y-mobile-toggle {
        display: flex;
    }

    .y-header__inner {
        justify-content: space-between;
    }

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

    .y-footer__giant-logo {
        max-height: 22vw;
    }
}

@media (max-width: 768px) {
    :root {
        --y-padding-global: 20px;
        --y-padding-section-lg: 56px;
        --y-padding-section-md: 40px;
        --y-header-h: 60px;
    }

    .y-h1 { font-size: 32px; }
    .y-h2 { font-size: 28px; }
    .y-h5 { font-size: 20px; }
    .y-text-md { font-size: 16px; }

    .y-section__inner,
    .y-hero__inner {
        gap: 48px;
    }

    .y-hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .y-hero__actions .y-btn {
        width: 100%;
    }

    .y-hero__badges {
        flex-direction: column;
    }

    .y-features__row {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .y-products__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .y-process__row {
        grid-template-columns: 1fr;
    }

    .y-footer__columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .y-footer__giant-logo {
        max-height: 18vw;
        margin-top: 32px;
    }
}
