/* REDIMED · Propuesta C — Website institucional
   Sistema de marca compartido. Los colores oficiales viven aquí y en tailwind.config. */

:root {
  --navy: #011d3c;
  --teal: #02666a;
  --orange: #e8510a;
  --sage: #4e6863;
  --gold: #c4a708;
  --plum: #1e0228;
  --paper: #f7f9fa;
  --line: rgba(78, 104, 99, 0.16);
}

* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; color-scheme: only light; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--paper);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.02em;
}

::selection { background: var(--teal); color: #fff; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: #fff;
  color: var(--navy);
  padding: 0.75rem 1rem;
  border-radius: 0 0 0.5rem 0;
  font-weight: 600;
}
.skip:focus { left: 0; }

/* ——— Botones ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.95rem 1.45rem;
  border-radius: 9999px;
  transition: transform 0.25s ease, background-color 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}
.btn-sm { padding: 0.62rem 1rem; font-size: 0.78rem; }
.btn-orange {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 14px 28px -16px rgba(232, 81, 10, 0.95);
}
.btn-orange:hover { background: #c94305; transform: translateY(-1px); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: #014f52; }
.btn-outline {
  border: 1.5px solid rgba(78, 104, 99, 0.35);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover { border-color: var(--navy); background: #fff; }
.btn-light {
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  color: #fff;
}
.btn-light:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.6); }
.btn-ghost { color: var(--sage); }
.btn-ghost:hover { color: var(--navy); background: rgba(2, 102, 106, 0.06); }

.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}

/* ——— Logo ——— */
.logo-h { display: block; width: auto; height: 44px; }
.logo-footer { display: block; width: 208px; height: auto; }

/* ——— Superficies ——— */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.card-hover {
  transition: transform 0.35s cubic-bezier(0.22, 0.7, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.22, 0.7, 0.2, 1), border-color 0.35s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 55px -34px rgba(1, 29, 60, 0.5);
  border-color: rgba(2, 102, 106, 0.3);
}
.product-media {
  background:
    radial-gradient(120% 120% at 50% 0%, #ffffff 0%, #f0f5f4 58%, #e6eceb 100%);
}

/* ——— Puertas del inicio ——— */
.door {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 0.7, 0.2, 1),
    border-color 0.35s ease, box-shadow 0.35s ease;
}
.door::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 0.7, 0.2, 1);
}
.door:hover {
  transform: translateY(-4px);
  border-color: rgba(2, 102, 106, 0.35);
  box-shadow: 0 30px 60px -40px rgba(1, 29, 60, 0.5);
}
.door:hover::after { transform: scaleX(1); }
.door-arrow { transition: transform 0.3s ease; }
.door:hover .door-arrow { transform: translateX(4px); }

/* ——— Banda del asistente (solo visible si assistant.js está activo) ——— */
.assistant-band {
  display: none;
  position: relative;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 1.5rem;
  padding: 2.3rem 2.4rem;
  border-radius: 24px;
  background:
    linear-gradient(118deg, #011d3c 0%, #022a4d 52%, #024a4e 100%);
  color: #fff;
  overflow: hidden;
}
.ra-ready .assistant-band { display: grid; }
.assistant-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.35;
  pointer-events: none;
}
.assistant-band-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.assistant-band-art img {
  position: relative;
  z-index: 2;
  width: 166px;
  height: 166px;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.38));
}
.ab-glow {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(196, 167, 8, 0.22), rgba(2, 102, 106, 0.12) 55%, transparent 72%);
}
.ab-bubble {
  position: absolute;
  z-index: 3;
  max-width: 172px;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  font-size: 0.7rem;
  line-height: 1.4;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.5);
}
.ab-bubble--in { left: -6px; top: 8px; border-bottom-left-radius: 4px; }
.ab-bubble--out {
  right: -4px;
  bottom: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  border-bottom-right-radius: 4px;
}

@media (max-width: 860px) {
  .assistant-band { grid-template-columns: 1fr; padding: 1.8rem 1.5rem; }
  .assistant-band-art { min-height: 0; margin-top: 0.5rem; }
  .assistant-band-art img { width: 104px; height: 104px; }
  .ab-glow { width: 170px; height: 170px; }
  .ab-bubble { display: none; }
}

/* ——— Categorías base ——— */
.cat-card {
  position: relative;
  display: flex;
  gap: 1.1rem;
  padding: 1.6rem 1.6rem 1.45rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 0.7, 0.2, 1),
    box-shadow 0.35s ease, border-color 0.35s ease;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.22, 0.7, 0.2, 1);
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(2, 102, 106, 0.32);
  box-shadow: 0 30px 60px -40px rgba(1, 29, 60, 0.55);
}
.cat-card:hover::before { transform: scaleX(1); }
.cat-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 102, 106, 0.09);
  color: var(--teal);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.cat-card:hover .cat-icon { background: var(--teal); color: #fff; }
.cat-title {
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.cat-desc {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--sage);
  max-width: 46ch;
}
.cat-subs {
  margin-top: 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--teal);
}
.cat-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.95rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
}
.cat-more svg { transition: transform 0.3s ease; }
.cat-card:hover .cat-more svg { transform: translateX(4px); }

.cat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.42rem 0.95rem;
  border-radius: 9999px;
  border: 1px solid rgba(78, 104, 99, 0.24);
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  transition: border-color 0.25s ease, color 0.25s ease,
    background-color 0.25s ease, transform 0.25s ease;
}
.cat-chip:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(2, 102, 106, 0.05);
  transform: translateY(-1px);
}

/* ——— Motivos de red ——— */
.net-grid {
  background-image: radial-gradient(rgba(2, 102, 106, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
}
.net-lines {
  background-image:
    linear-gradient(115deg, transparent 0 46%, rgba(2, 102, 106, 0.12) 46% 46.4%, transparent 46.4%),
    linear-gradient(65deg, transparent 0 62%, rgba(196, 167, 8, 0.16) 62% 62.4%, transparent 62.4%);
  background-size: 190px 190px, 240px 240px;
}
.orb {
  position: absolute;
  border-radius: 9999px;
  background: var(--teal);
  filter: blur(0.5px);
}

/* ——— Aparición orquestada ——— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s cubic-bezier(0.22, 0.7, 0.2, 1) forwards;
}
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.14s; }
.reveal-3 { animation-delay: 0.23s; }
.reveal-4 { animation-delay: 0.32s; }
.reveal-5 { animation-delay: 0.41s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.pres-btn {
  border: 1.5px solid rgba(78, 104, 99, 0.25);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sage);
  background: #fff;
  transition: all 0.2s ease;
}
.pres-btn:hover { border-color: var(--teal); color: var(--navy); }
.pres-btn.is-active {
  border-color: var(--teal);
  background: rgba(2, 102, 106, 0.07);
  color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.select {
  appearance: none;
  background: #fff;
  border: 1px solid rgba(78, 104, 99, 0.24);
  border-radius: 8px;
  padding: 0.6rem 2rem 0.6rem 0.8rem;
  font-size: 0.8rem;
  color: var(--navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%234E6863' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

/* ——— Tabs de ficha ——— */
.tab-btn {
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.85rem 0.15rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sage);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn[aria-selected="true"] {
  color: var(--navy);
  border-bottom-color: var(--teal);
}
.tab-panel[hidden] { display: none; }

/* ——— Formularios ——— */
.input {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(78, 104, 99, 0.25);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  color: var(--navy);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder { color: rgba(78, 104, 99, 0.7); }
.input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(2, 102, 106, 0.14);
}

.check {
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  border: 1.5px solid rgba(78, 104, 99, 0.4);
  accent-color: var(--teal);
}

/* ——— Aviso / toast ——— */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 20px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: min(92vw, 420px);
  padding: 0.85rem 1.1rem;
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 50px -20px rgba(1, 29, 60, 0.7);
  font-size: 0.84rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }

/* ——— Scrollbar ——— */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #eef2f2; }
::-webkit-scrollbar-thumb { background: #8fa5a1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--sage); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border-radius: 9999px;
  background: rgba(2, 102, 106, 0.08);
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 600;
}

/* ——— Utilidades ——— */
[v-cloak] { display: none !important; }
.badge-stock { background: rgba(2, 102, 106, 0.10); color: #02666A; }
.badge-low { background: rgba(196, 167, 8, 0.16); color: #7a6503; }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

@media (max-width: 640px) {
  .tab-btn { font-size: 0.72rem; }
}

@media (max-width: 420px) {
  .logo-h { height: 34px; }
}

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

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}
