/* ===== PALETA DE COLORES ===== */
:root {
  --c1: #323330;    /* Ebony */
  --c2: #eceded;    /* Linen */
  --c3: #959689;    /* Monsoon */
  --c4: #797968;    /* Mako */
  --c5: #a9ad9e;    /* Millbrook */
  --c6: #413f3c;    /* Aztec */
  --accent: #bd856f;/* Old Rose (marca) */
  --bg: var(--c1);
  --fg: var(--c2);

  /* Alturas para web */
  --header-height: 50px;
  --footer-height: 70px;

  /* UI tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-1: 0 2px 8px rgba(0,0,0,.18);
  --shadow-2: 0 6px 20px rgba(0,0,0,.35);

  /* Tipografía fluida (funciona con Inter o Montserrat) */
  --step--1: clamp(.9rem, .85rem + .2vw, 1rem);
  --step-0: clamp(1rem, .95rem + .35vw, 1.125rem);
  --step-1: clamp(1.15rem, 1rem + .6vw, 1.35rem);
}

/* ===== RESET & GLOBAL ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body {
  display: flex;
  flex-direction: column;
  /* Fuente más moderna: usa Inter si está cargada, si no Montserrat */
  font-family: 'Inter', 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Capa de fondo semitransparente */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('NEXTECH arte.png') no-repeat center center fixed;
  background-size: cover;
  opacity: 0.5;
  z-index: -1;
  filter: saturate(.95) contrast(1.05);
}

/* Links y foco */
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 65%, white); outline-offset: 2px; }

/* ===== HEADER (transparente / glass) ===== */
header {
  height: var(--header-height);
  flex: 0 0 var(--header-height);
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky; top: 0;
  backdrop-filter: saturate(1.2) blur(8px);
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.15));
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-1);
  z-index: 10;
}
.main-nav { width: 100%; max-width: 1400px; padding: 0 20px; }
.main-nav .nav-links {
  list-style: none;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}
.main-nav .nav-links a {
  font-weight: 600;
  font-size: var(--step-0);
  transition: color .2s ease;
}

/* ===== MAIN (VIDEO HORIZONTAL CENTRADO) ===== */
main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 16px;
}

/* Contenedor 16:9 con glass suave y borde redondeado */
.video-wrapper {
  position: relative;
  width: min(1200px, 95vw);
  aspect-ratio: 16 / 9;             /* video horizontal */
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  outline: 1px solid rgba(255,255,255,.06);
  background: #000;                 /* para barras si object-fit: contain */
}

/* Video: usa 'cover' o 'contain' según prefieras */
.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;                 /* cambia a 'contain' para ver todo el cuadro */
  display: block;
}

/* Botón overlay para activar sonido */
.unmute-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: .65rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: var(--step--1);
  cursor: pointer;
  box-shadow: var(--shadow-2);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.unmute-btn:hover { transform: translateY(-1px); }
.unmute-btn:active { transform: translateY(0) scale(.98); }
.unmute-btn[hidden] { display: none; }

/* ===== FOOTER (transparente / glass) ===== */
footer {
  height: var(--footer-height);
  flex: 0 0 var(--footer-height);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: saturate(1.2) blur(8px);
  background: linear-gradient(0deg, rgba(0,0,0,.45), rgba(0,0,0,.15));
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-1);
  z-index: 10;
}
.site-footer .footer-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}
.footer-credit a {
  color: var(--fg);
  font-size: var(--step--1);
  opacity: .9;
}
.footer-credit a:hover { opacity: 1; }
.footer-logo img {
  height: 40px;
  margin: 0 8px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}

/* ===== CHAT WIDGET ===== */
.chat-widget {
  position: fixed;
  bottom: calc(var(--footer-height) + 16px);
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 1001;
}

/* Botón de chat (círculo) */
.chat-toggle {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background-color: var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.chat-toggle:hover { transform: translateY(-2px); }
.chat-toggle:active { transform: translateY(0) scale(.98); }

/* Contenedor expandible del chat (glass) */
.chat-expand {
  display: none;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.92));
  width: 320px;
  height: 400px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0,0,0,.06);
}
.chat-expand.open { display: flex; }

/* Área de mensajes */
.chat-expand .messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  font-size: var(--step--1);
  color: #333;
  scrollbar-width: thin; scrollbar-color: #bbb transparent;
}
.chat-expand .messages::-webkit-scrollbar { width: 10px; }
.chat-expand .messages::-webkit-scrollbar-thumb { background: #bbb; border-radius: 999px; }

/* Campo de entrada */
.chat-expand .chat-input {
  display: flex;
  border-top: 1px solid #ccc;
  background-color: #f4f4f4;
  padding: 8px;
}
.chat-expand input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 8px 0 0 8px;
  outline: none;
  font-size: var(--step--1);
  background-color: white;
}
.chat-expand button {
  padding: 10px 14px;
  border: none;
  border-radius: 0 8px 8px 0;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: var(--step--1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .main-nav { padding: 0 12px; }
  .chat-widget {
    right: 16px;
    bottom: calc(var(--footer-height) + 12px);
  }
  .chat-expand.open {
    width: calc(100% - 96px);
  }
}

