:root {
  --bg: #060d14;
  --bg-elev: #0b1622;
  --line: #1e3a4f;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-dim: #0e7490;
  --amber: #f59e0b;
  --green: #4ade80;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
  animation: drift 28s ease-in-out infinite alternate;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 13, 20, 0.35) 0%, rgba(6, 13, 20, 0.55) 45%, rgba(6, 13, 20, 0.92) 100%),
    radial-gradient(ellipse at 50% 0%, transparent 30%, rgba(6, 13, 20, 0.75) 100%);
}

@keyframes drift {
  from { transform: scale(1.02) translateY(0); }
  to { transform: scale(1.08) translateY(-1.5%); }
}

.top,
main,
.foot {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text strong {
  font-size: 1rem;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.logo-text span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.status-chip {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--green);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 5.5rem) 1.5rem 2rem;
  min-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0;
  animation: rise 0.7s ease forwards 0.1s;
}

.brand-hero {
  margin: 0;
  font-size: clamp(3.4rem, 12vw, 6.5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 0.95;
  color: #f8fafc;
  text-shadow: 0 0 40px rgba(34, 211, 238, 0.18);
  opacity: 0;
  animation: rise 0.8s ease forwards 0.2s;
}

.lede {
  margin: 1.15rem 0 0;
  max-width: 34rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--muted);
  opacity: 0;
  animation: rise 0.8s ease forwards 0.35s;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  opacity: 0;
  animation: rise 0.8s ease forwards 0.5s;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

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

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

.btn-primary:hover {
  background: #67e8f9;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--cyan-dim);
  background: rgba(14, 116, 144, 0.12);
}

.apps {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3.5rem;
}

.section-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section-sub {
  margin: 0.35rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: rgba(11, 22, 34, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.tile:hover {
  transform: translateY(-3px);
  border-color: var(--cyan-dim);
  background: rgba(14, 28, 44, 0.9);
}

.tile:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.tile-icon {
  display: block;
  flex-shrink: 0;
}

.tile-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.tile-body p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.path {
  display: inline-block;
  margin-top: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.02em;
}

.tile-go {
  font-size: 1.25rem;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.tile:hover .tile-go {
  color: var(--cyan);
  transform: translateX(3px);
}

.tile[data-tone="mapa"]:hover { border-color: #0e7490; }
.tile[data-tone="hospital"]:hover { border-color: #0284c7; }
.tile[data-tone="county"]:hover { border-color: #16a34a; }
.tile[data-tone="city"]:hover { border-color: #ea580c; }

.foot {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.sep {
  opacity: 0.5;
}

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

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .brand-hero {
    letter-spacing: 0.04em;
  }

  .tile {
    grid-template-columns: auto 1fr;
  }

  .tile-go {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
