/* === Design tokens === */
:root {
  --c-primary: #170037;
  --c-secondary: #3B007A;
  --c-tertiary: #7F00D9;
  --c-accent: #6A00FF;
  --c-success: #8B00FF;
  --c-neutral-light: #FFFFFF;
  --c-neutral-dark: #060014;
  --container-max: 1120px;
  --radius: 8px;
}

@font-face {
  font-family: 'NHG Bold';
  src: url('/assets/fonts/NeueHaasDisplayBold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NHG Medium';
  src: url('/assets/fonts/NeueHaasDisplayMedium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NHG Roman';
  src: url('/assets/fonts/NeueHaasDisplayRoman.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'NHG Medium', 'Helvetica Neue', Arial, sans-serif;
  background: var(--c-neutral-light);
  color: var(--c-neutral-dark);
  line-height: 1.5;
}
h1, h2, h3, h4 {
  font-family: 'NHG Bold', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

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

.eyebrow {
  font-family: 'NHG Roman', 'Helvetica Neue', Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  color: var(--c-tertiary);
}

.rule {
  border: none;
  border-top: 2px solid var(--c-accent);
  width: 64px;
  margin: 16px 0 32px;
}

.measure { max-width: 68ch; }
.text-lg { font-size: 19px; }

.measure,
.service p,
.post p,
.card p,
.pillar p,
.notas-card p {
  text-align: justify;
  hyphens: auto;
}

/* === Sections === */
.section { padding: 88px 0; }
.section--dark {
  background: var(--c-primary);
  color: var(--c-neutral-light);
}
.section--dark .eyebrow { color: var(--c-tertiary); }
.section--light {
  background: var(--c-neutral-light);
  color: var(--c-neutral-dark);
}

/* === Nav === */
.nav {
  background: var(--c-primary);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}
.nav__brand {
  font-family: 'NHG Bold', sans-serif;
  font-size: 17px;
  color: var(--c-neutral-light);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__links a {
  color: var(--c-neutral-light);
  font-family: 'NHG Roman', sans-serif;
  font-size: 15px;
  opacity: 0.85;
}
.nav__links a.is-active,
.nav__links a:hover { opacity: 1; color: var(--c-tertiary); }
.nav__external { color: var(--c-tertiary) !important; opacity: 1 !important; }
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--c-neutral-light);
}

@media (max-width: 760px) {
  .nav__brand { font-size: 14px; }
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-primary);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }
  .nav__links.is-open { max-height: 400px; }
  .nav__links a {
    padding: 14px 24px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* === Hero === */
.hero {
  background: radial-gradient(circle at 75% 20%, var(--c-secondary), var(--c-primary) 60%);
  color: var(--c-neutral-light);
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { font-size: 44px; max-width: 14ch; }
.hero p.lede { font-size: 19px; max-width: 46ch; opacity: 0.9; }
.hero__actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero__visual { width: 100%; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; max-width: none; }
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-family: 'NHG Bold', sans-serif;
  font-size: 15px;
}
.btn--primary { background: var(--c-accent); color: var(--c-neutral-light); }
.btn--primary:hover { background: var(--c-success); }
.btn--ghost { border: 2px solid var(--c-neutral-light); color: var(--c-neutral-light); }
.section--light .btn--ghost { border-color: var(--c-neutral-dark); color: var(--c-neutral-dark); }

/* === Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 28px;
}
.section--light .card {
  background: var(--c-neutral-light);
  border: 1px solid rgba(6, 0, 20, 0.1);
}
.card h3 { font-size: 18px; margin-bottom: 12px; }
.card p { font-size: 15px; opacity: 0.85; margin-bottom: 16px; }
.card a { color: var(--c-tertiary); font-family: 'NHG Roman', sans-serif; font-size: 14px; }

@media (max-width: 960px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* === Pillars (3-col) === */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillar { border-top: 2px solid var(--c-accent); padding-top: 16px; }
.pillar span {
  font-family: 'NHG Roman', sans-serif;
  font-size: 13px;
  color: var(--c-tertiary);
}
.pillar h3 { font-size: 20px; margin: 8px 0 12px; }

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

/* === Services === */
.service {
  padding: 48px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 32px;
  scroll-margin-top: 88px;
}
.section--light .service { border-bottom-color: rgba(6, 0, 20, 0.1); }
.service:last-child { border-bottom: none; }
.service__index {
  font-family: 'NHG Bold', sans-serif;
  font-size: 56px;
  line-height: 1;
  color: var(--c-tertiary);
}
.service h2 { font-size: 30px; }
.service p { font-size: 18px; line-height: 1.7; }

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

/* === Notas === */
.notas-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.notas-card {
  display: block;
  border: 1px solid rgba(6, 0, 20, 0.1);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s ease;
}
.notas-card:hover,
.notas-card:focus-visible {
  border-color: var(--c-accent);
}
.notas-card--single { max-width: 520px; }
.notas-card time {
  font-family: 'NHG Roman', sans-serif;
  font-size: 13px;
  color: var(--c-tertiary);
}
.notas-card h3 { font-size: 20px; margin: 8px 0 12px; }
.notas-card__link {
  display: inline-block;
  margin-top: 4px;
  color: var(--c-tertiary);
  font-family: 'NHG Roman', sans-serif;
  font-size: 14px;
}

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

.notas-back {
  position: sticky;
  top: 66px;
  z-index: 5;
  background: var(--c-neutral-light);
  padding: 14px 0;
}

.tablero-intro { padding-bottom: 32px; }
.tablero-embed {
  width: 100%;
  height: 100vh;
  border: 0;
  display: block;
}

.post { max-width: 720px; margin: 0 auto; }
.post h1 { font-size: 34px; }
.post time {
  font-family: 'NHG Roman', sans-serif;
  font-size: 13px;
  color: var(--c-tertiary);
}
.post p { font-size: 17px; line-height: 1.7; }
.post h2 { font-size: 20px; margin-top: 32px; }

/* === Footer === */
.footer {
  background: var(--c-neutral-dark);
  color: var(--c-neutral-light);
  padding: 56px 0 32px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.footer__wordmark { font-family: 'NHG Bold', sans-serif; font-size: 22px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__links a,
.footer__contact a {
  font-family: 'NHG Roman', sans-serif;
  font-size: 14px;
  opacity: 0.85;
}
.footer__contact p { font-size: 13px; opacity: 0.6; margin-top: 12px; }

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