/* Sistema visual editorial del sitio público (header, footer, reveals). */

:root {
  --public-ink: #0f172a;
  --public-muted: #64748b;
  --public-line: #e2e8f0;
  --public-surface: #f8fafc;
  --public-brand: #1e3a5f;
  --public-brand-soft: #152a45;
  --public-accent: #c5d429;
  --public-radius: 1.25rem;
  --public-max: 72rem;
  --public-header-h: 4.25rem;
}

.public-site {
  color: var(--public-ink);
  background: #fff;
  font-family: "DM Sans", system-ui, sans-serif;
}

.public-site h1,
.public-site h2,
.public-site h3 {
  font-family: "Sora", "DM Sans", system-ui, sans-serif;
}

.public-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: #fff;
  color: var(--public-brand);
  font-weight: 600;
}

.public-skip:focus {
  left: 1rem;
  top: 1rem;
}

/* —— Header flotante —— */
.public-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.75rem 1rem 0;
}

@media (min-width: 640px) {
  .public-header {
    padding: 1rem 1.5rem 0;
  }
}

.public-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--public-max);
  margin: 0 auto;
  min-height: var(--public-header-h);
  padding: 0.65rem 1rem 0.65rem 1.25rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -18px rgba(15, 23, 42, 0.35);
}

/* —— Selector de idioma ES | EN —— */
.public-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.public-lang-switch__item {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.public-lang-switch__item:hover,
.public-lang-switch__item.is-active {
  color: var(--public-brand-soft);
}

.public-lang-switch__sep {
  color: #cbd5e1;
  font-weight: 400;
}

.public-lang-switch--compact {
  margin-left: auto;
}

@media (min-width: 900px) {
  .public-lang-switch--compact {
    display: none;
  }
}

.public-header__brand {
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--public-brand-soft);
  text-decoration: none;
  white-space: nowrap;
}

.public-header__brand:hover {
  color: var(--public-brand);
}

.public-header__nav {
  display: none;
  align-items: center;
  gap: 0.35rem 1.25rem;
}

@media (min-width: 900px) {
  .public-header__nav {
    display: flex;
  }
}

.public-header__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: color 0.15s ease;
}

.public-header__link:hover {
  color: var(--public-brand-soft);
}

.public-header__link--button {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.public-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.25rem;
  padding: 0.55rem 1.15rem;
  border-radius: 9999px;
  background: var(--public-brand-soft);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.public-header__cta:hover {
  background: var(--public-brand);
  transform: translateY(-1px);
}

.public-header__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 9999px;
  background: var(--public-surface);
  cursor: pointer;
}

@media (min-width: 900px) {
  .public-header__menu-btn {
    display: none;
  }
}

.public-header__menu-icon,
.public-header__menu-icon::before,
.public-header__menu-icon::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--public-ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.public-header__menu-icon {
  position: relative;
}

.public-header__menu-icon::before,
.public-header__menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.public-header__menu-icon::before {
  top: -6px;
}

.public-header__menu-icon::after {
  top: 6px;
}

.public-header.is-open .public-header__menu-icon {
  background: transparent;
}

.public-header.is-open .public-header__menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.public-header.is-open .public-header__menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.public-header__drawer {
  max-width: var(--public-max);
  margin: 0.65rem auto 0;
  padding: 1rem 1.25rem 1.25rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--public-line);
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.4);
}

.public-header__drawer[hidden] {
  display: none;
}

.public-header__drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.public-header__drawer-nav a,
.public-header__drawer-logout {
  display: block;
  padding: 0.85rem 0.5rem;
  border: 0;
  background: transparent;
  color: var(--public-ink);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.public-header__drawer-cta {
  margin-top: 0.5rem !important;
  border-radius: 9999px !important;
  background: var(--public-brand-soft) !important;
  color: #fff !important;
  text-align: center !important;
}

.public-messages {
  max-width: var(--public-max);
  margin: 1rem auto 0;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .public-messages {
    padding: 0 1.5rem;
  }
}

.public-messages__item {
  margin: 0 0 0.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 1rem;
  background: #f0f5fa;
  color: var(--public-brand);
  font-size: 0.875rem;
}

/* —— Footer editorial (inspiración Basel Area, branding propio) —— */
.public-footer {
  margin-top: auto;
  background: #0b1220;
  color: #e2e8f0;
}

.public-footer__inner {
  max-width: var(--public-max);
  margin: 0 auto;
  padding: 4.5rem 1rem 2rem;
}

@media (min-width: 640px) {
  .public-footer__inner {
    padding: 5.5rem 1.5rem 2.25rem;
  }
}

@media (min-width: 1024px) {
  .public-footer__inner {
    padding: 6.5rem 1.5rem 2.5rem;
  }
}

.public-footer__main {
  display: grid;
  gap: 3rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 900px) {
  .public-footer__main {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.35fr);
    gap: 3.5rem 4rem;
    align-items: start;
    padding-bottom: 4.5rem;
  }
}

.public-footer__brand-block {
  max-width: 28rem;
}

.public-footer__eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c5d429;
}

.public-footer__brand {
  display: block;
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #f8fafc;
  text-decoration: none;
}

.public-footer__brand:hover {
  color: #fff;
}

.public-footer__tagline {
  margin: 1.15rem 0 0;
  max-width: 22rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #94a3b8;
}

.public-footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.75rem;
  padding: 0.85rem 1.35rem;
  border-radius: 9999px;
  background: #c5d429;
  color: #152a45;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.public-footer__cta:hover {
  background: #d4e157;
  transform: translateY(-1px);
}

.public-footer__cta-arrow {
  font-size: 1.05rem;
  line-height: 1;
}

.public-footer__nav-grid {
  display: grid;
  gap: 2rem 1.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .public-footer__nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .public-footer__nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 2.5rem;
  }
}

.public-footer__col-title {
  margin: 0 0 1.15rem;
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f8fafc;
}

.public-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.public-footer__list a,
.public-footer__link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.975rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.public-footer__list a:hover,
.public-footer__link-btn:hover {
  color: #f8fafc;
}

.public-footer__col--muted .public-footer__col-title {
  color: #cbd5e1;
}

.public-footer__placeholder {
  margin: 0;
  max-width: 16rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #64748b;
}

.public-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

@media (min-width: 720px) {
  .public-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.public-footer__copy {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
}

.public-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.35rem;
}

.public-footer__legal a {
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
}

.public-footer__legal a:hover {
  color: #f8fafc;
}

/* —— Reveals —— */
.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(1.15rem);
}

.js .reveal {
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .reveal:not(.is-visible),
  .js .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
