/* ==========================================================================
   Pasteur — hoja de estilos principal
   Sin dependencias externas. Soporta modo claro y oscuro.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Tokens */

:root {
  --bg: #fbfaf8;
  --bg-2: #f3f1ec;
  --surface: #ffffff;
  --ink: #14181d;
  --ink-2: #4d555c;
  --ink-3: #7b838a;
  --line: #e4e0d9;
  --line-strong: #d2cdc3;
  --accent: #0e6b57;
  --accent-hover: #0a5546;
  --accent-soft: #e8f1ee;
  --accent-ink: #ffffff;
  --wa: #25d366;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 29, 0.05);
  --shadow: 0 6px 24px -8px rgba(20, 24, 29, 0.14);

  --max: 1120px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f12;
    --bg-2: #12161a;
    --surface: #15191e;
    --ink: #edeae4;
    --ink-2: #a4abb1;
    --ink-3: #7d858c;
    --line: #262b31;
    --line-strong: #333a41;
    --accent: #4fbf9f;
    --accent-hover: #6bd0b3;
    --accent-soft: #122520;
    --accent-ink: #06120f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 6px 24px -8px rgba(0, 0, 0, 0.6);
  }
}

/* ---------------------------------------------------------- 2. Reiniciado */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------- 3. Tipografía */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.021em;
  line-height: 1.14;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.15rem, 5.4vw, 3.7rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.4rem);
}

h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  letter-spacing: -0.012em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.lead {
  font-size: clamp(1.05rem, 1.9vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.muted {
  color: var(--ink-2);
}

.small {
  font-size: 0.875rem;
  line-height: 1.6;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ----------------------------------------------------------- 4. Utilidad */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  max-width: 44rem;
}

.section {
  padding-block: var(--section-y);
}

.section--tint {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 40rem;
  margin-bottom: clamp(2.25rem, 4vw, 3.25rem);
}

.section__head p {
  margin-top: 0.9rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------ 5. Botones */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    transform 0.16s ease, color 0.16s ease;
}

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

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink-3);
  background: var(--surface);
}

.btn--wa {
  background: var(--wa);
  color: #06231a;
}

.btn--wa:hover {
  background: #1fbb5a;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}

.textlink:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------------------------------------------- 6. Encabezado / nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand__mark {
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav a:hover {
  color: var(--ink);
  background: var(--bg-2);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

.nav-toggle__close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .header-cta .btn {
    display: none;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav[hidden] {
    display: none;
  }

  .nav a {
    padding: 0.7rem 0.5rem;
    font-size: 1rem;
  }

  .nav .btn {
    margin-top: 0.5rem;
  }
}

@media (min-width: 821px) {
  .nav[hidden] {
    display: flex;
  }

  .nav .btn {
    display: none;
  }
}

/* ---------------------------------------------------------------- 7. Hero */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at 1px 1px,
      var(--line-strong) 1px,
      transparent 0
    );
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 75% 62% at 68% 12%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(
    ellipse 75% 62% at 68% 12%,
    #000 0%,
    transparent 72%
  );
  opacity: 0.75;
  pointer-events: none;
}

.hero > .wrap {
  position: relative;
}

.hero__inner {
  max-width: 46rem;
}

.hero h1 + p {
  margin-top: 1.25rem;
  max-width: 36rem;
}

.hero__note {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* ------------------------------------------------------------- 8. Tarjetas */

.grid {
  display: grid;
  gap: 1rem;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  padding: clamp(1.4rem, 2.4vw, 1.85rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin-bottom: 0.55rem;
}

.card p {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.1rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius);
}

.card__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.card ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.card ul li {
  position: relative;
  padding-left: 1.35rem;
}

.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}

/* ------------------------------------------------------- 9. Proceso / pasos */

.steps {
  display: grid;
  gap: 0;
  counter-reset: step;
  border-top: 1px solid var(--line);
}

.step {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 1.5rem;
  align-items: start;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.step__n {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding-top: 0.3rem;
}

.step__body p {
  margin-top: 0.45rem;
  color: var(--ink-2);
  max-width: 44rem;
  font-size: 0.9375rem;
}

.step__meta {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-3);
}

@media (max-width: 560px) {
  .step {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .step__n {
    padding-top: 0;
  }
}

/* ------------------------------------------------------ 10. Franja neutral */

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 1.25rem 0 0;
}

.chip {
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}

/* --------------------------------------------------------------- 11. FAQ */

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.faq details[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.faq details > p {
  padding: 0 0 1.35rem;
  max-width: 46rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* ---------------------------------------------------------- 12. Llamado */

.cta {
  padding: clamp(2.25rem, 5vw, 3.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
}

.cta p {
  margin: 0.85rem auto 0;
  max-width: 34rem;
  color: var(--ink-2);
}

.cta .btn-row {
  justify-content: center;
}

/* ------------------------------------------------------------ 13. Contacto */

.contact-layout {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: start;
}

@media (max-width: 880px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.form__row {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr 1fr;
  /* Evita que un campo se estire cuando su vecino tiene texto de ayuda. */
  align-items: start;
}

@media (max-width: 560px) {
  .form__row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field > label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.field .req {
  color: var(--accent);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) 1.2rem, calc(100% - 0.75rem) 1.2rem;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #c0392b;
}

.field__hint {
  font-size: 0.75rem;
  color: var(--ink-3);
}

.form__consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.8125rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.form__consent input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
}

.form__consent a {
  color: var(--accent);
  font-weight: 600;
}

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

.form__status {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.55;
  border: 1px solid;
}

.form__status[hidden] {
  display: none;
}

.form__status--ok {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

.form__status--err {
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.5);
  color: var(--ink);
}

.contact-aside {
  display: grid;
  gap: 1rem;
}

.contact-item {
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.contact-item h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.4rem;
}

.contact-item a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
}

.contact-item a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-item p {
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* ---------------------------------------------------- 14. Texto largo (legal) */

.prose {
  max-width: 46rem;
}

.prose h2 {
  margin-top: 2.75rem;
  font-size: 1.4rem;
}

.prose h3 {
  margin-top: 1.85rem;
}

.prose h2 + p,
.prose h3 + p {
  margin-top: 0.7rem;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 1rem;
  color: var(--ink-2);
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.prose li {
  padding-left: 0.2rem;
}

.prose a {
  color: var(--accent);
  font-weight: 500;
}

.prose__meta {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--ink-3);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------- 15. Pie */

.site-footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 2.25rem;
  grid-template-columns: minmax(0, 1.5fr) repeat(auto-fit, minmax(9rem, 1fr));
}

.footer-col h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.9rem;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.footer-col a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-col p {
  color: var(--ink-2);
  max-width: 24rem;
  margin-top: 0.9rem;
  font-size: 0.9375rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--ink-3);
}

/* ------------------------------------------------- 16. Botón de WhatsApp */

.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.15rem;
  background: var(--wa);
  color: #06231a;
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.wa-float:hover {
  background: #1fbb5a;
  transform: translateY(-2px);
}

.wa-float svg {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .wa-float {
    padding: 0.9rem;
  }
  .wa-float span {
    display: none;
  }
}
