@import url("https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@400;500;600&display=swap");

@font-face {
  font-family: "Nourd";
  src: local("Nourd"), local("Nourd Regular");
  font-display: swap;
}

@font-face {
  font-family: "Amatheist Nourd Bold";
  src: local("Amatheist Nourd Bold"), local("AmatheistNourd-Bold");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ll-primary: #006947;
  --ll-container: #a0f7ca;
  --ll-background: #f8faf9;
  --ll-ink: #22302a;
  --ll-muted: #5d6963;
  --ll-white: #ffffff;

  --ll-font-brand: "Nourd", "Lexend Deca", sans-serif;
  --ll-font-headline: "Lexend Deca", sans-serif;
  --ll-font-body: "Lexend Deca", sans-serif;
  --ll-font-accent: "Amatheist Nourd Bold", "Lexend Deca", sans-serif;

  --ll-radius-md: 1.5rem;
  --ll-radius-lg: 2.5rem;
  --ll-radius-xl: 3rem;

  --ll-space-xs: 0.5rem;
  --ll-space-sm: 0.75rem;
  --ll-space-md: 1rem;
  --ll-space-lg: 1.5rem;
  --ll-space-xl: 2rem;
  --ll-space-xxl: 2.5rem;

  --ll-shadow-soft: 0 14px 34px rgba(35, 48, 42, 0.07);
  --ll-shadow-card: 0 22px 48px rgba(35, 48, 42, 0.09);
  --ll-glow-biolu: 0 0 34px rgba(160, 247, 202, 0.36);
}

body.ll-unified-page {
  background: var(--ll-background);
  color: var(--ll-ink);
  font-family: var(--ll-font-body);
  min-height: 100dvh;
  padding-top: 5.25rem;
  padding-bottom: 8.5rem;
}

body[data-auth-required="true"]:not(.auth-ready) main {
  visibility: hidden;
}

body[data-auth-required="true"]:not(.auth-ready)::before {
  content: "Preparando tu sesion...";
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--ll-background);
  color: var(--ll-primary);
  font-family: var(--ll-font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ll-font-brand {
  font-family: var(--ll-font-brand);
  letter-spacing: 0;
}

.ll-font-headline {
  font-family: var(--ll-font-headline);
  letter-spacing: 0;
}

.ll-font-body {
  font-family: var(--ll-font-body);
  letter-spacing: 0;
}

.ll-font-accent {
  font-family: var(--ll-font-accent);
  letter-spacing: 0;
}

/* Utility: force-hide element */
.ll-hidden {
  display: none !important;
}

.ll-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ll-space-md);
  padding: 0 var(--ll-space-lg);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 105, 71, 0.12);
}

.ll-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.ll-header__logo {
  max-height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.ll-header__title {
  font-family: var(--ll-font-brand);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ll-primary);
  letter-spacing: 0;
}

.ll-header__right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 2.25rem;
}

.ll-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ll-header__action {
  border-radius: 9999px;
  padding: 0.5rem 0.9rem;
  text-decoration: none;
  font-family: var(--ll-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 150ms ease, opacity 150ms ease;
}

.ll-header__action:hover {
  opacity: 0.94;
}

.ll-header__action:active {
  transform: scale(0.97);
}

.ll-header__action.is-secondary {
  color: var(--ll-primary);
  background: rgba(160, 247, 202, 0.25);
}

.ll-header__action.is-primary {
  color: #fff;
  background: linear-gradient(140deg, var(--ll-primary) 0%, #00523a 100%);
  box-shadow: 0 10px 20px rgba(0, 105, 71, 0.22);
}

.ll-header__meta {
  text-align: right;
}

.ll-header__status {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ll-muted);
}

.ll-header__auth {
  font-size: 0.62rem;
  font-weight: 600;
  color: #7c8882;
}

.ll-main-shell {
  max-width: 72rem;
  margin: 0 auto;
}

.ll-card-base {
  border-radius: var(--ll-radius-lg);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 105, 71, 0.1);
  box-shadow: var(--ll-shadow-card);
}

.ll-card-glow {
  box-shadow: var(--ll-shadow-card), var(--ll-glow-biolu);
}

.ll-soft-card {
  border-radius: var(--ll-radius-xl);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 105, 71, 0.1);
  box-shadow: var(--ll-shadow-card), 0 0 28px rgba(160, 247, 202, 0.18);
}

.ll-stat-card {
  display: grid;
  gap: 0.45rem;
  border-radius: var(--ll-radius-lg);
  padding: 1.45rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 105, 71, 0.1);
  box-shadow: var(--ll-shadow-soft), 0 0 24px rgba(160, 247, 202, 0.2);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.ll-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ll-shadow-card), 0 0 32px rgba(160, 247, 202, 0.24);
}

.ll-stat-card__label {
  margin: 0;
  font-family: var(--ll-font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.ll-stat-card__value {
  margin: 0;
  color: var(--ll-primary);
  font-family: var(--ll-font-body);
  font-size: clamp(1.85rem, 8vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.ll-stat-card__unit {
  color: rgba(45, 47, 46, 0.42);
  font-size: 0.8rem;
  font-weight: 600;
}

.coreon-avatar-layered {
  position: relative;
  display: block;
  width: var(--coreon-avatar-size, 6rem);
  height: var(--coreon-avatar-size, 6rem);
}

.coreon-layer,
.coreon-layer-fallback,
.coreon-base-fallback {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.coreon-layer {
  top: var(--layer-top, 0);
  left: var(--layer-left, 0);
  width: var(--layer-width, 100%);
  height: var(--layer-height, 100%);
  object-fit: contain;
}

.coreon-layer--base,
.coreon-base-fallback {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.coreon-base-fallback,
.coreon-layer-fallback {
  top: var(--layer-top, 0);
  left: var(--layer-left, 0);
  width: var(--layer-width, 100%);
  height: var(--layer-height, 100%);
  border-radius: 9999px;
  background: rgba(34, 48, 42, 0.08);
}

.coreon-layer--base {
  z-index: 10;
}

.coreon-layer--torso,
.coreon-layer-fallback--torso {
  z-index: 20;
}

.coreon-layer--face,
.coreon-layer-fallback--face {
  z-index: 30;
}

.coreon-layer--head,
.coreon-layer-fallback--head {
  z-index: 40;
}

.coreon-layer--aura,
.coreon-layer-fallback--aura {
  z-index: 50;
}

.coreon-layer--special,
.coreon-layer-fallback--special {
  z-index: 60;
}

.ll-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 1.5rem calc(env(safe-area-inset-bottom) + 0.7rem);
  border-top: 1px solid rgba(0, 105, 71, 0.12);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
}

.ll-bottom-nav__item {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ba8a2;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.ll-bottom-nav__item .material-symbols-outlined {
  font-size: 1.7rem;
}

.ll-bottom-nav__item:hover {
  color: var(--ll-primary);
}

.ll-bottom-nav__item.is-active {
  color: var(--ll-primary);
  background: rgba(160, 247, 202, 0.45);
}

.ll-bottom-nav__item.is-active .material-symbols-outlined {
  font-variation-settings: "FILL" 1;
}

.ll-bottom-nav__labs {
  width: 4.1rem;
  height: 4.1rem;
  margin-top: -2.35rem;
  border-radius: 9999px;
  border: 6px solid var(--ll-background);
  background: linear-gradient(140deg, var(--ll-primary) 0%, #00523a 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 16px 34px rgba(0, 105, 71, 0.28), var(--ll-glow-biolu);
  transition: transform 180ms ease;
}

.ll-bottom-nav__labs .material-symbols-outlined {
  font-size: 2rem;
  font-variation-settings: "FILL" 1, "wght" 700;
}

.ll-bottom-nav__labs:active {
  transform: scale(0.95);
}

.ll-bottom-nav__labs.is-active {
  box-shadow: 0 18px 38px rgba(0, 105, 71, 0.34), var(--ll-glow-biolu);
}

.ll-rainbow-progress {
  background-image: linear-gradient(90deg, #96f1cb 0%, #74e5d2 23%, #87d8fb 48%, #b2c5ff 72%, #d2bbff 100%);
}

/* ─── Shared component: bioluminescent glow ─── */
.bioluminescent-glow {
  background: linear-gradient(145deg, #006947 0%, #005c3d 100%);
  box-shadow: 0 10px 25px -5px rgba(0, 105, 71, 0.4);
}

.bioluminescent-glow-soft {
  box-shadow: 0 0 20px rgba(160, 247, 202, 0.4);
}

/* ─── Landing page components ─── */
.hero-gradient {
  background: linear-gradient(145deg, #006947 0%, #005c3d 100%);
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 105, 71, 0.1);
}

.landing-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 9999px;
  background: rgba(160, 247, 202, 0.42);
  color: var(--ll-primary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0.65rem 0.9rem;
  text-transform: uppercase;
}

.landing-card {
  border: 1px solid rgba(0, 105, 71, 0.1);
  border-bottom: 4px solid rgba(0, 105, 71, 0.22);
  border-radius: 2.5rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 34px rgba(35, 48, 42, 0.06);
}

.landing-card--primary {
  border-bottom-color: var(--ll-primary);
}

.landing-source {
  color: rgba(45, 47, 46, 0.48);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.landing-step-number {
  color: rgba(0, 105, 71, 0.2);
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.85;
}

/* Alias utilities for pages using semantic class names */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 640px) {
  body.ll-unified-page {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .ll-header {
    padding: 0 1rem;
  }

  .ll-header__title {
    font-size: 1rem;
  }

  .ll-header__logo,
  .header-logo {
    max-height: 36px;
  }

  .ll-header__actions {
    gap: 0.35rem;
  }

  .ll-header__action {
    padding: 0.42rem 0.72rem;
    font-size: 0.7rem;
  }
}
