/* ============================================================
   HORMAESTUDIO* — Web con scroll continuo
   style.css
   ============================================================ */


/* ── Utilidades de accesibilidad ─────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--black);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

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

/* ── Reset & variables ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:  #1a1a1a;
  --white:  #ffffff;
  --grey:   #666;
  --light:  #f5f5f3;
  --pad:    5vw;
  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: auto; } /* JS maneja el scroll suave */

body {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 300;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  /* cursor:none se aplica vía JS solo cuando el cursor personalizado está activo */
}

body.custom-cursor,
body.custom-cursor .hamburger { cursor: none; }

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a   { color: inherit; text-decoration: none; }
p   { font-size: 0.85rem; line-height: 1.9; color: #555; }


/* ── Cursor ──────────────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid var(--black);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease),
              height 0.3s var(--ease),
              background 0.3s,
              opacity 0.3s;
  mix-blend-mode: difference;
}

.cursor-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--black);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s;
}

.cursor.hovering {
  width: 64px;
  height: 64px;
  background: var(--black);
}

body.menu-open .cursor,
body.menu-open .cursor-dot { opacity: 0; }


/* ── Header ──────────────────────────────────────────────── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem var(--pad);
  transition: transform 0.5s var(--ease),
              background 0.4s,
              padding 0.4s;
}

#header.hidden  { transform: translateY(-100%); }
#header.compact { padding-top: 1.1rem; padding-bottom: 1.1rem; }

#header.solid {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.header-logo img {
  height: 16px;
  width: auto;
  object-fit: contain;
}

/* Hamburger */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--black);
  transition: transform 0.4s var(--ease), opacity 0.3s;
  transform-origin: center;
}

.hamburger.open span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.hamburger.open span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}


/* ── Menú overlay ────────────────────────────────────────── */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--pad) 3rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease);
}

.menu-overlay.open {
  clip-path: inset(0 0 0% 0);
}

.menu-overlay ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.menu-link {
  display: inline-block;
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--black);
  line-height: 1.15;
  position: relative;
  transition: opacity 0.2s;
  cursor: pointer;
}

body.custom-cursor .menu-link { cursor: none; }

.menu-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--black);
  transition: width 0.4s var(--ease);
}

.menu-overlay ul:hover .menu-link { opacity: 0.3; }
.menu-overlay ul:hover .menu-link:hover { opacity: 1; }
.menu-link:hover::after { width: 100%; }

.menu-footer {
  margin-top: auto;
  display: flex;
  gap: 2.5rem;
}

.menu-footer a {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey);
  transition: color 0.2s;
}

.menu-footer a:hover { color: var(--black); }

/* Animación stagger de los items */
.menu-overlay li {
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.6s var(--ease), opacity 0.6s ease;
}

.menu-overlay.open li {
  transform: translateY(0);
  opacity: 1;
}

.menu-overlay.open li:nth-child(1) { transition-delay: 0.1s; }
.menu-overlay.open li:nth-child(2) { transition-delay: 0.15s; }
.menu-overlay.open li:nth-child(3) { transition-delay: 0.2s; }
.menu-overlay.open li:nth-child(4) { transition-delay: 0.25s; }
.menu-overlay.open li:nth-child(5) { transition-delay: 0.3s; }


/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.2s ease, transform 6s var(--ease);
  will-change: transform;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.12) 0%,
    rgba(0,0,0,0.0)  40%,
    rgba(0,0,0,0.45) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 2.5rem;
  left: var(--pad);
  right: var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.hero-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  font-weight: 400;
}

.hero-pager {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pager-num {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
  transition: color 0.4s, font-weight 0.3s;
}

.pager-num.active {
  color: var(--white);
  font-weight: 500;
}

.pager-sep {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.3);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 1;
  transition: opacity 0.5s;
}

.hero-scroll-hint.hidden { opacity: 0; }

.hero-scroll-hint span {
  display: block;
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}

.hero-scroll-hint span::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  animation: line-drop 1.8s ease infinite;
}

@keyframes line-drop {
  0%   { top: -100%; }
  100% { top: 100%; }
}

.hero-scroll-hint p {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}


/* ── Sections ────────────────────────────────────────────── */
.section {
  padding: 10rem var(--pad);
}

.section + .section {
  padding-top: 4rem;
}

.block {
  margin-bottom: 8rem;
}

.block:last-child { margin-bottom: 0; }

.label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 3.5rem;
  font-weight: 400;
}


/* ── Dos columnas ────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.two-col--reverse { direction: rtl; }
.two-col--reverse > * { direction: ltr; }

.col-img {
  aspect-ratio: 4/3;
  overflow: hidden;
}

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

.col-portraits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.col-portraits img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
}

.col-text h2 {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e0e0e0;
}

.col-text p { margin-bottom: 1rem; }

.cta {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 1px solid var(--black);
  padding-bottom: 3px;
  transition: opacity 0.2s;
}

.cta:hover { opacity: 0.5; }


/* ── Full-width image ────────────────────────────────────── */
.full-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16/7;
  overflow: hidden;
  margin-bottom: 6rem;
}

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

.full-img-label {
  position: absolute;
  bottom: 1.75rem;
  left: var(--pad);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  font-weight: 400;
}


/* ── Producto ────────────────────────────────────────────── */
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  margin-bottom: 8rem;
}

.product-media {
  aspect-ratio: 4/5;
  overflow: hidden;
}

.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.swatches {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.swatch {
  display: block;
  width: 34px;
  height: 34px;
  cursor: pointer;
  transition: transform 0.2s;
}

body.custom-cursor .swatch { cursor: none; }

.swatch:hover { transform: scale(1.15); }

.product-info h2 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.product-info p { margin-bottom: 1rem; }


/* ── Contacto ────────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid #d8d8d8;
  padding: 0.9rem 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--black);
  background: transparent;
  outline: none;
  resize: none;
  transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--black); }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #c0c0c0; }

.contact-form button {
  align-self: flex-start;
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 0.9rem 2.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
}

body.custom-cursor .contact-form button { cursor: none; }

.contact-form button:hover {
  background: #333;
  transform: translateY(-1px);
}

.contact-form button:disabled {
  opacity: 0.5;
  transform: none;
  cursor: not-allowed;
}

.form-note {
  font-size: 0.72rem;
  color: var(--grey);
  min-height: 1rem;
}


/* ── Footer ──────────────────────────────────────────────── */
#footer {
  border-top: 1px solid #e4e4e4;
  padding: 3.5rem var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.footer-logo {
  height: 13px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.footer-left p {
  font-size: 0.7rem;
  line-height: 1.7;
  color: var(--grey);
}

.footer-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.footer-right p {
  font-size: 0.68rem;
  color: var(--grey);
}

.footer-legal {
  display: flex;
  gap: 1.75rem;
}

.footer-legal a {
  font-size: 0.62rem;
  color: #bbb;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.footer-legal a:hover { color: var(--black); }


/* ── Reveal animations ───────────────────────────────────── */
.reveal,
.reveal-img,
.reveal-text,
.reveal-line {
  opacity: 0;
}

.reveal       { transform: translateY(32px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal-img   { transform: scale(1.03);      transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal-text  { transform: translateY(16px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-line  { transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }

.reveal.in-view,
.reveal-img.in-view,
.reveal-text.in-view,
.reveal-line.in-view {
  opacity: 1;
  transform: none;
}


/* ── Movimiento reducido ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  /* Desactiva todas las transiciones y animaciones */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Hace visibles los elementos de reveal directamente */
  .reveal,
  .reveal-img,
  .reveal-text,
  .reveal-line {
    opacity: 1;
    transform: none;
  }
}

/* ── Video sections ──────────────────────────────────────── */

/* Two-col con vídeo vertical: columna izquierda estrecha, texto derecho más ancho */
.two-col--video-left {
  grid-template-columns: 1fr 2fr;
}

/* col-img con aspect-ratio 9:16 para vídeos verticales */
.col-img--video {
  aspect-ratio: 9/16;
  position: relative;
}

.col-img--video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bloque de vídeo vertical centrado (standalone) */
.video-portrait-block {
  display: flex;
  justify-content: center;
  margin-bottom: 6rem;
}

.video-portrait-wrap {
  width: min(400px, 100%);
  aspect-ratio: 9/16;
  position: relative;
  overflow: hidden;
  background: var(--light);
}

.video-portrait-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Imagen poster — fallback estático */
.video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

/* Botón play/pause discreto */
.video-play-btn {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  background: rgba(26,26,26,0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s;
  padding: 0;
}

.video-play-btn:hover,
.video-play-btn:focus-visible {
  background: rgba(26,26,26,0.5);
  outline: 1px solid rgba(255,255,255,0.4);
  outline-offset: 2px;
}

body.custom-cursor .video-play-btn { cursor: none; }

/* prefers-reduced-motion: mostrar solo poster estático */
@media (prefers-reduced-motion: reduce) {
  .section-video  { display: none; }
  .video-poster   { display: block; }
  .video-play-btn { display: none; }
}


/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --pad: 1.5rem; }

  .two-col,
  .product { grid-template-columns: 1fr; gap: 2.5rem; }

  .two-col--reverse { direction: ltr; }

  .col-portraits { grid-template-columns: 1fr 1fr; }

  .full-img { aspect-ratio: 4/3; }

  .section { padding: 7rem var(--pad); }

  .form-row { grid-template-columns: 1fr; }

  .col-img--video { width: min(400px, 100%); margin-left: auto; margin-right: auto; }
  .video-portrait-wrap { width: min(400px, 100%); }
  .video-portrait-block { margin-bottom: 4rem; }

  #footer { flex-direction: column; align-items: flex-start; }
  .footer-right { text-align: left; align-items: flex-start; }

  body,
  body.custom-cursor,
  body.custom-cursor .hamburger,
  body.custom-cursor .menu-link,
  body.custom-cursor .swatch,
  body.custom-cursor .contact-form button { cursor: auto; }
  .cursor, .cursor-dot { display: none; }
  .hamburger, .contact-form button, .menu-link, .swatch, .cta { cursor: pointer; }
}
