/* ═══════════════════════════════════════════════════════════
   Estudio Nácar · turnos online (demo de Bether Studio)
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #faf6f2; --surface: #ffffff; --ink: #2b1d1a; --ink-2: #6e5a55; --ink-3: #a3918b;
  --line: #eee3dc; --rose: #c98b7b; --rose-2: #e2ad9d; --rose-soft: #f7e7e0; --deep: #3b2622;
  --ok: #3f9d6b; --wa: #25d366;
  --f-display: 'Cormorant Garamond', Georgia, serif; --f-body: 'Manrope', system-ui, sans-serif;
  --r: 20px; --ease: cubic-bezier(.22,1,.36,1);
  --shadow: 0 24px 60px -28px rgba(59,38,34,.35);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--f-body); background: var(--bg); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; }
em { font-family: var(--f-display); font-style: italic; font-weight: 500; color: var(--rose); letter-spacing: -.01em; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--rose); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border-radius: 99px; font-weight: 700; font-size: 15px; transition: transform .2s, box-shadow .3s, background .3s; }
.btn:active { transform: scale(.97); }
.btn--dark { background: var(--deep); color: #fff; box-shadow: 0 14px 30px -14px rgba(59,38,34,.8); }
.btn--rose { background: linear-gradient(135deg, var(--rose), var(--rose-2)); color: #fff; box-shadow: 0 14px 30px -12px rgba(201,139,123,.9); }
.btn--ghost { border: 1.5px solid var(--line); background: var(--surface); }
.btn svg { width: 18px; height: 18px; }

/* Aviso de demo */
.demo-bar { background: var(--deep); color: #f3dcd3; font-size: 12.5px; text-align: center; padding: 8px 16px; }
.demo-bar b { color: #fff; }
.demo-bar a { text-decoration: underline; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(250,246,242,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: baseline; gap: 8px; font-family: var(--f-display); font-size: 27px; font-weight: 600; letter-spacing: .01em; }
.logo small { font-family: var(--f-body); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--rose); }
.nav__links { display: flex; gap: 28px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.nav__links a:hover { color: var(--ink); }
.nav .btn { padding: 11px 20px; font-size: 14px; }

/* HERO */
.hero { position: relative; overflow: hidden; padding: 70px 0 90px; }
.hero::before { content: ''; position: absolute; width: 720px; height: 720px; right: -220px; top: -260px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #f6d9cf, transparent 65%); filter: blur(10px); z-index: -1; }
.hero::after { content: ''; position: absolute; width: 520px; height: 520px; left: -240px; bottom: -280px; border-radius: 50%; background: radial-gradient(circle, #efe2f0, transparent 65%); z-index: -1; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(42px, 5.6vw, 70px); font-weight: 800; margin: 18px 0 22px; }
.hero h1 em { font-size: 1.12em; display: inline-block; }
.hero .lead { font-size: 18px; color: var(--ink-2); max-width: 30em; margin-bottom: 30px; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__checks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.hero__checks span::before { content: '✓'; color: var(--ok); font-weight: 800; margin-right: 6px; }

/* Tarjeta "próximos libres" */
.next { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 26px; box-shadow: var(--shadow); }
.next::before { content: ''; position: absolute; inset: -14px -14px auto auto; width: 88px; height: 88px; border-radius: 50%; background: conic-gradient(from 90deg, var(--rose), var(--rose-2), #f1d2c7, var(--rose)); filter: blur(.5px); opacity: .9; z-index: -1; animation: girar 14s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.next__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.next__head b { font-size: 15px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--ok); }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(63,157,107,.18); animation: latido 1.8s ease-in-out infinite; }
@keyframes latido { 50% { box-shadow: 0 0 0 8px rgba(63,157,107,0); } }
.next__list { display: flex; flex-direction: column; gap: 10px; }
.next__item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); transition: border-color .25s, transform .25s; text-align: left; width: 100%; }
.next__item:hover { border-color: var(--rose); transform: translateX(3px); }
.next__day { width: 52px; text-align: center; flex: none; }
.next__day b { display: block; font-family: var(--f-display); font-size: 26px; line-height: 1; font-weight: 600; }
.next__day small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.next__info { flex: 1; min-width: 0; }
.next__info b { display: block; font-size: 15px; }
.next__info small { color: var(--ink-2); font-size: 13px; }
.next__time { font-weight: 800; font-size: 15px; color: var(--rose); background: var(--rose-soft); padding: 6px 11px; border-radius: 10px; }
.next__foot { margin-top: 16px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* SECCIONES */
section { padding: 90px 0; }
.head { max-width: 640px; margin-bottom: 40px; }
.head h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; margin: 12px 0 14px; }
.head p { color: var(--ink-2); font-size: 17px; }
.head--center { margin-inline: auto; text-align: center; }

/* Servicios */
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.cat { padding: 9px 18px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; color: var(--ink-2); transition: all .2s; }
.cat.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.serv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.serv { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; transition: border-color .25s, transform .3s var(--ease), box-shadow .3s; }
.serv:hover { border-color: var(--rose-2); transform: translateY(-4px); box-shadow: var(--shadow); }
.serv__cat { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--rose); }
.serv h3 { font-size: 21px; }
.serv p { font-size: 14.5px; color: var(--ink-2); flex: 1; }
.serv__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line); }
.serv__meta span { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.serv__meta b { font-size: 19px; }
.serv .btn { padding: 12px 18px; font-size: 14px; margin-top: 6px; }

/* Cómo funciona */
.how { background: var(--deep); color: #fff; border-radius: 32px; margin: 0 12px; }
.how .head p { color: rgba(255,255,255,.65); }
.how em { color: var(--rose-2); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r); padding: 28px; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--rose), var(--rose-2)); font-weight: 800; margin-bottom: 18px; }
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: rgba(255,255,255,.65); font-size: 15px; }

/* Horarios y ubicación */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.card h3 { font-size: 22px; margin-bottom: 16px; }
.hours { list-style: none; display: flex; flex-direction: column; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.hours li:last-child { border: 0; }
.hours li.today { color: var(--rose); font-weight: 800; }
.hours li.closed span:last-child { color: var(--ink-3); }
.card p { color: var(--ink-2); margin-bottom: 18px; }
.card .btn { margin-right: 8px; margin-bottom: 8px; }

footer { padding: 40px 0 50px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--rose); font-weight: 700; }

/* ═════════ RESERVA (panel) ═════════ */
.sheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.sheet__bg { position: absolute; inset: 0; background: rgba(43,29,26,.45); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); opacity: 0; transition: opacity .35s; }
.sheet__panel { position: relative; width: min(560px, 100%); max-height: min(860px, 94vh); display: flex; flex-direction: column; background: var(--bg); border-radius: 28px; box-shadow: 0 40px 100px -30px rgba(43,29,26,.6); transform: translateY(30px) scale(.97); opacity: 0; transition: transform .45s var(--ease), opacity .3s; overflow: hidden; }
.sheet.open { pointer-events: auto; }
.sheet.open .sheet__bg { opacity: 1; }
.sheet.open .sheet__panel { transform: none; opacity: 1; }
.sheet__top { padding: 18px 22px 0; }
.sheet__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sheet__bar h2 { flex: 1; font-size: 20px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-size: 20px; flex: none; }
.icon-btn svg { width: 18px; height: 18px; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.progress i { height: 4px; border-radius: 4px; background: var(--line); transition: background .4s; }
.progress i.on { background: linear-gradient(90deg, var(--rose), var(--rose-2)); }
.sheet__body { flex: 1; overflow-y: auto; padding: 20px 22px 24px; overscroll-behavior: contain; }
.sheet__foot { padding: 14px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet__foot .btn { width: 100%; padding: 17px; font-size: 16px; }
.sheet__foot .btn[disabled] { opacity: .4; pointer-events: none; }
.resumen { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }
.resumen b { color: var(--ink); }

.paso h3 { font-size: 17px; margin-bottom: 14px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.opt.on { border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-soft); }
.opt__radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.opt.on .opt__radio { border-color: var(--rose); }
.opt.on .opt__radio::after { content: ''; width: 11px; height: 11px; border-radius: 50%; background: var(--rose); }
.opt__txt { flex: 1; min-width: 0; }
.opt__txt b { display: block; font-size: 15.5px; }
.opt__txt small { color: var(--ink-2); font-size: 13px; }
.opt__price { font-weight: 800; white-space: nowrap; }

/* Días */
.days { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 0 -22px 22px; padding: 4px 22px; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 64px; padding: 10px 0 12px; border-radius: 18px; text-align: center; background: var(--surface); border: 1.5px solid var(--line); scroll-snap-align: start; transition: all .2s; }
.day small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.day b { display: block; font-family: var(--f-display); font-size: 28px; line-height: 1.1; font-weight: 600; }
.day span { display: block; font-size: 10.5px; color: var(--ink-3); }
.day.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.day.on small, .day.on span { color: rgba(255,255,255,.7); }
.day[disabled] { opacity: .35; pointer-events: none; }
.slots-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.slots-head small { color: var(--ink-3); font-size: 13px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { padding: 13px 0; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; font-size: 15px; transition: all .2s; }
.slot.on { background: linear-gradient(135deg, var(--rose), var(--rose-2)); border-color: transparent; color: #fff; box-shadow: 0 10px 20px -10px rgba(201,139,123,.9); }
.slots-empty { text-align: center; padding: 30px 16px; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; }
.cargando { text-align: center; padding: 30px; color: var(--ink-3); }
.cargando::before { content: ''; display: block; width: 26px; height: 26px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--rose); animation: girar .8s linear infinite; }

/* Datos */
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.field input, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 15px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); outline: none; transition: border-color .2s; }
.field input:focus, .field textarea:focus { border-color: var(--rose); }
.field small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 6px; }
.recap { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 20px; display: grid; gap: 4px; font-size: 14.5px; }
.recap b { font-size: 16px; }
.error { color: #b3261e; font-size: 14px; font-weight: 600; margin-top: 4px; }

/* Confirmado */
.ticket { text-align: center; padding: 10px 0 4px; }
.ticket__ok { width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #5cc08b, var(--ok)); color: #fff; box-shadow: 0 16px 36px -12px rgba(63,157,107,.8); animation: pop .6s var(--ease); }
.ticket__ok svg { width: 38px; height: 38px; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }
.ticket h3 { font-size: 26px; margin-bottom: 6px; }
.ticket > p { color: var(--ink-2); margin-bottom: 20px; }
.ticket__card { position: relative; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; margin-bottom: 18px; }
.ticket__card::before, .ticket__card::after { content: ''; position: absolute; top: 58%; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.ticket__card::before { left: -12px; clip-path: inset(0 0 0 50%); }
.ticket__card::after { right: -12px; clip-path: inset(0 50% 0 0); }
.ticket__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14.5px; border-bottom: 1px dashed var(--line); }
.ticket__row:last-child { border: 0; }
.ticket__row span { color: var(--ink-2); }
.ticket__actions { display: grid; gap: 10px; }
.ticket__actions .btn { width: 100%; }

/* Mis turnos */
.mine { display: flex; flex-direction: column; gap: 12px; }
.mine__item { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.mine__item.cancelado { opacity: .5; }
.mine__item b { display: block; font-size: 16px; }
.mine__item small { color: var(--ink-2); }
.mine__item .btn { margin-top: 12px; padding: 10px 16px; font-size: 13.5px; }
.empty { text-align: center; color: var(--ink-2); padding: 30px 10px; }

/* Aviso */
.toast { position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; z-index: 300; background: var(--deep); color: #fff; padding: 13px 20px; border-radius: 14px; font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow); transition: all .35s var(--ease); pointer-events: none; max-width: 92vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Revelado al hacer scroll */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* Barra flotante: solo en celular */
.tabbar { display: none; }

/* ═════════ CELULAR ═════════ */
@media (max-width: 860px) {
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .nav__links, .nav .btn { display: none; }
  .nav .wrap { height: 60px; justify-content: center; }
  .hero { padding: 30px 0 60px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: clamp(40px, 11.5vw, 54px); margin: 12px 0 16px; }
  .hero .lead { font-size: 16.5px; margin-bottom: 24px; }
  .hero__ctas .btn { flex: 1 1 100%; padding: 17px; }
  section { padding: 64px 0; }
  .serv-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -20px; padding: 6px 20px 10px; gap: 12px; }
  .serv-grid::-webkit-scrollbar { display: none; }
  .serv { flex: 0 0 82%; scroll-snap-align: center; }
  .cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px 20px; padding: 0 20px; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: none; }
  .steps, .info-grid { grid-template-columns: 1fr; }
  .how { margin: 0 8px; border-radius: 26px; }

  .sheet { align-items: flex-end; }
  .sheet__panel { width: 100%; max-height: 94vh; height: 94vh; border-radius: 26px 26px 0 0; transform: translateY(100%); opacity: 1; }
  .sheet__top::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: -6px auto 12px; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 100;
    padding: 9px 4px 8px; border-radius: 24px;
    background: rgba(43,29,26,.9); border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
    box-shadow: 0 20px 40px -14px rgba(43,29,26,.7);
  }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,.55); -webkit-tap-highlight-color: transparent; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .on { color: var(--rose-2); }
  .tabbar a:active, .tabbar button:active { transform: scale(.92); }
  .tab-cta { color: #fff !important; }
  .tab-cta .ring { width: 56px; height: 56px; margin-top: -28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--rose), var(--rose-2)); border: 4px solid var(--bg); box-shadow: 0 10px 24px -6px rgba(201,139,123,.9); }
  .tab-cta .ring svg { width: 24px; height: 24px; }
  .badge { position: absolute; top: -4px; right: calc(50% - 20px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--rose); color: #fff; font-size: 10.5px; line-height: 18px; text-align: center; }
}
@media (max-width: 380px) { .slots { grid-template-columns: repeat(3, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
}
