/* ============================================
   00b5e2 - Design System
   Technical infrastructure layer
   Inspired by Portfolio (aaangelmartin.com)
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Colors */
  --bg: #0a0a0a;
  --bg-card: #111;
  --bg-hover: #1a1a1a;
  --text: #fff;
  --text-dim: #777;
  --accent: #00b5e2;
  --accent-dim: rgba(0, 181, 226, 0.1);

  /* Typography - Space Mono (Outfit-like but monospace) */
  --font: "Space Mono", "JetBrains Mono", monospace;

  /* Spacing */
  --section-padding: 100px;
  --container-padding: clamp(20px, 5vw, 40px);

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-fast: 0.25s var(--ease);
  --transition-normal: 0.35s var(--ease);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--text-dim);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Utility classes */
.accent {
  color: var(--accent);
}

.white {
  color: var(--text);
}

/* ============================================
   SITE CONTAINER
   ============================================ */
.site {
  position: relative;
  z-index: 1;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--container-padding);
}

/* Gradient fade for nav background */
.nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(
    to bottom,
    var(--bg) 0%,
    var(--bg) 50%,
    transparent 100%
  );
  z-index: -1;
}

.nav__logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Language toggle button */
.nav__lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: 8px;
  transition: background var(--transition-fast);
}

.nav__lang:hover {
  background: var(--bg-hover);
}

.nav__lang-option {
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
}

.nav__lang-divider {
  color: rgba(255, 255, 255, 0.2);
}

/* Active language highlight */
[data-lang="es"] .nav__lang-option[data-lang-value="es"],
[data-lang="en"] .nav__lang-option[data-lang-value="en"] {
  color: var(--accent);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px var(--container-padding) var(--section-padding);
}

.hero__content {
  max-width: 700px;
}

.hero__greeting {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.hero__title {
  font-size: clamp(64px, 16vw, 150px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-dim);
  margin-bottom: 48px;
  max-width: 500px;
}

.hero__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.card:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.card svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Status dot (animated) */
.card__dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2.5s var(--ease) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* Large card variant */
.card--large {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 24px;
  gap: 4px;
}

.card--large svg {
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  color: var(--accent);
}

.card--large .card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition-fast);
}

.card--large:hover .card__title {
  color: var(--accent);
}

.card--large .card__desc {
  font-size: 12px;
  color: var(--text-dim);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  position: relative;
  padding: var(--section-padding) var(--container-padding);
}

.section__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 5px 12px;
  background: var(--accent-dim);
  border-radius: 4px;
}

.section__title {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 24px;
}

.section__desc {
  font-size: 16px;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 24px;
}

/* ============================================
   CARDS GRID
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 24px;
}

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

/* ============================================
   TREE / NODES
   ============================================ */
.tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tree__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: 10px;
  transition: background var(--transition-fast);
}

.tree__item:hover {
  background: var(--bg-hover);
}

.tree__item:hover .tree__label {
  color: var(--accent);
}

.tree__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition-fast);
}

.tree__value {
  font-size: 13px;
  color: var(--text-dim);
  margin-left: auto;
}

/* ============================================
   SERVICES (Status Page)
   ============================================ */
.services {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: 10px;
}

.service__info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.service__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.service__latency {
  font-size: 12px;
  color: var(--text-dim);
}

/* ============================================
   STATUS INDICATORS
   ============================================ */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

.status__dot.operational {
  background: #22c55e;
}

.status__dot.degraded {
  background: #eab308;
}

.status__dot.offline {
  background: #ef4444;
}

.status__dot.checking {
  background: var(--text-dim);
  animation: pulse 1.5s var(--ease) infinite;
}

.status__text.operational {
  color: #22c55e;
}

.status__text.degraded {
  color: #eab308;
}

.status__text.offline {
  color: #ef4444;
}

/* ============================================
   MANIFESTO (Why Page)
   ============================================ */
.manifesto {
  max-width: 560px;
}

.manifesto p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.manifesto .emphasis {
  font-weight: 600;
  color: var(--accent);
}

/* ============================================
   ERROR PAGE (404)
   ============================================ */
.error-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--container-padding);
}

.error__code {
  font-size: clamp(100px, 25vw, 200px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
}

.error__message {
  font-size: 16px;
  color: var(--text-dim);
  margin-top: 16px;
  margin-bottom: 48px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  transition:
    box-shadow var(--transition-normal),
    background var(--transition-fast);
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}

.btn--primary:hover {
  box-shadow: 0 10px 35px rgba(0, 181, 226, 0.35);
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text);
}

.btn--secondary:hover {
  background: var(--bg-hover);
}

/* ============================================
   FOOTER (Portfolio-style 3-column grid)
   ============================================ */
.footer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 100px var(--container-padding) 24px;
  font-size: 12px;
}

/* Gradient shadow from bottom */
.footer::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(
    to top,
    var(--bg) 0%,
    var(--bg) 30%,
    transparent 100%
  );
  z-index: -1;
  pointer-events: none;
}

.footer__logo {
  font-size: 18px;
  font-weight: 700;
}

.footer__tagline {
  color: var(--text-dim);
  transition: color var(--transition-fast);
  justify-self: center;
}

.footer__tagline a {
  color: var(--text);
  transition: color var(--transition-fast);
}

.footer__tagline a:hover {
  color: var(--accent);
}

.footer__year {
  color: var(--text-dim);
  text-align: right;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: 80px;
  }

  .hero {
    padding-top: 100px;
  }

  .hero__cards {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 480px) {
  .footer {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
    padding-top: 60px;
  }

  .footer__tagline {
    justify-self: center;
  }

  .footer__year {
    text-align: center;
  }
}
