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

:root {
  --cream: #ffffff;
  --ink: #000000;
  --ink-light: #9a9aaa;
  --border: rgba(28, 28, 40, 0.1);
}

@font-face {
  font-family: "Diatype";
  src: url("./fonts/diatype.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Diatype", sans-serif;
  font-weight: 300;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── NAV ────────────────────────────────────── */
.nav {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 4px;
  background: transparent;
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 6px 8px;
  transition:
    border-color 0.4s ease,
    background 0.4s ease;
}

.nav-pill {
  font-family: "Diatype", sans-serif;
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 6px 18px;
  border-radius: 999px;
  transition:
    background 0.2s,
    color 0.4s ease;
  white-space: nowrap;
}

.nav-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(0, 0, 0, 0.12);
}

.nav.scrolled .nav-pill {
  color: var(--ink);
}

.nav.scrolled .nav-pill:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* ─── HERO ─────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem 3.5rem 10rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 45%, #b0c8e8 0%, transparent 70%),
    radial-gradient(ellipse 60% 70% at 55% 30%, #9fc4b4 0%, transparent 65%),
    radial-gradient(ellipse 80% 50% at 75% 70%, #cec980 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 40% 80%, #c8b87a 0%, transparent 55%),
    #aab8a0;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 280px;
  background: linear-gradient(to bottom, transparent, #ffffff);
  z-index: 1;
  pointer-events: none;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-weight: 300;
  font-size: clamp(4.5rem, 11vw, 10rem);
  line-height: 1;
  color: #f5f2ea;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.hero-meta {
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  font-weight: 600;
  text-transform: uppercase;
  padding-left: 0.15rem;
  letter-spacing: -0.02em;
  color: #f5f2ea;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  right: 3.5rem;
  z-index: 2;
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  text-transform: uppercase;
  color: rgba(245, 242, 234, 0.5);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scroll-hint::before {
  content: "";
  display: block;
  width: 32px;
  height: 0.5px;
  background: rgba(245, 242, 234, 0.4);
}

/* ─── MAIN LAYOUT ───────────────────────────── */
main {
  width: 100%;
}

/* ─── SECTION TITLES ────────────────────────── */
.section-title {
  font-size: clamp(4.5rem, 9vw, 8.5rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--ink);
  padding: 5rem 3.5rem 2.5rem;
  width: 100%;
}

/* ─── ABOUT ─────────────────────────────────── */
.about {
  padding: 0 3.5rem 8rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.about p {
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink);
}

.about a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 0.5px;
  transition: opacity 0.2s;
}

.about a:hover {
  opacity: 0.45;
}

/* ─── BRÚJULA ────────────────────────────────── */
.brujula {
  padding: 0 3.5rem 8rem;
}

.brujula-intro {
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 4rem;
  line-height: 1.65;
}

/* progress */
.progress-track {
  display: flex;
  gap: 6px;
  margin-bottom: 4rem;
  align-items: center;
}

.progress-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0.5px solid var(--ink-light);
  background: transparent;
  transition: all 0.4s ease;
}

.progress-dot.done {
  background: var(--ink);
  border-color: var(--ink);
}

.progress-dot.active {
  background: transparent;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.progress-line {
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

/* questions */
.question-wrap {
  min-height: 260px;
}

.question {
  display: none;
  animation: fadeSlide 0.5s ease forwards;
}

.question.active {
  display: block;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.q-text {
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 3rem;
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.q-btn {
  background: transparent;
  border: none;
  border-top: 0.5px solid var(--border);
  padding: 20px 0;
  font-family: "Diatype", sans-serif;
  font-size: clamp(1.25rem, 1.6vw, 1.55rem);
  font-weight: 300;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.q-btn:last-child {
  border-bottom: 0.5px solid var(--border);
}

.q-btn::before {
  content: "→";
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.2s ease;
  font-size: 0.9em;
  flex-shrink: 0;
}

.q-btn:hover {
  opacity: 0.5;
}

.q-btn:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* ─── RESULTADO ─────────────────────────────── */
.resultado {
  display: none;
  padding: 0 3.5rem 8rem;
  animation: fadeSlide 0.6s ease forwards;
}

.resultado.visible {
  display: block;
}

.resultado-intro {
  font-size: clamp(1.2rem, 1.4vw, 1.4rem);
  font-weight: 300;
  color: var(--ink-light);
  margin-bottom: 4rem;
}

.consejo {
  display: grid;
  grid-template-columns: 3rem 1fr;
  padding: 2.5rem 0;
  border-top: 0.5px solid var(--border);
  animation: fadeSlide 0.5s ease forwards;
}

.consejo:last-of-type {
  border-bottom: 0.5px solid var(--border);
}

.consejo-num {
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  font-weight: 300;
  color: var(--ink-light);
  padding-top: 4px;
}

.consejo-tag {
  font-size: clamp(0.9rem, 1vw, 1rem);
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.75rem;
}

.consejo-text {
  font-size: clamp(1.3rem, 1.8vw, 1.65rem);
  font-weight: 300;
  color: var(--ink);
}

.reset-btn {
  margin-top: 3rem;
  background: transparent;
  border: none;
  padding: 0;
  font-family: "Diatype", sans-serif;
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  font-weight: 300;
  color: var(--ink-light);
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reset-btn:hover {
  color: var(--ink);
}

/* ─── CONSEJOS LISTA ─────────────────────────── */
.consejos-lista {
  padding: 0 3.5rem 8rem;
}

.consejos-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4rem;
}

.filtro-btn {
  background: transparent;
  border: 0.5px solid var(--border);
  border-radius: 999px;
  padding: 7px 18px;
  font-family: "Diatype", sans-serif;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--ink-light);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.filtro-btn:hover {
  border-color: rgba(0, 0, 0, 0.25);
  color: var(--ink);
}

.filtro-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.consejos-grid {
  columns: 2;
  column-gap: 4rem;
}

.consejo-item {
  break-inside: avoid;
  padding: 2.5rem 0;
  border-top: 0.5px solid var(--border);
}

.consejo-item.hidden {
  display: none;
}

.consejo-item:last-child {
  border-bottom: 0.5px solid var(--border);
}

.consejo-item-tag {
  font-size: clamp(0.8rem, 0.9vw, 0.9rem);
  text-transform: uppercase;
  display: none;
  color: var(--ink-light);
  margin-bottom: 0.75rem;
  letter-spacing: 0.06em;
}

.consejo-item-text {
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink);
}

/* ─── PROYECTOS ──────────────────────────────── */
.proyectos {
  padding: 0 3.5rem 8rem;
}

.proyecto {
  padding: 2.5rem 0;
  border-top: 0.5px solid var(--border);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
}

.proyecto:last-child {
  border-bottom: 0.5px solid var(--border);
}

.proyecto-autor {
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  font-weight: 300;
  color: var(--ink-light);
  padding-top: 4px;
}

.proyecto-nombre {
  font-size: clamp(1.3rem, 1.7vw, 1.6rem);
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.proyecto-desc {
  font-size: clamp(1.15rem, 1.4vw, 1.35rem);
  font-weight: 300;
  color: var(--ink-light);
}

.cursor-img {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cursor-img.visible {
  opacity: 1;
}

.cursor-img img {
  width: 220px;
  height: 160px;
  object-fit: contain;
  display: block;
}

/* ─── FOOTER ─────────────────────────────────── */
footer {
  border-top: 0.5px solid var(--border);
  padding: 2rem 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  font-weight: 300;
  color: var(--ink-light);
}

footer a {
  color: var(--ink-light);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--ink);
}

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 640px) {
  .nav {
    top: 1rem;
    gap: 2px;
    padding: 4px 6px;
  }

  .nav-pill {
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  .hero {
    padding: 2rem;
  }

  .hero h1 {
    font-size: clamp(4rem, 18vw, 7rem);
  }

  .section-title {
    padding: 3rem 1.5rem 2rem;
    font-size: clamp(3.5rem, 14vw, 5.5rem);
  }

  .about {
    padding: 0 1.5rem 5rem;
  }

  .brujula {
    padding: 0 1.5rem 5rem;
  }

  .resultado {
    padding: 0 1.5rem 5rem;
  }

  .consejos-lista {
    padding: 0 1.5rem 5rem;
  }

  .consejos-grid {
    columns: 1;
  }

  .proyectos {
    padding: 0 1.5rem 5rem;
  }

  .proyecto {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  footer {
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 1.5rem;
  }
}
