/* Estilos del portfolio. Mobile-first: primero el celular, después media queries para pantallas grandes. */

:root {
  --bg: #ffffff;
  --surface: #f4f6fa;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #1d4ed8;
  --wsp: #0e7a43;       /* verde oscuro: texto blanco con contraste 5.4:1 */
  --wsp-hover: #0b6637;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding-bottom: 88px; /* espacio para el botón flotante */
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 7vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 5vw, 2.25rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

section { padding: 56px 0; scroll-margin-top: 8px; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: background-color .15s, transform .15s;
}
.btn:active { transform: scale(.98); }
.btn-wsp { background: var(--wsp); color: #fff; }
.btn-wsp:hover { background: var(--wsp-hover); }
.btn-ghost { color: var(--text); border: 2px solid var(--line); background: var(--bg); }
.btn-ghost:hover { border-color: var(--text); }
.icon { width: 22px; height: 22px; fill: currentColor; flex: none; }

/* Inicio */
.hero {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--surface), var(--bg));
}
.eyebrow { font-size: .9375rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.lead { font-size: 1.1875rem; color: var(--muted); max-width: 38em; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }

/* Secciones y tarjetas */
.section-lead { color: var(--muted); max-width: 40em; margin-bottom: 28px; }
.section-alt { background: var(--surface); }
.grid { display: grid; gap: 16px; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { color: var(--muted); }
.card-featured { border: 2px solid var(--text); }
.badge {
  align-self: flex-start;
  font-size: .8125rem;
  font-weight: 700;
  color: #fff !important;
  background: var(--text);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 12px;
}
.price { font-weight: 700; color: var(--text) !important; margin-top: auto; padding-top: 4px; }
.card-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 700;
  color: var(--wsp);
}
.card-link::after { content: " →"; white-space: pre; }

/* Casos */
.case { padding: 0; overflow: hidden; }
.case > :not(img) { margin-left: 24px; margin-right: 24px; }
.case > :last-child { margin-bottom: 24px; }
.case img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.case strong { color: var(--text); }
.tag { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent) !important; margin-bottom: 4px; }
.note { font-size: .9375rem; font-style: italic; }

/* Cómo trabajo */
.steps { list-style: none; counter-reset: paso; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.steps li {
  counter-increment: paso;
  position: relative;
  padding: 18px 20px 18px 68px;
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--muted);
}
.steps li::before {
  content: counter(paso);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: var(--text);
}
.steps strong { color: var(--text); display: block; }
.highlight {
  font-weight: 700;
  padding: 16px 20px;
  border-left: 4px solid var(--wsp);
  background: #ecf7f0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Sobre mí y contacto */
.narrow { max-width: 720px; }
.btn-block { width: 100%; }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; }
.contact-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); }
.contact-list span { font-weight: 700; min-width: 90px; }
.contact-list a { overflow-wrap: anywhere; padding: 10px 0; }

/* Footer */
.footer { padding: 32px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
.footer p { margin: 0; }
.footer a { color: var(--muted); }

/* Botón flotante de WhatsApp */
.wsp-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--wsp);
  color: #fff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .25);
}
.wsp-float:hover { background: var(--wsp-hover); }
.wsp-float svg { width: 32px; height: 32px; fill: currentColor; }

@media (min-width: 600px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (min-width: 760px) {
  .grid-3, #servicios .grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .btn-block { width: auto; }
}

@media (min-width: 900px) {
  section { padding: 88px 0; }
  .hero { padding: 112px 0 96px; }
}
