/* ============================================================
   GreenBIMxels — Dark Landing  •  home_landing.css
   ============================================================ */

/* ─── Design tokens (landing-specific) ─── */
.landing-page {
  --bg: #000000;
  --bg2: #0a0a0a;
  --bg3: #111111;
  --surface: rgba(255, 255, 255, 0.04);
  --surface2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border2: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text2: rgba(245, 245, 247, 0.6);
  --text3: rgba(245, 245, 247, 0.35);
  --green: #30d158;
  --green2: #00c77a;
  --blue: #5ac8fa;
  --teal: #5ac8fa;
  --r: 18px;
  --r2: 24px;
}

/* ─── Landing page specific styles (uses base.html navbar/footer) ─── */
body.landing-page {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  padding-top: 0 !important;
}

body.landing-page .page-content {
  padding-top: 0 !important;
}

/* Navbar tweaks for landing page
   (mantener el navbar global, solo pequeños ajustes de integración) */
body.landing-page .futuristic-nav {
  margin-top: 0.25rem;
}

/* Landing page removes normal container constraints for content */
body.landing-page > .page-content .layout-container {
  max-width: 100%;
  padding: 0;
}

/* Footer: mismo estilo glass que el navbar para armonía */
body.landing-page .site-footer {
  margin-top: 0;
  background: transparent;
}

body.landing-page .futuristic-footer {
  background: linear-gradient(180deg, rgba(10, 20, 35, 0.85), rgba(10, 20, 35, 0.75)) !important;
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

/* ─── LIGHT MODE (html.dc-light) ─── */
html.dc-light body.landing-page {
  --bg: #f5f5f7;
  --bg2: #e8e8ed;
  --bg3: #d2d2d7;
  --surface: rgba(0, 0, 0, 0.04);
  --surface2: rgba(0, 0, 0, 0.07);
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.14);
  --text: #1d1d1f;
  --text2: #6e6e73;
  --text3: #86868b;
  --green: #1a7f37;
}

html.dc-light body.landing-page {
  background: var(--bg);
  color: var(--text) !important;
}

html.dc-light body.landing-page .futuristic-nav,
html.dc-light body.landing-page .futuristic-nav.scrolled {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.85)) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

html.dc-light body.landing-page .futuristic-footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.85)) !important;
  border-color: rgba(0, 0, 0, 0.08);
}

/* Light mode section overrides */
html.dc-light .l-hero::before {
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(48, 209, 88, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(90, 200, 250, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(255, 214, 10, 0.03) 0%, transparent 50%);
}

html.dc-light .l-hero::after {
  background: radial-gradient(ellipse 100% 40% at 50% 0%, rgba(48, 209, 88, 0.02), transparent);
}

html.dc-light .hero-badge {
  background: rgba(48, 209, 88, 0.12);
  border-color: rgba(48, 209, 88, 0.3);
  color: #1a7f37;
}

html.dc-light .l-hero--split .hero-sub {
  color: var(--text2);
}

html.dc-light .l-hero--split .hero-sub strong {
  color: var(--text);
}

html.dc-light .btn-hero2 {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--border2);
  color: var(--text);
}

html.dc-light .btn-hero2:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
}

html.dc-light .hero-trust {
  color: var(--text2);
}

html.dc-light .trust-check {
  background: rgba(48, 209, 88, 0.15);
  border-color: rgba(48, 209, 88, 0.35);
  color: #1a7f37;
}

html.dc-light .l-eyebrow {
  color: #1a7f37;
}

html.dc-light .l-section-title {
  color: var(--text);
}

html.dc-light .l-section-body {
  color: var(--text2);
}

html.dc-light .metric-cell {
  background: var(--bg2);
}

html.dc-light .mc-val {
  color: var(--text);
}

html.dc-light .mc-lbl {
  color: var(--text2);
}

html.dc-light .tl-step {
  color: var(--text2);
}

html.dc-light .tl-title {
  color: var(--text);
}

html.dc-light .tl-desc {
  color: var(--text2);
}

html.dc-light .bento {
  background: var(--bg2);
  border-color: var(--border);
}

html.dc-light .bento h3 {
  color: var(--text);
}

html.dc-light .bento p {
  color: var(--text2);
}

html.dc-light .bento-tag {
  color: var(--text2);
}

html.dc-light .bento::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06), transparent);
}

html.dc-light .bento:hover {
  background: var(--bg3);
}

html.dc-light .tl-step {
  color: #1a7f37;
}

html.dc-light .tl-item:hover .tl-node {
  background: rgba(48, 209, 88, 0.12);
  border-color: rgba(48, 209, 88, 0.4);
  box-shadow: 0 0 24px rgba(48, 209, 88, 0.12);
}

html.dc-light .chart-title {
  color: var(--text);
}

html.dc-light .chart-legend,
html.dc-light .legend-row {
  color: var(--text2);
}

html.dc-light .ctr-val,
html.dc-light .ctr-unit {
  color: var(--text);
}

html.dc-light .ctr-lbl {
  color: var(--text2);
}

html.dc-light .l-counter-section .l-eyebrow {
  color: var(--text2);
}

html.dc-light .l-counter-section .l-section-title {
  color: var(--text);
}

html.dc-light .l-counter-section .l-section-body {
  color: var(--text2);
}

html.dc-light .cta-glass h2 {
  color: var(--text);
}

html.dc-light .cta-glass p {
  color: var(--text2);
}

html.dc-light .btn-outline {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text);
}

html.dc-light .btn-outline:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

html.dc-light .l-timeline-section,
html.dc-light .l-bento-section,
html.dc-light .l-chart-section {
  background: transparent;
}

html.dc-light .chart-card {
  background: var(--bg2);
  border-color: var(--border);
}

html.dc-light .metrics-strip {
  background: var(--border);
  border-color: var(--border);
}

html.dc-light .cta-glass {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--border2);
}

/* ─── HERO base ─── */
.l-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
}

.l-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(48, 209, 88, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(90, 200, 250, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(90, 200, 250, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.l-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 40% at 50% 0%, rgba(48, 209, 88, 0.04), transparent);
  pointer-events: none;
}

/* ─── HERO — split two-column variant ─── */
.l-hero--split {
  flex-direction: row;
  text-align: left;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 100px 32px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  min-height: 100vh;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

/* Left column */
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  animation: ld-fadeUp .9s ease both;
  max-width: 560px;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(48, 209, 88, .1);
  border: 1px solid rgba(48, 209, 88, .25);
  padding: 6px 14px;
  border-radius: 980px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--green);
  letter-spacing: .03em;
  margin-bottom: 28px;
  width: fit-content;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--green);
  animation: ld-pulse 2s infinite;
  box-shadow: 0 0 6px var(--green);
}

/* Hero h1 — split variant */
.l-hero--split h1 {
  font-size: clamp(2.6rem, 4.2vw, 4rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.08;
  margin-bottom: 22px;
}

.l-hero--split h1 .accent {
  background: linear-gradient(135deg, #30d158 0%, #ffd60a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero sub — split variant */
.l-hero--split .hero-sub {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text2);
  line-height: 1.7;
  letter-spacing: -.01em;
  max-width: 480px;
  margin-top: 0;
  margin-bottom: 36px;
  animation: none;
}

.l-hero--split .hero-sub strong {
  color: var(--text);
  font-weight: 600;
}

/* Hero action buttons */
.l-hero--split .hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 0;
  animation: none;
}

.btn-hero {
  padding: 13px 26px;
  border-radius: 980px;
  background: var(--green);
  color: #000;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  letter-spacing: -.01em;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-hero:hover {
  background: #34da5f;
  transform: scale(1.03);
  box-shadow: 0 0 36px rgba(48, 209, 88, .4);
  color: #000;
}

.btn-hero2 {
  padding: 13px 26px;
  border-radius: 980px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -.01em;
  transition: all .25s;
  backdrop-filter: blur(10px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-hero2:hover {
  background: rgba(255, 255, 255, .12);
  color: var(--text);
}

/* Trust row */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 32px;
  font-size: .78rem;
  color: var(--text3);
  font-weight: 400;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 0 14px 0 0;
}

.trust-item:first-child {
  padding-left: 0;
}

.trust-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(48, 209, 88, .15);
  border: 1px solid rgba(48, 209, 88, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  color: var(--green);
  font-weight: 700;
}

.trust-sep {
  width: 1px;
  height: 14px;
  background: var(--border2);
  margin-right: 14px;
  flex-shrink: 0;
}

/* ─── Right column — device mockup ─── */
.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ld-fadeUp .9s .2s ease both;
  position: relative;
}

.mockup-scene {
  position: relative;
  width: 540px;
  height: 400px;
}

.mockup-scene::before {
  content: '';
  position: absolute;
  inset: -80px -40px -80px -40px;
  background: radial-gradient(circle at 70% 15%, rgba(255, 214, 10, 0.28) 0%, rgba(255, 180, 0, 0.08) 35%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* Ambient glow under devices */
.device-glow {
  position: absolute;
  width: 360px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(48, 209, 88, .18) 0%, rgba(255, 214, 10, .08) 50%, transparent 75%);
  filter: blur(40px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: glowPulse 100s ease-in-out infinite;
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: .7;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(10.08);
  }
}

/* ── Laptop ── */
.laptop {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 420px;
}

.laptop-screen-wrap {
  background: #0d0d0e;
  border-radius: 12px 12px 0 0;
  border: 1.5px solid rgba(255, 255, 255, .12);
  border-bottom: none;
  padding: 8px 8px 0;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .8),
    0 24px 60px rgba(0, 0, 0, .6),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

.laptop-notch {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .08);
  margin: 0 auto 6px;
}

.laptop-screen {
  background: #050507;
  border-radius: 6px;
  overflow: hidden;
  height: 220px;
  position: relative;
}

#laptopCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.laptop-base {
  height: 14px;
  background: linear-gradient(to bottom, #1a1a1a, #111);
  border-radius: 0 0 6px 6px;
  border: 1.5px solid rgba(255, 255, 255, .08);
  border-top: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  position: relative;
}

.laptop-base::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 15%;
  right: 15%;
  height: 4px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, .04), transparent);
  border-radius: 0 0 4px 4px;
}

/* ── Phone floats top-right ── */
.phone {
  position: absolute;
  top: 0;
  right: 0;
  width: 110px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .7));
}

.phone-body {
  background: #101012;
  border-radius: 22px;
  border: 1.5px solid rgba(255, 255, 255, .12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .8),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

.phone-notch-bar {
  height: 10px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 0 0 8px 8px;
  margin: 0 20px;
  position: relative;
}

.phone-notch-bar::before {
  content: '';
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .08);
}

.phone-screen {
  background: #050507;
  height: 180px;
  position: relative;
  overflow: hidden;
}

#phoneCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.phone-home-bar {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #101012;
}

.phone-home-bar::before {
  content: '';
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .18);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(48, 209, 88, .1);
  border: 1px solid rgba(48, 209, 88, .2);
  padding: 5px 14px;
  border-radius: 980px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--green);
  letter-spacing: .02em;
  margin-bottom: 28px;
  animation: ld-fadeUp .8s ease both;
}

.hero-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: ld-pulse 2s infinite;
}

.l-hero h1 {
  font-size: clamp(3.2rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.05;
  max-width: 900px;
  animation: ld-fadeUp .8s .1s ease both;
}

.l-hero h1 .grad {
  background: linear-gradient(135deg, #30d158 0%, #ffd60a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 24px;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text2);
  line-height: 1.6;
  max-width: 560px;
  letter-spacing: -.01em;
  animation: ld-fadeUp .8s .2s ease both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 44px;
  justify-content: center;
  animation: ld-fadeUp .8s .3s ease both;
  flex-wrap: wrap;
}

.btn-fill {
  padding: 14px 28px;
  border-radius: 980px;
  background: var(--green);
  color: #000;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  letter-spacing: -.01em;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-fill:hover {
  background: #34da5f;
  transform: scale(1.03);
  box-shadow: 0 0 40px rgba(48, 209, 88, .35);
  color: #000;
}

.btn-outline {
  padding: 14px 28px;
  border-radius: 980px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -.01em;
  transition: all .25s;
  backdrop-filter: blur(10px);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--text);
}

/* Hero glass card */
.hero-card {
  margin-top: 72px;
  position: relative;
  width: 100%;
  max-width: 780px;
  animation: ld-fadeUp .8s .4s ease both;
}

.connector-glass {
  background: rgba(255, 255, 255, .05);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border2);
  border-radius: 28px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.connector-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
}

.cg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.cg-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cg-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(48, 209, 88, .2), rgba(255, 214, 10, .12));
  border: 1px solid rgba(48, 209, 88, .2);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.cg-label {
  font-size: .75rem;
  color: var(--text3);
  font-weight: 400;
  letter-spacing: .02em;
  margin-bottom: 2px;
}

.cg-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.02em;
}

.cg-status {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(48, 209, 88, .1);
  border: 1px solid rgba(48, 209, 88, .2);
  padding: 5px 12px;
  border-radius: 980px;
  font-size: .72rem;
  font-weight: 500;
  color: var(--green);
}

.cg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: ld-pulse 2s infinite;
}

.cg-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.cg-metric {
  background: rgba(255, 255, 255, .025);
  padding: 18px 20px;
}

.cg-metric-val {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, #fff 0%, var(--text2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cg-metric-lbl {
  font-size: .72rem;
  color: var(--text3);
  margin-top: 2px;
  letter-spacing: .01em;
}

/* ─── Auth section (Sign up or Login) ─── */
/* Contenedor a pantalla completa: centra la card en vertical y horizontal */
.auth-page-wrap {
  position: relative;
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 56px;
  box-sizing: border-box;
}

.auth-page-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(48, 209, 88, .08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 80%, rgba(90, 200, 250, .04) 0%, transparent 50%),
    var(--bg);
  pointer-events: none;
}

/* Card centrada: único hijo flex del wrap (el bg es absolute) */
.auth-page-wrap .auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0;
  flex-shrink: 0;
}

body.auth-page .page-content {
  padding: 0;
  display: flex;
  flex: 1;
  width: 100%;
  min-height: 0;
}

/* En la página de auth, body es flex para que main ocupe el resto y la card se centre */
body.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.auth-page .site-footer {
  margin-top: 0;
}

/* La sección de auth ocupa todo el main y centra la card */
body.auth-page .auth-page-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 100px);
  padding: 100px 24px 56px;
  box-sizing: border-box;
}

body.auth-page .l-auth-section--page {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
  min-height: 0;
}

/* ── Auth inner wrapper: centra en móvil, grid 2 col en escritorio ── */
.auth-page-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* ── Brand top section (inside card) ────────────────────────────── */
.auth-brand-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  text-align: center;
}

.auth-brand-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-badge-lg {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #30d158, #25a244);
  color: #000;
  font-family: 'Outfit', var(--font-sans, sans-serif);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.auth-brand-wordmark {
  font-family: 'Outfit', var(--font-sans, sans-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.auth-brand-tagline {
  font-family: 'Outfit', var(--font-sans, sans-serif);
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.4;
  margin: 0;
}

/* Divider variant inside the card: full-width separator */
.auth-brand-divider--card {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 24px;
}

.l-auth-section {
  padding: 80px 24px 100px;
  background: var(--bg);
}

.auth-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 40px 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .03);
}

.auth-card-glow {
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(48, 209, 88, .12) 0%, transparent 65%);
  pointer-events: none;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
  z-index: 1;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.auth-title {
  font-family: 'Outfit', var(--font-sans, sans-serif);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 0 0 8px;
  color: var(--text);
}

.auth-subtitle {
  font-size: .95rem;
  color: var(--text2);
  margin: 0;
  line-height: 1.5;
}

.auth-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, .04);
  border-radius: 12px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--text2);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 10px;
  transition: all .25s;
  font-family: inherit;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.active {
  background: var(--surface2);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.auth-panels {
  position: relative;
  z-index: 1;
}

/* Ocultar todos los paneles por defecto; solo el activo es visible (alta especificidad para evitar sobrescrituras) */
.auth-page .auth-panels .auth-panel,
.auth-panel {
  display: none !important;
}

.auth-page .auth-panels .auth-panel.active,
.auth-panel.active {
  display: block !important;
  animation: ld-fadeUp .3s ease;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label,
.auth-label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text2);
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color .2s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(48, 209, 88, .15);
}

.auth-field--types .auth-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 4px;
}

.auth-note {
  font-size: .85rem;
  color: var(--text3);
  margin-top: 4px;
}

.auth-type-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: var(--text2);
  cursor: pointer;
}

.auth-type-opt input {
  accent-color: var(--green);
}

.auth-type-opt:hover {
  color: var(--text);
}

.auth-error {
  padding: 12px 16px;
  background: rgba(239, 68, 68, .15);
  border: 1px solid rgba(239, 68, 68, .3);
  border-radius: 12px;
  color: #f87171;
  font-size: .9rem;
}

.auth-field-error {
  font-size: .8rem;
  color: #f87171;
}

.auth-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.auth-link-soft {
  font-size: .85rem;
  color: var(--text3);
  text-decoration: none;
}

.auth-link-soft:hover {
  color: var(--green);
}

.auth-form .btn-hero {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}

.auth-back {
  margin-top: 28px;
  margin-bottom: 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.auth-link-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  color: var(--text3);
  text-decoration: none;
  transition: color .2s;
}

.auth-link-back:hover {
  color: var(--green);
}

.l-auth-section--page {
  min-height: 0;
  padding: 0;
}

/* Light mode auth */
html.dc-light .auth-page-bg {
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(48, 209, 88, .06) 0%, transparent 50%),
    var(--bg);
}

html.dc-light .auth-card {
  background: var(--bg2);
  border-color: var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .08), 0 0 0 1px rgba(0, 0, 0, .04);
}

html.dc-light .auth-card-glow {
  background: radial-gradient(ellipse at center, rgba(48, 209, 88, .08) 0%, transparent 65%);
}

html.dc-light .auth-card::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .06), transparent);
}

html.dc-light .auth-field input {
  background: rgba(0, 0, 0, .04);
  border-color: var(--border2);
  color: var(--text);
}

html.dc-light .auth-tab.active {
  background: rgba(0, 0, 0, .08);
}


/* ─── Section base ─── */
.l-section {
  padding: 120px 24px;
  position: relative;
}

.l-container {
  max-width: 1120px;
  margin: 0 auto;
}

.l-eyebrow {
  font-size: .78rem;
  font-weight: 500;
  color: var(--green);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.l-section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.l-section-body {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text2);
  line-height: 1.7;
  letter-spacing: -.01em;
  max-width: 560px;
}

/* ─── Community scene ─── */
.l-scene {
  background: var(--bg);
  padding-top: 0;
  padding-bottom: 0;
}

.l-scene-intro {
  padding: 120px 24px 60px;
  text-align: center;
}

.l-scene-intro .l-section-title {
  max-width: 700px;
  margin: 0 auto 20px;
}

.l-scene-intro .l-section-body {
  margin: 0 auto;
  text-align: center;
  max-width: 520px;
}

.canvas-frame {
  position: relative;
  margin: 0 auto;
  max-width: 1120px;
  overflow: hidden;
  height: 520px;
}

.canvas-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to bottom, var(--bg), transparent);
  z-index: 2;
  pointer-events: none;
}

.canvas-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 2;
  pointer-events: none;
}

#energyCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Metrics strip */
.metrics-strip {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 60px;
}

.metric-cell {
  background: var(--bg2);
  padding: 32px 28px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s, transform .6s, background .3s;
}

.metric-cell.visible {
  opacity: 1;
  transform: none;
}

.metric-cell:nth-child(2) {
  transition-delay: .1s;
}

.metric-cell:nth-child(3) {
  transition-delay: .2s;
}

.metric-cell:nth-child(4) {
  transition-delay: .3s;
}

.metric-cell:hover {
  background: var(--bg3);
}

.mc-icon {
  font-size: 1.3rem;
  margin-bottom: 14px;
  display: block;
}

.mc-val {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--green);
  line-height: 1;
}

.mc-lbl {
  font-size: .78rem;
  color: var(--text3);
  margin-top: 6px;
  font-weight: 400;
  letter-spacing: .01em;
}

/* ─── Timeline ─── */
.l-timeline-section {
  padding: 140px 24px;
  background: var(--bg);
}

.l-timeline {
  max-width: 800px;
  margin: 60px auto 0;
  position: relative;
}

.l-timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border2) 10%, var(--border2) 90%, transparent);
}

.tl-item {
  display: flex;
  gap: 40px;
  padding: 0 0 60px;
  opacity: 0;
  transform: translateX(-20px);
  transition: all .7s cubic-bezier(.16, 1, .3, 1);
}

.tl-item.visible {
  opacity: 1;
  transform: none;
}

.tl-item:nth-child(2) {
  transition-delay: .15s;
}

.tl-item:nth-child(3) {
  transition-delay: .3s;
}

.tl-left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tl-node {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
  transition: all .3s;
}

.tl-item:hover .tl-node {
  background: rgba(48, 209, 88, .1);
  border-color: rgba(48, 209, 88, .4);
  box-shadow: 0 0 24px rgba(48, 209, 88, .15);
}

.tl-right {
  padding-top: 12px;
}

.tl-step {
  font-size: .72rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tl-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -.03em;
  margin-bottom: 10px;
}

.tl-desc {
  font-size: .95rem;
  font-weight: 300;
  color: var(--text2);
  line-height: 1.7;
  letter-spacing: -.01em;
}

/* ─── Bento grid ─── */
.l-bento-section {
  padding: 0 24px 140px;
}

.bento-grid {
  max-width: 1080px;
  margin: 60px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.bento {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  opacity: 0;
  transform: translateY(24px);
}

.bento.visible {
  opacity: 1;
  transform: none;
}

.bento:hover {
  border-color: var(--border2);
  background: var(--bg3);
  transform: translateY(-2px);
}

.bento::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
}

.bento.large {
  grid-column: span 2;
}

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(48, 209, 88, .1);
  border: 1px solid rgba(48, 209, 88, .15);
  display: grid;
  place-items: center;
  font-size: 1rem;
  margin-bottom: 20px;
}

.bento h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.03em;
  margin-bottom: 8px;
}

.bento p {
  font-size: .85rem;
  font-weight: 300;
  color: var(--text2);
  line-height: 1.65;
  letter-spacing: -.01em;
}

.bento-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: .72rem;
  font-weight: 500;
  color: var(--green);
  letter-spacing: .02em;
}

.mini-chart-wrap {
  margin-top: 24px;
  height: 80px;
  position: relative;
}

#miniChart {
  width: 100%;
  height: 100%;
  display: block;
}

/* ─── Chart section ─── */
.l-chart-section {
  padding: 0 24px 140px;
  background: var(--bg);
}

.chart-layout {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
  align-items: start;
}

.chart-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.chart-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.chart-title {
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.02em;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  font-weight: 500;
  color: var(--green);
  background: rgba(48, 209, 88, .1);
  border: 1px solid rgba(48, 209, 88, .2);
  padding: 4px 10px;
  border-radius: 980px;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: ld-pulse 2s infinite;
  display: inline-block;
}

#consumptionChart {
  width: 100%;
  height: 240px;
  display: block;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: var(--text2);
}

.ldot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Counters ─── */
.l-counter-section {
  padding: 140px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.l-counter-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(48, 209, 88, .05), transparent);
  pointer-events: none;
}

.counters {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
  margin-top: 0;
}

.ctr {
  opacity: 0;
  transform: translateY(20px);
  transition: all .8s cubic-bezier(.16, 1, .3, 1);
}

.ctr.visible {
  opacity: 1;
  transform: none;
}

.ctr:nth-child(2) {
  transition-delay: .1s;
}

.ctr:nth-child(3) {
  transition-delay: .2s;
}

.ctr:nth-child(4) {
  transition-delay: .3s;
}

.ctr-val {
  font-size: 3.8rem;
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1;
  background: linear-gradient(135deg, #fff 30%, var(--text2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.ctr-unit {
  font-size: 1.2rem;
  color: var(--green);
  font-weight: 600;
  letter-spacing: -.02em;
}

.ctr-lbl {
  font-size: .75rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 8px;
}

/* ─── CTA strip ─── */
.l-cta-strip {
  padding: 0 24px 120px;
}

.cta-glass {
  max-width: 1080px;
  margin: 0 auto;
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(40px);
  border: 1px solid var(--border2);
  border-radius: 28px;
  padding: 64px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.cta-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
}

.cta-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 0% 50%, rgba(48, 209, 88, .06), transparent);
  pointer-events: none;
}

.cta-text {
  position: relative;
  z-index: 1;
}

.cta-glass h2 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -.04em;
  margin-bottom: 8px;
}

.cta-glass p {
  color: var(--text2);
  font-size: .95rem;
  font-weight: 300;
}

.cta-actions {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ─── Animations ─── */
@keyframes ld-fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ld-pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .5;
    transform: scale(.9);
  }
}

/* ─── Responsive ─── */

/* Tablet / mobile — stack hero, reduce section padding */
@media (max-width: 768px) {
  /* Auth page: break the flex chain that constrains page-content to 100vh-footer.
     Without this, auth-page-wrap overflows page-content and sits on top of the footer.
     flex:none lets page-content grow with its content so body expands naturally. */
  body.auth-page .page-content {
    display: block;
    flex: none;
  }

  /* Hero: drop to single column */
  .l-hero--split {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 88px 20px 56px;
    gap: 40px;
    min-height: auto;
  }

  .hero-left {
    align-items: center;
    max-width: 100%;
  }

  .hero-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .l-hero--split .hero-sub {
    max-width: 100%;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .l-hero--split .hero-actions {
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
  }

  /* Mockup: hide laptop on mobile, show phone only centered */
  .hero-right {
    justify-content: center;
    width: 100%;
  }

  .laptop {
    display: none;
  }

  .mockup-scene {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    max-width: 180px;
    height: auto;
  }

  .phone {
    position: static;
    width: 130px;
  }

  .phone-screen {
    height: 200px;
  }

  /* Reduce section vertical padding */
  .l-section {
    padding: 72px 20px;
  }

  .l-scene-intro {
    padding: 72px 20px 40px;
  }

  .l-section-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  /* Timeline: single column */
  .l-timeline-section .l-container {
    flex-direction: column;
    gap: 40px;
  }

  /* Auth card: ensure it clears the navbar on tablets */
  .auth-page-wrap,
  body.auth-page .auth-page-wrap {
    padding: 88px 20px 56px;
  }

  /* Stop vertical centering on tablets/phablets — signup form overflows when centered */
  body.auth-page .auth-page-wrap {
    align-items: flex-start;
    min-height: auto;
    padding-bottom: 80px;
  }

  .auth-card {
    padding: 36px 28px;
  }
}

@media (max-width: 1100px) {
  .l-hero--split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    text-align: left;
    padding: 72px 24px 64px;
    gap: 20px;
  }

  .hero-left {
    max-width: 100%;
  }

  .hero-trust {
    justify-content: flex-start;
  }

  .hero-right {
    justify-content: center;
  }

  .mockup-scene {
    width: 380px;
    height: 300px;
  }

  .laptop {
    width: 300px;
  }

  .laptop-screen {
    height: 160px;
  }

  .phone {
    width: 84px;
  }

  .phone-screen {
    height: 138px;
  }
}

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento.large {
    grid-column: span 1;
  }

  .chart-layout {
    grid-template-columns: 1fr;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-glass {
    flex-direction: column;
    padding: 40px 24px;
  }

  .counters {
    gap: 40px;
  }
}

@media (max-width: 480px) {
  .auth-page-wrap {
    padding: 80px 16px 80px;
  }

  /* Auth page: stop centering vertically on small phones — let form flow naturally */
  body.auth-page .auth-page-wrap {
    align-items: flex-start;
    min-height: auto;
    padding-bottom: 96px;
  }

  .auth-card {
    padding: 32px 20px;
    border-radius: 20px;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .auth-tab {
    padding: 10px 16px;
    font-size: .9rem;
  }

  .metrics-strip {
    grid-template-columns: 1fr 1fr;
  }

  .l-hero--split .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-hero,
  .btn-hero2,
  .btn-fill,
  .btn-outline {
    justify-content: center;
  }

  .phone {
    width: 110px;
  }

  .phone-screen {
    height: 170px;
  }
}

/* Extra-small phones (≤380px) */
@media (max-width: 380px) {
  /* Hero title: prevent clamp minimum from being too large */
  .l-hero--split h1 {
    font-size: clamp(1.9rem, 10vw, 2.6rem);
  }

  .l-hero h1 {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
  }

  /* Mockup scene: shrink phone for very narrow screens */
  .phone {
    width: 95px;
  }

  .phone-screen {
    height: 148px;
  }

  /* CTA and auth: extra compact */
  .cta-glass {
    padding: 32px 16px;
  }

  .auth-card {
    padding: 28px 16px;
    border-radius: 16px;
  }

  .auth-title {
    font-size: 1.4rem;
  }

  body.auth-page .auth-page-wrap {
    padding-bottom: 104px;
  }

  /* Metrics: single column on very small screens */
  .metrics-strip {
    grid-template-columns: 1fr;
  }

  /* Section padding */
  .l-section {
    padding: 56px 16px;
  }

  .l-timeline-section {
    padding: 80px 16px;
  }
}