@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --c-bg:        #0a0a0a;
  --c-surface:   #111111;
  --c-border:    #1e1e1e;
  --c-text:      #e8e4dc;
  --c-muted:     #5a5a5a;
  --c-accent-a:  #2563ff;
  --c-accent-b:  #00c9c8;
  --c-accent-c:  #e8415a;

  --f-display: 'Space Grotesk', sans-serif;
  --f-mono:    'Space Mono', monospace;

  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1rem;
  --t-md:   1.25rem;
  --t-lg:   1.75rem;
  --t-xl:   2.5rem;
  --t-2xl:  3.5rem;
  --t-3xl:  5rem;

  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  2rem;
  --sp-lg:  4rem;
  --sp-xl:  7rem;

  --max-w: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-display);
  font-size: var(--t-base);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding-block: var(--sp-sm);
  background: linear-gradient(to bottom, var(--c-bg) 60%, transparent);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(0.75rem, 2vw, 1.25rem);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  position: relative;
  font-size: 0.825rem; /* +10% sobre 0.75rem */
  font-family: var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a39f98;
  transition: color 0.2s;
}

.site-nav a:not(:last-child)::after {
  content: '|';
  position: absolute;
  right: -0.6rem;
  color: #4a4a4a;
}

.site-logo {
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text);
}

.site-logo span { color: var(--c-accent-a); }

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--c-text); }

main {
  padding-top: 5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.section { padding-block: var(--sp-xl); }

.section-label {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-accent-b);
  margin-bottom: var(--sp-md);
}

.site-footer {
  border-top: 1px solid var(--c-border);
  padding-block: var(--sp-md);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.footer-contact {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-contact a {
  transition: color 0.2s;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: var(--c-accent-b);
}

.site-footer p {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--c-muted);
}

/* --- Servicios --- */
.servicios-list {
  display: flex;
  flex-direction: column;
  max-width: 60ch;
}

.servicios-list li {
  padding: var(--sp-md) 0;
  border-bottom: 1px solid var(--c-border);
  font-size: var(--t-md);
  line-height: 1.5;
}

.servicios-list li:first-child {
  border-top: 1px solid var(--c-border);
}

/* --- Placeholder page --- */
.placeholder-msg {
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  color: var(--c-muted);
  min-height: 40vh;
  display: flex;
  align-items: center;
}

/* --- Proyecto detalle --- */
.back-link {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.05em;
  color: var(--c-muted);
  margin-bottom: var(--sp-lg);
  transition: color 0.2s;
}

.back-link:hover,
.back-link:focus-visible { color: var(--c-accent-b); }

.proyecto-head { margin-bottom: var(--sp-md); }

.proyecto-title {
  font-size: clamp(1.75rem, 4vw, var(--t-2xl));
  font-weight: 600;
  margin-top: 0.4rem;
}

.proyecto-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--c-surface);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--sp-lg);
}

.proyecto-video iframe,
.proyecto-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #000;
}

.proyecto-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--sp-lg);
}

.proyecto-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proyecto-body {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--sp-lg);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--c-border);
}

.proyecto-descripcion p {
  font-size: var(--t-md);
  line-height: 1.7;
  color: var(--c-text);
}

.proyecto-ficha dl {
  border-top: 1px solid var(--c-border);
}

.proyecto-ficha dt {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent-b);
  margin-top: var(--sp-sm);
}

.proyecto-ficha dd {
  font-size: var(--t-sm);
  color: var(--c-muted);
  margin-bottom: var(--sp-sm);
}

.proyecto-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-sm);
  margin-top: var(--sp-lg);
}

.proyecto-galeria img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}

@media (max-width: 800px) {
  .proyecto-body {
    grid-template-columns: 1fr;
  }
}

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

:focus-visible { outline: 2px solid var(--c-accent-a); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Celular: logo arriba y menú en una línea propia, centrado, en vez de
   partirse en varios renglones desparejos al lado del logo. */
@media (max-width: 700px) {
  .site-header .container {
    flex-direction: column;
    gap: 0.35rem;
  }
  .site-header { padding-block: 0.75rem; }
  .site-nav {
    justify-content: center;
    gap: 0.9rem;
  }
  .site-nav a {
    font-size: 0.715rem;
    letter-spacing: 0.04em;
  }
  .site-nav a:not(:last-child)::after { right: -0.55rem; }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: calc(100dvh - 5rem);
  display: flex;
  align-items: center;
  padding-block: 2rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-bg .slide.active {
  opacity: 1;
}

.hero-bg img,
.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Fotos muy panorámicas: en mobile se muestran completas en vez de recortadas */
.hero-bg .slide.fit-contain img,
.hero-bg .slide.fit-contain video {
  object-fit: contain;
  background: var(--c-bg);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.55) 0%,
    rgba(10, 10, 10, 0) 25%
  );
}

.hero-work-info {
  position: absolute;
  bottom: 1.5rem;
  right: clamp(1.25rem, 5vw, 3rem);
  z-index: 2;
  text-align: right;
  font-family: var(--f-mono);
  font-size: 1.127rem; /* +15% */
  line-height: 1.5;
  color: rgba(232, 228, 220, 0.7);
}

.hero-work-info .work-titulo,
.hero-work-info .work-rol {
  white-space: nowrap;
}

.hero-work-info .work-titulo {
  color: var(--c-text);
  display: block;
}

.hero-work-info .work-rol {
  display: block;
  color: var(--c-text);
  -webkit-text-stroke: 0.25px rgba(0, 0, 0, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.hero-brand-tag {
  position: absolute;
  bottom: 1.5rem;
  left: clamp(1.25rem, 5vw, 3rem);
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  font-family: var(--f-mono);
  font-size: clamp(1.265rem, 2.2vw, 1.725rem); /* +15% */
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text);
  white-space: nowrap;
}

.hero-brand-tag .brand-sep {
  color: var(--c-muted);
  margin-inline: 0.35em;
}

/* Ventana media: en una sola fila choca con el panel de info de la derecha,
   así que se apila en vertical y el tamaño acompaña el ancho de la ventana. */
@media (max-width: 1280px) {
  .hero-brand-tag {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15em;
    font-size: clamp(0.98rem, 2.6vw, 1.725rem);
  }
  .hero-brand-tag .brand-sep {
    display: none;
  }
}

@media (max-width: 700px) {
  .hero-brand-tag {
    max-width: calc(50vw - 1.5rem);
    font-size: 0.98rem;
    white-space: normal;
  }

  .hero-work-info {
    max-width: calc(50vw - 1.5rem);
    font-size: 0.83rem;
  }
  .hero-work-info .work-titulo,
  .hero-work-info .work-rol {
    white-space: normal;
  }
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-inline-start: clamp(1rem, 3vw, 2rem);
}

.hero-content { max-width: 46ch; }

.hero-title-simple {
  font-size: clamp(1.44rem, 3.84vw, 3.2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--c-text);
}

.hero-actions {
  display: flex;
  gap: var(--sp-sm);
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 2px;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.15s ease, background-color 0.2s, color 0.2s;
}

.btn-primary { background: var(--c-accent-a); color: #fff; }
.btn-primary:hover,
.btn-primary:focus-visible { transform: translateY(-2px); }

.btn-ghost {
  border: 1px solid rgba(232, 228, 220, 0.35);
  color: var(--c-text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible { border-color: var(--c-accent-b); color: var(--c-accent-b); }

/* --- Sobre mí --- */
.about-text { max-width: 60ch; }

.about-text p {
  font-size: var(--t-md);
  line-height: 1.7;
  margin-bottom: var(--sp-sm);
  color: var(--c-text);
}

.about-text p:first-of-type {
  font-size: var(--t-lg);
  font-weight: 500;
}

/* --- Portfolio --- */
.portfolio-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}

.filter-group { display: flex; gap: var(--sp-xs); flex-wrap: wrap; }

.filter-btn {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border: 1px solid var(--c-border);
  color: var(--c-muted);
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.filter-btn:hover,
.filter-btn:focus-visible { color: var(--c-text); border-color: var(--c-muted); }

.filter-btn[aria-pressed="true"] {
  color: var(--c-bg);
  background: var(--c-accent-b);
  border-color: var(--c-accent-b);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-md);
}

.project-card {
  display: block;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--c-surface);
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--c-accent-b);
  transform: translateY(-3px);
}

.project-thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #161616, #0d0d0d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--c-muted);
  letter-spacing: 0.05em;
}

.project-info { padding: var(--sp-sm); }

.project-cat {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent-c);
  margin-bottom: 0.4rem;
}

.project-title { font-size: var(--t-base); font-weight: 500; margin-bottom: 0.2rem; }
.project-year { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--c-muted); }
.project-card[hidden] { display: none; }

.empty-state {
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  color: var(--c-muted);
  padding: var(--sp-lg) 0;
  text-align: center;
}

/* --- Page transition (halftone dissolve, blanco y negro) --- */
@property --dot-r {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  --dot-r: 20px; /* tapado por defecto: cero riesgo de flash antes de que corra el JS */
  background-image: radial-gradient(circle, #050505 var(--dot-r), transparent var(--dot-r));
  background-size: 26px 26px;
}

.page-transition.transition-ready {
  transition: --dot-r 0.42s cubic-bezier(.65, 0, .35, 1);
}

.page-transition.revealed {
  --dot-r: 0px;
}

@media (prefers-reduced-motion: reduce) {
  .page-transition { display: none !important; }
}

/* --- Taller Luminarias --- */
.taller-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-lg);
  align-items: center;
}

.taller-title {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  margin-top: 0.5rem;
  max-width: 20ch;
}

.taller-sub {
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  color: var(--c-muted);
  margin-top: var(--sp-sm);
}

.taller-flyer img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--c-border);
}

.taller-lugar {
  font-size: var(--t-md);
  color: var(--c-text);
}

#taller-form-embed iframe {
  width: 100%;
  border: none;
  border-radius: 4px;
  background: var(--c-surface);
}

@media (max-width: 800px) {
  .taller-hero-grid {
    grid-template-columns: 1fr;
  }
  .taller-flyer {
    order: -1;
    max-width: 420px;
    margin-inline: auto;
  }
}

.taller-cerrado {
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: var(--sp-md);
  max-width: 48ch;
}

.taller-cerrado-badge {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent-c);
  border: 1px solid var(--c-accent-c);
  border-radius: 2px;
  padding: 0.2rem 0.6rem;
  margin-bottom: var(--sp-sm);
}

.taller-cerrado p {
  font-size: var(--t-md);
  color: var(--c-text);
  margin-top: var(--sp-sm);
}

.taller-cerrado-sub {
  font-size: var(--t-sm) !important;
  color: var(--c-muted) !important;
}

.taller-cerrado-sub a {
  color: var(--c-accent-b);
  transition: color 0.2s;
}

.taller-cerrado-sub a:hover,
.taller-cerrado-sub a:focus-visible { color: var(--c-accent-a); }

.categoria-descripcion {
  font-size: var(--t-sm);
  color: var(--c-muted);
  max-width: 60ch;
  margin-bottom: var(--sp-md);
  margin-top: -0.5rem;
}

/* --- Flechas del slideshow del hero --- */
.hero-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(232, 228, 220, 0.25);
  background: rgba(10, 10, 10, 0.35);
  color: var(--c-text);
  font-family: var(--f-mono);
  font-size: 1.265rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.hero-nav-btn:hover,
.hero-nav-btn:focus-visible {
  border-color: var(--c-accent-b);
  color: var(--c-accent-b);
  background: rgba(10, 10, 10, 0.6);
}

.hero-nav-prev { left: clamp(1rem, 4vw, 2.5rem); }
.hero-nav-next { right: clamp(1rem, 4vw, 2.5rem); }

@media (max-width: 600px) {
  .hero-nav-btn { width: 36px; height: 36px; font-size: 0.95rem; }
}

/* --- Contacto --- */
.contacto-hero {
  min-height: calc(100dvh - 5rem);
  display: flex;
  align-items: center;
}

.contacto-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  margin-top: var(--sp-md);
}

.contacto-link {
  display: flex;
  align-items: baseline;
  gap: var(--sp-md);
  padding-block: var(--sp-sm);
  border-bottom: 1px solid var(--c-border);
  transition: opacity 0.2s;
}

.contacto-link:hover,
.contacto-link:focus-visible {
  opacity: 0.7;
}

.contacto-label {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent-b);
  width: 7rem;
  flex-shrink: 0;
}

.contacto-value {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--c-text);
}

.contacto-lugar {
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  color: var(--c-muted);
  margin-top: var(--sp-lg);
}

.hero-work-link {
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
}
.hero-work-link:hover,
.hero-work-link:focus-visible {
  opacity: 0.75;
}
/* Pista de que el panel es clickeable */
.hero-work-link .work-titulo::after {
  content: '\00a0→'; /* espacio no separable: la flecha nunca baja sola de renglón */
}
