/* ==========================================================================
   Poblete Asociados — hoja de estilos
   ========================================================================== */

:root {
  --brand-primary: #0066b3;
  --brand-dark: #004780;
  --brand-accent: #0099e5;
  --bg-body: #ffffff;
  --bg-alt: #f5f8fc;
  --text-main: #1b2430;
  --text-muted: #5a6778;
  --border-color: #dfe8f2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(0, 40, 80, 0.06);
  --shadow: 0 16px 40px rgba(0, 71, 128, 0.10);
  --header-h: 72px;
  --section-y: 96px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background: var(--bg-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

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

a {
  color: inherit;
}

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

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--brand-dark);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 300;
}

.skip-link:focus {
  left: 12px;
}

/* ---------- Tipografía de apoyo ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-primary);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--brand-accent);
  border-radius: 2px;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

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

.btn-lg {
  padding: 15px 28px;
  font-size: 1rem;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}

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

.btn-outline {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--bg-alt);
}

.btn-light {
  background: #fff;
  color: var(--brand-dark);
}

.btn-light:hover {
  background: #e9f3fb;
}

.btn-link {
  background: none;
  border: none;
  color: var(--brand-primary);
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: none;
}

.btn-link:hover {
  text-decoration: underline;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 42px;
  height: 42px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}

.brand-name span {
  font-weight: 500;
  color: var(--brand-accent);
}

.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a:not(.btn) {
  position: relative;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.93rem;
  padding: 6px 0;
  transition: color 0.2s;
}

.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--brand-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.main-nav a:not(.btn):hover {
  color: var(--brand-primary);
}

.main-nav a:not(.btn):hover::after {
  transform: scaleX(1);
}

.main-nav a.btn-primary {
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand-dark);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 80px 0 88px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(0, 153, 229, 0.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f1f7fc 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
  line-height: 1.12;
  color: var(--brand-dark);
  margin-bottom: 22px;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Tarjeta de contacto ---------- */

.profile-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--brand-primary);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.profile-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.card-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.profile-card-header h2 {
  font-size: 1.1rem;
  color: var(--brand-dark);
  line-height: 1.25;
}

.profile-card-header .role {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.role-tag {
  display: inline-block;
  margin-top: 8px !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary) !important;
  background: #e6f2fb;
  padding: 3px 10px;
  border-radius: 999px;
}

.card-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.92rem;
}

.card-details li {
  display: flex;
  flex-direction: column;
}

.card-details strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.card-details a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}

.card-details a:hover {
  text-decoration: underline;
}

.card-footer {
  display: flex;
  gap: 20px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* ---------- Cifras ---------- */

.stats {
  background: var(--brand-dark);
  color: #fff;
  padding: 44px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 0 12px;
}

.stat + .stat {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.88rem;
  color: #c4dcf0;
}

/* ---------- Secciones ---------- */

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

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-header .eyebrow {
  justify-content: center;
}

.section-header .eyebrow::after {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--brand-accent);
  border-radius: 2px;
}

.section-header .eyebrow::before {
  display: none;
}

.section-header h2,
.contact-info h2,
.about-text h2,
.cta-inner h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  color: var(--brand-dark);
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ---------- Servicios ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  width: 40px;
  height: 3px;
  background: var(--brand-accent);
  border-radius: 0 0 3px 3px;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #c9ddf0;
}

.service-num {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-accent);
  margin-bottom: 14px;
  letter-spacing: 0.08em;
}

.service-card h3 {
  font-size: 1.12rem;
  color: var(--brand-dark);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

.services-note {
  margin-top: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.services-note strong {
  color: var(--brand-dark);
  font-weight: 600;
}

/* ---------- Método ---------- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #b9d6ee 0 8px, transparent 8px 14px);
}

.step {
  position: relative;
  text-align: center;
  padding: 0 8px;
}

.step-num {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 0 6px var(--bg-alt);
  margin-bottom: 18px;
}

.step h3 {
  font-size: 1.08rem;
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.step p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

/* ---------- Clientes ---------- */

.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.client-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.client-card::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 56px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand-accent), var(--brand-primary));
}

.client-card h3 {
  font-size: 1.05rem;
  color: var(--brand-dark);
  margin-bottom: 6px;
}

.client-card p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

/* ---------- Firma ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.about-text p + p {
  margin-top: 16px;
}

.highlights-box {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 34px 32px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--brand-primary);
}

.highlights-box h3 {
  color: var(--brand-dark);
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.highlights-role {
  font-size: 0.86rem;
  color: var(--brand-primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.highlights-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.highlights-box li {
  position: relative;
  padding-left: 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.highlights-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-accent);
  box-shadow: 0 0 0 4px #e1f1fb;
}

/* ---------- Contacto ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: stretch;
}

.contact-info .contact-lead {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 1.02rem;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 32px;
  border-top: 1px solid var(--border-color);
}

.info-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  padding-top: 2px;
}

.info-item dd {
  color: var(--text-main);
  font-weight: 500;
}

.info-item a {
  color: var(--brand-primary);
}

.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.map-card {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.map-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Llamado final ---------- */

.cta-band {
  background: linear-gradient(120deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
  color: #fff;
  padding: 64px 0;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-inner h2 {
  color: #fff;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 8px;
}

.cta-inner p {
  color: #d6e9f8;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #03243f;
  color: #c3d6e8;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding: 64px 24px 48px;
}

.footer-brand .brand-name {
  color: #fff;
  font-size: 1.3rem;
}

.footer-brand .brand-name span {
  color: var(--brand-accent);
}

.footer-brand .brand-sub {
  color: #8fb3d6;
  display: block;
  margin-bottom: 16px;
}

.footer-brand p {
  max-width: 36ch;
  color: #9fbbd4;
}

.site-footer h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  margin-bottom: 16px;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  color: #c3d6e8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-contact p {
  color: #9fbbd4;
  margin-bottom: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 24px;
  color: #8fb3d6;
  font-size: 0.84rem;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--brand-dark);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: var(--shadow);
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }

  .steps::before {
    display: none;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  :root {
    --section-y: 72px;
  }

  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
  }

  .stat:nth-child(3) {
    border-left: none;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 24px;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    display: none;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
  }

  .main-nav a:not(.btn)::after {
    display: none;
  }

  .main-nav .btn {
    margin-top: 16px;
  }

  .cta-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  :root {
    --section-y: 64px;
  }

  .hero {
    padding: 56px 0 64px;
  }

  .hero h1 {
    font-size: 1.95rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cards-grid,
  .clients-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .info-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .card-footer {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .contact-cta .btn {
    flex: 1 1 100%;
  }

  .map-card {
    min-height: 320px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .brand-sub {
    letter-spacing: 0.12em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
