:root {
  --bg: #ffffff;
  --surface: #f9f9f9;
  --surface-2: #f3f3f4;
  --ink: #1a1c1c;
  --ink-2: #444748;
  --muted: #747878;
  --line: #e2e2e2;
  --primary: #000000;
  --serif: "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(1.25rem, 4vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--primary); color: #fff; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.section.alt { background: var(--surface-2); }

.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.5;
}

h1, h2, h3, .h1, .h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}
/* "Inmanencia" is ~5em wide in Bodoni Moda: sizes keep it on one line inside its column. */
.display { font-family: var(--serif); font-weight: 400; font-size: min(8.2vw, 8rem); line-height: 1; letter-spacing: -0.03em; white-space: nowrap; margin: 0; }
.h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }

/* ---------- header ---------- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex; align-items: center; gap: 2rem;
  height: 72px; padding: 0 var(--pad);
  max-width: 1440px; margin: 0 auto;
}
.brand { font-family: var(--sans); font-weight: 500; letter-spacing: 0.32em; font-size: 14px; text-transform: uppercase; margin: 0; }
.nav { display: flex; gap: 2.25rem; margin-left: auto; }
.nav a {
  font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-2); padding: 0.4rem 0; border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--primary); border-color: var(--primary); }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 0; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 9px; right: 9px; height: 1px; background: var(--ink); transition: transform .25s, top .25s; }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 24px; }
#site-header.open .burger span:first-child { top: 20px; transform: rotate(45deg); }
#site-header.open .burger span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem;
  background: var(--primary); color: #fff; border: 1px solid var(--primary);
  padding: 1rem 2rem; font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: #fff; color: var(--primary); }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 0.7rem 1.3rem; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ---------- hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.hero-text { display: flex; flex-direction: column; gap: 1.75rem; }
.hero-text p { max-width: 38ch; color: var(--ink-2); margin: 0; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-img { margin: 0; background: var(--surface-2); }
.hero-img img { width: 100%; }

/* ---------- section head ---------- */
.head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); flex-wrap: wrap; }
.head p { margin: 0.75rem 0 0; max-width: 52ch; color: var(--ink-2); }
.link-arrow { border-bottom: 1px solid var(--primary); padding-bottom: 2px; }
.link-arrow:hover { opacity: 0.6; }

/* ---------- grid ---------- */
/* Uniform passe-partout frames: every work sits in the same 4:5 mat, shown whole (no cropping). */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2.5rem, 4vw, 4rem) clamp(1rem, 2.5vw, 2.5rem); }
.card { display: block; }
.card-frame {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 5; padding: 12%;
  background: var(--surface-2);
  overflow: hidden;
}
.card-frame img {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 24px -12px rgba(0, 0, 0, 0.25);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.card:hover .card-frame img { transform: scale(1.03); }
.card-info { display: flex; flex-direction: column; gap: 0.1rem; padding-top: 1rem; }
.card-title { font-family: var(--serif); font-size: 1.3rem; line-height: 1.25; }

/* ---------- quote ---------- */
.quote { font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 3.2rem); line-height: 1.25; margin: 0; }
.quote-by { margin-top: 2rem; }

/* ---------- detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 6rem); padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(3rem, 7vw, 6rem); align-items: start; }
.detail-img { margin: 0; background: var(--surface-2); position: sticky; top: 96px; }
.detail-img img { width: 100%; max-height: calc(100vh - 130px); object-fit: contain; margin: 0 auto; }
.detail-info { display: flex; flex-direction: column; gap: 1.5rem; padding-top: 1rem; }
.detail-info p { margin: 0; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 0.5rem 0; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs dd { margin: 0.2rem 0 0; font-family: var(--serif); font-size: 1.6rem; }
.note { margin-top: -0.5rem !important; }
.coa { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.25rem; background: var(--surface-2); }
.coa-icon { flex: none; margin-top: 0.2rem; }
.coa p { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.coa strong { font-weight: 500; color: var(--ink); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 0.2rem; }
.pager a:hover span:last-child { text-decoration: underline; }
.pager .right { text-align: right; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about-grid figure { margin: 0; }
.about-grid figcaption { margin-top: 0.8rem; }
.prose p { margin: 0 0 1.4rem; color: var(--ink-2); }
.prose p.lead { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.4; color: var(--ink); }
.social { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- footer ---------- */
#site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2.5rem; background: var(--surface); }
.foot { display: grid; gap: 2rem; }
.foot p { margin: 0.4rem 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; font-size: 14px; }
.foot-links a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .display { font-size: 17vw; }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .detail-grid, .about-grid { grid-template-columns: 1fr; }
  .detail-img { position: static; }
  .detail-img img { max-height: none; }
}
@media (max-width: 760px) {
  .burger { display: block; margin-left: auto; }
  .nav-cta { display: none; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0; margin: 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 0.5rem var(--pad) 1rem;
    display: none;
  }
  #site-header.open .nav { display: flex; }
  .nav a { padding: 1rem 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .works-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- motion (GSAP) ---------- */
/* Hide animated elements until motion.js sets their initial state; the class is removed after 3s as a fallback. */
.motion .hero-text,
.motion .hero-img,
.motion .detail-img,
.motion .detail-info,
.motion .works-grid,
.motion [data-reveal] { visibility: hidden; }
.hero-img { display: block; overflow: hidden; }
.detail-img { overflow: hidden; }
