:root {
  /* Same values as the app tokens in src/main/webapp/content/scss/_app-colors.scss */
  --primary: #0a66ff;
  --primary-dark: #0957d9;
  --primary-deep: #0746b0;
  --primary-ink: #06388c;
  --accent: #00a34f;
  --accent-light: #18bd70;
  --accent-dark: #00703a;
  --text: #0f1e3a;
  --text-secondary: #3b4c6d;
  --muted: #4f6081;
  --ink-800: #223454;
  --line: #dbe6fb;
  --line-soft: #e6ecf6;
  --light: #f1f3f9;
  --tint: #f5f8ff;
  --blue-soft: #eef4ff;
  --blue-line: #c9dcff;
  --blue-text: #d4e3ff;
  --success-soft: #e3f7ec;
  --warn-soft: #fff3e0;
  --warn-text: #9a4a00;
  --page: #fff;
  --surface: #fff;
  --topbar-bg: rgba(255, 255, 255, 0.94);
  --topbar-bg-scrolled: rgba(255, 255, 255, 0.98);
  /* Blue fills under white text: the certificate, the blue section and the included offer. */
  --fill-deep: #0746b0;
  --shadow-rgb: 15 30 58;
  --topbar: 4rem;
}

/* Optional dark mode, the same choice as the app: landing.js toggles .app-dark on <html> and saves it in
   localStorage "ecuanex-theme". Same values as the dark block of src/main/webapp/content/scss/_app-colors.scss. */
:root.app-dark {
  color-scheme: dark;
  --primary: #2f6fef;
  --primary-dark: #5b93ff;
  --primary-deep: #9dbcff;
  --primary-ink: #c7d9ff;
  --accent-dark: #5fd38f;
  --text: #e7ecf6;
  --text-secondary: #b4c0d6;
  --muted: #8a99b4;
  --ink-800: #d0d9ea;
  --line: #27324a;
  --line-soft: #1e2840;
  --light: #1b2539;
  --tint: #0f182a;
  --blue-soft: #16274a;
  --blue-line: #2c4a85;
  --success-soft: #10301f;
  --warn-soft: #3a2510;
  --warn-text: #ffb766;
  --page: #0a1120;
  --surface: #131c2f;
  --topbar-bg: rgba(10, 17, 32, 0.92);
  --topbar-bg-scrolled: rgba(10, 17, 32, 0.98);
  --fill-deep: #0b3a8f;
  --shadow-rgb: 0 0 0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Poppins, system-ui, sans-serif;
  line-height: 1.5;
}

img,
svg {
  display: block;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

a {
  color: inherit;
}

[id] {
  scroll-margin-top: calc(var(--topbar) + 0.75rem);
}

h2,
h3,
h4 {
  margin: 0;
}

.wrap {
  width: min(1200px, calc(100% - 3rem));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(920px, calc(100% - 3rem));
}

.brand-word {
  font-family: Outfit, 'Avenir Next', 'Century Gothic', sans-serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.icon {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
}

.eyebrow {
  color: var(--primary-dark);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ==========================================================================
Top bar
========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  height: var(--topbar);
  padding: 0 max(1.5rem, calc((100% - 1200px) / 2));
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
  transition:
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.topbar--scrolled {
  background: var(--topbar-bg-scrolled);
  box-shadow: 0 6px 20px rgb(var(--shadow-rgb) / 0.06);
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-deep);
  font-size: 1.5rem;
  text-decoration: none;
}

.topbar__brand img {
  width: 1.875rem;
  height: 1.875rem;
  object-fit: cover;
  border-radius: 50%;
}

.topbar__nav {
  display: flex;
  flex: 1;
  gap: 0.25rem;
}

.topbar__nav a,
.topbar__drawer a {
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible,
.topbar__drawer a:hover {
  color: var(--primary);
  background: rgba(10, 102, 255, 0.08);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar__login {
  padding: 0.6rem 1rem;
  color: var(--primary-deep);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.topbar__login:hover {
  color: var(--primary);
}

.topbar__drawer {
  display: none;
  margin-left: auto;
}

/* Light / dark switch; landing.js shows it. The moon offers dark mode, the sun brings back light. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--primary-deep);
  cursor: pointer;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle:hover {
  background: var(--blue-soft);
  color: var(--primary);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(10, 102, 255, 0.35);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.theme-toggle__sun,
.app-dark .theme-toggle__moon {
  display: none;
}

.app-dark .theme-toggle__sun {
  display: block;
}

/* ==========================================================================
Buttons and small pieces
========================================================================== */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.75rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: none;
}

.btn--small {
  min-height: 2.5rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
}

.btn--large {
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(10, 102, 255, 0.28);
}

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

.btn--ghost {
  border-color: var(--blue-line);
  background: var(--surface);
  color: var(--primary-deep);
}

.btn--ghost:hover {
  border-color: var(--primary);
}

.btn--light {
  background: #fff;
  color: var(--fill-deep);
}

.btn--outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn--outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  margin: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.pill .icon {
  width: 1rem;
  height: 1rem;
}

.pill--success {
  background: var(--success-soft);
  color: var(--accent-dark);
}

.tag {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag--success {
  background: var(--success-soft);
  color: var(--accent-dark);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.chip .icon {
  width: 0.875rem;
  height: 0.875rem;
}

.chip--blue {
  background: var(--blue-soft);
  color: var(--primary-deep);
}

.chip--green {
  background: var(--success-soft);
  color: var(--accent-dark);
}

.icon-tile {
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0.8rem;
  border-radius: 0.875rem;
  background: var(--blue-soft);
  color: var(--primary);
}

.icon-tile--small {
  width: 2.875rem;
  height: 2.875rem;
  padding: 0.75rem;
  border-radius: 0.8rem;
}

.checks {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.checks li {
  display: flex;
  gap: 0.625rem;
}

.checks .icon {
  margin-top: 0.1875rem;
  color: var(--primary);
}

.checks strong {
  color: var(--text);
}

/* ==========================================================================
Hero
========================================================================== */

.hero {
  background: var(--tint);
  border-bottom: 1px solid var(--line-soft);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 3.5rem;
  padding: 4.5rem 0 5rem;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
}

.lead {
  max-width: 34em;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.6;
}

.lead strong {
  color: var(--text);
}

.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.625rem 1.25rem;
  margin: 0.375rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-800);
  font-size: 0.9rem;
  font-weight: 500;
}

.points li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.points .icon {
  color: var(--primary);
}

.hero__stage {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 32.5rem;
  height: 35rem;
}

.cert {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(20.625rem, 72%);
  padding: 1.375rem;
  border-radius: 1.375rem;
  background: var(--fill-deep);
  color: #fff;
  box-shadow: 0 24px 48px rgba(7, 70, 176, 0.28);
  rotate: -4deg;
}

.cert__top,
.cert__validity {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cert__kicker {
  color: #c9dcff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cert__format {
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  font-weight: 700;
}

.cert__owner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cert__owner div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.cert__owner strong {
  font-size: 1.0625rem;
}

.cert__owner span:not(.cert__lock) {
  color: var(--blue-text);
  font-size: 0.78rem;
}

.cert__lock {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.14);
}

.cert__lock svg {
  width: 1.5rem;
  height: 1.5rem;
  color: #fff;
}

.cert__signature {
  width: 11.25rem;
  height: 2.125rem;
}

.cert__validity {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--blue-text);
  font-size: 0.78rem;
}

.cert__validity strong {
  color: #fff;
}

.invoice {
  position: absolute;
  top: 7.5rem;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(18.75rem, 66%);
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: 0 24px 48px rgb(var(--shadow-rgb) / 0.12);
}

.invoice__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.invoice__head div,
.invoice__customer {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.invoice__kicker {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.invoice__number {
  font-size: 0.875rem;
  white-space: nowrap;
}

.invoice__customer {
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  background: var(--light);
}

.invoice__customer span {
  color: var(--muted);
  font-size: 0.72rem;
}

.invoice__customer strong {
  font-size: 0.85rem;
}

.invoice__row,
.invoice__total {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.invoice__row {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.invoice__total {
  padding-top: 0.625rem;
  border-top: 1px solid var(--line-soft);
  font-size: 1rem;
  font-weight: 700;
}

.invoice__total span:last-child {
  color: var(--primary-deep);
}

.invoice__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Sample invoice states. landing.js loops data-state on the stage: draft, signing, sending, authorized. */
.invoice__status {
  background: var(--success-soft);
  color: var(--accent-dark);
  white-space: nowrap;
}

[data-state='draft'] .invoice__status {
  background: var(--light);
  color: var(--muted);
}

[data-state='signing'] .invoice__status,
[data-state='sending'] .invoice__status {
  background: var(--warn-soft);
  color: var(--warn-text);
}

.invoice__sri {
  display: grid;
  gap: 0.375rem;
}

.invoice__sri-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.invoice__bar {
  height: 0.375rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--light);
}

.invoice__bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-light);
  transition: background-color 0.3s ease;
}

[data-state='draft'] .invoice__bar span {
  width: 0;
  transition: none;
}

[data-state='signing'] .invoice__bar span {
  width: 45%;
  background: var(--primary);
  transition: width 1.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-state='sending'] .invoice__bar span {
  background: var(--primary);
  transition: width 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.invoice__signed,
.invoice__authorized {
  transition:
    opacity 0.3s ease,
    scale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-state='draft'] .invoice__signed,
[data-state='signing'] .invoice__signed,
[data-state='draft'] .invoice__authorized,
[data-state='signing'] .invoice__authorized,
[data-state='sending'] .invoice__authorized {
  opacity: 0;
  scale: 0.8;
}

/* ==========================================================================
Sections
========================================================================== */

.section {
  padding: 6rem 0;
}

.section--flush {
  padding-top: 0;
}

.section--tint {
  background: var(--tint);
  border-top: 1px solid var(--line-soft);
}

#documentos {
  border-bottom: 1px solid var(--line-soft);
}

#contacto {
  border-top: 0;
}

.section--blue {
  background: var(--fill-deep);
  color: #fff;
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.section__head h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section__head p {
  max-width: 40em;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.section__head--center {
  align-items: center;
  text-align: center;
}

.section__head--center h2 {
  max-width: 22em;
}

.section__head--split {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
}

.section__head--split > div {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 40em;
}

.section--blue .eyebrow {
  color: #c9dcff;
}

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

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--center {
  justify-content: center;
}

/* Firma + sistema */
.offer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
}

.offer h3 {
  font-size: 1.375rem;
  font-weight: 700;
}

.offer .checks {
  color: var(--text-secondary);
}

.offer--included {
  border-color: var(--fill-deep);
  background: var(--fill-deep);
  color: #fff;
}

.offer--included .icon-tile {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.offer--included .checks {
  color: var(--blue-text);
}

.offer--included .checks .icon {
  color: #fff;
}

.offer__badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  max-width: 46%;
  text-align: center;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.offer--result {
  justify-content: center;
  gap: 0.875rem;
  border-style: dashed;
  border-color: var(--blue-line);
  background: var(--tint);
}

.offer--result p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.offer--result .offer__claim {
  color: var(--primary-deep);
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

/* Documentos */
.doc {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.625rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.doc:hover {
  border-color: rgba(10, 102, 255, 0.35);
  box-shadow: 0 18px 40px rgb(var(--shadow-rgb) / 0.08);
  transform: translateY(-3px);
}

.doc__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.doc__code {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.doc h3 {
  font-size: 1.1875rem;
  font-weight: 700;
}

.doc p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem 1.5rem;
  margin-top: 2.75rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.125rem;
  background: var(--surface);
  font-size: 0.9rem;
}

.extras span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.extras .icon {
  color: var(--primary);
}

/* Firma de persona natural: what the purchase asks for */
.natural {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3rem;
}

.natural__copy {
  display: flex;
  flex: 1 1 23.75rem;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.natural__copy h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.natural__copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.natural__copy .natural__note {
  padding: 0.875rem 1.125rem;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--tint);
  font-size: 0.90625rem;
  line-height: 1.55;
}

.natural__needs {
  display: grid;
  flex: 1 1 32.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}

.need {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
}

.need__icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6875rem;
  border-radius: 0.75rem;
  background: var(--blue-soft);
  color: var(--primary);
}

.need h3 {
  font-size: 1.03125rem;
  font-weight: 700;
}

.need p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* Cómo funciona */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.625rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.08);
}

.step h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.step p {
  margin: 0;
  color: var(--blue-text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.step__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #fff;
  color: var(--fill-deep);
  font-weight: 800;
}

.step--done {
  border-color: var(--surface);
  background: var(--surface);
  color: var(--text);
}

.step--done p {
  color: var(--text-secondary);
}

.step--done .step__number {
  background: var(--accent-light);
  color: #fff;
}

/* ==========================================================================
Precios (plans come from the database; their features are HTML)
========================================================================== */

.prices__empty,
.prices__note {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.prices__note {
  font-size: 0.875rem;
}

.prices__wrap {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.prices__wrap .section__head {
  margin-bottom: 0;
}

/* One heading per modality, then its durations */
.plan-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line-soft);
}

.price-grid + .plan-group {
  margin-top: 1.25rem;
}

.plan-group__title {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.plan-group__title > div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.plan-group__title h3 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.plan-group__title span {
  color: var(--text-secondary);
  font-size: 0.90625rem;
}

.plan-group__icon {
  flex: none;
  width: 3rem;
  height: 3rem;
  padding: 0.75rem;
  border-radius: 0.875rem;
  background: var(--blue-soft);
  color: var(--primary);
}

.plan-group--billing .plan-group__icon {
  background: var(--fill-deep);
  color: #fff;
}

.plan-group__tag {
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--primary-deep);
  font-size: 0.8125rem;
  font-weight: 600;
}

.plan-group--billing .plan-group__tag {
  background: var(--success-soft);
  color: var(--accent-dark);
}

/* Up to three cards per row, a third wide each, centered when a modality has fewer */
.price-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.price-grid .price {
  flex: 0 1 calc((100% - 2.5rem) / 3);
  min-width: min(17.5rem, 100%);
}

.price {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.price:hover {
  border-color: rgba(10, 102, 255, 0.35);
  box-shadow: 0 20px 44px rgb(var(--shadow-rgb) / 0.1);
  transform: translateY(-4px);
}

.price--featured {
  border: 2px solid var(--primary);
  box-shadow: 0 24px 48px rgba(10, 102, 255, 0.16);
}

.price--featured:hover {
  border-color: var(--primary);
  box-shadow: 0 28px 56px rgba(10, 102, 255, 0.22);
}

.price__badge {
  position: absolute;
  top: 0;
  left: 50%;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.price__head {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.price__name {
  font-size: 1.25rem;
  font-weight: 700;
}

.price__tagline {
  color: var(--muted);
  font-size: 0.875rem;
}

.price__amount {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin: 0;
  color: var(--primary-deep);
  font-size: 2.875rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.price__currency {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0;
}

.price__tax {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
}

.price__features {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.price__features ul {
  display: grid;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.price__features li {
  position: relative;
  padding-left: 1.75rem;
  line-height: 1.45;
}

/* Check mark in front of each feature, same stroke as the #i-check icon */
.price__features li::before {
  content: '';
  position: absolute;
  top: 0.15rem;
  left: 0;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--primary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.price__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.875rem;
  border: 1.5px solid var(--primary);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.price__cta svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s ease;
}

.price__cta:hover,
.price--featured .price__cta {
  background: var(--primary);
  color: #fff;
}

.price--featured .price__cta:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.price__cta:hover svg {
  transform: translateX(3px);
}

.price__cta:focus-visible {
  outline: 3px solid rgba(10, 102, 255, 0.35);
  outline-offset: 2px;
}

/* ==========================================================================
Comparación
========================================================================== */

.compare__title {
  margin-bottom: 1.75rem;
  font-size: clamp(1.6rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
}

.compare {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
}

.compare table {
  width: 100%;
  min-width: 35rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.compare th,
.compare td {
  padding: 1rem 1.375rem;
  text-align: center;
}

.compare thead {
  background: var(--tint);
}

.compare thead th {
  color: var(--muted);
  font-weight: 600;
}

.compare tbody tr {
  border-top: 1px solid var(--line-soft);
}

.compare tbody th {
  font-weight: 500;
  text-align: left;
}

.compare tbody td {
  color: var(--text-secondary);
}

.compare thead .compare__us {
  color: var(--primary-deep);
  font-weight: 700;
}

.compare tbody .compare__us {
  color: var(--accent-dark);
  font-weight: 600;
}

/* ==========================================================================
Preguntas frecuentes
========================================================================== */

.faq {
  display: grid;
  gap: 0.75rem;
}

.faq__item {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.faq__item:hover,
.faq__item[open] {
  border-color: rgba(10, 102, 255, 0.35);
}

.faq__item[open] {
  box-shadow: 0 10px 26px rgb(var(--shadow-rgb) / 0.06);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq__item summary::after {
  content: '';
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

.faq__item[open] summary::after {
  transform: rotate(225deg);
}

.faq__item p {
  margin: 0;
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ==========================================================================
Cierre, pie y WhatsApp
========================================================================== */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  padding: 3rem;
  border-radius: 1.75rem;
  background: var(--primary);
  color: #fff;
}

.cta__copy {
  display: flex;
  flex: 1 1 22rem;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.cta__copy h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cta__copy p {
  margin: 0;
  color: #e3edff;
  font-size: 1.03rem;
  line-height: 1.6;
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-footer .brand-word {
  color: var(--primary-deep);
}

.site-footer a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.whatsapp {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1.1rem 0.45rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 24px rgb(var(--shadow-rgb) / 0.14);
  animation: landing-pulse 1.6s ease-out 1.5s 2;
  transition: transform 0.2s ease;
}

.whatsapp:hover {
  transform: translateY(-3px);
}

.whatsapp__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
}

.whatsapp__avatar svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Cookie notice for Google Analytics, at the lower left so it does not cover the WhatsApp button */
.consent {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: min(26rem, calc(100% - 7rem));
  padding: 1rem 1.125rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 16px 40px rgb(var(--shadow-rgb) / 0.16);
  font-size: 0.875rem;
}

.consent[hidden] {
  display: none;
}

.consent p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.consent__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ==========================================================================
Responsive
========================================================================== */

@media (max-width: 1080px) {
  .topbar__nav,
  .topbar__actions .topbar__login {
    display: none;
  }

  .topbar__actions {
    margin-left: auto;
  }

  .topbar__drawer {
    display: block;
    margin-left: 0;
  }

  .topbar__drawer summary {
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }

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

  .topbar__drawer nav {
    position: absolute;
    top: var(--topbar);
    right: 0;
    left: 0;
    display: grid;
    padding: 0.5rem 0 0.75rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line-soft);
  }

  .topbar__drawer a {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
    padding: 3.5rem 0 4rem;
  }

  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wrap,
  .wrap--narrow {
    width: calc(100% - 2rem);
  }

  .topbar {
    gap: 0.75rem;
    padding: 0 1rem;
  }

  .topbar__actions .btn {
    display: none;
  }

  .section {
    padding: 4rem 0;
  }

  .section--flush {
    padding-top: 0;
  }

  .section__head {
    margin-bottom: 2rem;
  }

  .grid--3,
  .steps,
  .natural__needs {
    grid-template-columns: minmax(0, 1fr);
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__stage {
    height: 30rem;
  }

  .cert {
    width: 80%;
    padding: 1.125rem;
  }

  .invoice {
    top: 8.5rem;
    width: 64%;
    padding: 1rem;
  }

  .invoice__head {
    flex-wrap: wrap;
  }

  .offer,
  .price {
    padding: 1.5rem;
  }

  .cta {
    padding: 2rem 1.5rem;
  }

  .whatsapp {
    padding: 0.35rem;
  }

  .consent {
    left: 1rem;
    bottom: 1rem;
    max-width: calc(100% - 6.5rem);
  }

  .consent__actions .btn {
    flex: 1;
  }

  .whatsapp__text {
    display: none;
  }

  .site-footer {
    padding-bottom: 5.5rem;
  }
}

/* ==========================================================================
Motion. Short and subtle; everything is turned off for prefers-reduced-motion.
========================================================================== */

@keyframes landing-rise {
  from {
    opacity: 0;
    translate: 0 14px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes landing-float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -6px;
  }
}

@keyframes landing-pulse {
  0% {
    box-shadow:
      0 10px 24px rgb(var(--shadow-rgb) / 0.14),
      0 0 0 0 rgba(10, 102, 255, 0.35);
  }

  100% {
    box-shadow:
      0 10px 24px rgb(var(--shadow-rgb) / 0.14),
      0 0 0 18px rgba(10, 102, 255, 0);
  }
}

/* Hero: copy enters line by line, the cards rise and then float out of step with each other */
.hero__copy > * {
  animation: landing-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__copy > :nth-child(2) {
  animation-delay: 0.07s;
}

.hero__copy > :nth-child(3) {
  animation-delay: 0.14s;
}

.hero__copy > :nth-child(4) {
  animation-delay: 0.21s;
}

.hero__copy > :nth-child(5) {
  animation-delay: 0.28s;
}

.cert {
  animation:
    landing-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both,
    landing-float 7s ease-in-out 1.2s infinite;
}

.invoice {
  animation:
    landing-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both,
    landing-float 7s ease-in-out 2.6s infinite;
}

/* Sections fade in as they enter the viewport (landing.js adds .reveal) */
.reveal {
  opacity: 0;
  translate: 0 18px;
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
    translate 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.reveal--visible {
  opacity: 1;
  translate: 0 0;
}

.faq__item[open] p {
  animation: landing-rise 0.35s ease both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    translate: none;
  }
}
