/* ---------------------------------------------------------------------------
   WebDBA — landing. Estilo claro y minimalista.
   --------------------------------------------------------------------------- */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f6f4;
  --ink: #14161a;
  --ink-soft: #4b5058;
  --line: #e5e4e0;
  --accent: #1f5eff;
  --accent-ink: #ffffff;
  --radius: 14px;
  --maxw: 1120px;
  --space: clamp(4rem, 9vw, 7.5rem);
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 12px 32px -12px rgba(20, 22, 26, .12);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.18rem; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }

img, svg { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.container.narrow { max-width: 760px; }

.sr-only, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto;
  clip: auto; z-index: 999; background: var(--ink); color: #fff;
  padding: .6rem 1rem; border-radius: 8px;
}

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; font: inherit; font-weight: 600; text-decoration: none;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  padding: .7rem 1.3rem; transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .9rem 1.7rem; font-size: 1.02rem; }
.btn-sm { padding: .5rem 1rem; font-size: .92rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #1a4fdb; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 600; color: var(--accent); margin-bottom: 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-name { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; }
.brand-name strong { font-weight: 700; }

.nav-list { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { text-decoration: none; color: var(--ink-soft); font-size: .96rem; font-weight: 500; }
.nav-list a:hover { color: var(--ink); }
.nav-list a.btn { color: var(--accent-ink); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-inner { max-width: 820px; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); margin-top: 1.4rem; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3.5rem);
  margin: 3rem 0 0; padding-top: 2rem; border-top: 1px solid var(--line);
}
.hero-stats div dt { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.hero-stats div dd { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Trust ---------- */
.trust { padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.trust-label { text-align: center; color: var(--ink-soft); font-size: .85rem; letter-spacing: .04em; }
.trust-logos {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: clamp(1.5rem, 5vw, 3.2rem); list-style: none; margin: 1.2rem 0 0; padding: 0;
}
.trust-logos li { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: #9a9a93; }

/* ---------- Secciones ---------- */
.section { padding: var(--space) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 3.5rem; }
.section-sub { color: var(--ink-soft); margin-top: 1rem; font-size: 1.05rem; }

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--ink-soft); font-size: .98rem; }

.section-alt .card { background: #fff; }

/* ---------- Proceso ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); counter-reset: step;
}
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem;
}
.step-num { font-family: var(--serif); font-size: 1.15rem; color: var(--accent); font-weight: 600; }
.step h3 { margin: .7rem 0 .5rem; }
.step p { color: var(--ink-soft); font-size: .97rem; }

/* ---------- Casos ---------- */
.case {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; background: #fff;
  display: flex; flex-direction: column; gap: .5rem;
}
.case-tag { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.case p { color: var(--ink-soft); font-size: .97rem; }
.case-metrics { list-style: none; margin: .8rem 0 0; padding: .9rem 0 0; border-top: 1px solid var(--line); display: flex; gap: 1.6rem; }
.case-metrics li { font-size: .88rem; color: var(--ink-soft); }
.case-metrics strong { display: block; font-size: 1.25rem; color: var(--ink); letter-spacing: -0.02em; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split-text p { color: var(--ink-soft); margin-top: 1rem; }
.split-text h2 { margin-bottom: .5rem; }

.checklist { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .7rem; }
.checklist li { position: relative; padding-left: 1.8rem; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem;
  border-radius: 50%; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 78% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 78% no-repeat;
}

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; }
.facts div { background: #fff; padding: 1.6rem; }
.facts dt { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.facts dd { margin: 0; color: var(--ink-soft); font-size: .92rem; }

/* ---------- Tech ---------- */
.tech div { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.tech h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: .6rem; }
.tech p { color: var(--ink-soft); font-size: .97rem; }

/* ---------- Quote ---------- */
.quote { margin: 0; max-width: 820px; }
.quote blockquote {
  margin: 0; font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500; line-height: 1.35; letter-spacing: -0.01em;
}
.quote figcaption { margin-top: 1.5rem; display: flex; flex-direction: column; }
.quote figcaption strong { font-weight: 600; }
.quote figcaption span { color: var(--ink-soft); font-size: .95rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
.faq summary {
  cursor: pointer; font-weight: 600; list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: .8rem; color: var(--ink-soft); }

/* ---------- Contacto ---------- */
.section-cta { background: var(--bg-alt); }
.contact-info { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 1rem; }
.contact-info li { display: flex; flex-direction: column; }
.contact-info span { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.contact-info a { text-decoration: none; font-weight: 500; }
.contact-info a:hover { text-decoration: underline; }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.2rem); }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .9rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: .7rem .85rem;
  width: 100%; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 94, 255, .15);
}
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: #d33; }
.form button { width: 100%; margin-top: .3rem; }
.form-status { margin-top: 1rem; font-size: .95rem; font-weight: 500; min-height: 1.2em; }
.form-status.ok { color: #1a7f45; }
.form-status.err { color: #c62828; }
.form-legal { margin-top: .9rem; font-size: .82rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d7d8dc; padding: 3.5rem 0 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.site-footer .brand { color: #fff; }
.footer-tag { margin-top: .6rem; color: #a3a5ac; font-size: .95rem; max-width: 32ch; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.site-footer nav a { color: #d7d8dc; text-decoration: none; font-size: .95rem; }
.site-footer nav a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-top: 1.5rem; font-size: .85rem; color: #9a9ca3; }
.footer-bottom a { color: #9a9ca3; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4, .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; background: transparent; border: 1px solid var(--line);
    border-radius: 10px; cursor: pointer; position: relative;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ""; position: absolute; width: 18px; height: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle-bar::before { transform: translateY(-6px); }
  .nav-toggle-bar::after { transform: translateY(6px); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: rotate(-45deg); }

  .nav-list {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .5rem 1.5rem 1.25rem; display: none;
  }
  .nav-list.open { display: flex; }
  .nav-list li { padding: .2rem 0; }
  .nav-list a { display: block; padding: .6rem 0; font-size: 1rem; }
  .nav-list a.btn { margin-top: .6rem; text-align: center; }
}

@media (max-width: 560px) {
  .grid-3, .grid-4, .steps, .facts { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem 2.5rem; }
  .case-metrics { gap: 1.2rem; }
}
