/* ============ DON FUEGO · sistema visual futurista ============ */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Chakra+Petch:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --carbon: #050403;
  --carbon-2: #0B0907;
  --brasa: #1C1512;
  --fuego: #FF5A0F;
  --fuego-2: #FF7A2E;
  --ascua: #E2280F;
  --llama: #FFC21A;
  --oro: #D4A24C;
  --crema: #FFF1DC;
  --crema-2: #BFAE98;
  --crema-3: #8A7C6C;
  --soplete: #3FA9F5;
  --ok: #3DDC84;

  --glass: rgba(28, 21, 18, .55);
  --glass-2: rgba(40, 28, 22, .7);
  --line: rgba(255, 140, 60, .22);
  --line-2: rgba(255, 170, 80, .45);
  --grad-fuego: linear-gradient(120deg, #FF3D00 0%, #FF7A1A 45%, #FFC21A 100%);
  --grad-oro: linear-gradient(120deg, #8C6420 0%, #F5D27A 50%, #B8862B 100%);
  --glow: 0 0 24px rgba(255, 90, 15, .45), 0 0 2px rgba(255, 200, 120, .8);
  --cut: 14px; /* esquina recortada estilo HUD */
  --f-title: 'Anton', Impact, sans-serif;
  --f-hud: 'Chakra Petch', 'Segoe UI', sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { background: var(--carbon); color: var(--crema); font: 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* fondo: rejilla en perspectiva + brillo de brasa */
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 70, 0, .14), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 120, 20, .10), transparent 70%),
    linear-gradient(rgba(255, 110, 30, .055) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 110, 30, .055) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--carbon);
}

/* ---------- tipografía ---------- */
.hud-label {
  font: 600 12px/1 var(--f-hud); letter-spacing: .32em; text-transform: uppercase; color: var(--fuego-2);
  display: inline-flex; align-items: center; gap: 10px;
}
.hud-label::before { content: ''; width: 26px; height: 2px; background: var(--grad-fuego); box-shadow: var(--glow); }
.title {
  font: 400 clamp(38px, 6vw, 76px)/.95 var(--f-title); text-transform: uppercase; letter-spacing: .5px;
}
.title .hot { background: var(--grad-fuego); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(255, 90, 15, .45)); }
.title .gold { background: var(--grad-oro); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--crema-2); }
.mono { font-family: var(--f-hud); }

/* ---------- paneles de vidrio con borde de fuego ---------- */
.panel {
  position: relative; background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.panel::before { /* borde degradado 1px que respeta el recorte */
  content: ''; position: absolute; inset: 0; pointer-events: none; padding: 1px;
  background: linear-gradient(140deg, rgba(255, 120, 30, .75), rgba(255, 120, 30, .08) 35%, rgba(212, 162, 76, .08) 65%, rgba(212, 162, 76, .7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  clip-path: inherit;
}

/* ---------- botones ---------- */
.btn {
  --c: var(--fuego);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border: 0; cursor: pointer; text-decoration: none;
  font: 700 15px/1 var(--f-hud); letter-spacing: .14em; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform .15s ease, filter .2s ease, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad-fuego); color: #1A0700; box-shadow: var(--glow); }
.btn.primary:hover { filter: brightness(1.12) saturate(1.1); }
.btn.ghost { background: rgba(255, 120, 30, .08); color: var(--llama); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: rgba(255, 120, 30, .18); }
.btn.dark { background: var(--brasa); color: var(--crema); box-shadow: inset 0 0 0 1px var(--line); }
.btn.dark:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ok { background: linear-gradient(120deg, #1FAF63, #3DDC84); color: #04210F; }
.btn.danger { background: rgba(226, 40, 15, .16); color: #FF8A73; box-shadow: inset 0 0 0 1px rgba(226, 40, 15, .5); }
.btn.sm { padding: 9px 14px; font-size: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }

/* ---------- formularios ---------- */
.field { display: grid; gap: 6px; }
.field > span { font: 600 11px/1 var(--f-hud); letter-spacing: .2em; text-transform: uppercase; color: var(--crema-2); }
.input {
  width: 100%; padding: 12px 14px; background: rgba(5, 4, 3, .6); border: 1px solid var(--line); outline: none;
  color: var(--crema); transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--fuego); box-shadow: 0 0 0 3px rgba(255, 90, 15, .18); }
textarea.input { resize: vertical; min-height: 70px; }
select.input option { background: var(--brasa); }

.switch { display: inline-block; vertical-align: middle; position: relative; width: 52px; height: 28px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; background: #2a201b; border: 1px solid var(--line); transition: .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--crema-3); transition: .2s; }
.switch input:checked + i { background: rgba(255, 90, 15, .3); border-color: var(--fuego); }
.switch input:checked + i::after { left: 27px; background: var(--fuego); box-shadow: var(--glow); }

/* ---------- chips / badges ---------- */
.chip {
  padding: 8px 16px; border: 0; cursor: pointer; background: rgba(255, 120, 30, .06); color: var(--crema-2);
  font: 600 13px/1 var(--f-hud); letter-spacing: .12em; text-transform: uppercase; box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.chip.on, .chip:hover { color: #1A0700; background: var(--grad-fuego); box-shadow: var(--glow); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font: 700 11px/1 var(--f-hud); letter-spacing: .14em; text-transform: uppercase; }
.badge.live { background: var(--ascua); color: #fff; box-shadow: 0 0 18px rgba(226, 40, 15, .6); }
.badge.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
.badge.open { background: rgba(61, 220, 132, .14); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(61, 220, 132, .45); }
.badge.closed { background: rgba(226, 40, 15, .14); color: #FF8A73; box-shadow: inset 0 0 0 1px rgba(226, 40, 15, .45); }
@keyframes blink { 50% { opacity: .2; } }

/* aviso flotante */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 100;
  padding: 14px 22px; background: var(--brasa); color: var(--crema); box-shadow: var(--glow), inset 0 0 0 1px var(--line-2);
  font: 600 14px var(--f-hud); letter-spacing: .06em; transition: transform .35s cubic-bezier(.2, .9, .3, 1.3);
  pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { transform: translate(-50%, 0); }

/* ventanas */
.modal-bg { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .72); display: grid; place-items: center; padding: 16px; }
.modal { width: min(460px, 100%); max-height: calc(100svh - 32px); overflow: auto; padding: 26px; display: grid; gap: 16px; }

/* aparece al hacer scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

::selection { background: var(--fuego); color: #1A0700; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--carbon); }
::-webkit-scrollbar-thumb { background: #3a2a20; }
::-webkit-scrollbar-thumb:hover { background: var(--fuego); }

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