/* CAUDAL — grifería de autor · hand-built, no frameworks */
:root {
  --ink: #141311;
  --stone: #201e1a;
  --bone: #ece7dc;
  --bone-dim: #cfc8b8;
  --brass: #b08d44;
  --brass-hi: #d8b56a;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --pad: clamp(20px, 4vw, 64px);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--brass-hi); }

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  color: var(--brass); margin-bottom: 1.2em;
}

/* ---------- veil ---------- */
#veil {
  position: fixed; inset: 0; z-index: 60; background: var(--ink);
  display: grid; place-items: center;
  transition: opacity 0.9s ease 0.3s, visibility 0.9s ease 0.3s;
}
#veil.is-gone { opacity: 0; visibility: hidden; }
.veil-mark {
  font-family: var(--serif); font-weight: 300; letter-spacing: 0.35em;
  font-size: clamp(18px, 2.4vw, 28px); color: var(--bone-dim);
  animation: veilpulse 1.6s ease infinite alternate;
}
@keyframes veilpulse { from { opacity: 0.35; } to { opacity: 1; } }

/* ---------- header ---------- */
.top {
  position: fixed; z-index: 50; inset: 0 0 auto 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--pad);
  mix-blend-mode: difference;
}
.brand { font-family: var(--serif); font-weight: 550; font-size: 20px; letter-spacing: 0.08em; }
.brand-dot { color: var(--brass-hi); }
.nav { display: flex; gap: 28px; font-size: 13px; letter-spacing: 0.06em; }
.nav a { opacity: 0.75; transition: opacity 0.25s; }
.nav a:hover { opacity: 1; }
.nav-cta { border-bottom: 1px solid var(--brass); padding-bottom: 2px; opacity: 1 !important; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; overflow: hidden; }
.hero-video, .hero > picture img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(75deg, rgba(20,19,17,0.82) 0%, rgba(20,19,17,0.25) 55%, rgba(20,19,17,0.55) 100%);
}
.hero-copy {
  position: absolute; left: var(--pad); bottom: 18vh; max-width: 620px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 300; line-height: 0.98;
  font-size: clamp(56px, 9.5vw, 150px); letter-spacing: -0.01em;
  margin-bottom: 0.35em;
}
.hero-sub { max-width: 420px; color: var(--bone-dim); font-size: 15px; }
.hero-meta {
  position: absolute; right: var(--pad); bottom: 26px;
  display: flex; gap: 26px; color: var(--bone-dim); opacity: 0.8;
}
.cue {
  position: absolute; left: var(--pad); bottom: 26px;
  display: flex; align-items: center; gap: 10px; color: var(--bone-dim);
}
.cue i {
  width: 1px; height: 34px; background: var(--brass);
  display: inline-block; transform-origin: top;
  animation: cuedrop 1.8s ease-in-out infinite;
}
@keyframes cuedrop { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(0); opacity: 0; } }

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }
.line-reveal { display: block; overflow: hidden; }
.line-reveal > i, .line-reveal.is-plain { font-style: normal; }
.line-reveal .lr-inner {
  display: block; transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.2, 0.7, 0.15, 1);
}
.line-reveal.is-in .lr-inner { transform: none; }

/* ---------- manifesto ---------- */
.manifesto {
  background: var(--bone); color: var(--ink);
  padding: 22vh var(--pad);
}
.manifesto-label { color: #8a7d5a; margin-bottom: 5vh; }
.manifesto h2 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(34px, 5.6vw, 92px); line-height: 1.06; letter-spacing: -0.01em;
  max-width: 18ch;
}
.manifesto-foot { margin-top: 7vh; max-width: 420px; color: #5c564a; font-size: 15px; }
.manifesto-foot .mono { display: block; margin-top: 1em; color: #8a7d5a; }

/* ---------- la pieza (sticky finish swap) ---------- */
.pieza { background: var(--stone); }
.pieza-track { height: 340svh; }
.pieza-sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
  gap: clamp(24px, 4vw, 80px); padding: 0 var(--pad);
}
.pieza-figure { position: relative; height: 78svh; }
.finish {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0; transition: opacity 0.6s ease;
  border-radius: 2px;
}
.finish.is-on { opacity: 1; }
.pieza-cap {
  position: absolute; right: 14px; bottom: 12px; color: var(--bone-dim);
  background: rgba(20,19,17,0.55); padding: 4px 10px; border-radius: 2px;
}
.finish-names { position: relative; height: clamp(120px, 16vw, 230px); margin-bottom: 24px; }
.finish-name {
  position: absolute; inset: 0;
  font-family: var(--serif); font-weight: 300; line-height: 0.98;
  font-size: clamp(44px, 5.8vw, 104px);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.finish-name.is-on { opacity: 1; transform: none; }
.finish-desc {
  display: none; max-width: 400px; color: var(--bone-dim); font-size: 15px; min-height: 5.5em;
}
.finish-desc.is-on { display: block; }
.pieza-hint { margin-top: 30px; color: var(--brass); opacity: 0.8; }

/* ---------- scrub ---------- */
.scrub { background: #000; }
.scrub-track { height: 300svh; }
.scrub-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.scrub-video, .scrub-sticky > picture img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.scrub-overlay {
  position: absolute; left: var(--pad); bottom: 14vh; z-index: 2;
  text-shadow: 0 2px 30px rgba(0,0,0,0.5);
}
.scrub-head {
  font-family: var(--serif); font-weight: 300; line-height: 1.0;
  font-size: clamp(44px, 7vw, 120px);
}
.scrub-meta { margin-top: 2em; color: var(--bone-dim); }

/* ---------- detalles ---------- */
.detalles { padding: 18vh var(--pad); background: var(--ink); }
.det-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.4vw, 40px); margin-top: 6vh;
}
.det-card { overflow: hidden; }
.det-card img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.det-card:hover img { transform: scale(1.045); }
.det-card figcaption { margin-top: 14px; font-size: 14px; color: var(--bone-dim); max-width: 34ch; }
.det-card .mono { color: var(--brass); margin-right: 10px; }
.det-card.reveal { transition-delay: var(--d, 0s); }

/* ---------- espacio ---------- */
.espacio { position: relative; height: 120svh; overflow: hidden; background: var(--bone); }
.espacio-img { position: absolute; inset: -12% 0; will-change: transform; }
.espacio-img img { width: 100%; height: 100%; object-fit: cover; }
.espacio-copy {
  position: absolute; left: var(--pad); bottom: 12vh; color: #fff;
  text-shadow: 0 2px 34px rgba(0,0,0,0.45);
}
.espacio-copy h2 {
  font-family: var(--serif); font-weight: 300; line-height: 1.02;
  font-size: clamp(40px, 6vw, 104px);
}

/* ---------- cierre ---------- */
.cierre {
  background: var(--ink);
  padding: 24vh var(--pad) 0;
  display: flex; flex-direction: column; min-height: 100svh;
}
.cierre-inner { max-width: 860px; }
.cierre h2 {
  font-family: var(--serif); font-weight: 300; line-height: 1.05;
  font-size: clamp(38px, 5.6vw, 96px);
}
.cierre-sub { margin: 4vh 0 6vh; color: var(--bone-dim); max-width: 460px; }
.lista label { display: block; color: var(--brass); margin-bottom: 14px; }
.lista-row { display: flex; gap: 0; max-width: 520px; border-bottom: 1px solid rgba(236,231,220,0.35); }
.lista input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--bone); font: 16px var(--sans); padding: 14px 0;
}
.lista input::placeholder { color: rgba(236,231,220,0.35); }
.lista button {
  background: none; border: none; color: var(--brass-hi);
  font: 500 15px var(--sans); letter-spacing: 0.04em; cursor: pointer; padding: 0 6px;
  transition: transform 0.3s ease;
}
.lista button:hover { transform: translateX(4px); }
.foot {
  margin-top: auto; padding: 60px 0 30px;
  display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between;
  color: rgba(236,231,220,0.55); border-top: 1px solid rgba(236,231,220,0.12);
}
.foot a { color: var(--brass); }
.foot-disc { max-width: 480px; text-align: right; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .pieza-sticky { grid-template-columns: 1fr; align-content: center; gap: 20px; }
  .pieza-figure { height: 48svh; }
  .pieza-track { height: 300svh; }
  .det-grid { grid-template-columns: 1fr; }
  .det-card img { aspect-ratio: 4 / 3; }
  .hero-meta { display: none; }
  .foot-disc { text-align: left; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .line-reveal .lr-inner, .finish, .finish-name { transition: none !important; }
  .reveal, .line-reveal .lr-inner { opacity: 1 !important; transform: none !important; }
  .cue i, .veil-mark { animation: none; }
}
