/* =========================================================
   ESTOFACTURA
   styles.css
   ========================================================= */

/* ---------- RESET ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #ffffff;
  color: #202124;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  padding: 0;
  margin: 0;
}

li {
  list-style: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

/* ---------- VARIABLES ---------- */

:root {
  --green-dark: #177245;
  --green-action: #21a366;
  --charcoal: #202124;
  --graphite: #4a4f55;
  --light: #f4f5f6;
  --white: #ffffff;
  --gold: #c9a227;

  --max-width: 1180px;
  --radius: 18px;

  --shadow:
    0 10px 30px rgba(0, 0, 0, 0.08);
}

/* ---------- GLOBAL ---------- */

section {
  padding: 88px 24px;
}

section > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

h1,
h2,
h3 {
  line-height: 1.05;
}

h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
  letter-spacing: -0.05em;
  font-weight: 900;
}

h2 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  letter-spacing: -0.04em;
  font-weight: 800;
}

h3 {
  font-size: 1.4rem;
}

p {
  color: var(--graphite);
  font-size: 1.05rem;
}

strong {
  color: var(--green-dark);
}

/* ---------- BUTTONS ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;

  padding: 14px 24px;

  border-radius: 999px;

  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--green-action);
  color: white;

  box-shadow:
    0 8px 24px rgba(33, 163, 102, 0.25);
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-secondary {
  border: 2px solid var(--green-dark);
  color: var(--green-dark);
}

.btn-secondary:hover {
  background: var(--green-dark);
  color: white;
}

/* =========================================================
   HEADER
   ========================================================= */

header#inicio {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);

  border-bottom: 1px solid #eeeeee;
}

header nav {
  width: min(calc(100% - 48px), var(--max-width));
  min-height: 76px;

  margin: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;
}

header nav > a:first-child {
  display: flex;
  flex-direction: column;

  font-weight: 900;
}

header nav > a:first-child strong {
  font-size: 1.5rem;
  color: var(--charcoal);
}

header nav > a:first-child small {
  font-size: 0.7rem;
  color: var(--graphite);
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
}

header nav ul a {
  font-size: 0.92rem;
  font-weight: 700;
}

header nav ul a:hover {
  color: var(--green-action);
}

/* =========================================================
   HERO
   ========================================================= */

#hero {
  min-height: calc(100vh - 76px);

  display: grid;
  grid-template-columns: 1.15fr 0.85fr;

  align-items: center;
  gap: 60px;

  max-width: var(--max-width);
  margin: auto;

  padding-top: 80px;
  padding-bottom: 80px;
}

#hero > div,
#hero > figure {
  margin: 0;
}

#hero > div > p:first-child {
  color: var(--green-dark);

  font-size: 0.85rem;
  font-weight: 900;

  letter-spacing: 0.14em;

  margin-bottom: 20px;
}

#hero h1 {
  margin-bottom: 28px;
}

#hero h1 strong {
  display: block;
  color: var(--green-action);
}

#hero > div > p:nth-of-type(2) {
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);

  max-width: 700px;
}

#hero > div > p:nth-of-type(3) {
  max-width: 620px;
}

#hero > div > div {
  display: flex;
  flex-wrap: wrap;

  gap: 14px;

  margin-top: 30px;
  margin-bottom: 18px;
}

#hero figure img {
  border-radius: 28px;

  min-height: 560px;
  object-fit: cover;

  box-shadow: var(--shadow);
}

/* =========================================================
   PROBLEMAS
   ========================================================= */

#problemas {
  background: var(--light);
}

#problemas header {
  max-width: 820px;
  margin: 0 auto 50px;
}

#problemas header > p {
  color: var(--green-dark);

  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 20px;

  margin-bottom: 40px;
}

.cards article {
  background: white;

  padding: 30px;

  min-height: 220px;

  border-radius: var(--radius);

  box-shadow: 0 2px 14px rgba(0,0,0,0.04);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.cards article:hover {
  transform: translateY(-6px);

  box-shadow: var(--shadow);
}

.cards article span {
  display: inline-flex;

  color: var(--green-action);

  font-weight: 900;

  margin-bottom: 40px;
}

.cards article h3 {
  margin: 0;
}

/* =========================================================
   CONTROL / ASPIRACIÓN
   ========================================================= */

#control {
  text-align: center;
}

#control h2 {
  max-width: 900px;
}

#control ul {
  max-width: 900px;

  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 18px;

  margin-top: 50px;
}

#control li {
  background: var(--light);

  padding: 24px;

  border-radius: var(--radius);

  font-weight: 700;
}

/* =========================================================
   SOLUCIONES
   ========================================================= */

#soluciones {
  background: var(--green-dark);

  color: white;
}

#soluciones p,
#soluciones h2,
#soluciones h3,
#soluciones strong {
  color: white;
}

#soluciones header {
  max-width: 850px;

  margin: 0 auto 50px;
}

#soluciones > div {
  max-width: var(--max-width);

  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 18px;
}

#soluciones article {
  background: rgba(255,255,255,0.08);

  border: 1px solid rgba(255,255,255,0.16);

  padding: 28px;

  border-radius: var(--radius);
}

#soluciones article h3 {
  color: #ffffff;

  margin-bottom: 14px;
}

/* =========================================================
   COMO FUNCIONA
   ========================================================= */

#como-funciona > p:first-child {
  color: var(--green-dark);

  font-weight: 900;
}

#como-funciona ol {
  margin-top: 50px;

  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 20px;
}

#como-funciona li {
  position: relative;

  background: var(--light);

  padding: 30px;

  border-radius: var(--radius);

  min-height: 170px;

  display: flex;
  flex-direction: column;

  gap: 14px;
}

#como-funciona li::before {
  content: counter(list-item);

  width: 38px;
  height: 38px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--green-action);
  color: white;

  font-weight: 900;
}

#como-funciona strong {
  font-size: 1.3rem;
}

/* =========================================================
   CASE STUDY
   ========================================================= */

#casos {
  background: #101512;

  color: white;
}

#casos p,
#casos h2,
#casos strong,
#casos li {
  color: white;
}

#casos > p:first-child {
  color: #7fd6a7;

  font-weight: 900;
}

#casos ul {
  margin: 40px 0;

  display: grid;
  grid-template-columns: repeat(4, 1fr);

  gap: 12px;
}

#casos li {
  background: rgba(255,255,255,0.08);

  border-radius: 14px;

  padding: 18px;
}

#casos blockquote {
  margin: 50px 0;

  max-width: 850px;

  font-size: clamp(1.8rem, 4vw, 3rem);

  line-height: 1.1;

  font-weight: 800;

  color: #ffffff;

  border-left: 6px solid var(--green-action);

  padding-left: 28px;
}

/* =========================================================
   CONTACT
   ========================================================= */

#contacto {
  background: var(--light);
}

#contacto > p:first-child {
  color: var(--green-dark);

  font-weight: 900;
}

#lead-form {
  margin-top: 45px;

  max-width: 760px;

  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 20px;
}

#lead-form label {
  display: flex;
  flex-direction: column;

  gap: 8px;

  font-weight: 700;
}

#lead-form label:nth-last-of-type(2),
#lead-form label:nth-last-of-type(1) {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;

  padding: 15px 16px;

  border: 1px solid #dfe3e0;

  border-radius: 12px;

  background: white;

  color: var(--charcoal);

  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;

  border-color: var(--green-action);

  box-shadow:
    0 0 0 4px rgba(33,163,102,0.12);
}

#lead-form button {
  grid-column: 1 / -1;

  border: none;

  cursor: pointer;
}

/* =========================================================
   CTA FINAL
   ========================================================= */

#cta-final {
  background: var(--green-action);

  color: white;

  text-align: center;
}

#cta-final h2,
#cta-final p,
#cta-final strong {
  color: white;
}

#cta-final .btn {
  margin-top: 20px;

  background: white;

  color: var(--green-dark);
}

/* =========================================================
   WHATSAPP FLOAT
   ========================================================= */

#whatsapp-float {
  position: fixed;

  right: 22px;
  bottom: 22px;

  z-index: 1000;

  background: #25d366;
  color: white;

  padding: 15px 20px;

  border-radius: 999px;

  font-weight: 900;

  box-shadow:
    0 10px 30px rgba(0,0,0,0.18);
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
  background: #0d0f0e;

  color: white;

  padding: 60px 24px 30px;
}

footer > * {
  width: min(100%, var(--max-width));

  margin-left: auto;
  margin-right: auto;
}

footer strong {
  color: white;

  font-size: 1.5rem;
}

footer p,
footer small {
  color: #bfc5c1;
}

footer nav {
  display: flex;

  flex-wrap: wrap;

  gap: 24px;

  margin-top: 30px;
  margin-bottom: 40px;
}

footer nav a:hover {
  color: #7fd6a7;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

  header nav ul {
    display: none;
  }

  header nav > .btn {
    display: none;
  }

  #hero {
    grid-template-columns: 1fr;

    padding-left: 24px;
    padding-right: 24px;

    min-height: auto;
  }

  #hero figure img {
    min-height: 420px;
  }

  .cards,
  #soluciones > div,
  #como-funciona ol {
    grid-template-columns: repeat(2, 1fr);
  }

  #control ul {
    grid-template-columns: repeat(2, 1fr);
  }

  #casos ul {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 640px) {

  section {
    padding: 68px 20px;
  }

  header nav {
    width: calc(100% - 32px);
  }

  header nav > a:first-child strong {
    font-size: 1.1rem;
  }

  #hero {
    padding: 55px 20px 70px;
  }

  #hero h1 {
    font-size: clamp(3.4rem, 16vw, 5.5rem);
  }

  #hero > div > div {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .cards,
  #soluciones > div,
  #como-funciona ol,
  #control ul,
  #casos ul {
    grid-template-columns: 1fr;
  }

  #lead-form {
    grid-template-columns: 1fr;
  }

  #lead-form label {
    grid-column: 1 / -1;
  }

  #whatsapp-float {
    left: 18px;
    right: 18px;
    bottom: 16px;

    text-align: center;
  }

}