/*
 * Launcher: selector entre calculadora personal e institucional.
 *
 * Sin build ni framework a propósito: son dos tarjetas y no justifican una
 * tercera app React. Los valores replican los tokens de la app personal
 * (src/index.css) para que la transición entre el selector y la calculadora
 * no se note.
 */

:root {
  --primary: 132 47% 38%;      /* verde Verde Vivo */
  --secondary: 227 58% 24%;    /* azul marino */
  --foreground: 227 58% 14%;
  --muted-foreground: 227 20% 45%;
  --border: 120 12% 88%;
  --radius: 0.75rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  color: hsl(var(--foreground));
  position: relative;
  overflow-x: hidden;

  /* organic-gradient, idéntico al de la calculadora personal */
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, hsla(132, 55%, 82%, 0.38) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 8%, hsla(227, 50%, 88%, 0.32) 0%, transparent 50%),
    radial-gradient(ellipse 60% 70% at 50% 100%, hsla(132, 45%, 84%, 0.28) 0%, transparent 60%),
    linear-gradient(180deg, hsl(0, 0%, 99%) 0%, hsl(120, 15%, 96%) 100%);
  background-attachment: fixed;
}

/* ── Decoraciones flotantes ── */

.decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.decor svg { position: absolute; }

.decor-leaf-1 {
  top: 14%; right: 6%;
  width: 7rem; height: 7rem;
  color: hsl(var(--primary));
  opacity: .2;
  animation: float-a 8s ease-in-out infinite;
}

.decor-tree {
  bottom: 15%; left: 4%;
  width: 10rem; height: 10rem;
  color: hsl(var(--primary));
  opacity: .1;
  animation: float-b 11s ease-in-out infinite;
}

.decor-leaf-2 {
  top: 55%; right: 3%;
  width: 5rem; height: 5rem;
  color: hsl(var(--secondary));
  opacity: .1;
  transform: rotate(-12deg);
  animation: float-c 9s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-20px) rotate(8deg); }
}
@keyframes float-b {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(15px) rotate(-10deg); }
}
@keyframes float-c {
  0%, 100% { transform: translateY(0) rotate(-12deg); }
  50%      { transform: translateY(10px) rotate(-7deg); }
}

/* ── Barra superior ── */

.navbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border) / .4);
}

.navbar-logo { height: 2rem; width: auto; }

.navbar-tagline {
  font-size: .75rem;
  color: hsl(var(--muted-foreground));
}

/* ── Contenido ── */

.container {
  position: relative;
  z-index: 1;
  max-width: 64rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 6rem;
}

.hero {
  text-align: center;
  margin-bottom: 3.5rem;
  animation: rise .8s cubic-bezier(.16, 1, .3, 1) both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem 1rem;
  margin-bottom: 1.75rem;
  border-radius: 9999px;
  background: hsl(var(--primary) / .1);
  border: 1px solid hsl(var(--primary) / .2);
  color: hsl(var(--primary));
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.badge svg { width: .875rem; height: .875rem; }

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.025em;
  color: hsl(var(--secondary));
}

h1 .accent { color: hsl(var(--primary)); }

.hero-sub {
  max-width: 32rem;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.65;
  color: hsl(var(--muted-foreground));
}

.hero-sub strong {
  color: hsl(var(--secondary));
  font-weight: 500;
}

/* ── Tarjetas ── */

.cards {
  display: grid;
  gap: 1.25rem;
  max-width: 48rem;
  margin: 0 auto;
}

.card {
  position: relative;
  display: block;
  padding: 2rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid hsl(var(--border) / .7);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), box-shadow .5s cubic-bezier(.16, 1, .3, 1);
  animation: rise .7s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: var(--delay, 0s);
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 25px -5px hsl(var(--primary) / .12), 0 8px 10px -6px hsl(var(--primary) / .12);
}

.card:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 3px;
}

.card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: hsl(var(--primary) / .5);
  transition: background .3s;
}

.card:hover .card-accent { background: hsl(var(--primary)); }

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: .5rem 0 1.75rem;
  border-radius: .75rem;
  background: hsl(var(--primary) / .1);
  color: hsl(var(--primary));
}

.card-icon svg { width: 1.25rem; height: 1.25rem; }

.card-kicker {
  display: block;
  margin-bottom: .5rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: hsl(var(--primary) / .7);
}

.card-title {
  margin: 0 0 .75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.025em;
  color: hsl(var(--secondary));
}

.card-desc {
  margin: 0 0 2.5rem;
  font-size: 15px;
  line-height: 1.65;
  color: hsl(var(--muted-foreground));
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-meta {
  font-size: .75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: hsl(var(--secondary));
  color: #fff;
  transition: transform .3s;
}

.card:hover .card-arrow { transform: translateX(4px); }

.card-arrow svg { width: 1rem; height: 1rem; }

/* Variante destacada: la institucional, como la tarjeta resaltada del original */

.card--highlighted {
  background: hsl(var(--secondary));
  border-color: transparent;
  box-shadow: 0 20px 25px -5px hsl(var(--secondary) / .3), 0 8px 10px -6px hsl(var(--secondary) / .3);
}

.card--highlighted .card-accent { background: hsl(var(--primary)); }
.card--highlighted .card-icon { background: hsl(var(--primary)); color: #fff; }
.card--highlighted .card-kicker { color: hsl(var(--primary)); }
.card--highlighted .card-title { color: #fff; }
.card--highlighted .card-desc { color: rgb(255 255 255 / .7); }
.card--highlighted .card-meta { color: rgb(255 255 255 / .6); }
.card--highlighted .card-arrow { background: hsl(var(--primary)); }

.card--highlighted:hover {
  box-shadow: 0 25px 30px -5px hsl(var(--secondary) / .4), 0 10px 12px -6px hsl(var(--secondary) / .4);
}

/* ── Pie ── */

.foot {
  margin-top: 4rem;
  text-align: center;
  animation: fade .8s .8s both;
}

.foot p {
  margin: 0;
  font-size: .75rem;
  color: hsl(var(--muted-foreground) / .6);
}

/* ── Animaciones de entrada ── */

@keyframes rise {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Responsive ── */

@media (min-width: 768px) {
  .navbar { padding: 1rem 2.5rem; }
  .navbar-logo { height: 2.5rem; }
  .container { padding: 5rem 2rem 6rem; }
  .hero { margin-bottom: 5rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 2.5rem; }
  .card-title { font-size: 1.875rem; }
}

@media (max-width: 640px) {
  .navbar-tagline { display: none; }
  .decor-tree, .decor-leaf-2 { display: none; }
}

/* Respeta a quien pide menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
