/* Variantes explícitas: invitado, cuenta conocida sin ID, sesión con ID. */
[data-home-member], [data-home-known], [data-home-recover] { display: none; }
html[data-home-session="member"] [data-home-guest],
html[data-home-session="recover"] [data-home-guest] { display: none !important; }
html[data-home-session="member"] [data-home-member],
html[data-home-session="member"] [data-home-known],
html[data-home-session="recover"] [data-home-recover],
html[data-home-session="recover"] [data-home-known] { display: revert; }
html[data-home-session="member"] #nav-user { display: flex; }
html[data-home-session="member"] .intent-card[data-home-member],
html[data-home-session="recover"] .intent-card[data-home-recover] { display: flex; }
/* Los scripts de sesión del footer pueden tardar. No ofrecer un perfil sin ID
   ni un menú todavía sin inicializar, pero dejar disponibles los otros atajos. */
html:not([data-home-ready]) #nav-user { visibility: hidden; }
html:not([data-home-ready]) [data-home-profile] { display: none !important; }
.home-profile-loading { display: none !important; }
html:not([data-home-ready]) .home-profile-loading { display: flex !important; }

.nav-avatar-wrap { font: inherit; color: inherit; background: none; border: 0; min-height: 44px; text-align: left; }
.nav-avatar-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav-dropdown a, #nav-dropdown button { min-height: 44px; }
#nav-dropdown:not(.open) { visibility: hidden; }
.nav-avatar-wrap:focus-visible, .home-action:focus-visible, .home-recovery a:focus-visible,
.cta-section a:focus-visible, .nav-dropdown-item:focus-visible { outline: 2px solid var(--neon); outline-offset: 4px; }

html[data-home-session="member"] .hero,
html[data-home-session="recover"] .hero { min-height: auto; padding: 8.5rem 3rem 3.5rem; justify-content: center; }
html[data-home-session="member"] .hero-bg-text,
html[data-home-session="recover"] .hero-bg-text,
html[data-home-session="member"] .hero-scroll,
html[data-home-session="recover"] .hero-scroll { display: none; }
html[data-home-session="member"] .hero-content,
html[data-home-session="recover"] .hero-content { width: 100%; }
.home-welcome, .home-recovery { width: 100%; max-width: 1180px; margin: 0 auto; position: relative; }
.home-eyebrow { display: flex; align-items: center; gap: .6rem; color: var(--neon); font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1.25rem; }
.home-eyebrow::before { content: ''; width: 7px; height: 7px; background: var(--neon); border-radius: 50%; flex: 0 0 auto; }
.home-greeting { color: var(--blanco); font-size: 1rem; line-height: 1.5; margin: 0 0 .7rem; overflow-wrap: anywhere; }
.home-welcome h1, .home-recovery h1 { font-size: clamp(2.4rem, 5.2vw, 4.75rem) !important; line-height: 1 !important; letter-spacing: -.035em; margin: 0 0 1rem; animation: none; }
.home-intro { color: #aaa69e; font-size: .95rem; line-height: 1.65; max-width: 530px; margin: 0 0 2rem; }
.home-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.home-action { display: flex; flex-direction: column; align-items: stretch; min-width: 0; min-height: 176px; padding: 1.2rem; border: 1px solid #363630; background: #151613; color: var(--blanco); text-decoration: none; text-align: left; transition: background .15s, border-color .15s; }
.home-action:hover { border-color: var(--neon); background: #1e2118; }
.home-action-top { display: flex; align-items: center; justify-content: space-between; font-size: .72rem; color: #afafa3; letter-spacing: .12em; margin-bottom: 1.5rem; }
.home-action-top span:last-child { font-size: 1.25rem; line-height: 1; }
.home-action strong { font: 400 1rem/1.3 var(--font-display); margin-top: auto; margin-bottom: .45rem; }
.home-action small { color: #afafa3; font-size: .78rem; line-height: 1.5; }
.home-action-primary { color: #11140b; background: var(--neon); border-color: var(--neon); }
.home-action-primary:hover { color: #11140b; background: #e0ff55; }
.home-action-primary .home-action-top, .home-action-primary small { color: #394314; }
.home-recovery-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.home-recovery-actions a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 768px) {
  html[data-home-session="member"] .hero,
  html[data-home-session="recover"] .hero { padding: 6rem 1.25rem 2.25rem !important; }
  .home-eyebrow { font-size: .63rem; margin-bottom: 1rem; }
  .home-welcome h1, .home-recovery h1 { font-size: clamp(2.1rem, 9vw, 3.5rem) !important; }
  .home-intro { font-size: .87rem; margin-bottom: 1.5rem; }
  .home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .home-action { min-height: 160px; padding: 1rem .85rem; }
  .home-action-top { margin-bottom: 1rem; }
  .home-action strong { font-size: .87rem; }
  .home-action small { font-size: .73rem; }
  .nav-avatar-name { max-width: 90px; }
  #nav-dropdown { max-width: calc(100vw - 2rem); }
}
@media (prefers-reduced-motion: reduce) {
  .home-action { transition: none; }
}

/* Inicio claro: sólo presentación. Las variantes de sesión anteriores siguen
   controlando visibilidad, carga y destinos en ambas URLs históricas. */
.home-clarity .hero {
  min-height: auto !important;
  padding: 8rem max(1.25rem, calc((100vw - 1180px) / 2)) 3.5rem !important;
  justify-content: center;
  align-items: stretch;
}
.home-clarity .hero-content { max-width: 1180px; margin: 0 auto; }
.home-clarity .hero-bg-text { display: none; }
.home-clarity .home-guest-kicker {
  display: flex; align-items: center; gap: .7rem;
  color: #bbbcb0; font-size: .75rem; font-weight: 500;
  line-height: 1.5; letter-spacing: .06em; text-transform: none;
  margin: 0 0 1.4rem; animation: none;
}
.home-clarity .home-guest-kicker::before {
  content: ''; flex: 0 0 24px; width: 24px; height: 2px; background: var(--neon);
}
.home-clarity .home-guest-title {
  max-width: 20ch; margin: 0 0 1.4rem;
  font-size: clamp(2.35rem, 5.4vw, 4.75rem) !important;
  line-height: 1.08 !important; letter-spacing: -.045em;
  text-transform: none; animation: none; overflow-wrap: break-word;
}
.home-clarity .home-guest-desc {
  max-width: 550px; margin: 0 0 1.5rem !important;
  color: #b8b8af; font-size: 1.05rem !important; line-height: 1.7;
}
.home-clarity #hero-invitado-wrap { animation: none; }
.home-clarity .hero-bottom { display: block; }
.home-clarity .home-guest-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: .75rem;
  margin: 0; animation: none;
}
.home-clarity .home-guest-actions a {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 48px; padding: .8rem 1.3rem !important;
  font-size: .9rem !important; letter-spacing: 0; text-transform: none;
  line-height: 1.4; border-radius: 6px;
}
.home-clarity .home-text-link { color: #cecec5; text-underline-offset: .25em; }
.home-clarity .home-guest-note { margin: 1rem 0 0; font-size: .78rem; color: #999b90; line-height: 1.6; }
.home-clarity .home-action { border-radius: 8px; }
.home-clarity .home-intro { max-width: 590px; }
.home-clarity .section, .home-clarity .rubros-section,
.home-clarity .profiles-section, .home-clarity .search-section {
  padding: 4rem max(1.25rem, calc((100vw - 1180px) / 2));
}
.home-clarity .section-header, .home-clarity .rubros-intro { gap: 1.5rem; margin-bottom: 1.75rem; }
.home-clarity .section-title {
  max-width: 24ch; font-size: clamp(1.8rem, 3vw, 2.75rem) !important;
  line-height: 1.15 !important; letter-spacing: -.03em; font-weight: 400; margin: 0;
}
.home-clarity .section-sub, .home-clarity .home-section-copy {
  max-width: 380px; color: #aaa99f; font-size: .9rem; line-height: 1.65; text-align: left;
}
.home-clarity .rubros-grid { background: transparent; border: 0; gap: .65rem; }
.home-clarity .rubro-item {
  background: #11120f; border: 1px solid #30322a; border-left: 3px solid var(--rcolor, var(--neon));
  border-radius: 8px; padding: 1.35rem 1.1rem; min-width: 0;
}
.home-clarity .rubro-item::after { color: #8c8e80; }
.home-clarity .ri-name { color: #e5e5dc; line-height: 1.3; font-size: .96rem; }
.home-clarity .ri-sub { color: #a5a69c; line-height: 1.6; letter-spacing: 0; text-transform: none; font-size: .75rem; }
.home-clarity .ri-emoji { font-size: 1.5rem; }
.home-clarity .home-rubro-nav { padding-top: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid #25271f; }
.home-clarity .home-rubro-nav .home-section-copy { max-width: none; margin-top: .75rem; }
.home-clarity .home-rubro-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; margin-top: 1.25rem; }
.home-clarity .home-rubro-link {
  display: flex; align-items: center; min-height: 52px; min-width: 0; padding: .7rem .85rem;
  border: 1px solid #3a3d31; border-radius: 6px; color: #e5e5dc; background: #11120f;
  font-size: .86rem; line-height: 1.45; text-decoration: none;
}
.home-clarity .home-rubro-link:hover { border-color: var(--neon); background: #1b1e14; }
.home-clarity .home-musical-note { margin-top: 1rem; }
.home-clarity .intent-grid { border: 0; background: transparent; gap: .75rem; }
.home-clarity .intent-card, .home-clarity .step {
  border: 1px solid #30322a; border-radius: 8px; background: #11120f;
  min-width: 0; padding: 1.5rem; min-height: 205px;
}
.home-clarity button.step { font: inherit; color: inherit; text-align: left; }
.home-clarity .step::before { display: none; }
.home-clarity button.step :is(.step-title, .step-desc) { display: block; }
.home-clarity .steps { gap: .75rem; background: transparent; border: 0; }
.home-clarity .intent-title, .home-clarity .step-title { line-height: 1.35; font-size: 1.05rem; letter-spacing: 0; }
.home-clarity .intent-icon, .home-clarity .step-icon { font-size: 1.6rem; margin-bottom: 1rem; }
.home-clarity .intent-desc, .home-clarity .step-desc { color: #aaa99f; line-height: 1.65; }
.home-clarity .intent-meta { letter-spacing: .03em; text-transform: none; font-size: .78rem; }
.home-clarity .profile-card { border-radius: 8px; }
.home-clarity .home-community-stats { background: #10110e; }
.home-clarity .home-community-stats .stat-item { padding: 1.5rem max(1.25rem, 3vw); }
.home-clarity .home-community-stats .stat-num { font-size: 2rem !important; }
.home-clarity .home-community-stats .stat-label { color: #aaa99f; font-size: .75rem; letter-spacing: .02em; text-transform: none; line-height: 1.5; }
.home-clarity .cta-title { font-size: clamp(2rem, 5vw, 4rem) !important; line-height: 1.1; }
.home-clarity .cta-section { padding: 4rem 1.25rem; }
.home-clarity .reveal { opacity: 1; transform: none; }
.home-clarity :is(#explorar, #como-funciona, #comunidad, a, button, input, select) { scroll-margin-top: 100px; }
.home-clarity :is(a, button, input, select):focus-visible { outline: 2px solid var(--neon); outline-offset: 4px; }
.home-clarity nav :is(a, button) { min-height: 44px; }
.home-clarity nav :is(.nav-logo, .nav-links a, #nav-guest a, .nav-dropdown-item),
.home-clarity .footer-links a {
  min-height: 44px; display: inline-flex; align-items: center;
}
html[data-home-session="recover"] .home-clarity nav a[data-home-recover] { display: inline-flex; align-items: center; }
.home-clarity #nav-guest { display: flex; align-items: center; gap: .4rem; }
/* La navegación intermedia no debe partir los accesos ni tapar el kicker. */
@media (min-width: 769px) and (max-width: 1024px) {
  .home-clarity .home-rubro-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-clarity nav { padding: .9rem 1.25rem; gap: 1rem; }
  .home-clarity .nav-logo { flex-shrink: 0; font-size: 1.3rem; }
  .home-clarity .nav-links { gap: 1.25rem !important; }
  .home-clarity .nav-links a { font-size: .72rem; letter-spacing: .06em; white-space: nowrap; }
  .home-clarity .nav-right { flex-shrink: 0; }
  .home-clarity #nav-guest a { font-size: .72rem; padding: .55rem .8rem; white-space: nowrap; }
}
/* Conservar las reglas de ocultación de sesión y el placeholder de carga. */
@media (max-width: 768px) {
  .home-clarity nav { min-height: 68px; }
  .home-clarity .hero { padding: 6.5rem 1.25rem 2.5rem !important; }
  .home-clarity .home-guest-kicker { font-size: .7rem; margin-bottom: 1.15rem; }
  .home-clarity .home-guest-title { font-size: clamp(2.1rem, 8.5vw, 3.4rem) !important; margin-bottom: 1.15rem; }
  .home-clarity .home-guest-desc { font-size: .96rem !important; }
  .home-clarity .home-guest-actions { flex-direction: column !important; align-items: stretch !important; gap: .6rem !important; }
  .home-clarity .home-guest-actions a { width: 100% !important; }
  .home-clarity .home-guest-actions .home-text-link { padding-top: .5rem !important; padding-bottom: .5rem !important; }
  .home-clarity .home-action { min-height: 145px; padding: .9rem .8rem; }
  .home-clarity .home-action-top { font-size: .65rem; margin-bottom: .85rem; }
  .home-clarity .section, .home-clarity .rubros-section,
  .home-clarity .profiles-section, .home-clarity .search-section { padding: 2.5rem 1.25rem !important; }
  .home-clarity .section-title { font-size: clamp(1.65rem, 7vw, 2.3rem) !important; }
  .home-clarity .rubro-item { padding: 1rem .75rem !important; }
  .home-clarity .ri-name { font-size: .85rem !important; }
  .home-clarity .ri-sub { font-size: .72rem !important; }
  .home-clarity .home-rubro-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .home-clarity .home-rubro-link { padding: .7rem .65rem; font-size: .82rem; }
  .home-clarity .intent-card, .home-clarity .step { padding: 1.25rem !important; min-height: 0; }
  .home-clarity .home-community-stats .stat-item { padding: 1.25rem !important; }
  .home-clarity .cta-section { padding: 3rem 1.25rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.home-clarity) { scroll-behavior: auto !important; }
  .home-clarity *, .home-clarity *::before, .home-clarity *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
  }
  .home-clarity .cursor, .home-clarity .cursor-ring { display: none; }
  .home-clarity, .home-clarity :is(a, button, input, select) { cursor: auto !important; }
}
