:root {
  --navy: #12345a;
  --navy-dark: #09233e;
  --blue: #1d6da5;
  --red: #c83224;
  --ink: #17202b;
  --muted: #5c6978;
  --line: #d9e1ea;
  --soft: #f3f6f8;
  --paper: #ffffff;
  --warm: #f8f5f0;
  --shadow: 0 18px 45px rgba(10, 35, 62, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 8px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand img {
  width: 108px;
  height: auto;
}

.main-nav {
  justify-self: center;
  display: flex;
  gap: 24px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
}

.main-nav a,
.header-contact,
.button {
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.main-nav a:hover {
  color: var(--red);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 700;
  line-height: 1.2;
}

.header-contact {
  justify-self: end;
  display: grid;
  gap: 2px;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

.header-contact a:hover,
.contact-panel a:hover {
  color: var(--red);
}

.button.primary:hover {
  background: var(--red);
}

.hero {
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: center;
  padding: clamp(42px, 8vw, 88px) clamp(18px, 4vw, 56px) 36px;
  background:
    linear-gradient(110deg, rgba(9, 35, 62, 0.96), rgba(18, 52, 90, 0.82)),
    radial-gradient(circle at 88% 12%, rgba(200, 50, 36, 0.34), transparent 30%),
    var(--navy-dark);
  color: var(--paper);
}

.hero-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

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

.hero .eyebrow {
  color: #ffb4aa;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(3.3rem, 8vw, 6.4rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  color: var(--navy-dark);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.2rem;
  line-height: 1.25;
}

.hero-text {
  max-width: 680px;
  margin: 24px 0 0;
  color: #d9e7f4;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button.primary {
  color: var(--paper);
  background: var(--red);
}

.button.secondary {
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.button.secondary:hover {
  border-color: var(--paper);
  transform: translateY(-1px);
}

.hero-panel {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 38px);
}

.hero-panel img {
  width: min(280px, 86%);
  margin: 0 auto 28px;
}

.hero-panel dl {
  margin: 0;
  display: grid;
  gap: 18px;
}

.hero-panel div {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hero-panel dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-panel dd {
  margin: 4px 0 0;
  color: var(--navy-dark);
  font-weight: 700;
}

.certification-badge {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.certification-badge img {
  width: min(172px, 62%);
  margin: 0 auto;
  border-radius: 6px;
}

.section-inner {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.section-band {
  background: var(--soft);
}

.intro,
.services,
.method,
.reports,
.calculators,
.notice,
.contact {
  padding: clamp(54px, 8vw, 92px) 0;
}

#servicios,
#metodo,
#informes,
#calculadoras,
#contacto {
  scroll-margin-top: 84px;
}

.two-column,
.report-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: start;
}

.two-column p,
.report-layout p,
.contact-layout p {
  margin-top: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.visual-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
}

.section-copy {
  display: grid;
  gap: 18px;
}

.section-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.section-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.wide-photo {
  margin: -8px 0 26px;
}

.wide-photo img {
  aspect-ratio: 21 / 7;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  min-height: 310px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.service-card p {
  margin: 0;
  color: var(--muted);
}

.icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  border-radius: 50%;
  background: var(--warm);
  color: var(--red);
  font-weight: 800;
}

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

.method-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: clamp(24px, 5vw, 54px);
  align-items: end;
  margin-bottom: 34px;
}

.method-heading .section-heading {
  margin-bottom: 0;
}

.compact-photo img {
  aspect-ratio: 16 / 9;
}

.method-item {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.method-item strong {
  color: var(--navy-dark);
  font-size: 1.1rem;
}

.method-item p {
  margin: 0;
  color: var(--muted);
}

.report-box,
.contact-panel {
  border-left: 4px solid var(--red);
  background: var(--warm);
  padding: clamp(22px, 4vw, 32px);
  border-radius: 0 8px 8px 0;
}

.report-side {
  display: grid;
  gap: 18px;
}

.office-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--navy-dark);
}

.office-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.office-photo figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 18px;
  color: var(--paper);
  background: linear-gradient(180deg, transparent, rgba(9, 35, 62, 0.88));
  font-size: 0.92rem;
  font-weight: 700;
}

.report-box ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.report-box li + li {
  margin-top: 8px;
}

.calculators .section-heading p:last-child {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.calculator-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-height: 300px;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.calculator-icon {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--red);
  background: var(--warm);
}

.calculator-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calculator-card p {
  margin: 0;
  color: var(--muted);
}

.calculator-card .calculator-label {
  margin-bottom: 7px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.calculator-link {
  grid-column: 2;
  align-self: end;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--navy);
  font-weight: 800;
}

.calculator-link:hover {
  color: var(--red);
}

.calculator-notice {
  margin: 22px 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--red);
  color: var(--muted);
  font-size: 0.9rem;
}

.notice-inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: clamp(24px, 6vw, 62px);
  align-items: center;
}

.notice-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.contact-panel p {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0 0 14px;
  color: var(--ink);
}

.contact-panel p:last-child {
  margin-bottom: 0;
}

.contact-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: var(--red);
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-side {
  display: grid;
  gap: 18px;
}

.contact-photo img {
  aspect-ratio: 16 / 9;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  gap: 7px;
}

.form-row.full,
.form-submit {
  grid-column: 1 / -1;
}

.form-row label {
  color: var(--navy-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.form-row label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.form-row label .required-mark {
  color: var(--red);
  font-size: 1rem;
  font-weight: 900;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.form-row textarea {
  min-height: 126px;
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid rgba(29, 109, 165, 0.22);
  border-color: var(--blue);
}

.form-submit {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  color: var(--paper);
  background: var(--navy);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.form-submit:hover {
  background: var(--red);
  transform: translateY(-1px);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px clamp(18px, 4vw, 56px);
  color: #c7d5e3;
  background: var(--navy-dark);
}

.site-footer img {
  width: 118px;
  margin-bottom: 8px;
  background: var(--paper);
  border-radius: 6px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 22px;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner,
  .two-column,
  .visual-split,
  .report-layout,
  .contact-layout,
  .notice-inner,
  .method-heading {
    grid-template-columns: 1fr;
  }

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

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

  .wide-photo img {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
    padding: 14px 18px 18px;
  }

  .brand img {
    width: 108px;
  }

  .header-contact {
    justify-self: center;
    text-align: center;
  }

  h1 {
    font-size: 3.15rem;
  }

  .hero {
    padding-top: 38px;
  }

  .service-grid,
  .method-item,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: auto;
  }

  .calculator-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .calculator-link {
    grid-column: 1;
  }

  .site-footer {
    flex-direction: column;
  }
}
