/* Family Hub · Capa premium «Azul noche y champaña»
   Va después de los CSS de la guía y de app.css. No toca esos archivos: para volver al diseño
   original basta con quitar <link href="css/lujo.css"> de index.html.
   Idea: azul más profundo (laca de medianoche), filetes dorado champaña solo donde está lo
   importante (héroe, botón principal, «+», pestaña activa, avatar), sombras en capas más largas
   y suaves, y cifras con letra más ceñida. El dorado es adorno: nunca lleva información sola. */

:root[data-theme="azul"] {
  --lujo-noche: #0B1D45;
  --lujo-noche-2: #13306E;
  --lujo-real: #1F4FAE;
  --lujo-oro: #C8A45C;            /* filetes y brillos (decorativo) */
  --lujo-oro-claro: #E9D49C;      /* texto u arco dorado sobre azul noche: 11:1 */
  --lujo-oro-texto: #7C5E22;      /* texto dorado sobre fondos claros: 4.9–6:1 */
  --lujo-filete: linear-gradient(135deg, #F4E6BE 0%, #C8A45C 28%, #8C6A2C 52%, #EAD6A0 76%, #B8914A 100%);
  --lujo-laca: linear-gradient(112deg, transparent 0 38%, rgb(255 255 255 / 0.08) 38% 52%, transparent 52%),
               linear-gradient(160deg, #24539F 0%, #13306E 48%, #0B1D45 100%);
  --lujo-boton: linear-gradient(180deg, #2A5BBE 0%, #1A419A 55%, #13306E 100%);
  --lujo-anillo: inset 0 0 0 1px rgb(200 164 92 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.22);
  --lujo-sombra: 0 1px 1px rgb(11 29 69 / 0.04), 0 3px 8px rgb(11 29 69 / 0.05), 0 22px 44px -14px rgb(11 29 69 / 0.20);
  --lujo-sombra-sm: 0 1px 1px rgb(11 29 69 / 0.05), 0 6px 14px -4px rgb(11 29 69 / 0.14);
  --lujo-boton-sombra: 0 1px 1px rgb(11 29 69 / 0.20), 0 10px 22px -8px rgb(11 29 69 / 0.55);
}

/* ---------- Tokens: azul más profundo en los tres diseños ---------- */
:root[data-theme="azul"][data-mode][data-style="agua"] {
  --brand: #1F4FAE; --brand-strong: #1A3F8F; --text-1: #0B1D3F;
  --shadow-2: var(--lujo-sombra);
  --glass-edge: 1px solid rgb(255 255 255 / 0.85);
  --glass-shadow: var(--lujo-sombra), inset 0 1px 0 rgb(255 255 255 / 0.85);
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0 5Q12.5 0 25 5T50 5T75 5T100 5V10H0Z' fill='%232F67C8'/%3E%3C/svg%3E");
  --agua-fondo: radial-gradient(130% 70% at 50% 115%, rgb(11 29 69 / 0.22), transparent 62%),
                linear-gradient(180deg, rgb(255 255 255 / 0.26), rgb(255 255 255 / 0.36)),
                url("assets/disenos/agua-fondo.jpg") center / cover;
}
:root[data-theme="azul"][data-mode][data-style="espejo"] {
  --brand: #1F4FAE; --brand-strong: #1A3F8F; --text-1: #0E1B33;
  --shadow-2: var(--lujo-sombra);
  --rim: inset 0 0 0 1px rgb(255 255 255 / 0.98), 0 0 0 1px rgb(11 29 69 / 0.06);
  --pulido: var(--lujo-laca);
  --espejo-fondo: radial-gradient(120% 60% at 50% 0%, rgb(255 255 255 / 0.35), transparent 60%),
                  linear-gradient(180deg, rgb(255 255 255 / 0.18), rgb(11 29 69 / 0.10)),
                  url("assets/disenos/espejo-fondo.jpg") center / cover;
}
:root[data-theme="azul"][data-mode][data-style="relieve"] {
  --brand: #1F4FAE; --brand-strong: #1A3F8F; --text-1: #141C2B;
}

/* ---------- Detalles de navegador: selección, foco, barra de desplazamiento ---------- */
.fh-app ::selection { background: rgb(200 164 92 / 0.32); color: var(--lujo-noche); }
.fh-app :focus-visible { outline: 2px solid var(--lujo-noche); outline-offset: 2px; box-shadow: 0 0 0 5px rgb(200 164 92 / 0.45); }
.fh-app { scrollbar-width: thin; scrollbar-color: rgb(11 29 69 / 0.28) transparent; }

/* ---------- Letra: cifras y títulos más ceñidos, rótulos en champaña ---------- */
.fh-app h1, .fh-app h2, .s-head strong, .s-big, .fh-hero-value, .fh-kpi-value, .e-tile b { letter-spacing: -0.025em; }
.fh-app :is(h1, h2):not(.fh-hero *, .e-hero *, .a-hero *, .r-hero *) { color: var(--lujo-noche); }
.fh-eyebrow, .s-eyebrow { color: var(--lujo-oro-texto) !important; letter-spacing: 0.14em; font-weight: 600; }

/* ---------- Botón principal y «+»: laca azul noche con filete dorado ---------- */
[data-style] .fh-btn--primary,
[data-style] .fh-fab,
.scr .s-fab {
  background: var(--lujo-boton);
  color: #fff;
  box-shadow: var(--lujo-anillo), var(--lujo-boton-sombra);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-base) var(--ease-out), filter var(--t-base) var(--ease-out);
}
[data-style] .fh-btn--primary:hover,
[data-style] .fh-fab:hover { background: var(--lujo-boton); filter: brightness(1.12); transform: translateY(-1px); box-shadow: var(--lujo-anillo), 0 2px 2px rgb(11 29 69 / 0.18), 0 16px 30px -10px rgb(11 29 69 / 0.6); }
[data-style] .fh-btn--primary:active,
[data-style] .fh-fab:active { transform: translateY(0) scale(0.98); filter: brightness(0.96); }
[data-style="relieve"] .fh-btn--primary,
[data-style="relieve"] .fh-fab,
.scr[data-d="relieve"] .s-fab { box-shadow: var(--lujo-anillo), 6px 6px 14px rgb(133 144 162 / 0.45), -6px -6px 14px rgb(255 255 255 / 0.95); }

/* Botón secundario: filete fino y fondo nacarado */
[data-style] .fh-btn--secondary { border-color: rgb(11 29 69 / 0.22); color: var(--lujo-noche); }
[data-style] .fh-btn--secondary:hover { border-color: var(--lujo-oro); }

/* ---------- Tarjeta del reto (héroe): filete dorado que rodea la tarjeta ---------- */
.a-hero, .e-hero, .r-hero, .fh-hero { position: relative; }
.a-hero::after, .e-hero::after, .r-hero::after, [data-style] .fh-hero::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--lujo-filete);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.a-hero::after, [data-style="agua"] .fh-hero::after { opacity: 0.75; }
.r-hero::after, [data-style="relieve"] .fh-hero::after { opacity: 0.55; }

/* Agua: esfera de agua más profunda, con aro de champaña */
.a-orb { box-shadow: 0 0 0 1px rgb(200 164 92 / 0.6), inset 0 0 0 5px rgb(255 255 255 / 0.32), inset 0 10px 18px rgb(11 29 69 / 0.18), 0 12px 24px -6px rgb(11 29 69 / 0.28); }
.a-orb .w { background: linear-gradient(180deg, #2F67C8 0%, #1A419A 55%, #0E2C6E 100%); }
.a-orb .w svg { fill: #2F67C8; }
[data-style="agua"] .fh-ring::before { background: linear-gradient(180deg, #2F67C8 0%, #1A419A 55%, #0E2C6E 100%); }
[data-style="agua"] .fh-ring { box-shadow: 0 0 0 1px rgb(200 164 92 / 0.6), inset 0 0 0 5px rgb(255 255 255 / 0.32), inset 0 10px 18px rgb(11 29 69 / 0.18), 0 12px 24px -6px rgb(11 29 69 / 0.28); }
.a-tube i { background: linear-gradient(180deg, #5B8EDF, #1A419A); }
[data-style="agua"] .fh-bar::before { background: linear-gradient(180deg, color-mix(in srgb, var(--c, #1F4FAE) 70%, white), var(--c, #1A419A)); }

/* Espejo: héroe en laca azul noche, arco y rótulo dorados */
[data-d="espejo"] .e-hero { background: var(--lujo-laca); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 24px 40px -18px rgb(11 29 69 / 0.55); }
[data-d="espejo"] .e-hero .s-eyebrow { color: var(--lujo-oro-claro) !important; }
.e-ring .t { stroke: rgb(255 255 255 / 0.18); }
.e-ring .f { stroke: var(--lujo-oro-claro); }
[data-style="espejo"] .fh-hero { background: var(--lujo-laca); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 24px 40px -18px rgb(11 29 69 / 0.55); }
[data-style="espejo"] .fh-hero .fh-eyebrow { color: var(--lujo-oro-claro) !important; }
[data-style="espejo"] .fh-hero .fh-ring { --ring-fill: var(--lujo-oro-claro); --ring-track: rgb(255 255 255 / 0.18); }
[data-d="espejo"] .e-bar i, [data-style="espejo"] .fh-bar::before { background: var(--c, linear-gradient(90deg, #2A5BBE, #13306E)); }

/* Relieve: botón del dial con aro de champaña; surco en azul profundo */
.r-dial circle { stroke: #1F4FAE; }
.r-dial b { box-shadow: 0 0 0 1px rgb(200 164 92 / 0.55), 3px 3px 8px rgb(133 144 162 / 0.28), -3px -3px 8px rgb(255 255 255 / 0.95); color: var(--lujo-noche); }
[data-style="relieve"] .fh-ring-label { box-shadow: 0 0 0 1px rgb(200 164 92 / 0.55), var(--out-sm); color: var(--lujo-noche); }
[data-style="relieve"] .fh-ring .fill { stroke: #1F4FAE; }
.r-groove i { background: var(--c, linear-gradient(180deg, #2A5BBE, #13306E)); }
[data-style="relieve"] .fh-bar::before { background: var(--c, linear-gradient(180deg, #2A5BBE, #13306E)); }
[data-d="relieve"] .r-q span,
[data-style="relieve"] .fh-quick-ico { box-shadow: 0 0 0 1px rgb(200 164 92 / 0.35), var(--out); }

/* ---------- Tarjetas: borde de luz más nítido y sombra larga en capas ---------- */
[data-d="agua"] .a-glass { border-color: rgb(255 255 255 / 0.85); box-shadow: var(--lujo-sombra), inset 0 1px 0 rgb(255 255 255 / 0.85); }
[data-d="espejo"] .e-card { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.98), 0 0 0 1px rgb(11 29 69 / 0.06), var(--lujo-sombra); }
[data-d="espejo"] .e-tile,
[data-style="espejo"] .fh-kpi,
[data-style="espejo"] .fh-tile { box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px rgb(11 29 69 / 0.06), var(--lujo-sombra-sm); }

/* ---------- Etiquetas de estado: filete del mismo color ---------- */
[data-style="agua"] .fh-status, [data-style="espejo"] .fh-status,
[data-d="agua"] .s-chip, [data-d="espejo"] .s-chip { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 24%, transparent); }
[data-d="espejo"] .e-tile .s-chip, [data-style] .fh-tile .fh-status { box-shadow: none; }

/* ---------- Avatar con aro de champaña ---------- */
.s-avatar, [data-style] .fh-avatar--lg, [data-style] .fh-header .fh-avatar { box-shadow: 0 0 0 1px rgb(200 164 92 / 0.65), 0 6px 14px -4px rgb(11 29 69 / 0.18); color: var(--lujo-noche); }

/* ---------- Pestaña activa (barra inferior, segmentos, menú lateral) ---------- */
[data-style="agua"] .fh-tab[aria-current="page"],
[data-style="espejo"] .fh-tab[aria-current="page"],
.scr[data-d="agua"] .s-tab.on, .scr[data-d="espejo"] .s-tab.on { box-shadow: inset 0 0 0 1px rgb(200 164 92 / 0.55), 0 4px 12px -4px rgb(11 29 69 / 0.22); color: var(--lujo-noche); }
[data-style="espejo"] .fh-tab[aria-current="page"] { background: rgb(255 255 255 / 0.92); }
[data-style="relieve"] .fh-tab[aria-current="page"] { box-shadow: inset 0 0 0 1px rgb(200 164 92 / 0.45), var(--in); color: var(--lujo-noche); }
[data-style] .fh-tab[aria-current="page"] svg { color: var(--lujo-real); }
[data-style] .fh-seg button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgb(200 164 92 / 0.55), 0 2px 8px -2px rgb(11 29 69 / 0.18); color: var(--lujo-noche); }
[data-style="relieve"] .fh-seg button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgb(200 164 92 / 0.45), var(--out-sm); }
[data-style] .fh-side-item[aria-current="page"] { color: var(--lujo-noche); box-shadow: inset 0 0 0 1px rgb(200 164 92 / 0.5); }
[data-style="relieve"] .fh-side-item[aria-current="page"] { box-shadow: inset 0 0 0 1px rgb(200 164 92 / 0.45), var(--in); }
[data-style] .fh-side-item[aria-current="page"] svg { color: var(--lujo-real); }

/* ---------- Encabezado del computador: línea de champaña bajo la barra ---------- */
[data-style] .fh-header { box-shadow: inset 0 -1px 0 rgb(200 164 92 / 0.35), 0 8px 24px -16px rgb(11 29 69 / 0.3); }

@media (prefers-reduced-motion: reduce) {
  [data-style] .fh-btn--primary, [data-style] .fh-fab, .scr .s-fab { transition: none; }
  [data-style] .fh-btn--primary:hover, [data-style] .fh-fab:hover { transform: none; }
}
