/* COMPONENTES REUTILIZABLES — botones, header, medios, formularios,
   diálogo, FAQ, flotantes, chatbot y footer. */

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.1rem;
  padding: 0.85rem 1.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  line-height: 1.3;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--burgundy); border-color: var(--burgundy); color: var(--ivory); }
.btn--primary:hover { background: var(--burgundy-bright); border-color: var(--burgundy-bright); }
.btn--ghost { border-color: rgba(244, 240, 232, 0.45); color: var(--ivory); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--gold { border-color: var(--gold); color: var(--gold); }
.btn--gold:hover { background: var(--gold); color: var(--black); }
.btn--outline-dark { border-color: var(--black); color: var(--black); }
.btn--outline-dark:hover { background: var(--black); color: var(--ivory); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
  border-bottom: 1px solid var(--line-on-dark);
  transition: border-color var(--t-fast), gap var(--t-fast) var(--ease);
}
.link-arrow::after { content: '→'; }
.link-arrow:hover { border-color: var(--gold); gap: 0.95rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line-on-dark);
  font-size: 0.78rem;
  color: var(--muted-on-dark);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled, .header.is-open {
  background: rgba(11, 11, 11, 0.94);
  border-bottom-color: var(--line-on-dark);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ivory); }
.brand__mark { width: 40px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand__descriptor {
  margin-top: 0.25rem;
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); white-space: nowrap; }
.nav__list { display: flex; gap: clamp(0.9rem, 1.7vw, 1.9rem); }
.nav__list a {
  position: relative;
  padding-block: 0.5rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(244, 240, 232, 0.86);
  transition: color var(--t-fast);
}
.nav__list a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease);
}
.nav__list a:hover { color: var(--ivory); }
.nav__list a:hover::after { transform: scaleX(1); }
.nav__cta { min-height: 2.6rem; padding: 0.6rem 1.3rem; font-size: 0.7rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  background: none;
  border: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 1.5px;
  background: var(--ivory);
  transition: transform var(--t-med) var(--ease), top var(--t-med) var(--ease);
}
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 26px; }
.nav-toggle[aria-expanded='true'] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    padding: 2rem var(--gutter) 3rem;
    background: var(--black);
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--t-med) var(--ease), visibility var(--t-med);
  }
  .nav.is-open { visibility: visible; opacity: 1; }
  .nav__list { flex-direction: column; align-items: center; gap: 1.4rem; }
  .nav__list a { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.02em; text-transform: none; }
  .nav__cta { min-height: 3.1rem; padding: 0.85rem 1.9rem; font-size: 0.78rem; }
}
@media (max-width: 400px) {
  .brand__name { font-size: 0.9rem; letter-spacing: 0.1em; }
}

/* ---------- Marco de medios (foto, video o placeholder) ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ratio, 4 / 5);
  background: var(--black-raised);
}
.media > img, .media > video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
a:hover > .media > img, button:hover .media > img, .exp:hover .media > img { transform: scale(1.04); }

.media__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(90% 70% at 20% 10%, rgba(122, 16, 24, 0.75), transparent 62%),
    radial-gradient(70% 60% at 90% 100%, rgba(74, 10, 16, 0.8), transparent 65%),
    linear-gradient(160deg, #1A0B0C, var(--black) 70%);
}
.media__mono {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 6.5rem);
  letter-spacing: -0.06em;
  color: rgba(184, 155, 94, 0.2);
  user-select: none;
}
.media__tag {
  position: absolute;
  left: 0.9rem; bottom: 0.8rem;
  padding: 0.25rem 0.55rem;
  border: 1px dashed rgba(184, 155, 94, 0.5);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: rgba(11, 11, 11, 0.6);
}

/* ---------- Tarjeta de video ---------- */
.video-card { position: relative; }
.video-card__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  position: relative;
}
.video-card .media { --ratio: 4 / 5; }
.video-card--featured .media { --ratio: 16 / 10; }
.video-card .media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11, 11, 11, 0.88));
}
.video-card__play {
  position: absolute;
  top: 50%; left: 50%;
  width: 4.2rem; height: 4.2rem;
  margin: -2.1rem 0 0 -2.1rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(11, 11, 11, 0.45);
  transition: background var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.video-card__play::before {
  content: '';
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.5rem 0 0.5rem 0.8rem;
  border-color: transparent transparent transparent var(--ivory);
}
.video-card__btn:hover .video-card__play { background: var(--burgundy); transform: scale(1.06); }
.video-card__meta {
  position: absolute;
  left: 1.2rem; right: 1.2rem; bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.video-card .media__tag { top: 0.8rem; bottom: auto; }
.video-card__cat {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.video-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.25;
  color: var(--ivory);
}
.video-card--featured .video-card__title { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.2rem); }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.6rem; margin-bottom: 2.5rem; }
.filters button {
  padding: 0.6rem 0.1rem;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.filters button:hover { color: var(--ivory); }
.filters button[aria-pressed='true'] { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label, .fieldset legend {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}
.field .optional { font-weight: 400; letter-spacing: 0.04em; text-transform: none; opacity: 0.8; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(244, 240, 232, 0.22);
  border-radius: var(--radius);
  background: rgba(244, 240, 232, 0.04);
  color: var(--ivory);
  color-scheme: dark;
  font-size: 1rem; /* 16px: evita el zoom automático en iOS */
  transition: border-color var(--t-fast), background var(--t-fast);
}
.field textarea { min-height: 7rem; resize: vertical; line-height: 1.6; }
.field select option { background: var(--black-raised); color: var(--ivory); }
.field input::placeholder, .field textarea::placeholder { color: rgba(244, 240, 232, 0.38); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(244, 240, 232, 0.4); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(244, 240, 232, 0.07);
}
.field [aria-invalid='true'] { border-color: #E0685F; }
.field__error { font-size: 0.8rem; color: #F0958D; }

.fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.fieldset legend { padding: 0; margin-bottom: 0.7rem; }
.choice-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(244, 240, 232, 0.22);
  font-size: 0.85rem;
  color: var(--muted-on-dark);
  transition: all var(--t-fast);
}
.choice input:hover + span { border-color: rgba(244, 240, 232, 0.5); color: var(--ivory); }
.choice input:checked + span { border-color: var(--gold); color: var(--gold); background: rgba(184, 155, 94, 0.08); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }

.form-note { font-size: 0.8rem; color: var(--muted-on-dark); }
.form-status {
  padding: 1.5rem;
  border: 1px solid var(--line-on-dark);
  background: rgba(184, 155, 94, 0.06);
}
.form-status h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; margin-bottom: 0.6rem; }
.form-status p { color: var(--muted-on-dark); }
.form-status .btn { margin-top: 1.25rem; }
.form-status--demo { border-style: dashed; }

/* ---------- Diálogo (detalle de experiencia y reproductor) ---------- */
.dialog {
  width: min(92vw, 960px);
  max-height: 90vh;
  padding: 0;
  border: 1px solid var(--line-on-dark);
  background: var(--black-soft);
  color: var(--text-on-dark);
  overflow: auto;
}
.dialog::backdrop { background: rgba(5, 5, 5, 0.86); }
.dialog[open] { animation: dialog-in var(--t-med) var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px); } }
.dialog__close {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  z-index: 2;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 11, 11, 0.6);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ivory);
}
.dialog__close:hover { color: var(--gold); }
.dialog__body { position: relative; }
.dialog__video { aspect-ratio: 16 / 9; background: #000; }
.dialog__video video, .dialog__video iframe { width: 100%; height: 100%; border: 0; }
.dialog__photo { background: #000; }
.dialog__photo img { width: 100%; max-height: 72vh; object-fit: contain; }
.dialog__video--vertical { aspect-ratio: auto; height: min(72vh, 720px); }
.detail__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.6rem; }
.detail__gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.dialog__pad { padding: clamp(1.5rem, 4vw, 2.75rem); }
.dialog__pad h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 500; line-height: 1.2; margin-bottom: 0.8rem; }
.dialog__pad p { color: var(--muted-on-dark); }
.dialog__pad .exp__label { margin-top: 1.5rem; }
.dialog__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.detail { display: grid; }
.detail .media { --ratio: 4 / 3; }
.detail .media img { object-position: 50% 22%; }  /* prioriza rostros en fotos verticales */
@media (min-width: 760px) {
  .detail { grid-template-columns: 2fr 3fr; }
  .detail .media { height: 100%; aspect-ratio: auto; min-height: 420px; }
}

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line-on-light); }
.faq-item:first-child { border-top: 1px solid var(--line-on-light); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  flex: none;
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--burgundy);
  transition: transform var(--t-med) var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--burgundy); }
.faq-item p { padding: 0 2.5rem 1.5rem 0; color: var(--muted-on-light); max-width: 46rem; }

/* ---------- Flotantes: WhatsApp + asistente ---------- */
.floating {
  position: fixed;
  right: clamp(0.9rem, 2.5vw, 1.75rem);
  bottom: clamp(0.9rem, 2.5vw, 1.75rem);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
  /* Aparecen al empezar a recorrer la página, para no tapar el hero */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility var(--t-med);
}
.floating.is-visible { opacity: 1; visibility: visible; transform: none; }
.fab {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 3.25rem;
  padding: 0 1.2rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--black);
  color: var(--ivory);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease);
}
.fab:hover { transform: translateY(-2px); }
.fab svg { width: 1.25rem; height: 1.25rem; flex: none; }
.fab--wa svg { color: var(--gold); }
.fab--wa:hover { background: var(--gold); color: var(--black); }
.fab--wa:hover svg { color: var(--black); }
.fab--chat { background: var(--burgundy); border-color: var(--burgundy); }
.fab--chat:hover { background: var(--burgundy-bright); }
@media (max-width: 560px) {
  .fab { width: 3.25rem; padding: 0; justify-content: center; }
  .fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- Chatbot ---------- */
.chat {
  position: fixed;
  right: clamp(0.9rem, 2.5vw, 1.75rem);
  bottom: clamp(0.9rem, 2.5vw, 1.75rem);
  z-index: 95;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 1.8rem));
  height: min(600px, calc(100dvh - 1.8rem));
  border: 1px solid var(--line-on-dark);
  background: var(--black-soft);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  animation: dialog-in var(--t-med) var(--ease);
}
.chat[hidden] { display: none; }
.chat__head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line-on-dark);
  background: var(--black);
}
.chat__head img { width: 30px; height: auto; }
.chat__title { flex: 1; font-family: var(--font-display); font-size: 1.02rem; line-height: 1.2; }
.chat__title small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.chat__close { width: 44px; height: 44px; border: 0; background: none; font-size: 1.5rem; color: var(--ivory); }
.chat__close:hover { color: var(--gold); }
.chat__log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overscroll-behavior: contain;
}
.msg {
  max-width: 86%;
  padding: 0.7rem 0.95rem;
  font-size: 0.9rem;
  line-height: 1.55;
  animation: dialog-in var(--t-med) var(--ease);
}
.msg--bot { align-self: flex-start; background: var(--black-raised); border-left: 2px solid var(--gold); }
.msg--user { align-self: flex-end; background: var(--burgundy); }
.msg .btn { margin-top: 0.8rem; min-height: 2.8rem; padding: 0.6rem 1rem; font-size: 0.7rem; letter-spacing: 0.1em; }
.chat__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1rem 0.8rem; }
.chat__chips:empty { display: none; }
.chat__chips button {
  padding: 0.45rem 0.8rem;
  min-height: 2.25rem;
  border: 1px solid var(--line-on-dark);
  background: none;
  font-size: 0.78rem;
  color: var(--gold);
  transition: background var(--t-fast), color var(--t-fast);
}
.chat__chips button:hover { background: var(--gold); color: var(--black); }
.chat__form { display: flex; border-top: 1px solid var(--line-on-dark); }
.chat__form input {
  flex: 1;
  min-width: 0;
  height: 3.25rem;
  padding: 0 1rem;
  border: 0;
  background: none;
  font-size: 1rem;
  color: var(--ivory);
}
.chat__form input:focus { outline: none; background: rgba(244, 240, 232, 0.05); }
.chat__form button {
  padding: 0 1.1rem;
  border: 0;
  background: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.chat__form button:hover { color: var(--ivory); }

/* ---------- Footer ---------- */
.footer {
  padding: 3rem 0 6.5rem;
  border-top: 1px solid var(--line-on-dark);
  background: var(--black);
  font-size: var(--fs-sm);
  color: var(--muted-on-dark);
}
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--gold); }
.footer__legal { width: 100%; padding-top: 1.5rem; border-top: 1px solid rgba(244, 240, 232, 0.08); font-size: 0.78rem; }
