/* Cortez Imagen — sitio por páginas. La imagen manda, el texto acompaña.
   Fondo petróleo profundo; la grilla de trabajos sobre papel claro para que las fotos respiren. */
:root {
  --bg: #0B1F2A;
  --bg-2: #12303F;
  --paper: #F2F5F4;
  --ink: #F2F5F4;
  --ink-dark: #0B1F2A;
  --muted: #AEB8BD;
  --muted-dark: #4F6470;
  --line: #1F3A48;
  --line-dark: #D2DBDE;
  --verde: #59AA47;
  --verde-hover: #6CBB59;
  --verde-claro: #B4D1A2;
  --verde-texto: #3E7F31;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p, li, dd, blockquote { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--verde); outline-offset: 3px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.band { padding-block: clamp(64px, 10vw, 140px); }
.band--paper { background: var(--paper); color: var(--ink-dark); }

/* Tipografía */
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--verde); }
.band--paper .eyebrow { color: var(--verde-texto); }
.display { font-weight: 700; font-size: clamp(32px, 5vw, 68px); line-height: 1.04; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.display .lt { font-weight: inherit; }
.display em { font-style: normal; color: var(--verde); }
.h2 { font-weight: 700; font-size: clamp(32px, 5vw, 68px); line-height: 1.04; letter-spacing: -.03em; margin: 12px 0 0; text-wrap: balance; }
.lead { text-wrap: pretty; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 34em; margin: 0; }

/* Encabezado */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.top .logo img { height: 46px; width: auto; }
.menu-btn { background: none; border: 0; color: var(--ink); font: 500 15px var(--sans); letter-spacing: .04em; display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 8px 0; }
.menu-btn .bars { width: 34px; height: 12px; position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease); }
.menu-btn .bars::before { top: 0; } .menu-btn .bars::after { top: 10px; }
.menu-open .menu-btn .bars::before { top: 5px; transform: rotate(20deg); }
.menu-open .menu-btn .bars::after { top: 5px; transform: rotate(-20deg); }

/* Menú a pantalla completa */
.menu { position: fixed; inset: 0; z-index: 19; background: var(--bg); display: grid; place-items: center; padding: 96px var(--gutter-r) 40px var(--gutter); clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease); visibility: hidden; }
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; }
.menu-stage { position: relative; width: min(1100px, 100%); display: grid; place-items: center; }
.menu-img { position: absolute; width: min(520px, 70vw); aspect-ratio: 4/5; overflow: hidden; }
.menu-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity .6s var(--ease), transform 1.2s var(--ease); filter: brightness(.55); }
.menu-img img.on { opacity: 1; transform: scale(1); }
.menu ul { list-style: none; margin: 0; padding: 0; position: relative; justify-self: start; }
.menu li { overflow: hidden; }
.menu a { display: block; text-decoration: none; font-weight: 700; font-size: clamp(36px, 6.5vw, 72px); line-height: 1.1; letter-spacing: -.03em; transform: translateY(105%); transition: transform .7s var(--ease), color .25s; }
.menu-open .menu a { transform: none; }
.menu li:nth-child(2) a { transition-delay: .05s, 0s; } .menu li:nth-child(3) a { transition-delay: .1s, 0s; }
.menu li:nth-child(4) a { transition-delay: .15s, 0s; } .menu li:nth-child(5) a { transition-delay: .2s, 0s; }
.menu a:hover, .menu a:focus-visible, .menu a:active { color: var(--verde); }
.menu-foot { position: absolute; left: var(--gutter); right: var(--gutter-r); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; color: var(--muted); }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 18px 30px; border-radius: 999px; background: var(--verde); color: var(--ink-dark); text-decoration: none; font-weight: 500; font-size: 17px; transition: background .2s, transform .3s var(--ease); }
.btn:hover { background: var(--verde-hover); transform: translateY(-2px); }
.btn svg { width: 22px; height: 22px; }
.arrow-link { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.arrow-link span { transition: transform .3s var(--ease); }
.arrow-link:hover span { transform: translateX(6px); }

/* Hero */
.hero { padding-block: clamp(48px, 9vw, 120px) clamp(40px, 6vw, 72px); }
.hero .lead { margin-top: clamp(24px, 3vw, 40px); }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: inline-block; animation: rise 1.1s var(--ease) both; }
.line:nth-child(2) > span { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.hero .lead, .hero .scroll-hint { animation: fade 1s .5s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.scroll-hint { margin-top: 40px; display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); text-decoration: none; }
.scroll-hint i { width: 1px; height: 36px; background: var(--muted); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: -36px; width: 1px; height: 36px; background: var(--verde); animation: drip 1.8s infinite; }
@keyframes drip { to { top: 36px; } }

/* Palabra gigante que se desliza con el scroll */
.giant { font-weight: 700; font-size: clamp(96px, 22vw, 340px); line-height: .8; letter-spacing: -.05em; white-space: nowrap; color: transparent; -webkit-text-stroke: 1.2px var(--ink-dark); margin: 0 0 clamp(-60px, -4vw, -20px); pointer-events: none; will-change: transform; }

/* Grilla de trabajos */
.works { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: start; position: relative; }
.works .col { display: grid; gap: clamp(56px, 8vw, 120px); }
.works .col:last-child { margin-top: clamp(80px, 14vw, 220px); }
.work { display: block; text-decoration: none; color: inherit; }
.work .frame { overflow: hidden; position: relative; background: #DDE4E6; }
.work .frame img, .work .frame video { width: 100%; height: auto; transition: transform 1.2s var(--ease); }
.work:hover .frame img, .work:hover .frame video { transform: scale(1.045); }
.work h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; letter-spacing: -.02em; margin: 20px 0 6px; line-height: 1.2; }
.work .tags { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--verde-texto); padding-bottom: 18px; border-bottom: 1px solid var(--line-dark); display: flex; justify-content: space-between; gap: 12px; }
.work .tags b { font-weight: 500; color: var(--muted-dark); letter-spacing: .04em; text-transform: none; font-size: 14px; white-space: nowrap; }
.works-note { margin: clamp(48px, 7vw, 96px) 0 0; font-size: 15px; color: var(--muted-dark); }

/* Marcas: cinta que corre */
.marquee { overflow: hidden; margin-top: clamp(40px, 6vw, 72px); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; align-items: center; gap: clamp(48px, 7vw, 96px); list-style: none; margin: 0; padding: 0 clamp(24px, 3.5vw, 48px); }
.marquee li { width: clamp(96px, 10vw, 140px); height: clamp(96px, 10vw, 140px); display: grid; place-items: center; }
.marquee img { max-height: 100%; max-width: 100%; opacity: .85; transition: opacity .3s; }
.marquee li:hover img { opacity: 1; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Servicios: carrusel que se arrastra */
.svc-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.drag-hint { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.carousel { margin-top: clamp(40px, 5vw, 64px); display: flex; gap: clamp(20px, 3vw, 40px); overflow-x: auto; scroll-snap-type: x mandatory; padding-left: max(var(--gutter), calc((100vw - 1240px) / 2 + 16px)); padding-right: var(--gutter-r); scroll-padding-left: max(var(--gutter), calc((100vw - 1240px) / 2 + 16px)); scrollbar-width: none; cursor: grab; }
.carousel::-webkit-scrollbar { display: none; }
.carousel.dragging { cursor: grabbing; scroll-snap-type: none; }
.carousel.dragging * { pointer-events: none; }
.svc { flex: 0 0 min(78vw, 520px); scroll-snap-align: start; }
.svc .frame { aspect-ratio: 3/2; overflow: hidden; background: var(--bg-2); }
.svc .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); user-select: none; -webkit-user-drag: none; }
.svc:hover .frame img { transform: scale(1.04); }
.svc h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; letter-spacing: -.02em; margin: 22px 0 8px; line-height: 1.2; }
.svc p { margin: 0; color: var(--muted); max-width: 30em; }
.svc .for { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--verde); }
.svc-note { margin-top: 40px; color: var(--muted); font-size: 15px; }

/* Por qué */
.why { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.why ul { list-style: none; margin: clamp(28px, 4vw, 48px) 0 36px; padding: 0; display: grid; gap: 0; }
.why li { font-size: clamp(19px, 1.8vw, 23px); font-weight: 500; letter-spacing: -.01em; padding: 18px 0; border-top: 1px solid var(--line); display: flex; gap: 18px; }
.why li::before { content: ""; flex: 0 0 9px; height: 9px; border-radius: 50%; background: var(--verde); margin-top: .55em; }
.why figure { margin: 0; overflow: hidden; }
.why figure img { width: 100%; height: auto; }
.why figcaption, .cap { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Cierre */
.cta { text-align: left; }
.cta .row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 36px; margin-top: clamp(32px, 4vw, 48px); }
.contact-lines { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--muted); font-size: 16px; }
.contact-lines a { text-decoration: none; border-bottom: 1px solid var(--line); }
.foot { border-top: 1px solid var(--line); padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* WhatsApp flotante */
.float { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: 60px; height: 60px; border-radius: 50%; background: var(--verde); color: var(--ink-dark); display: grid; place-items: center; z-index: 18; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .3s var(--ease); }
.float:hover { transform: scale(1.08); }
.float svg { width: 28px; height: 28px; }

/* Página de caso */
.case-hero { padding-block: clamp(40px, 7vw, 96px) clamp(32px, 5vw, 64px); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px 40px; margin-top: clamp(32px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); }
.facts dt { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--verde); margin-bottom: 6px; }
.facts dd { margin: 0; color: var(--ink); }
.facts a { text-decoration: none; border-bottom: 1px solid var(--verde); }
.gallery { display: grid; gap: clamp(12px, 2vw, 24px); }
.strip { display: flex; gap: clamp(12px, 2vw, 24px); align-items: flex-start; }
.strip > * { flex: var(--r) 1 0; aspect-ratio: var(--r); min-width: 0; max-width: 100%; overflow: hidden; position: relative; background: var(--bg-2); }
.strip img, .strip video { width: 100%; height: 100%; object-fit: cover; }
.strip .contain { background: #FFFFFF; }
.strip .contain img { object-fit: contain; padding: 8%; }
@media (max-width: 700px) { .strip { flex-wrap: wrap; } .strip > .full { flex-basis: 100%; } }
.story { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.story p { margin: 0; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); }
.quote { margin: 0; font-size: clamp(22px, 2.4vw, 32px); font-weight: 200; line-height: 1.3; letter-spacing: -.01em; }
.quote cite { display: block; margin-top: 18px; font-style: normal; font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.quote cite b { color: var(--ink); font-weight: 500; }
.next { display: block; text-decoration: none; border-top: 1px solid var(--line); padding-top: 28px; }
.next .eyebrow { display: block; margin-bottom: 8px; }
.next .h2 span { display: inline-block; transition: transform .4s var(--ease); color: var(--verde); }
.next:hover .h2 span { transform: translateX(14px); }

/* Comparador antes/después */
.slider { position: relative; user-select: none; }
.slider img { position: absolute; inset: 0; }
.slider .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.slider input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.slider .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: #FFFFFF; pointer-events: none; }
.slider .handle::after { content: "↔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #FFFFFF; color: var(--ink-dark); display: grid; place-items: center; font-size: 18px; }
.slider .lbl { position: absolute; top: 12px; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; background: rgba(11, 31, 42, .8); padding: 5px 10px; border-radius: 999px; pointer-events: none; }
.slider .lbl.l { left: 12px; } .slider .lbl.r { right: 12px; }

/* Sobre mí y contacto */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about p { margin: 0 0 18px; font-size: clamp(18px, 1.5vw, 20px); color: var(--muted); }
.reasons { display: grid; gap: 28px; margin-top: 12px; }
.reasons h3 { margin: 0 0 6px; font-size: 21px; font-weight: 500; color: var(--verde); letter-spacing: -.01em; }
.reasons p { margin: 0; color: var(--muted); }
.clients { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 28px 0 0; }
.clients li { border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-size: 15px; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.contact .frame { overflow: hidden; }
.contact dl { display: grid; gap: 22px; margin: 36px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.contact dt { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--verde); margin-bottom: 4px; }
.contact dd { margin: 0; font-size: 19px; user-select: all; }

/* Cursor circular (solo mouse) */
.cursor { position: fixed; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--verde-claro); z-index: 40; pointer-events: none; display: none; place-items: center; color: var(--ink-dark); font-size: 13px; font-weight: 500; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), opacity .3s; mix-blend-mode: normal; }
.cursor span { opacity: 0; transition: opacity .2s; }
.cursor.big { width: 86px; height: 86px; margin: -43px 0 0 -43px; }
.cursor.big span { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cursor { display: grid; } }

/* Aparición al hacer scroll: solo lo que está fuera de la primera pantalla */
.reveal-ready .rv { opacity: 0; transform: translateY(48px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal-ready .rv.in { opacity: 1; transform: none; }
.reveal-ready .rv-img { clip-path: inset(12% 0 0 0); transition: clip-path 1.3s var(--ease); }
.reveal-ready .rv-img img, .reveal-ready .rv-img video { transform: scale(1.12); transition: transform 1.6s var(--ease); }
.reveal-ready .rv-img.in { clip-path: inset(0 0 0 0); }
.reveal-ready .rv-img.in img, .reveal-ready .rv-img.in video { transform: none; }

@media (max-width: 820px) {
  .works { grid-template-columns: 1fr; }
  .works .col { display: contents; }
  .works .col:last-child { margin-top: 0; }
  .works .work { margin-bottom: 40px; }
  .why, .story, .about, .contact { grid-template-columns: 1fr; }
  .top .logo img { height: 40px; }
  .menu-img { width: 76vw; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .rv, .reveal-ready .rv-img, .reveal-ready .rv-img img { opacity: 1; transform: none; clip-path: none; }
  .marquee-track { animation: none; }
}
