/* ════════════════════════════════════════════════════════
   VELUM — Sistema de diseño premium
   Display: Cormorant Garamond · Texto: Jost
   ════════════════════════════════════════════════════════ */

:root {
  /* Paleta definitiva */
  --graphite: #1C2E2E;   /* fondo oscuro, máximo contraste */
  --charcoal: #2A3F3F;   /* color principal */
  --slate:    #4A5F6F;   /* textos / elementos secundarios */
  --stone:    #8B7355;   /* acento cálido */
  --pewter:   #6E7E85;   /* acento metálico mate */
  --iron:     #2E3338;   /* fondo neutro oscuro */
  --cream:    #E8E4DE;
  --white:    #FFFFFF;

  /* Acento conmutable vía Tweaks */
  --accent:        #8B7355;
  --accent-hover:  color-mix(in srgb, var(--accent), #fff 16%);

  --fd: 'Cormorant Garamond', Georgia, serif;
  --fb: 'Jost', system-ui, sans-serif;

  --nav: 78px;
  --pad: clamp(24px, 5vw, 72px);
  --ease: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --line: rgba(139, 115, 85, 0.20);
  --line-cool: rgba(110, 126, 133, 0.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--graphite);
  color: var(--cream);
  font-family: var(--fb);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--graphite); }

/* ─────────────── NAV ─────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  z-index: 1000;
  background: color-mix(in srgb, var(--graphite) 55%, transparent);
  border-bottom: 0.5px solid transparent;
  backdrop-filter: blur(0px);
  transition: background var(--ease), border-color var(--ease),
              backdrop-filter var(--ease), height var(--ease);
}
nav.scrolled {
  height: 64px;
  background: color-mix(in srgb, var(--graphite) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 0.5px solid var(--line);
}
.nav-logo {
  display: flex; align-items: center; gap: 15px;
  cursor: pointer; text-decoration: none; border: none; background: none;
}
.nav-logo svg { display: block; overflow: visible; }
.nav-logo .lm { fill: var(--accent); transition: fill var(--ease); }
.nav-wordmark {
  font-family: var(--fd);
  font-size: 23px; font-weight: 300;
  letter-spacing: 0.30em; color: var(--white);
  padding-left: 2px;
}
/* logo intercambiable (Estilo) */
.brand-default { display: flex; align-items: center; gap: 15px; }
.brand-default[hidden] { display: none; }
.brand-img { height: 34px; width: auto; display: block; transition: height var(--ease); }
.brand-img[hidden] { display: none; }
nav.scrolled .brand-img { height: 30px; }
.foot-brand-img { height: 30px; }
.nav-links { display: flex; gap: 42px; list-style: none; }
.nav-links a {
  font-family: var(--fb);
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--pewter);
  text-decoration: none; cursor: pointer;
  position: relative; padding-bottom: 5px;
  transition: color var(--ease);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ─────────────── PAGES ─────────────── */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ─────────────── REVEAL / MOTION ─────────────── */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
[data-motion="off"] .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ─────────────── BUTTONS ─────────────── */
.btn-p, .btn-s {
  font-family: var(--fb); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 15px 36px; cursor: pointer; position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  border: none; overflow: hidden;
}
.btn-p { color: var(--graphite); background: var(--accent); transition: background var(--ease), transform var(--ease); }
.btn-p:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-s {
  color: var(--cream); background: transparent;
  border: 0.5px solid rgba(110,126,133,0.5);
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.btn-s:hover { color: var(--white); border-color: var(--white); background: rgba(255,255,255,0.03); }
.btn-arrow { transition: transform var(--ease); }
.btn-p:hover .btn-arrow, .btn-s:hover .btn-arrow { transform: translateX(4px); }

/* ─────────────── HERO (común) ─────────────── */
.hero { display: none; }
[data-hero="a"] .hero-a,
[data-hero="b"] .hero-b,
[data-hero="c"] .hero-c { display: flex; }

.hero-tag {
  font-size: 10px; font-weight: 500; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--accent);
}
.hero-title {
  font-family: var(--fd); font-weight: 300; color: var(--white);
  line-height: 0.92; letter-spacing: 0.16em;
}
.hero-rule { height: 1.5px; background: var(--accent); }
.hero-sub {
  font-family: var(--fd); font-weight: 300; font-style: italic;
  color: var(--pewter); line-height: 1.3;
}
.hero-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* slot helper */
.slot-fill { position: absolute; inset: 0; width: 100%; height: 100%; }

/* image-slot — placeholder visible sobre fondo oscuro */
image-slot::part(frame) {
  background: rgba(110, 126, 133, 0.07) !important;
  box-shadow: inset 0 0 0 1px rgba(110, 126, 133, 0.18) !important;
}
image-slot::part(empty) {
  color: var(--pewter) !important;
  font-family: var(--fb) !important;
}

/* HERO A — full-bleed editorial */
.hero-a {
  flex-direction: column; justify-content: flex-end;
  min-height: 100vh; padding: 0 var(--pad) clamp(56px, 9vh, 110px);
  position: relative; overflow: hidden;
}
.hero-a .hero-photo { position: absolute; inset: 0; z-index: 0; }
.hero-a .hero-photo image-slot { width: 100%; height: 120%; top: -10%; position: absolute; }

/* slideshow crossfade */
.hero-slideshow .hero-slide { opacity: 0; z-index: 0; transition: opacity 1.6s var(--ease-out); }
.hero-slideshow .hero-slide.is-active { opacity: 1; z-index: 1; }
[data-motion="off"] .hero-slideshow .hero-slide { transition: none; }

/* slideshow dots */
.hero-dots {
  position: absolute; z-index: 3; right: var(--pad);
  bottom: clamp(56px, 9vh, 110px);
  display: flex; gap: 12px; align-items: center;
}
.hero-dot {
  width: 34px; height: 2px; padding: 0; border: none; cursor: pointer;
  background: rgba(232, 228, 222, 0.28);
  transition: background var(--ease), width var(--ease);
}
.hero-dot:hover { background: rgba(232, 228, 222, 0.55); }
.hero-dot.on { background: var(--accent); width: 52px; }
.hero-a .hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(28,46,46,0.55) 0%, rgba(28,46,46,0.12) 32%, rgba(28,46,46,0.74) 82%, var(--graphite) 100%),
    linear-gradient(90deg, rgba(28,46,46,0.55) 0%, transparent 60%);
}
.hero-a .hero-inner { position: relative; z-index: 2; max-width: 1100px; }
/* el hero-a va sobre foto: su texto se mantiene claro en cualquier paleta */
.hero-a .hero-title { color: #FFFFFF; text-shadow: 0 2px 28px rgba(0,0,0,0.40); }
.hero-a .hero-sub { color: rgba(245,243,238,0.90); text-shadow: 0 1px 18px rgba(0,0,0,0.45); }
.hero-a .hero-tag { text-shadow: 0 1px 10px rgba(0,0,0,0.65), 0 1px 2px rgba(0,0,0,0.55); }
.hero-a .hero-tag { margin-bottom: 22px; }
.hero-a .hero-title { font-size: clamp(86px, 15vw, 220px); margin-left: -0.06em; }
.hero-a .hero-rule { width: clamp(180px, 26vw, 360px); margin: 30px 0 26px; }
.hero-a .hero-sub { font-size: clamp(22px, 3vw, 40px); max-width: 620px; margin-bottom: 42px; }

/* HERO B — split */
.hero-b {
  flex-direction: row; min-height: 100vh; align-items: stretch;
}
.hero-b .hb-text {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: var(--nav) var(--pad) 40px; min-width: 0;
}
.hero-b .hero-tag { margin-bottom: 24px; }
.hero-b .hero-title { font-size: clamp(72px, 9vw, 150px); }
.hero-b .hero-rule { width: 240px; margin: 28px 0 26px; }
.hero-b .hero-sub { font-size: clamp(20px, 2.4vw, 32px); max-width: 440px; margin-bottom: 44px; }
.hero-b .hb-photo { flex: 0 0 42%; position: relative; overflow: hidden; }
.hero-b .hb-photo image-slot { position: absolute; inset: 0; width: 100%; height: 112%; top: -6%; }

/* HERO C — type-forward minimal */
.hero-c {
  flex-direction: column; justify-content: center;
  min-height: 86vh; padding: var(--nav) var(--pad) 60px;
  position: relative;
}
.hero-c .hero-tag { margin-bottom: 30px; }
.hero-c .hero-title { font-size: clamp(96px, 18vw, 280px); letter-spacing: 0.2em; }
.hero-c .hero-rule { width: clamp(220px, 34vw, 480px); margin: 34px 0 30px; }
.hero-c .hero-sub { font-size: clamp(22px, 3.2vw, 44px); max-width: 680px; margin-bottom: 46px; }
.hero-c-band { height: clamp(280px, 42vh, 460px); position: relative; overflow: hidden; }
.hero-c-band image-slot { position: absolute; inset: 0; width: 100%; height: 118%; top: -9%; }
[data-hero="c"] #hero-c-band-wrap { display: block; }
#hero-c-band-wrap { display: none; }

/* hero entrance stagger (only active page) */
@keyframes heroUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}
.page.active .hero-tag    { animation: heroUp 0.9s var(--ease-out) 0.15s both; }
.page.active .hero-title  { animation: heroUp 1.1s var(--ease-out) 0.28s both; }
.page.active .hero-rule   { animation: heroUp 0.9s var(--ease-out) 0.5s both; }
.page.active .hero-sub    { animation: heroUp 0.9s var(--ease-out) 0.62s both; }
.page.active .hero-actions{ animation: heroUp 0.9s var(--ease-out) 0.74s both; }
[data-motion="off"] .page.active :is(.hero-tag,.hero-title,.hero-rule,.hero-sub,.hero-actions) { animation: none; }

/* ─────────────── METRICS ─────────────── */
.metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 0.5px solid var(--line);
}
.metric { padding: clamp(34px, 5vw, 56px) var(--pad); border-right: 0.5px solid var(--line); }
.metric:last-child { border-right: none; }
.metric-n { font-family: var(--fd); font-size: clamp(48px, 6vw, 72px); font-weight: 300; color: var(--white); line-height: 1; margin-bottom: 10px; }
.metric-n .amp { color: var(--accent); }
.metric-l { font-size: 10px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--slate); }

/* ─────────────── ABOUT ─────────────── */
.about {
  background: var(--iron);
  padding: clamp(70px, 10vw, 130px) var(--pad);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 7vw, 96px); align-items: center;
}
.about-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.about-photo image-slot { position: absolute; inset: 0; width: 100%; height: 112%; top: -6%; }
.about-kicker { font-size: 10px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 26px; }
.about-lead { font-family: var(--fd); font-size: clamp(26px, 3vw, 42px); font-weight: 300; color: var(--white); line-height: 1.42; margin-bottom: 26px; }
.about-lead em { font-style: italic; color: var(--accent); }
.about-body { font-size: 14.5px; font-weight: 300; color: var(--pewter); line-height: 2; letter-spacing: 0.02em; max-width: 520px; margin-bottom: 38px; }
.feature { display: flex; gap: 24px; padding: 22px 0; border-bottom: 0.5px solid var(--line-cool); }
.feature:first-of-type { border-top: 0.5px solid var(--line-cool); }
.feature-n { font-family: var(--fd); font-size: 14px; color: var(--accent); min-width: 30px; }
.feature-name { font-size: 11.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream); margin-bottom: 5px; }
.feature-desc { font-size: 12.5px; font-weight: 300; color: var(--pewter); line-height: 1.5; }

/* ─────────────── HOME FEATURE BANDS ─────────────── */
.feat-band { padding: clamp(64px, 9vw, 120px) var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; border-top: 0.5px solid var(--line); }
.feat-band.alt { background: var(--iron); }
.feat-band.rev .feat-media { order: 2; }
.feat-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.feat-media image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.feat-kicker { font-size: 10px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.feat-title { font-family: var(--fd); font-size: clamp(28px, 3.4vw, 46px); font-weight: 300; color: var(--white); line-height: 1.18; margin-bottom: 24px; }
.feat-title em { font-style: italic; color: var(--accent); }
.feat-row { padding: 18px 0; border-bottom: 0.5px solid var(--line-cool); }
.feat-row:first-of-type { border-top: 0.5px solid var(--line-cool); }
.feat-row-h { font-size: 11.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream); margin-bottom: 6px; }
.feat-row-d { font-size: 12.5px; font-weight: 300; color: var(--pewter); line-height: 1.65; }
.feat-row-d b { color: var(--cream); font-weight: 500; }

/* ─────────────── SECTION HEADER ─────────────── */
.sec { padding: clamp(70px, 9vw, 124px) var(--pad); }
.sec-head { display: flex; align-items: flex-end; gap: 30px; margin-bottom: clamp(48px, 6vw, 78px); }
.sec-num { font-family: var(--fd); font-size: 13px; font-weight: 300; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 8px; }
.sec-title { font-family: var(--fd); font-size: clamp(44px, 6vw, 78px); font-weight: 300; color: var(--white); line-height: 1.04; letter-spacing: 0.01em; }
.sec-title em { font-style: italic; color: var(--pewter); }
.sec-rule { flex: 1; height: 0.5px; background: var(--line); margin-bottom: 14px; }
.sec-intro { max-width: 440px; font-size: 13.5px; font-weight: 300; color: var(--pewter); line-height: 1.9; padding-bottom: 6px; }

/* ─────────────── PROJECTS ─────────────── */
.proj-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(118px, 12.5vw, 215px);
  grid-auto-flow: dense; gap: clamp(8px, 1vw, 16px);
}
.proj-card { position: relative; overflow: hidden; cursor: pointer; }
.p-wide { grid-column: span 4; grid-row: span 2; }
.p-sm   { grid-column: span 2; grid-row: span 1; }
.p-tall { grid-column: span 2; grid-row: span 2; }
.p-band { grid-column: span 4; grid-row: span 1; }
.proj-media { position: absolute; inset: 0; transition: transform 1.2s var(--ease-out); }
.proj-media image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.proj-card:hover .proj-media { transform: scale(1.05); }
.proj-overlay {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(28,46,46,0.92) 0%, rgba(28,46,46,0.1) 52%, transparent 80%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(20px, 2.5vw, 32px);
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--ease), transform var(--ease);
}
.proj-card:hover .proj-overlay { opacity: 1; transform: none; }
.proj-tag { font-size: 9px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.proj-name { font-family: var(--fd); font-size: clamp(22px, 2.4vw, 30px); font-weight: 300; color: var(--white); line-height: 1.05; }
.proj-corner {
  position: absolute; top: clamp(16px,2vw,24px); right: clamp(16px,2vw,24px); z-index: 2;
  width: 34px; height: 34px; border: 0.5px solid rgba(232,228,222,0.3);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--cream); opacity: 0; transform: scale(0.8) rotate(-30deg);
  transition: opacity var(--ease), transform var(--ease); pointer-events: none;
}
.proj-card:hover .proj-corner { opacity: 1; transform: scale(1) rotate(0); }

/* ─────────────── SERVICES ─────────────── */
.srv-item {
  display: grid; grid-template-columns: 92px 1fr 200px; gap: 40px; align-items: start;
  padding: clamp(34px, 4vw, 52px) 0; border-bottom: 0.5px solid var(--line-cool);
  transition: padding var(--ease);
}
.srv-item:first-child { border-top: 0.5px solid var(--line-cool); }
.srv-item:hover { padding-left: 14px; }
.srv-item:hover .srv-name { color: var(--accent); }
.srv-num { font-family: var(--fd); font-size: clamp(40px, 4vw, 56px); font-weight: 300; color: rgba(139,115,85,0.28); line-height: 1; }
.srv-name { font-family: var(--fd); font-size: clamp(26px, 3vw, 38px); font-weight: 300; color: var(--white); margin-bottom: 14px; transition: color var(--ease); }
.srv-desc { font-size: 13.5px; font-weight: 300; color: var(--pewter); line-height: 1.9; max-width: 540px; }
.srv-mats { padding-top: 8px; }
.srv-ml { font-size: 9px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.mat-list { display: flex; flex-wrap: wrap; gap: 7px; }
.mat { font-size: 10px; font-weight: 400; letter-spacing: 0.06em; color: var(--pewter); border: 0.5px solid rgba(110,126,133,0.35); padding: 5px 11px; transition: color var(--ease), border-color var(--ease); }
.srv-item:hover .mat { border-color: rgba(139,115,85,0.4); }

/* ─────────────── MATERIALES ─────────────── */
.mat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.4vw, 20px);
}
.mat-card {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer;
  border: none; padding: 0; background: none; text-align: left; font-family: inherit;
  display: block;
}
.mat-card .mat-media { position: absolute; inset: 0; transition: transform 1.1s var(--ease-out); }
.mat-card .mat-media image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.mat-card:hover .mat-media { transform: scale(1.05); }
.mat-card::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(28,46,46,0.94) 0%, rgba(28,46,46,0.1) 56%, transparent 78%);
}
.mat-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none;
  padding: clamp(18px, 2.2vw, 28px);
  display: flex; flex-direction: column; gap: 8px;
}
.mat-name { font-family: var(--fd); font-size: clamp(20px, 2.2vw, 28px); font-weight: 300; color: var(--white); line-height: 1.1; }
.mat-arrow {
  font-size: 10px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); opacity: 0; transform: translateY(6px);
  transition: opacity var(--ease), transform var(--ease);
}
.mat-card:hover .mat-arrow { opacity: 1; transform: none; }

/* overlay */
.mat-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(15, 24, 24, 0.82); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(20px, 4vw, 56px);
  opacity: 0; visibility: hidden; transition: opacity var(--ease), visibility var(--ease);
}
.mat-overlay.open { opacity: 1; visibility: visible; }
.mat-modal {
  position: relative; width: min(960px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--iron); border: 0.5px solid var(--line);
  padding: clamp(32px, 4vw, 56px);
  transform: translateY(24px) scale(0.98); transition: transform 0.5s var(--ease-out);
}
.mat-overlay.open .mat-modal { transform: none; }
.mat-close {
  position: absolute; top: 18px; right: 18px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0.5px solid rgba(110,126,133,0.4); background: transparent;
  color: var(--cream); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.mat-close:hover { color: var(--white); border-color: var(--white); background: rgba(255,255,255,0.04); }
.mat-modal-head { margin-bottom: clamp(26px, 3vw, 40px); max-width: 560px; }
.mat-modal-kicker { font-size: 10px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.mat-modal-title { font-family: var(--fd); font-size: clamp(34px, 4.5vw, 56px); font-weight: 300; color: var(--white); line-height: 1.05; margin: 14px 0 18px; }
.mat-modal-desc { font-size: 13.5px; font-weight: 300; color: var(--pewter); line-height: 1.9; }
.mat-gallery { display: none; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 1.4vw, 18px); }
.mat-gallery.show { display: grid; }
.mg-cell { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.mg-cell image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ─────────────── MODAL DETALLE DE PROYECTO ─────────────── */
.proj-overlay-modal {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(15, 24, 24, 0.86); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(20px, 4vw, 64px);
  overflow-y: auto;
  opacity: 0; visibility: hidden; transition: opacity var(--ease), visibility var(--ease);
}
.proj-overlay-modal.open { opacity: 1; visibility: visible; }
.proj-modal {
  position: relative; width: min(1080px, 100%);
  background: var(--iron); border: 0.5px solid var(--line);
  transform: translateY(24px) scale(0.985); transition: transform 0.5s var(--ease-out);
}
.proj-overlay-modal.open .proj-modal { transform: none; }
.proj-modal .mat-close {
  position: absolute; top: 18px; right: 18px; z-index: 4;
  background: rgba(28,46,46,0.55); backdrop-filter: blur(4px);
}
.proj-modal-hero { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.proj-modal-hero image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.proj-modal-body {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 5vw, 72px);
  padding: clamp(32px, 4vw, 56px);
}
.proj-modal-kicker { font-size: 10px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.proj-modal-title { font-family: var(--fd); font-size: clamp(34px, 4.5vw, 58px); font-weight: 300; color: var(--white); line-height: 1.04; margin: 14px 0 22px; }
.proj-modal-desc { font-size: 14px; font-weight: 300; color: var(--pewter); line-height: 1.95; }
.proj-modal-meta { padding-top: 8px; }
.pm-row { display: flex; flex-direction: column; gap: 5px; padding: 16px 0; border-bottom: 0.5px solid var(--line-cool); }
.pm-row:first-child { padding-top: 0; }
.pm-row:last-child { border-bottom: none; }
.pm-lbl { font-size: 9px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.pm-val { font-size: 14px; font-weight: 300; color: var(--cream); letter-spacing: 0.02em; }
.pm-val sup { font-size: 0.62em; vertical-align: super; line-height: 0; margin-left: 0.5px; }
.proj-modal-gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(8px, 1vw, 14px);
  padding: 0 clamp(32px, 4vw, 56px) clamp(32px, 4vw, 56px);
}
.pmg-cell { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.pmg-cell image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ─────────────── CONTACT ─────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(48px, 7vw, 96px); }
.contact-h3 { font-family: var(--fd); font-size: clamp(32px, 4vw, 52px); font-weight: 300; font-style: italic; color: var(--white); line-height: 1.28; margin-bottom: 28px; }
.contact-p { font-size: 13.5px; font-weight: 300; color: var(--pewter); line-height: 1.95; margin-bottom: 48px; max-width: 460px; }
.c-detail { display: flex; flex-direction: column; gap: 20px; }
.c-row { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 18px; border-bottom: 0.5px solid var(--line-cool); }
.c-row:last-child { border-bottom: none; }
.c-lbl { font-size: 9px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); min-width: 92px; padding-top: 3px; }
.c-val { font-size: 14px; font-weight: 300; color: var(--cream); letter-spacing: 0.02em; }
.form-g { border-bottom: 0.5px solid rgba(110,126,133,0.26); padding: 18px 0; transition: border-color var(--ease); }
.form-g:focus-within { border-color: var(--accent); }
.form-lbl { font-size: 9px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 10px; }
.form-i, .form-t { width: 100%; background: transparent; border: none; outline: none; font-family: var(--fb); font-size: 15px; font-weight: 300; color: var(--white); letter-spacing: 0.02em; }
.form-i::placeholder, .form-t::placeholder { color: rgba(110,126,133,0.5); }
.form-t { resize: none; min-height: 92px; line-height: 1.7; }
.form-foot { margin-top: 38px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-note { font-size: 11px; font-weight: 300; color: var(--slate); letter-spacing: 0.04em; }

/* ─────────────── FOOTER ─────────────── */
footer { background: var(--iron); border-top: 0.5px solid var(--line); padding: clamp(34px,4vw,52px) var(--pad); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.foot-brand { display: flex; align-items: center; gap: 15px; justify-self: center; }
.foot-brand svg { display: block; }
.foot-brand .lm { fill: var(--accent); }
.foot-word { font-family: var(--fd); font-size: 19px; font-weight: 300; letter-spacing: 0.3em; color: var(--white); }
.foot-copy { font-size: 11px; font-weight: 300; letter-spacing: 0.06em; color: var(--slate); justify-self: start; }
.foot-spacer { justify-self: end; }

/* ─────────────── WHATSAPP FAB ─────────────── */
.wa-fab {
  position: fixed; right: clamp(20px, 3vw, 38px); bottom: clamp(20px, 3vw, 38px);
  z-index: 1100; width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--graphite);
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(0,0,0,0.38), inset 0 0 0 0.5px rgba(255,255,255,0.12);
  transition: transform var(--ease), background var(--ease), box-shadow var(--ease);
  animation: waIn 0.6s var(--ease-out) 1s both;
}
.wa-fab::before {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0.4;
  animation: waPulse 2.6s ease-out infinite;
}
.wa-fab:hover {
  transform: translateY(-3px) scale(1.05);
  background: var(--accent-hover);
  box-shadow: 0 12px 38px rgba(0,0,0,0.46), inset 0 0 0 0.5px rgba(255,255,255,0.2);
}
@keyframes waIn { from { opacity: 0; transform: scale(0.6) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes waPulse { 0% { transform: scale(1); opacity: 0.45; } 70% { transform: scale(1.5); opacity: 0; } 100% { opacity: 0; } }
[data-motion="off"] .wa-fab { animation: none; }
[data-motion="off"] .wa-fab::before { animation: none; opacity: 0.35; }
@media (max-width: 560px) { .wa-fab { width: 52px; height: 52px; } }

/* ─────────────── ESTILO (laboratorio) ─────────────── */
.style-block { margin-top: 8px; }
.style-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 0.5px solid var(--line); padding-bottom: 16px; margin-bottom: 30px; }
.style-h { font-family: var(--fd); font-size: 24px; font-weight: 300; color: var(--white); letter-spacing: 0.04em; }
.style-reset { background: none; border: 0.5px solid var(--line); color: var(--pewter); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 18px; border-radius: 2px; cursor: pointer; transition: color var(--ease), border-color var(--ease); }
.style-reset:hover { color: var(--white); border-color: var(--accent); }
.logo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.6vw, 24px); }
.logo-card { background: none; border: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 11px; font: inherit; }
.logo-card-media { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; border: 0.5px solid var(--line); background: var(--iron); display: flex; align-items: center; justify-content: center; transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease); }
.logo-card-media img { max-width: 78%; max-height: 70%; object-fit: contain; }
.lc-mark { display: flex; align-items: center; gap: 10px; }
.lc-word { font-family: var(--fd); font-size: 20px; font-weight: 300; letter-spacing: 0.28em; color: var(--cream); }
.logo-card:hover .logo-card-media { border-color: var(--accent); transform: translateY(-2px); }
.logo-card.on .logo-card-media { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.logo-card-label { font-size: 11px; letter-spacing: 0.05em; color: var(--pewter); text-align: left; }
.logo-card.on .logo-card-label { color: var(--white); }
.style-block + .style-block { margin-top: clamp(46px, 6vw, 80px); }

/* paletas */
.swatch-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.4vw, 20px); }
.swatch-card { background: none; border: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 11px; font: inherit; }
.swatch-row { display: flex; height: 64px; border-radius: 4px; overflow: hidden; border: 0.5px solid var(--line); transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease); }
.swatch-row span { flex: 1; }
.swatch-card:hover .swatch-row { border-color: var(--accent); transform: translateY(-2px); }
.swatch-card.on .swatch-row { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.swatch-card .logo-card-label, .font-card .logo-card-label { text-align: left; }
.swatch-card.on .logo-card-label, .font-card.on .logo-card-label { color: var(--white); }

/* tipografías */
.font-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.4vw, 20px); }
.font-card { background: none; border: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; gap: 11px; font: inherit; }
.font-card-media { aspect-ratio: 4 / 3; border-radius: 4px; border: 0.5px solid var(--line); background: var(--iron); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease); }
.fc-word { font-size: 30px; font-weight: 400; letter-spacing: 0.14em; color: var(--cream); line-height: 1; }
.fc-sub { font-size: 10.5px; font-weight: 400; letter-spacing: 0.04em; color: var(--pewter); text-align: center; }
.font-card:hover .font-card-media { border-color: var(--accent); transform: translateY(-2px); }
.font-card.on .font-card-media { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }

/* logo en barra compacta al hacer scroll */
nav.scrolled .brand-img { max-height: 44px; }

/* ─────────────── RESPONSIVE ─────────────── */
@media (max-width: 860px) {
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .swatch-grid, .font-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 10px; letter-spacing: 0.12em; }
  .metrics { grid-template-columns: 1fr; }
  .metric { border-right: none; border-bottom: 0.5px solid var(--line); }
  .metric:last-child { border-bottom: none; }
  .about { grid-template-columns: 1fr; }
  .about-photo { aspect-ratio: 16/10; order: -1; }
  .feat-band { grid-template-columns: 1fr; gap: 30px; }
  .feat-band .feat-media, .feat-band.rev .feat-media { order: -1; }
  .feat-media { aspect-ratio: 16/9; }
  .proj-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .proj-card { grid-column: span 1 !important; grid-row: auto !important; aspect-ratio: 4/3; }
  .p-wide, .p-band { grid-column: span 2 !important; aspect-ratio: 16/9; }
  .srv-item { grid-template-columns: 1fr; gap: 14px; }
  .srv-num { font-size: 36px; }
  .hero-b { flex-direction: column; }
  .hero-b .hb-photo { flex: 0 0 38vh; order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .mat-grid { grid-template-columns: repeat(2, 1fr); }
  .proj-modal-body { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  footer { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 16px; }
  .foot-copy { justify-self: center; }
  .foot-spacer { display: none; }
}
