/* ============================================================
   TOKENS
============================================================ */
:root {
  --ink:      #12202e;
  --muted:    #56697a;
  --line:     #dde3ea;
  --bg:       #f4f6f9;
  --surface:  #ffffff;
  --agua:     #0b6fb8;
  --agua-d:   #075a96;
  --agua-lt:  #e8f3fc;
  --gas:      #d4860a;
  --gas-d:    #a86808;
  --gas-lt:   #fef4e0;
  --luz:      #c94b22;
  --luz-d:    #a33b18;
  --luz-lt:   #fdeee8;
  --brand:    #0b5fa5;
  --brand-d:  #084a83;
  --wa:       #25d366;
  --wa-d:     #1da851;
  --wa-ink:   #063d20;
  --radius-s: 8px;
  --radius:   14px;
  --radius-l: 20px;
  --maxw:     1200px;
  --shadow-s: 0 1px 3px rgba(12,28,44,.07), 0 4px 12px rgba(12,28,44,.06);
  --shadow:   0 2px 4px rgba(12,28,44,.06), 0 8px 24px rgba(12,28,44,.08);
  --shadow-l: 0 4px 8px rgba(12,28,44,.07), 0 16px 40px rgba(12,28,44,.12);
  --sans:     system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition: .18s ease;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.58;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.18; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.8vw, 2.1rem); }
h3 { font-size: clamp(1rem, 1.5vw, 1.15rem); }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
ul { padding: 0; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(16px, 4vw, 28px); }

/* Accessibility */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: #fff; padding: 10px 14px; z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }
:focus-visible { outline: 3px solid var(--gas); outline-offset: 3px; border-radius: 4px; }

/* ============================================================
   TOPBAR
============================================================ */
.topbar {
  background: var(--ink);
  color: #c8dded;
  font-size: .84rem;
  line-height: 1.3;
}
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: center;
  justify-content: center;
  padding-block: 8px;
}
.topbar a { color: #c8dded; }
.topbar strong { color: #fff; }

/* ============================================================
   HEADER
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line), 0 2px 12px rgba(12,28,44,.06);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 11px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.logo img { height: 40px; width: auto; }
.logo:hover { text-decoration: none; }

/* Navigation */
.nav { margin-left: auto; }
.nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-s);
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
}
.nav a:hover { background: var(--bg); text-decoration: none; }

/* Hamburger – pure CSS */
.menu-toggle-input { display: none; }
.menu-toggle {
  display: none;
  margin-left: auto;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.menu-overlay { display: none; position: fixed; inset: 0; background: rgba(8,16,24,.5); z-index: 90; }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: .95rem;
  padding: 12px 18px;
  border-radius: var(--radius-s);
  border: 0;
  cursor: pointer;
  line-height: 1;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-wa  { background: var(--wa);    color: var(--wa-ink); }
.btn-wa:hover  { background: var(--wa-d); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-d); }
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}
.btn-ghost:hover { background: var(--agua-lt); }

/* ============================================================
   HERO
============================================================ */
.hero {
  background: linear-gradient(160deg, #fff 0%, #edf3fa 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding-block: clamp(36px, 6vw, 72px);
}
.hero-copy { display: flex; flex-direction: column; gap: 16px; }
.hero h1 { color: var(--ink); }
.hero p.lead {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--muted);
  max-width: 50ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}
.hero-badges li {
  font-weight: 700;
  font-size: .88rem;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: .01em;
}
.u-agua { background: var(--agua); color: #fff; }
.u-gas  { background: var(--gas);  color: #fff; }
.u-luz  { background: var(--luz);  color: #fff; }

.hero-media img {
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-l);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}

/* ============================================================
   TRUST STRIP
============================================================ */
.trust-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.trust-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  font-size: .92rem;
  font-weight: 600;
  border-right: 1px solid var(--line);
  flex: 1 1 180px;
  min-width: 160px;
  color: var(--ink);
}
.trust-item:last-child { border-right: 0; }
.trust-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.ti-agua { background: var(--agua-lt); }
.ti-gas  { background: var(--gas-lt); }
.ti-luz  { background: var(--luz-lt); }
.ti-star { background: #f0f4ff; }

/* ============================================================
   SECTIONS — generic
============================================================ */
section { padding-block: clamp(40px, 6vw, 64px); }
.section-head { margin-bottom: 28px; }
.section-head h2 { margin-bottom: 6px; }
.section-head p { color: var(--muted); font-size: 1.05rem; max-width: 56ch; }

/* ============================================================
   CATEGORY CARDS
============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-s);
  display: flex;
  flex-direction: column;
  color: var(--ink);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-l);
  text-decoration: none;
  color: var(--ink);
}
.card-img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f8fafc;
  display: flex; align-items: center; justify-content: center;
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform .3s ease;
}
.card:hover .card-img-wrap img { transform: scale(1.04); }
.card-body { padding: 14px 16px 18px; flex: 1; }
.card-body h3 { margin-bottom: 4px; color: var(--ink); }
.card-body p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ============================================================
   RUBROS
============================================================ */
.rubros { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rubros-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.rubro {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-s);
}
.rubro-head {
  padding: 14px 16px;
  font-weight: 800;
  font-size: 1rem;
  display: flex; align-items: center; gap: 8px;
  color: #fff;
}
.r-agua .rubro-head { background: var(--agua); }
.r-gas  .rubro-head { background: var(--gas); }
.r-luz  .rubro-head { background: var(--luz); }
.r-fer  .rubro-head { background: #3a5068; }

.rubro ul {
  list-style: none;
  margin: 0;
  padding: 10px 16px 14px;
}
.rubro li { margin: 0; }
.rubro a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  font-size: .93rem;
  transition: color var(--transition), padding-left var(--transition);
}
.rubro li:last-child a { border-bottom: 0; }
.rubro a:hover { color: var(--brand); padding-left: 4px; text-decoration: none; }

/* ============================================================
   INTRO TEXT
============================================================ */
.intro-section { background: var(--surface); }
.intro-section .wrap {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.intro-text { max-width: 70ch; }
.intro-text h2 { margin-bottom: 12px; }
.intro-text p { color: var(--muted); }
.intro-aside {
  background: var(--agua-lt);
  border: 1px solid #bee2f6;
  border-radius: var(--radius);
  padding: 22px;
  font-size: .92rem;
}
.intro-aside strong { color: var(--agua-d); display: block; margin-bottom: 8px; font-size: 1rem; }
.intro-aside ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.intro-aside li::before { content: "✓ "; color: var(--agua); font-weight: 800; }

/* ============================================================
   BRANDS
============================================================ */
.brands-section { background: var(--bg); }
.brands-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
.brands-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
  box-shadow: var(--shadow-s);
  transition: background var(--transition), border-color var(--transition);
}
.brands-list li:hover { background: var(--agua-lt); border-color: var(--agua); }

/* ============================================================
   CONTACT / LOCAL
============================================================ */
.local { background: var(--ink); color: #d5e5f2; }
.local .wrap {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}
.local h2 { color: #fff; margin-bottom: 10px; }
.local .lead { color: #a8bfcf; }
.local-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.nap {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 22px;
}
.nap strong { color: #fff; font-size: 1.05rem; }
.nap li { font-size: .95rem; }

/* ============================================================
   FAQ
============================================================ */
.faq { background: var(--surface); }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-s);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
  background: var(--surface);
  transition: background var(--transition);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--brand);
  line-height: 1;
  flex-shrink: 0;
}
.faq details[open] summary { background: var(--agua-lt); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 4px 20px 18px; color: var(--muted); line-height: 1.65; }

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  background: #0a121a;
  color: #8fa3b5;
  font-size: .88rem;
  padding-block: 32px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.site-footer a { color: #c0d3e4; }
.site-footer a:hover { color: #fff; }

/* ============================================================
   FLOATING WHATSAPP
============================================================ */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  background: var(--wa);
  color: var(--wa-ink);
  font-weight: 800;
  font-size: .95rem;
  border-radius: 999px;
  padding: 13px 20px;
  box-shadow: 0 6px 28px rgba(37,211,102,.4);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition), transform var(--transition);
}
.wa-float:hover {
  background: var(--wa-d);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--wa-ink);
}

/* ============================================================
   RESPONSIVE — Tablet (≤ 1024px)
============================================================ */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .rubros-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-section .wrap { grid-template-columns: 1fr; }
  .intro-aside { max-width: 420px; }
}

/* ============================================================
   RESPONSIVE — Medium (≤ 820px)
============================================================ */
@media (max-width: 820px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero-media { order: -1; }
  .hero-media img { aspect-ratio: 16/9; max-height: 280px; }
  .hero p.lead { max-width: 100%; }
  .local .wrap { grid-template-columns: 1fr; }
  .trust-item { flex: 1 1 140px; }

  /* Mobile nav drawer */
  .menu-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(84vw, 300px);
    background: #fff;
    transform: translateX(110%);
    transition: transform .26s cubic-bezier(.25,.46,.45,.94);
    box-shadow: -6px 0 32px rgba(0,0,0,.18);
    padding: 72px 16px 28px;
    margin: 0;
    z-index: 100;
    overflow-y: auto;
  }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 1rem;
  }
  .nav li:last-child a { border-bottom: 0; }
  #menu:checked ~ .nav { transform: translateX(0); }
  #menu:checked ~ .menu-overlay { display: block; }
}

/* ============================================================
   RESPONSIVE — Small (≤ 580px)
============================================================ */
@media (max-width: 580px) {
  body { font-size: 16px; }
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .rubros-grid { grid-template-columns: 1fr; }
  .trust-strip .wrap { flex-direction: column; }
  .trust-item { border-right: 0; border-bottom: 1px solid var(--line); flex: none; width: 100%; }
  .trust-item:last-child { border-bottom: 0; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .local-cta { flex-direction: column; }
  .local-cta .btn { width: 100%; justify-content: center; }
  .wa-float span { display: none; }
  .wa-float { padding: 15px; border-radius: 50%; }
}

/* ============================================================
   RESPONSIVE — XSmall (≤ 380px)
============================================================ */
@media (max-width: 380px) {
  .cards-grid { grid-template-columns: 1fr; }
  .topbar .wrap { flex-direction: column; gap: 4px; text-align: center; }
}

/* ============================================================
   ACCESSIBILITY — reduced motion
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
