/* ============================================================
   Sistema visual compartido (web, conexión, páginas legales)
   Geist + Geist Mono · neutros zinc · un solo acento (verde mar)
   ============================================================ */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-2: #d4d4d8;
  --night: #121214;
  --night-2: #1c1c1f;
  --accent: #0f6b5a;
  --accent-ink: #0b5246;
  --accent-soft: #e6f1ee;
  --warn: #b4532a;
  --danger: #b42318;
  --radius: 14px;
  --radius-lg: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 24px 48px -24px rgba(24, 24, 27, 0.18);
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* Grano sutil fijo (no repinta al hacer scroll) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 767px) { .wrap { padding: 0 16px; } }

.mono { font-family: var(--mono); font-feature-settings: 'tnum' 1; letter-spacing: -0.01em; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 58ch; }
.muted { color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  --bg-btn: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  background: var(--bg-btn);
  color: #fff;
  font: 600 15px/1 var(--font);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px -14px rgba(24, 24, 27, 0.6);
  transition: transform 0.35s var(--ease), background-color 0.25s var(--ease), box-shadow 0.35s var(--ease);
  will-change: transform;
}
.btn:hover { background: #27272a; }
.btn:active { transform: scale(0.98) translateY(1px); }
.btn--accent { --bg-btn: var(--accent); }
.btn--accent:hover { background: var(--accent-ink); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn--ghost:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--light { --bg-btn: #fafafa; color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Navegación ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 250, 250, 0.78);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(228, 228, 231, 0.7);
}
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.03em; font-size: 17px; text-decoration: none; }
.brand__mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.brand__mark svg { width: 15px; height: 15px; }
.nav__links { display: flex; gap: 28px; font-size: 14.5px; color: var(--ink-2); }
.nav__links a { text-decoration: none; transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav .btn { height: 40px; padding: 0 16px; font-size: 14px; }
@media (max-width: 860px) { .nav__links { display: none; } }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 8px; align-content: start; }
.field > label { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.field .hint { font-size: 13px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--danger); display: none; }
.field.has-error .err { display: block; }
.field.has-error input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1); }
input[type='text'], input[type='email'], input[type='tel'], input:not([type]) {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font: 400 16px var(--font);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input::placeholder { color: #a1a1aa; }
input:hover { border-color: #a1a1aa; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 107, 90, 0.14); }

/* ---------- Pie ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 14px; color: var(--muted); }
.foot__in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: end; }
.foot__links { display: flex; gap: 20px; justify-content: flex-end; flex-wrap: wrap; }
.foot__links a { text-decoration: none; }
.foot__links a:hover { color: var(--ink); }
@media (max-width: 767px) { .foot__in { grid-template-columns: 1fr; } .foot__links { justify-content: flex-start; } }

/* ---------- Aparición al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Páginas de texto (privacidad, términos) ---------- */
.doc { max-width: 720px; padding: 64px 0 96px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 12px 0 8px; }
.doc h2 { font-size: 1.25rem; letter-spacing: -0.02em; margin: 40px 0 10px; }
.doc p { color: var(--ink-2); margin: 0 0 12px; max-width: 68ch; }
.doc a { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
