/* ============================================================
   D4T — Diseño para el Territorio
   main.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Reset & Variables ─────────────────────────────────────── */

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

:root {
  --black:     #1a1a1a;
  --white:     #ffffff;
  --off-white: #f7f6f3;
  --mid:       #e8e6e0;
  --accent:    #2b2b2b;
  --muted:     #6b6b6b;
  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--black);
  font-weight: 300;
  line-height: 1.7;
  font-size: 16px;
}

/* ── Navigation ────────────────────────────────────────────── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--mid);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--black);
}

.nav-logo-mark {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-mark svg { width: 38px; height: 38px; }

.nav-wordmark {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.hero-left {
  padding: 5rem 4rem 5rem 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--mid);
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--muted);
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 0.25em;
}

.hero-title em {
  font-style: italic;
  color: var(--muted);
}

.hero-subtitle {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 2rem;
}

.hero-desc {
  font-size: 15px;
  color: var(--accent);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.hero-desc a {
  color: var(--black);
  text-underline-offset: 3px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--mid);
  border-radius: 100px;
  color: var(--muted);
}

.hero-right {
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  position: relative;
  overflow: hidden;
}

.hero-graphic { text-align: center; }

.hero-badge {
  width: 160px;
  height: 160px;
  background: var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.hero-badge svg { width: 90px; height: 90px; }

/* ── Four Stages Widget ────────────────────────────────────── */

.four-stages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--mid);
  border: 1px solid var(--mid);
  border-radius: 12px;
  overflow: hidden;
  width: 260px;
  margin: 0 auto;
}

.stage {
  background: var(--white);
  padding: 1.25rem;
  text-align: left;
}

.stage-num {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.stage-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
}

/* ── Shared Section Styles ─────────────────────────────────── */

section { padding: 6rem 0; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--mid);
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--mid);
  margin: 0;
}

/* ── Fenómenos Section ─────────────────────────────────────── */

.fenomenos {
  background: var(--off-white);
  border-top: 1px solid var(--mid);
  border-bottom: 1px solid var(--mid);
}

.fenomenos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  margin-top: 3rem;
}

.fenomenos-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.fenomenos-list {
  list-style: none;
  border: 1px solid var(--mid);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.fenomenos-list li {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--mid);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}

.fenomenos-list li:last-child { border-bottom: none; }

.fen-dot {
  width: 6px;
  height: 6px;
  background: var(--black);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Secciones ─────────────────────────────────────────────── */

.secciones-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.seccion-card {
  border: 1px solid var(--mid);
  border-radius: 12px;
  overflow: hidden;
}

.seccion-header {
  background: var(--black);
  color: var(--white);
  padding: 1.75rem 2rem;
}

.seccion-header--active { background: #2b2b2b; }

.seccion-period {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
}

.seccion-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.seccion-lugar {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.seccion-body {
  padding: 1.75rem 2rem;
  background: var(--white);
}

.seccion-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.seccion-profesores { margin-bottom: 1.5rem; }

.seccion-profesores-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.prof-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prof-item {
  font-size: 13.5px;
  color: var(--accent);
}

.prof-dept {
  font-size: 11px;
  color: var(--muted);
}

.alumnos-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  margin-top: 1.25rem;
}

.alumnos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alumno-tag {
  font-size: 12px;
  background: var(--off-white);
  border: 1px solid var(--mid);
  border-radius: 100px;
  padding: 4px 10px;
  color: var(--accent);
  white-space: nowrap;
}

.seccion-nota {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}

/* ── Mapa ──────────────────────────────────────────────────── */

.mapa-section {
  padding: 6rem 0 0;
  border-top: 1px solid var(--mid);
}

.mapa-embed-wrapper {
  margin-top: 3rem;
  border-top: 1px solid var(--mid);
  width: 100%;
  overflow: hidden;
}

arcgis-embedded-map {
  display: block;
  width: 100% !important;
  height: 560px;
}

/* ── Académicos ────────────────────────────────────────────── */

.academicos {
  background: var(--off-white);
  border-top: 1px solid var(--mid);
}

.acad-group {
  margin-top: 3rem;
}

.acad-group--colab {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--mid);
}

.acad-group-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--mid);
}

.acad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.profesor-card {
  background: var(--white);
  border: 1px solid var(--mid);
  border-radius: 12px;
  padding: 1.75rem;
}

.prof-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
  margin-bottom: 1rem;
}

.prof-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 2px;
}

.prof-role-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--mid);
  border-radius: 100px;
  padding: 3px 10px;
  margin-bottom: 1rem;
}

.prof-bio {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--accent);
}

/* ── Footer ────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--mid);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-sep {
  color: var(--mid);
  font-size: 18px;
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 768px) {
  nav { padding: 0 1.5rem; }
  .nav-links { display: none; }

  .hero { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .hero-left { padding: 3rem 1.5rem; }

  .container { padding: 0 1.5rem; }

  .fenomenos-grid { grid-template-columns: 1fr; gap: 2rem; }
  .secciones-grid { grid-template-columns: 1fr; }
  .acad-grid      { grid-template-columns: 1fr; }
}
