/* ===== Tokens (de la guía de marca) ===== */
:root {
  --bone-black: #1A1614;
  --lead: #4A4A4A;
  --blood: #7A1F1F;
  --bruise: #B07A6E;
  --bone: #EDE6D6;
  --mustard: #C99A2C;
  --acid: #9BC53D;
  --teal: #3A6B6B;

  --bg: var(--bone-black);
  --bg-soft: #221C19;
  --fg: var(--bone);
  --fg-muted: #A6A096;
  --accent: var(--blood);

  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;

  --max: 1280px;
  --gap: 24px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blood); color: var(--bone); }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(26, 22, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(237, 230, 214, 0.08);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.01em;
}
.brand-mark {
  color: var(--blood);
  font-style: normal;
  font-size: 26px;
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.nav-links a {
  position: relative;
  color: var(--fg-muted);
  transition: color .25s ease;
}
.nav-links a:hover { color: var(--bone); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--blood);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 80px clamp(20px, 6vw, 80px);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(122, 31, 31, 0.18), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(58, 107, 107, 0.10), transparent 50%),
    var(--bg);
}
.hero-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.hero-inner {
  max-width: 880px;
  position: relative;
  z-index: 2;
}
.hero-emblem {
  margin: 0;
  justify-self: end;
}
.hero-emblem img {
  display: block;
  width: clamp(240px, 30vw, 420px);
  height: auto;
}
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: clamp(18px, 6vw, 36px);
  }
  .hero-emblem {
    order: -1;
    justify-self: start;
  }
  .hero-emblem img {
    width: clamp(180px, 56vw, 300px);
  }
}
.kicker {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 28px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.96;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  color: var(--bone);
}
.hero-title em {
  font-style: italic;
  color: var(--blood);
  font-weight: 400;
}
.hero-sub {
  max-width: 540px;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--fg-muted);
  margin: 0 0 40px;
}
.cta {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid var(--bone);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.cta:hover {
  background: var(--bone);
  color: var(--bone-black);
}
/* ===== Section head ===== */
.section-head {
  padding: 80px clamp(20px, 4vw, 56px) 28px;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 24px;
}
.section-head h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  margin: 0;
  flex: 0 0 auto;
}
.count {
  margin: 0;
  margin-left: auto;
  color: var(--fg-muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* ===== Filters ===== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 7px 16px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(237, 230, 214, 0.18);
  color: var(--fg-muted);
  border-radius: 999px;
  transition: all .2s ease;
}
.chip:hover { color: var(--bone); border-color: rgba(237, 230, 214, 0.45); }
.chip.active {
  background: var(--bone);
  color: var(--bone-black);
  border-color: var(--bone);
}

/* ===== Gallery (CSS columns masonry) ===== */
.works { padding-bottom: 120px; }
.grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px clamp(20px, 4vw, 56px) 0;
  column-count: 3;
  column-gap: var(--gap);
}
.loading {
  color: var(--fg-muted);
  text-align: center;
  padding: 80px 0;
}
.tile {
  position: relative;
  margin: 0 0 var(--gap);
  break-inside: avoid;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-soft);
  border: 1px solid rgba(237, 230, 214, 0.05);
  transition: transform .35s ease, border-color .35s ease;
}
.tile img {
  width: 100%;
  display: block;
  transition: transform .55s ease, filter .35s ease;
  filter: saturate(.95) contrast(1.02);
}
.tile:hover { border-color: rgba(122, 31, 31, 0.5); }
.tile:hover img { transform: scale(1.04); filter: saturate(1.05) contrast(1.05); }

.tile-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 18px;
  background: linear-gradient(to top, rgba(26, 22, 20, 0.92), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.tile:hover .tile-meta {
  opacity: 1;
  transform: translateY(0);
}
.tile-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  margin: 0 0 4px;
  color: var(--bone);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-date {
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}
.tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.tile-ig {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border: 1px solid rgba(237, 230, 214, 0.22);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.tile-ig svg { width: 13px; height: 13px; }
.tile-ig:hover {
  color: var(--bone);
  border-color: var(--bruise);
  background: rgba(122, 31, 31, 0.28);
}

@media (max-width: 900px) {
  .grid { column-count: 2; }
}
@media (max-width: 560px) {
  .grid { column-count: 1; }
  .tile-meta { opacity: 1; transform: none; } /* siempre visible en móvil */
}

/* ===== About ===== */
.about {
  padding: 120px clamp(20px, 4vw, 56px);
  background: linear-gradient(180deg, var(--bg) 0%, #0F0C0B 100%);
  border-top: 1px solid rgba(237, 230, 214, 0.06);
}
.about-inner {
  max-width: 720px;
  margin: 0 auto;
}
.about h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  margin: 0 0 32px;
}
.about p {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--fg);
  margin: 0 0 22px;
}
.about p em {
  color: var(--mustard);
  font-style: italic;
}
.meta {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  border-top: 1px solid rgba(237, 230, 214, 0.1);
  padding-top: 32px;
}
.meta li {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
}
.meta strong {
  display: block;
  color: var(--bone);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ===== Contact ===== */
.contact {
  padding: 100px clamp(20px, 4vw, 56px);
  text-align: center;
  background: var(--bone-black);
}
.contact-inner { max-width: 600px; margin: 0 auto; }
.contact h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  margin: 0 0 12px;
}
.contact p {
  color: var(--fg-muted);
  margin: 0 0 36px;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 32px;
}
.contact-links a {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--bone);
  border-bottom: 1px solid var(--blood);
  padding-bottom: 4px;
  transition: color .25s ease, border-color .25s ease;
}
.contact-links a:hover {
  color: var(--blood);
  border-color: var(--bone);
}

/* ===== Footer ===== */
.footer {
  padding: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  border-top: 1px solid rgba(237, 230, 214, 0.06);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 11, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 60px 20px;
}
.lightbox.open { display: flex; }
.lb-figure {
  margin: 0;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lb-figure img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid rgba(237, 230, 214, 0.1);
  background: var(--bg-soft);
}
.lb-caption {
  max-width: 700px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.4;
}
.lb-caption .lb-date {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blood);
  margin-top: 8px;
}
.lb-insta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone);
  border: 1px solid rgba(237, 230, 214, 0.3);
  border-radius: 999px;
  padding: 10px 20px;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.lb-insta[hidden] { display: none; }
.lb-insta svg { width: 16px; height: 16px; }
.lb-insta:hover {
  background: var(--bone);
  color: var(--bone-black);
  border-color: var(--bone);
}
.lb-close, .lb-nav {
  position: absolute;
  color: var(--bone);
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .2s ease;
}
.lb-close:hover, .lb-nav:hover { background: rgba(237, 230, 214, 0.08); }
.lb-close { top: 16px; right: 16px; font-size: 38px; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: 48px; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

@media (max-width: 600px) {
  .lb-nav { width: 44px; height: 44px; font-size: 36px; }
  .lb-caption { font-size: 14px; }
}
