﻿/* ============================================================================
   Admiser — landing
   Design tokens first, then layout primitives, then components.
   Dark mode is a token swap on [data-theme="dark"]; nothing below hardcodes a
   theme colour outside the :root blocks.
   ========================================================================== */

:root {
  /* palette — light */
  --page:            #F3F5F8;
  --surface:         #FFFFFF;
  --navy:            #12294A;   /* dark sections + primary button */
  --heading:         #12294A;
  --ink:             #22293A;
  --muted:           #4B5468;
  --on-navy:         #F3F5F8;
  --on-navy-muted:   #B7C4D9;
  --gold:            #C79A3C;   /* gold button fill */
  --gold-ink:        #1A1508;   /* text on gold */
  --gold-text:       #B0842F;   /* gold as text/accent on light */
  --line-rgb:        18, 41, 74;
  --header-bg:       rgba(243, 245, 248, 0.92);

  /* rhythm */
  --gutter:     clamp(18px, 4.6vw, 26px);
  --section-y:  clamp(54px, 8vw, 80px);
  --radius:     6px;
  --radius-lg:  10px;

  /* set by main.js from the real header height; the fallback keeps anchors
     usable before the script runs. */
  --header-h: 66px;

  color-scheme: light;
}

[data-theme="dark"] {
  --page:          #0E1F3B;
  --surface:       #16294B;
  --navy:          #1D3A69;
  --heading:       #F3F5F8;
  --ink:           #E7EBF1;
  --muted:         #B7C4D9;
  --gold-text:     #D9AE55;
  --line-rgb:      183, 196, 217;
  --header-bg:     rgba(14, 31, 59, 0.92);

  color-scheme: dark;
}

/* Recolour the navy logo lockup to white in dark mode. Both source images are
   single-colour with alpha, so brightness(0) → silhouette, invert(1) → white. */
[data-theme="dark"] .brand__icon,
[data-theme="dark"] .brand__wordmark { filter: brightness(0) invert(1); }

/* ── reset ──────────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Archivo', Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--page);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* must outrank the display values components set on themselves */
[hidden] { display: none !important; }

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

a { color: var(--heading); text-decoration: none; }
a:hover { color: var(--gold-text); }

button { font: inherit; }

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--navy);
  color: var(--on-navy);
  font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; color: var(--on-navy); }

/* ── layout primitives ──────────────────────────────────────────────────── */

.wrap { max-width: 1160px; margin-inline: auto; }
.wrap--narrow { max-width: 900px; }
.wrap--tight  { max-width: 840px; }

.section {
  padding: var(--section-y) var(--gutter);
  scroll-margin-top: calc(var(--header-h) + 14px);
}
.section--surface { background: var(--surface); }
.section--navy    { background: var(--navy); color: var(--on-navy); }
.section--navy .h2, .section--navy a { color: var(--on-navy); }

.bordered      { border-block: 1px solid rgba(var(--line-rgb), 0.10); }
.bordered-top  { border-top:   1px solid rgba(var(--line-rgb), 0.10); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: clamp(30px, 4.5vw, 44px);
  align-items: start;
}
.split--wide { gap: clamp(32px, 5vw, 48px); grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 36px;
}

/* ── typography ─────────────────────────────────────────────────────────── */

.display {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  text-wrap: pretty;
}

.h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.13;
  letter-spacing: -0.02em;
  color: var(--heading);
  text-wrap: pretty;
}

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 16px;
}
.eyebrow--on-navy { color: var(--on-navy-muted); margin-bottom: 26px; }

/* The hero kicker names the line of business, so it carries more weight than
   the section kickers further down. */
.hero .eyebrow {
  font-size: clamp(13px, 1.55vw, 16.5px);
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--on-navy);
  margin-bottom: 30px;
  text-wrap: balance;
}

.section__lead {
  font-size: 17px;
  line-height: 1.62;
  color: var(--muted);
  max-width: 60ch;
  margin-top: 12px;
  text-wrap: pretty;
}
.h2 + .section__lead { margin-top: 14px; }

.section__aside {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 38ch;
  text-wrap: pretty;
}

.note { font-size: 14.5px; color: var(--muted); }

/* ── buttons ────────────────────────────────────────────────────────────── */

.button {
  display: inline-block;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.button--sm    { padding: 10px 18px; font-size: 14.5px; white-space: nowrap; }
.button--block { width: 100%; padding-inline: 20px; }

.button--primary { background: var(--navy); color: var(--on-navy); }
/* Al pasar el mouse el botón se invierte: fondo claro y letra azul. El borde
   lo mantiene definido en modo claro, donde el fondo de página es casi igual.
   OJO: nunca usar --heading como fondo; es un token de texto y en modo oscuro
   vale casi blanco, lo que dejaba letra blanca sobre fondo blanco. */
.button--primary:hover {
  background: var(--on-navy);
  color: var(--navy);
  border-color: var(--navy);
}

.button--icon { display: inline-flex; align-items: center; gap: 10px; }
.button__icon { flex: none; }

.button--gold { background: var(--gold); color: var(--gold-ink); }
.button--gold:hover { background: var(--gold-text); color: var(--gold-ink); }

.button--outline { border-color: var(--heading); color: var(--heading); font-size: 15.5px; padding: 14px 24px; }
.button--outline:hover { background: var(--navy); color: var(--on-navy); }

.button--ghost-light { border-color: rgba(183, 196, 217, 0.45); color: var(--on-navy); font-weight: 500; }
.button--ghost-light:hover { border-color: var(--gold); color: var(--on-navy); }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.button-row--aligned { gap: 14px; align-items: center; margin-top: 32px; }

/* ── header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--gutter);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(var(--line-rgb), 0.12);
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand__icon     { height: 34px; width: auto; }
.brand__wordmark { height: 17px; width: auto; }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  min-width: 0;
  font-size: 14.5px;
  color: var(--muted);
}
.nav__link {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 14.5px;
  cursor: pointer;
}
.nav__link:hover { color: var(--gold-text); }

/* only surfaces inside the mobile panel, where the header CTA is hidden */
.nav__link--cta { display: none; }

.nav-group { position: relative; display: flex; align-items: center; }
.nav-group__button { display: flex; align-items: center; gap: 6px; }
.nav-group__caret { font-size: 10px; line-height: 1; transition: transform .16s ease; }
.nav-group__button[aria-expanded="true"] .nav-group__caret { transform: rotate(180deg); }

.nav-group__panel {
  position: absolute;
  top: 28px;
  left: -14px;
  z-index: 60;
  display: grid;
  min-width: 232px;
  background: var(--surface);
  border: 1px solid rgba(var(--line-rgb), 0.16);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 41, 74, 0.14);
  overflow: hidden;
}
.nav-group__panel a { padding: 12px 16px; font-size: 14.5px; color: var(--ink); }
.nav-group__panel a + a { border-top: 1px solid rgba(var(--line-rgb), 0.10); }
.nav-group__panel a:hover { background: var(--page); color: var(--gold-text); }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(var(--line-rgb), 0.22);
  border-radius: 8px;
  background: var(--surface);
  color: var(--heading);
  cursor: pointer;
  transition: border-color .16s ease;
}
.icon-button:hover { border-color: var(--gold); }

/* one theme icon at a time: sun offers "go light", moon offers "go dark" */
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.nav-toggle { display: none; }
.icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-burger { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close  { display: block; }

/* ── hero ───────────────────────────────────────────────────────────────── */

.hero { padding-top: clamp(56px, 9vw, 84px); padding-bottom: 0; }

.hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(32px, 5vw, 48px);
  align-items: end;
}
.hero__copy { min-width: 0; }

.hero__lead {
  font-size: clamp(17px, 1.6vw, 18.5px);
  line-height: 1.6;
  color: var(--on-navy-muted);
  max-width: 54ch;
  margin-bottom: 34px;
  text-wrap: pretty;
}
.hero .button-row { padding-bottom: 48px; }

.stats {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
  gap: 1px;
  margin-bottom: 48px;
}
.stat {
  background: var(--navy);
  box-shadow: 0 0 0 1px rgba(183, 196, 217, 0.28);
  padding: 22px 20px;
}
.stat__value {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--gold);
}
.stat__label { font-size: 13.5px; line-height: 1.4; color: var(--on-navy-muted); margin-top: 8px; }

/* ── problema ───────────────────────────────────────────────────────────── */

.pain-list { display: grid; gap: 26px; }
.pain { border-top: 1px solid rgba(var(--line-rgb), 0.18); padding-top: 16px; }
.pain__title {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--heading);
  margin-bottom: 6px;
}
.pain__text { font-size: 16px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

/* ── abono tiles ────────────────────────────────────────────────────────── */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1px;
  margin-top: 44px;
}
.tile {
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(var(--line-rgb), 0.14);
  padding: 26px 24px;
  min-width: 0;
}
.tile__head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.tile__check { color: var(--gold); font-weight: 700; font-size: 15px; flex: none; }
.tile__title {
  font-weight: 600;
  font-size: 17.5px;
  letter-spacing: -0.01em;
  color: var(--heading);
  text-wrap: pretty;
}
.tile__title--serif { font-family: 'Source Serif 4', Georgia, serif; font-size: 19px; margin-bottom: 8px; }
.tile__text { font-size: 15.5px; line-height: 1.6; color: var(--muted); padding-left: 25px; text-wrap: pretty; }

.tile--navy { background: var(--navy); }
.tile--navy .tile__title { color: var(--on-navy); }
.tile--navy .tile__text { color: var(--on-navy-muted); padding-left: 0; }

/* ── chips (servicios adicionales) ──────────────────────────────────────── */

.chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 14px;
}
.chip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid rgba(var(--line-rgb), 0.12);
  border-radius: 8px;
  padding: 18px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  text-wrap: pretty;
  transition: border-color .16s ease;
}
.chip:hover { border-color: var(--gold); }
.chip__mark { color: var(--gold-text); font-weight: 600; flex: none; }

/* ── numbered cards (servicios para usuarios) ───────────────────────────── */

.numbered-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 14px;
}
.numbered {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--page);
  border: 1px solid rgba(var(--line-rgb), 0.12);
  border-radius: 8px;
  padding: 22px 20px;
  min-width: 0;
  transition: border-color .16s ease;
}
.numbered:hover { border-color: var(--gold); }
.numbered__n { font-size: 12px; letter-spacing: 0.14em; color: var(--gold-text); font-variant-numeric: tabular-nums; }
.numbered__title {
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
  color: var(--heading);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
#personas .button--outline { margin-top: 28px; }

/* Grupos dentro de "Servicios Admiser": separan lo de ARCA (monotributo) de lo
   de AGIP (ABL y Patentes), que son trámites distintos ante organismos
   distintos. */
.services-group + .services-group { margin-top: 44px; }
.group-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: clamp(20px, 2.3vw, 25px);
  letter-spacing: -0.02em;
  color: var(--heading);
  margin-bottom: 16px;
}
.group-lead { font-size: 16px; color: var(--muted); max-width: 62ch; margin-bottom: 18px; }
.services-group .chip-grid { margin-top: 14px; }
.group-note { margin-top: 16px; }

/* ── valor panel ────────────────────────────────────────────────────────── */

#valor .button { margin-top: 26px; }

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid rgba(var(--line-rgb), 0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.panel__head {
  background: var(--page);
  padding: 18px 22px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(var(--line-rgb), 0.14);
}
.panel__row {
  display: flex;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(var(--line-rgb), 0.10);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.panel__row:last-child { border-bottom: 0; }
.panel__n { color: var(--gold-text); flex: none; font-variant-numeric: tabular-nums; }

/* ── compromiso ─────────────────────────────────────────────────────────── */

.pledge { text-align: center; }
.pledge__text {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  font-size: clamp(21px, 2.9vw, 32px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.pledge__text em { color: var(--gold); font-style: normal; }

/* ── faq ────────────────────────────────────────────────────────────────── */

.faq { margin-top: 30px; }
.faq__item { border-top: 1px solid rgba(var(--line-rgb), 0.18); }
.faq__item h3 { font: inherit; }

.faq__q {
  width: 100%;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: 0;
  color: var(--heading);
  text-align: left;
  padding: 22px 0;
  cursor: pointer;
  font-size: clamp(16.5px, 2vw, 17.5px);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.faq__q span:first-child { text-wrap: pretty; }
.faq__q:hover { color: var(--gold-text); }
.faq__sign { font-size: 20px; color: var(--gold-text); flex: none; line-height: 1; }

.faq__a p {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 64ch;
  margin-bottom: 24px;
  text-wrap: pretty;
}

/* ── quiénes somos ──────────────────────────────────────────────────────── */

.about { align-items: center; }

.about__figure { margin: 0; min-width: 0; }
.about__figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--line-rgb), 0.16);
  box-shadow: 0 18px 40px rgba(18, 41, 74, 0.16);
}
.about__figure figcaption {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.about__copy { min-width: 0; }

.about__text {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 58ch;
  text-wrap: pretty;
}
.h2 + .about__text { margin-top: 16px; }
.about__text + .about__text { margin-top: 18px; }

/* Echoes the serif pledge section, so the closing line reads as a statement
   rather than as one more paragraph. */
.about__close {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(var(--line-rgb), 0.18);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--heading);
  max-width: 46ch;
  text-wrap: pretty;
}
.about__close em { color: var(--gold-text); font-style: normal; }

/* ── nosotros (equipo) ──────────────────────────────────────────────────── */

.team {
  margin-top: clamp(40px, 6vw, 58px);
  padding-top: clamp(30px, 4vw, 40px);
  border-top: 1px solid rgba(var(--line-rgb), 0.16);
}

.team__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.02em;
  color: var(--heading);
  margin-bottom: 24px;
}

.team__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px;
}

.member {
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 0;
  background: var(--surface);
  border: 1px solid rgba(var(--line-rgb), 0.12);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  transition: border-color .16s ease;
}
.member:hover { border-color: var(--gold); }

/* The figures are stroked with currentColor, so the token swap recolours them
   for dark mode with no second set of assets. */
.member__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--page);
  color: var(--heading);
}
.member__avatar svg { width: 44px; height: 44px; display: block; }

.member__info { min-width: 0; }
.member__name {
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--heading);
  text-wrap: pretty;
}
.member__role { font-size: 15.5px; line-height: 1.4; color: var(--muted); margin-top: 4px; }
.member__org  { font-size: 13.5px; line-height: 1.4; color: var(--gold-text); margin-top: 5px; text-wrap: pretty; }

/* ── contacto ───────────────────────────────────────────────────────────── */

.details { display: grid; gap: 18px; max-width: 420px; margin-top: 32px; }
.detail { border-top: 1px solid rgba(var(--line-rgb), 0.14); padding-top: 14px; }
.detail__label {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail__value { font-weight: 600; font-size: 17px; color: var(--heading); text-wrap: pretty; }
.detail__value--row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.detail__mail { word-break: break-word; }
.detail__address { font-size: 16px; line-height: 1.5; color: var(--ink); }

.form {
  min-width: 0;
  background: var(--page);
  border: 1px solid rgba(var(--line-rgb), 0.14);
  border-radius: 12px;
  padding: 28px 26px;
  display: grid;
  gap: 16px;
  align-content: start;
}
.form__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 21px;
  color: var(--heading);
}

.field { display: grid; gap: 6px; min-width: 0; font-size: 13.5px; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(var(--line-rgb), 0.22);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
}
.field textarea { resize: vertical; }
.field__hint { color: rgba(var(--line-rgb), 0.65); font-size: 12.5px; }
.field__select { appearance: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field :is(input, select, textarea):user-invalid { border-color: #C0392B; }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 16px; }

.form__note   { font-size: 13px; line-height: 1.5; color: var(--muted); }
.form__status { font-size: 14px; line-height: 1.55; color: var(--gold-text); font-weight: 600; }

/* ── footer ─────────────────────────────────────────────────────────────── */

.site-footer { background: var(--navy); color: var(--on-navy-muted); padding: 36px var(--gutter); }
.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  font-size: 14px;
}
.site-footer__logo { height: 92px; width: auto; }
/* El color global de los links (--heading) es casi el navy del pie, así que
   acá hay que forzarlo o el enlace queda invisible sobre el fondo. */
.site-footer__social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--on-navy);
  font-weight: 500;
}
.site-footer__social:hover { color: var(--gold); }
.site-footer__social .ig-icon { flex: none; }

/* ── reveal-on-scroll (added by main.js; safe no-op without JS) ──────────── */

.is-revealable { opacity: 0; transform: translateY(18px); will-change: opacity, transform; }
.is-revealed   { opacity: 1; transform: none; }

/* ── asistente ──────────────────────────────────────────────────────────── */

.chat {
  position: fixed;
  right: clamp(14px, 3vw, 24px);
  bottom: clamp(14px, 3vw, 24px);
  z-index: 80;
  display: flex;
  /* El botón va primero en el marcado (es el control, y así recibe el foco
     antes), pero visualmente el panel tiene que quedar por encima de él. */
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 12px;
}

/* Fila con los dos accesos: WhatsApp y el asistente. */
.chat__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat__wa {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #25D366;          /* verde de marca de WhatsApp */
  color: #FFFFFF;
  box-shadow: 0 10px 26px rgba(18, 41, 74, 0.28);
  transition: transform .16s ease, filter .16s ease;
}
.chat__wa:hover { transform: translateY(-1px); filter: brightness(1.07); color: #FFFFFF; }

.chat__launcher {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 20px;
  border: 1px solid transparent;   /* reservado para el borde del hover */
  border-radius: 999px;
  background: var(--navy);
  color: var(--on-navy);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(18, 41, 74, 0.28);
  transition: transform .16s ease, background-color .16s ease, color .16s ease;
}
.chat__launcher:hover {
  transform: translateY(-1px);
  background: var(--on-navy);
  color: var(--navy);
  border-color: var(--navy);
}

.chat__icon-close { display: none; }
.chat__launcher[aria-expanded="true"] .chat__icon-open { display: none; }
.chat__launcher[aria-expanded="true"] .chat__icon-close { display: block; }
/* Con el panel abierto el botón queda solo como "cerrar". */
.chat__launcher[aria-expanded="true"] .chat__launcher-text { display: none; }
.chat__launcher[aria-expanded="true"] { padding: 13px; }

.chat__panel {
  display: flex;
  flex-direction: column;
  width: min(384px, calc(100vw - 28px));
  max-height: min(560px, calc(100dvh - 120px));
  background: var(--surface);
  border: 1px solid rgba(var(--line-rgb), 0.16);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(18, 41, 74, 0.26);
  overflow: hidden;
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 18px;
  background: var(--navy);
  color: var(--on-navy);
}
.chat__head-text { flex: 1; min-width: 0; }

.chat__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(183, 196, 217, 0.16);
  color: var(--on-navy);
}
.chat__avatar svg { width: 30px; height: 30px; display: block; }
.chat__avatar-accent { color: var(--gold); }

.chat__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.chat__subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--on-navy-muted);
  margin-top: 3px;
}
.chat__dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3FD07E;
  box-shadow: 0 0 0 3px rgba(63, 208, 126, 0.18);
}

.chat__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--on-navy);
  cursor: pointer;
}
.chat__close:hover { background: rgba(183, 196, 217, 0.18); }

.chat__log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.chat__msg {
  max-width: 88%;
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
}
/* Párrafo parejo a ambos márgenes. En una columna tan angosta la justificación
   sola abriría huecos enormes entre palabras, así que va con corte silábico
   automático — funciona porque el documento declara lang="es". */
.chat__msg p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.chat__msg--bot {
  justify-self: start;
  /* Más ancha que la del visitante: al ir justificada, cada carácter extra por
     renglón reduce los huecos entre palabras. */
  max-width: 97%;
  background: var(--page);
  border: 1px solid rgba(var(--line-rgb), 0.12);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat__msg--user {
  justify-self: end;
  background: var(--navy);
  color: var(--on-navy);
  border-bottom-right-radius: 4px;
}
/* Llamada a la acción que el modelo agrega cuando corresponde invitar al
   contacto. Es un enlace real a #contacto, así hereda el desplazamiento suave. */
.chat__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: filter .16s ease;
}
.chat__cta:hover { color: var(--gold-ink); filter: brightness(1.07); }

.chat__msg--error {
  justify-self: start;
  background: transparent;
  border: 1px dashed rgba(var(--line-rgb), 0.3);
  color: var(--muted);
  font-size: 14px;
}

/* Tres puntos mientras se espera la respuesta. */
.chat__typing { display: flex; gap: 4px; align-items: center; padding: 14px 15px; }
.chat__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: chat-blink 1.3s infinite both;
}
.chat__typing span:nth-child(2) { animation-delay: .18s; }
.chat__typing span:nth-child(3) { animation-delay: .36s; }
@keyframes chat-blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.chat__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 20px 14px;
}
.chat__chip {
  padding: 7px 13px;
  border: 1px solid rgba(var(--line-rgb), 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease;
}
.chat__chip:hover { border-color: var(--gold); color: var(--heading); }

.chat__form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(var(--line-rgb), 0.12);
}
.chat__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.chat__input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid rgba(var(--line-rgb), 0.22);
  border-radius: 999px;
  background: var(--page);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}
.chat__input:focus { border-color: var(--gold); outline: none; }

.chat__send {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--on-navy);
  cursor: pointer;
  transition: filter .16s ease;
}
.chat__send:hover:not(:disabled) { background: var(--on-navy); color: var(--navy); }
.chat__send:disabled { opacity: .45; cursor: default; }

.chat__disclaimer {
  padding: 0 20px 14px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.chat__disclaimer a { color: var(--gold-text); text-decoration: underline; }

@media (max-width: 520px) {
  .chat { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
  /* La fila de botones se alinea a la derecha aunque el panel ocupe todo el ancho. */
  .chat__actions { align-self: flex-end; }
  .chat__msg { max-width: 92%; }
  .chat__panel { width: 100%; max-height: calc(100dvh - 96px); }
}

/* ── responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .site-header { gap: 12px; }
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--surface);
    border-bottom: 1px solid rgba(var(--line-rgb), 0.14);
    box-shadow: 0 16px 28px rgba(18, 41, 74, 0.12);
    font-size: 16px;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .nav.is-open { display: flex; }

  .nav__link {
    padding: 14px 2px;
    font-size: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(var(--line-rgb), 0.10);
  }
  .nav-group { display: block; }
  .nav-group__button { width: 100%; justify-content: space-between; }

  .nav-group__panel {
    position: static;
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding-bottom: 6px;
  }
  .nav-group__panel a {
    padding: 12px 2px 12px 16px;
    font-size: 15.5px;
    color: var(--muted);
    border-top: 0;
  }
  .nav-group__panel a + a { border-top: 0; }
  .nav-group__panel a:hover { background: transparent; }
}

@media (max-width: 560px) {
  .brand__icon     { height: 30px; }
  .brand__wordmark { height: 15px; }
  .header-cta { display: none; }
  .nav__link--cta { display: block; color: var(--gold-text); font-weight: 600; border-bottom: 0; }
  .hero .button-row { padding-bottom: 40px; }
  .button { width: 100%; }
  .button-row { gap: 10px; }
  .section__head { align-items: start; }
  .stats { margin-bottom: 40px; }
  .tile { padding: 22px 20px; }
  .form { padding: 24px 20px; }
}

/* The design justifies its long-form paragraphs. Only honour that once the
   measure is wide enough that justification doesn't open rivers of whitespace;
   narrow columns stay ragged-right. */
@media (min-width: 700px) {
  .hero__lead,
  .pain__text,
  .section__lead,
  .about__text,
  .faq__a p { text-align: justify; hyphens: auto; }
}

/* Below any real handset width the icon alone still carries the brand. */
@media (max-width: 340px) {
  .site-header { gap: 8px; }
  .brand__wordmark { display: none; }
}

/* Estas reglas NO se cuelgan de @media (prefers-reduced-motion) sino de una
   marca que pone main.js, para que la decisión de acatar o no la preferencia
   del sistema viva en un único lugar: RESPECT_REDUCED_MOTION, en main.js.
   Con la consulta de medios directa, el `transition-duration: .01ms !important`
   le ganaba a la animación en línea del JavaScript y las secciones aparecían
   de golpe, sin transición. */
html[data-motion="reduced"] { scroll-behavior: auto; }
html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
}
html[data-motion="reduced"] .is-revealable { transform: none; }

@media print {
  .site-header, .skip-link, .nav, .button, .form { display: none !important; }
  body { background: #fff; color: #000; }
}
