/* ===== RESET BÁSICO ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
  scroll-behavior: smooth;
  background: url(https://diegobarrioh.dev/img/dbh_bg7.png) center / cover fixed no-repeat;
}
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  color: #e5e7eb;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}

/* ===== DESIGN TOKENS ===== */
:root {
  --bg-main: rgba(2, 6, 23, 0.94);
  --bg-elevated: rgba(15, 23, 42, 0.88);
  --bg-card: rgba(15, 23, 42, 0.8);
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.2);
  --border-subtle: rgba(148, 163, 184, 0.2);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #f97373;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 45px rgba(2, 6, 23, 0.95);
  --blur-glass: 18px;
  --transition-fast: 180ms ease-out;
  --transition-med: 260ms cubic-bezier(0.22, 1, 0.36, 1);
  --shell-width: min(1120px, 100% - 3rem);
}

/* ===== LAYOUT GLOBAL + FONDO ===== */
.page {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: url(https://diegobarrioh.dev/img/dbh_bg7.png) center / cover fixed no-repeat;
  color: var(--text-main);
}

.shell {
  width: var(--shell-width);
  margin-inline: auto;
}
.main {
  padding-top: 5rem;
  padding-bottom: 4rem;
}
.section {
  padding-block: 4rem;
  position: relative;
}
.section__header {
  max-width: 640px;
  margin-bottom: 2.5rem;
}
.section__header h2 {
  font-size: clamp(1.6rem, 2vw, 1.9rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.section__header p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* ===== HEADER / NAV ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.86), transparent);
  border-bottom: 1px solid rgba(15, 23, 42, 0.95);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.85rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8);
}
.logo img {
  width: 20px;
  height: 20px;
  display: block;
}
.logo span {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.nav__link {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}
.nav__link:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
}
.nav__link--primary {
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.32), rgba(15, 23, 42, 0.96));
  color: #f9fafb;
}

/* ===== HERO ===== */
.hero {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}
/* Nombre grande encima del subtítulo */
.hero__name {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Space Grotesk", sans-serif;
  font-size: clamp(2.1rem, 3.2vw, 2.6rem);
  letter-spacing: -0.04em;
  margin-bottom: 0.35rem;
}
.eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.hero__title {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Space Grotesk", sans-serif;
  font-size: clamp(2.1rem, 3.4vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}
.hero__subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 34rem;
  margin-bottom: 1.6rem;
}
.hero__actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1.6rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition-med), color var(--transition-fast), transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-fast);
  white-space: nowrap;
}
.btn--primary {
  background: radial-gradient(circle at top left, #22d3ee, #0ea5e9);
  color: #0b1220;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(8, 47, 73, 0.8);
  border-color: rgba(34, 211, 238, 0.8);
}
.btn--primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 18px 45px rgba(8, 47, 73, 0.95);
}
.btn--ghost {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--text-main);
}
.btn--ghost:hover {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(148, 163, 184, 0.8);
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.hero__meta span {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
}

/* HERO VISUAL: PANEL + DIAGRAMA (igual que antes) */
.hero__visual {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.panel {
  background: rgba(15, 23, 42, 0.85); /* Fondo sólido sutil */
  border-radius: 18px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.6);
  backdrop-filter: blur(var(--blur-glass));
  position: relative;
  overflow: hidden;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4b5563;
}
.dot--red {
  background: #f97373;
}
.dot--amber {
  background: #fbbf24;
}
.dot--green {
  background: #4ade80;
}
.panel__body {
  margin-top: 2em;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1.2rem;
  font-size: 0.78rem;
  z-index: 1;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
.metric__label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
}
.metric__value {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
}
.metric__value--good {
  color: #4ade80;
}
.metric__value--warn {
  color: #f97373;
}
.diagram {
  position: relative;
  padding: 1.1rem;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.3);
  overflow: hidden;
}
.diagram::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.18), transparent 55%), radial-gradient(circle at 100% 100%, rgba(94, 234, 212, 0.16), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}
.diagram__node {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.9);
  z-index: 1;
}
.diagram__node--core {
  margin-inline: auto;
  margin-bottom: 1.4rem;
  font-weight: 600;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.3), rgba(15, 23, 42, 0.98));
}
.diagram__node:nth-of-type(2),
.diagram__node:nth-of-type(3),
.diagram__node:nth-of-type(4) {
  margin-inline: 0.2rem;
  margin-top: 0.6rem;
}
.diagram__connection {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.7;
}
.diagram__connection::before {
  content: "";
  position: absolute;
  width: 60%;
  left: 20%;
  height: 2px;
  top: 45%;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0), rgba(34, 211, 238, 0.9), rgba(34, 211, 238, 0));
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.7));
  animation: flow 3.8s infinite linear;
}
.diagram__connection--2::before {
  top: 65%;
  width: 30%;
  left: 10%;
  animation-duration: 4.4s;
}
.diagram__connection--3::before {
  top: 65%;
  width: 30%;
  left: 60%;
  animation-duration: 4.1s;
}
@keyframes flow {
  0% {
    transform: translateX(-20%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateX(40%);
    opacity: 0;
  }
}

/* ===== GRID & UTILIDADES ===== */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
}
.split__col p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.pill {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.9);
}

.cards {
  display: grid;
  gap: 1.5rem;
}
.cards--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card {
  padding: 1.4rem 1.3rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-soft);
}
.card--outline {
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.45);
}
.card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.7rem;
  letter-spacing: -0.02em;
}
.card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== TIMELINE ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  border-left: 1px dashed rgba(148, 163, 184, 0.5);
  padding-left: 1.3rem;
  margin-left: 0.3rem;
}
.timeline__item {
  position: relative;
  padding-left: 0.4rem;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.55rem;
  top: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle, #22d3ee, #0ea5e9);
  box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.18);
}
.timeline__meta h3 {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}
.timeline__meta p {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.timeline__tag {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.timeline__item > p {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== CHIPS ===== */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.96);
}

/* ===== CONTACTO ===== */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 2.4rem;
  align-items: flex-start;
}
.contact__info ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.contact__info strong {
  color: var(--text-main);
  font-weight: 500;
}
.contact__info a {
  color: var(--accent);
}
.contact__form {
  padding: 1.4rem 1.3rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 0.9rem;
}
.contact__form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.contact__form input,
.contact__form textarea {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.55rem 0.75rem;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.contact__form input:focus,
.contact__form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.5);
  background: rgba(15, 23, 42, 0.98);
}

/* ===== FOOTER ===== */
.footer {
  padding-block: 1.8rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  backdrop-filter: blur(14px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.8rem;
  }
  .hero__visual {
    order: -1;
  }
  .cards--three {
    grid-template-columns: minmax(0, 1fr);
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }
  .header__inner {
    gap: 1rem;
  }
  .nav {
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 2rem, 100%);
  }
  .hero {
    padding-top: 3rem;
  }
  .section {
    padding-block: 3rem;
  }
  .header {
    backdrop-filter: blur(18px);
  }
  .nav {
    display: none; /* para mobile puedes luego añadir un menú hamburguesa */
  }
}

.btn--outline {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text-main);
}
.btn--outline:hover {
  background: rgba(15, 23, 42, 0.96);
  border-color: var(--accent);
}
