/* ═══════════════════════════════════════════════════════════════
   NAPOLETA SOCIAL — Estilos principales
   Paleta: crema, blanco, dorado suave sobre negro
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

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

:root {
    --crema:        #f5f0e8;
    --crema-soft:   #ede8df;
    --gold:         rgba(195, 155, 70, 0.85);
    --gold-bright:  rgba(195, 155, 70, 1);
    --white:        #ffffff;
    --dark:         #0d0b09;
    --dark-card:    rgba(22, 18, 14, 0.90);
    --dark-card2:   rgba(30, 25, 18, 0.95);
    --border:       rgba(195, 155, 70, 0.20);
    --border-hover: rgba(195, 155, 70, 0.45);
    --text-muted:   rgba(245, 240, 232, 0.55);
}

/* ── BASE APP-LIKE ── */
html {
    height: 100%;
    /* Evita que el teclado móvil haga zoom o mueva el viewport */
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    min-height: 100%;
    background: var(--dark);
    font-family: 'Montserrat', sans-serif;
    color: var(--crema);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Scroll suave nativo como app */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: none;
}

/* ── PÁGINA ── */
.ns-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* padding-bottom grande para que el teclado no tape el botón */
    padding: 3rem 1.25rem 5rem;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(195,155,70,0.07) 0%, transparent 60%),
        var(--dark);
}

/* ── HEADER ── */
.ns-header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) both;
}

.ns-logo-label {
    display: inline-block;
    font-size: 0.60rem;
    letter-spacing: 0.30em;
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 0.6rem;
}

.ns-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 300;
    color: var(--crema);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.ns-title em {
    font-style: italic;
    color: var(--gold-bright);
}

.ns-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-top: 0.75rem;
    letter-spacing: 0.04em;
    line-height: 1.6;
}

.ns-divider {
    display: block;
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0.9rem auto 0;
    border: none;
}

/* ── CONTENEDOR PRINCIPAL ── */
.ns-container {
    width: 100%;
    max-width: 560px;
}

/* ── SECCIÓN ── */
.ns-section {
    animation: fadeUp 0.9s 0.1s cubic-bezier(0.22,1,0.36,1) both;
}

.ns-section-label {
    font-size: 0.58rem;
    letter-spacing: 0.24em;
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0.80;
}

/* ── TARJETAS DE EVENTO ── */
.ns-events {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.ns-event {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    /* Sin transform en móvil para evitar saltos al abrir teclado */
    transition:
        border-color   0.32s ease,
        background     0.32s ease,
        box-shadow     0.32s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.ns-event::before {
    content: '';
    position: absolute;
    left: 0; top: 15%; bottom: 15%;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: var(--gold);
    opacity: 0;
    transition: opacity 0.32s ease, top 0.32s ease, bottom 0.32s ease;
}

.ns-event:hover,
.ns-event.active {
    border-color: var(--border-hover);
    background: var(--dark-card2);
    box-shadow: 0 8px 28px rgba(0,0,0,0.45);
}

/* Solo en desktop el translateX */
@media (hover: hover) {
    .ns-event {
        transition:
            transform      0.32s cubic-bezier(0.22,1,0.36,1),
            border-color   0.32s ease,
            background     0.32s ease,
            box-shadow     0.32s ease;
    }
    .ns-event:hover,
    .ns-event.active {
        transform: translateX(5px);
    }
}

.ns-event:hover::before,
.ns-event.active::before {
    opacity: 1;
    top: 0;
    bottom: 0;
}

.ns-event.active {
    box-shadow: 0 0 0 1px rgba(195,155,70,0.30), 0 8px 28px rgba(0,0,0,0.45);
}

.ns-event__emoji {
    font-size: 1.75rem;
    flex: 0 0 auto;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.ns-event__body {
    flex: 1;
    min-width: 0;
}

.ns-event__name {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--crema);
    margin-bottom: 0.2rem;
    letter-spacing: 0.01em;
}

.ns-event__desc {
    display: block;
    font-size: 0.70rem;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.5;
}

.ns-event__check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s, background 0.3s;
}

.ns-event__check svg {
    width: 12px;
    height: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    stroke: var(--gold-bright);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ns-event.active .ns-event__check {
    border-color: var(--gold-bright);
    background: rgba(195,155,70,0.12);
}

.ns-event.active .ns-event__check svg {
    opacity: 1;
}

/* ── FORMULARIO ── */
.ns-form-wrap {
    margin-top: 1.5rem;
    animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both;
    display: none;
}

.ns-form-wrap.visible {
    display: block;
}

.ns-form-header {
    margin-bottom: 1.1rem;
}

.ns-form-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--crema);
    margin-bottom: 0.25rem;
}

.ns-form-title span {
    color: var(--gold-bright);
    font-style: italic;
}

.ns-form-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 300;
}

.ns-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ns-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ns-field label {
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    opacity: 0.85;
}

.ns-field input {
    background: rgba(245,240,232,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 1rem; /* mínimo 16px para evitar zoom en iOS */
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: var(--crema);
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    /* Evitar zoom al hacer focus en iOS */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 8px;
    /* No mover el viewport al hacer focus */
    touch-action: manipulation;
}

.ns-field input::placeholder {
    color: rgba(245,240,232,0.28);
    font-weight: 300;
}

.ns-field input:focus {
    border-color: var(--border-hover);
    background: rgba(245,240,232,0.08);
    box-shadow: 0 0 0 3px rgba(195,155,70,0.10);
}

.ns-field input.filled {
    border-color: rgba(195,155,70,0.35);
}

/* ── BOTÓN WHATSAPP CON PULSO ── */
.ns-btn-wrap {
    margin-top: 0.5rem;
    position: relative;
    display: flex;
    justify-content: center;
}

.ns-btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    background: rgba(37,211,102,0.08);
    border: 1px solid rgba(37,211,102,0.20);
    color: rgba(245,240,232,0.35);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: not-allowed;
    pointer-events: none;
    transition:
        background    0.4s ease,
        border-color  0.4s ease,
        color         0.4s ease,
        box-shadow    0.4s ease;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.ns-btn-wa.active {
    background: rgba(37,211,102,0.15);
    border-color: rgba(37,211,102,0.55);
    color: #fff;
    cursor: pointer;
    pointer-events: all;
}

.ns-btn-wa.active:active {
    transform: scale(0.97);
}

/* Anillo de pulso — solo cuando activo */
.ns-btn-wa.active::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 999px;
    border: 1px solid rgba(37,211,102,0.40);
    animation: pulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%   { transform: scale(1);    opacity: 0.8; }
    70%  { transform: scale(1.08); opacity: 0; }
    100% { transform: scale(1.08); opacity: 0; }
}

.ns-btn-wa__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(37,211,102,0.12);
    border: 1px solid rgba(37,211,102,0.25);
    flex: 0 0 auto;
    transition: background 0.3s;
}

.ns-btn-wa.active .ns-btn-wa__icon {
    background: rgba(37,211,102,0.22);
}

.ns-btn-wa__icon svg {
    width: 14px;
    height: 14px;
    fill: rgba(37,211,102,0.50);
    transition: fill 0.3s;
}

.ns-btn-wa.active .ns-btn-wa__icon svg {
    fill: rgba(37,211,102,0.95);
}

.ns-btn-hint {
    font-size: 0.58rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ns-btn-hint.visible {
    opacity: 1;
}

/* ── FOOTER ── */
.ns-footer {
    margin-top: 3rem;
    text-align: center;
    font-size: 0.58rem;
    color: rgba(245,240,232,0.22);
    letter-spacing: 0.08em;
    animation: fadeUp 1s 0.3s cubic-bezier(0.22,1,0.36,1) both;
}

/* ── ANIMACIÓN ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE MÓVIL ── */
@media (max-width: 480px) {
    .ns-page         { padding: 2.25rem 1rem 6rem; }
    .ns-title        { font-size: 2rem; }
    .ns-event__emoji { font-size: 1.5rem; }
    .ns-event__name  { font-size: 0.88rem; }
    .ns-event        { padding: 0.85rem 0.9rem; }
    /* Input font 16px mínimo para no hacer zoom en iOS */
    .ns-field input  { font-size: 1rem; padding: 0.9rem 0.9rem; }
    .ns-btn-wa       { font-size: 0.65rem; padding: 0.85rem 1.3rem; }
}
