/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Public Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: 'Source Serif 4', Georgia, serif; margin: 0 0 .6em; line-height: 1.15; font-weight: 700; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul, dl { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* ===== Theme tokens ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f7f5ef;
  --surface: #faf8f2;
  --surface-border: rgba(34,28,10,0.10);
  --text: #201c14;
  --text-muted: #6b6255;
  --accent: #e8b400;
  --accent-2: #f4c430;
  --accent-text: #8a6608;
  --ok: #1f9d6b;
  --radius: 16px;
  --container: 1120px;
}

/* Claro por defecto para todo el mundo ("Cuaderno de datos" — dirección A,
   elegida por David el 2026-09-08 tras comparar tres paletas). Fondo
   blanco, sin cuadrícula, sin azul/morado. */

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.text-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Background grid ===== */
/* Quitada (dirección A, 2026-09-08): David no la quería, quedaba como
   estética "IA/SaaS" típica. .bg-grid sigue en el HTML de las 27 páginas
   (div vacío, aria-hidden) pero ya no pinta nada. */
.bg-grid { display: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: var(--text);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(232,180,0,.35); }
.btn-ghost {
  background: transparent;
  border-color: var(--surface-border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-text); color: var(--accent-text); }
.btn-small { padding: .6em 1.3em; font-size: .875rem; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--surface-border); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo { display: flex; align-items: center; gap: .6em; font-family: 'Public Sans', sans-serif; font-weight: 700; font-size: 1.15rem; }
.logo-mark { flex-shrink: 0; display: block; }
.dot { color: var(--accent-text); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--text-muted); font-weight: 500; font-size: .95rem; transition: color .15s ease; }
.nav a:hover { color: var(--accent-text); }
.header-cta { margin-left: 8px; }
.lang-switch {
  display: flex; align-items: center; gap: 6px; font-family: 'IBM Plex Mono', monospace;
  font-size: .78rem; letter-spacing: .02em; color: var(--text-muted);
}
.lang-switch a { color: var(--text-muted); font-weight: 500; }
.lang-switch a:hover { color: var(--accent-text); }
.lang-switch a[aria-current="page"] { color: var(--accent-text); font-weight: 700; }
.lang-switch span { color: var(--text-muted); opacity: .5; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 110px 0 90px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.hero-bg {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 0;
  overflow: hidden;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; display: block; }
/* Foto de plano técnico con lápiz (Unsplash, licencia libre) (2026-10-02, pedida por David).
   Velo blanco casi opaco a la izquierda, donde va el texto, que se aclara
   hacia la derecha para que se vea el plano; y fundido a blanco
   abajo para enlazar con la franja de herramientas. */
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.92) 44%, rgba(255,255,255,.45) 66%, rgba(255,255,255,.15) 100%);
}
.hero-inner { max-width: 560px; position: relative; z-index: 1; }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--accent-text);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1em;
}
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.2rem); }
.hero-sub { color: var(--text-muted); font-size: 1.08rem; max-width: 50ch; }
.hero-actions { display: flex; gap: 14px; margin: 1.6em 0 2.4em; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; border-top: 1px solid var(--surface-border); padding-top: 24px; }
.hero-stats dt { font-size: .8rem; color: var(--text-muted); margin-bottom: .3em; }
.hero-stats dd { margin: 0; font-weight: 700; font-family: 'Public Sans', sans-serif; }


/* ===== Trust strip ===== */
.trust-strip { border-top: 1px solid var(--surface-border); border-bottom: 1px solid var(--surface-border); padding: 22px 0; }
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .85rem;
  letter-spacing: .03em;
}

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); max-width: 20ch; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 60ch; }

/* ===== Services grid ===== */
.grid { display: grid; gap: 24px; margin-top: 48px; }
.services-grid { grid-template-columns: repeat(3, 1fr); }
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-text); }
.card-more {
  display: inline-block;
  margin-top: 14px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent-text);
}
.card-image {
  margin: -28px -28px 20px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--surface-border);
}
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card h3 { font-size: 1.1rem; margin-bottom: .5em; }
.card p { color: var(--text-muted); font-size: .95rem; margin: 0; }

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px; }
.step {
  padding: 28px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
  background: var(--surface);
}
.step-image {
  margin: -28px -22px 18px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--surface-border);
}
.step-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.step-num {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--accent-text);
  font-size: .85rem;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.05rem; }
.step p { color: var(--text-muted); font-size: .92rem; margin: 0; }

/* ===== Casos ilustrativos (antes/después) ===== */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.case-card { padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--surface-border); background: var(--surface); display: grid; gap: 16px; }
.case-tag {
  display: inline-block; width: fit-content; margin: 0;
  font-family: 'IBM Plex Mono', monospace; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent-text); border: 1px solid var(--surface-border); border-radius: 999px; padding: 3px 10px;
}
.case-card h3 { font-size: 1.05rem; margin: 0; }
.case-col { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--surface-border); }
.case-col span { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; }
.case-col p { margin: 0; font-size: .9rem; color: var(--text-muted); }
.case-after span { color: var(--ok); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.value-list { display: grid; gap: 20px; }
.value-list li {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  background: var(--surface);
}
.value-list strong { font-family: 'Public Sans', sans-serif; }
.value-list span { color: var(--text-muted); font-size: .92rem; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-info a { color: var(--accent-text); font-weight: 600; font-size: 1.05rem; }
.contact-form {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 18px;
}
.form-row { display: grid; gap: 8px; }
.form-row label { font-size: .88rem; color: var(--text-muted); }
.form-row input, .form-row textarea {
  background: var(--bg);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--accent-text); }
.form-note { font-size: .85rem; color: var(--ok); min-height: 1.2em; margin: 0; text-align: center; }
.form-consent { font-size: .78rem; color: var(--text-muted); margin: 0; text-align: center; }
.form-consent a { color: var(--accent-text); }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--surface-border); padding: 36px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-inner p { margin: 0; color: var(--text-muted); font-size: .88rem; }
.footer-text { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.footer-text .footer-credit { font-size: .78rem; opacity: .75; }
.footer-text .footer-legal { font-size: .78rem; color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-social { display: flex; gap: 10px; margin-bottom: 12px; }
.footer-social a {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  transition: color .15s ease, border-color .15s ease;
}
.footer-social a:hover { color: var(--accent-text); border-color: var(--accent-text); }
.footer-social svg { width: 16px; height: 16px; }

/* ===== Footer — stack de herramientas ===== */
.footer-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--surface-border);
}
.footer-stack-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  opacity: .7;
}
.footer-stack-icons { display: flex; align-items: center; gap: 16px; }
.footer-stack-icons svg { width: 18px; height: 18px; display: block; color: var(--text-muted); opacity: .8; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 60px; }
  .hero-bg::after { background: rgba(255,255,255,.86); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--surface-border);
    padding: 16px 24px 24px;
    gap: 16px;
  }
  .site-header.nav-open .header-cta { display: inline-flex; margin: 8px 24px 20px; }
  .services-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
}
