/* =========================================================================
   ESTILO MODERNO · capa visual
   Solo cambia la apariencia: no mueve secciones ni cambia el orden.
   Se carga después de styles.css y tienda.css. Para volver al estilo
   anterior basta con quitar el <link> a este archivo (y moderno.js).
   Idea: textil de lujo. Costuras, tramas de tela, hilo dorado y botones.
   ========================================================================= */

/* ---------- Tipografía: Fraunces (serif elegante) para los acentos dorados ---------- */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(tipografias/fraunces-latin-wght-normal.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(tipografias/fraunces-latin-ext-wght-normal.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url(tipografias/fraunces-latin-wght-italic.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Fraunces';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url(tipografias/fraunces-latin-ext-wght-italic.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --font-serif: 'Fraunces', Georgia, serif;
    --oro: #c9a46a;            /* dorado luminoso para detalles */
    --oro-hilo: linear-gradient(90deg, #b3864b, #e6c992 50%, #b3864b);
    /* Tramas de tela (SVG muy sutiles) */
    --trama-lino: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M0 .5h6M.5 0v6' stroke='%230f2d4c' stroke-opacity='.022'/%3E%3C/svg%3E");
    --trama-sarga: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M-1 11L11 -1M4 11L11 4M-1 6L6 -1' stroke='%23ffffff' stroke-opacity='.035'/%3E%3C/svg%3E");
    /* Costura: línea punteada dorada */
    --costura: repeating-linear-gradient(90deg, var(--oro) 0 6px, transparent 6px 11px);
}

::selection { background: var(--gold); color: #fff; }

/* Barra de desplazamiento en tonos de la marca */
html { scrollbar-color: var(--gold) var(--ivory); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ivory); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--navy), var(--gold)); border-radius: 10px; border: 2px solid var(--ivory); }

/* ---------- Títulos ---------- */
.section-title h2,
.manifesto-header h2,
.values-header h2,
.pf-info h2,
.mayor h2,
.shop-hero h1 {
    letter-spacing: -0.025em;
}
/* La palabra dorada de cada título en serif cursiva, con subrayado de hilo que se dibuja */
.section-title h2 em,
.manifesto-header h2 em,
.mayor h2 em,
.shop-hero h1 em,
.hero-promo h2 em,
.ruleta-section h2 em {
    position: relative;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 0 0.04em;
    -webkit-box-decoration-break: clone;
            box-decoration-break: clone;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M1 6 C 15 1, 25 9, 40 5 S 65 1, 80 5 S 105 9, 119 4' fill='none' stroke='%23c9a46a' stroke-width='1.6' stroke-linecap='round' stroke-dasharray='4 3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 0.32em;
    transition: background-size 1.4s var(--ease-out) 0.35s;
}
.section-title h2.is-visible em,
.section-title.is-visible h2 em,
.is-visible > h2 em,
h2 em.hilo-visible,
.hero-promo.is-active h2 em {
    background-size: 100% 0.32em;
}

/* Cifras grandes (Nosotros, valores, precios destacados) en serif */
.manifesto-card h3,
.value-number {
    font-family: var(--font-serif);
    font-weight: 400;
    font-variation-settings: 'opsz' 96;
    letter-spacing: -0.02em;
}
.value-number { font-style: italic; }

/* Etiquetas pequeñas: como cinta tejida */
.eyebrow,
.pf-eyebrow,
.card-eyebrow,
.product-cat {
    letter-spacing: 0.22em;
}

/* ---------- Tramas de tela en los fondos ---------- */
.section-ivory,
.section-sand,
.section-white,
.reviews-section,
.payment-methods-section,
.shop-results {
    background-image: var(--trama-lino);
}
.values-section,
.ticker-wrap {
    background-image: var(--trama-sarga);
}

/* ---------- Adornos de sección: costura + botón de tela ---------- */
.ornament::before,
.ornament::after {
    width: 70px;
    height: 2px;
    background: var(--costura);
    -webkit-mask: linear-gradient(90deg, transparent, #000 60%);
            mask: linear-gradient(90deg, transparent, #000 60%);
}
.ornament::after {
    -webkit-mask: linear-gradient(90deg, #000 40%, transparent);
            mask: linear-gradient(90deg, #000 40%, transparent);
}
/* El rombo pasa a ser un botón de costura con 4 agujeros */
.ornament > span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid var(--oro);
    background:
        radial-gradient(circle at 35% 35%, var(--oro) 0 1px, transparent 1.4px),
        radial-gradient(circle at 65% 35%, var(--oro) 0 1px, transparent 1.4px),
        radial-gradient(circle at 35% 65%, var(--oro) 0 1px, transparent 1.4px),
        radial-gradient(circle at 65% 65%, var(--oro) 0 1px, transparent 1.4px);
}
.js .ornament > span { transform: scale(0) rotate(-120deg); }
.js .ornament.is-visible > span { transform: scale(1) rotate(0); }
.ornament-light > span { border-color: var(--gold-light); }

/* ---------- Botones: costura interior al pasar el mouse ---------- */
.btn,
.btn-lux,
.btn-ghost,
.btn-ghost-dark,
.btn-outline-light,
.btn-card,
.ruleta-btn {
    position: relative;
    isolation: isolate;
    letter-spacing: 0.02em;
}
.btn::before,
.btn-lux::before,
.btn-ghost::before,
.btn-ghost-dark::before,
.btn-outline-light::before,
.btn-card::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px dashed currentColor;
    border-radius: inherit;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 0.4s ease, transform 0.5s var(--ease-out);
    pointer-events: none;
}
.btn:hover::before,
.btn-lux:hover::before,
.btn-ghost:hover::before,
.btn-ghost-dark:hover::before,
.btn-outline-light:hover::before,
.btn-card:hover::before {
    opacity: 0.55;
    transform: scale(1);
}
.btn-lux,
.btn-primary {
    box-shadow: 0 14px 30px -14px rgba(15, 45, 76, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-lux-gold {
    background: linear-gradient(135deg, #b3864b, #d4b07a 55%, #b3864b);
    background-size: 200% 100%;
    transition: background-position 0.8s var(--ease-out), color 0.45s ease, box-shadow 0.45s ease, translate 0.45s var(--ease-out);
}
.btn-lux-gold:hover { background-position: 100% 0; }
.btn-lux:active, .btn:active, .btn-ghost:active, .btn-card:active { scale: 0.97; }

/* Movimiento "magnético" (lo controla moderno.js) */
.iman { transition: translate 0.35s var(--ease-out); }

/* ---------- Menú: subrayado de hilo dorado ---------- */
.header-nav a:not(.btn-tienda) {
    position: relative;
    padding-bottom: 4px;
}
.header-nav a:not(.btn-tienda)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--costura);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease-out);
}
.header-nav a:not(.btn-tienda):hover::after,
.header-nav a:not(.btn-tienda).active::after { transform: scaleX(1); }
.header-nav a:not(.btn-tienda):hover { color: var(--gold-light); }

/* ---------- Tarjetas de producto ---------- */
.product-card-modern {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}
/* Costura que aparece alrededor de la tarjeta */
.product-card-modern::before {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px dashed var(--oro);
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.5s ease, inset 0.6s var(--ease-out);
    pointer-events: none;
    z-index: 2;
}
.product-card-modern:hover::before { opacity: 0.8; inset: 4px; }
/* Luz que sigue al mouse (moderno.js pone --mx/--my) */
.product-card-modern::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(201, 164, 106, 0.16), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.product-card-modern:hover::after { opacity: 1; }
.product-card-modern .product-image img { transition: transform 1.1s var(--ease-out); }
.product-title { letter-spacing: -0.01em; }
.price-now { font-variant-numeric: tabular-nums; }

/* Tarjetas de Nosotros, valores y opiniones: borde de costura al pasar */
.manifesto-card,
.value-card,
.chat-card {
    transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out), border-color 0.4s ease;
}
.manifesto-card:hover,
.value-card:hover {
    transform: translateY(-6px);
    border-color: rgba(201, 164, 106, 0.55);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(201, 164, 106, 0.25);
}
.chat-card:hover { transform: translateY(-4px) rotate(-0.4deg); }

/* ---------- Pie de página: costura superior ---------- */
.main-footer {
    border-top: 0;
    box-shadow: inset 0 3px 0 -1px transparent;
}
.main-footer > .container:first-child,
.main-footer .footer-grid {
    position: relative;
}
.main-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--costura);
    opacity: 0.7;
}
.main-footer a { transition: color 0.3s ease, padding-left 0.35s var(--ease-out); }
.main-footer li a:hover { padding-left: 6px; color: var(--gold-light); }

/* ---------- Aparición al bajar: entra con desenfoque suave ---------- */
.js .bloque-anim {
    filter: blur(8px);
    transform: translateY(34px) scale(0.985);
    transition: opacity 0.8s ease, transform 0.9s var(--ease-out), filter 0.9s ease;
}
.js .bloque-anim.bloque-visible {
    filter: none;
    transform: none;
}
/* Elementos que moderno.js anima uno tras otro */
.js .entra {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease var(--retraso, 0s), transform 0.8s var(--ease-out) var(--retraso, 0s);
}
.js .entra.entro { opacity: 1; transform: none; }

/* ---------- Hilo dorado: avance de lectura, arriba de la pantalla ---------- */
.hilo-progreso {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: calc(var(--avance, 0) * 100%);
    height: 3px;
    z-index: 1200;
    pointer-events: none;
    background: var(--oro-hilo);
    box-shadow: 0 0 10px rgba(201, 164, 106, 0.6);
}
/* La aguja que lleva el hilo */
.hilo-progreso::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px var(--gold), 0 0 12px var(--oro);
}

/* ---------- Cursor de costura (solo computadoras con mouse) ---------- */
.cursor-aguja,
.cursor-ojal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    pointer-events: none;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.35s var(--ease-out), height 0.35s var(--ease-out), background-color 0.3s ease, border-color 0.3s ease;
}
.cursor-aguja {
    width: 7px;
    height: 7px;
    background: var(--gold);
    margin: -3.5px 0 0 -3.5px;
}
.cursor-ojal {
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 1px dashed var(--gold);
}
.cursor-activo .cursor-aguja,
.cursor-activo .cursor-ojal { opacity: 1; }
.cursor-sobre .cursor-ojal {
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;
    background: rgba(201, 164, 106, 0.12);
    border-style: solid;
}

/* ---------- Detalle textil flotante en las secciones oscuras ---------- */
.ruleta-section,
.manifesto-section,
.values-section,
.mayor {
    position: relative;
    isolation: isolate;   /* el hilo queda detrás del contenido y delante del fondo */
}
.hilo-flotante {
    position: absolute;
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
    width: min(460px, 45vw);
    height: auto;
}
.hilo-flotante path {
    fill: none;
    stroke: var(--oro);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-dasharray: 6 7;
    animation: hilo-corre 18s linear infinite;
}
@keyframes hilo-corre { to { stroke-dashoffset: -260; } }

/* ---------- Accesibilidad: sin movimientos si la persona lo pide ---------- */
@media (prefers-reduced-motion: reduce) {
    .js .bloque-anim { filter: none; transform: none; }
    .js .entra { opacity: 1; transform: none; }
    .hilo-flotante path { animation: none; }
    .section-title h2 em, .manifesto-header h2 em, .mayor h2 em, .hero-promo h2 em { background-size: 100% 0.32em; transition: none; }
}
/* En celulares no se usa cursor ni inclinación 3D */
@media (hover: none), (pointer: coarse) {
    .cursor-aguja, .cursor-ojal { display: none; }
}
