/* ============================================================
   components.css — Componentes reutilizables
   Nav, botones (pill + glass), modal, formularios, tag, cards
   Descentralizados
   ============================================================ */


/* ── TAG / LABEL ─────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  padding: var(--space-1) 0;
  color: var(--color-accent);
}

.tag--light {
  color: var(--color-black);
  opacity: 0.5;
}


/* ══ NAV ═════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: rgba(25, 24, 26, 0.75);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--color-white-10);
  transition: box-shadow var(--duration-base) var(--ease-out);
}

.nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Shadow added on scroll */
.nav.is-scrolled {
  box-shadow: 0 1px 32px rgba(0,0,0,0.25);
}

/* Logo */
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 28px; width: auto; }

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-white-60);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width var(--duration-base) var(--ease-out);
}

.nav-link:hover { color: var(--color-white); }
.nav-link:hover::after { width: 100%; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background-color: var(--color-white);
  transition:
    transform var(--duration-base) var(--ease-out),
    opacity   var(--duration-fast) var(--ease-out);
  transform-origin: center;
}

.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background-color: rgba(25, 24, 26, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-white-10);
  padding: var(--space-6) var(--container-pad);
  flex-direction: column;
  gap: var(--space-5);
  z-index: 99;
}

.nav-mobile.is-open { display: flex; }
.nav-mobile .nav-link { font-size: 0.875rem; padding-block: var(--space-2); }
.nav-mobile .btn { align-self: flex-start; margin-top: var(--space-2); }


/* ══ BOTONES — pill shape + glass hover ══════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  border-radius: 100px;       /* pill */
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color  var(--duration-base) var(--ease-out),
    color             var(--duration-base) var(--ease-out),
    border-color      var(--duration-base) var(--ease-out),
    backdrop-filter   var(--duration-base) var(--ease-out),
    transform         var(--duration-fast) var(--ease-out),
    box-shadow        var(--duration-base) var(--ease-out);
}

.btn:active { transform: translateY(1px); }

/* Primario — glass por defecto, blanco al hover */
.btn-primary {
  background-color: rgba(247, 110, 71, 0.12);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  box-shadow: 0 0 0 1px rgba(247,110,71,0.15);
}

.btn-primary:hover {
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--color-white);
  border-color: var(--color-white);
  box-shadow: none;
}

/* Outline blanco — sobre fondo oscuro */
.btn-outline {
  background-color: transparent;
  color: var(--color-white);
  border: 1.5px solid var(--color-white-30);
}

.btn-outline:hover {
  background-color: rgba(231, 231, 231, 0.08);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-color: var(--color-white-60);
  box-shadow: 0 0 0 1px rgba(231,231,231,0.12), 0 4px 20px rgba(0,0,0,0.20);
}

/* Outline oscuro — sobre fondo claro */
.btn-outline-dark {
  background-color: transparent;
  color: var(--color-black);
  border: 1.5px solid rgba(25, 24, 26, 0.25);
}

.btn-outline-dark:hover {
  background-color: rgba(25, 24, 26, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(25, 24, 26, 0.5);
}

/* Full width / Grande */
.btn-full { width: 100%; }
.btn-lg   { padding: var(--space-4) var(--space-8); font-size: var(--text-small); }


/* ══ BOTÓN CON ESQUINAS MARCADAS ════════════════════════════
   Sin borde completo — solo las 4 esquinas dibujadas con
   gradientes lineales sobre el fondo transparente.
   ─────────────────────────────────────────────────────────── */
.btn-corners {
  --cs: 11px;     /* tamaño de esquina */
  --cw: 1.5px;    /* grosor de línea   */

  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-black);
  cursor: pointer;
  background-color: transparent;
  border: none;
  border-radius: 0;
  text-decoration: none;
  transition:
    color    var(--duration-base) var(--ease-out),
    opacity  var(--duration-base) var(--ease-out);

  /* 8 gradientes = 4 esquinas × 2 trazos (horizontal + vertical) */
  background-image:
    linear-gradient(currentColor, currentColor),  /* ↑ top-left    H */
    linear-gradient(currentColor, currentColor),  /* ← top-left    V */
    linear-gradient(currentColor, currentColor),  /* ↑ top-right   H */
    linear-gradient(currentColor, currentColor),  /* → top-right   V */
    linear-gradient(currentColor, currentColor),  /* ↓ bottom-left H */
    linear-gradient(currentColor, currentColor),  /* ← bottom-left V */
    linear-gradient(currentColor, currentColor),  /* ↓ bottom-right H */
    linear-gradient(currentColor, currentColor);  /* → bottom-right V */

  background-size:
    var(--cs) var(--cw),  /* top-left    H */
    var(--cw) var(--cs),  /* top-left    V */
    var(--cs) var(--cw),  /* top-right   H */
    var(--cw) var(--cs),  /* top-right   V */
    var(--cs) var(--cw),  /* bottom-left H */
    var(--cw) var(--cs),  /* bottom-left V */
    var(--cs) var(--cw),  /* bottom-right H */
    var(--cw) var(--cs);  /* bottom-right V */

  background-position:
    top left,    top left,
    top right,   top right,
    bottom left, bottom left,
    bottom right, bottom right;

  background-repeat: no-repeat;
}

.btn-corners:hover {
  color: var(--color-accent);
  opacity: 0.85;
}

/* Variante sobre fondo oscuro */
.btn-corners--light {
  color: var(--color-white);
}


/* ══ MODAL ════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(25, 24, 26, 0.80);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity    var(--duration-base) var(--ease-out),
    visibility var(--duration-base) var(--ease-out);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  background-color: rgba(25, 24, 26, 0.92);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--color-white-10);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.98);
  transition: transform var(--duration-base) var(--ease-out);
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white-60);
  border-radius: 100px;
  transition:
    color            var(--duration-fast),
    background-color var(--duration-fast);
}

.modal-close:hover {
  color: var(--color-white);
  background-color: var(--color-white-10);
}

.modal-header {
  margin-bottom: var(--space-8);
}

.modal-header .tag { margin-bottom: var(--space-4); }

.modal-header h3 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: var(--weight-bold);
  color: var(--color-white);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.modal-header p {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  color: var(--color-white-60);
  line-height: var(--leading-normal);
}

/* Formulario */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-white-60);
}

.form-group input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-white-10);
  border: 1px solid var(--color-white-10);
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  transition:
    border-color     var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.form-group input::placeholder { color: var(--color-white-30); }

.form-group input:focus {
  border-color: var(--color-accent);
  background-color: rgba(247, 110, 71, 0.05);
}

/* Éxito */
.modal-success {
  text-align: center;
  padding-block: var(--space-8);
}

.modal-success .success-icon {
  margin-bottom: var(--space-4);
  display: flex;
  justify-content: center;
}

.modal-success p {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  color: var(--color-white);
  line-height: var(--leading-normal);
}

.modal-success .tag {
  display: block;
  margin-bottom: var(--space-4);
}


/* ══ CARD ════════════════════════════════════════════════════ */
.card {
  padding: var(--space-8);
  border: 1px solid var(--color-white-10);
  border-radius: var(--radius-lg);
  transition:
    border-color var(--duration-base) var(--ease-out),
    transform    var(--duration-base) var(--ease-out),
    box-shadow   var(--duration-base) var(--ease-out);
}

.card:hover {
  border-color: var(--color-white-30);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card--disabled { opacity: 0.35; pointer-events: none; }
.card--dark  { background-color: var(--color-black); color: var(--color-white); }
.card--light { background-color: #fff; border-color: rgba(25,24,26,0.10); color: var(--color-black); }


/* ── Manifiesto modal (variante clara) ──────────────────────── */
.modal--manifiesto {
  background-color: var(--color-white);
  border-color: rgba(25, 24, 26, 0.10);
  max-width: 760px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.18);
}

.modal--manifiesto .modal-close {
  color: rgba(25, 24, 26, 0.35);
}

.modal--manifiesto .modal-close:hover {
  color: var(--color-black);
  background-color: rgba(25, 24, 26, 0.06);
}

.manifiesto-modal__icon {
  display: flex;
  justify-content: center;
  padding-top: var(--space-2);
  margin-bottom: var(--space-6);
  flex-shrink: 0;
}

.manifiesto-modal__body {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #f76e47 transparent;
  padding: 15px;
}

.manifiesto-modal__body::-webkit-scrollbar {
  width: 4px;
}

.manifiesto-modal__body::-webkit-scrollbar-track {
  background: transparent;
}

.manifiesto-modal__body::-webkit-scrollbar-thumb {
  background-color: #f76e47;
  border-radius: 4px;
}

.manifiesto-modal__title {
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: var(--weight-bold);
  color: var(--color-black);
  line-height: var(--leading-tight);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  padding-bottom: var(--space-5);
  margin-bottom: var(--space-6);
  border-bottom: 1.5px solid rgba(25, 24, 26, 0.12);
}

.manifiesto-modal__title::after { display: none; }

.manifiesto-modal__body p {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: rgba(25, 24, 26, 0.7);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-5);
}

.manifiesto-modal__body .manifesto-meta {
  margin-top: var(--space-4);
  margin-bottom: 0;
}
