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

:root {
  --green: #9dc215;
  --red: #e02020;
  --dark: #3d3d3d;
  --gray: #7a7a7a;
  --light: #f7f7f5;
  --border: #e4e4e0;
  /* sticky nav height */
  --nav-h: 73px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* clear the sticky nav */
[id] {
  scroll-margin-top: var(--nav-h);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #fff;
  color: var(--dark);
  font-size: 16px;
  line-height: 1.6;
  /* footer at bottom on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

main {
  flex: 1;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 3rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo img {
  height: 56px;
  width: auto;
  display: block;
}

.nav-logo-name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-logo-name strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.02em;
}

.nav-logo-name span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.15s;
}

@media (hover: hover) {
  nav a:hover {
    color: var(--green);
  }
}

/* ── HERO ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* first screen, capped */
  min-height: min(calc(100vh - var(--nav-h)), 56rem);
  min-height: min(calc(100svh - var(--nav-h)), 56rem);
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 3rem;
}

.hero-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1.25rem;
}

h1 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 1.5rem;
}

h1 span {
  color: var(--green);
}

.hero-desc {
  font-size: 1rem;
  color: var(--gray);
  max-width: 400px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  padding: 0.8rem 2rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid var(--green);
  transition:
    background 0.15s,
    color 0.15s;
  align-self: flex-start;
}

.btn {
  font-family: inherit;
  cursor: pointer;
}

@media (hover: hover) {
  .btn:hover {
    background: transparent;
    color: var(--green);
  }
}

.hero-img {
  background: var(--light);
}

.hero-img,
.permisos-img,
.card-img {
  display: flex;
}

.hero-img,
.permisos-img {
  min-height: 280px;
}

/* ── PLACEHOLDER ── */
.placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #ccc;
}

.placeholder svg {
  display: block;
}

.placeholder.on-green {
  color: rgba(255, 255, 255, 0.4);
}

.placeholder span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── SECTION BASE ── */
.section {
  padding: 5rem 3rem;
}

.label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}

h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 1rem;
}

.body-text {
  font-size: 0.95rem;
  color: var(--gray);
  max-width: 520px;
  line-height: 1.8;
}

/* ── SERVICIOS ── */
#servicios {
  background: var(--light);
}

.services {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.card {
  background: var(--light);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: #e8e8e4;
}

.card-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--green);
}

.card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

.card p {
  font-size: 0.875rem;
  color: var(--gray);
  line-height: 1.75;
}

/* ── PERMISOS ── */
#permisos {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.permisos-text {
  padding: 5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.permit-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.permit-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.875rem;
  color: var(--dark);
  line-height: 1.5;
}

.permit-item::before {
  content: "";
  width: 8px;
  height: 8px;
  min-width: 8px;
  background: var(--green);
  margin-top: 0.35rem;
}

.permisos-img {
  background: var(--green);
}

/* ── CONTACTO ── */
#contacto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-intro {
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
}

.contact-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--gray);
}

.contact-row strong {
  min-width: 80px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark);
}

.contact-row a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  .contact-row a:hover {
    color: var(--green);
  }
}

.social h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.social-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  color: var(--dark);
  font-weight: 700;
  text-decoration: none;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.social-link svg {
  flex-shrink: 0;
  color: var(--green);
}

.social-link small {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--gray);
}

@media (hover: hover) {
  .social-link:hover {
    border-color: var(--green);
    color: var(--green);
  }
}

/* ── FOOTER ── */
footer {
  border-top: 3px solid var(--green);
  background: var(--dark);
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.footer-logo img {
  height: 40px;
  width: auto;
  background: #fff;
  padding: 3px;
}

.footer-logo-name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.footer-logo-name strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.footer-logo-name span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

footer p {
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.05em;
}

/* ── 404 ── */
.notfound {
  padding: 6rem 1.5rem;
  text-align: center;
}

.notfound h1 {
  margin-bottom: 1rem;
}

.notfound p:not(.label) {
  color: var(--gray);
  margin-bottom: 2rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  :root {
    --nav-h: 61px;
  }

  nav {
    padding: 0.5rem 1.25rem;
    gap: 1rem;
  }
  .nav-logo img {
    height: 44px;
  }
  nav ul {
    gap: 1.25rem;
  }
  nav ul a {
    display: block;
    padding: 0.75rem 0;
    font-size: 0.72rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-text {
    padding: 3rem 1.25rem;
  }
  h1 {
    font-size: clamp(2rem, 8.5vw, 2.6rem);
  }
  .hero-desc {
    max-width: none;
    margin-bottom: 2rem;
  }
  .hero-img {
    min-height: 200px;
  }

  .hero .btn {
    padding: 1rem 2rem;
  }

  .section {
    padding: 3rem 1.25rem;
  }

  .services {
    margin-top: 2rem;
    grid-template-columns: 1fr;
  }
  .card {
    padding: 1.5rem 1.25rem;
  }

  #permisos {
    grid-template-columns: 1fr;
  }
  .permisos-text {
    padding: 3rem 1.25rem;
  }
  .permisos-img {
    min-height: 180px;
  }

  #contacto {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem 1.25rem;
  }

  .notfound {
    padding: 4rem 1.25rem;
  }
}

/* tablet: image beside text */
@media (min-width: 521px) and (max-width: 860px) {
  .card {
    display: grid;
    grid-template-columns: 2fr 3fr;
    grid-template-rows: auto auto 1fr;
    gap: 0.5rem 1.5rem;
  }
  .card-img {
    grid-row: 1 / -1;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 520px) {
  /* hide wordmark so links fit */
  .nav-logo-name {
    display: none;
  }

  /* full-width button */
  .hero .btn {
    align-self: stretch;
    text-align: center;
  }
}
