:root {
  --bg: #120c08; --bg-2: #1b130d; --card: #22180f; --line: #3a2a1d;
  --tx: #f3e6d3; --tx-2: #c2ae96; --tx-3: #8a7863;
  --gold: #d6a650; --gold-2: #f0c879; --red: #c4382b;
  --serif: "Playfair Display", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: "Inter", system-ui, sans-serif; background: var(--bg); color: var(--tx); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* Barra de demo */
.demobar {
  display: flex; align-items: center; gap: 1rem; padding: 8px 16px;
  background: #f4f4f6; color: #0d0c10; font: 500 13px "Outfit", sans-serif;
}
.demobar span { flex: 1; text-align: center; color: #4a4950; }
.demobar__cta { background: #0d0c10; color: #fff; padding: 6px 14px; border-radius: 99px; font-weight: 600; }

/* Encabezado */
.bh {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 2rem;
  padding: 14px clamp(16px, 4vw, 48px); background: rgba(18, 12, 8, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(214, 166, 80, .15);
}
.bh__logo { white-space: nowrap; display: inline-flex; align-items: center; gap: .6rem; font: 800 1.35rem var(--serif); letter-spacing: .01em; }
.bh__logo em { font: italic 600 .95rem var(--serif); color: var(--gold); }
.bh__nav { white-space: nowrap; display: flex; gap: 1.8rem; margin-left: auto; font-size: .9rem; color: var(--tx-2); }
.bh__nav a:hover { color: var(--tx); }
.pole {
  width: 10px; height: 26px; border-radius: 5px; flex: none;
  background: repeating-linear-gradient(135deg, var(--red) 0 5px, #fff 5px 10px, #2a5bbf 10px 15px, #fff 15px 20px);
  background-size: 100% 40px; animation: pole 1.4s linear infinite;
}
.pole--big { width: 16px; height: 56px; border-radius: 8px; }
@keyframes pole { to { background-position: 0 40px; } }

.bbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 99px; font-weight: 600; font-size: .92rem;
  border: 1.5px solid var(--line); transition: transform .2s, background .2s, border-color .2s;
}
.bbtn:hover { transform: translateY(-2px); border-color: var(--gold); }
.bbtn--gold { background: var(--gold); color: #1a1008; border-color: var(--gold); }
.bbtn--gold:hover { background: var(--gold-2); }
.bbtn[disabled] { opacity: .4; pointer-events: none; }
.bbtn--block { width: 100%; }

.kicker { text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; color: var(--gold); font-weight: 600; margin-bottom: .8rem; }
h1, h2 { font-family: var(--serif); font-weight: 800; letter-spacing: -.01em; line-height: 1.02; }
h1 i, h2 i { color: var(--gold); font-weight: 600; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 2rem; }

/* ===== Estudio 3D ===== */
.studio { position: relative; display: grid; grid-template-columns: 1fr 380px; height: calc(100svh - 128px); min-height: 600px; background: #1a110b; }
.studio__stage { position: relative; overflow: hidden; min-width: 0; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
#scene.is-drag { cursor: grabbing; }
.studio__loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1rem; color: var(--tx-2); background: #1a110b; transition: opacity .6s; }
.studio__loading.is-done { opacity: 0; pointer-events: none; }
.studio__title { position: absolute; left: clamp(16px, 4vw, 48px); top: clamp(20px, 5vh, 56px); pointer-events: none; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.studio__title h1 { font-size: clamp(2.2rem, 4.6vw, 4.2rem); }
.studio__hint {
  position: absolute; left: 50%; bottom: 84px; translate: -50% 0; pointer-events: none;
  background: rgba(0,0,0,.45); padding: 8px 16px; border-radius: 99px; font-size: .85rem; color: var(--tx-2);
  transition: opacity .6s;
}
.studio__hint.is-gone { opacity: 0; }
.studio__ctrls {
  position: absolute; left: 50%; bottom: 24px; translate: -50% 0; display: flex; gap: 4px;
  background: rgba(18, 12, 8, .75); backdrop-filter: blur(10px); padding: 5px; border-radius: 99px; border: 1px solid var(--line);
}
.studio__ctrls button { padding: 8px 16px; border-radius: 99px; font-size: .85rem; font-weight: 600; color: var(--tx-2); transition: .2s; }
.studio__ctrls button:hover { color: var(--tx); }
.studio__ctrls button.is-active, .studio__ctrls button[aria-pressed="true"] { background: var(--gold); color: #1a1008; }

/* Panel del probador */
.panel { background: var(--bg-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 14px 14px 0; gap: 4px; }
.tabs button { padding: 10px; border-radius: 12px 12px 0 0; font-weight: 600; font-size: .9rem; color: var(--tx-3); border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--tx); border-color: var(--gold); }
.opts { flex: 1; overflow-y: auto; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.opt {
  text-align: left; padding: 12px; border-radius: 16px; background: var(--card); border: 1.5px solid transparent;
  display: grid; gap: 2px; transition: border-color .2s, transform .2s;
}
.opt:hover { transform: translateY(-2px); }
.opt.is-active { border-color: var(--gold); background: #2b1e12; }
.opt__ico { font-size: 1.5rem; line-height: 1.2; }
.opt b { font-size: .9rem; }
.opt small { color: var(--tx-3); font-size: .78rem; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); margin-bottom: 4px; }
.pick { border-top: 1px solid var(--line); padding: 16px; display: grid; gap: 10px; }
.pick h3 { font: 800 1.4rem var(--serif); }
.pick p { color: var(--tx-2); font-size: .88rem; }
.pick__meta { display: flex; justify-content: space-between; color: var(--tx-2); font-size: .85rem; }
.pick__meta b { color: var(--gold-2); font-size: 1.1rem; }

/* ===== Secciones ===== */
.bsec { max-width: 1160px; margin: 0 auto; padding: 96px 16px 0; }

.menu { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4rem; }
.menu h3 { font: 600 1.1rem var(--serif); color: var(--gold); margin: 1rem 0 .4rem; grid-column: span 1; }
.menu__col { display: grid; align-content: start; }
.mi { display: flex; align-items: baseline; gap: .6rem; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.mi b { font-weight: 600; }
.mi small { display: block; color: var(--tx-3); font-size: .82rem; }
.mi i { flex: 1; }
.mi span { font: 600 1.1rem var(--serif); color: var(--gold-2); }

.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tm { background: var(--card); border-radius: 24px; padding: 26px; display: grid; gap: .6rem; border: 1px solid var(--line); }
.tm__av { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font: 800 1.6rem var(--serif); color: #1a1008; }
.tm h3 { font: 800 1.4rem var(--serif); }
.tm p { color: var(--tx-2); font-size: .92rem; }
.tm__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tm__tags span { font-size: .75rem; padding: 4px 10px; border-radius: 99px; background: #2e2116; color: var(--tx-2); }
.tm .bbtn { margin-top: .4rem; justify-self: start; }

/* ===== Reservar ===== */
.book { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.book__form { display: grid; gap: 14px; }
fieldset { border: 1px solid var(--line); border-radius: 22px; padding: 20px; background: var(--bg-2); }
legend { display: flex; align-items: center; gap: .6rem; font: 600 1.15rem var(--serif); padding: 0 .4rem; }
legend span { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #1a1008; display: grid; place-items: center; font: 700 .8rem "Inter", sans-serif; }
.svc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.svc label, .barb label {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card);
  border: 1.5px solid transparent; cursor: pointer; transition: border-color .2s;
}
.svc label:has(input:checked), .barb label:has(input:checked) { border-color: var(--gold); background: #2b1e12; }
.svc label:has(input:focus-visible), .barb label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.svc input, .barb input { accent-color: var(--gold); width: 16px; height: 16px; }
.svc span, .barb span { flex: 1; font-size: .9rem; font-weight: 500; }
.svc small, .barb small { color: var(--tx-3); font-size: .78rem; display: block; font-weight: 400; }
.svc em { font-style: normal; color: var(--gold-2); font-weight: 600; font-size: .9rem; }
.svc__h { grid-column: 1 / -1; font-size: .75rem; text-transform: uppercase; letter-spacing: .16em; color: var(--tx-3); margin-top: 6px; }
.barb { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.barb label { flex-direction: column; text-align: center; gap: 6px; }
.barb label input { position: absolute; opacity: 0; }
.barb .tm__av { width: 46px; height: 46px; font-size: 1.05rem; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.day { flex: none; width: 64px; padding: 10px 0; border-radius: 16px; background: var(--card); text-align: center; border: 1.5px solid transparent; }
.day small { display: block; font-size: .72rem; color: var(--tx-3); text-transform: uppercase; letter-spacing: .08em; }
.day b { font: 800 1.4rem var(--serif); }
.day.is-active { border-color: var(--gold); background: #2b1e12; }
.day[disabled] { opacity: .3; cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot { padding: 10px 0; border-radius: 12px; background: var(--card); font-weight: 600; font-size: .9rem; border: 1.5px solid transparent; }
.slot.is-active { background: var(--gold); color: #1a1008; }
.slot[disabled] { opacity: .28; text-decoration: line-through; cursor: not-allowed; }
.slots__note { grid-column: 1 / -1; color: var(--tx-3); font-size: .88rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fields label { display: grid; gap: 6px; font-size: .82rem; color: var(--tx-2); font-weight: 500; }
.fields input { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: 0; }
.fields input:focus { border-color: var(--gold); }
.fields input[aria-invalid="true"] { border-color: var(--red); }

.ticket {
  position: sticky; top: 90px; background: var(--tx); color: #1f150d; border-radius: 24px; padding: 24px;
  display: grid; gap: 12px;
  mask: radial-gradient(circle 12px at 0 62%, transparent 98%, #000) , radial-gradient(circle 12px at 100% 62%, transparent 98%, #000);
  mask-composite: intersect; -webkit-mask-composite: source-in;
}
.ticket h3 { font: 800 1.5rem var(--serif); }
.ticket__row { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.ticket__row span:first-child { color: #7a6650; }
.ticket__row b { text-align: right; }
.ticket hr { border: 0; border-top: 2px dashed #d8c7ae; margin: 4px 0; }
.ticket__total { display: flex; justify-content: space-between; align-items: baseline; font: 800 1.6rem var(--serif); }
.ticket__total small { font: 500 .85rem "Inter", sans-serif; color: #7a6650; }
.ticket .bbtn--gold { background: #1f150d; color: var(--tx); border-color: #1f150d; }
.ticket__err { color: var(--red); font-size: .85rem; min-height: 1.2em; }

/* Mis citas */
.mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ap { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; gap: 6px; }
.ap__top { display: flex; justify-content: space-between; align-items: center; }
.ap__code { font: 600 .78rem ui-monospace, monospace; color: var(--gold); letter-spacing: .1em; }
.ap h3 { font: 800 1.25rem var(--serif); }
.ap p { color: var(--tx-2); font-size: .88rem; }
.ap__acts { display: flex; gap: 8px; margin-top: 6px; }
.ap__acts .bbtn { padding: .55rem 1rem; font-size: .82rem; }
.empty-ap { color: var(--tx-3); border: 1px dashed var(--line); border-radius: 20px; padding: 28px; text-align: center; grid-column: 1 / -1; }

/* Footer */
.bf { max-width: 1160px; margin: 96px auto 0; padding: 32px 16px 48px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--tx-3); font-size: .88rem; }
.bf p { margin-top: .4rem; }
.bf a { color: var(--gold); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(8, 5, 3, .75); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .25s; }
.modal[hidden] { display: none; }
.modal__card { width: min(420px, 100%); background: var(--tx); color: #1f150d; border-radius: 28px; padding: 28px; text-align: center; display: grid; gap: 10px; animation: rise .35s cubic-bezier(.2, .8, .2, 1); outline: 0; }
.modal__card .big { font-size: 3rem; }
.modal__card h3 { font: 800 1.8rem var(--serif); }
.modal__card .code { font: 700 1.3rem ui-monospace, monospace; letter-spacing: .2em; background: #eadbc4; border-radius: 12px; padding: 10px; }
.modal__card p { color: #6b5843; font-size: .92rem; }
.modal__card .bbtn { border-color: #1f150d; }
.modal__card .bbtn--gold { background: #1f150d; color: var(--tx); }
.modal__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.97); } }

.btoast { position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; z-index: 70; background: var(--gold); color: #1a1008; padding: 12px 20px; border-radius: 99px; font-weight: 600; opacity: 0; pointer-events: none; transition: .3s; }
.btoast.is-on { opacity: 1; translate: -50% 0; }

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .studio { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .studio__stage { height: 64svh; min-height: 440px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .opts { grid-template-columns: repeat(3, 1fr); max-height: none; }
  .book { grid-template-columns: minmax(0, 1fr); }
  .ticket { position: static; }
  .team { grid-template-columns: 1fr; }
  .menu { grid-template-columns: 1fr; }
}
@media (max-width: 820px) { .bh__nav { display: none; } .bh { justify-content: space-between; } }
@media (max-width: 640px) {
  .bh__nav { display: none; }
  .bh { justify-content: space-between; }
  .demobar span { display: none; }
  .demobar { justify-content: space-between; }
  .opts { grid-template-columns: 1fr 1fr; }
  .svc, .fields { grid-template-columns: 1fr; }
  .barb { grid-template-columns: 1fr 1fr; }
  .studio__ctrls button { padding: 8px 11px; }
  .studio__hint { bottom: 76px; font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pole { animation: none; }
}
