/* css/base.css — home, sobre-mí, sistema compartido y receta lightbox.
   Capas: `casos` pisa a `site` (overrides de ficha); `lightbox` pisa a `casos`
   para conservar el ganador actual de la receta compartida del monolito. */
@layer site, casos, lightbox;

@layer site {
/* ============================================
   VARIABLES
   ============================================ */
:root {
  --bg: #FFFFFF;
  --fg: #111111;
  --muted: #555555;
  --card: #FFFFFF;
  --line: #E2E2E2;
  --container: 1200px;
  --gutter: 32px;
  --header-h: 88px;
  --brand: #111111;
  --brand-hover: #333333;
  --brand-soft: rgba(17, 17, 17, 0.06);
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light;
  background-color: var(--bg);
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}

html,
body {
  font-family: 'DM Sans', ui-sans-serif;
  font-optical-sizing: auto;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--fg);
  background: var(--bg);
  background-color: var(--bg);
  font-size: 19px;
  line-height: 1.65;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden; /* evita scroll del body / overscroll blanco */
  overflow-x: hidden;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
}

body,
button,
input,
textarea,
select,
a,
.btn,
nav a,
.icon-btn span,
h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
}

button {
  font: inherit;
}

a, a:hover, a:focus, a:active {
  text-decoration: none !important;
}



/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
/* Solo el chrome del sitio (hijo directo de body).
   Los <header> internos de fichas (mayo-head, wine-block-head, etc.) no heredan fixed. */
body > header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--gutter);
  position: relative;
}

.logo-mark {
  height: 58px;
  width: 58px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(28, 28, 28, 0.1);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.site-nav a {
  color: var(--brand);
  text-decoration: none;
  margin: 0 16px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color .2s ease;
  white-space: nowrap;
  position: relative;
  padding-bottom: 3px;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--brand);
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: center;
  transition: opacity .2s ease, transform .22s ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover::after,
  .site-nav a:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
  }
}

.site-nav a:hover {
  color: var(--brand-hover);
}

.site-nav a:focus-visible {
  outline: none;
  color: var(--brand-hover);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.nav-toggle:hover {
  border-color: var(--brand);
  background: rgba(17, 17, 17, 0.06);
}

.nav-toggle-bars {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  border-radius: 2px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

body > header.is-nav-open .nav-toggle-bars {
  background: transparent;
}

body > header.is-nav-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

body > header.is-nav-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ============================================
   ICONOS SOCIALES
   ============================================ */
.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.actions a {
  text-decoration: none;
}

.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--brand);
  transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.icon-btn svg {
  display: block;
  width: 22px;
  height: 22px;
  overflow: visible;
  transform-origin: 50% 50%;
  transition: transform .28s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.icon-btn .icon-part {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .32s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: rgba(17, 17, 17, 0.06);
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}

.icon-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.22);
}

/* WhatsApp: leve bounce */
@keyframes icon-wa-nudge {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-1.5px) scale(1.06); }
  70% { transform: translateY(0.5px) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}

/* LinkedIn: la cabeza hace un pop suave */
@keyframes icon-li-head {
  0% { transform: translateY(0); }
  40% { transform: translateY(-1.6px); }
  100% { transform: translateY(0); }
}

@keyframes icon-li-body {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Correo: la solapa se levanta un poco */
@keyframes icon-mail-flap {
  0% { transform: translateY(0); }
  45% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

@keyframes icon-mail-body {
  0% { transform: translateY(0); }
  45% { transform: translateY(0.6px); }
  100% { transform: translateY(0); }
}

@media (hover: hover) and (pointer: fine) {
  .icon-btn--wa:hover svg,
  .icon-btn--wa:focus-visible svg {
    animation: icon-wa-nudge 0.48s cubic-bezier(0.34, 1.35, 0.64, 1);
  }

  .icon-btn--li:hover .icon-li-head,
  .icon-btn--li:focus-visible .icon-li-head {
    animation: icon-li-head 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
  }

  .icon-btn--li:hover .icon-li-body,
  .icon-btn--li:focus-visible .icon-li-body {
    animation: icon-li-body 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
  }

  .icon-btn--mail:hover .icon-mail-flap,
  .icon-btn--mail:focus-visible .icon-mail-flap {
    animation: icon-mail-flap 0.42s cubic-bezier(0.34, 1.35, 0.64, 1);
  }

  .icon-btn--mail:hover .icon-mail-body,
  .icon-btn--mail:focus-visible .icon-mail-body {
    animation: icon-mail-body 0.42s cubic-bezier(0.34, 1.35, 0.64, 1);
  }

  .icon-btn:hover {
    transform: translateY(-1px);
  }
}

/* Tap / active: móvil, tablet y click */
.icon-btn--wa:active svg,
.icon-btn--wa.is-animating svg {
  animation: icon-wa-nudge 0.48s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.icon-btn--li:active .icon-li-head,
.icon-btn--li.is-animating .icon-li-head {
  animation: icon-li-head 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.icon-btn--li:active .icon-li-body,
.icon-btn--li.is-animating .icon-li-body {
  animation: icon-li-body 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.icon-btn--mail:active .icon-mail-flap,
.icon-btn--mail.is-animating .icon-mail-flap {
  animation: icon-mail-flap 0.42s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.icon-btn--mail:active .icon-mail-body,
.icon-btn--mail.is-animating .icon-mail-body {
  animation: icon-mail-body 0.42s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.icon-btn:active {
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  .icon-btn,
  .icon-btn svg,
  .icon-btn .icon-part {
    transition: none !important;
    animation: none !important;
  }

  .icon-btn:hover,
  .icon-btn:active {
    transform: none;
  }
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
main {
  height: 100%;
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
  padding-top: var(--header-h);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  scroll-behavior: smooth;
  background: var(--bg);
  background-color: var(--bg);
  touch-action: pan-y;
}

section {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 56px 0;
  animation: fadeIn 0.7s ease-in;
}

html.js-motion section {
  animation: none;
}

section.hero {
  min-height: calc(100dvh - var(--header-h));
  padding: clamp(32px, 4vh, 56px) 0;
  width: 100%;
  position: relative;
  z-index: 1;
  background: var(--bg);
  overflow: visible;
}

/* Línea fina de separación (no caja/sombra) */
section.hero::after {
  content: '';
  position: absolute;
  left: max(var(--gutter), calc((100% - min(1320px, 94vw)) / 2));
  right: max(var(--gutter), calc((100% - min(1320px, 94vw)) / 2));
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: rgba(28, 28, 28, 0.14);
}

/* ============================================
   HERO / SOBRE MÍ
   ============================================ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  column-gap: clamp(64px, 8.5vw, 128px);
  row-gap: clamp(36px, 5vw, 64px);
  align-items: center;
  justify-content: center;
  max-width: min(1520px, 97vw);
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 clamp(20px, 4.2vw, 52px);
  overflow: visible;
}

.hero-copy {
  justify-self: stretch;
  max-width: none;
  padding-right: clamp(8px, 1.6vw, 28px);
}

.hero-copy h1,
.hero-copy p {
  max-width: none;
}

.hero h1 {
  margin-bottom: 22px;
}

.hero-name {
  display: block;
  font-size: clamp(56px, 7.4vw, 108px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.hero-role {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.section-lead {
  max-width: 680px;
  margin: -8px auto 28px;
  color: var(--muted);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.65;
  text-align: center;
}

.hero .desc {
  color: var(--fg);
  font-size: clamp(20px, 1.9vw, 28px);
  max-width: 36em;
  margin-bottom: 36px;
  line-height: 1.65;
  padding-right: clamp(28px, 5.2vw, 64px);
  text-wrap: pretty;
}

.hero-image {
  width: min(840px, 50vw);
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 0;
  overflow: visible;
  justify-self: center;
  background: transparent;
  position: relative;
  touch-action: pan-y;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}

.portrait-reveal-wrapper {
  position: absolute;
  inset: 13%;
  width: auto;
  height: auto;
  transform-origin: 50% 50%;
  border-radius: 50%;
  overflow: hidden;
  background: #E4E4E4;
  box-shadow: 0 0 0 1px rgba(28, 28, 28, 0.08), 0 18px 40px rgba(28, 28, 28, 0.08);
  pointer-events: auto;
  touch-action: pan-y;
  cursor: pointer;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  pointer-events: none;
}

.hero-morph-draw {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.hero-morph-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-clip-path: inset(0 0% 0 0);
  clip-path: inset(0 0% 0 0);
  will-change: clip-path;
  transform: translateZ(0);
}

.hero-morph-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 18%;
}

.hero-morph-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 100%;
  width: 0;
  z-index: 3;
  pointer-events: none;
}

.hero-morph-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 250, 240, 0.92);
  box-shadow: 0 0 0 1px rgba(28, 28, 28, 0.12);
}

.hero-morph-handle-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.95);
  border: 1px solid rgba(28, 28, 28, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.hero-morph-handle-knob::before,
.hero-morph-handle-knob::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  transform: translateY(-50%);
}

.hero-morph-handle-knob::before {
  left: 10px;
  border-width: 5px 6px 5px 0;
  border-color: transparent #1C1C1C transparent transparent;
}

.hero-morph-handle-knob::after {
  right: 10px;
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent #1C1C1C;
}

.hero-morph-hint {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(28, 28, 28, 0.62);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-morph.is-drawn .hero-morph-hint,
.hero-morph.is-dragging .hero-morph-hint {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}

.hero-morph.is-animating .hero-morph-photo {
  transition: clip-path 0.78s cubic-bezier(0.4, 0, 0.2, 1), -webkit-clip-path 0.78s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-morph.is-animating .hero-morph-handle {
  transition: left 0.78s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .hero-morph.is-animating .hero-morph-photo,
  .hero-morph.is-animating .hero-morph-handle,
  .hero-morph-hint {
    transition: none;
  }
}

.portrait-orbit {
  position: absolute;
  inset: -4%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}

.portrait-orbit-ring,
.portrait-orbit-item,
.portrait-orbit-arrows {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.portrait-orbit-item {
  transform: rotate(var(--a));
}

.portrait-orbit-arrows {
  width: 100%;
  height: 100%;
  color: rgba(17, 17, 17, 0.34);
  opacity: 0;
  transition: opacity 0.48s ease;
}

.portrait-orbit-spin {
  position: absolute;
  top: -3.5%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(calc(var(--a) * -1));
}

.portrait-orbit-label {
  display: block;
  font-family: inherit;
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.48s ease, transform 0.48s ease;
}

.portrait-interactive-wrapper.is-orbit-on .portrait-orbit-label,
.portrait-interactive-wrapper.is-orbit-on .portrait-orbit-arrows {
  opacity: 1;
  transform: translateY(0);
}

.portrait-interactive-wrapper.is-orbit-on .portrait-orbit-ring {
  animation: portraitOrbitSpin 36s linear infinite;
}

.portrait-interactive-wrapper.is-orbit-on .portrait-orbit-spin {
  animation: portraitOrbitCounter 36s linear infinite;
}

@keyframes portraitOrbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes portraitOrbitCounter {
  from { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1 - 360deg)); }
}

@media (max-width: 920px) {
  .portrait-reveal-wrapper {
    inset: 16%;
  }

  .portrait-orbit {
    inset: 10%;
  }

  .portrait-orbit-spin {
    top: 7%;
  }

  .portrait-orbit-label {
    font-size: clamp(11px, 2.8vw, 13px);
    letter-spacing: 0.06em;
    transform: translateY(5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portrait-orbit-label {
    transition: opacity 0.2s ease;
  }

  .portrait-interactive-wrapper.is-orbit-on .portrait-orbit-ring,
  .portrait-interactive-wrapper.is-orbit-on .portrait-orbit-spin {
    animation: none;
  }
}

.hero .cta {
  gap: 16px;
}

.hero .btn {
  padding: 18px 32px;
  font-size: 20px;
}

#trabajos,
#proceso {
  padding: 48px 0;
}

#trabajos {
  padding-top: 64px;
  position: relative;
  z-index: 0;
}

#contacto {
  padding: 56px 0 72px;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   BOTONES
   ============================================ */
.cta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  padding: 16px 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  text-decoration: none !important;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .22s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
}

.btn-primary:hover {
  background: rgba(17, 17, 17, 0.90);
  border-color: rgba(17, 17, 17, 0.90);
  transform: translateY(-2px);
}

.btn-secondary {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand);
}

.btn-secondary:hover {
  background: rgba(17, 17, 17, 0.06);
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
}

/* ============================================
   TRABAJOS
   ============================================ */
#trabajos h2 {
  font-size: 50px;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  text-align: center;
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
}

#trabajos h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--brand);
  border-radius: 2px;
}

.work-section {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
  box-sizing: border-box;
}

.work-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(130px, auto);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  grid-auto-flow: dense;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, box-shadow 0.28s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  min-height: 0;
  animation: cardIn 0.55s ease backwards;
  width: auto;
  height: auto;
  color: var(--fg);
  text-decoration: none;
}

html.js-motion .card {
  animation: none;
}

a.card:link,
a.card:visited,
a.card:hover,
a.card:active {
  color: var(--fg);
  text-decoration: none;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.12s; }
.card:nth-child(3) { animation-delay: 0.19s; }
.card:nth-child(4) { animation-delay: 0.26s; }
.card:nth-child(5) { animation-delay: 0.33s; }
.card:nth-child(6) { animation-delay: 0.40s; }
.card:nth-child(8) { animation-delay: 0.54s; }

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.card-third {
  grid-column: span 4;
  grid-row: span 1;
  min-height: 0;
}

.thumb {
  background: #E4E4E4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  position: relative;
}

.card-third .thumb {
  flex: 0 0 auto;
  aspect-ratio: 9 / 16;
  min-height: 0;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
  filter: grayscale(0.5);
}

.card:hover .thumb img {
  transform: scale(1.04);
  filter: grayscale(0);
}

/* Shared media box: cover fills the card equally. No letterbox, no per-image height. */

.card-body {
  padding: 16px 18px 18px;
  text-align: left;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 138px;
  letter-spacing: normal;
  background: transparent;
  border-top: none;
  color: var(--fg);
  box-sizing: border-box;
}

.card-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.card-category,
.card-title,
.card-description {
  display: block;
  margin: 0;
  width: 100%;
}

.card-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.65;
  line-height: 1.35;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fg);
  line-height: 1.3;
}

.card-description {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg);
  opacity: 0.75;
  display: block;
  overflow: visible;
  flex-shrink: 0;
  min-height: 2.8em;
}

.card-arrow {
  display: none;
  flex-shrink: 0;
  width: 1.15em;
  margin-top: 2px;
  font-size: 16px;
  line-height: 1;
  color: var(--fg);
  opacity: 0;
  transform: translate(2px, -2px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.project-actions-section {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px var(--gutter) 28px;
  box-sizing: border-box;
  align-self: stretch;
  text-align: left;
}

.project-actions-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  margin: 0;
}

.project-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.project-action-prompt {
  margin: 0;
  color: var(--fg);
  font-size: 18px;
  font-weight: 500;
}

.project-action-arrow {
  color: var(--fg);
  flex-shrink: 0;
}

.project-action-btn {
  padding: 11px 22px;
  font-size: 16px;
}

.card-body::after {
  content: none;
}

@media (hover: hover) and (pointer: fine) {
  .card-arrow {
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-end;
  }

  .card:hover .card-arrow {
    opacity: 1;
    transform: translate(0, 0);
  }
}

/* ============================================
   PROCESO
   ============================================ */
#proceso h2 {
  font-size: 50px;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  text-align: center;
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
}

#proceso h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--brand);
  border-radius: 2px;
}

.process-section {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
  box-sizing: border-box;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  align-items: stretch;
  text-align: left;
}

.step {
  perspective: 1600px;
  -webkit-perspective: 1600px;
  background: transparent;
  border: none;
  padding: 0;
  width: 100%;
  min-width: 0;
  min-height: 380px;
  height: 380px;
  cursor: pointer;
  outline: none;
}

.step-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0.05, 0.2, 1);
  will-change: transform;
}

.step.is-flipped .step-inner,
.step:focus-visible .step-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

@media (hover: hover) and (pointer: fine) and (min-width: 1101px) {
  .step:hover .step-inner {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
  }
}

.step-face {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 30px 24px;
  border-radius: 20px;
  border: 1px solid transparent;
  box-shadow: 0 8px 28px rgba(28, 28, 28, 0.06);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  text-align: left;
  overflow: hidden;
}

.step-front {
  transform: rotateY(0deg) translateZ(0);
  -webkit-transform: rotateY(0deg) translateZ(0);
}

.step-back {
  transform: rotateY(180deg) translateZ(0);
  -webkit-transform: rotateY(180deg) translateZ(0);
  justify-content: flex-start;
}

.step-front svg {
  color: inherit;
  opacity: 0.88;
  margin-top: auto;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.step h3 {
  font-size: clamp(23px, 1.8vw, 28px);
  line-height: 1.25;
  margin: 0;
  width: 100%;
  max-width: none;
}

.step-back h3,
.step-back .step-back-title {
  font-size: 20px;
  opacity: 0.95;
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
  width: 100%;
}

.step p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  width: 100%;
}

.step-hint {
  display: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}

.step-hint-touch {
  display: none;
}

.step:nth-child(1) .step-front {
  background: #F4F4F4;
  border-color: rgba(17, 17, 17, 0.14);
  color: #111111;
}

.step:nth-child(1) .step-front .step-num {
  background: rgba(17, 17, 17, 0.1);
  color: #111111;
}

.step:nth-child(1) .step-back {
  background: #111111;
  border-color: #111111;
  color: #FFFFFF;
}

.step:nth-child(1) .step-back .step-num {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.step:nth-child(2) .step-front {
  background: #EFEFEF;
  border-color: rgba(17, 17, 17, 0.14);
  color: #111111;
}

.step:nth-child(2) .step-front .step-num {
  background: rgba(17, 17, 17, 0.1);
  color: #111111;
}

.step:nth-child(2) .step-back {
  background: #2A2A2A;
  border-color: #2A2A2A;
  color: #FFFFFF;
}

.step:nth-child(2) .step-back .step-num {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.step:nth-child(3) .step-front {
  background: #F6F6F6;
  border-color: rgba(17, 17, 17, 0.14);
  color: #111111;
}

.step:nth-child(3) .step-front .step-num {
  background: rgba(17, 17, 17, 0.1);
  color: #111111;
}

.step:nth-child(3) .step-back {
  background: #1A1A1A;
  border-color: #1A1A1A;
  color: #FFFFFF;
}

.step:nth-child(3) .step-back .step-num {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.step:nth-child(4) .step-front {
  background: #EBEBEB;
  border-color: rgba(17, 17, 17, 0.14);
  color: #111111;
}

.step:nth-child(4) .step-front .step-num {
  background: rgba(17, 17, 17, 0.1);
  color: #111111;
}

.step:nth-child(4) .step-back {
  background: #333333;
  border-color: #333333;
  color: #FFFFFF;
}

.step:nth-child(4) .step-back .step-num {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

@media (max-width: 1200px), (hover: none), (pointer: coarse) {
  .step-hint,
  .step-hint-touch {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-inner {
    transition: none;
  }
}

/* ============================================
   SOBRE MÍ DETALLE
   ============================================ */
.about-section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}

/* ============================================
   CONTACTO
   ============================================ */
#contacto h2 {
  font-size: 50px;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  text-align: center;
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
  width: auto;
}

#contacto h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--brand);
  border-radius: 2px;
}

#contacto > p,
.contact-intro {
  max-width: 640px;
  width: 100%;
  margin: 0 auto 22px;
  text-align: center;
  font-size: 21px;
  line-height: 1.65;
  color: var(--muted);
}

.contact-success {
  max-width: 900px;
  width: 100%;
  margin: 0 auto 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.12);
  border: 1px solid rgba(17, 17, 17, 0.35);
  color: var(--brand);
  font-weight: 600;
  text-align: center;
}

.contact-error {
  max-width: 900px;
  width: 100%;
  margin: 0 auto 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.06);
  border: 1px solid rgba(17, 17, 17, 0.28);
  color: #111111;
  font-weight: 600;
  text-align: center;
}

.contact-honey {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

form,
#contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  font-size: 20px;
  position: relative;
}

form .full {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font: inherit;
}

textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 860px;
  }

  .step {
    min-height: 340px;
    height: 340px;
  }

  .step h3 {
    font-size: clamp(22px, 2.4vw, 26px);
  }

  .step p {
    font-size: 16px;
  }

  .hero {
    column-gap: 88px;
    row-gap: 32px;
    max-width: min(1100px, 94vw);
  }

  .hero-copy {
    padding-right: 20px;
  }

  .hero .desc {
    padding-right: 40px;
  }

  .hero-image {
    width: min(520px, 40vw);
    max-width: 84%;
  }

  .portrait-orbit-spin {
    top: 0%;
  }
}

@media (max-width: 1024px) {
  section {
    padding: 44px 0;
    width: 100%;
    align-items: stretch;
  }

  section.hero {
    min-height: auto;
    padding: 40px 0;
    align-items: center;
  }

  #contacto {
    align-items: center;
  }

  .work-section,
  .process-section {
    width: 100%;
  }

  .work-container {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: auto;
  }

  .card-third {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 0;
    height: auto;
  }

  .card-body {
    min-height: 138px;
  }

  .steps {
    max-width: 780px;
  }

  .step {
    min-height: 320px;
    height: 320px;
  }
}

@media (max-width: 1024px) and (min-width: 921px) {
  .card-third .thumb {
    flex: 0 0 auto;
    aspect-ratio: 9 / 16;
    min-height: 0;
  }

  .card-body {
    min-height: 160px;
  }
}

@media (max-width: 920px) {
  :root {
    --gutter: 32px;
    --header-h: 74px;
  }

  html,
  body {
    font-size: 16px;
  }

  .header-inner {
    padding: 12px var(--gutter);
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
    margin-top: 4px;
  }

  body > header.is-nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    margin: 0;
    padding: 12px 8px;
    font-size: 15px;
    text-align: left;
    border-radius: 10px;
  }

  .site-nav a:hover {
    background: rgba(17, 17, 17, 0.08);
  }

  .actions {
    gap: 8px;
  }

  .logo-mark {
    height: 50px;
    width: 50px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .icon-btn svg {
    width: 20px;
    height: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    column-gap: 36px;
    row-gap: 40px;
    max-width: 100%;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .hero-copy {
    justify-self: center;
    width: 100%;
    max-width: 640px;
    padding-inline: var(--gutter);
    padding-right: var(--gutter);
    box-sizing: border-box;
  }

  .hero .desc {
    margin-left: auto;
    margin-right: auto;
    max-width: 30em;
    padding-inline: 0;
    text-wrap: pretty;
  }

  .hero .cta {
    justify-content: center;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 300px;
    margin-inline: auto;
    gap: 12px;
  }

  .hero .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-image {
    justify-self: center;
    width: min(340px, 72vw);
    max-width: 72vw;
    overflow: hidden;
  }

  section.hero {
    min-height: auto;
    padding: 28px 0 36px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .hero-name {
    font-size: clamp(40px, 9vw, 56px);
    padding-inline: 4px;
  }

  .hero-role {
    font-size: clamp(17px, 4.2vw, 22px);
    padding-inline: 4px;
  }

  /* Misma altura de imagen en todas las cards (evita Don Pascual más alto) */
  .work-container {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    gap: 16px;
  }

  .card-third .thumb {
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .card-third {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 0;
    height: auto;
  }

  .card-body {
    min-height: 122px;
    padding: 14px 16px 16px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-description {
    font-size: 14px;
  }

  .card-arrow {
    display: none;
  }

  form,
  #contact-form {
    grid-template-columns: 1fr;
    width: min(100%, 560px);
    margin-left: auto;
    margin-right: auto;
    padding-inline: 0;
    box-sizing: border-box;
  }

  .work-section,
  .process-section,
  .about-section,
  .project-actions-section,
  .golden-section {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    box-sizing: border-box;
  }

  .section-lead,
  .contact-intro,
  #contacto > p {
    padding-inline: 4px;
    box-sizing: border-box;
  }

  .about-intro {
    padding-inline: 4px;
  }

  .steps {
    max-width: 640px;
    gap: 14px;
    padding-inline: 0;
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 28px;
  }

  section {
    padding: 36px 0;
  }

  .hero .cta {
    max-width: 100%;
    gap: 12px;
  }

  .hero .btn {
    width: 100%;
    justify-content: center;
  }

  #trabajos h2,
  #proceso h2,
  #contacto h2 {
    font-size: 34px;
    margin-bottom: 20px;
  }

  .work-container {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card-third {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 0;
    height: auto;
    width: 100%;
  }

  .card-third .thumb {
    aspect-ratio: 16 / 9;
  }

  .card-body {
    min-height: 120px;
    padding: 14px 16px 16px;
  }

  .card-category {
    font-size: 11px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-description {
    font-size: 14px;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .step {
    min-height: 300px;
    height: 300px;
  }

  .step h3 {
    font-size: 24px;
  }

  .step-back h3,
  .step-back .step-back-title {
    font-size: 17px;
  }

  .step p {
    font-size: 16px;
  }
}

/* ============================================
   DETALLE DE TRABAJO
   ============================================ */
.project-back-bar {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 16px var(--gutter) 0;
  box-sizing: border-box;
}

.project-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink, #1C1C1C);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.project-back:hover {
  background: rgba(17, 17, 17, 0.06);
  border-color: var(--brand);
  color: var(--brand);
}

.project-back:active {
  transform: scale(0.96);
}

.project-back svg {
  display: block;
}

.work-detail-hero {
  max-width: min(1400px, 96vw);
  width: 100%;
  margin: 0 auto;
  padding: 32px var(--gutter) 8px;
  align-items: stretch;
}

.golden-section {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  align-self: stretch;
  box-sizing: border-box;
}

.golden-section.section-process {
  padding-top: 20px;
  padding-bottom: 12px;
}

.golden-section h2 {
  font-size: 44px;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  text-align: center;
}

/* ============================================
   PIE DE ENLACES (dentro de main)
   ============================================ */
.site-endnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 28px;
  width: 100%;
  margin: 0;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  background-color: var(--bg);
}

.site-endnav a {
  color: var(--fg);
  font-size: 16px;
  font-weight: 600;
}

.other-projects-home {
  text-align: center;
  margin: 12px 0 0;
  padding: 8px var(--gutter) 0;
}

.other-projects-home a {
  color: var(--fg);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}

/* ============================================
   PÁGINA SOBRE MÍ
   ============================================ */
.about-page {
  padding-top: calc(var(--header-h) + 80px);
}

.about-page h1 {
  font-size: 52px;
  letter-spacing: -0.02em;
  margin-bottom: 60px;
  text-align: center;
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
  width: 100%;
}

.about-page h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--brand);
  border-radius: 2px;
}

.about-intro {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.about-intro p {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 16px;
}

.about-intro p:last-child {
  margin-bottom: 0;
}

.availability-card {
  max-width: 640px;
  margin: 0 auto 56px;
  padding: 20px 24px;
  text-align: center;
  background: rgba(17, 17, 17, 0.08);
  border: 1px solid rgba(17, 17, 17, 0.22);
  border-radius: 16px;
}

.availability-eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.availability-text {
  margin: 0 auto 14px;
  max-width: 540px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg);
}

.availability-card .btn {
  display: inline-flex;
  padding: 10px 18px;
  font-size: 15px;
}

.tools-horizontal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
}

.tool-item-with-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.8;
  transition: opacity .2s ease;
}

.tool-item-with-label:hover {
  opacity: 1;
}

.tool-item-with-label img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.tool-item-with-label span {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

@media (max-width: 768px) {
  .tools-horizontal {
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .about-intro p {
    font-size: 20px;
  }
  
  .tools-horizontal {
    gap: 24px;
  }
  
  .tool-item-with-label svg {
    width: 40px;
    height: 40px;
  }
}

/* ============================================
   OTROS PROYECTOS
   ============================================ */
.other-projects-section {
  padding: 40px 0;
}

.other-projects-section.section-related {
  padding-top: 20px;
  padding-bottom: 40px;
}

.other-projects-section h2 {
  font-size: 44px;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
  width: 100%;
}

.other-projects-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--related-accent, var(--brand));
  border-radius: 2px;
}

.other-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.other-project-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--fg);
}

a.other-project-card:link,
a.other-project-card:visited,
a.other-project-card:hover,
a.other-project-card:active {
  color: var(--fg);
  text-decoration: none;
}

.other-project-card:hover {
  transform: translateY(-8px);
  border-color: var(--brand);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.other-project-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--line);
}

.other-project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease, filter .4s ease;
  filter: grayscale(0.8);
}

.other-project-card:hover .other-project-image img {
  transform: scale(1.1);
  filter: grayscale(0);
}

.other-project-content {
  padding: 32px;
}

.other-project-content h3 {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--fg);
}

@media (max-width: 920px) {
  .other-projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   MOTION (scroll + hero)
   ============================================ */
html.js-motion .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js-motion .reveal.is-in {
  opacity: 1;
  transform: none;
}

html.js-motion .work-container .card.reveal.is-in:hover {
  transform: translateY(-4px);
}

html.js-motion[data-hero-enter] .header-inner,
html.js-motion[data-hero-enter] .hero-name,
html.js-motion[data-hero-enter] .hero-role,
html.js-motion[data-hero-enter] .hero .desc,
html.js-motion[data-hero-enter] .hero .cta .btn,
html.js-motion[data-hero-enter] .hero-image {
  opacity: 0;
}

html.js-motion[data-hero-enter] .header-inner {
  transform: translate3d(0, 6px, 0);
}

html.js-motion[data-hero-enter] .hero-name {
  transform: translate3d(0, 24px, 0);
}

html.js-motion[data-hero-enter] .hero-role {
  transform: translate3d(0, 18px, 0);
}

html.js-motion[data-hero-enter] .hero .desc {
  transform: translate3d(0, 10px, 0);
}

html.js-motion[data-hero-enter] .hero .cta .btn {
  transform: translate3d(0, 12px, 0);
}

html.js-motion[data-hero-enter] .hero-image {
  -webkit-clip-path: none;
  clip-path: none;
}

html.js-motion[data-hero-enter] .portrait-reveal-wrapper {
  opacity: 0;
  transform: scale(0.94);
  -webkit-clip-path: circle(0% at 50% 50%);
  clip-path: circle(0% at 50% 50%);
}

html.js-motion[data-hero-enter].is-in .header-inner {
  animation: heroEnterRise 420ms cubic-bezier(0.215, 0.61, 0.355, 1) 50ms both;
}

html.js-motion[data-hero-enter].is-in .hero-name {
  animation: heroEnterRise 560ms cubic-bezier(0.215, 0.61, 0.355, 1) 0ms both;
}

html.js-motion[data-hero-enter].is-in .hero-role {
  animation: heroEnterRise 500ms cubic-bezier(0.215, 0.61, 0.355, 1) 130ms both;
}

html.js-motion[data-hero-enter].is-in .hero .desc {
  animation: heroEnterRise 480ms cubic-bezier(0.215, 0.61, 0.355, 1) 210ms both;
}

html.js-motion[data-hero-enter].is-in .hero-image {
  animation: heroEnterPortrait 700ms cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
}

html.js-motion[data-hero-enter].is-in .portrait-reveal-wrapper {
  animation: heroEnterPortraitInner 700ms cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
}

html.js-motion[data-hero-enter].is-in .hero .cta .btn:nth-child(1) {
  animation: heroEnterRise 400ms cubic-bezier(0.215, 0.61, 0.355, 1) 360ms both;
}

html.js-motion[data-hero-enter].is-in .hero .cta .btn:nth-child(2) {
  animation: heroEnterRise 400ms cubic-bezier(0.215, 0.61, 0.355, 1) 420ms both;
}

html.js-motion[data-hero-enter]:not(.hero-enter-done) .hero-image {
  will-change: opacity;
}

html.js-motion[data-hero-enter]:not(.hero-enter-done) .portrait-reveal-wrapper {
  will-change: transform, clip-path, opacity;
}

html.js-motion[data-hero-enter].hero-enter-done .header-inner,
html.js-motion[data-hero-enter].hero-enter-done .hero-name,
html.js-motion[data-hero-enter].hero-enter-done .hero-role,
html.js-motion[data-hero-enter].hero-enter-done .hero .desc,
html.js-motion[data-hero-enter].hero-enter-done .hero .cta .btn,
html.js-motion[data-hero-enter].hero-enter-done .hero-image,
html.js-motion[data-hero-enter].hero-enter-done .portrait-reveal-wrapper {
  opacity: 1;
  transform: none;
  animation: none;
  will-change: auto;
  -webkit-clip-path: none;
  clip-path: none;
}

html.js-motion[data-hero-enter].hero-enter-done .hero .cta .btn:hover,
html.js-motion[data-hero-enter].hero-enter-done .hero .cta .btn:focus-visible {
  transform: translateY(-2px);
}

@keyframes heroEnterRise {
  from {
    opacity: 0;
    transform: translate3d(0, var(--hero-enter-y, 24px), 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

html.js-motion[data-hero-enter] .header-inner { --hero-enter-y: 6px; }
html.js-motion[data-hero-enter] .hero-name { --hero-enter-y: 24px; }
html.js-motion[data-hero-enter] .hero-role { --hero-enter-y: 18px; }
html.js-motion[data-hero-enter] .hero .desc { --hero-enter-y: 10px; }
html.js-motion[data-hero-enter] .hero .cta .btn { --hero-enter-y: 12px; }

@keyframes heroEnterPortrait {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes heroEnterPortraitInner {
  from {
    opacity: 0;
    transform: scale(0.94);
    -webkit-clip-path: circle(0% at 50% 50%);
    clip-path: circle(0% at 50% 50%);
  }
  to {
    opacity: 1;
    transform: scale(1);
    -webkit-clip-path: circle(78% at 50% 50%);
    clip-path: circle(78% at 50% 50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js-motion .reveal,
  html.js-motion[data-hero-enter] .header-inner,
  html.js-motion[data-hero-enter] .hero-name,
  html.js-motion[data-hero-enter] .hero-role,
  html.js-motion[data-hero-enter] .hero .desc,
  html.js-motion[data-hero-enter] .hero .cta .btn,
  html.js-motion[data-hero-enter] .hero-image,
  html.js-motion[data-hero-enter] .portrait-reveal-wrapper {
    opacity: 1;
    transform: none;
    -webkit-clip-path: none;
    clip-path: none;
    animation: none !important;
    transition: none !important;
    will-change: auto;
  }
}
}

@layer lightbox {
/* Chrome compartido del lightbox de galería. Cada caso solo aporta backdrop/color/detalles. */
.noir-lightbox,
body[data-proyecto-id="7"] .wine-lightbox,
body[data-proyecto-id="8"] .ubicar-lightbox,
body[data-proyecto-id="2"] .mayo-lightbox {
  position: relative;
  width: auto;
  max-width: min(96vw, 1280px);
  max-height: 92vh;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.noir-lightbox[open],
body[data-proyecto-id="7"] .wine-lightbox[open],
body[data-proyecto-id="8"] .ubicar-lightbox[open],
body[data-proyecto-id="2"] .mayo-lightbox[open] {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  overscroll-behavior: contain;
}

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: min(96vw, 1280px);
  max-height: min(92vh, 100dvh);
  justify-self: center;
  align-self: center;
}

.noir-lightbox img,
body[data-proyecto-id="7"] .wine-lightbox img,
body[data-proyecto-id="8"] .ubicar-lightbox img,
body[data-proyecto-id="2"] .mayo-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 1200px);
  max-height: min(86vh, calc(100dvh - 32px));
  object-fit: contain;
  margin: 0;
  justify-self: center;
  align-self: center;
}

.noir-lightbox-close,
.noir-lightbox-prev,
.noir-lightbox-next,
body[data-proyecto-id="7"] .wine-lightbox-close,
body[data-proyecto-id="7"] .wine-lightbox-prev,
body[data-proyecto-id="7"] .wine-lightbox-next,
body[data-proyecto-id="8"] .ubicar-lightbox-close,
body[data-proyecto-id="8"] .ubicar-lightbox-prev,
body[data-proyecto-id="8"] .ubicar-lightbox-next,
body[data-proyecto-id="2"] .mayo-lightbox-close,
body[data-proyecto-id="2"] .mayo-lightbox-prev,
body[data-proyecto-id="2"] .mayo-lightbox-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  line-height: 0;
  font-weight: 400;
  color: #fff;
  cursor: pointer;
  z-index: 2;
  text-box: trim-both cap alphabetic;
}

.noir-lightbox-close,
body[data-proyecto-id="7"] .wine-lightbox-close,
body[data-proyecto-id="8"] .ubicar-lightbox-close,
body[data-proyecto-id="2"] .mayo-lightbox-close {
  top: -44px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.noir-lightbox-prev,
.noir-lightbox-next,
body[data-proyecto-id="7"] .wine-lightbox-prev,
body[data-proyecto-id="7"] .wine-lightbox-next,
body[data-proyecto-id="8"] .ubicar-lightbox-prev,
body[data-proyecto-id="8"] .ubicar-lightbox-next,
body[data-proyecto-id="2"] .mayo-lightbox-prev,
body[data-proyecto-id="2"] .mayo-lightbox-next {
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 32px;
  transform: translateY(-50%);
}

.noir-lightbox-prev,
body[data-proyecto-id="7"] .wine-lightbox-prev,
body[data-proyecto-id="8"] .ubicar-lightbox-prev,
body[data-proyecto-id="2"] .mayo-lightbox-prev {
  left: -56px;
}

.noir-lightbox-next,
body[data-proyecto-id="7"] .wine-lightbox-next,
body[data-proyecto-id="8"] .ubicar-lightbox-next,
body[data-proyecto-id="2"] .mayo-lightbox-next {
  right: -56px;
}

.lightbox-glyph {
  display: block;
  line-height: 1;
  font-size: inherit;
  font-weight: inherit;
}

.lightbox-glyph--prev {
  transform: translate(-0.06em, -0.08em);
}

.lightbox-glyph--next {
  transform: translate(0.06em, -0.08em);
}

.lightbox-glyph--close {
  transform: translateY(-0.07em);
}

@media (max-width: 900px) {
  .lightbox-stage {
    max-width: min(100vw, 100%);
    max-height: min(100dvh, 100%);
  }

  .noir-lightbox img,
  body[data-proyecto-id="7"] .wine-lightbox img,
  body[data-proyecto-id="8"] .ubicar-lightbox img,
  body[data-proyecto-id="2"] .mayo-lightbox img {
    max-width: min(94vw, calc(100vw - 16px));
    max-height: min(82dvh, calc(100dvh - 48px));
  }

  .noir-lightbox-prev,
  body[data-proyecto-id="7"] .wine-lightbox-prev,
  body[data-proyecto-id="8"] .ubicar-lightbox-prev,
  body[data-proyecto-id="2"] .mayo-lightbox-prev {
    left: 8px;
  }

  .noir-lightbox-next,
  body[data-proyecto-id="7"] .wine-lightbox-next,
  body[data-proyecto-id="8"] .ubicar-lightbox-next,
  body[data-proyecto-id="2"] .mayo-lightbox-next {
    right: 8px;
  }

  .noir-lightbox-close,
  body[data-proyecto-id="7"] .wine-lightbox-close,
  body[data-proyecto-id="8"] .ubicar-lightbox-close,
  body[data-proyecto-id="2"] .mayo-lightbox-close {
    top: 8px;
    right: 8px;
  }
}

}
