/* ============================================================
   Mercedes Ponte — Portfolio
   Estética heredada de la landing original (Carrd):
   blanco, Raleway (títulos) + Open Sans (texto), gris #5E5E5E.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #fafaf8;
  --ink: #1a1a1a;       /* títulos */
  --text: #5e5e5e;      /* cuerpo (igual que el original) */
  --muted: #9a9a9a;
  --line: #e4e2dd;      /* divisores suaves */
  --accent: #117c3f;    /* verde social del original (uso mínimo) */
  --max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 8px;        /* esquinas suaves en imágenes/tarjetas */
  --radius-btn: 12px;   /* botón un poco más redondeado */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ---------- NAV GLOBAL (compartido por todas las páginas) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(43, 41, 38, 0.85);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav__brand {
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: 1.02rem;
  letter-spacing: 0.05em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 3vw, 2.1rem);
}
.nav__links a {
  font-family: "Montserrat", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: #fff;
  border-color: #a75239;
}
@media (max-width: 560px) {
  .nav {
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.7rem 1.1rem;
  }
  .nav__brand { font-size: 0.98rem; }
  .nav__links { gap: clamp(0.8rem, 3.5vw, 1.3rem); flex-wrap: wrap; justify-content: center; }
  .nav__links a { letter-spacing: 0.12em; font-size: 0.64rem; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

h1, h2 { font-family: "Raleway", sans-serif; color: var(--ink); margin: 0; }

/* ---------- HERO ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(6rem, 16vh, 10rem) var(--gutter) clamp(2rem, 5vh, 3rem);
}
.hero__inner { animation: fadeUp 1.1s ease both; }
.hero__name {
  font-weight: 200;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  letter-spacing: 0.14em;
  line-height: 1.05;
  color: var(--ink);
}
.hero__tagline {
  margin: 1.4rem 0 0;
  font-family: "Raleway", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: clamp(0.7rem, 1.6vw, 0.95rem);
  color: var(--text);
  padding-left: 0.42em; /* compensa el tracking */
}
.hero__cue {
  margin-top: clamp(2.25rem, 6vh, 4rem);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.3s ease;
}
.hero__cue:hover { color: var(--ink); }
.hero__cue svg { animation: bob 2.4s ease-in-out infinite; }

/* ---------- SECCIONES ---------- */
.projects {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 3vh, 2.5rem) var(--gutter) clamp(3rem, 8vw, 6rem);
}
.section-head { text-align: center; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.eyebrow {
  display: block;
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 1rem;
  padding-left: 0.34em;
}
.section-title {
  font-weight: 200;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  letter-spacing: 0.06em;
}

/* ---------- GRILLA DE PROYECTOS ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: clamp(1.5rem, 3.5vw, 2.8rem);
}
.card {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-align: center;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--bg-soft);
  border-radius: var(--radius);
}
.card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.card__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0);
  transition: background 0.5s ease;
}
.card__hint {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem;
  color: #fff;
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.66rem;
  padding-left: calc(1.4rem + 0.26em);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  z-index: 1;
}
.card:hover .card__frame img,
.card:focus-visible .card__frame img { transform: scale(1.05); }
.card:hover .card__frame::after,
.card:focus-visible .card__frame::after { background: rgba(20, 20, 20, 0.28); }
.card:hover .card__hint,
.card:focus-visible .card__hint { opacity: 1; transform: translateY(0); }
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.card__title {
  font-family: "Raleway", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.82rem;
  color: var(--ink);
  margin: 1.3rem 0 0.5rem;
  padding-left: 0.2em;
}
.card__caption {
  font-size: 0.86rem;
  font-style: italic;
  color: var(--text);
  max-width: 30ch;
  margin: 0 auto;
  line-height: 1.55;
}

/* ---------- CTA ---------- */
.cta {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  text-align: center;
  border-top: 1px solid var(--line);
}
.cta__title {
  font-weight: 200;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}
.cta__body { font-size: 1.05rem; margin: 0 auto 1rem; }
.cta__note { font-style: italic; color: var(--muted); margin: 0 0 2.2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-family: "Raleway", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  padding: 1rem 2rem;
  padding-left: calc(2rem + 0.18em);
  border-radius: var(--radius-btn);
  transition: background 0.3s ease, transform 0.3s ease;
}
.btn:hover { background: var(--accent); transform: translateY(-2px); }
.btn svg { flex: none; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 3rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--line);
}
.social { display: flex; justify-content: center; gap: 1.6rem; margin-bottom: 1.4rem; }
.social a { color: var(--text); transition: color 0.3s ease, transform 0.3s ease; }
.social a:hover { color: var(--accent); transform: translateY(-2px); }
.footer__copy {
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.66rem;
  color: var(--muted);
  margin: 0;
  padding-left: 0.2em;
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 12, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 100;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb__stage {
  margin: 0;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lb__stage img {
  max-width: 92vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0,0,0,0.5);
  border-radius: var(--radius);
}
.lb__caption {
  margin-top: 1.1rem;
  text-align: center;
  color: rgba(255,255,255,0.92);
  font-family: "Raleway", sans-serif;
}
.lb__title {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.78rem;
  padding-left: 0.24em;
}
.lb__count {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.55);
}
.lb__close {
  position: absolute;
  top: 1.2rem;
  right: 1.6rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.lb__close:hover { opacity: 1; transform: rotate(90deg); }
.lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0.65;
  padding: 1rem;
  transition: opacity 0.3s ease;
}
.lb__nav:hover { opacity: 1; }
.lb__prev { left: clamp(0.5rem, 3vw, 2.5rem); }
.lb__next { right: clamp(0.5rem, 3vw, 2.5rem); }

/* ---------- REVEAL ON SCROLL ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- ANIMACIONES ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

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

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .lb__nav { padding: 0.5rem; }
}
