/* =========================================================
   Espino & Asociados — hoja de estilos
   Paleta de marca: verde #009043 · gris #707070 · blanco
   Tipografías: Archivo (títulos) + Inter (texto)
   ========================================================= */

:root {
  --green: #009043;
  --green-deep: #00763a;
  --green-darker: #03582e;
  --green-bright: #35c977; /* verde acento sobre fondos oscuros */
  --gray: #6b7174; /* gris neutro de marca */
  --charcoal: #23282a; /* gris carbón, bandas oscuras */
  --charcoal-2: #171b1c; /* gris carbón profundo (degradados) */
  --ink: #23292b; /* texto principal, gris neutro */
  --muted: #62696c; /* texto secundario neutro */
  --paper: #ffffff;
  --mist: #f4f5f6; /* fondo suave gris neutro */
  --line: #e4e6e8; /* bordes finos grises */

  --radius: 16px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: "Archivo", sans-serif;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Tipografía utilitaria ---------- */
.eyebrow {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 14px;
}
.eyebrow-light {
  color: #9fe3bd;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  border: 2px solid var(--green);
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.btn:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
  transform: translateY(-2px);
}
.btn:focus-visible {
  outline: 3px solid #9fe3bd;
  outline-offset: 2px;
}
.btn-sm {
  padding: 10px 18px;
  font-size: 0.9rem;
}
.btn-ghost {
  background: transparent;
  color: var(--green);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: var(--mist);
  border-color: var(--green);
  color: var(--green-deep);
}
.btn-block {
  width: 100%;
}
.btn-on-green {
  background: #fff;
  color: var(--green-darker);
  border-color: #fff;
}
.btn-on-green:hover {
  background: #eafbf1;
  border-color: #eafbf1;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(0, 0, 0, 0.4);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand-logo {
  height: 34px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav > a {
  font-family: "Archivo", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}
.nav > a:hover {
  color: var(--green);
}
.nav-cta {
  color: #fff;
}
.nav-cta:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition:
    transform 0.25s var(--ease),
    opacity 0.2s var(--ease);
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(
      120% 80% at 85% -10%,
      #eef0f1 0%,
      rgba(238, 240, 241, 0) 55%
    ),
    var(--paper);
  padding: clamp(56px, 9vw, 110px) 0 clamp(72px, 11vw, 130px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  font-weight: 800;
  margin: 0 0 22px;
}
.hero h1 .accent {
  color: var(--green);
}
.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Tarjeta del hero: recoge el corte diagonal de la "A" del logo */
.hero-card {
  position: relative;
  aspect-ratio: 4 / 3.4;
  background: linear-gradient(
    150deg,
    var(--green) 0%,
    var(--green-darker) 100%
  );
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 60px -38px rgba(0, 90, 46, 0.8);
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 58%,
    rgba(255, 255, 255, 0.08) 58.3%,
    rgba(255, 255, 255, 0.08) 63%,
    transparent 63.3%
  );
}
.hero-mark {
  position: absolute;
  top: 8%;
  left: 7%;
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: clamp(5rem, 13vw, 9rem);
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.16);
  user-select: none;
}
.hero-card-foot {
  position: absolute;
  left: 8%;
  bottom: 9%;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.hero-card-foot span {
  font-size: 0.95rem;
  color: #cfeede;
}
.hero-card-foot strong {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
}

/* ---------- Cifras ---------- */
.stats {
  background: var(--ink);
  color: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 44px 24px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1;
  color: #fff;
}
.stat-num small {
  color: var(--green-bright);
  font-size: 0.55em;
  font-weight: 700;
  margin-left: 2px;
}
.stat-label {
  color: #b9c4bd;
  font-size: 0.92rem;
}

/* ---------- Secciones genéricas ---------- */
.section {
  padding: clamp(64px, 9vw, 104px) 0;
}
.section-head {
  max-width: 660px;
  margin: 0 0 48px;
}
.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 700;
  margin: 0 0 16px;
}
.section-sub {
  color: var(--muted);
  font-size: 1.06rem;
  margin: 0;
}

/* ---------- Servicios ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: #c7e6d4;
  box-shadow: 0 28px 44px -32px rgba(0, 90, 46, 0.55);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--green);
  background: #e9f6ef;
  border-radius: 13px;
  margin-bottom: 20px;
}
.card h3 {
  font-size: 1.28rem;
  font-weight: 700;
  margin: 0 0 10px;
}
.card p {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
}

/* ---------- Nosotros ---------- */
.about {
  background: linear-gradient(
    160deg,
    var(--charcoal) 0%,
    var(--charcoal-2) 100%
  );
  color: #fff;
  padding: clamp(64px, 9vw, 104px) 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.about-copy h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 18px;
}
.about-copy > p {
  color: #c9ced0;
  font-size: 1.06rem;
  margin: 0 0 24px;
}
.about-copy strong {
  color: #fff;
}
.about .eyebrow-light {
  color: var(--green-bright);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  display: grid;
  gap: 12px;
}
.checklist li {
  position: relative;
  padding-left: 34px;
  color: #d4d8da;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(53, 201, 119, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2335c977' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.about-logo {
  display: flex;
  justify-content: center;
}
.about-logo img {
  max-width: 340px;
  width: 100%;
  opacity: 0.96;
}

/* ---------- Proceso ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: none;
}
.step {
  position: relative;
  padding: 28px 26px 30px;
  border-radius: var(--radius);
  background: var(--mist);
}
/* Sección proceso con fondo gris claro y tarjetas blancas (ritmo) */
#proceso {
  background: var(--mist);
}
#proceso .step {
  background: #fff;
  border: 1px solid var(--line);
}
.step-num {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--green);
  letter-spacing: -0.04em;
  line-height: 1;
  display: block;
  margin-bottom: 14px;
}
.step h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.step p {
  color: var(--muted);
  margin: 0;
}

/* ---------- Contacto ---------- */
.contact {
  padding: clamp(64px, 9vw, 104px) 0;
  background: var(--mist);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 700;
  margin: 0 0 16px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 20px;
}
.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-label {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}
.contact-list a {
  font-size: 1.12rem;
  color: var(--ink);
  font-weight: 500;
}
.contact-list a:hover {
  color: var(--green);
}

.contact-form-wrap {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 32px;
}
.contact-form-wrap h3 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: #fff;
}
.form-intro {
  color: #b9c4bd;
  margin: 0 0 24px;
}

.form {
  display: grid;
  gap: 18px;
}
.form-hp {
  position: absolute;
  left: -9999px;
}
.field {
  display: grid;
  gap: 7px;
}
.field label {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #cdd6d0;
}
.field input,
.field textarea {
  width: 100%;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.field textarea {
  resize: vertical;
  min-height: 110px;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #9aa49d;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 144, 67, 0.3);
}
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: #e2574c;
}

.contact-form-wrap .btn {
  margin-top: 4px;
}

.form-status {
  margin: 4px 0 0;
  font-size: 0.95rem;
  min-height: 1.2em;
}
.form-status.ok {
  color: #7ee0a6;
}
.form-status.err {
  color: #ff9a8f;
}
.form-privacy {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: #8b968f;
  line-height: 1.5;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-darker);
  color: #d9efe2;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
  padding: 40px 24px;
}
.footer-logo {
  height: 38px;
  width: auto;
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 0.95rem;
  color: #d9efe2;
}
.footer-nav a:hover {
  color: #fff;
}
.footer-legal {
  width: 100%;
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
  color: #9cc7b1;
}

/* ---------- Tarjeta destacada en la grilla ---------- */
.card-featured {
  position: relative;
  display: flex;
  flex-direction: column;
  border-color: var(--green);
  background: linear-gradient(170deg, #f2fbf6 0%, #ffffff 60%);
}
.card-featured:hover {
  border-color: var(--green-deep);
}
.card-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--green);
  color: #fff;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
}
.card-more {
  margin-top: 16px;
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--green);
}

/* ---------- Apartado especial: constitución ---------- */
.feature {
  padding: 0 0 clamp(56px, 8vw, 100px);
}
.feature-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
}
.feature-copy {
  padding: clamp(32px, 4.5vw, 56px);
}
.feature-copy h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 18px;
}
.feature-lead {
  color: var(--muted);
  font-size: 1.06rem;
  margin: 0 0 26px;
  max-width: 48ch;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  display: grid;
  gap: 13px;
}
.feature-list li {
  position: relative;
  padding-left: 32px;
  color: var(--muted);
  font-size: 1.02rem;
}
.feature-list li strong {
  color: var(--ink);
  font-weight: 600;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d8f3e3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23009043' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.feature-panel {
  background: linear-gradient(
    160deg,
    var(--green) 0%,
    var(--green-darker) 100%
  );
  color: #fff;
  padding: clamp(32px, 4.5vw, 56px);
  display: flex;
  flex-direction: column;
}
.panel-title {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9fe3bd;
  margin: 0 0 22px;
}
.panel-items {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 0;
}
.panel-items li {
  position: relative;
  padding: 14px 0 14px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-family: "Archivo", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
}
.panel-items li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.panel-items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.panel-note {
  margin: auto 0 0;
  color: #cfeede;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ---------- Clientes ---------- */
.clients {
  padding: clamp(64px, 9vw, 104px) 0;
}
.section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.logo-wall {
  list-style: none;
  padding: 0;
  margin: 0 0 56px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  aspect-ratio: 3 / 2;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--gray);
  font-size: 0.8rem;
}
.logo-item span {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  color: #c4cfc8;
}
.testimonial {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.testimonial blockquote {
  font-family: "Archivo", sans-serif;
  font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.42;
  color: var(--ink);
  margin: 0 0 22px;
}
.testimonial figcaption strong {
  display: block;
  font-family: "Archivo", sans-serif;
  font-size: 1.05rem;
}
.testimonial figcaption span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-card {
    max-width: 460px;
  }
  .cards,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }
  .about-logo {
    order: -1;
  }
  .about-logo img {
    max-width: 260px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .logo-wall {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 620px) {
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
    box-shadow: 0 18px 30px -24px rgba(0, 0, 0, 0.4);
    display: none;
  }
  .nav.open {
    display: flex;
  }
  .nav > a {
    padding: 12px 0;
    border-bottom: 1px solid var(--mist);
  }
  .nav-cta {
    margin-top: 12px;
    text-align: center;
    border-bottom: 0;
  }
  .nav-toggle {
    display: flex;
  }

  .cards,
  .steps {
    grid-template-columns: 1fr;
  }
  .hero-actions .btn {
    flex: 1;
  }
  .logo-wall {
    grid-template-columns: repeat(2, 1fr);
  }
}
