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

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

:root {
    --gold: #C9A96E;
    --gold-light: #E2CFA0;
    --gold-shine: #F0D060;
    --bg: #060606;
    --text: #E8E8E8;
    --text-dim: #8A8A8A;
    --font-body: 'Montserrat', sans-serif;
    --font-display: 'Bebas Neue', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== PARTICLES ===== */
#particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ===== CURSOR STARS ===== */
.cursor-star {
    position: absolute; pointer-events: none; font-size: 12px; z-index: 9999;
    animation: cursor-float 1s linear forwards;
}
@keyframes cursor-float {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-30px) scale(0.3); }
}

/* ===== PHASES ===== */
.phase {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 10; opacity: 0; pointer-events: none;
    transition: opacity 0.8s ease;
    padding-top: 80px;
}
.phase.active { opacity: 1; pointer-events: auto; }

/* Smoke bottom */
.phase-envelope::before, .phase-reveal::before {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 35%;
    background: linear-gradient(to top, rgba(6,6,6,0.95), transparent);
    pointer-events: none; z-index: -1;
}

/* ========================================
   PHASE 1 — ENVELOPE
   ======================================== */
.envelope-scene {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 16px;
}

.env-title {
    font-family: var(--font-display); font-size: clamp(2.8rem, 4vw, 5rem);
    letter-spacing: 3px; line-height: 1; text-transform: uppercase;
}
.env-title em {
    font-family: var(--font-serif); font-style: italic;
    font-weight: 400; color: var(--gold); font-size: 0.85em; text-transform: none;
}
.env-sub {
    font-size: clamp(0.75rem, 1vw, 1rem); color: var(--text-dim); letter-spacing: 1px;
}

/* Sobre + Maquina area */
.sobre-area {
    position: relative; cursor: pointer;
    display: inline-block;
}
.sobre-area:hover .sobre-img {
    filter: drop-shadow(0 20px 60px rgba(201,169,110,0.5));
}

.sobre-img {
    width: clamp(300px, 32vw, 560px); height: auto;
    filter: drop-shadow(0 15px 40px rgba(201,169,110,0.3));
    transition: filter 0.4s;
    display: block;
}

/* Maquina decorativa — abajo-izquierda del sobre */
.maquina-deco {
    position: absolute; bottom: -8%; left: -12%;
    width: clamp(100px, 11vw, 200px); height: auto;
    transform: rotate(-10deg);
    filter: drop-shadow(0 10px 30px rgba(201,169,110,0.3));
    z-index: 2;
    transition: opacity 0.3s;
}

/* Maquina de corte — centrada, oculta inicialmente */
.maquina-cutter {
    position: absolute;
    left: 50%; bottom: -50%;
    width: clamp(90px, 10vw, 170px); height: auto;
    transform: translateX(-50%) rotate(90deg);
    filter: drop-shadow(0 0 30px rgba(201,169,110,0.5));
    z-index: 3;
    opacity: 0;
    transition: bottom 0.8s ease, opacity 0.3s;
}
.maquina-cutter.visible { opacity: 1; }
.maquina-cutter.slide-up { bottom: 110%; }

/* Sobre halves for cut */
.sobre-half {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    transition: all 0.7s ease;
}
.sobre-half img { width: 100%; height: auto; display: block; }
.sobre-half-left { clip-path: inset(0 50% 0 0); }
.sobre-half-right { clip-path: inset(0 0 0 50%); }

.sobre-area.cut .sobre-half-left { transform: translateX(-30px) rotate(-3deg); opacity: 0; }
.sobre-area.cut .sobre-half-right { transform: translateX(30px) rotate(3deg); opacity: 0; }

.env-cta {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-serif); font-style: italic;
    font-size: 0.85rem; color: var(--gold-light); letter-spacing: 1px;
    animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ========================================
   PHASE 2 — REVEAL (card + form)
   ======================================== */
.phase-reveal {
    overflow-y: auto;
    align-items: flex-start;
    padding-top: 80px; padding-bottom: 30px;
}

.reveal-scene {
    display: flex; align-items: flex-start; justify-content: center;
    gap: clamp(30px, 4vw, 80px);
    width: 100%; max-width: 1200px;
    padding: 20px 40px;
    margin: 0 auto;
}

/* Left: card */
.reveal-card-col {
    display: flex; flex-direction: column; align-items: center;
    gap: 14px; flex-shrink: 0;
}

.congrats-title {
    font-family: var(--font-display); font-size: clamp(2.2rem, 3.5vw, 4rem);
    letter-spacing: 4px; color: var(--gold);
    text-shadow: 0 0 40px rgba(201,169,110,0.3);
    text-align: center;
    opacity: 0; animation: fade-in-down 0.6s ease forwards 0.2s;
}
.congrats-sub {
    font-size: 0.8rem; color: var(--text-dim); letter-spacing: 1px; text-align: center;
    opacity: 0; animation: fade-in-down 0.6s ease forwards 0.4s;
}

.card-frame {
    position: relative;
    opacity: 0; transform: scale(0.5);
    animation: card-pop 0.8s ease forwards 0.5s;
}
@keyframes card-pop {
    0% { opacity: 0; transform: scale(0.5); }
    70% { opacity: 1; transform: scale(1.04); }
    100% { opacity: 1; transform: scale(1); }
}

.card-frame::before {
    content: ''; position: absolute; inset: -30px; z-index: -1;
    background: radial-gradient(ellipse, rgba(201,169,110,0.2), transparent 70%);
    animation: glow-pulse 3s ease-in-out infinite;
}
@keyframes glow-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 0.8; } }

.card-inner {
    width: clamp(220px, 20vw, 320px);
    border-radius: 12px; overflow: hidden;
    border: 3px solid rgba(201,169,110,0.4);
    box-shadow: 0 0 40px rgba(201,169,110,0.25), 0 20px 50px rgba(0,0,0,0.6);
}
.card-inner img { width: 100%; height: auto; display: block; }
.card-glare {
    position: absolute; inset: 0; border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1), transparent 60%);
    pointer-events: none;
}

/* ===== WIZARD ===== */
.wizard-col {
    flex: 1; max-width: 500px; min-width: 300px;
    padding-top: 30px;
    opacity: 0; animation: slide-up 0.5s ease forwards 0.9s;
}

.wizard-box {
    background: rgba(13,13,18,0.95);
    border: 1px solid rgba(201,169,110,0.1);
    border-radius: 16px; padding: 28px 30px;
}
.wizard-title {
    font-family: var(--font-display); font-size: 1.4rem;
    letter-spacing: 2px; text-align: center; margin-bottom: 18px;
    text-transform: uppercase;
}
.wizard-title strong { color: var(--gold); }

/* Progress dots */
.wizard-progress {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 22px;
}
.step-dot {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0;
    background: rgba(255,255,255,0.05); color: var(--text-dim);
    border: 2px solid rgba(255,255,255,0.08);
    transition: all 0.3s;
}
.step-dot.active { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.step-dot.done { background: rgba(201,169,110,0.2); color: var(--gold); border-color: var(--gold); }
.step-line { width: 30px; height: 2px; background: rgba(255,255,255,0.08); }

/* Steps */
.wizard-step { display: none; min-height: 160px; }
.wizard-step.active { display: block; animation: fade-in-down 0.3s ease; }

.step-label {
    font-family: var(--font-serif); font-style: italic;
    font-size: 0.95rem; color: var(--gold-light); margin-bottom: 14px;
    text-align: center;
}

/* Option cards (barbers & services) */
.barber-options, .service-options {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.option-card {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 20px; min-width: 120px;
    background: rgba(255,255,255,0.03);
    border: 1.5px solid rgba(255,255,255,0.06);
    border-radius: 10px; cursor: pointer;
    transition: all 0.3s;
}
.option-card:hover { border-color: rgba(201,169,110,0.3); background: rgba(201,169,110,0.05); }
.option-card.selected {
    border-color: var(--gold); background: rgba(201,169,110,0.1);
    box-shadow: 0 0 20px rgba(201,169,110,0.15);
}
.option-icon { font-size: 1.4rem; }
.option-name { font-size: 0.8rem; font-weight: 500; color: var(--text); text-align: center; }
.option-subtitle { font-size: 0.65rem; color: var(--text-dim); text-align: center; }
.option-price { font-size: 0.75rem; color: var(--gold); font-weight: 600; }

/* Date & time */
.datetime-grid { display: flex; flex-direction: column; gap: 14px; }

/* ===== MINI CALENDAR ===== */
.mini-calendar {
    background: rgba(6,6,6,0.8);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px; padding: 14px;
}
.cal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.cal-month {
    font-family: var(--font-display); font-size: 0.95rem;
    letter-spacing: 2px; text-transform: uppercase; color: var(--gold);
}
.cal-nav {
    background: none; border: 1px solid rgba(255,255,255,0.08);
    color: var(--text); width: 28px; height: 28px; border-radius: 6px;
    font-size: 1.1rem; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.cal-nav:hover { border-color: var(--gold); color: var(--gold); }

.cal-weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr);
    text-align: center; margin-bottom: 6px;
}
.cal-weekdays span {
    font-size: 0.6rem; color: var(--text-dim); font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; padding: 4px 0;
}

.cal-days {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.cal-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; border-radius: 6px; cursor: pointer;
    transition: all 0.2s; border: 1.5px solid transparent;
    font-weight: 500; color: var(--text);
}
.cal-day.empty { pointer-events: none; }
.cal-day.past {
    color: rgba(255,255,255,0.15); pointer-events: none;
}
.cal-day.available {
    background: rgba(76,175,80,0.12); border-color: rgba(76,175,80,0.3);
    color: #81C784;
}
.cal-day.available:hover {
    background: rgba(76,175,80,0.25); border-color: rgba(76,175,80,0.6);
    box-shadow: 0 0 10px rgba(76,175,80,0.2);
}
.cal-day.full {
    background: rgba(244,67,54,0.1); border-color: rgba(244,67,54,0.25);
    color: #E57373; pointer-events: none;
}
.cal-day.closed {
    color: rgba(255,255,255,0.12); pointer-events: none;
}
.cal-day.selected {
    background: var(--gold) !important; color: var(--bg) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 0 15px rgba(201,169,110,0.4);
    font-weight: 700;
}
.cal-day.today {
    border-color: var(--gold); color: var(--gold);
}

.form-field {
    display: flex; align-items: center; gap: 10px;
    background: rgba(6,6,6,0.8); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; padding: 0 14px; transition: border-color 0.3s;
}
.form-field:focus-within { border-color: var(--gold); }
.form-field svg { flex-shrink: 0; color: var(--text-dim); }
.form-field input, .form-field select {
    flex: 1; background: none; border: none; color: var(--text);
    font-family: var(--font-body); font-size: 0.8rem;
    padding: 13px 0; outline: none; width: 100%;
}
.form-field input::placeholder { color: var(--text-dim); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.7); }

/* Time slots grid */
.time-slots {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.time-hint { font-size: 0.75rem; color: var(--text-dim); text-align: center; width: 100%; }
.time-btn {
    padding: 8px 14px; background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.08); border-radius: 8px;
    color: var(--text); font-family: var(--font-body); font-size: 0.78rem;
    cursor: pointer; transition: all 0.2s;
}
.time-btn:hover { border-color: rgba(201,169,110,0.3); }
.time-btn.selected { border-color: var(--gold); background: rgba(201,169,110,0.12); color: var(--gold); }

/* Summary */
.booking-summary {
    margin-top: 16px; padding: 14px;
    background: rgba(201,169,110,0.05); border-radius: 10px;
    border: 1px solid rgba(201,169,110,0.1);
}
.summary-row {
    display: flex; justify-content: space-between; padding: 4px 0;
    font-size: 0.78rem; color: var(--text-dim);
}
.summary-row strong { color: var(--text); }
.summary-total { border-top: 1px solid rgba(201,169,110,0.15); margin-top: 6px; padding-top: 8px; }
.summary-total strong { color: var(--gold); font-size: 1rem; }

/* Wizard nav buttons */
.wizard-nav {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 20px; gap: 10px;
}
.wiz-btn {
    padding: 12px 24px; border: none; border-radius: 8px;
    font-family: var(--font-display); font-size: 0.85rem;
    letter-spacing: 2px; cursor: pointer; transition: all 0.3s;
    text-transform: uppercase;
}
.wiz-back {
    background: transparent; color: var(--text-dim); border: 1px solid rgba(255,255,255,0.08);
}
.wiz-back:hover { border-color: var(--gold); color: var(--gold); }
.wiz-next {
    background: var(--gold); color: var(--bg); margin-left: auto;
}
.wiz-next:hover { background: var(--gold-light); }
.wiz-confirm {
    background: var(--gold); color: var(--bg); margin-left: auto; flex: 1;
    font-size: 0.95rem; padding: 14px;
}
.wiz-confirm:hover { background: var(--gold-light); }

/* ========================================
   PHASE 3 — CONFIRMATION
   ======================================== */
.confirm-scene { text-align: center; padding: 20px; }
.confirm-check { margin-bottom: 24px; animation: check-pop 0.5s ease; }
@keyframes check-pop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.confirm-title { font-family: var(--font-display); font-size: 2.5rem; letter-spacing: 3px; margin-bottom: 16px; }
.confirm-details { font-size: 0.9rem; color: var(--text-dim); line-height: 1.8; margin-bottom: 30px; }
.back-btn {
    display: inline-block; padding: 14px 36px;
    background: var(--gold); color: var(--bg); text-decoration: none;
    font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 2px;
    border-radius: 4px; transition: background 0.3s;
}
.back-btn:hover { background: var(--gold-light); }

/* ===== EFFECTS ===== */
.sparkle { position: fixed; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; z-index: 100; }
.star-burst { position: fixed; font-size: 1.2rem; pointer-events: none; z-index: 100; }

@keyframes fade-in-down { 0% { opacity: 0; transform: translateY(-20px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes slide-up { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .phase { padding-top: 70px; }

    .env-title { font-size: 2.2rem; }
    .sobre-img { width: 260px; }
    .maquina-deco { width: 90px; }
    .maquina-cutter { width: 80px; }

    .reveal-scene { flex-direction: column; align-items: center; padding: 10px 16px; gap: 16px; }
    .wizard-col { padding-top: 0; min-width: unset; width: 100%; max-width: 100%; }
    .card-inner { width: 200px; }
    .congrats-title { font-size: 2rem; }
    .wizard-box { padding: 20px 18px; }
    .option-card { min-width: 100px; padding: 12px 16px; }
}

@media (max-width: 480px) {
    .sobre-img { width: 220px; }
    .maquina-deco { width: 75px; }
    .card-inner { width: 170px; }
    .congrats-title { font-size: 1.7rem; }
    .wizard-title { font-size: 1.2rem; }
    .step-dot { width: 26px; height: 26px; font-size: 0.7rem; }
    .step-line { width: 20px; }
    .wiz-btn { padding: 10px 18px; font-size: 0.78rem; }
}
