/* ===========================================================
   TERRENAL V5 — style.css
   Mobile-first · Editorial · Progressive enhancement
   =========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F2EEE8;
  --bg-2: #EAE5DC;
  --ink: #141210;
  --ink-2: #565049;
  --muted: #9A9089;
  --hairline: #DCD6CC;
  --dark: #0F0E0C;
  --dark-2: #1A1815;
  --accent: #8A6040;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 60px;
  --maxw: 1440px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
html, body { overflow-x: clip; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
ol, ul { list-style: none; }

/* Honor system reduced-data / motion preferences at the structural level too */
::selection { background: var(--ink); color: var(--bg); }

/* ── ACCESSIBILITY ── */
.skip-link {
  position: fixed;
  top: -100px; left: 16px;
  z-index: 999;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.8125rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── TOKENS ── */
.label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
}
.label--block { display: block; margin-top: 6px; }
.label--light { color: rgba(255,255,255,0.45); }

.section-h {
  font-size: clamp(2.75rem, 11vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin-top: 0.18em;
}
.section-h--light { color: #fff; }

.text-link {
  font-size: 0.9375rem;
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  display: inline-block;
  transition: opacity 0.2s, transform 0.3s var(--ease);
}
.text-link:hover { opacity: 0.55; }

.tag {
  display: inline-block;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 13px;
  color: var(--ink-2);
  margin: 3px 4px 3px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { flex-shrink: 0; transition: transform 0.25s var(--ease); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--dark:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 14px 38px rgba(0,0,0,0.18); }
.btn--dark:hover svg { transform: translateX(4px); }
.btn--light { background: #fff; color: var(--dark); }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(0,0,0,0.35); }

/* ===========================================================
   REVEAL SYSTEM — only active when JS present (html.js)
   Content is fully visible if JS fails to load.
   =========================================================== */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  will-change: opacity, transform;
}
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}
html.js .reveal[data-reveal-delay="1"] { transition-delay: 0.08s; }
html.js .reveal[data-reveal-delay="2"] { transition-delay: 0.16s; }
html.js .reveal[data-reveal-delay="3"] { transition-delay: 0.24s; }

/* ===========================================================
   NAV
   =========================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav.is-scrolled { background: var(--dark); border-color: rgba(255,255,255,0.12); }
.nav.is-hidden { transform: none; }
.nav.menu-open { background: var(--dark); }

.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__brand { display: flex; align-items: center; }
.nav__logo { height: 16px; width: auto; transition: opacity 0.3s; }
.nav__logo--dark  { display: none; }
.nav__logo--light { filter: brightness(0) invert(1); display: block; }

.nav__links { display: none; gap: 30px; align-items: center; }
.nav__links a {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}
.nav__links a:hover { color: #fff; }

.nav__cta-link {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,0.32) !important;
  padding: 6px 15px !important;
  border-radius: 999px;
  color: rgba(255,255,255,0.85) !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s !important;
}
.nav__cta-wa { flex-shrink: 0; opacity: 0.9; }
.nav__cta-link:hover { background: rgba(255,255,255,0.14) !important; color: #fff !important; border-color: rgba(255,255,255,0.6) !important; }

.nav__burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px; height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.burger-bar {
  display: block;
  width: 22px; height: 1.5px;
  background: #fff;
  transition: transform 0.34s var(--ease), background 0.24s;
  transform-origin: center;
}
.nav.menu-open .burger-bar { background: #fff; }
.nav.menu-open .burger-bar:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav.menu-open .burger-bar:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* ── MOBILE MENU ── */
.mmenu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--dark);
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 24px) var(--gutter) max(40px, env(safe-area-inset-bottom));
  visibility: hidden;
}
.mmenu.is-open { transform: translateY(0); visibility: visible; }

.mmenu__nav { display: flex; flex-direction: column; flex: 1; justify-content: center; }
.mmenu__link {
  font-size: clamp(2.25rem, 11vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: #fff;
  padding: clamp(8px, 1.6vh, 14px) 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}
.mmenu__link span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.5s var(--ease);
}
.mmenu.is-open .mmenu__link span { transform: none; }
.mmenu.is-open .mmenu__link:nth-child(1) span { transition-delay: 0.10s; }
.mmenu.is-open .mmenu__link:nth-child(2) span { transition-delay: 0.15s; }
.mmenu.is-open .mmenu__link:nth-child(3) span { transition-delay: 0.20s; }
.mmenu.is-open .mmenu__link:nth-child(4) span { transition-delay: 0.25s; }
.mmenu.is-open .mmenu__link:nth-child(5) span { transition-delay: 0.30s; }

.mmenu__foot {
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.4s 0.35s var(--ease);
}
.mmenu.is-open .mmenu__foot { opacity: 1; }
.mmenu__cta {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.mmenu__meta {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--dark);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #fff;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s ease;
  filter: brightness(0.7) saturate(0.92);
}
.hero__slide.is-active {
  opacity: 1;
  animation: kenburns 7s ease-out forwards;
}
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1.0); } }

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.08) 32%, rgba(0,0,0,0.12) 56%, rgba(0,0,0,0.78) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 0 var(--gutter) clamp(28px, 5vh, 56px);
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: clamp(16px, 2.5vh, 26px);
  opacity: 0;
  transform: translateY(12px);
}
.hero__eyebrow-line { display: block; width: 28px; height: 1px; background: rgba(255,255,255,0.4); }
.hero.is-ready .hero__eyebrow { opacity: 1; transform: none; transition: opacity 0.7s 0.15s var(--ease), transform 0.7s 0.15s var(--ease); }

.hero__title {
  font-size: clamp(3rem, 13vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: #fff;
  margin-bottom: clamp(14px, 2.5vh, 26px);
  opacity: 0;
  transform: translateY(34px);
}
.hero.is-ready .hero__title { opacity: 1; transform: none; transition: opacity 0.9s 0.3s var(--ease), transform 0.9s 0.3s var(--ease); }

.hero__sub {
  font-size: clamp(0.9375rem, 1.5vw, 1.1875rem);
  font-weight: 300;
  color: rgba(255,255,255,0.66);
  line-height: 1.55;
  border-left: 1px solid rgba(255,255,255,0.22);
  padding-left: 16px;
  max-width: 36ch;
  opacity: 0;
  transform: translateY(12px);
}
.hero.is-ready .hero__sub { opacity: 1; transform: none; transition: opacity 0.7s 0.6s var(--ease), transform 0.7s 0.6s var(--ease); }

.hero__foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(12px, 2vh, 18px) var(--gutter) max(clamp(12px,2vh,18px), env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero__counter { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.18em; color: rgba(255,255,255,0.5); text-transform: uppercase; }
.hero__counter-sep { margin: 0 6px; opacity: 0.4; }
.hero__dots { display: flex; gap: 7px; align-items: center; }
.hero__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.32);
  transition: width 0.35s var(--ease), background 0.35s;
  padding: 0;
}
.hero__dot.is-active { width: 20px; border-radius: 999px; background: rgba(255,255,255,0.9); }
.hero__scroll { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 0.5625rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.4); }
.hero__scroll-bar { width: 40px; height: 1px; background: rgba(255,255,255,0.16); position: relative; overflow: hidden; }
.hero__scroll-fill { position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: rgba(255,255,255,0.6); animation: scrollHint 2.4s 1.6s ease-in-out infinite; }
@keyframes scrollHint { 0% { left: -100%; } 50% { left: 0; } 100% { left: 100%; } }

/* ===========================================================
   ABOUT
   =========================================================== */
.about {
  padding: clamp(72px, 12vh, 130px) var(--gutter);
  border-bottom: 1px solid var(--hairline);
}
.about__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vh, 56px);
}
.about__tags { margin-top: 22px; display: flex; flex-wrap: wrap; }
.about__body {
  font-size: clamp(1.375rem, 4.5vw, 2rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0;
}
/* Typewriter caret — only while JS is typing the text in */
.about__body.is-typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 0.92em;
  margin-left: 2px;
  vertical-align: -0.08em;
  background: var(--accent);
  animation: aboutCaret 0.85s steps(1) infinite;
}
@keyframes aboutCaret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ===========================================================
   PROJECTS
   =========================================================== */
.projects { padding-top: clamp(64px, 10vh, 100px); }
.projects__header {
  max-width: var(--maxw);
  margin: 0 auto clamp(28px, 5vh, 52px);
  padding: 0 var(--gutter);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.projects__count {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--hairline);
}

/* Mobile: horizontal snap carousel */
.projects__grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--gutter) var(--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.projects__grid::-webkit-scrollbar { display: none; }

.pcard {
  position: relative;
  flex: 0 0 82%;
  height: 64vh;
  max-height: 560px;
  scroll-snap-align: start;
  overflow: hidden;
  background: var(--dark);
  cursor: pointer;
  border-radius: 2px;
  -webkit-tap-highlight-color: transparent;
}
.pcard__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s var(--ease), filter 0.6s var(--ease);
  filter: brightness(0.66) saturate(0.88);
}
.pcard__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(16px, 2.5vw, 24px);
}
.pcard__top { display: flex; justify-content: space-between; align-items: flex-start; }
.pcard__num { font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.18em; color: rgba(255,255,255,0.6); text-transform: uppercase; }
.pcard__tag {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pcard__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.pcard__name {
  font-weight: 700;
  font-size: clamp(1.375rem, 5vw, 1.875rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 2px 22px rgba(0,0,0,0.5);
}
.pcard__open {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.45);
  padding-bottom: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===========================================================
   MODAL — centered floating panel
   =========================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10,9,8,0.85); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.modal__panel {
  position: relative;
  z-index: 1;
  background: var(--bg);
  width: min(94vw, 1100px);
  max-height: 90svh;
  border-radius: 4px;
  overflow: hidden;
  transform: translateY(26px) scale(0.98);
  transition: transform 0.45s var(--ease);
  display: flex;
  flex-direction: column;
}
.modal.is-open .modal__panel { transform: none; }
.modal__close {
  position: absolute;
  top: 14px; right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s;
}
.modal__close:hover { color: var(--ink); }
.modal__body { display: flex; flex-direction: column; overflow-y: auto; }
.modal__gallery { position: relative; background: var(--dark); }
.modal__img-wrap { height: 46vh; max-height: 420px; overflow: hidden; }
.modal__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.modal__gal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: rgba(10,9,8,0.65);
  position: absolute;
  bottom: 0; left: 0; right: 0;
}
.modal__gal-nav .label { color: rgba(255,255,255,0.6); }
.modal__arrow { font-size: 1.25rem; color: #fff; opacity: 0.75; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; transition: opacity 0.2s; }
.modal__arrow:hover { opacity: 1; }
.modal__info { padding: clamp(24px, 4vw, 40px); }
.modal__info .label { color: var(--accent); }
.modal__title { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 700; letter-spacing: -0.03em; margin: 10px 0 16px; }
.modal__blurb { font-size: 0.9375rem; line-height: 1.65; color: var(--ink-2); margin-bottom: 26px; }
.modal__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; margin-bottom: 26px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.modal__meta dt { font-family: var(--mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.modal__meta dd { font-size: 0.875rem; font-weight: 500; }
.modal__mats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 22px; }
.modal__mat-tag { background: var(--bg-2); border: 1px solid var(--hairline); color: var(--ink-2); font-size: 0.75rem; padding: 4px 11px; border-radius: 100px; }
.modal__thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.modal__thumb { width: 60px; height: 44px; object-fit: cover; border-radius: 3px; cursor: pointer; opacity: 0.5; transition: opacity 0.2s; border: 1.5px solid transparent; }
.modal__thumb:hover, .modal__thumb.is-active { opacity: 1; border-color: var(--accent); }

/* ===========================================================
   PROCESS
   =========================================================== */
.process { padding: clamp(72px, 12vh, 130px) var(--gutter); border-top: 1px solid var(--hairline); }
.process__header { max-width: var(--maxw); margin: 0 auto clamp(40px, 7vh, 64px); }
.process__body {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 clamp(16px, 4vw, 40px);
}
.process__timeline { position: relative; }
.process__line { position: absolute; left: 50%; transform: translateX(-50%); top: 0; width: 2px; height: 100%; background: var(--hairline); border-radius: 2px; }
.process__line-fill { position: absolute; top: 0; left: 0; right: 0; height: 0%; background: var(--ink); border-radius: 2px; transition: height 0.12s linear; }
.process__dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid var(--hairline);
  background: var(--bg);
  z-index: 2;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
/* Fallback positions (JS refines to align with each row center) */
.process__dot[data-dot="0"] { top: 12%; }
.process__dot[data-dot="1"] { top: 37%; }
.process__dot[data-dot="2"] { top: 62%; }
.process__dot[data-dot="3"] { top: 92%; }
.process__dot.is-active { background: var(--ink); border-color: var(--ink); transform: translateX(-50%) scale(1.25); }
.process__dot--final { width: 16px; height: 16px; }
.process__dot--final.is-active { background: var(--accent); border-color: var(--accent); transform: translateX(-50%) scale(1.35); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }

/* Final milestone row */
.process__row--final .process__name--final { color: var(--accent); }
.process__row--final .process__n--final { color: var(--accent); font-size: 1rem; }

/* ── PAPEL PICADO (confetti) ── */
.confetti-piece {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 12px;
  z-index: 150;
  pointer-events: none;
  will-change: transform, opacity;
  border-radius: 1px;
}

.process__list { width: 100%; }
.process__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: clamp(26px, 4vh, 40px) 0;
  border-bottom: 1px solid var(--hairline);
}
.process__row:first-child { border-top: 1px solid var(--hairline); }
.process__n { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); letter-spacing: 0.08em; }
.process__name { font-size: clamp(1.375rem, 4vw, 1.75rem); font-weight: 600; letter-spacing: -0.02em; }
.process__desc { font-size: 0.9375rem; line-height: 1.65; color: var(--ink-2); max-width: 56ch; }

/* ===========================================================
   CLIENTS
   =========================================================== */
.clients { background: var(--dark); padding: clamp(72px, 11vh, 120px) 0 clamp(48px, 8vh, 80px); overflow: hidden; }
.clients__header { padding: 0 var(--gutter) clamp(40px, 6vh, 60px); max-width: var(--maxw); margin: 0 auto; }
.clients__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.clients__cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(104px, 32vw, 150px);
  padding: clamp(4px, 2vw, 14px);
  transition: background 0.3s;
}
.clients__cell img {
  height: clamp(80px, 21vw, 110px);
  width: auto;
  max-width: 94%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.86;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}
@media (min-width: 600px) {
  .clients__grid { grid-template-columns: repeat(5, 1fr); gap: 1px; padding: 0 var(--gutter); }
  .clients__cell { min-height: clamp(120px, 18vw, 168px); padding: clamp(20px, 4vw, 44px); box-shadow: 0 0 0 0.5px rgba(255,255,255,0.09); }
  .clients__cell img { height: clamp(72px, 8vw, 104px); max-width: 80%; opacity: 0.82; }
  .clients__cell:hover { background: rgba(255,255,255,0.04); }
  .clients__cell:hover img { opacity: 1; transform: scale(1.06); }
}
.clients__cell:hover img { opacity: 1; }
.clients__foot {
  padding: clamp(28px, 4vh, 44px) var(--gutter) 0;
  max-width: var(--maxw);
  margin: clamp(28px, 4vh, 44px) auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.clients__cta { color: rgba(255,255,255,0.6) !important; transition: color 0.2s; }
.clients__cta:hover { color: #fff !important; }

/* ===========================================================
   MANIFESTO
   =========================================================== */
.manifesto { padding: clamp(72px, 13vh, 140px) var(--gutter); border-bottom: 1px solid var(--hairline); }
.manifesto__inner { max-width: 1100px; margin: 0 auto; }
.manifesto__mark { font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; line-height: 0.6; color: var(--accent); display: block; margin-bottom: 8px; }
.manifesto__text { font-size: clamp(1.625rem, 5vw, 2.75rem); font-weight: 400; line-height: 1.32; letter-spacing: -0.022em; margin-bottom: 28px; }
.manifesto__text em { font-style: italic; font-weight: 300; color: var(--ink-2); }
.manifesto__sub { font-size: 1rem; color: var(--ink-2); line-height: 1.6; }

/* ===========================================================
   COTIZAR CTA
   =========================================================== */
.cotizar { padding: clamp(72px, 11vh, 120px) var(--gutter); border-bottom: 1px solid var(--hairline); }
.cotizar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vh, 44px);
}
.cotizar__title { font-size: clamp(2.75rem, 9vw, 5.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 0.95; margin-top: 12px; }
.cotizar__desc { font-size: clamp(1rem, 3vw, 1.125rem); line-height: 1.65; color: var(--ink-2); margin-bottom: 32px; max-width: 46ch; }

/* ===========================================================
   CONTACT
   =========================================================== */
.contact { background: var(--dark); padding: clamp(72px, 12vh, 130px) var(--gutter); }
.contact__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 7vh, 72px);
}
.contact__title { font-size: clamp(4rem, 16vw, 11rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.9; color: #fff; margin: 14px 0 24px; }
.contact__sub { font-size: clamp(1rem, 3vw, 1.25rem); color: rgba(255,255,255,0.55); line-height: 1.6; margin-bottom: 36px; max-width: 42ch; }
.contact__right { display: flex; flex-direction: column; gap: 36px; }
.contact__block .label { display: block; margin-bottom: 10px; }
.contact__text { font-size: 0.9375rem; color: rgba(255,255,255,0.5); line-height: 1.6; max-width: 42ch; }
.contact__details { display: flex; flex-direction: column; gap: 10px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.1); }
.contact__link { font-size: 0.9375rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.contact__link:hover:not(.contact__link--static) { color: #fff; }
.contact__link--static { cursor: default; }
.contact__link--ig { display: inline-flex; align-items: center; gap: 8px; width: fit-content; }
.contact__link--ig svg { flex-shrink: 0; opacity: 0.85; transition: opacity 0.2s; }
.contact__link--ig:hover svg { opacity: 1; }

/* ===========================================================
   FOOTER
   =========================================================== */
.footer { background: var(--dark); border-top: 1px solid rgba(255,255,255,0.08); padding: 24px var(--gutter) max(24px, env(safe-area-inset-bottom)); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer__logo { height: 14px; filter: brightness(0) invert(0.42); }
.footer__top { color: rgba(255,255,255,0.4) !important; transition: color 0.2s; }
.footer__top:hover { color: rgba(255,255,255,0.8) !important; }

/* ===========================================================
   RESPONSIVE — TABLET ≥720px
   =========================================================== */
@media (min-width: 720px) {
  .about__inner { grid-template-columns: 240px 1fr; gap: clamp(40px, 6vw, 80px); }
  .cotizar__inner { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .contact__inner { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
  .contact__right { padding-top: 70px; }
  .clients__foot { flex-direction: row; justify-content: space-between; align-items: center; }
  .modal__body { flex-direction: row; }
  .modal__gallery { flex: 1; }
  .modal__img-wrap { height: auto; max-height: none; min-height: 480px; }
  .modal__info { width: 360px; flex-shrink: 0; border-left: 1px solid var(--hairline); overflow-y: auto; max-height: 90svh; }
}

/* ===========================================================
   RESPONSIVE — DESKTOP ≥960px
   =========================================================== */
@media (min-width: 960px) {
  :root { --nav-h: 64px; }
  .nav__links { display: flex; }
  .nav__burger { display: none; }

  /* Projects: editorial asymmetric grid */
  .projects__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: 54vh 40vh 40vh;
    gap: 4px;
    overflow: visible;
    padding: 0 var(--gutter) var(--gutter);
    max-width: var(--maxw);
    margin: 0 auto;
  }
  .pcard { flex: none; height: auto; max-height: none; }
  .pcard:nth-child(1) { grid-column: span 4; }
  .pcard:nth-child(2) { grid-column: span 2; }
  .pcard:nth-child(3) { grid-column: span 2; }
  .pcard:nth-child(4) { grid-column: span 2; }
  .pcard:nth-child(5) { grid-column: span 2; }
  .pcard:nth-child(6) { grid-column: span 3; }
  .pcard:nth-child(7) { grid-column: span 3; }

  /* Hover only where there's a pointer */
  .pcard:hover .pcard__img { transform: scale(1.05); filter: brightness(0.5) saturate(0.78); }
  .pcard__tag { opacity: 0; transition: opacity 0.3s; }
  .pcard:hover .pcard__tag { opacity: 1; }
  .pcard__name { transition: transform 0.3s var(--ease); }
  .pcard:hover .pcard__name { transform: translateY(-3px); }

  .process__body { grid-template-columns: 40px 1fr; gap: 0 56px; }
  .process__row { grid-template-columns: 90px 260px 1fr; gap: 40px; align-items: baseline; }
  .process__desc { padding-top: 0; }
}

/* Larger screens — taller project rows */
@media (min-width: 1280px) {
  .projects__grid { grid-template-rows: 58vh 42vh 42vh; }
}

/* ===========================================================
   REDUCED MOTION
   =========================================================== */
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero.is-ready .hero__eyebrow,
  .hero.is-ready .hero__title,
  .hero.is-ready .hero__sub { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero__eyebrow, .hero__title, .hero__sub { opacity: 1 !important; transform: none !important; }
  .hero__slide.is-active { animation: none !important; transform: none !important; }
  .clients__track--fwd, .clients__track--rev,
  .hero__scroll-fill { animation: none !important; }
  .mmenu__link span { transform: none !important; }
  *, *::before, *::after { scroll-behavior: auto !important; }
}
