/* ============================================
   RATC — Tokens
   ============================================ */
:root {
  --navy-900: #0a0e1a;
  --navy-800: #111c30;
  --navy-700: #1a2740;
  --navy-600: #243355;
  --trace: #20304f;

  --copper: #c97c3d;
  --copper-bright: #e59a56;
  --cyan: #6fe3d9;

  /* Colores vivos — uno por servicio, como bandas de color de resistores */
  --vivid-orange: #ff8a3d;
  --vivid-cyan: #2de1ff;
  --vivid-red: #ff4d6d;
  --vivid-green: #4ade80;
  --vivid-violet: #b18aff;

  --text-primary: #edf1f9;
  --text-secondary: #93a1bd;
  --text-muted: #7585a8;

  --font-display: 'IBM Plex Mono', ui-monospace, monospace;
  --font-body: 'Inter', system-ui, sans-serif;

  --container-w: 1120px;
  --radius: 6px;
}

/* ============================================
   Reset & base
   ============================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-900);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.2; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--copper);
  color: var(--navy-900);
  padding: 8px 16px;
  z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

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

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-copper {
  background: var(--copper);
  color: var(--navy-900);
}
.btn-copper:hover { background: var(--copper-bright); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: var(--navy-600);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--navy-700);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--copper);
}
.logo-mark { width: 32px; height: 32px; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.site-nav { display: flex; gap: 28px; }
.site-nav a {
  font-size: 14px;
  color: var(--text-secondary);
  margin-right: 28px;
  transition: color 0.15s ease;
}
.site-nav a:last-child { margin-right: 0; }
.site-nav a:hover { color: var(--cyan); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--navy-600);
  border-radius: var(--radius);
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0 auto;
  background: var(--text-primary);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
  border-bottom: 1px solid var(--navy-700);
}
.hero-bg {
  position: absolute;
  inset: 0;
  color: var(--trace);
  opacity: 0.7;
  pointer-events: none;
}
.hero-bg svg { width: 100%; height: 100%; }
.trace-nodes circle {
  animation: pulse-node 4s ease-in-out infinite;
}
.trace-nodes circle:nth-child(1) { color: var(--vivid-cyan); animation-delay: 0.6s; }
.trace-nodes circle:nth-child(2) { color: var(--vivid-orange); animation-delay: 1.2s; }
.trace-nodes circle:nth-child(3) { color: var(--vivid-violet); animation-delay: 1.8s; }
.trace-nodes circle:nth-child(4) { color: var(--vivid-green); animation-delay: 2.4s; }
.trace-nodes circle:nth-child(5) { color: var(--vivid-red); animation-delay: 3s; }
.trace-nodes circle:nth-child(6) { color: var(--cyan); animation-delay: 0.3s; }
.trace-nodes circle:nth-child(7) { color: var(--vivid-orange); animation-delay: 1.5s; }
.trace-nodes circle:nth-child(8) { color: var(--vivid-violet); animation-delay: 2.1s; }

@keyframes pulse-node {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 56px;
}
.hero-copy { max-width: 600px; }
.hero-art {
  flex: none;
  width: 280px;
  height: 280px;
}
.hero-art svg { width: 100%; height: 100%; }
.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--text-secondary);
}
.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-meta-item svg { width: 16px; height: 16px; color: var(--vivid-orange); }
.hero-meta-item:nth-child(3) svg { color: var(--vivid-cyan); }
.hero-meta-divider { color: var(--text-muted); font-size: 16px; line-height: 1; }

/* ============================================
   Services — chip cards
   ============================================ */
.services { padding: 96px 0; border-bottom: 1px solid var(--navy-700); }
.services h2 {
  font-size: clamp(26px, 4vw, 34px);
  margin: 14px 0 12px;
  color: var(--text-primary);
}
.section-sub {
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 48px;
  font-size: 16px;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.chip-card {
  --accent: var(--copper);
  position: relative;
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px 22px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.chip-card[data-accent="cyan"]   { --accent: var(--vivid-cyan); }
.chip-card[data-accent="red"]    { --accent: var(--vivid-red); }
.chip-card[data-accent="green"]  { --accent: var(--vivid-green); }
.chip-card[data-accent="violet"] { --accent: var(--vivid-violet); }
.chip-card[data-accent="orange"] { --accent: var(--vivid-orange); }

.chip-card::before, .chip-card::after {
  content: "";
  position: absolute;
  left: 18px;
  width: 14px;
  height: 2px;
  background: var(--navy-600);
}
.chip-card::before { top: -2px; }
.chip-card::after { bottom: -2px; }
.chip-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -14px var(--accent);
}
.chip-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.chip-id {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--navy-600);
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: 10px;
}
.chip-card-head { display: flex; align-items: center; margin-bottom: 18px; }
.chip-card h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.35;
}
.chip-card p { color: var(--text-secondary); font-size: 14.5px; }

/* ============================================
   About
   ============================================ */
.about { padding: 96px 0; border-bottom: 1px solid var(--navy-700); }
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.about-text h2 { font-size: clamp(26px, 4vw, 34px); margin: 14px 0 20px; }
.about-text p { color: var(--text-secondary); margin-bottom: 16px; font-size: 16px; }

.about-id {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.about-photo {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--copper);
}
.about-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  margin: 0;
}
.about-role {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.status-panel {
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  border-radius: var(--radius);
  padding: 6px 0;
  font-family: var(--font-display);
  font-size: 13.5px;
}
.status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--navy-700);
}
.status-row:last-child { border-bottom: none; }
.status-row span:first-child { color: var(--text-muted); text-transform: lowercase; }
.status-row span:last-child { color: var(--cyan); text-align: right; }

/* ============================================
   Contact
   ============================================ */
.contact { padding: 96px 0 110px; }
.contact h2 { font-size: clamp(26px, 4vw, 34px); margin: 14px 0 10px; }
.contact .section-sub { margin-bottom: 44px; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.contact-card {
  --accent: var(--copper);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-card[data-accent="green"]  { --accent: var(--vivid-green); }
.contact-card[data-accent="cyan"]   { --accent: var(--vivid-cyan); }
.contact-card[data-accent="violet"] { --accent: var(--vivid-violet); }
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -14px var(--accent);
}
.contact-icon { width: 22px; height: 22px; color: var(--accent); }
.contact-label { font-size: 13px; color: var(--text-muted); }
.contact-value {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-primary);
  word-break: break-word;
}

/* ============================================
   Footer
   ============================================ */
.site-footer { border-top: 1px solid var(--navy-700); padding: 28px 0 36px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   Scroll reveal
   ============================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .trace-nodes circle { animation: none; opacity: 0.6; }
  .btn-copper:hover, .chip-card:hover, .contact-card:hover { transform: none; }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .chip-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { display: none; }
}

@media (max-width: 680px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy-800);
    border-bottom: 1px solid var(--navy-700);
    padding: 8px 24px 16px;
  }
  .site-nav a { padding: 10px 0; border-bottom: 1px solid var(--navy-700); }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav.is-open { display: flex; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }

  .hero { padding: 64px 0 56px; }
  .services, .about, .contact { padding: 64px 0; }
  .chip-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }

  .status-row { flex-direction: column; gap: 4px; }
  .status-row span:last-child { text-align: left; }
}
