/* ---------- Base compartida por las propuestas ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
:root { --gutter: clamp(16px, 4vw, 56px); --max: 1360px; --header-h: 72px; --ease: cubic-bezier(.2,.7,.2,1); }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 var(--gutter);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), color .35s var(--ease);
}
.nav { display: flex; gap: 32px; }
.nav-toggle { display: none; }

.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: var(--lb-bg, rgba(250,250,249,.97)); display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 14px; }
.lightbox img { max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); object-fit: contain; }
.lightbox figcaption { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.lightbox button { position: absolute; background: none; border: 0; cursor: pointer; color: var(--ink); font-size: 28px; width: 64px; height: 64px; display: grid; place-items: center; }
.lightbox button:hover { opacity: .6; }
.lb-close { top: 8px; right: 8px; font-size: 40px !important; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.g-item { cursor: zoom-in; }

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .nav-toggle { display: grid; gap: 6px; place-content: center; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer; z-index: 2; }
  .nav-toggle span { display: block; width: 24px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
  .nav-open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav { position: fixed; inset: 0; background: var(--bg); color: var(--ink); flex-direction: column; justify-content: center; align-items: center; gap: 28px; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
  .nav a { font-size: 24px; }
  .nav-open .nav { opacity: 1; pointer-events: auto; }
  .nav-open .site-header { color: var(--ink); }
  .brand { position: relative; z-index: 2; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); }
  .lb-prev, .lb-next { top: auto !important; bottom: 12px; transform: none !important; }
  .lb-prev { left: calc(50% - 72px); }
  .lb-next { right: calc(50% - 72px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   Propuesta B · Oscuro — galería negra, grotesca, lista interactiva
   ========================================================== */
:root {
  --bg: #0f0f10;
  --bg-2: #18181a;
  --ink: #ecebe7;
  --muted: #8b8a86;
  --line: #2a2a2c;
  --accent: #e4573d;
  --head: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --lb-bg: rgba(10,10,11,.97);
}
::selection { background: var(--accent); color: #fff; }
body { font-family: var(--sans); font-weight: 300; font-size: 17px; line-height: 1.7; }
h1, h2, h3 { font-family: var(--head); font-weight: 500; letter-spacing: -0.035em; line-height: .95; }
.eyebrow { font-family: var(--head); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.site-header { color: #fff; mix-blend-mode: normal; }
.site-header.is-solid { background: rgba(15,15,16,.86); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.brand { font-family: var(--head); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.brand::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: 2px; }
.nav a { font-family: var(--head); font-size: 15px; opacity: .8; transition: opacity .2s; }
.nav a:hover { opacity: 1; }

.btn { display: inline-flex; gap: 10px; align-items: center; font-family: var(--head); font-weight: 500; font-size: 15px; padding: 14px 24px; border-radius: 999px; background: var(--ink); color: var(--bg); transition: background .3s, color .3s; }
.btn:hover { background: var(--accent); color: #fff; }
.btn i { font-style: normal; }

/* Hero */
@keyframes hz { from { transform: scale(1.08); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* ---------- Portada: 3 variantes ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: var(--bg); }
.hero-media { position: relative; overflow: hidden; }
.hero-img { display: block; width: 100%; height: 100%; object-fit: cover; animation: hz 2.2s var(--ease) both; }
.hero-content { position: relative; text-align: center; }
.hero-content > * { animation: up 1.1s var(--ease) both; }
.hero-content > :nth-child(2) { animation-delay: .12s; }
.hero-content > :nth-child(3) { animation-delay: .24s; }
.hero-content > :nth-child(4) { animation-delay: .36s; }
.hero .eyebrow { color: rgba(255,255,255,.72); margin-bottom: 14px; }
.hero h1 span:last-child { color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.92); }
.tagline { font-size: 19px; line-height: 1.45; margin: 18px auto 28px; max-width: 30ch; }

/* 1 · Centrado: todo en el hueco entre las dos sillas */
.hero--1 { height: 100vh; height: 100svh; min-height: 620px; }
.hero--1 .hero-media { position: absolute; inset: 0; }
.hero--1 .hero-img { filter: brightness(.62) contrast(1.06); }
.hero--1 .hero-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 22% 36% at 50% 44%, rgba(15,15,16,.5), rgba(15,15,16,0) 100%),
              linear-gradient(180deg, rgba(15,15,16,.45) 0%, rgba(15,15,16,0) 22%, rgba(15,15,16,0) 78%, rgba(15,15,16,.9) 100%); }
.hero--1 .hero-content { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: min(32vw, 440px); }
.hero--1 h1 { font-size: clamp(44px, 4.8vw, 80px); line-height: .95; display: grid; }
.hero--1 .tagline { font-size: 17px; max-width: 24ch; }

/* 2 · Debajo: la foto enmarcada arriba, el nombre grande abajo */
.hero--2 { padding: calc(var(--header-h) + 8px) var(--gutter) clamp(40px, 6vw, 72px); }
.hero--2 .hero-media { width: min(100%, calc(50vh * 16 / 9)); aspect-ratio: 16 / 9; margin: 0 auto; border-radius: 6px; }
.hero--2 .hero-img { filter: brightness(.92); }
.hero--2 .hero-shade { display: none; }
.hero--2 .hero-content { margin-top: clamp(24px, 3.4vw, 44px); }
.hero--2 .eyebrow { display: none; }
.hero--2 h1 { font-size: clamp(48px, min(9.6vw, 14vh), 160px); line-height: .95; white-space: nowrap; }
.hero--2 .tagline { margin: 18px auto 0; max-width: none; color: #cfcec9; }
.hero--2 .tagline::before { content: "Diseñador Industrial — "; color: var(--muted); }
.hero--2 .btn { margin-top: 26px; }

/* 3 · Galería: texto arriba, las sillas abajo como en una muestra */
.hero--3 { padding: calc(var(--header-h) + clamp(28px, 5vh, 56px)) var(--gutter) 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.hero--3 .hero-content { order: 1; }
.hero--3 .hero-media { order: 2; width: min(100%, calc(54vh * 16 / 9)); aspect-ratio: 16 / 9; margin: auto auto 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(180deg, transparent, #000 12%, #000 82%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent), linear-gradient(180deg, transparent, #000 12%, #000 82%, transparent); mask-composite: intersect; }
.hero--3 .hero-img { filter: brightness(.9) contrast(1.04); }
.hero--3 .hero-shade { display: none; }
.hero--3 h1 { font-size: clamp(44px, min(7vw, 11vh), 116px); line-height: .95; white-space: nowrap; }
.hero--3 .tagline { margin: 16px auto 24px; max-width: 44ch; }

.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 22px 0; }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: mq 50s linear infinite; font-family: var(--head); font-size: clamp(22px, 2.6vw, 36px); letter-spacing: -0.02em; white-space: nowrap; }
.marquee .dot { color: var(--accent); }
@keyframes mq { to { transform: translateX(-50%); } }

/* Proyectos: lista / grilla */
.projects { padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(80px, 10vw, 140px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: clamp(32px, 4vw, 56px); flex-wrap: wrap; }
.section-head h2 { font-size: clamp(48px, 8vw, 128px); }
.section-head sup { font-size: .25em; color: var(--accent); vertical-align: top; letter-spacing: 0; margin-left: 6px; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.view-toggle button { background: none; border: 0; padding: 8px 18px; border-radius: 999px; font-family: var(--head); font-size: 14px; cursor: pointer; color: var(--muted); transition: background .25s, color .25s; }
.view-toggle button.is-active { background: var(--ink); color: var(--bg); }

.items[data-view="list"] { border-top: 1px solid var(--line); }
.items[data-view="list"] .item { display: grid; grid-template-columns: 64px 1fr auto 40px; align-items: center; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); transition: padding .4s var(--ease), color .3s; }
.items[data-view="list"] .item-media { display: none; }
.items[data-view="list"] .item h3 { font-size: clamp(28px, 4vw, 60px); transition: transform .5s var(--ease); }
.items[data-view="list"] .item:hover h3 { transform: translateX(14px); }
.items[data-view="list"] .item:hover { color: #fff; }
.item-num { font-family: var(--head); font-size: 14px; color: var(--muted); }
.item-cat { font-size: 14px; color: var(--muted); text-align: right; }
.item-arrow { font-size: 22px; text-align: right; color: var(--muted); transition: color .3s, transform .4s var(--ease); }
.item:hover .item-arrow { color: var(--accent); transform: rotate(45deg); }
.items[data-view="list"]:hover .item:not(:hover) { color: #5d5c59; }

.items[data-view="grid"] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 20px; }
.items[data-view="grid"] .item { display: grid; grid-template-columns: auto 1fr auto; column-gap: 12px; align-items: baseline; }
.items[data-view="grid"] .item-media { grid-column: 1 / -1; aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 16px; background: var(--bg-2); border-radius: 4px; }
.items[data-view="grid"] .item-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.items[data-view="grid"] .item:hover .item-media img { transform: scale(1.05); }
.items[data-view="grid"] h3 { font-size: 22px; letter-spacing: -0.02em; }
.items[data-view="grid"] .item-cat { grid-column: 2 / 4; grid-row: 3; text-align: left; font-size: 14px; }
.items[data-view="grid"] .item-num { grid-row: 2; }

.cursor-preview { position: fixed; left: 0; top: 0; width: 320px; aspect-ratio: 4 / 5; pointer-events: none; z-index: 40; opacity: 0; transition: opacity .25s; overflow: hidden; border-radius: 4px; }
.cursor-preview.is-on { opacity: 1; }
.cursor-preview img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); transition: transform .5s var(--ease); }
.cursor-preview.is-on img { transform: scale(1); }

/* Sobre mí */
.about { padding-top: clamp(64px, 8vw, 120px); padding-bottom: clamp(80px, 10vw, 140px); border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 96px); margin-top: 28px; }
.about-big { font-family: var(--head); font-size: clamp(30px, 3.8vw, 56px); line-height: 1.1; letter-spacing: -0.03em; }
.about-text p { color: #bdbcb7; margin-bottom: 1em; }
.skills { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skills li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: #cfcec9; }

/* Contacto */
.contact { padding-top: clamp(64px, 8vw, 120px); padding-bottom: clamp(80px, 10vw, 140px); border-top: 1px solid var(--line); }
.contact-mail { display: inline-block; margin-top: 24px; font-family: var(--head); font-weight: 500; font-size: clamp(30px, 6.4vw, 104px); letter-spacing: -0.04em; line-height: 1; word-break: break-word; transition: color .3s; }
.contact-mail i { font-style: normal; color: var(--accent); display: inline-block; transition: transform .4s var(--ease); }
.contact-mail:hover { color: var(--accent); }
.contact-mail:hover i { transform: translate(6px, -6px); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }
.contact-link { display: inline-flex; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px; font-family: var(--head); font-size: 15px; transition: border-color .3s, color .3s; }
.contact-link:hover { border-color: var(--accent); color: var(--accent); }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 24px; }
.footer-links a:hover { color: var(--ink); }

/* Página de proyecto */
.p-hero { position: relative; height: 92vh; height: 92svh; min-height: 480px; overflow: hidden; display: flex; align-items: flex-end; }
.p-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.72); animation: hz 1.8s var(--ease) both; }
.p-hero-text { position: relative; color: #fff; padding-bottom: clamp(32px, 5vw, 64px); max-width: none; }
.back { font-family: var(--head); font-size: 14px; opacity: .8; }
.back:hover { opacity: 1; }
.p-hero h1 { font-size: clamp(52px, 11vw, 184px); margin-top: 16px; animation: up 1.2s .2s var(--ease) both; }
.p-intro { display: grid; grid-template-columns: 1fr 2fr; gap: 32px clamp(32px, 6vw, 96px); padding-top: clamp(56px, 7vw, 104px); padding-bottom: clamp(40px, 5vw, 72px); }
.p-facts { margin: 0; display: grid; gap: 0; align-content: start; border-top: 1px solid var(--line); }
.p-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.p-facts dt { color: var(--muted); }
.p-facts dd { margin: 0; text-align: right; }
.p-lead p { font-family: var(--head); font-size: clamp(22px, 2.3vw, 34px); line-height: 1.3; letter-spacing: -0.02em; margin-bottom: .7em; }
.p-sec { padding: clamp(40px, 6vw, 88px) 0; }
.p-sec-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 20px clamp(32px, 6vw, 96px); border-top: 1px solid var(--line); padding-top: 28px; }
.p-sec h2 { font-size: clamp(26px, 2.6vw, 38px); display: flex; gap: 14px; align-items: baseline; }
.p-sec h2 span { font-size: 14px; color: var(--accent); letter-spacing: 0; }
.p-text p { color: #c4c3be; max-width: 62ch; margin-bottom: 1em; }
.p-gal { margin-top: clamp(32px, 4vw, 56px); }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.trio .g-item { overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.trio img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.trio .g-item:hover img { transform: scale(1.04); }
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); scrollbar-width: none; cursor: grab; }
.rail::-webkit-scrollbar { display: none; }
.rail.is-drag { cursor: grabbing; scroll-snap-type: none; }
.rail .g-item { flex: 0 0 auto; height: clamp(260px, 38vw, 520px); scroll-snap-align: start; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.rail img { height: 100%; width: auto; max-width: none; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.rail-ctrl { max-width: var(--max); margin: 18px auto 0; padding: 0 var(--gutter); display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.rail-ctrl button { background: none; border: 1px solid var(--line); border-radius: 50%; width: 44px; height: 44px; margin-left: 8px; cursor: pointer; transition: border-color .3s, color .3s; }
.rail-ctrl button:hover { border-color: var(--accent); color: var(--accent); }
.p-sec--conclusion .p-text p { font-family: var(--head); color: var(--ink); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.35; letter-spacing: -0.02em; }

.p-next { position: relative; display: block; height: clamp(320px, 50vw, 620px); overflow: hidden; margin-top: clamp(40px, 6vw, 80px); color: #fff; }
.p-next-media, .p-next-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-next-media img { transition: transform 1.2s var(--ease); filter: brightness(.55); }
.p-next:hover .p-next-media img { transform: scale(1.05); }
.p-next-text { position: absolute; left: 0; right: 0; bottom: clamp(24px, 4vw, 56px); max-width: none; }
.p-next-text span { display: block; font-family: var(--head); font-size: 14px; opacity: .8; margin-bottom: 8px; }
.p-next-text strong { font-family: var(--head); font-weight: 500; font-size: clamp(40px, 8vw, 128px); letter-spacing: -0.04em; line-height: .95; }
.p-next-text i { font-style: normal; color: var(--accent); }

@media (max-width: 900px) {
  .about-grid, .p-intro, .p-sec-grid { grid-template-columns: 1fr; }
  .items[data-view="grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .nav a { font-family: var(--head); font-size: 36px; letter-spacing: -0.03em; opacity: 1; }
  .items[data-view="list"] .item { grid-template-columns: 72px 1fr 24px; grid-template-rows: auto auto; gap: 2px 16px; padding: 16px 0; }
  .items[data-view="list"] .item-media { display: block; grid-row: span 2; aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
  .items[data-view="list"] .item-media img { width: 100%; height: 100%; object-fit: cover; }
  .items[data-view="list"] .item-num { display: none; }
  .items[data-view="list"] .item h3 { font-size: 24px; align-self: end; }
  .items[data-view="list"] .item-cat { grid-column: 2; grid-row: 2; text-align: left; font-size: 13px; align-self: start; }
  .items[data-view="list"] .item-arrow { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .items[data-view="list"]:hover .item:not(:hover) { color: inherit; }
  .items[data-view="grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 10px; }
  .items[data-view="grid"] .item { grid-template-columns: minmax(0, 1fr); }
  .items[data-view="grid"] .item-cat { grid-column: 1; grid-row: auto; font-size: 13px; line-height: 1.35; margin-top: 4px; }
  .items[data-view="grid"] h3 { font-size: 17px; }
  .items[data-view="grid"] .item-num { display: none; }
  .items[data-view="grid"] .item-arrow { display: none; }
  .p-hero { height: 78svh; }
  .contact-mail { font-size: 6.4vw; word-break: normal; white-space: nowrap; }
  .hero--1 { height: auto; min-height: 0; display: flex; flex-direction: column; padding-top: var(--header-h); }
  .hero--1 .hero-media { position: relative; inset: auto; aspect-ratio: 16 / 9; }
  .hero--1 .hero-shade { display: none; }
  .hero--1 .hero-content { position: relative; left: auto; top: auto; transform: none; width: auto; padding: 32px var(--gutter) 48px; }
  .hero--1 h1 { font-size: 15vw; }
  .hero--2 { padding-left: 0; padding-right: 0; }
  .hero--2 .hero-media { border-radius: 0; }
  .hero--2 h1, .hero--3 h1 { font-size: 11.6vw; }
  .hero--2 .tagline { padding: 0 var(--gutter); }
  .hero--2 .tagline::before { display: block; content: "Diseñador Industrial"; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
  .hero--3 { min-height: 0; padding-left: 0; padding-right: 0; }
  .hero--3 .hero-content { padding: 0 var(--gutter); }
  .hero--3 .hero-media { margin-top: 12px; }
  .rail .g-item { height: 62vw; }
}

/* Fotos con fondo de estudio: se muestran enteras, centradas sobre su mismo color de fondo */
.item-media img.is-studio { object-fit: contain; background: var(--bg); padding: 7%; }
.cursor-preview img.is-studio { object-fit: contain; }
