/* Sembrana: base, navegación, secciones, componentes y adaptación móvil. */

:root {
  --bg: #f7faf4;
  --paper: #fff;
  --green: #073f22;
  --deep: #052e18;
  --leaf: #4e8b5d;
  --mint: #edf5ec;
  --text: #173126;
  --muted: #65756d;
  --line: #dce6da;
  --shadow: 0 18px 45px rgba(8,44,25,.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Trebuchet MS",Arial,sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.shell {
  width: min(1180px,calc(100% - 34px));
  margin: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(7,63,34,.12);
  backdrop-filter: blur(14px);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  position: relative;
  display: grid;
  color: var(--green);
  font-family: Georgia,serif;
  line-height: .86;
}

.brand:after {
  content: "";
  position: absolute;
  right: 21px;
  top: -10px;
  width: 18px;
  height: 27px;
  border: 2px solid var(--leaf);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 80% 0 80% 0;
  transform: rotate(-20deg);
}

.brand span {
  font-size: clamp(2rem,3vw,3rem);
  font-weight: 800;
}

.brand small {
  margin-left: 30px;
  color: #809189;
  font: 700 .72rem "Trebuchet MS";
  letter-spacing: .14em;
  text-transform: uppercase;
}

.menu {
  display: flex;
  gap: clamp(16px,3vw,48px);
  align-items: center;
  font-weight: 800;
  font-size: .94rem;
}

.menu a {
  position: relative;
  padding: 8px 0;
}

.menu a:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: .18s;
}

.menu a:hover:after,
.menu a.active:after {
  transform: scaleX(1);
}

.hero,
.page-hero {
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--deep);
}

.hero {
  min-height: 620px;
}

.page-hero {
  min-height: 390px;
}

.hero>img,
.page-hero>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero>img {
  object-position: 68% center;
}

.page-hero>img {
  opacity: .58;
}

.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,rgba(255,255,255,.97),rgba(255,255,255,.86) 34%,rgba(255,255,255,.24) 63%,transparent),linear-gradient(0deg,rgba(7,63,34,.12),transparent);
}

.page-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,rgba(5,46,24,.94),rgba(5,46,24,.58) 55%,rgba(5,46,24,.2)),linear-gradient(0deg,rgba(5,46,24,.72),transparent);
}

.hero-content,
.page-content {
  position: relative;
  padding: 74px 0;
}

.hero h1,
.page-content h1,
.section h2,
.split h2,
.contact h2 {
  margin: 0;
  color: var(--green);
  font-family: Georgia,serif;
  font-weight: 900;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 620px;
  font-size: clamp(3rem,6vw,5.6rem);
  line-height: .88;
}

.hero p {
  max-width: 620px;
  margin: 22px 0 28px;
  color: #34493f;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.45;
}

.page-content h1 {
  max-width: 820px;
  color: white;
  font-size: clamp(2.7rem,5vw,5rem);
  line-height: .95;
}

.page-content p:not(.eyebrow) {
  max-width: 690px;
  color: white;
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.5;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--leaf);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-content .eyebrow {
  color: #b8ddbd;
}

.actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 6px;
  padding: 0 32px;
  border: 2px solid var(--green);
  font-weight: 900;
}

.btn.primary {
  background: var(--green);
  color: white;
}

.btn.ghost {
  background: rgba(255,255,255,.8);
  color: var(--green);
}

.section {
  padding: 42px 0;
  text-align: center;
  background: white;
}

.section.alt {
  background: linear-gradient(180deg,#eef4ed,#f8fbf5);
}

.section h2,
.split h2,
.contact h2 {
  font-size: clamp(2rem,3vw,2.8rem);
  line-height: 1.03;
}

.grid {
  display: grid;
  gap: 20px;
}

.cards4 {
  grid-template-columns: repeat(4,1fr);
}

.cards3 {
  grid-template-columns: repeat(3,1fr);
}

.card {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.card-body {
  padding: 22px;
}

.card h3 {
  margin: 0;
  color: var(--green);
  font-family: Georgia,serif;
  font-size: 1.28rem;
}

.card p {
  color: var(--muted);
  line-height: 1.45;
}

.split {
  padding: 72px 0;
  background: var(--mint);
}

.split-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 70px;
}

.split p,
.contact p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.stats {
  padding: 22px 0;
  background: white;
}

.stats-box {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  max-width: 820px;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat {
  display: grid;
  place-items: center;
  min-height: 78px;
  padding: 16px;
  border-right: 1px solid var(--line);
  font-weight: 900;
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  color: var(--green);
  font-family: Georgia,serif;
  font-size: 2rem;
}

.contact {
  position: relative;
  overflow: hidden;
  background: white;
  padding: 56px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 42px;
  align-items: center;
}

.footer {
  background: var(--deep);
  color: white;
  padding: 28px 0 16px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 44px;
}

.footer .brand,
.footer .brand small {
  color: white;
}

.footer p {
  color: rgba(255,255,255,.78);
}

.legal {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: .8rem;
}

@media (max-width:980px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .menu {
    width: 100%;
    overflow: auto;
    gap: 24px;
  }

  .cards4,
  .cards3,
  .contact-grid,
  .split-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width:640px) {
  .shell {
    width: calc(100% - 24px);
  }

  .hero {
    min-height: 610px;
    align-items: end;
  }

  .shade {
    background: linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.96) 45%,white);
  }

  .hero h1 {
    font-size: 3.1rem;
  }

  .cards4,
  .cards3,
  .contact-grid,
  .split-grid,
  .footer-grid,
  .stats-box {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .legal {
    flex-direction: column;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

}

.brand small {
  margin: 10px 0 0;
  font-size: .62rem;
  letter-spacing: .06em;
  line-height: 1.4;
}

.brand {
  flex-shrink: 0;
}

.menu {
  gap: clamp(14px,2vw,30px);
}

.section h2 {
  margin-bottom: 30px;
}

.section-intro {
  max-width: 800px;
  margin: 0 auto 28px;
  color: var(--muted);
  line-height: 1.7;
}

.card img {
  height: 210px;
}

.card-body p {
  margin-bottom: 0;
}

.hero h1 {
  line-height: 1.02;
  font-size: clamp(2.8rem,5.3vw,4.7rem);
}

.hero .eyebrow {
  font-size: .8rem;
  color: var(--leaf);
}

.page-content h1 {
  line-height: 1.05;
}

.split p:first-child {
  margin-top: 0;
}

.client-list {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.client-list li {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.contact-links {
  display: grid;
  gap: 14px;
}

.contact-links h3 {
  margin: 0 0 8px;
  color: var(--green);
}

.contact-links p {
  margin: 0;
}

.stat {
  text-align: center;
}

.stat strong {
  font-size: 1.7rem;
}

a:focus-visible {
  outline: 3px solid #80a942;
  outline-offset: 5px;
}

@media (max-width:640px) {
  .client-list {
    grid-template-columns: 1fr;
  }

  .split-grid {
    gap: 20px;
  }

  .hero-content {
    padding: 50px 0;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .card img {
    height: 240px;
  }

  .menu a {
    white-space: nowrap;
  }

  .section {
    padding: 38px 0;
  }

}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

}

@media (max-width:640px) {
  .menu {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 4px 14px;
    overflow: visible;
    font-size: .85rem;
  }

  .menu a {
    text-align: center;
  }

}

/* Acceso por teclado y proporciones de las imágenes. */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 12px 18px;
  background: white;
  color: var(--green);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
main { scroll-margin-top: 160px; }

/* Identidad gráfica proporcionada por Sembrana. */
.brand { display: flex; align-items: center; gap: 8px; }
.brand::after { content: none; }
.brand-logo { width: 88px; height: 88px; object-fit: contain; flex-shrink: 0; }
.brand-label { display: grid; }
.brand-label small { max-width: 220px; }
@media (max-width: 640px) {
  .brand-logo { width: 70px; height: 70px; }
  .brand-label span { font-size: 2rem; }
}
