/* ============================================================
   JOSEMA GUTIÉRREZ — Estilos principales
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --texto:        #1B1B1B;
  --fondo:        #F8F8F6;
  --acento:       #1F4D45;
  --acento-claro: #2d6a5f;
  --suave:        #efece6;
  --linea:        #e2ddd2;
  --gris:         #6b6b6b;
  --logos-bg:     #b2c8c4;
}

/* ── Reset ──────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', -apple-system, system-ui, sans-serif;
  color: var(--texto);
  background: var(--fondo);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container        { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px;  margin: 0 auto; padding: 0 24px; }

/* ── Header ─────────────────────────────────────────────────── */
header {
  padding: 16px 0;
  border-bottom: 1px solid var(--linea);
  position: sticky;
  top: 0;
  background: var(--fondo);
  z-index: 10;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.brand {
  display: block;
  flex: 0 1 195px;
  min-width: 0;
}

.brand img {
  display: block;
  width: 195px;
  max-width: 100%;
  height: auto;
}

header nav { flex-shrink: 0; }

nav a {
  color: var(--texto);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  margin-left: 28px;
}

nav a:hover { color: var(--acento); }

nav .btn-small {
  background: var(--acento);
  color: white;
  padding: 10px 18px;
  border-radius: 4px;
  margin-left: 28px;
}

nav .btn-small:hover {
  background: var(--acento-claro);
  color: white;
}

@media (max-width: 820px) {
  header .container { gap: 20px; }
  .brand { flex-basis: 210px; }
  .brand img { width: 210px; }
  nav a:not(.btn-small) { display: none; }
  nav .btn-small { margin-left: 0; font-size: 14px; padding: 8px 14px; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 112px 0 96px;
  background: var(--texto);
  color: var(--fondo);
  border-top: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero .eyebrow        { color: #8cc8b8; }
.hero h1,
.hero h1 span         { color: white; }
.hero h1 .ac          { color: #8cc8b8; }
.hero p.lead          { color: #cfd6d3; }
.hero .meta           { color: #a4afac; }
.hero .meta::before   { color: #8cc8b8; }

.hero .btn-ghost {
  color: white;
  border-color: rgba(255,255,255,0.7);
}

.hero .btn-ghost:hover {
  background: white;
  color: var(--texto);
  border-color: white;
}

.hero .hero-photo {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.18);
  color: #a4afac;
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo      { max-width: 360px; margin: 0 auto; }
  .hero            { padding: 64px 0 56px; }
}

/* ── Tipografía ─────────────────────────────────────────────── */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 600;
  color: var(--acento);
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(38px, 5.4vw, 60px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  max-width: 18ch;
}

h1 .ac { color: var(--acento); }

h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  max-width: 22ch;
}

h2 .ac { color: var(--acento); }

.hero p.lead {
  font-size: clamp(18px, 2vw, 21px);
  color: var(--gris);
  max-width: 50ch;
  margin-bottom: 32px;
}

.section-lead {
  color: var(--gris);
  font-size: 19px;
  max-width: 58ch;
  margin-bottom: 48px;
}

.meta {
  margin-top: 28px;
  font-size: 14px;
  color: var(--gris);
}

.meta::before {
  content: "↳ ";
  color: var(--acento);
}

/* ── Botones ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--acento);
  color: white;
  text-decoration: none;
  padding: 16px 28px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 16px;
  transition: background .15s;
}

.btn:hover { background: var(--acento-claro); }

.btn-ghost {
  background: transparent;
  color: var(--texto);
  border: 1px solid var(--texto);
}

.btn-ghost:hover {
  background: var(--texto);
  color: var(--fondo);
}

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Foto hero ──────────────────────────────────────────────── */
.hero-photo {
  aspect-ratio: 4/5;
  background: var(--suave);
  border: 1px dashed var(--linea);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gris);
  font-size: 13px;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Sections ───────────────────────────────────────────────── */
section {
  padding: 80px 0;
}

section.alt {
  background: white;
}

/* Línea solo cuando cambia el color de fondo */
section:not(.alt) + section.alt,
section.alt + section:not(.alt) {
  border-top: 1px solid var(--linea);
}

/* ── CTA inline ─────────────────────────────────────────────── */
.cta-inline {
  margin-top: 56px;
  padding: 28px 32px;
  background: var(--suave);
  border-left: 4px solid var(--acento);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-inline p {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  max-width: 50ch;
}

.cta-inline .btn { flex-shrink: 0; }

@media (max-width: 720px) {
  .cta-inline {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
}

/* ── Logos band ─────────────────────────────────────────────── */
.logos-band {
  padding: 48px 0;
  background: var(--logos-bg);
}

.logos-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 600;
  color: var(--acento);
  margin-bottom: 24px;
}

.logos-carousel-wrap {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 8px;
  align-items: center;
}

.logos-viewport {
  overflow: hidden;
}

.logos-track {
  display: flex;
  transition: transform 0.4s ease;
}

.logos-slide {
  min-width: 100%;
  display: grid;
}

.logo-item {
  aspect-ratio: 1;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.45);
  opacity: 0.85;
}

.logos-arrow {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--acento);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  transition: opacity .15s;
}

.logos-arrow:hover { opacity: 1; }

@media (max-width: 720px) {
  .logos-carousel-wrap {
    grid-template-columns: 32px 1fr 32px;
    gap: 4px;
  }
  .logo-item { padding: 12px; }
}

/* ── El problema ────────────────────────────────────────────── */
.problema-content {
  margin-top: 32px;
  max-width: 75%;
}

.problema-main p { margin-bottom: 18px; }

.problema-main .lead {
  font-size: 22px;
  font-weight: 700;
  color: var(--texto);
}

.problema-side {
  background: var(--fondo);
  border: 1px solid var(--linea);
  border-radius: 6px;
  padding: 32px;
}

.problema-side h3 { font-size: 22px; margin-bottom: 16px; }
.problema-side ul { padding-left: 20px; }

.problema-side li {
  color: var(--gris);
  font-size: 16px;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .problema-content { max-width: 100%; }
}

/* ── Método (grid 2x2) ─────────────────────────────────────── */
.metodo-list {
  counter-reset: step;
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 56px;
}

.metodo-step {
  display: flex;
  flex-direction: column;
}

.metodo-step .step-num {
  counter-increment: step;
  font-size: 32px;
  font-weight: 800;
  color: var(--acento);
  line-height: 1;
  margin-bottom: 14px;
  opacity: 0.3;
}

.metodo-step .step-num::before {
  content: counter(step, decimal-leading-zero);
}

.metodo-step h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.metodo-step p {
  color: var(--gris);
  font-size: 16px;
}

@media (max-width: 720px) {
  .metodo-list { grid-template-columns: 1fr; gap: 32px; }
}

/* ── CTA ligero (entre secciones) ──────────────────────────── */
.cta-ligero {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--linea);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-ligero p {
  margin: 0;
  font-size: 18px;
  color: var(--gris);
  max-width: 50ch;
}

.cta-ligero .btn { flex-shrink: 0; }

@media (max-width: 720px) {
  .cta-ligero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Proyectos (tarjetas) ───────────────────────────────────── */
.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.proyecto {
  background: var(--fondo);
  border: 1px solid var(--linea);
  border-radius: 6px;
  padding: 24px;
}

section.alt .proyecto { background: white; }

.proyecto .tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  color: var(--acento);
  background: var(--suave);
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 16px;
}

.proyecto h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.proyecto p {
  color: var(--gris);
  font-size: 15px;
  margin-bottom: 12px;
}

.proyecto a {
  color: var(--acento);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.proyecto a:hover { text-decoration: underline; }

.tag-destacado {
  background: var(--acento) !important;
  color: white !important;
}

.proyecto-nota {
  font-size: 14px;
  font-style: italic;
  color: var(--gris);
  margin-top: 4px;
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .proyectos-grid { grid-template-columns: 1fr; }
}

/* ── Servicios (layout horizontal) ──────────────────────────── */
.servicios-list {
  margin-top: 32px;
}

.servicio-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--linea);
  align-items: start;
}

.servicio-item:last-child {
  border-bottom: 1px solid var(--linea);
}

.servicio-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 600;
  color: var(--acento);
  padding-top: 4px;
}

.servicio-body h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.servicio-body p {
  color: var(--gris);
  font-size: 16px;
}

.servicio-body a {
  color: var(--acento);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: inline-block;
  margin-top: 8px;
}

.servicio-body a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .servicio-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ── CTA bloque ─────────────────────────────────────────────── */
.cta-block {
  background: var(--acento);
  color: white;
  border-radius: 8px;
  padding: 64px 48px;
  text-align: center;
  margin-top: 32px;
}

.cta-block h2 {
  color: white;
  margin: 0 auto 16px;
  max-width: 22ch;
}

.cta-block p {
  color: #c9d8d4;
  margin-bottom: 32px;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 18px;
}

.cta-block .btn {
  background: white;
  color: var(--acento);
}

.cta-block .btn:hover { background: var(--fondo); }

@media (max-width: 720px) {
  .cta-block { padding: 44px 28px; }
}

/* ── Formulario ─────────────────────────────────────────────── */
.form-wrap { margin-top: 32px; }

form .field { margin-bottom: 18px; }

form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

form input,
form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--linea);
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
  background: white;
  color: var(--texto);
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--acento);
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

form .submit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

form button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

form .privacy {
  font-size: 13px;
  color: var(--gris);
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--linea);
  padding: 48px 0 64px;
  background: white;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--gris);
}

footer a {
  color: var(--gris);
  text-decoration: none;
  margin-left: 20px;
}

footer a:hover { color: var(--acento); }

/* ── Utilidades ─────────────────────────────────────────────── */
.ac    { color: var(--acento); }
.serif {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
}
