/* =========================
   JUDICIALES — BLACK / CYAN
   ========================= */

:root {
  --bg: #050607;
  --bg-soft: #0a0c0f;
  --panel: #0d1014;
  --text: #f3f7fa;
  --muted: #8d969f;
  --cyan: #57d6ff;
  --cyan-soft: rgba(87, 214, 255, .12);
  --border: rgba(255, 255, 255, .09);
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  z-index: -2;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .03;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 78px;
  padding: 0 max(24px, calc((100vw - var(--max-width)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: .3s ease;
}

.header.scrolled {
  background: rgba(5, 6, 7, .82);
  backdrop-filter: blur(18px);
  border-color: var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: .13em;
  font-size: .93rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(87, 214, 255, .55);
  display: grid;
  place-items: center;
  color: var(--cyan);
  box-shadow: inset 0 0 18px rgba(87, 214, 255, .08);
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: #a9b0b7;
  font-size: .86rem;
}

.nav a {
  transition: color .2s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--border);
  padding: 11px 18px;
}

.nav-cta:hover {
  border-color: rgba(87, 214, 255, .5);
  background: var(--cyan-soft);
}

.menu-toggle {
  display: none;
}

.hero {
  min-height: 100vh;
  max-width: var(--max-width);
  margin: auto;
  padding: 150px 24px 90px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: 70px;
  position: relative;
}

.hero-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  right: -180px;
  top: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(87,214,255,.08), transparent 68%);
  filter: blur(20px);
  z-index: -1;
}

.eyebrow {
  color: var(--cyan);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .22em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow i {
  width: 18px;
  height: 1px;
  background: var(--cyan);
}

.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.2rem, 7vw, 6.9rem);
  line-height: .94;
  letter-spacing: -.055em;
  margin: 24px 0 28px;
  max-width: 900px;
}

.hero h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(243,247,250,.38);
  position: relative;
}

.hero h1 span::after {
  content: "";
  position: absolute;
  width: 56px;
  height: 4px;
  background: var(--cyan);
  left: 2px;
  bottom: -11px;
}

.hero p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 650px;
  font-size: 1.03rem;
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 22px;
  font-size: .87rem;
  font-weight: 700;
  letter-spacing: .03em;
  transition: .25s ease;
}

.btn-primary {
  background: var(--cyan);
  color: #021015;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(87,214,255,.18);
}

.btn-secondary {
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.04);
}

.hero-card {
  aspect-ratio: .78;
  max-width: 350px;
  width: 100%;
  justify-self: end;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
}

.hero-card::before {
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
  top: -1px;
  left: -1px;
}

.hero-card::after {
  border-bottom: 1px solid rgba(87,214,255,.45);
  border-right: 1px solid rgba(87,214,255,.45);
  bottom: -1px;
  right: -1px;
}

.hero-card-top,
.hero-card-bottom {
  display: flex;
  justify-content: space-between;
  color: #747d85;
  font-size: .65rem;
  letter-spacing: .14em;
}

.status {
  color: #a7b0b7;
}

.status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 10px var(--cyan);
}

.monogram {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(6rem, 12vw, 9.5rem);
  font-weight: 700;
  letter-spacing: -.1em;
  text-align: center;
  color: rgba(255,255,255,.95);
  text-shadow: 8px 8px 0 rgba(87,214,255,.08);
  transform: translateX(-7px);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #5f6870;
  font-size: .62rem;
  letter-spacing: .17em;
}

.scroll-indicator i {
  width: 45px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.section {
  max-width: var(--max-width);
  margin: auto;
  padding: 120px 24px;
}

.section-heading {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 70px;
}

.section-number {
  font-family: "Space Grotesk", sans-serif;
  color: #3e464d;
  font-size: .85rem;
  border-top: 1px solid #30363b;
  padding-top: 10px;
}

.section-heading h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 1.05;
  max-width: 720px;
  margin-top: 14px;
  letter-spacing: -.035em;
}

.about {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 70px;
  align-items: end;
}

.about-copy p {
  color: var(--muted);
  line-height: 1.8;
  margin-top: 22px;
}

.about-copy .lead {
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.45rem, 2.7vw, 2.35rem);
  line-height: 1.35;
  margin-top: 0;
}

.stats {
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stat {
  padding: 34px 24px;
  border-right: 1px solid var(--border);
}

.stat:last-child {
  border-right: none;
}

.stat strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.3rem;
}

.stat span {
  color: var(--cyan);
  font-size: 1.4rem;
}

.stat small {
  display: block;
  color: #69727a;
  font-size: .63rem;
  letter-spacing: .16em;
  margin-top: 8px;
}

.identity {
  padding-top: 80px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.card {
  min-height: 310px;
  padding: 26px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: .3s ease;
  background: rgba(255,255,255,.012);
}

.card:hover {
  background: rgba(87,214,255,.035);
  transform: translateY(-4px);
}

.card-index {
  color: #4d555d;
  font-size: .68rem;
  letter-spacing: .14em;
}

.card-icon {
  color: var(--cyan);
  font-size: 1.3rem;
  margin: 58px 0 24px;
}

.card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  margin-bottom: 13px;
}

.card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: .88rem;
}

.statement {
  min-height: 440px;
  padding: 70px 24px;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(87,214,255,.055), transparent 45%),
    #07090b;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.statement p {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 5.4rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.statement p span {
  color: var(--cyan);
}

.statement-line {
  width: 1px;
  height: 45px;
  background: linear-gradient(var(--cyan), transparent);
}

.timeline {
  max-width: 940px;
  margin-left: auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 130px 35px 1fr;
  gap: 20px;
  min-height: 170px;
}

.timeline-year {
  color: #626b73;
  font-size: .65rem;
  letter-spacing: .16em;
  padding-top: 5px;
  text-align: right;
}

.timeline-dot {
  position: relative;
}

.timeline-dot::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 9px;
  height: 9px;
  transform: translateX(-50%);
  border: 1px solid var(--cyan);
  background: var(--bg);
}

.timeline-dot::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 1px;
  height: calc(100% - 6px);
  background: var(--border);
}

.timeline-item:last-child .timeline-dot::after {
  display: none;
}

.timeline-content {
  padding-bottom: 50px;
}

.timeline-content h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.timeline-content p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 610px;
}

.join {
  min-height: 480px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 24px;
}

.join-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(87,214,255,.08), transparent 64%);
  filter: blur(10px);
}

.join-content {
  position: relative;
  z-index: 2;
}

.join h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 4.8vw, 4.8rem);
  margin: 18px 0 18px;
  letter-spacing: -.04em;
}

.join p {
  color: var(--muted);
  margin-bottom: 34px;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.socials a {
  border: 1px solid var(--border);
  padding: 13px 19px;
  font-size: .82rem;
  transition: .2s ease;
}

.socials a:hover {
  border-color: rgba(87,214,255,.5);
  color: var(--cyan);
}

.join-watermark {
  position: absolute;
  bottom: -50px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(6rem, 16vw, 15rem);
  font-weight: 700;
  color: rgba(255,255,255,.018);
  letter-spacing: -.07em;
  pointer-events: none;
}

footer {
  max-width: var(--max-width);
  min-height: 150px;
  margin: auto;
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  color: #616a72;
  font-size: .72rem;
}

footer .brand {
  color: var(--text);
}

.to-top {
  letter-spacing: .12em;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s ease, transform .75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 950px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 135px;
  }

  .hero-card {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .header {
    height: 68px;
  }

  .menu-toggle {
    display: flex;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    cursor: pointer;
  }

  .menu-toggle span {
    width: 17px;
    height: 1px;
    background: white;
    transition: .25s ease;
  }

  .menu-toggle.active span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle.active span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .nav {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    padding: 25px;
    background: rgba(5,6,7,.97);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    transform: translateY(-120%);
    transition: .3s ease;
    z-index: -1;
  }

  .nav.open {
    transform: translateY(0);
  }

  .nav a {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-cta {
    border: none;
  }

  .hero {
    min-height: 94vh;
    padding: 120px 20px 80px;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  .scroll-indicator {
    display: none;
  }

  .section {
    padding: 90px 20px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    margin-bottom: 50px;
  }

  .section-number {
    width: 45px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .stat:last-child {
    border-bottom: none;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .timeline {
    margin-left: 0;
  }

  .timeline-item {
    grid-template-columns: 24px 1fr;
    gap: 14px;
  }

  .timeline-year {
    grid-column: 2;
    text-align: left;
    padding: 0 0 4px;
  }

  .timeline-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .timeline-content {
    grid-column: 2;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================
   MOTION UPGRADE
   ========================= */

:root {
  --ease-premium: cubic-bezier(.22, 1, .36, 1);
}

.header,
.hero-card,
.hero-glow,
.card,
.join-watermark {
  will-change: transform;
}

.header .brand,
.nav a,
.btn,
.socials a,
.to-top {
  position: relative;
}

.nav a:not(.nav-cta)::after,
.to-top::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease-premium);
}

.nav a:not(.nav-cta):hover::after,
.to-top:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.brand-mark {
  transition: transform .55s var(--ease-premium),
              box-shadow .55s var(--ease-premium),
              border-color .55s var(--ease-premium);
}

.brand:hover .brand-mark {
  transform: rotate(8deg) scale(1.05);
  border-color: var(--cyan);
  box-shadow: inset 0 0 22px rgba(87,214,255,.14), 0 0 24px rgba(87,214,255,.12);
}

.hero-content .eyebrow,
.hero-content h1,
.hero-content p,
.hero-actions {
  opacity: 0;
  transform: translateY(30px);
  animation: heroEnter .9s var(--ease-premium) forwards;
}

.hero-content h1 { animation-delay: .10s; }
.hero-content p { animation-delay: .22s; }
.hero-actions { animation-delay: .34s; }

.hero-card {
  opacity: 0;
  animation: cardEnter 1.15s .28s var(--ease-premium) forwards;
  transition: transform .45s var(--ease-premium),
              border-color .35s ease,
              box-shadow .45s var(--ease-premium);
}

.hero-card:hover {
  border-color: rgba(87,214,255,.28);
  box-shadow: 0 38px 100px rgba(0,0,0,.52), 0 0 50px rgba(87,214,255,.055);
}

.hero-glow {
  animation: glowPulse 7s ease-in-out infinite alternate;
  transition: transform .6s var(--ease-premium);
}

.monogram {
  animation: monogramFloat 5s ease-in-out infinite;
}

.scroll-indicator i {
  transform-origin: left;
  animation: scanLine 2.4s ease-in-out infinite;
}

.btn {
  overflow: hidden;
  transition: transform .35s var(--ease-premium),
              border-color .3s ease,
              background .3s ease,
              box-shadow .35s var(--ease-premium);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.22) 50%, transparent 75%);
  transform: translateX(-130%);
  transition: transform .7s var(--ease-premium);
}

.btn:hover::before {
  transform: translateX(130%);
}

.btn:hover {
  transform: translateY(-3px);
}

.reveal,
.reveal-item {
  opacity: 0;
  transform: translateY(42px) scale(.985);
  filter: blur(8px);
  transition:
    opacity .9s var(--ease-premium) var(--delay, 0ms),
    transform .9s var(--ease-premium) var(--delay, 0ms),
    filter .9s var(--ease-premium) var(--delay, 0ms);
}

.reveal.visible,
.reveal-item.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.card {
  overflow: hidden;
  transform-style: preserve-3d;
  transition:
    transform .35s var(--ease-premium),
    background .35s ease,
    border-color .35s ease,
    box-shadow .35s var(--ease-premium),
    opacity .9s var(--ease-premium) var(--delay, 0ms),
    filter .9s var(--ease-premium) var(--delay, 0ms);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(87,214,255,.11), transparent 35%);
  opacity: 0;
  transition: opacity .35s ease;
}

.card:hover::after {
  opacity: 1;
}

.card:hover {
  box-shadow: 0 24px 55px rgba(0,0,0,.34);
}

.card-icon {
  transition: transform .5s var(--ease-premium), text-shadow .4s ease;
}

.card:hover .card-icon {
  transform: translateY(-4px) rotate(6deg) scale(1.12);
  text-shadow: 0 0 20px rgba(87,214,255,.45);
}

.timeline-dot::before {
  transition: background .35s ease, box-shadow .35s ease, transform .35s var(--ease-premium);
}

.timeline-item:hover .timeline-dot::before {
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(87,214,255,.55);
  transform: translateX(-50%) scale(1.18);
}

.socials a {
  overflow: hidden;
  transition: transform .35s var(--ease-premium), color .25s ease, border-color .25s ease, background .25s ease;
}

.socials a:hover {
  transform: translateY(-4px);
  background: rgba(87,214,255,.045);
}

.statement p span {
  background: linear-gradient(90deg, #57d6ff, #b8efff, #57d6ff);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: cyanFlow 5s linear infinite;
}

.join-watermark {
  transition: transform .4s linear;
}

@keyframes heroEnter {
  from { opacity: 0; transform: translateY(34px); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(42px) rotateY(-5deg) scale(.96); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0) rotateY(0) scale(1); filter: blur(0); }
}

@keyframes glowPulse {
  0% { opacity: .65; scale: .96; }
  100% { opacity: 1; scale: 1.08; }
}

@keyframes monogramFloat {
  0%, 100% { transform: translateX(-7px) translateY(0); }
  50% { transform: translateX(-7px) translateY(-8px); }
}

@keyframes scanLine {
  0%, 100% { transform: scaleX(.35); opacity: .35; }
  50% { transform: scaleX(1); opacity: 1; }
}

@keyframes cyanFlow {
  to { background-position: 220% center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* =========================
   ACCESO / INICIO DE SESIÓN
   ========================= */
.header-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.login-trigger {
  position: relative;
  overflow: hidden;
  min-height: 42px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(87,214,255,.24);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.login-trigger::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(87,214,255,.12), transparent 75%);
  transform: translateX(-120%);
  transition: transform .55s ease;
}

.login-trigger:hover {
  transform: translateY(-2px);
  border-color: rgba(87,214,255,.68);
  background: rgba(87,214,255,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.28), inset 0 0 24px rgba(87,214,255,.025);
}

.login-trigger:hover::before { transform: translateX(120%); }

.login-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(87,214,255,.9);
}

body.login-open { overflow: hidden; }

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  pointer-events: none;
}

.login-modal.open {
  visibility: visible;
  pointer-events: auto;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.74);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity .35s ease;
}

.login-modal.open .login-backdrop { opacity: 1; }

.login-panel {
  position: relative;
  width: min(100%, 460px);
  padding: 42px;
  background:
    linear-gradient(rgba(255,255,255,.015), rgba(255,255,255,0)),
    #080a0d;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 35px 100px rgba(0,0,0,.65);
  opacity: 0;
  transform: translateY(24px) scale(.965);
  transition: opacity .38s ease, transform .48s cubic-bezier(.16,1,.3,1);
}

.login-modal.open .login-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.login-panel::before,
.login-panel::after {
  content: "";
  position: absolute;
  width: 55px;
  height: 55px;
  pointer-events: none;
}

.login-panel::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
}

.login-panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid rgba(87,214,255,.55);
  border-bottom: 1px solid rgba(87,214,255,.55);
}

.login-close {
  position: absolute;
  top: 17px;
  right: 18px;
  width: 34px;
  height: 34px;
  color: #76808a;
  background: transparent;
  border: 1px solid var(--border);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: .2s ease;
}

.login-close:hover {
  color: var(--text);
  border-color: rgba(87,214,255,.45);
  transform: rotate(90deg);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
  font-family: "Space Grotesk", sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .13em;
}

.login-brand .brand-mark { width: 31px; height: 31px; }

.login-label {
  color: var(--cyan);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .22em;
}

.login-panel h2 {
  margin: 11px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 6vw, 2.7rem);
  letter-spacing: -.045em;
}

.login-description {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.65;
  margin-bottom: 29px;
}

.login-form { display: grid; gap: 20px; }

.login-form > label > span {
  display: block;
  margin-bottom: 9px;
  color: #aeb6bd;
  font-size: .72rem;
  font-weight: 600;
}

.input-wrap {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  transition: border-color .23s ease, box-shadow .23s ease, background .23s ease;
}

.input-wrap:focus-within {
  border-color: rgba(87,214,255,.56);
  background: rgba(87,214,255,.025);
  box-shadow: 0 0 0 3px rgba(87,214,255,.055);
}

.input-wrap svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #59636c;
  stroke-width: 1.5;
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: .88rem;
}

.input-wrap input::placeholder { color: #454d54; }

.password-toggle {
  color: var(--cyan);
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .12em;
  cursor: pointer;
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  font-size: .7rem;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8c959d;
  cursor: pointer;
}

.remember input { position: absolute; opacity: 0; }

.checkmark {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 1px solid #343c43;
}

.remember input:checked + .checkmark {
  border-color: var(--cyan);
  background: var(--cyan);
}

.remember input:checked + .checkmark::after {
  content: "✓";
  color: #031015;
  font-size: .65rem;
  font-weight: 900;
}

.forgot-link { color: #aeb6bd; transition: color .2s ease; }
.forgot-link:hover { color: var(--cyan); }

.login-submit {
  min-height: 52px;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #031015;
  background: var(--cyan);
  border: 0;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .24s ease, box-shadow .24s ease;
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 35px rgba(87,214,255,.18);
}

.login-message {
  min-height: 18px;
  color: var(--cyan);
  font-size: .72rem;
  text-align: center;
}

.login-footer {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: #515a62;
  font-size: .57rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
}

.login-footer span { height: 1px; background: var(--border); }

@media (max-width: 950px) {
  .header-actions { gap: 12px; }
  .login-trigger { margin-left: auto; }
}

@media (max-width: 720px) {
  .header-actions { margin-left: auto; gap: 9px; }
  .login-trigger { min-height: 40px; padding: 0 12px; font-size: .68rem; }
  .nav { z-index: -1; }
  .login-panel { padding: 36px 24px 28px; }
  .login-brand { margin-bottom: 30px; }
  .login-options { align-items: flex-start; }
}

@media (max-width: 420px) {
  .login-trigger { font-size: 0; width: 42px; justify-content: center; padding: 0; }
  .login-trigger::after { content: "↗"; font-size: .8rem; color: var(--cyan); }
  .login-options { flex-direction: column; }
}


/* ===== Tarjeta giratoria: Judiciales / Founder ===== */
.hero-card {
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  perspective: 1400px;
  transform-style: preserve-3d;
}

.hero-card::before,
.hero-card::after {
  display: none;
}

.hero-card-flipper {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 1.15s cubic-bezier(.18,.78,.22,1);
  will-change: transform;
}

.hero-card.is-flipped .hero-card-flipper {
  transform: rotateY(180deg);
}

.hero-card-face {
  position: absolute;
  inset: 0;
  padding: 22px;
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.008)),
    #080a0d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 30px 80px rgba(0,0,0,.42);
}

.hero-card-face::before,
.hero-card-face::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  pointer-events: none;
}

.hero-card-face::before {
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
  top: -1px;
  left: -1px;
}

.hero-card-face::after {
  border-bottom: 1px solid rgba(87,214,255,.45);
  border-right: 1px solid rgba(87,214,255,.45);
  bottom: -1px;
  right: -1px;
}

.hero-card-back {
  transform: rotateY(180deg);
  justify-content: flex-start;
  background:
    linear-gradient(180deg, #030303 0 31%, #080a0d 31% 100%);
}

.hero-card-bottom {
  align-items: flex-end;
}

.flip-hint {
  color: var(--cyan);
  font-size: .54rem;
  letter-spacing: .13em;
  opacity: .72;
  animation: flipHintPulse 1.8s ease-in-out infinite;
}

.founder-topline,
.founder-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #747d85;
  font-size: .61rem;
  letter-spacing: .14em;
  position: relative;
  z-index: 2;
}

.discord-status {
  color: #aab3bb;
}

.discord-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.founder-profile {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 38px;
  position: relative;
  z-index: 2;
}

.founder-avatar {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border-radius: 50%;
  border: 1px solid rgba(87,214,255,.45);
  background: #030303;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: inset 0 0 26px rgba(87,214,255,.08), 0 0 30px rgba(87,214,255,.06);
}

.founder-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: grayscale(100%) contrast(1.08) brightness(.92);
}

.founder-avatar i {
  position: absolute;
  width: 15px;
  height: 15px;
  right: 1px;
  bottom: 3px;
  border-radius: 50%;
  background: var(--cyan);
  border: 3px solid #080a0d;
  box-shadow: 0 0 12px rgba(87,214,255,.8);
}

.founder-role {
  display: inline-block;
  position: relative;
  color: #dff8ff;
  background: transparent;
  font-family: "Space Grotesk", sans-serif;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .28em;
  padding: 4px 0 7px;
  margin-bottom: 8px;
  text-shadow:
    0 0 4px rgba(87, 214, 255, .95),
    0 0 10px rgba(87, 214, 255, .8),
    0 0 22px rgba(87, 214, 255, .55);
  animation: founderTitleGlow 2.2s ease-in-out infinite;
}

.founder-role::before {
  content: "";
  position: absolute;
  left: 0;
  right: .28em;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(87, 214, 255, .95),
    transparent
  );
  box-shadow: 0 0 10px rgba(87, 214, 255, .85);
}

.founder-role::after {
  content: "◆";
  position: absolute;
  right: -17px;
  top: 2px;
  color: var(--cyan);
  font-size: .48rem;
  text-shadow: 0 0 9px var(--cyan);
  animation: founderDiamondPulse 1.6s ease-in-out infinite;
}


.owner-signature {
  color: rgba(165, 179, 190, .62);
  letter-spacing: .2em;
}

.founder-identity {
  position: relative;
}

.founder-identity::before {
  content: "";
  position: absolute;
  width: 115px;
  height: 48px;
  left: -14px;
  top: -7px;
  background: radial-gradient(
    ellipse,
    rgba(87, 214, 255, .13),
    transparent 70%
  );
  filter: blur(8px);
  pointer-events: none;
  animation: founderAura 2.2s ease-in-out infinite;
}

@keyframes founderTitleGlow {
  0%, 100% {
    opacity: .9;
    filter: brightness(.95);
    text-shadow:
      0 0 4px rgba(87, 214, 255, .8),
      0 0 10px rgba(87, 214, 255, .55),
      0 0 18px rgba(87, 214, 255, .3);
  }
  50% {
    opacity: 1;
    filter: brightness(1.35);
    text-shadow:
      0 0 5px rgba(220, 249, 255, 1),
      0 0 13px rgba(87, 214, 255, 1),
      0 0 30px rgba(87, 214, 255, .75),
      0 0 45px rgba(87, 214, 255, .35);
  }
}

@keyframes founderDiamondPulse {
  0%, 100% {
    opacity: .45;
    transform: scale(.8) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.15) rotate(45deg);
  }
}

@keyframes founderAura {
  0%, 100% {
    opacity: .45;
    transform: scale(.94);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.founder-identity h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.65rem;
  line-height: 1;
}

.founder-identity p {
  color: #77818a;
  font-size: .72rem;
  margin-top: 7px;
}

.hero-card-back blockquote {
  position: relative;
  z-index: 2;
  color: #c4cbd1;
  font-family: "Space Grotesk", sans-serif;
  font-size: .92rem;
  line-height: 1.6;
  padding: 18px 0 18px 16px;
  margin: 25px 0 auto;
  border-left: 1px solid var(--cyan);
}

.hero-card-back blockquote::before {
  content: "“";
  position: absolute;
  top: -24px;
  right: 0;
  font-size: 6rem;
  line-height: 1;
  color: rgba(87,214,255,.06);
}

.flip-back {
  color: var(--cyan);
  background: transparent;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  cursor: default;
  padding: 5px 0;
}

.hero-card.is-flipping .hero-card-face {
  box-shadow: 0 32px 100px rgba(0,0,0,.52), 0 0 45px rgba(87,214,255,.05);
}

@keyframes flipHintPulse {
  0%, 100% { opacity: .4; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-card-flipper { transition-duration: .01ms; }
  .flip-hint { animation: none; }
}


/* Motion polish profesional */
:root{
  --ease-pro:cubic-bezier(.16,1,.3,1);
  --ease-spring:cubic-bezier(.2,1.3,.38,1);
}
.header{transition:background .45s ease,border-color .45s ease,backdrop-filter .45s ease,transform .5s var(--ease-pro)}
.brand-mark{position:relative;overflow:hidden;transition:transform .45s var(--ease-spring),box-shadow .4s ease}
.brand:hover .brand-mark{transform:rotate(-5deg) scale(1.06);box-shadow:0 0 25px rgba(87,214,255,.16)}
.hero-content.visible>*{animation:landingStagger .8s var(--ease-pro) both}
.hero-content.visible>*:nth-child(1){animation-delay:.05s}.hero-content.visible>*:nth-child(2){animation-delay:.12s}.hero-content.visible>*:nth-child(3){animation-delay:.2s}.hero-content.visible>*:nth-child(4){animation-delay:.28s}
@keyframes landingStagger{from{opacity:0;transform:translateY(24px);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}
.hero-card{transition:transform .7s var(--ease-pro),box-shadow .6s ease}
.btn,.nav a,.socials a{position:relative;overflow:hidden}
.btn::after{content:"";position:absolute;top:-100%;bottom:-100%;left:-50%;width:25px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);transform:rotate(18deg)}
.btn:hover::after{animation:landingSweep .7s var(--ease-pro)}
@keyframes landingSweep{to{left:130%}}
.card{transition:transform .55s var(--ease-pro),background .4s ease,border-color .4s ease,box-shadow .5s ease}
.card:hover{transform:translateY(-7px);border-color:rgba(87,214,255,.22);box-shadow:0 25px 70px rgba(0,0,0,.3)}
.reveal{filter:blur(5px);transform:translateY(28px) scale(.99);transition:opacity .8s ease,transform .85s var(--ease-pro),filter .75s ease}
.reveal.visible{filter:none;transform:none}
.login-modal{transition:visibility .3s ease}
.login-panel{transform:translateY(28px) scale(.96);filter:blur(7px);transition:transform .6s var(--ease-pro),opacity .4s ease,filter .4s ease}
.login-modal.open .login-panel{transform:none;filter:none}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}}


/* FIX: prevents any login/reveal blur from remaining after navigation */
html, body { filter: none !important; }
body:not(.login-open) .login-panel { filter: none; }
body:not(.login-open) .login-backdrop { backdrop-filter: none; }

/* Acceso: pestañas de inicio de sesión y registro */
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:18px 0 20px;padding:4px;border:1px solid rgba(255,255,255,.07);background:rgba(0,0,0,.22)}
.auth-tab{border:0;background:transparent;color:#5f6b74;padding:10px 8px;font-size:.56rem;letter-spacing:.12em;cursor:pointer;transition:background .3s ease,color .3s ease,transform .3s ease}
.auth-tab:hover{color:#b7c1c8}.auth-tab.active{background:rgba(87,214,255,.08);color:#57d6ff;box-shadow:inset 0 0 0 1px rgba(87,214,255,.15)}
.register-only[hidden]{display:none!important}
.login-message{min-height:18px}
