:root {
  --bg: #f3f6f8;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --ink: #11313c;
  --ink-soft: #58717b;
  --line: rgba(17, 49, 60, 0.12);
  --primary: #123e52;
  --primary-deep: #0c2d3b;
  --accent: #2f8f78;
  --gold: #c3a669;
  --shadow: 0 18px 50px rgba(12, 33, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(195, 166, 105, 0.16), transparent 28%),
    linear-gradient(180deg, #f8fafb 0%, #eef3f5 48%, #f3f6f8 100%);
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.site-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 10px;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand span {
  display: grid;
  gap: 2px;
}

.brand small,
.topnav,
.hero__lead,
.hero__highlights li,
.section-heading p,
.stat-card p,
.service-card p,
.field input,
.field select,
.field textarea,
.form-note,
.step-card p,
.trust-card p,
.aux-copy,
.receipt-box p,
.footer p,
.footer small {
  color: var(--ink-soft);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.96rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(12, 33, 42, 0.16);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(12, 33, 42, 0.2);
}

.button--secondary,
.button--ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(18, 62, 82, 0.14);
  color: var(--primary);
  box-shadow: none;
}

.button--small {
  min-height: 42px;
  padding: 0 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 28px;
  padding: 28px 0 24px;
}

.hero__content,
.signal-card,
.stat-card,
.service-card,
.step-card,
.trust-card,
.trust__content,
.final-cta__box,
.aux-card,
.receipt-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero__content {
  position: relative;
  padding: 30px 32px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(243, 247, 249, 0.9)),
    url("../img/diagnostico-grid.svg") right bottom / 280px no-repeat;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.final-cta h2,
.aux-card h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.15rem, 4vw, 3.95rem);
}

.hero__lead,
.section-heading p,
.aux-copy {
  line-height: 1.75;
  font-size: 1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.hero__highlights {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.hero__highlights li {
  position: relative;
  padding-left: 24px;
}

.hero__highlights li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--accent));
}

.signal-card {
  align-self: stretch;
  padding: 28px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(12, 45, 59, 0.95), rgba(17, 49, 60, 0.95)),
    linear-gradient(140deg, rgba(47, 143, 120, 0.18), transparent 55%);
  color: #fff;
}

.signal-card__label,
.signal-list p,
.trust__content .section-heading p,
.contact-card a,
.contact-card span {
  color: rgba(255, 255, 255, 0.76);
}

.signal-card h2 {
  margin: 0 0 20px;
  font-size: 1.72rem;
  line-height: 1.2;
}

.signal-list,
.stats-grid,
.services-grid,
.steps-grid,
.trust-panels {
  display: grid;
  gap: 18px;
}

.signal-list article,
.service-card__header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
}

.signal-list article,
.signal-link {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

.signal-link {
  width: 100%;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.signal-link:hover,
.signal-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

.signal-list strong,
.stat-card strong,
.service-card h3,
.step-card h3,
.trust-card h3 {
  display: block;
  margin-bottom: 6px;
}

.signal-list span,
.service-icon,
.step-card span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(195, 166, 105, 0.24), rgba(47, 143, 120, 0.22));
  font-weight: 800;
}

.signal-link {
  align-items: start;
}

.signal-link > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 12px;
}

.signal-link strong {
  font-size: 1.02rem;
  margin: 0;
}

.signal-link p {
  flex-basis: 100%;
  margin-top: 0;
  line-height: 1.45;
  font-size: 0.98rem;
}

.service-icon,
.step-card span {
  color: var(--primary);
}

.section {
  padding: 40px 0;
}

.section--compact {
  padding-top: 10px;
}

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

.stat-card,
.step-card,
.service-card,
.aux-card {
  padding: 24px;
  background: var(--surface);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-heading--left {
  margin-left: 0;
  text-align: left;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin-bottom: 14px;
}

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

.service-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 251, 0.92));
}

.service-card__header {
  align-items: start;
  margin-bottom: 20px;
}

.service-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.diagnostic-form,
.field,
.contact-card {
  display: grid;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field--full {
  grid-column: 1 / -1;
}

.field span {
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(17, 49, 60, 0.15);
  border-radius: 14px;
  background: #fbfcfd;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: rgba(47, 143, 120, 0.8);
  box-shadow: 0 0 0 4px rgba(47, 143, 120, 0.12);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions,
.projection-box__header,
.final-cta__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-note {
  margin: 0;
  line-height: 1.6;
  font-size: 0.95rem;
}

.projection-box {
  padding: 22px;
  border: 1px solid rgba(47, 143, 120, 0.22);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(226, 241, 236, 0.6), rgba(255, 255, 255, 0.94));
}

.calc-box {
  padding: 22px;
  border: 1px solid rgba(18, 62, 82, 0.12);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(240, 245, 247, 0.82), rgba(255, 255, 255, 0.94));
}

.calc-box__header h4 {
  margin: 6px 0 0;
  font-size: 1.18rem;
}

.calc-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

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

.calc-grid article {
  padding: 16px;
  border: 1px solid rgba(17, 49, 60, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.calc-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-soft);
}

.calc-grid strong {
  color: var(--primary-deep);
  font-size: 1.32rem;
}

.projection-box__header h4 {
  margin: 6px 0 0;
  font-size: 1.18rem;
}

.projection-box__tag {
  margin: 0;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(18, 62, 82, 0.08);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 700;
}

.projection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.projection-grid article {
  padding: 16px;
  border: 1px solid rgba(17, 49, 60, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.projection-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-soft);
}

.projection-grid strong {
  color: var(--primary-deep);
  font-size: 1.32rem;
}

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

.step-card span {
  margin-bottom: 16px;
}

.trust__content {
  display: grid;
  gap: 28px;
  padding: 34px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(12, 45, 59, 0.96), rgba(16, 52, 66, 0.96)),
    radial-gradient(circle at top right, rgba(195, 166, 105, 0.18), transparent 32%);
  color: #fff;
}

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

.trust-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.final-cta__box {
  padding: 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(243, 247, 249, 0.92));
}

.final-cta h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.final-cta__actions {
  display: grid;
  gap: 16px;
}

.contact-card {
  min-width: 240px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(18, 62, 82, 0.95);
}

.contact-card strong {
  color: #fff;
}

.footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 10px 0 42px;
}

.footer div {
  display: grid;
  gap: 6px;
}

.footer a {
  color: var(--primary);
}

.aux-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.aux-layout {
  width: min(calc(100% - 32px), 760px);
}

.aux-card {
  text-align: center;
}

.aux-card h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  margin-bottom: 16px;
}

.receipt-box {
  margin: 28px 0;
  padding: 22px;
  background: linear-gradient(180deg, rgba(226, 241, 236, 0.62), rgba(255, 255, 255, 0.92));
}

.receipt-box strong {
  display: block;
  margin-bottom: 6px;
}

.message-inline {
  margin: 0;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #c85c4d;
  box-shadow: 0 0 0 4px rgba(200, 92, 77, 0.12);
}

@media (max-width: 1080px) {
  .hero,
  .stats-grid,
  .trust-panels,
  .methodology .steps-grid,
  .footer,
  .final-cta__box {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }

  .topnav {
    flex-wrap: wrap;
    justify-content: space-between;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .hero__content,
  .signal-card,
  .service-card,
  .trust__content,
  .final-cta__box,
  .aux-card {
    padding: 24px;
  }

  .form-grid,
  .projection-grid,
  .calc-grid--two {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .projection-box__header,
  .final-cta__box {
    flex-direction: column;
    align-items: stretch;
  }

  .hero h1 {
    max-width: none;
  }

  .topnav a:not(.button) {
    display: none;
  }
}
