/* ==========================================================================
   Temas de color de Bengó
   - data-theme: light | dark | pink | blue (lo define js/theme.js)
   - data-tone:  light | dark (agrupa los tres temas claros)
   El tema oscuro es el diseño original: no necesita reglas propias.
   ========================================================================== */

/* --- Paletas ------------------------------------------------------------- */
html[data-theme="light"]{
  --t-bg:#f6f7f5;--t-surface:#ffffff;--t-surface-2:#e9efee;--t-border:#d3dedd;
  --t-ink:#16302f;--t-muted:#465b5c;--t-accent:#1d6b70;--t-accent-2:#8a5f12;
  --t-btn:#d4a849;--t-btn-ink:#1a1609;--t-btn-hover:#c99b38;--t-form-btn:#1e4043;
}
html[data-theme="pink"]{
  --t-bg:#fbf5f6;--t-surface:#ffffff;--t-surface-2:#f6e5ea;--t-border:#ead2d9;
  --t-ink:#3a1d27;--t-muted:#6b4b56;--t-accent:#a3405f;--t-accent-2:#a3405f;
  --t-btn:#a3405f;--t-btn-ink:#ffffff;--t-btn-hover:#8c3551;--t-form-btn:#7d2f48;
}
html[data-theme="blue"]{
  --t-bg:#f3f7fb;--t-surface:#ffffff;--t-surface-2:#e2ebf6;--t-border:#d0ddec;
  --t-ink:#122848;--t-muted:#475a75;--t-accent:#2456a4;--t-accent-2:#2456a4;
  --t-btn:#2456a4;--t-btn-ink:#ffffff;--t-btn-hover:#1d4787;--t-form-btn:#173a6e;
}
html[data-tone="light"]{
  --bg:var(--t-bg);--cream:var(--t-ink);--muted:var(--t-muted);--mint:var(--t-accent);--gold:var(--t-btn);
  color-scheme:light;
}
html[data-tone="dark"]{color-scheme:dark}

/* --- Base y encabezado ---------------------------------------------------- */
html[data-tone="light"] body{background:var(--t-bg);color:var(--t-ink)}
html[data-tone="light"] .site-nav{background:color-mix(in srgb,var(--t-surface) 94%,transparent);box-shadow:0 1px 0 var(--t-border),0 8px 24px #0000000d}
html[data-tone="light"] .site-nav .brand,
html[data-tone="light"] .site-nav nav a,
html[data-tone="light"] .site-nav nav a:hover,
html[data-tone="light"] .site-nav nav a:focus-visible{color:var(--t-ink)}
html[data-tone="light"] .site-nav .btn-small{background:var(--t-surface);border:1px solid var(--t-border);color:var(--t-ink)}
html[data-tone="light"] .site-nav .btn-small:hover{background:var(--t-surface-2)}

/* --- Botones -------------------------------------------------------------- */
html[data-tone="light"] .btn:not(.btn-quiet):not(.contact-whatsapp){background:var(--t-btn);color:var(--t-btn-ink)}
html[data-tone="light"] .btn:not(.btn-quiet):not(.contact-whatsapp):hover{background:var(--t-btn-hover)}
html[data-tone="light"] .btn-quiet{background:var(--t-surface);color:var(--t-ink);border:1px solid var(--t-border);backdrop-filter:none;-webkit-backdrop-filter:none}
html[data-tone="light"] .btn-quiet:hover{background:var(--t-surface-2)}
html[data-tone="light"] form .btn:not(#send-whatsapp){background:var(--t-form-btn);color:#fff}

/* --- Secciones que en el tema oscuro tienen fondo oscuro ------------------ */
html[data-tone="light"] .hero{background:radial-gradient(ellipse at 75% 40%,var(--t-surface-2) 0%,var(--t-bg) 62%)}
html[data-tone="light"] .hero-aurora,
html[data-tone="light"] .team-section:before{opacity:.35}
html[data-tone="light"] .hero-background{opacity:.06}
html[data-tone="light"] .hero-art:before{border-color:color-mix(in srgb,var(--t-accent) 22%,transparent)}
html[data-tone="light"] .hero-art:after{background:#0002}
html[data-tone="light"] .essentials{background:var(--t-surface);border:1px solid var(--t-border);box-shadow:0 10px 30px #0000000a}
html[data-tone="light"] .restored-layout:not(.surface-light),
html[data-tone="light"] .investment-band,
html[data-tone="light"] .team-section,
html[data-tone="light"] .project-section:not(.surface-light){background:var(--t-bg)}
html[data-tone="light"] .investment{background:var(--t-surface);border:1px solid var(--t-border);box-shadow:0 14px 40px #00000009}
html[data-tone="light"] .questions-list details{border-color:var(--t-border)}
html[data-tone="light"] .price-list li{border-color:var(--t-border)}

/* Textos dentro de esas secciones */
html[data-tone="light"] :is(.hero,.process,.investment-band,.questions-section,.team-section) :is(h1,h2,h3,summary,strong,dt){color:var(--t-ink)}
html[data-tone="light"] :is(.hero,.process,.investment-band,.questions-section,.team-section) :is(p,li,dd,small,.essentials>div>span,.scene-caption,.team-location,.team-role,.team-description){color:var(--t-muted)}
html[data-tone="light"] :is(.hero,.process,.investment-band,.questions-section,.team-section) .eyebrow{color:var(--t-accent)}
html[data-tone="light"] :is(.hero h1 em,.process h2 span,.investment h2 span,.questions-section h2 span,.team-section h2 span,.investment .price-quote,.investment .price strong){color:var(--t-accent-2)}
html[data-tone="light"] :is(.investment .text-link,.team-portfolio,.team-email){color:var(--t-accent)}
html[data-tone="light"] #proceso #process-title span{color:var(--t-accent-2)}

/* Secciones blancas: en rosado y azul toman el color de acento */
html[data-theme="pink"] .surface-light,
html[data-theme="blue"] .surface-light{--cream:var(--t-ink);--muted:var(--t-muted);--mint:var(--t-accent);color:var(--t-ink)}
html[data-theme="pink"] .surface-light :is(h2 span,.contact-email,.project-category),
html[data-theme="blue"] .surface-light :is(h2 span,.contact-email,.project-category){color:var(--t-accent)}

/* Pie de página */
html[data-tone="light"] .restored-footer{background:var(--t-surface)}
html[data-tone="light"] .restored-footer :is(.brand,.footer,p,a){color:var(--t-ink)}

/* --- Selector de colores -------------------------------------------------- */
.theme-picker{position:relative;flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:9px 16px;border-radius:10px;border:1px solid #ffffff26;background:#ffffff0d;color:inherit;font:500 15px var(--font);cursor:pointer}
.theme-toggle svg{width:20px;height:20px}
.theme-toggle:hover{background:#ffffff1a}
.theme-toggle:focus-visible,.theme-option input:focus-visible+.theme-swatch{outline:3px solid var(--mint);outline-offset:3px}
html[data-tone="light"] .theme-toggle{border-color:var(--t-border);background:var(--t-surface);color:var(--t-ink)}
html[data-tone="light"] .theme-toggle:hover{background:var(--t-surface-2)}
.theme-panel{position:absolute;right:0;top:calc(100% + 10px);z-index:40;min-width:250px;padding:14px;border-radius:16px;background:#102628;border:1px solid #ffffff1f;box-shadow:0 20px 50px #0006;color:#f1ede0}
html[data-tone="light"] .theme-panel{background:var(--t-surface);border-color:var(--t-border);box-shadow:0 20px 50px #0002;color:var(--t-ink)}
.theme-panel fieldset{border:0;margin:0;padding:0}
.theme-panel legend{padding:0 4px 8px;font-size:15px;font-weight:600}
.theme-option{display:flex;align-items:center;gap:12px;padding:10px 8px;border-radius:10px;cursor:pointer;font-size:16px}
.theme-option:hover{background:#8881}
.theme-option input{position:absolute;opacity:0;pointer-events:none}
.theme-swatch{flex:0 0 28px;height:28px;border-radius:50%;border:2px solid #8886}
.theme-option input:checked+.theme-swatch{box-shadow:0 0 0 3px var(--t-bg,#102628),0 0 0 5px var(--mint)}
.theme-option input:checked~.theme-name{font-weight:700}
.theme-name small{display:block;font-size:13px;opacity:.75;font-weight:400}
.theme-option--auto .theme-swatch{background:linear-gradient(135deg,#f6f7f5 50%,#0e2426 50%)}
.theme-option--light .theme-swatch{background:linear-gradient(135deg,#ffffff 50%,#d4a849 50%)}
.theme-option--dark .theme-swatch{background:linear-gradient(135deg,#0e2426 50%,#7fcac5 50%)}
.theme-option--pink .theme-swatch{background:linear-gradient(135deg,#fbf5f6 50%,#a3405f 50%)}
.theme-option--blue .theme-swatch{background:linear-gradient(135deg,#f3f7fb 50%,#2456a4 50%)}


/* --- Legibilidad para público adulto -------------------------------------- */
body{font-size:18px}
.eyebrow,.team-intro .eyebrow,.process .eyebrow{font-size:13px}
.essentials>div>span{font-size:13px;letter-spacing:.6px}
.site-nav nav a{font-size:16px}
.form-note,.brief-result p,.footer p,.footer-bottom{font-size:14px}
.team-location{font-size:14px}
.services p,.steps p,.questions-list details p{font-size:17px}
.questions-list summary{font-size:18px}
label,input,select,textarea{font-size:17px}

@media(max-width:760px){
  .theme-toggle{padding:8px 12px;font-size:14px}
  .theme-panel{right:0}
}

/* Equipo y textos chicos en temas claros */
html[data-tone="light"] :is(.team-person,.team-promise){background:var(--t-surface);border:1px solid var(--t-border);box-shadow:0 12px 30px #0000000a}
html[data-tone="light"] .team-person h3{color:var(--t-ink)}
html[data-tone="light"] .team-values span{background:var(--t-surface-2);color:var(--t-ink)}
.team-promise strong{font-size:17px}
.team-values span{font-size:14px}
.team-description{font-size:16px}
.investment .price p{font-size:16px}

/* Encabezado en celular: el selector de colores va en la primera fila */
@media(max-width:760px){
  .site-nav .header{grid-template-columns:1fr auto auto;column-gap:10px}
  .site-nav .header>.theme-picker{grid-row:1;grid-column:2;align-self:center}
  .site-nav .header>.btn-small{grid-row:1;grid-column:3}
  .site-nav nav a{font-size:15px}
}
@media(max-width:420px){
  .theme-toggle{padding:8px 10px}
  .theme-toggle .theme-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .theme-panel{right:-90px}
}

/* Íconos iguales al modo oscuro en todos los temas: mantienen su forma, color y fondo */
html[data-tone="light"] #proceso .process-step-icon{background:#16383b;border-color:#7fcac52b;color:#92d4cf}
html[data-tone="light"] #proceso .steps article:first-of-type .process-step-icon{background:#1d3a36;border-color:#d4a84935;color:#e2c37c}
html[data-tone="light"] .questions-list summary:after{color:#b8963f}
