/* jaberto.ai — Sistema Visual Oficial (Fase 2 + Fase 4) */
:root {
  --bg-dark: #0D0F12;
  --surface-dark: #15181E;
  --surface-elevated: #1B1F27;
  --border-dark: #262B35;
  --bg-light: #F4F4F0;
  --surface-light: #FFFFFF;
  --border-light: #DFDFD7;
  --accent: #FF5A1F;
  --accent-hover: #E84B12;
  --mint: #2DD4BF;
  --mint-dark: #0F766E;
  --alert: #EF4444;
  --text-light: #FAFAFA;
  --text-muted-light: #9AA3B2;
  --text-dark: #111318;
  --text-muted-dark: #545C6B;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, SFMono-Regular, monospace;
  --max-w: 1140px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 18, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
}

.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand-lockup img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand-lockup .dot-ai { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  color: var(--text-muted-light);
}

.nav-links a:hover { color: var(--text-light); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-dark);
  color: var(--text-light);
}
.btn-ghost:hover { border-color: #4A5263; background: var(--surface-dark); }

.btn-light-outline {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-dark);
}
.btn-light-outline:hover { background: #EAEAE3; }

.btn-sm { padding: 8px 14px; font-size: 13.5px; }

/* Hero */
.hero {
  padding: 72px 0 80px;
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 40px 40px;
  border-bottom: 1px solid var(--border-dark);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero-grid > * { min-width: 0; }

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mint);
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.28);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  max-width: 18ch;
}

.hero-lead {
  font-size: 17px;
  color: var(--text-muted-light);
  max-width: 54ch;
  margin-bottom: 30px;
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-stack-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted-light);
}

/* Interactive Architecture Card (Memorable Hero Element) */
.arch-stage {
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  overflow: hidden;
}

.arch-profile-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-dark);
  background: #111419;
}

.arch-avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.arch-profile-meta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-light);
}

.arch-profile-meta span {
  font-size: 13px;
  color: var(--text-muted-light);
}

.arch-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border-dark);
}

.arch-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted-light);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 11px 8px;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.arch-tab:hover { color: var(--text-light); background: rgba(255,255,255,0.02); }
.arch-tab.active {
  color: var(--text-light);
  border-bottom-color: var(--accent);
  background: rgba(255, 90, 31, 0.06);
}

.arch-body { padding: 20px 18px; }

.arch-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.arch-desc {
  font-size: 13.5px;
  color: var(--text-muted-light);
  margin-bottom: 16px;
}

.flow-nodes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.flow-node {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-left: 3px solid var(--mint);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
}

.flow-node.node-accent { border-left-color: var(--accent); }
.flow-node code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--mint);
}
.flow-node.node-accent code { color: var(--accent); }

.arch-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted-light);
}

.arch-metric strong { color: var(--mint); }

/* Metrics Strip */
.metrics-strip {
  background: var(--surface-dark);
  border-bottom: 1px solid var(--border-dark);
  padding: 36px 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.metric-item {
  border-left: 2px solid var(--border-dark);
  padding-left: 18px;
}

.metric-item:first-child { border-left-color: var(--accent); }

.metric-num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-light);
  line-height: 1.1;
}

.metric-label {
  font-size: 13.5px;
  color: var(--text-muted-light);
  margin-top: 4px;
}

/* Light Editorial Sections */
.section-light {
  background: var(--bg-light);
  color: var(--text-dark);
  padding: 84px 0;
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 84px 0;
  border-top: 1px solid var(--border-dark);
}

.section-head {
  max-width: 660px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.section-head p {
  font-size: 16px;
  color: var(--text-muted-dark);
}
.section-dark .section-head p { color: var(--text-muted-light); }

/* Processes Editorial List */
.process-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-light);
}

.process-row {
  display: grid;
  grid-template-columns: 260px 1fr 220px;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
  align-items: start;
}

.process-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.process-desc {
  font-size: 15px;
  color: var(--text-muted-dark);
  max-width: 58ch;
}

.process-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #E8E8E1;
  color: var(--text-dark);
}

/* Cases Grid (Asymmetric 2-col on Dark) */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.case-panel {
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.case-sector {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.case-panel h3 {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
}

.case-diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-dark);
}

.diff-col span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  margin-bottom: 4px;
}

.diff-before span { color: var(--alert); }
.diff-after span { color: var(--mint); }
.diff-col p { font-size: 13.5px; color: var(--text-muted-light); line-height: 1.5; }

/* Advisory / Asesorías Section */
.advisory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.advisory-card {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.advisory-card.highlight {
  background: var(--bg-dark);
  color: var(--text-light);
  border-color: var(--accent);
}

.advisory-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
}

.advisory-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--mint-dark);
}
.advisory-card.highlight .advisory-meta { color: var(--mint); }

.advisory-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14.5px;
  color: var(--text-muted-dark);
  margin-bottom: 8px;
}
.advisory-card.highlight .advisory-list { color: var(--text-muted-light); }

.advisory-list li::before {
  content: "› ";
  color: var(--accent);
  font-weight: 700;
}

/* Contact Band */
.contact-box {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-box h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 6px;
}

.contact-box p { font-size: 15px; color: var(--text-muted-dark); max-width: 52ch; }

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

/* Footer */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dark);
  padding: 36px 0;
  color: var(--text-muted-light);
  font-size: 13.5px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--text-light); }

/* ================= LINK-IN-BIO PAGE (/links) ================= */
.links-page {
  min-height: 100vh;
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 18px 48px;
}

.links-shell {
  width: 100%;
  max-width: 460px;
}

.links-header {
  text-align: center;
  margin-bottom: 26px;
}

.links-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 3px solid var(--accent);
}

.links-handle {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.links-handle span { color: var(--accent); }

.links-bio {
  font-size: 14.5px;
  color: var(--text-muted-light);
  margin-top: 6px;
  max-width: 36ch;
  margin-inline: auto;
}

.links-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--mint);
}

.links-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.link-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-radius: 13px;
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-light);
  transition: border-color 150ms ease, background 150ms ease;
}

.link-tile:hover {
  border-color: #464F61;
  background: var(--surface-elevated);
}

.link-tile.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}
.link-tile.primary:hover { background: var(--accent-hover); }

.link-left { display: flex; align-items: center; gap: 13px; }
.link-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.link-tile.primary .link-icon { background: rgba(0, 0, 0, 0.18); }

.link-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  display: block;
}

.link-sub {
  font-size: 12.5px;
  color: var(--text-muted-light);
  display: block;
}
.link-tile.primary .link-sub { color: rgba(255, 255, 255, 0.88); }

.links-divider {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted-light);
  margin: 12px 0 4px 4px;
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-dark);
  color: var(--mint);
  border: 1px solid var(--border-dark);
  border-radius: 7px;
  padding: 5px 9px;
}

.links-footer {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted-light);
}
.links-footer img { width: 22px; height: 22px; border-radius: 5px; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .process-row { grid-template-columns: 1fr; gap: 12px; }
  .process-tags { justify-content: flex-start; }
  .cases-grid, .advisory-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .container { padding: 0 18px; }
  .nav-links { display: none; }
  .nav-inner { gap: 10px; }
  .nav-actions .btn-sm { padding: 7px 11px; font-size: 12.5px; }
  .hero { padding: 44px 0 52px; }
  .hero h1 { font-size: 34px; }
  .section-light, .section-dark { padding: 56px 0; }
  .case-diff { grid-template-columns: 1fr; }
  .contact-box { padding: 22px; }
  .flow-node { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
