/* ==========================================================================
   Nezly — sistema de diseño
   Identidad: negro cálido + ámbar (--accent original #FF9500 se conserva
   como --amber-core, ampliado a una rampa completa). Serif con carácter
   (Fraunces) para titulares, Inter para UI/cuerpo.
   ========================================================================== */

/* Permanent Marker (Google Fonts, licencia OFL) — misma fuente que usa la
   app en el nombre de usuario de la polaroid. Autoalojada desde el mismo
   .ttf del repo de la app, para que sea idéntica pixel a pixel. */
@font-face {
    font-family: 'Permanent Marker';
    src: url('fonts/PermanentMarker-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Fondo — negro cálido, no negro puro */
    --bg-deep:      #0A0806;
    --bg-surface:   #141110;
    --bg-elevated:  #1E1A17;
    --bg-card:      rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border-subtle: rgba(255, 255, 255, 0.08);

    /* Ámbar — el gradiente del icono. --amber-core === antiguo --accent (#FF9500) */
    --amber-bright: #FFB347;
    --amber-core:   #FF9500;
    --amber-deep:   #C77B2E;
    --amber-ember:  #8B4A1F;
    --amber-soft:   rgba(255, 149, 0, 0.15);

    /* Texto */
    --text-primary:   #F5F0EA;
    --text-secondary: #B3A89C;
    --text-muted:     #857A6F;

    /* Acentos de familias olfativas */
    --note-citrus:   #F5D547;
    --note-floral:   #E86A9B;
    --note-woody:    #8B6F47;
    --note-oriental: #C9704D;
    --note-fresh:    #6BBFA8;

    --radius: 16px;
    --font-display: 'Fraunces', Georgia, serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    font-family: var(--font-ui);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Grano sutil sobre todo el fondo — SVG de ruido inline, muy tenue */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }

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

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

:focus-visible {
    outline: 2px solid var(--amber-core);
    outline-offset: 2px;
    border-radius: 4px;
}

/* -- NAV -- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(10, 8, 6, 0.7);
    border-bottom: 1px solid transparent;
    transition: padding 0.3s var(--ease-out-expo), background 0.3s, border-color 0.3s;
}

nav.nav--condensed {
    padding: 0.6rem 2rem;
    background: rgba(10, 8, 6, 0.92);
    border-bottom-color: var(--border-subtle);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    text-decoration: none;
}

.logo img { width: 28px; height: 28px; border-radius: 8px; display: block; }
.logo-word span { color: var(--amber-core); }

.nav-links { display: flex; gap: 1.5rem; align-items: center; list-style: none; }

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

.lang-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 32px;
}
.lang-toggle:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* -- HERO -- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8rem 1.5rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(255, 149, 0, 0.10) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: var(--amber-soft);
    border: 1px solid rgba(255, 149, 0, 0.25);
    border-radius: 100px;
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
    color: var(--amber-core);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.12;
    margin-bottom: 1.1rem;
    max-width: 720px;
}

.hero h1 em { font-style: italic; color: var(--amber-core); }

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.app-store-badge, .perfumeria-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, var(--amber-core), var(--amber-deep));
    color: #1a1006;
    padding: 0.85rem 1.8rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
    min-height: 44px;
}
.app-store-badge:hover, .perfumeria-btn:hover { transform: scale(1.03); opacity: 0.92; }
.app-store-badge svg { width: 22px; height: 22px; }

/* App Store official badge image — sin modificar proporciones ni colores,
   solo se controla la altura de render (regla de Apple: no recolorear). */
.appstore-badge-img { height: 48px; width: auto; transition: transform 0.2s, opacity 0.2s; }
.appstore-badge-img:hover { transform: scale(1.03); opacity: 0.92; }
.appstore-badge-img--lg { height: 58px; }
/* El <img> del badge es display:block (regla global de arriba). Dentro de un
   <a> inline eso rompe el text-align:center del padre (el img deja de ser
   una caja inline y el <a> ya no tiene ancho propio que centrar). Forzamos
   el <a> a inline-block para que vuelva a comportarse como una caja
   centrable normal. */
.hero > a, .final-cta > a {
    display: inline-block;
    position: relative;
    animation: badgeBreathe 2.6s ease-in-out infinite;
}

/* Anillo luminoso que TRAZA el mismo contorno redondeado del badge (no un
   halo difuso de fondo) y se expande hacia fuera en cada pulso, igual que
   .surprise-ring pero con border-radius:inherit en vez de 50% — sigue la
   silueta real del badge, blanco, sin tocar el asset oficial de Apple. */
.hero > a::before, .final-cta > a::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 8px 1px rgba(255, 255, 255, 0.55);
    opacity: 0;
    pointer-events: none;
    animation: badgeRing 2.6s ease-in-out infinite;
}
.hero > a { border-radius: 11px; }
.final-cta > a { border-radius: 13px; }

/* Mismo periodo (2.6s) y mismo pico a mitad de ciclo (50%) en las dos
   animaciones — el botón "respira" (badgeBreathe) exactamente cuando el
   anillo de luz se hace más visible (badgeRing), en vez de ir cada uno
   a su ritmo. */
@keyframes badgeBreathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}
@keyframes badgeRing {
    0%, 100% { transform: scale(0.97); opacity: 0; }
    50%      { transform: scale(1.1);  opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) {
    .hero > a, .final-cta > a { animation: none; }
    .hero > a::before, .final-cta > a::before { animation: none; opacity: 0; }
}

/* -- FAN CAROUSEL -- */
.fan-wrap {
    width: 100%;
    max-width: 1000px;
    margin-top: 3rem;
}

.fan {
    position: relative;
    height: 480px;
    perspective: 1600px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
    cursor: grab;
    outline: none;
}
.fan:active { cursor: grabbing; }

.fan-card {
    position: absolute;
    width: 210px;
    height: 454px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    transition: transform 0.6s var(--ease-bounce), opacity 0.5s ease, filter 0.5s ease;
    background: var(--bg-elevated);
}

.fan-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.fan-card[data-offset="0"]   { transform: translate3d(0, 0, 0)        rotateY(0deg)   scale(1);    opacity: 1;    filter: blur(0); z-index: 5; }
.fan-card[data-offset="-1"]  { transform: translate3d(-150px, 0, -80px)  rotateY(7deg)   scale(0.90); opacity: 0.75; filter: blur(1px); z-index: 4; }
.fan-card[data-offset="1"]   { transform: translate3d(150px, 0, -80px)   rotateY(-7deg)  scale(0.90); opacity: 0.75; filter: blur(1px); z-index: 4; }
.fan-card[data-offset="-2"]  { transform: translate3d(-280px, 0, -180px) rotateY(14deg)  scale(0.82); opacity: 0.45; filter: blur(3px); z-index: 3; }
.fan-card[data-offset="2"]   { transform: translate3d(280px, 0, -180px)  rotateY(-14deg) scale(0.82); opacity: 0.45; filter: blur(3px); z-index: 3; }
.fan-card[data-offset="hidden"] { transform: translate3d(0, 0, -260px) scale(0.7); opacity: 0; pointer-events: none; z-index: 1; }

.fan-card:not([data-offset="0"]) { cursor: pointer; }

.fan-caption {
    text-align: center;
    margin-top: 1.75rem;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-primary);
    min-height: 1.6em;
}

.fan-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.fan-dots button {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--border-subtle);
    cursor: pointer;
    padding: 0;
    min-width: 8px; min-height: 8px;
}
.fan-dots button[aria-current="true"] { background: var(--amber-core); width: 22px; border-radius: 4px; transition: width 0.3s var(--ease-out-expo); }

/* Overlay de escaneo — solo visible sobre la tarjeta central cuando category=escanea.
   Coordenadas medidas con una rejilla de referencia sobre escanea.jpg a 2x
   (830x1800px), leyendo el borde real de la PANTALLA del iPhone que sujeta
   la mano (dentro del marco/bisel negro, de borde a borde del display) —
   no el recuadro pequeño de detección de la UI: top 20%, bottom 58%,
   left 30%, right 73.5% de la tarjeta completa. inset:0 para que estos
   porcentajes sean relativos al 100% de la tarjeta. */
.scan-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.fan-card[data-offset="0"][data-category="escanea"] .scan-overlay { opacity: 1; }

.scan-corner {
    position: absolute;
    width: 20px; height: 20px;
    border: 2.5px solid var(--amber-bright);
    filter: drop-shadow(0 0 4px rgba(255, 179, 71, 0.6));
    animation: scanPulse 3s ease-in-out infinite;
}
.scan-corner.tl { top: 20%; left: 30%;   border-right: none; border-bottom: none; border-top-left-radius: 6px; }
.scan-corner.tr { top: 20%; right: 26.5%; border-left: none;  border-bottom: none; border-top-right-radius: 6px; animation-delay: .1s; }
.scan-corner.bl { bottom: 42%; left: 30%;   border-right: none; border-top: none; border-bottom-left-radius: 6px; animation-delay: .2s; }
.scan-corner.br { bottom: 42%; right: 26.5%; border-left: none;  border-top: none; border-bottom-right-radius: 6px; animation-delay: .3s; }

@keyframes scanPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.scan-beam {
    position: absolute;
    left: 30%; right: 26.5%;
    top: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--amber-bright), transparent);
    box-shadow: 0 0 10px 2px rgba(255, 179, 71, 0.7);
    animation: scanSweep 2.4s ease-in-out infinite;
}
@keyframes scanSweep {
    0%   { top: 20%; opacity: 0; }
    10%  { opacity: 1; }
    50%  { top: 58%; }
    90%  { opacity: 1; }
    100% { top: 20%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .scan-corner, .scan-beam { animation: none; opacity: 0.8; }
    .fan-card { transition: opacity 0.3s ease; }
}

/* -- CÓMO FUNCIONA -- */
.how {
    padding: 7rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.how-step {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 3rem 0;
    opacity: 0.3;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.how-step.in-view { opacity: 1; transform: translateY(0); }

.how-step-number {
    font-family: var(--font-display);
    font-size: clamp(6rem, 12vw, 10rem);
    font-weight: 600;
    color: var(--amber-core);
    opacity: 0.08;
    line-height: 1;
    grid-row: 1 / 3;
}

.how-step-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.how-step h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; margin-bottom: 0.5rem; }
.how-step p { color: var(--text-secondary); font-size: 1.02rem; max-width: 460px; }

@media (prefers-reduced-motion: reduce) {
    .how-step { opacity: 1; transform: none; transition: none; }
}

/* -- CATÁLOGO -- */
.catalog {
    padding: 7rem 1.5rem;
    text-align: center;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.catalog-count {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.catalog-count-suffix { color: var(--amber-core); }
.catalog-label { color: var(--text-secondary); font-size: 1.1rem; margin-top: 0.5rem; }

.notes-field {
    position: relative;
    min-height: 420px; /* fallback antes de que main.js calcule la altura exacta */
    margin-top: 3rem;
    cursor: default;
}
/* Capa exterior: posición base + parallax (JS, transform por puntero/dedo).
   Capa interior .notes-field-drift: deriva browniana (CSS puro). Van en
   elementos distintos para que ambos transforms compongan sin pisarse. */
.notes-field-item {
    position: absolute;
    width: 88px; height: 88px;
    will-change: transform;
    transition: transform 0.15s ease-out;
}
.notes-field-drift {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 18px;
    animation: noteDrift var(--drift-dur, 16s) ease-in-out infinite;
    animation-delay: var(--drift-delay, 0s);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.notes-field-item img { width: 100%; height: 100%; object-fit: contain; }
.notes-field-item:hover .notes-field-drift,
.notes-field-item:focus-visible .notes-field-drift {
    background: var(--amber-soft);
    border-color: var(--amber-core);
    transform: scale(1.12);
}
.notes-field-item .note-name {
    position: absolute;
    bottom: -1.7rem; left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.notes-field-item:hover .note-name, .notes-field-item:focus-visible .note-name { opacity: 1; }

@keyframes noteDrift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(var(--drift-x, 10px), var(--drift-y, -10px)); }
}
@media (prefers-reduced-motion: reduce) {
    .notes-field-drift { animation: none; }
    .notes-field-item { transition: none; }
}
@media (max-width: 640px) {
    .notes-field { min-height: 300px; }
    .notes-field-item { width: 64px; height: 64px; }
}

/* -- POLAROID -- */
.profile-cta {
    padding: 7rem 1.5rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.polaroid {
    width: 280px;
    margin: 0 auto 2rem;
    background: #FAF7F2;
    background-image: radial-gradient(circle at 30% 20%, rgba(0,0,0,0.03), transparent 60%);
    padding: 14px 14px 60px;
    border-radius: 3px;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.4),
        0 24px 48px rgba(0,0,0,0.3);
    transform: rotate(-3deg);
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
    position: relative;
    cursor: default;
}
.polaroid:hover, .polaroid:focus-within {
    transform: rotate(0deg) translateY(-12px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4), 0 40px 70px rgba(0,0,0,0.4);
}

.polaroid-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(145deg, #2a2420, #1a1512);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.polaroid-photo img { width: 100%; height: 100%; object-fit: cover; }

.polaroid-photo .reveal {
    position: absolute; inset: 0;
    background: linear-gradient(160deg, var(--amber-deep), var(--bg-elevated));
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--text-primary);
    font-size: 0.8rem;
    clip-path: circle(0% at 50% 50%);
    transition: clip-path 0.5s var(--ease-out-expo);
}
.polaroid:hover .reveal, .polaroid:focus-within .reveal { clip-path: circle(75% at 50% 50%); }
.polaroid-photo .reveal strong { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.3rem; }

.polaroid-caption {
    position: absolute;
    bottom: 14px; left: 0; right: 0;
    text-align: center;
    font-family: 'Permanent Marker', cursive;
    font-size: 1.15rem;
    color: #2B3A4A;
    transform: rotate(1deg);
}

.profile-cta p { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 1.5rem; }

/* -- PIÑATA -- */
.surprise {
    padding: 7rem 1.5rem;
    text-align: center;
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    overflow: visible;
}

.surprise-label { color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.05rem; }

.surprise-btn-wrap { position: relative; display: inline-block; }

.surprise-ring {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1.5px solid var(--amber-core);
    opacity: 0;
    animation: surpriseRing 4s ease-out infinite;
    pointer-events: none;
}
@keyframes surpriseRing {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.5); opacity: 0; }
}

.surprise-btn {
    width: 88px; height: 88px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--amber-core), var(--amber-deep));
    box-shadow: 0 12px 32px -8px rgba(255, 149, 0, 0.5);
    cursor: pointer;
    font-size: 2rem;
    animation: surpriseBreathe 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}
@keyframes surpriseBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}
.surprise-btn:active { transform: scale(0.88); }

.surprise-hint {
    margin-top: 1.25rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.1rem;
}

.confetti-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 200;
}
.confetti-note {
    position: absolute;
    top: 0; left: 0;
    width: 64px; height: 64px;
    margin: -32px 0 0 -32px;
    will-change: transform;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
}
.confetti-note img { width: 100%; height: 100%; object-fit: contain; }

.confetti-label {
    position: absolute;
    background: rgba(20, 17, 16, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 6px;
}

.surprise-btn.is-launching { transform: scale(1.12); }

.surprise-result {
    margin-top: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 1.75rem;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
    pointer-events: none;
}
.surprise-result.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.surprise-result-eyebrow { font-size: 0.8rem; color: var(--amber-core); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.surprise-result h4 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 0.15rem; }
.surprise-result .brand { color: var(--text-secondary); margin-bottom: 0.9rem; font-size: 0.95rem; }
.surprise-result .notes-row { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.surprise-result .notes-row span {
    font-size: 0.78rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    color: var(--text-secondary);
}

@media (prefers-reduced-motion: reduce) {
    .surprise-btn, .surprise-ring { animation: none; }
    .confetti-note { transition: opacity 0.4s ease; }
}

/* -- CTA FINAL -- */
.final-cta {
    padding: 7rem 1.5rem 5rem;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.final-cta h2 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; font-weight: 600; }
.final-cta p { color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.05rem; }

/* -- SECTION LABEL / TITLE (reutilizados en how/catalog/perfumeria) -- */
.section-label {
    font-size: 0.85rem;
    color: var(--amber-core);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

/* -- PERFUMERIA CTA -- */
.perfumeria-cta { padding: 6rem 1.5rem; max-width: 700px; margin: 0 auto; text-align: center; }
.perfumeria-cta .section-title { max-width: none; }
.perfumeria-cta p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; margin-bottom: 2rem; }

/* -- FOOTER -- */
footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-subtle);
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.footer-content { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem; }

.footer-brand { font-size: 1.2rem; font-weight: 700; }
.footer-brand-name { display: flex; align-items: center; gap: 0.5rem; }
.footer-brand-name img { width: 22px; height: 22px; border-radius: 6px; display: block; }
.footer-brand-word { font-family: var(--font-display); }
.footer-brand-word span { color: var(--amber-core); }
.footer-brand p { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.3rem; }

.footer-links { display: flex; gap: 2rem; list-style: none; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-primary); }

.footer-email {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}
.footer-email a { color: var(--text-secondary); text-decoration: none; }
.footer-email a:hover { text-decoration: underline; }

.footer-copy {
    width: 100%;
    text-align: center;
    padding-top: 2rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* -- LEGAL PAGES (sin cambios de comportamiento, solo tokens nuevos) -- */
.legal { display: none; padding: 8rem 2rem 4rem; max-width: 750px; margin: 0 auto; position: relative; z-index: 2; }
.legal.active { display: block; }
.legal h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 600; margin-bottom: 0.5rem; }
.legal .last-updated { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.2rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.75rem; }
.legal h3 { font-size: 1rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.legal p, .legal li { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.8; margin-bottom: 1rem; }
.legal ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.9rem; }
.legal table th, .legal table td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.legal table th { color: var(--text-primary); font-weight: 600; }
.legal a { color: var(--amber-core); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--amber-core); text-decoration: none; font-size: 0.9rem; margin-bottom: 2rem; }
.back-link:hover { text-decoration: underline; }
.legal-content { display: none; }
.legal-content.active { display: block; }

/* -- RESPONSIVE -- */
@media (max-width: 1024px) {
    .fan-card { width: 190px; height: 410px; }
    .fan-card[data-offset="-2"] { transform: translate3d(-230px, 0, -150px) rotateY(14deg) scale(0.82); opacity: 0.45; }
    .fan-card[data-offset="2"]  { transform: translate3d(230px, 0, -150px)  rotateY(-14deg) scale(0.82); opacity: 0.45; }
    .fan-card[data-offset="-1"] { transform: translate3d(-125px, 0, -70px) rotateY(7deg) scale(0.9); }
    .fan-card[data-offset="1"]  { transform: translate3d(125px, 0, -70px)  rotateY(-7deg) scale(0.9); }
}

@media (max-width: 640px) {
    nav { padding: 1rem; }
    .nav-links { gap: 1rem; }
    .nav-links a { font-size: 0.8rem; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer-links { flex-direction: column; gap: 1rem; align-items: center; }

    /* .fan tiene que ser al menos tan alta como .fan-card (476px) + margen —
       si es más baja, la tarjeta se centra verticalmente DENTRO de .fan y se
       sale por arriba/abajo, comiéndose el espacio del botón de encima. */
    .fan { height: 540px; }
    .fan-card { width: 220px; height: 476px; }
    .fan-card[data-offset="-2"], .fan-card[data-offset="2"] { opacity: 0; pointer-events: none; }
    .fan-card[data-offset="-1"] { transform: translate3d(-40px, 0, -60px) rotateY(10deg) scale(0.82); opacity: 0.5; }
    .fan-card[data-offset="1"]  { transform: translate3d(40px, 0, -60px)  rotateY(-10deg) scale(0.82); opacity: 0.5; }

    .how-step { grid-template-columns: 1fr; gap: 0.5rem; }
    .how-step-number { grid-row: auto; font-size: 4.5rem; }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .fan-card[data-offset="-2"], .fan-card[data-offset="2"] { opacity: 0.35; }
}
