/* ==========================================================================
   Olivo Láser · estilos
   Paleta y tipografía según el "Sistema visual" del diseño.
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-variable.woff2") format("woff2");
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #F5F1E8;
  --linen: #EFE9DC;
  --paper: #FBF8F2;
  --placeholder: #E7E0D1;
  --olive: #5E6738;
  --olive-dark: #4C5430;
  --olive-deep: #3B4024;
  --olive-deep-2: #444A2B;
  --olive-soft: #CBD1A8;
  --ink: #24251F;
  --ink-2: #4A4840;
  --stone: #5F5C52;
  --line: #DED7C7;
  --line-strong: #CFC7B4;
  --on-dark: #F5F1E8;
  --on-dark-muted: #DCD8C8;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --section-y: clamp(64px, 9vw, 120px);
  --radius: 6px;
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--olive); }

:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; border-radius: 2px; }

::selection { background: var(--olive); color: var(--paper); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite { position: absolute; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* ---------- Tipografía ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--olive);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  line-height: 1.4;
}
.eyebrow-light { color: var(--olive-soft); }

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.9rem, 5.4vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display em, .h2 em { color: var(--olive); }

.display-sm {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.4vw, 3.8rem);
  line-height: 1.05;
}

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  line-height: 1.08;
  text-wrap: balance;
}

.lead { max-width: 34rem; font-size: 19px; line-height: 1.65; color: var(--ink-2); }
.body-lg { font-size: 18px; color: var(--ink-2); }
.muted { color: var(--stone); font-size: 16px; }
.muted-light { color: var(--on-dark-muted); font-size: 16px; }
.small { font-size: 14px; }

.num {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  color: var(--olive);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 0 22px; font-size: 15px; }

.btn-primary { background: var(--olive); color: var(--paper); }
.btn-primary:hover { background: var(--olive-dark); color: var(--paper); }

.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.btn-outline-accent { border-color: var(--olive); color: var(--olive); }
.btn-outline-accent:hover { background: var(--olive); color: var(--paper); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row-center { justify-content: center; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 232, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); }
.wordmark-name { font-weight: 300; font-size: 26px; line-height: 1; letter-spacing: 0.38em; }
.wordmark-tag { font-size: 10px; line-height: 1; letter-spacing: 0.3em; color: var(--stone); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  font-size: 15px;
  text-decoration: none;
  padding: 10px 0;
  background: linear-gradient(var(--olive), var(--olive)) no-repeat left calc(100% - 6px) / 0 1px;
  transition: background-size .25s ease, color .2s ease;
}
.site-nav a:not(.btn):hover { background-size: 100% 1px; }

.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  margin-right: -12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 24px; height: 1.5px;
  margin-inline: auto;
  background: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 879px) {
  .js .nav-toggle { display: block; }
  .js .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -24px rgba(36, 37, 31, .35);
  }
  .js .site-nav:not(.is-open) { display: none; }
  .js .site-nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
    background: none;
  }
  .js .site-nav .btn { margin-top: 18px; }
  /* Sin JS: el menú simplemente se reparte en varias líneas */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: 14px; }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: 4px 20px; }
}

/* ---------- Portada ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-block: clamp(48px, 7vw, 96px);
}

.hero-text { display: flex; flex-direction: column; gap: 28px; }
.eyebrow-spark svg { flex: none; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--stone);
}
.hero-facts li + li::before {
  content: "/";
  margin-inline: 16px;
  color: var(--line-strong);
}

.hero-collage {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 14px;
  height: clamp(420px, 44vw, 38rem);
}
.hero-collage figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--placeholder);
}
.hero-collage img { width: 100%; height: 100%; object-fit: cover; }
.collage-main { grid-column: 1 / 4; grid-row: 1 / 7; }
.collage-top { grid-column: 4 / 6; grid-row: 1 / 4; }
.collage-bottom { grid-column: 4 / 6; grid-row: 4 / 7; }

.pill {
  position: absolute;
  left: 16px; bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--cream);
  font-size: 13px;
  letter-spacing: 0.04em;
}

@media (max-width: 599px) {
  /* En móvil los separadores quedarían colgando al saltar de línea */
  .hero-facts { gap: 6px 22px; }
  .hero-facts li + li::before { display: none; }
}

@media (max-width: 959px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-collage { height: clamp(360px, 95vw, 560px); }
}

/* ---------- Franja ---------- */
.strip {
  background: var(--linen);
  border-block: 1px solid var(--line);
}
.strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 0;
  padding-block: 26px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.2;
  color: #3E3D36;
}
.strip-inner li { display: flex; align-items: center; }
.strip-inner li + li::before {
  content: "";
  width: 14px; height: 14px;
  margin-inline: 22px;
  background: var(--olive);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='M14 1v26M1 14h26M5 5l18 18M23 5 5 23'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='M14 1v26M1 14h26M5 5l18 18M23 5 5 23'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 599px) {
  .strip-inner { gap: 4px 20px; font-size: 22px; }
  .strip-inner li + li::before { display: none; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-y); }
.stack { display: flex; flex-direction: column; gap: 18px; }

.section-band {
  background: var(--paper);
  border-block: 1px solid var(--line);
}
.section-dark { background: var(--olive-deep); color: var(--on-dark); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  margin-bottom: 40px;
}
.section-head > .stack { max-width: 40rem; }
.section-head > p { max-width: 26rem; }

.section-intro { max-width: 44rem; margin-bottom: 56px; }

/* El taller */
#taller { display: flex; flex-direction: column; gap: 72px; }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 56px;
  align-items: center;
}
.split .stack { gap: 22px; }
.split-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--placeholder);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 65%; }

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 40px;
}
.pillar, .step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}
.pillar h3 { font-size: 19px; font-weight: 500; line-height: 1.35; }
.pillar p { font-size: 16px; color: var(--stone); }

/* ---------- Trabajos ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filters[hidden] { display: none; }

.chip {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { border-color: var(--olive); color: var(--olive); }
.chip[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: var(--paper); }
.chip-count { font-weight: 400; opacity: .75; }
.chip-count:not(:empty)::before { content: "· "; }

.filter-desc { max-width: 46rem; margin-bottom: 40px; font-size: 17px; color: var(--ink-2); min-height: 3.2em; }
html:not(.js) .filter-desc { display: none; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 44px 28px;
}
.work { display: flex; flex-direction: column; gap: 6px; }
.work[hidden] { display: none; }
.work.is-entering { animation: work-in .45s ease both; }

.work-link {
  display: block;
  aspect-ratio: 3 / 4;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--placeholder);
  cursor: zoom-in;
}
.work-link img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.work-link:hover img { transform: scale(1.04); }

.work-cat {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
}
.work-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

@media (max-width: 599px) {
  /* Dos columnas en móvil: se ven más piezas sin un scroll eterno */
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .work-link { margin-bottom: 6px; }
  .work-cat { font-size: 10px; letter-spacing: 0.16em; }
  .work-title { font-size: 18px; }
}

@keyframes work-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Vídeos ---------- */
.section-dark .h2 { color: var(--on-dark); }

.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 24px;
}
.video-slot, .video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
}
.video-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  border: 1px dashed #8C916C;
  background: var(--olive-deep-2);
  color: var(--on-dark-muted);
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.video-slot svg { color: var(--on-dark); }
.video { display: block; object-fit: cover; background: #000; }

@media (max-width: 599px) {
  /* En móvil, los vídeos en carrusel horizontal para no hacer un scroll eterno */
  .videos {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: 8px;
  }
  .video-slot, .video { scroll-snap-align: center; }
}

/* ---------- Pasos ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 32px 28px;
}
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.step { gap: 10px; padding-top: 22px; }
.step .num { font-size: 34px; }
.step h3 { font-size: 18px; font-weight: 500; }
.step p { font-size: 15px; color: var(--stone); }

/* ---------- Contacto ---------- */
.contact { background: var(--linen); border-top: 1px solid var(--line); }
.contact-inner {
  max-width: 760px;
  padding-block: var(--section-y);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}
.contact-logo { width: 150px; height: 150px; border-radius: 50%; }
.contact .btn-row { padding-top: 6px; }

/* ---------- Pie ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 32px;
  padding-block: 32px;
  font-size: 14px;
  color: var(--stone);
}
.footer-brand { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- Visor de fotos ---------- */
.lightbox {
  width: 100vw; height: 100vh;
  max-width: none; max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-dark);
}
.lightbox[open] {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  animation: lb-in .25s ease;
}
.lightbox::backdrop { background: rgba(28, 30, 20, 0.92); }

.lb-figure {
  grid-column: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-block: 32px;
}
.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.lb-caption { font-family: var(--serif); font-size: 22px; text-align: center; }

.lb-btn {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 241, 232, 0.35);
  border-radius: 50%;
  background: rgba(36, 37, 31, 0.35);
  color: var(--on-dark);
  cursor: pointer;
  transition: background-color .2s ease;
}
.lb-btn:hover { background: rgba(245, 241, 232, 0.15); }
.lb-prev { grid-column: 1; grid-row: 1; justify-self: end; }
.lb-next { grid-column: 3; grid-row: 1; justify-self: start; }
.lb-close { position: absolute; top: 16px; right: 16px; z-index: 1; }

@media (max-width: 599px) {
  .lightbox[open] { grid-template-columns: minmax(0, 1fr); }
  .lb-figure { grid-column: 1; grid-row: 1; padding-inline: 12px; }
  .lb-prev, .lb-next { position: absolute; bottom: 20px; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { left: calc(50% + 12px); }
  .lb-img { max-height: calc(100vh - 180px); }
}

@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Animación de entrada ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

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