/*
Theme Name: Brillo Total
Theme URI: https://brillototal.cl
Author: Brillo Total
Description: Tema one-page de Brillo Total (limpieza profunda, desinfección profesional y ambientes saludables para empresas y hogares).
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: brillo-total
*/

/* Layout: hero con foto que se funde hacia el texto, franja de beneficios que cabalga sobre el borde, banda marino de servicios con dos tarjetas, banda azul de cierre y pie en cuatro columnas. */
:root {
  --bg: #f4f7fe;
  --surface: #ffffff;
  --fg: #0a1235;
  --muted: #38426a;
  --line: #e2e7f4;
  --blue: #0b3fd9;
  --blue-text: #0b3fd9;
  --navy: #06155a;
  --navy-deep: #041044;
  --royal: #0a3bb5;
  --wa: #12872f;
  --on-navy: #ffffff;
  --on-navy-muted: #c4cff5;
  --ring: #0b3fd9;
  --shadow: 0 12px 32px rgba(10, 30, 100, .12);
  --header-bg: #010e3a;
  --font: 'Nunito', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070d27;
    --surface: #0f1944;
    --fg: #eef2ff;
    --muted: #b5bfe3;
    --line: #1f2d68;
    --blue-text: #7da0ff;
    --navy: #0a1750;
    --navy-deep: #050c33;
    --royal: #0c34a0;
    --ring: #9db8ff;
    --shadow: 0 12px 32px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070d27;
  --surface: #0f1944;
  --fg: #eef2ff;
  --muted: #b5bfe3;
  --line: #1f2d68;
  --blue-text: #7da0ff;
  --navy: #0a1750;
  --navy-deep: #050c33;
  --royal: #0c34a0;
  --ring: #9db8ff;
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
img { display: block; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-fill { fill: currentColor; stroke: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font: inherit; font-weight: 800; text-decoration: none; color: #fff;
  background: var(--blue); border-radius: 10px; padding: 13px 22px;
  box-shadow: 0 8px 20px rgba(11, 63, 217, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(11, 63, 217, .34); }
.btn-sm { padding: 10px 18px; font-size: 14px; border-radius: 9px; box-shadow: none; }
.btn-split { padding: 0; overflow: hidden; gap: 0; font-size: 18px; }
.btn-split span { padding: 16px 24px; }
.btn-split i { display: grid; place-items: center; align-self: stretch; width: 58px; background: var(--wa); font-size: 30px; color: #fff; }
.btn-green { background: var(--wa); box-shadow: 0 8px 20px rgba(18, 135, 47, .3); font-size: 17px; padding: 13px 22px 13px 26px; }
.btn-green:hover { box-shadow: 0 12px 24px rgba(18, 135, 47, .38); }
.btn-green .ico { font-size: 26px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 4px 18px rgba(10, 30, 100, .06); }
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-weight: 700; font-size: 15px; text-decoration: none; }
.nav-links a:hover { color: var(--blue-text); }
.nav-links a:first-child { color: var(--blue-text); }

/* Hero */
.hero { overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: center; padding-top: 28px; }
.hero-copy { position: relative; z-index: 1; padding-block: 36px 84px; }
h1 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.04; font-size: clamp(34px, 5.4vw, 62px); text-wrap: balance; }
h1 .top { display: block; font-size: .78em; }
h1 .hl { display: block; color: var(--blue-text); text-transform: uppercase; font-size: 1.06em; }
.lead { margin: 22px 0 30px; max-width: 36ch; font-size: 18px; font-weight: 600; line-height: 1.6; }
.hero-photo img {
  width: 100%; height: auto; aspect-ratio: 457 / 360; object-fit: cover; max-width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 32%);
  mask-image: linear-gradient(to right, transparent 0, #000 32%);
}

/* Benefits strip */
.benefits { position: relative; z-index: 2; margin-top: -46px; padding-bottom: 40px; scroll-margin-top: 110px; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); padding: 24px 8px; }
.strip li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 12px; text-align: center; font-weight: 800; font-size: 15px; line-height: 1.25; }
.strip li + li { border-left: 1px solid var(--line); }
.strip .ico { font-size: 40px; color: var(--blue-text); stroke-width: 1.7; }

/* Services */
.services { background: var(--navy); color: var(--on-navy); padding-block: 34px 38px; scroll-margin-top: 70px; }
.services h2 { margin: 0 0 22px; text-align: center; font-size: clamp(20px, 2.6vw, 25px); font-weight: 800; text-wrap: balance; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.card { position: relative; display: block; min-height: 230px; border-radius: 16px; overflow: hidden; text-decoration: none; isolation: isolate; box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
.card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.card:hover img { transform: scale(1.04); }
.card .txt { padding: 22px 26px; min-height: 230px; display: flex; flex-direction: column; }
.card h3 { margin: 0 0 6px; font-size: 21px; font-weight: 800; }
.card p { margin: 0; max-width: 22ch; font-size: 14px; font-weight: 600; line-height: 1.45; }
.card .more { margin-top: auto; font-size: 14px; font-weight: 800; }
.card-biz { color: #fff; }
.card-biz::after { background: linear-gradient(100deg, rgba(8, 52, 200, .92) 0%, rgba(11, 63, 217, .55) 42%, rgba(11, 63, 217, 0) 80%); }
.card-home { color: #06155a; }
.card-home::after { background: linear-gradient(100deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .6) 38%, rgba(255, 255, 255, 0) 72%); }

.closing { background: var(--royal); color: #fff; text-align: center; padding-block: 24px; }
.closing .wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.closing p { margin: 0; font-size: clamp(18px, 2.4vw, 22px); font-weight: 800; text-wrap: balance; }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--on-navy); scroll-margin-top: 70px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.4fr; padding-block: 34px 28px; }
.foot-grid > div { padding: 4px 26px; min-width: 0; }
.foot-grid > div:first-child { padding-left: 0; }
.foot-grid > div + div { border-left: 1px solid rgba(255, 255, 255, .16); }
.foot-about { margin: 16px 0 18px; max-width: 30ch; font-size: 13px; color: var(--on-navy-muted); line-height: 1.6; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; color: #fff; font-size: 17px; transition: background .18s ease; }
.social a:hover { background: rgba(255, 255, 255, .14); }
.foot-grid h4 { margin: 4px 0 14px; font-size: 15px; font-weight: 800; }
.foot-grid li { margin-bottom: 9px; font-size: 14px; }
.foot-grid li a { text-decoration: none; color: var(--on-navy-muted); }
.foot-grid li a:hover { color: #fff; text-decoration: underline; }
.contact li { display: flex; align-items: flex-start; gap: 12px; color: var(--on-navy-muted); overflow-wrap: anywhere; }
.contact .ico { font-size: 17px; color: #fff; margin-top: 3px; }
.copy { border-top: 1px solid rgba(255, 255, 255, .14); padding-block: 16px calc(16px); text-align: center; font-size: 13px; color: var(--on-navy-muted); }

/* WhatsApp chooser */
.wa-dialog { border: 0; padding: 0; border-radius: 18px; width: min(92vw, 400px); background: var(--surface); color: var(--fg); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); font-family: var(--font); }
.wa-dialog::backdrop { background: rgba(4, 16, 68, .55); }
.wa-box { padding: 26px 24px 22px; display: grid; gap: 14px; }
.wa-box h3 { margin: 0; font-size: 20px; font-weight: 800; text-wrap: balance; }
.wa-box p { margin: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.wa-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 12px; background: var(--wa); color: #fff; font-weight: 800; font-size: 17px; text-decoration: none; }
.wa-opt .ico { font-size: 26px; }
.wa-opt:hover { filter: brightness(1.08); }
.wa-close { justify-self: center; background: none; border: 0; font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; padding: 6px 12px; border-radius: 8px; }
.wa-close:hover { color: var(--fg); }
.wa-close:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* Tablet */
@media (max-width: 960px) {
  .foot-grid { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .foot-grid > div:nth-child(odd) { padding-left: 0; }
  .foot-grid > div:nth-child(3) { border-left: 0; }
  .foot-grid > div:nth-child(2) { border-left: 1px solid rgba(255, 255, 255, .16); }
}

/* Phone */
@media (max-width: 760px) {
  .nav-links { order: 3; flex-basis: 100%; justify-content: space-between; gap: 12px; padding-top: 4px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
  .hero-copy { padding-block: 24px 0; }
  .hero-photo img {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 30%);
  }
  .benefits { margin-top: -28px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; padding: 16px 6px; }
  .strip li + li { border-left: 0; }
  .strip li:nth-child(even) { border-left: 1px solid var(--line); }
  .strip li:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 18px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid > div, .foot-grid > div:nth-child(n) { padding: 0; border-left: 0; }
  .foot-grid > div + div { border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 22px; }
  .btn-split { font-size: 16px; }
}

/* ===== Logo oficial (imagen adjunta) ===== */
.site-header { background: var(--header-bg); border-bottom: 1px solid rgba(125,160,255,.18); box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.brand { display: block; line-height: 0; }
.brand img.logo {
  height: 72px; width: auto; max-width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-composite: intersect;
}
.nav-links a { color: #fff; }
.nav-links a:hover, .nav-links a:first-child { color: #9db8ff; }
.bar { padding-block: 8px; }
.site-footer .brand img.logo { height: 84px; }
@media (max-width: 760px) { .brand img.logo { height: 56px; } .site-footer .brand img.logo { height: 70px; } }
.btn, .btn:hover { color: #fff; }
.card h3, .card p, .card .more { text-shadow: none; }

/* ===== Páginas internas ===== */
.page-hero { background: var(--navy); color: var(--on-navy); padding-block: 44px 40px; }
.page-hero h1 { margin: 0; font-size: clamp(28px, 5vw, 42px); line-height: 1.15; }
.page-body { padding-block: 40px 56px; }
.page-content { max-width: 820px; }
.page-content h2 { font-size: 24px; margin: 34px 0 10px; color: var(--blue-text); }
.page-content h3 { font-size: 19px; margin: 24px 0 8px; }
.page-content p, .page-content li { font-size: 17px; line-height: 1.7; color: var(--muted); }
.page-content ul, .page-content ol { padding-left: 22px; }
.page-content a { color: var(--blue-text); text-decoration: underline; }
.copy a { color: inherit; text-decoration: underline; }
.page-main { min-height: 50vh; }
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li { margin-bottom: 6px; }

/* ===== Formulario de cotización ===== */
.q-dialog { border: 0; padding: 0; border-radius: 18px; width: min(94vw, 580px); max-height: 92vh; background: var(--surface); color: var(--fg); box-shadow: 0 24px 60px rgba(0,0,0,.35); font-family: var(--font); overflow: hidden; }
.q-dialog::backdrop { background: rgba(4, 16, 68, .6); }
.q-box { position: relative; padding: 26px 24px 22px; max-height: 92vh; overflow-y: auto; }
.q-box h3 { margin: 0 34px 4px 0; font-size: 24px; line-height: 1.2; }
.q-lead { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.q-x { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; }
.q-x:hover { color: var(--fg); background: var(--line); }
.q-x:focus-visible, .q-link:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.q-f { display: block; margin: 0 0 12px; font-weight: 700; font-size: 14px; border: 0; padding: 0; min-width: 0; }
.q-f legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.q-f input[type="text"], .q-f input[type="tel"], .q-f input[type="email"], .q-f textarea {
  display: block; width: 100%; margin-top: 5px; padding: 11px 12px; font: inherit; font-weight: 400; font-size: 16px;
  color: var(--fg); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; box-sizing: border-box; }
.q-f textarea { resize: vertical; min-height: 110px; }
.q-f input:focus, .q-f textarea:focus { outline: 3px solid var(--ring); outline-offset: 1px; border-color: var(--blue); }
.q-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.q-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.q-opts label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; background: var(--bg); }
.q-opts label:has(input:checked) { border-color: var(--blue); background: rgba(11, 63, 217, .1); }
.q-opts input { accent-color: var(--blue); width: 17px; height: 17px; margin: 0; }
.q-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.q-msg { margin: 4px 0 10px; min-height: 0; font-size: 14px; font-weight: 700; }
.q-msg.err { color: #c0262d; }
:root[data-theme="dark"] .q-msg.err { color: #ff8f94; }
.btn-block { width: 100%; justify-content: center; border: 0; cursor: pointer; font: inherit; font-weight: 800; padding: 14px 18px; }
.btn-block:disabled { opacity: .7; cursor: wait; }
.q-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.q-note a { color: var(--blue-text); }
.q-link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--blue-text); text-decoration: underline; cursor: pointer; }
@media (max-width: 560px) { .q-row { grid-template-columns: 1fr; } .q-box { padding: 22px 16px 18px; } }
.q-dialog [hidden] { display: none !important; }

/* Tarjeta: locales comerciales y restaurantes */
.card-food { color: #0a1235; }
.card-food img { object-position: 78% center; }
.card-food::after { background: linear-gradient(100deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .78) 45%, rgba(255, 255, 255, 0) 82%); }
.card-food p { max-width: 24ch; }

/* Tarjeta: eventos, fiestas, matrimonios y otros */
.card-event { color: #fff; }
.card-event img { object-position: 50% 62%; }
.card-event::after { background: linear-gradient(100deg, rgba(6, 21, 90, .92) 0%, rgba(8, 52, 200, .58) 45%, rgba(11, 63, 217, 0) 82%); }

/* Encuadre de las fotos de las tarjetas */
.card-biz img { object-position: 50% 58%; }
.card-home img { object-position: 50% 38%; }

.q-legal { margin: 14px 0 10px; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.04); font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.q-legal p { margin: 0; }
.q-legal a { color: var(--blue-text); }
.q-consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 8px; font-size: 13px; line-height: 1.45; color: var(--fg); cursor: pointer; }
.q-consent input { margin-top: 3px; flex: none; }
