:root {
  --ink: #17382a;
  --brand: #24583e;
  --green: #74a943;
  --green-soft: #b8db98;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --chip-bg: #f8fafc;
  --chip-ink: #475569;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #fff;
  color: #0f172a;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #cfe5b9;
  color: var(--ink);
}

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

.ic {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Cabecera */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #f1f5f9;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.topbar-inner {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand {
  display: block;
}

.brand img {
  display: block;
  width: auto;
  height: 64px;
}

/* Hero */

.hero {
  position: relative;
}

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

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
}

.blob-l {
  left: -128px;
  top: -112px;
  width: 430px;
  height: 430px;
  background: rgba(221, 238, 204, .5);
}

.blob-r {
  right: -160px;
  top: 64px;
  width: 450px;
  height: 450px;
  background: #eaf4ee;
}

.hero-leaf {
  display: none;
  position: absolute;
  right: 8%;
  top: 80px;
  font-size: 190px;
  stroke-width: 1;
  color: rgba(116, 169, 67, .1);
}

.hero-inner {
  position: relative;
  padding-top: 56px;
  padding-bottom: 64px;
}

.intro {
  max-width: 768px;
  margin: 0 auto;
  text-align: center;
}

.intro h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.055em;
  color: var(--ink);
}

.intro h1 span {
  display: block;
  color: var(--green);
}

.intro p {
  max-width: 36rem;
  margin: 20px auto 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--muted);
}

/* Tarjetas de portal */

.portals {
  display: grid;
  gap: 20px;
  margin-top: 48px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, .8);
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 20px 65px -35px rgba(22, 55, 40, .38);
  transition: transform .3s ease, box-shadow .3s ease;
}

.card > span {
  position: relative;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 75px -34px rgba(22, 55, 40, .46);
}

.card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(116, 169, 67, .25), 0 20px 65px -35px rgba(22, 55, 40, .38);
}

.card > .card-bar {
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--c) 30%, color-mix(in srgb, var(--c) 30%, #fff));
}

.card > .card-glow {
  position: absolute;
  right: -80px;
  top: -80px;
  width: 256px;
  height: 256px;
  border-radius: 50%;
  background: var(--pale);
  opacity: .9;
  filter: blur(64px);
  transition: transform .5s ease;
}

.card:hover .card-glow {
  transform: scale(1.25);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--pale);
  color: var(--c);
}

.card-icon .ic {
  font-size: 31px;
  stroke-width: 1.8;
}

.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.badge .ic {
  font-size: 13px;
}

.badge-main {
  background: #f1f8ea;
  color: #577f35;
}

.badge-legacy {
  background: #fff4e5;
  color: #a95b16;
}

.card-body {
  display: block;
  margin-top: 28px;
}

.kicker {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c);
}

.card-title {
  display: block;
  margin-top: 8px;
  font-size: 29px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.045em;
  color: var(--ink);
}

.card-copy {
  display: block;
  max-width: 34ch;
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.chips > span {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip-bg);
  font-size: 12px;
  font-weight: 700;
  color: var(--chip-ink);
}

.card-foot {
  display: block;
  margin-top: auto;
  padding-top: 28px;
}

.domain {
  display: block;
  margin-bottom: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--c);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}

.cta .ic {
  font-size: 20px;
  transition: transform .2s;
}

.card:hover .cta .ic {
  transform: translate(4px, -4px);
}

/* Ayuda */

.help-section {
  padding-bottom: 48px;
}

.help {
  position: relative;
  overflow: hidden;
  padding: 32px 24px;
  border-radius: 32px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 25px 75px -36px rgba(23, 56, 42, .75);
}

.help-ring {
  position: absolute;
  right: -64px;
  top: -80px;
  width: 256px;
  height: 256px;
  border: 42px solid rgba(255, 255, 255, .045);
  border-radius: 50%;
}

.help-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.help-icon {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, .1);
  color: var(--green-soft);
}

.help-icon .ic {
  font-size: 27px;
}

.help-kicker {
  margin: 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green-soft);
}

.help h2 {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.help-actions {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.help-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 900;
  transition: transform .15s, background .15s;
}

.help-actions .ic {
  font-size: 18px;
}

.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-light .ic {
  color: var(--green);
}

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

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.btn-ghost .ic {
  color: var(--green-soft);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .15);
}

.brand:focus-visible,
.help-actions a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

/* Animación de entrada */

.reveal {
  animation: reveal .55s cubic-bezier(.22, .61, .36, 1) var(--d, 0s) backwards;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    animation: none;
  }

  .card,
  .card-glow,
  .cta .ic,
  .help-actions a {
    transition: none;
  }
}

/* Responsive */

@media (min-width: 640px) {
  .wrap {
    padding: 0 32px;
  }

  .hero-inner {
    padding-top: 80px;
  }

  .intro h1 {
    font-size: 48px;
  }

  .intro p {
    font-size: 18px;
  }

  .card {
    padding: 28px;
  }

  .help {
    padding: 32px 40px;
  }

  .help-actions {
    flex-direction: row;
  }

  .help-section {
    padding-bottom: 64px;
  }
}

@media (min-width: 1024px) {
  .hero-leaf {
    display: block;
  }

  .intro h1 {
    font-size: 62px;
  }

  .portals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }

  .help-actions {
    margin-top: 0;
  }

  /* Escritorio a pantalla completa, sin scroll vertical: los espacios se ajustan a la altura
     disponible y, si aun así no cabe, el script de index.html aplica zoom a .shell. */

  .shell {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh / var(--z, 1));
  }

  .shell.is-measuring {
    min-height: 0;
  }

  .shell > main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .topbar-inner {
    height: clamp(68px, 9.5vh, 88px);
  }

  .brand img {
    height: clamp(48px, 7vh, 64px);
  }

  .hero-inner {
    padding-top: clamp(16px, 4vh, 56px);
    padding-bottom: clamp(16px, 3vh, 40px);
  }

  .intro h1 {
    font-size: clamp(44px, 6.4vh, 62px);
  }

  .intro p {
    margin-top: clamp(8px, 1.8vh, 20px);
  }

  .portals {
    margin-top: clamp(20px, 4vh, 48px);
  }

  .card {
    padding: clamp(20px, 3vh, 28px) 28px;
  }

  .card-body {
    margin-top: clamp(14px, 2.6vh, 28px);
  }

  .card-copy {
    margin-top: clamp(8px, 1.6vh, 16px);
  }

  .chips {
    margin-top: clamp(12px, 2.2vh, 24px);
  }

  .card-foot {
    padding-top: clamp(16px, 2.6vh, 28px);
  }

  .help-section {
    padding-bottom: clamp(16px, 3vh, 48px);
  }

  .help {
    padding: clamp(18px, 3vh, 32px) 40px;
  }
}

/* Tarjetas apiladas: contenido centrado; la fila superior (icono y etiqueta) se mantiene a los lados. */
@media (max-width: 1023px) {
  .card-body,
  .card-foot {
    text-align: center;
  }

  .card-copy {
    margin-left: auto;
    margin-right: auto;
  }

  .chips {
    justify-content: center;
  }

  .cta {
    position: relative;
    justify-content: center;
    padding-left: 48px;
    padding-right: 48px;
  }

  .cta .ic {
    position: absolute;
    right: 20px;
  }
}

@media (max-width: 380px) {
  .intro h1 {
    font-size: 32px;
  }

  .card-title {
    font-size: 25px;
  }
}
