/* FosasSepticas.cl — directorio estático
   Sistema visual inspirado en cercai.cl (oct-2026): fondo blanco, Geist,
   botones de tinta, un solo acento (verde agua) y entradas suaves al hacer scroll.
   Este archivo se edita a mano: el generador NO lo regenera. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --ink: #111a17;
  --ink-2: #2b3632;
  --muted: #56635e;
  --line: #e3e8e6;
  --line-strong: #c9d2ce;
  --brand: #0f7b6c;
  --brand-dark: #0a5c51;
  --brand-soft: #e4f3ef;
  --gold: #a26a00;
  --gold-soft: #fff4dc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 26, 23, 0.04), 0 8px 24px rgba(17, 26, 23, 0.06);
  --shadow-pop: 0 16px 40px rgba(17, 26, 23, 0.12);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --max: 1120px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.2; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.logo span { color: var(--brand); }
.nav { display: flex; align-items: center; gap: 0.25rem 1.35rem; }
.nav a:not(.btn) {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav a:not(.btn):hover { color: var(--brand); }
.nav-toggle { display: none; }

@media (max-width: 899px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 11px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s var(--ease), opacity 0.2s;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 0.8rem 0.25rem; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 0.85rem; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.85rem;
  border-radius: 10px;
  padding: 0.7rem 1.3rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s var(--ease), box-shadow 0.18s;
}
a.btn, a.btn:hover { text-decoration: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--ink); color: #fff !important; border-color: var(--ink); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff !important; box-shadow: 0 8px 20px rgba(15, 123, 108, 0.25); }
.btn-secondary { background: #fff; color: var(--ink) !important; border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink) !important; }
.btn-accent { background: var(--brand); color: #fff !important; border-color: var(--brand); }
.btn-accent:hover { background: var(--brand-dark); color: #fff !important; }
.btn-sm { min-height: 2.4rem; padding: 0.45rem 0.95rem; font-size: 0.88rem; }
.site-header .btn-primary { background: var(--brand); border-color: var(--brand); }
.site-header .btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(15, 123, 108, 0.10), transparent 70%),
    #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, #000 30%, transparent 80%);
  opacity: 0.6;
  pointer-events: none;
}
.hero .container { position: relative; }
.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid rgba(15, 123, 108, 0.18);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 0 auto 1.1rem;
  max-width: 16ch;
}
.hero .lead {
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  color: var(--muted);
  max-width: 40rem;
  margin: 0 auto 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.hero-checks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  padding: 0;
  margin: 1.5rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.hero-checks li::before { content: "✓"; color: var(--brand); font-weight: 700; margin-right: 0.4rem; }
@media (max-width: 560px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Banda de cifras ---------- */
.stats { border-block: 1px solid var(--line); background: var(--surface-2); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1rem;
  padding: 2rem 0;
  text-align: center;
}
@media (min-width: 760px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stats-grid strong {
  display: block;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stats-grid span { font-size: 0.9rem; color: var(--muted); }

/* ---------- Secciones ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(1.55rem, 3.2vw, 2.1rem); margin: 0 0 0.6rem; font-weight: 700; }
.section .sub { color: var(--muted); margin: 0 0 2rem; max-width: 42rem; }
@media (max-width: 560px) { .section { padding: 3rem 0; } }

/* ---------- Grids y tarjetas ---------- */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 0.45rem; font-size: 1.08rem; font-weight: 700; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand); }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Tarjetas que son un enlace completo (<a class="card card-link">) */
a.card-link {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s var(--ease), box-shadow 0.22s, border-color 0.22s;
}
a.card-link h3 { color: var(--ink); padding-right: 1.5rem; }
a.card-link::after {
  content: "→";
  position: absolute;
  top: 1.3rem;
  right: 1.3rem;
  color: var(--line-strong);
  transition: transform 0.22s var(--ease), color 0.22s;
}
a.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); border-color: rgba(15, 123, 108, 0.35); }
a.card-link:hover h3 { color: var(--brand-dark); }
a.card-link:hover::after { color: var(--brand); transform: translateX(3px); }

/* Tarjeta de empresa: acciones siempre abajo, a la misma altura */
.company-card { display: flex; flex-direction: column; transition: box-shadow 0.22s, border-color 0.22s; }
.company-card:hover { box-shadow: var(--shadow-pop); border-color: var(--line-strong); }
.card-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.6rem; }
.company-zone { font-size: 0.88rem !important; margin: 0 0 1.1rem !important; }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.6rem;
  margin-top: auto;
  padding-top: 0.25rem;
}
.link-web { font-size: 0.88rem; color: var(--muted); margin-left: 0.25rem; }
.link-web:hover { color: var(--brand); }

.badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}
.badge-free { background: var(--surface-2); color: var(--muted); }
.badge-dest { background: var(--gold-soft); color: var(--gold); }
.badge-ok { background: var(--brand-soft); color: var(--brand-dark); }

.featured-block {
  background: linear-gradient(180deg, var(--gold-soft) 0%, #fff 45%);
  border: 1px solid #ecd39a;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}
.featured-head h2 { margin: 0 0 0.35rem; color: var(--gold); }
.featured-head p { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }
.card-featured { border-color: #ecd39a; }
.listing-block > h2 { margin-bottom: 0.35rem; }

.company-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.85rem 0; }
.tag {
  font-size: 0.78rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  color: var(--ink-2);
}

/* ---------- Páginas internas ---------- */
.breadcrumb { font-size: 0.86rem; color: var(--muted); padding: 1.25rem 0 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.page-header { padding: 1.75rem 0 1.5rem; }
.page-header h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  letter-spacing: -0.035em;
  font-weight: 800;
}
.page-header .intro { color: var(--muted); max-width: 44rem; margin: 0; font-size: 1.05rem; }

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  max-width: 740px;
}
.prose h2 { margin-top: 2rem; font-size: 1.3rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4rem; font-size: 1.06rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.3rem; }
.prose .callout {
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  padding: 1rem 1.15rem;
  border-radius: 0 10px 10px 0;
  margin: 1.5rem 0;
}
@media (max-width: 560px) { .prose { padding: 1.4rem 1.15rem; } }

/* ---------- Formularios ---------- */
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
input, select, textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  margin-bottom: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 123, 108, 0.15);
}
textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: -0.5rem; margin-bottom: 1rem; }

/* ---------- Precios (para empresas) ---------- */
.price-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.price-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow-pop); }
.price-card .price { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); margin: 0.5rem 0 1rem; }
.price-card ul { margin: 0 0 1.25rem; padding-left: 1.1rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #b9c6c1;
  padding: 3rem 0 2rem;
  margin-top: 3rem;
  font-size: 0.92rem;
}
.site-footer a { color: #e9f1ee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 1.75rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { color: #fff; margin: 0 0 0.7rem; font-size: 0.95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.82rem;
  opacity: 0.8;
}

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
table.data th, table.data td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
table.data th { background: var(--surface-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table.data tr:last-child td { border-bottom: 0; }
/* Móvil: cada fila pasa a tarjeta y cada celda muestra su encabezado (data-label lo pone build_site.py) */
@media (max-width: 560px) {
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
  table.data tr:last-child { border-bottom: 0; }
  table.data td { border-bottom: 0; padding: 0.3rem 0.9rem; }
  table.data td[data-label]::before { content: attr(data-label); display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
}

.notice {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--ink-2);
  margin: 0 0 1.75rem;
}

/* ---------- Animaciones (las activa main.js; sin JS todo se ve igual) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, a.card-link { transition: none; }
}
@media (max-width: 560px) {
  .card-actions--full .btn { flex: 1 1 100%; }
}
.card-actions--full { margin-top: 1.25rem; }

/* ---------- Sprint A: lead primero ---------- */
.btn-lg { min-height: 3.2rem; padding: 0.85rem 1.6rem; font-size: 1rem; }
.lead-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  background: var(--brand-soft);
  border: 1px solid rgba(15, 123, 108, 0.25);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin: 0 0 2.25rem;
}
.lead-box-text { flex: 1 1 420px; min-width: 0; }
.lead-box h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: 0 0 0.4rem; }
.lead-box p { margin: 0 0 0.75rem; color: var(--ink-2); max-width: 46rem; }
.lead-checks { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; padding: 0; margin: 0; font-size: 0.88rem; color: var(--ink-2); }
.lead-checks li::before { content: "✓"; color: var(--brand); font-weight: 700; margin-right: 0.35rem; }
@media (max-width: 560px) {
  .lead-box { padding: 1.25rem; }
  .lead-box .btn { flex: 1 1 100%; }
}
.reveal-box { display: contents; }
.ficha-web { margin: 1rem 0 0 !important; }

/* Formulario de cotización */
.cotizar-grid { align-items: start; }
@media (min-width: 900px) { .cotizar-grid { grid-template-columns: 3fr 2fr; } }
.form-row { display: grid; gap: 0 1rem; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
.check-row { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0 0 1rem; }
.check-row input { width: 1.15rem; height: 1.15rem; margin: 0.15rem 0 0; flex: none; accent-color: var(--brand); }
.check-row label { font-weight: 500; margin: 0; }
.steps { margin: 0.5rem 0 1rem; padding-left: 1.2rem; color: var(--ink-2); display: grid; gap: 0.5rem; }
#form-cotizar .btn { width: 100%; }

/* El atributo hidden siempre gana (si no, .check-row{display:flex} lo pisa) */
[hidden] { display: none !important; }
