/* ============================================================
   DRA. MOSS — main.css (v6) · según maqueta 261030_web_draMoss01
   Medidas tomadas a 1920 px y escaladas en vw.
   ============================================================ */

:root {
  --navy: #2C2D3A;
  --navy-2: #353747;
  --yellow: #F6C055;
  --teal: #2E9EA3;
  --slate: #555872;
  --paper: #F6F6F4;
  --white: #FFFFFF;
  --grey: #9A9CB0;

  --f-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-geo: 'Montserrat', 'Inter', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(24px, 12.5vw, 240px);      /* margen izquierdo de la maqueta */
  --header-h: clamp(72px, 7.5vw, 140px);
}

/* ── Tipografías alojadas en el propio servidor ── */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/inter-latin.woff2?v=6.4) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2?v=6.4) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/montserrat-latin.woff2?v=6.4) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/montserrat-latin-ext.woff2?v=6.4) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Safari < 15.4 no conoce <dialog>: sin esto los popups salen pegados al final de la página */
dialog:not([open]) { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body); color: var(--navy); background: var(--navy);
  font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
main { overflow-x: hidden; overflow-x: clip; }   /* hidden: Safari < 16 */
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute !important; left: -9999px !important; opacity: 0; width: 1px; height: 1px; }
.is-yellow { color: var(--yellow); }
.c-yellow { color: var(--yellow); }
.c-teal { color: var(--teal); }
.wrap { width: 100%; padding: 0 var(--pad); position: relative; z-index: 2; }
.link-btn { text-decoration: underline; text-underline-offset: 3px; }
.js .reveal { opacity: 0; transform: translateY(40px); }
/* Estados iniciales de la entrada del hero: se fijan en CSS para que no
   se vea la página quieta y luego "salte" cuando llega el JavaScript. */
.js .header, .js .hero .eyebrow, .js .hero-sub { opacity: 0; }
.js .hero-title .line > span { transform: translateY(110%); }
.js .hero-title .o-ring, .js .hero-dot { transform: scale(0); }
.js .hero-ring { opacity: 0; transform: scale(.3); }

/* ── Logos como máscara: se colorean con background-color ── */
.logo-mask {
  display: inline-block; background-color: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat;
}
.logo-stack   { --src: url(../images/brand/logo-stack.svg);   aspect-ratio: 3894 / 1833; }
.wordmark-moss{ --src: url(../images/brand/wordmark-moss.svg); aspect-ratio: 3028 / 699; }

/* ── La "o" de la marca ── */
.o-ring {
  display: inline-block; position: relative;
  width: .76em; height: .76em; border-radius: 50%;
  background: radial-gradient(circle, var(--bg-hole, var(--navy)) 0 21%, var(--yellow) 22%);
  vertical-align: -.02em; margin-left: .03em;
}
.o-dot {
  display: inline-block; position: relative;
  width: .72em; height: .72em; border-radius: 50%;
  background: radial-gradient(circle, var(--yellow) 0 24%, var(--navy) 25%);
  vertical-align: -.02em; margin: 0 .02em;
}
.o-dot::before {
  content: ''; position: absolute; left: 50%; top: -.28em; width: .17em; height: .17em;
  border-radius: 50%; background: var(--yellow); transform: translateX(-50%);
}

/* ── Formas decorativas (anillo y punto amarillos) ── */
.deco-ring {
  position: absolute; z-index: 3; pointer-events: none; border-radius: 50%;
  width: var(--d); height: var(--d);
  background: radial-gradient(circle, transparent 0 44%, var(--yellow) 44.3%);
}
.deco-dot { position: absolute; z-index: 3; border-radius: 50%; background: var(--yellow); width: var(--s); height: var(--s); pointer-events: none; }

/* ============================================================
   CABECERA
   ============================================================ */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(18px, 3.3vw, 64px) 0 clamp(18px, 3.3vw, 64px);
  color: var(--yellow);
  transition: background .4s, height .4s var(--ease), box-shadow .4s;
}
.header.is-scrolled {
  height: clamp(64px, 5.2vw, 96px);
  background: rgba(44, 45, 58, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.header-logo .logo-stack { width: clamp(96px, 10.4vw, 200px); transition: width .4s var(--ease); }
.header.is-scrolled .logo-stack { width: clamp(84px, 7.4vw, 150px); }
.header-nav { display: flex; align-items: center; gap: clamp(18px, 4.5vw, 88px); font-family: var(--f-geo); font-weight: 600; font-size: clamp(15px, 1.3vw, 25px); color: var(--white); }
.header-nav a { position: relative; }
.header-nav a.is-accent { color: var(--yellow); }
.header-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.header-nav a:hover::after, .header-nav a.is-active::after { transform: scaleX(1); }
.hablemoss {
  display: inline-flex; align-items: center; gap: .1em;
  border: 2px solid var(--teal); border-radius: 999px;
  padding: .55em 1.05em; font-family: var(--f-body); font-weight: 500; color: var(--white);
  font-size: clamp(15px, 1.4vw, 27px); letter-spacing: -.01em;
  transition: background .3s, border-color .3s, transform .4s var(--ease);
}
.hablemoss .wordmark-moss { height: .78em; color: var(--yellow); margin-top: .08em; }
.hablemoss:hover { background: var(--teal); transform: translateY(-2px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; z-index: 3; background: var(--navy); color: var(--white);
  min-height: max(620px, min(56.25vw, 100vh)); min-height: max(620px, min(56.25vw, 100svh));
  display: flex; align-items: center; padding: calc(var(--header-h) + 20px) 0 60px;
}
.eyebrow { font-family: var(--f-body); color: var(--yellow); font-size: clamp(16px, 1.46vw, 28px); font-weight: 400; letter-spacing: -.01em; margin-bottom: clamp(10px, 1.2vw, 22px); }
.hero-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(3rem, 6.6vw, 8.2rem); line-height: 1.16; letter-spacing: -.01em; }
.line { display: block; overflow: hidden; padding-bottom: .04em; }
.line > span { display: inline-block; }
.nw { white-space: nowrap; }
.hero-title .is-yellow { color: var(--yellow); }
.hero-sub { margin-top: clamp(28px, 3.4vw, 64px); color: var(--grey); font-size: clamp(15px, 1.12vw, 21px); line-height: 1.3; }
.hero-ring { --d: clamp(300px, 35.4vw, 760px); right: calc(var(--d) / -2); bottom: calc(var(--d) / -2); }
.hero-dot  { --s: clamp(26px, 3.1vw, 60px); right: 15%; bottom: 30%; }

/* ============================================================
   AGENCIA ESPECIALIZADA
   ============================================================ */
.intro { position: relative; z-index: 2; background: var(--paper); padding: clamp(110px, 7.6vw, 150px) 0 clamp(90px, 9vw, 175px); overflow: hidden; }
.intro-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4.75vw, 5.8rem); line-height: 1.2; letter-spacing: -.012em; color: var(--navy); }
.intro-title .w { display: inline-block; }
.intro-title .w + .w { margin-left: .06em; }
.intro-sub { margin-top: clamp(30px, 4.6vw, 88px); margin-left: calc(-1 * var(--pad) + clamp(24px, 10.7vw, 205px)); font-family: var(--f-geo); font-weight: 500; font-size: clamp(15px, 1.45vw, 28px); letter-spacing: .03em; }

/* ============================================================
   ECOSISTEMA
   ============================================================ */
.eco { position: relative; z-index: 1; background: var(--navy); color: var(--white); padding: clamp(60px, 3.2vw, 60px) 0; overflow: hidden; }
.eco .wrap { padding-left: clamp(24px, 14.3vw, 275px); padding-right: clamp(24px, 5vw, 96px); }
.eco-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center; gap: clamp(30px, 6vw, 120px); }
.eco-visual { width: 100%; max-width: 740px; }
.eco-donut {
  --p: 100;
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from -90deg, var(--yellow) calc(var(--p) * 1%), transparent 0);
  display: grid; place-items: center;
}
.eco-hole { width: 42.3%; aspect-ratio: 1; border-radius: 50%; background: var(--navy); display: grid; place-items: center; }
.eco-core { width: 67%; aspect-ratio: 1; border-radius: 50%; background: var(--paper); display: grid; place-items: center; }
.eco-core img { width: 74%; transform: translateY(-4%); }
.eco-list { display: grid; gap: clamp(26px, 4.2vw, 80px); }
.eco-item { display: flex; align-items: center; gap: clamp(18px, 3.1vw, 60px); font-family: var(--f-geo); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: clamp(14px, 1.56vw, 30px); line-height: 1.22; }
.eco-item img { width: clamp(64px, 6.25vw, 120px); flex: none; transition: transform .6s var(--ease); }
.eco-item:hover img { transform: rotate(-12deg) scale(1.08); }

/* ============================================================
   NUESTRO ADN
   ============================================================ */
.adn { position: relative; background: var(--white); overflow: hidden; padding: clamp(80px, 5.4vw, 104px) 0 clamp(80px, 7vw, 135px); }
.adn-panel { position: absolute; top: 0; bottom: 0; right: 0; width: 33.8%; background: var(--yellow); }
.adn-helix { position: absolute; top: 0; right: 0; width: 50%; height: 100%; z-index: 1; pointer-events: none; }
.adn-inner { z-index: 2; max-width: calc(66% + var(--pad)); }
.adn-title { font-family: var(--f-geo); font-weight: 700; font-size: clamp(2.6rem, 5.4vw, 6.6rem); letter-spacing: -.01em; line-height: 1.1; margin-bottom: clamp(30px, 3.6vw, 70px); color: var(--navy); }
.adn-title .o-dot { width: .7em; height: .7em; }
.adn-text { font-family: var(--f-display); font-weight: 600; font-size: clamp(16px, 1.75vw, 34px); line-height: 1.25; margin-bottom: clamp(18px, 2.2vw, 42px); letter-spacing: .005em; }
.adn-text small { font-size: .62em; font-weight: 400; font-family: var(--f-geo); letter-spacing: .03em; }

/* ============================================================
   ESTA ES NUESTRA CASA + PROYECTOS
   ============================================================ */
.casa { position: relative; background: var(--navy); color: var(--white); padding: clamp(80px, 6.5vw, 125px) 0 clamp(40px, 3vw, 60px); overflow: hidden; }
.casa-grid { display: grid; grid-template-columns: calc(48.8vw - var(--pad)) minmax(0, 1fr); gap: 0 0; align-items: start; padding-right: clamp(24px, 4.6vw, 90px); }
.casa-title, .work-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.8rem, 6.4vw, 8rem); line-height: 1.02; letter-spacing: -.01em; }
.pills { display: flex; flex-wrap: wrap; gap: clamp(10px, 1.04vw, 20px) clamp(10px, 1.1vw, 22px); padding-top: .3vw; }
.pill {
  font-family: var(--f-geo); font-weight: 500; text-transform: uppercase; letter-spacing: .07em;
  font-size: clamp(12px, 1.2vw, 23px); line-height: 1; white-space: nowrap;
  padding: .55em 1.1em .5em; border-radius: 999px; border: 1.5px solid var(--yellow); color: var(--white);
  transition: background .5s, border-color .5s, color .5s;
  will-change: transform, opacity;
}
.pill.s-y { background: var(--yellow); }
.pill.s-t { background: var(--teal); border-color: var(--teal); }
.pill.s-s { background: var(--slate); border-color: var(--slate); }
.casa-dot  { --s: clamp(26px, 3.1vw, 60px); position: relative; grid-column: 2; justify-self: end; margin: clamp(14px, 1.4vw, 26px) 9% 0 0; }
.casa-ring { --d: clamp(300px, 35vw, 680px); right: calc(var(--d) / -2); top: clamp(600px, 31vw, 600px); }

.work-title { margin: clamp(120px, 17vw, 330px) 0 clamp(40px, 3.6vw, 70px); }

.mosaic-wrap { position: relative; z-index: 2; padding: 0 2.9vw; }
.mosaic {
  --g: .73vw;
  display: grid; gap: var(--g);
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-rows: calc((94.2vw - 9 * var(--g)) / 10 * .4882);   /* navegadores sin container queries */
}
@supports (container-type: inline-size) {
  .mosaic-wrap { container-type: inline-size; }
  .mosaic { --g: .775cqw; grid-auto-rows: calc((100cqw - 9 * var(--g)) / 10 * .4882); }
}
.tile {
  position: relative; border-radius: clamp(8px, .9vw, 16px); overflow: hidden; background: var(--navy-2);
  grid-column: var(--c) / span var(--cs); grid-row: var(--r) / span var(--rs);
}
.tile button { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s; }
.tile::after {
  content: attr(data-title); position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.2em 1em .9em; font-family: var(--f-geo); font-weight: 600; font-size: clamp(11px, .75vw, 15px); letter-spacing: .02em; line-height: 1.25;
  color: var(--white); background: linear-gradient(transparent, rgba(30, 31, 42, .88));
  opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .5s var(--ease); pointer-events: none;
}
.tile:hover img, .tile:focus-within img { transform: scale(1.06); }
.tile:hover::after, .tile:focus-within::after { opacity: 1; transform: none; }

/* ============================================================
   MARCAS
   ============================================================ */
.marcas { background: var(--yellow); color: var(--navy); padding: clamp(100px, 14vw, 270px) 0 clamp(80px, 9vw, 170px); margin-top: clamp(40px, 3vw, 60px); overflow: hidden; }
.marcas-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(3rem, 6.25vw, 7.8rem); line-height: 1; letter-spacing: -.01em; }
.marcas-sub { margin-top: 18px; font-family: var(--f-geo); font-weight: 500; font-size: clamp(15px, 1.25vw, 24px); letter-spacing: .02em; max-width: 36ch; }
.marquee { margin-top: clamp(50px, 6vw, 110px); display: grid; gap: clamp(26px, 3vw, 54px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-row { --mgap: clamp(40px, 5vw, 96px); display: flex; width: max-content; gap: var(--mgap); align-items: center; will-change: transform; }
.brand { flex: none; height: clamp(34px, 3.4vw, 64px); display: grid; place-items: center; opacity: .88; transition: opacity .3s, transform .4s var(--ease); }
.brand:hover { opacity: 1; transform: scale(1.06); }
.brand-logo { height: calc(100% * var(--s, .7)); /* --s: ajuste óptico según proporción (main.js) */ aspect-ratio: var(--ar, 3); background: var(--navy); -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.brand-name { font-family: var(--f-geo); font-weight: 700; font-size: clamp(18px, 1.75vw, 34px); letter-spacing: -.01em; white-space: nowrap; }
.marquee.is-static { -webkit-mask-image: none; mask-image: none; padding: 0 var(--pad); }
.marquee.is-static .marquee-row { width: auto; flex-wrap: wrap; gap: 24px 48px; }

/* ============================================================
   CTA FINAL
   ============================================================ */
.cta { position: relative; background: var(--navy); color: var(--white); border-top: clamp(16px, 3.6vw, 70px) solid var(--yellow); border-bottom: clamp(10px, 1.6vw, 30px) solid var(--yellow); padding: clamp(80px, 7.3vw, 140px) 0 clamp(80px, 8.8vw, 170px); }
.cta-title { font-family: var(--f-geo); font-weight: 800; font-size: clamp(2.4rem, 6.4vw, 8rem); line-height: 1.16; letter-spacing: .005em; text-shadow: 3px 4px 6px rgba(0,0,0,.35); }
.cta-title .o-ring { width: .74em; height: .74em; }
.cta-form { margin-top: clamp(14px, 1vw, 24px); max-width: 1220px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px clamp(16px, 1.4vw, 28px); }
.cta-sub { color: var(--grey); font-size: clamp(15px, 1.35vw, 26px); }
.cta-field { position: relative; flex: 1 1 320px; max-width: 520px; display: flex; align-items: center; background: var(--teal); border-radius: 999px; box-shadow: 4px 5px 8px rgba(0,0,0,.35); transition: box-shadow .4s, transform .4s var(--ease); }
.cta-field:focus-within { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(46, 158, 163, .45); }
.cta-field input { flex: 1; min-width: 0; height: clamp(44px, 2.9vw, 56px); background: transparent; border: 0; outline: none; color: var(--white); font: inherit; font-size: clamp(15px, 1.05vw, 20px); padding: 0 1.2em; }
.cta-field input::placeholder { color: rgba(255,255,255,.75); }
.cta-field button { width: clamp(38px, 2.5vw, 48px); height: clamp(38px, 2.5vw, 48px); margin-right: 4px; border-radius: 50%; background: var(--white); color: var(--teal); font-weight: 700; font-size: 1.15rem; transition: transform .4s var(--ease); }
.cta-field button:hover { transform: translateX(3px); }
.cta-note { flex-basis: 100%; font-size: .82rem; color: var(--grey); }
.cta-note .link-btn { color: var(--white); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--white); color: var(--navy); padding: clamp(28px, 2.4vw, 46px) 0 26px; }
.footer .wrap { padding: 0 clamp(20px, 3.4vw, 66px); }
.footer-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.footer-group { display: grid; gap: clamp(14px, 1.8vw, 34px); font-size: clamp(14px, 1.15vw, 22px); }
.footer-ladv { height: clamp(56px, 4.4vw, 84px); width: auto; margin-left: clamp(30px, 3.8vw, 72px); }
.footer-brand { display: grid; justify-items: end; gap: clamp(18px, 2.4vw, 46px); }
.footer-mail { font-family: var(--f-geo); font-weight: 600; color: var(--teal); font-size: clamp(16px, 1.45vw, 28px); letter-spacing: .02em; }
.footer-mail:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-logo { width: clamp(170px, 15.2vw, 292px); }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: clamp(26px, 2.6vw, 50px); padding-top: 16px; border-top: 1px solid #e6e6ea; font-size: .82rem; color: #6c6e80; }
.footer-legal div { display: flex; gap: 22px; flex-wrap: wrap; }

/* ============================================================
   VISTA AMPLIADA (lightbox)
   ============================================================ */
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: clamp(56px, 6vw, 90px) clamp(16px, 7vw, 120px); background: rgba(24, 25, 33, .94); color: var(--white); }
.lightbox[open] { display: grid; place-items: center; animation: fade .35s ease; }
.lightbox::backdrop { background: transparent; }
.lb-figure { max-width: 100%; max-height: 100%; display: grid; gap: 16px; justify-items: center; }
.lb-img { max-width: 100%; max-height: calc(100svh - 220px); width: auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb-caption { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-family: var(--f-geo); }
.lb-title { display: block; font-size: 1.05rem; }
.lb-client { color: var(--yellow); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.lb-web { border: 2px solid var(--teal); border-radius: 999px; padding: .45em 1.1em; font-weight: 600; font-size: .9rem; }
.lb-web:hover { background: var(--teal); }
.lb-btn { position: fixed; z-index: 2; width: 48px; height: 48px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 1.1rem; display: grid; place-items: center; transition: transform .3s var(--ease); }
.lb-btn:hover { transform: scale(1.1); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: calc(50% - 24px); }
.lb-next { right: 18px; top: calc(50% - 24px); }
@keyframes fade { from { opacity: 0; } }

/* ============================================================
   POPUPS (contacto + legales)
   ============================================================ */
.legal { width: min(820px, calc(100% - 28px)); max-height: min(88vh, 920px); margin: auto; border: 0; border-radius: 26px; padding: 0; background: var(--white); color: var(--navy); box-shadow: 0 40px 100px rgba(0,0,0,.4); }
.legal::backdrop { background: rgba(24, 25, 33, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.legal[open] { animation: dlgIn .45s var(--ease); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.legal-close { position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; width: 42px; height: 42px; border-radius: 50%; background: var(--yellow); font-weight: 700; z-index: 1; transition: transform .4s var(--ease); }
.legal-close:hover { transform: rotate(90deg); }
.legal-body { padding: clamp(28px, 5vw, 56px); padding-top: clamp(20px, 3vw, 40px); }
.legal-body h2 { font-family: var(--f-geo); font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; letter-spacing: -.01em; margin-bottom: 20px; }
.legal-body h3 { font-family: var(--f-geo); font-size: 1.1rem; font-weight: 700; margin: 28px 0 10px; }
.legal-body p, .legal-body li { font-size: .95rem; line-height: 1.75; color: #45475a; }
.legal-body p + p { margin-top: .8em; }
.legal-body ul { margin: 10px 0 0 20px; display: grid; gap: 10px; list-style: disc; }
.legal-body a { text-decoration: underline; text-underline-offset: 3px; }
body.dlg-open { overflow: hidden; }

.contact .legal-body h2 { display: flex; align-items: center; gap: .08em; font-family: var(--f-body); font-weight: 600; }
.contact .legal-body h2 .wordmark-moss { height: .74em; color: var(--yellow); margin-top: .1em; }
.contact-lead { margin-bottom: 26px; }
.contact-form { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { position: relative; }
.field input, .field textarea { width: 100%; border: 0; border-bottom: 1.5px solid #cfd0da; background: transparent; padding: 22px 0 10px; font: inherit; color: var(--navy); outline: none; resize: vertical; border-radius: 0; transition: border-color .3s; }
.field textarea { min-height: 110px; }
.field label { position: absolute; left: 0; top: 22px; color: #7c7e90; pointer-events: none; transition: all .3s var(--ease); }
.field input:focus, .field textarea:focus { border-color: var(--teal); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { top: 0; font-size: .74rem; font-weight: 700; color: var(--teal); letter-spacing: .04em; }
.field.is-invalid input, .field.is-invalid textarea { border-color: #d64545; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .88rem; color: #45475a; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--teal); flex: none; }
.check.is-invalid { color: #d64545; }
.btn-send { justify-self: start; background: var(--navy); color: var(--white); border-radius: 999px; padding: .85em 1.8em; font-family: var(--f-geo); font-weight: 700; letter-spacing: .04em; transition: background .3s, transform .4s var(--ease); }
.btn-send:hover { background: var(--teal); transform: translateY(-2px); }
.btn-send span { display: inline-block; transition: transform .4s var(--ease); }
.btn-send:hover span { transform: translateX(4px); }
.form-status { font-size: .92rem; font-weight: 600; min-height: 1.4em; }
.form-status.ok { color: #1f7a3d; }
.form-status.err { color: #c03a3a; }
.contact-direct { margin-top: 18px; font-size: .9rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .eco-grid { grid-template-columns: 1fr; justify-items: center; }
  .eco .wrap { padding: 0 var(--pad); }
  .eco-visual { max-width: 460px; }
  .eco-list { justify-self: stretch; max-width: 520px; margin: 0 auto; }
  .casa-grid { grid-template-columns: 1fr; padding-right: var(--pad); gap: 30px; }
  .casa-dot { grid-column: 1; }
  .adn-panel { width: 22%; }
  .adn-helix { width: 46%; opacity: .9; }
  .adn-inner { max-width: 80%; }
}

@media (max-width: 760px) {
  :root { --pad: 22px; }
  body { font-size: 16px; }
  .header-nav { gap: 14px; }
  .header-nav a:not(.hablemoss) { display: none; }
  .hero { min-height: 92svh; }
  .hero-ring { --d: 330px; }
  .hero-dot { right: 30%; bottom: 22%; }
  .intro-sub { margin-left: 0; }
  .intro-title br { display: none; }
  .adn { padding-bottom: 300px; }
  .adn-panel { top: auto; height: 260px; width: 100%; }
  .adn-helix { top: auto; bottom: 0; height: 330px; width: 100%; }
  .adn-inner { max-width: 100%; }
  .casa-dot, .casa-ring { display: none; }
  .work-title { margin-top: 90px; }
  .mosaic-wrap { padding: 0 12px; }
  .mosaic { display: block; columns: 2; column-gap: 10px; }
  .tile { break-inside: avoid; margin-bottom: 10px; aspect-ratio: var(--ar); border-radius: 10px; }
  .tile::after { opacity: 1; transform: none; font-size: 11px; padding: 1.6em .8em .7em; }
  .field-row { grid-template-columns: 1fr; }
  .footer-brand { justify-items: start; }
  .cta-title { font-size: 8.4vw; }
  .marcas-title { font-size: 13vw; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; }
}

/* ============================================================
   PLAN B · MOTORES SIN GSAP
   anim-lite: móvil/tableta/equipos modestos/GSAP no cargado → transiciones CSS
   anim-calm: "Reducir movimiento" → solo fundidos, sin desplazamientos
   Todo va bajo .js: si el JS falla, el aviso de 3 s quita .js y todo se ve.
   ============================================================ */
@keyframes mFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mUp   { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes mLine { from { transform: translateY(110%); } to { transform: none; } }
@keyframes mPop  { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes mRing { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes marq  { to { transform: translate3d(-50%, 0, 0); } }

/* ── Ligero: hero ── */
.anim-lite.ready .header                    { animation: mFade .9s ease .1s both; }
.anim-lite.ready .hero .eyebrow             { animation: mUp .9s var(--ease) .15s both; }
.anim-lite.ready .hero-title .line > span   { animation: mLine 1.1s var(--ease) both; animation-delay: calc(.25s + var(--i, 0) * .12s); }
.anim-lite.ready .hero-title .o-ring        { animation: mPop .9s cubic-bezier(.34, 1.56, .64, 1) .85s both; }
.anim-lite.ready .hero-sub                  { animation: mUp .9s var(--ease) .9s both; }
.anim-lite.ready .hero-ring                 { animation: mRing 1.4s var(--ease) .3s both; }
.anim-lite.ready .hero-dot                  { animation: mPop .8s cubic-bezier(.34, 1.56, .64, 1) 1s both; }

/* ── Ligero: bloques que entran al hacer scroll ── */
.js.anim-lite .reveal    { transition: opacity .8s ease, transform .9s var(--ease); }
.js.anim-lite .reveal.in { opacity: 1; transform: none; }

.js.anim-lite #introTitle .w    { opacity: .12; transform: translateY(24px); transition: opacity .7s ease, transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
.js.anim-lite #introTitle.in .w { opacity: 1; transform: none; }

.js.anim-lite .eco-donut     { opacity: 0; transform: scale(.75) rotate(-30deg); transition: opacity .8s ease, transform 1.3s var(--ease); }
.js.anim-lite .eco-hole      { transform: scale(.3); transition: transform 1s cubic-bezier(.34, 1.4, .64, 1) .35s; }
.js.anim-lite .eco-core img  { opacity: 0; transform: scale(.6); transition: opacity .6s ease .7s, transform .8s cubic-bezier(.34, 1.56, .64, 1) .7s; }
.js.anim-lite .eco.in .eco-donut, .js.anim-lite .eco.in .eco-hole { opacity: 1; transform: none; }
.js.anim-lite .eco.in .eco-core img { opacity: 1; transform: translateY(-4%); }

.js.anim-lite .pill { opacity: 0; transform: scale(.6); transition: opacity .45s ease, transform .55s cubic-bezier(.34, 1.56, .64, 1), background-color .5s, border-color .5s, color .5s; }
.js.anim-lite .pills:not(.done) .pill { transition-delay: calc(var(--i, 0) * 32ms); }
.js.anim-lite .pills.in .pill     { opacity: 1; transform: none; }
.js.anim-lite .pills.in .pill.out { opacity: 0; transform: scale(.7); }

.js.anim-lite .tile    { opacity: 0; transform: translateY(26px) scale(.96); transition: opacity .7s ease var(--d, 0ms), transform .9s var(--ease) var(--d, 0ms); }
.js.anim-lite .tile.in { opacity: 1; transform: none; }

.js.anim-lite .cta-title .line > span    { transform: translateY(110%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 130ms); }
.js.anim-lite .cta-title.in .line > span { transform: none; }
.js.anim-lite .cta-title .o-ring         { transform: scale(0); transition: transform .8s cubic-bezier(.34, 1.56, .64, 1) .55s; }
.js.anim-lite .cta-title.in .o-ring      { transform: none; }
.js.anim-lite .cta-field                 { transform: scaleX(0); transform-origin: left center; transition: transform 1.1s var(--ease) .3s; }
.js.anim-lite .cta-form.in .cta-field    { transform: none; }

/* Cinta de marcas movida por CSS (la mueve la GPU, sin JavaScript por fotograma) */
.marquee-css .marquee-row { padding-right: var(--mgap); animation: marq 60s linear infinite; }
.marquee-css .marquee-row:nth-child(2) { animation-direction: reverse; }
.marquee-css.paused .marquee-row { animation-play-state: paused; }

/* ── Suave ("Reducir movimiento"): todo aparece con fundidos, nada se desplaza ── */
.js.anim-calm .hero-title .line > span, .js.anim-calm .hero-title .o-ring,
.js.anim-calm .hero-dot, .js.anim-calm .hero-ring { transform: none; }
.js.anim-calm .hero-title { opacity: 0; }
.anim-calm.ready .header, .anim-calm.ready .hero .eyebrow, .anim-calm.ready .hero-title,
.anim-calm.ready .hero-sub, .anim-calm.ready .hero-ring { animation: mFade .7s ease .1s both; }
.js.anim-calm .reveal    { transform: none; transition: opacity .6s ease; }
.js.anim-calm .reveal.in { opacity: 1; }
.js.anim-calm .eco-donut { opacity: 0; transition: opacity .7s ease; }
.js.anim-calm .eco.in .eco-donut { opacity: 1; }
.js.anim-calm .tile    { opacity: 0; transition: opacity .6s ease var(--d, 0ms); }
.js.anim-calm .tile.in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .legal[open], .lightbox[open] { animation: none; }
}
