/* ===== Variables y reset básico ===== */
:root {
  --bg: #1e293b;
  --text: #f1f5f9;
  --muted: #cbd5e1;
  --accent: #38bdf8;
  --accent-text: #0b1220;
  --border: rgba(241, 245, 249, 0.35);
  --container-w: 44rem;
  --header-h: 3.5rem;
  --radius: 0.75rem;
  --gap: 1rem;
  --btn-padding-y: 0.9rem;
  --btn-padding-x: 1rem;
  --focus-ring: 2px dashed var(--accent);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: var(--header-h);
}

/* Reduce animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Utilidades ===== */
.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 1rem;
}

/* ===== Header fijo ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 10;
}

.brand {
  display: inline-block;
  font-size: clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

/* ===== Header con navegación ===== */
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  text-decoration: underline;
  outline: none;
}
/* activo en navegación */
.nav-link.active {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  text-decoration: none;
}

/* Botón "Consultar ahora" en header */
.site-nav .btn--sm.btn--primary {
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid var(--accent);
}
@media (hover: hover) and (pointer: fine) {
  .site-nav .btn--sm.btn--primary:hover {
    background: #5dd4ff;
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
  }
}

/* ===== Hero ===== */
.hero {
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: center;
}

.hero__inner {
  width: 100%;
  display: grid;
  gap: 1.125rem;
  justify-items: center;
  text-align: center;
  padding-block: 1.5rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(1.6rem, 1.2rem + 2.2vw, 2.25rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

.hero__subtitle {
  margin: 0;
  max-width: 36rem;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
  color: var(--muted);
}

/* ===== Botones ===== */
.actions {
  /* móvil: columna centrada */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  min-height: 2.75rem;
  transition: transform 160ms ease, box-shadow 160ms ease,
    background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

/* escritorio: fila centrada y botones con ancho auto */
@media (min-width: 48rem) {
  .actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .actions .btn {
    width: auto;
    min-width: 180px;
  }
}

/* Botón primario */
.btn--primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5);
}
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.28);
  }
  .btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.22);
  }
}

/* Botón secundario */
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
@media (hover: hover) and (pointer: fine) {
  .btn--outline:hover {
    border-color: rgba(241, 245, 249, 0.5);
    transform: translateY(-1px);
  }
  .btn--outline:active { transform: translateY(0); }
}

/* Botón ghost */
.btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
@media (hover: hover) and (pointer: fine) {
  .btn--ghost:hover {
    color: var(--text);
    border-color: rgba(241, 245, 249, 0.5);
    transform: translateY(-1px);
  }
  .btn--ghost:active { transform: translateY(0); }
}

/* Botón pequeño */
.btn--sm { padding: 0.55rem 0.75rem; font-size: 0.95rem; min-height: 2.2rem; }

/* ===== Disclaimer ===== */
.disclaimer {
  margin: 0.25rem 0 0;
  max-width: 38rem;
  font-size: clamp(0.84rem, 0.8rem + 0.2vw, 0.9rem);
  color: var(--muted);
}

.disclaimer {
  margin-top: 2rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #cbd5e1;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.disclaimer p { margin: 0.5rem 0; }

@media (max-width: 480px) {
  .disclaimer { font-size: 0.8rem; }
}

/* ===== Logo ===== */
.logo-container {
  text-align: center;
  margin-bottom: 1.5rem;
}
.site-logo {
  max-width: clamp(120px, 18vw, 180px);
  height: auto;
}

/* ===== Sección genérica ===== */
.section { padding: 64px 0; }
.section__header { text-align: center; margin-bottom: 32px; }
.section__title { font-size: 28px; line-height: 1.2; margin: 0 0 8px; color: #f1f5f9; }
.section__subtitle { color: #cbd5e1; margin: 0 auto 16px; max-width: 700px; }
.section__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.section__actions--end { margin-top: 32px; }

/* ===== Grid de tarjetas ===== */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 16px;
  color: #e2e8f0;
}
.card__title { font-size: 18px; margin: 0 0 4px; color: #f1f5f9; }
.card__desc { margin: 0 0 8px; color: #cbd5e1; }

.card__details summary.card__toggle {
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 8px 0;
  color: #38bdf8;
  font-weight: 600;
}
.card__details summary::-webkit-details-marker { display: none; }
.card__details summary.card__toggle::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.9em;
  transition: transform 160ms ease;
}
.card__details[open] summary.card__toggle::after { transform: rotate(180deg); }

.prompt-list {
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.prompt-list li {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
}
.prompt-list span { display: block; font-size: 14px; line-height: 1.4; color: #e2e8f0; }

.copy {
  font-size: 12px;
  border: 1px solid #38bdf8;
  background: transparent;
  color: #38bdf8;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.copy:focus { outline: 2px solid #38bdf8; outline-offset: 2px; }

.steps { margin: 12px 0 0 20px; color: #e2e8f0; }
.steps li { margin: 6px 0; }

.notice {
  margin-top: 24px;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed #475569;
  background: rgba(2, 6, 23, 0.4);
  color: #cbd5e1;
}
.notice .link { color: #38bdf8; text-decoration: underline; }

/* ===== Scroll anclas ===== */
#usos { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ===== Página genérica y formulario de contacto ===== */
.page {
  min-height: calc(100dvh - var(--header-h));
  display: grid;
  place-items: start center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.page__inner {
  width: 100%;
  max-width: 720px;
  padding: 24px 16px;
}
.page h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.1rem);
  line-height: 1.2;
}
.muted { color: var(--muted); margin-bottom: 12px; }

/* Form */
.contact-form {
  display: grid;
  gap: 16px;
  background: rgba(15, 23, 42, 0.6);
  padding: 20px;
  border: 1px solid #334155;
  border-radius: 16px;
}

.form-row {
  display: grid;
  gap: 8px;
}
.form-row label {
  font-weight: 600;
  color: #e2e8f0;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.6);
  color: #f1f5f9;
  outline: none;
  font: inherit;
  resize: vertical;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #94a3b8;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.hidden {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Botones dentro del form */
.contact-form .btn--primary {
  width: 100%;
}
.contact-form .btn--ghost {
  width: 100%;
  margin-top: 8px;
}

/* Mejoras pequeñas en pantallas grandes */
@media (min-width: 44rem) {
  .contact-form {
    padding: 24px;
  }
}

/* ===== Usos (layout con details/copiar) ===== */
#usos.section { padding-block: calc(var(--header-h) + 1.25rem) 3.5rem; }
#usos .section__header { text-align: center; margin-bottom: 1.5rem; }
#usos .section__title { margin: 0 0 .35rem 0; font-size: clamp(1.6rem, 2.5vw, 2rem); font-weight: 700; }
#usos .section__subtitle { margin: 0 auto 1rem; color: var(--muted); max-width: 46rem; }
#usos .section__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
#usos .section__actions--end { justify-content: center; margin-top: 1.25rem; }

/* Grilla tarjetas */
#usos .cards {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  margin-top: 1rem;
}
#usos .card {
  grid-column: span 6;
  background: rgba(15,23,42,.35);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
#usos .card__title { margin: 0 0 .15rem; font-size: 1.05rem; font-weight: 700; }
#usos .card__desc { margin: 0 0 .5rem; color: var(--muted); }

/* details */
#usos .card__details { border-top: 1px dashed var(--border); padding-top: .6rem; }
#usos .card__toggle { cursor: pointer; color: var(--text); font-weight: 600; }
#usos .prompt-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .5rem; }
#usos .prompt-list li { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .5rem; }
#usos .prompt-list .copy {
  appearance: none; border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: .35rem .6rem; border-radius: .5rem; cursor: pointer; font-size: .9rem;
}
#usos .prompt-list span { color: var(--muted); }

/* pasos */
#usos .steps { margin: .6rem 0 0 1.25rem; color: var(--muted); }

/* aviso */
#usos .notice {
  margin-top: 1.25rem; padding: 1rem 1.1rem;
  background: rgba(15,23,42,.35); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--muted);
}
#usos .notice .link { color: var(--accent); text-decoration: underline; }

/* responsive */
@media (max-width: 900px) {
  #usos .card { grid-column: span 12; }
  #usos.section { padding-block: calc(var(--header-h) + 1rem) 3rem; }
}

