/* ===== Agregados: menú, portafolio, contacto, WhatsApp ===== */
:root { --font-display: 'Poppins', sans-serif; --font-body: 'Plus Jakarta Sans', sans-serif; --font-mono: 'DM Mono', monospace; }
body.menu-open { overflow: hidden; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* Tarjetas del ecosistema ahora son enlaces */
a.community-card { display: block; color: inherit; cursor: pointer; }
a.community-card:hover .card-arrow { transform: translate(3px, -3px); }
.card-arrow { transition: transform .25s; }

/* Menú */
.nav-shell { position: fixed; background: linear-gradient(#0a0a0aee, #0a0a0a00); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 40; }
.menu-overlay { position: fixed; inset: 0; z-index: 30; background: #0a0a0af7; display: flex; flex-direction: column; justify-content: center; padding: 120px 4.6vw 60px; }
.menu-overlay[hidden] { display: none; }
.menu-overlay ul { margin: 0; padding: 0; }
.menu-overlay li a { display: flex; align-items: baseline; gap: 22px; font-family: var(--font-display); font-weight: 800; letter-spacing: -.06em; font-size: clamp(44px, 8vw, 104px); line-height: 1.05; transition: color .2s; }
.menu-overlay li a:hover { color: var(--orange); }
.menu-overlay small { font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: .15em; color: var(--orange); }
.menu-cta { margin-top: 48px; width: max-content; font-family: var(--font-display); font-weight: 600; font-size: 14px; border-top: 1px solid #ffffff38; border-bottom: 1px solid #ffffff38; padding: 16px 0; display: flex; gap: 40px; }
.menu-cta span { color: var(--orange); }

/* Portafolio */
.portfolio { background: #0a0a0a; padding: 9vw 4.6vw; border-top: 1px solid #ffffff14; }
.portfolio-heading { max-width: 760px; margin-bottom: 56px; }
.portfolio-heading h2 { font-family: var(--font-display); letter-spacing: -.065em; margin: 0; font-size: clamp(44px, 5.3vw, 82px); line-height: .94; }
.portfolio-heading > p:last-child { color: #8f8c87; max-width: 480px; margin: 28px 0 0; font-size: 15px; line-height: 1.7; }
.portfolio-grid { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 15vw; gap: 10px; }
.work { position: relative; overflow: hidden; border: 0; padding: 0; background: #151515; cursor: pointer; text-align: left; color: #fff; border-radius: 2px; }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s, opacity .3s; opacity: .9; }
.work:hover img { transform: scale(1.04); opacity: 1; }
.work--wide { grid-column: span 2; }
.work--tall { grid-row: span 2; }
.work--big { grid-column: span 2; grid-row: span 2; }
.work figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px; background: linear-gradient(transparent, #000c); font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.work figcaption b { font-family: var(--font-display); font-size: 16px; letter-spacing: -.03em; text-transform: none; font-weight: 700; display: block; margin-top: 4px; }
.play { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--orange); display: grid; place-items: center; background: #0008; }
.play:before { content: ""; border-left: 12px solid var(--orange); border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; background: #000e; display: grid; place-items: center; padding: 60px 16px 24px; }
.lightbox[hidden] { display: none; }
.lightbox button { position: absolute; top: 14px; right: 20px; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }
.lightbox-body img, .lightbox-body video { max-width: min(92vw, 1400px); max-height: 82vh; display: block; }

/* Contacto */
.contact { background: var(--paper); color: #111; padding: 9vw 4.6vw; }
.contact h2 { font-family: var(--font-display); letter-spacing: -.065em; margin: 0 0 56px; font-size: clamp(44px, 5.3vw, 82px); line-height: .94; }
.contact-list { border-top: 1px solid #cecbc5; }
.contact-item { display: grid; grid-template-columns: 160px 1fr auto; align-items: center; gap: 20px; padding: 28px 0; border-bottom: 1px solid #cecbc5; transition: padding .25s, background .25s; }
.contact-item small { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #716e69; }
.contact-item strong { font-family: var(--font-display); font-size: clamp(22px, 3vw, 44px); letter-spacing: -.05em; font-weight: 700; word-break: break-word; }
.contact-item > span { color: var(--orange); font-size: 28px; }
.contact-item:hover { padding-left: 14px; }
.contact-item--main strong { color: var(--orange); }
.contact-cities { margin: 36px 0 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #716e69; display: flex; align-items: center; gap: 12px; }
.contact-cities i { width: 3px; height: 3px; border-radius: 50%; background: var(--orange); }

/* Botón flotante WhatsApp */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 56px; height: 56px; border-radius: 50%; background: var(--orange); color: #111; display: grid; place-items: center; box-shadow: 0 8px 30px #d96a1d55; transition: transform .2s; }
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 28px; height: 28px; }

@media (width <= 900px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 38vw; }
  .work--big { grid-column: span 2; grid-row: span 1; }
  .contact-item { grid-template-columns: 1fr auto; }
  .contact-item small { grid-column: 1 / -1; }
}
@media (width <= 560px) {
  .portfolio, .contact { padding: 80px 22px; }
  .portfolio-grid { grid-auto-rows: 44vw; gap: 6px; }
  .work--tall { grid-row: span 1; }
  .work figcaption { padding: 30px 10px 10px; font-size: 8px; }
  .work figcaption b { font-size: 13px; }
  .play { width: 34px; height: 34px; top: 10px; right: 10px; }
  .menu-overlay { padding: 100px 22px 40px; }
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}

/* ===== Animaciones ===== */
/* Entrada del hero */
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes popin { from { opacity: 0; transform: scale(.85) rotate(-8deg); } to { opacity: 1; transform: none; } }
.hero-copy .eyebrow { animation: rise .8s .1s both cubic-bezier(.2,.7,.2,1); }
.hero-copy h1 { animation: rise 1s .25s both cubic-bezier(.2,.7,.2,1); }
.hero-copy .hero-description { animation: rise 1s .45s both cubic-bezier(.2,.7,.2,1); }
.hero-copy .discover { animation: rise 1s .6s both cubic-bezier(.2,.7,.2,1); }
.nucleus-stage { animation: popin 1.4s .3s both cubic-bezier(.2,.7,.2,1); transition: translate .6s cubic-bezier(.2,.7,.2,1); }

/* Núcleo: brillo que respira y planetas en órbita */
@keyframes breathe { 0%,100% { box-shadow: 0 0 0 1px #d96a1d38, 0 0 70px #d96a1d22; } 50% { box-shadow: 0 0 0 1px #d96a1d66, 0 0 130px #d96a1d55; } }
.nucleus-core { animation: breathe 4s ease-in-out infinite; }
@keyframes orbit { to { transform: translate(-50%,-50%) rotate(360deg); } }
.orbiter { position: absolute; inset: 50%; border-radius: 50%; transform: translate(-50%,-50%); pointer-events: none; }
.orbiter span { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 14px var(--orange), 0 0 30px #d96a1d88; }
.orbiter--a { width: 42%; height: 42%; animation: orbit 14s linear infinite; }
.orbiter--b { width: 67%; height: 67%; animation: orbit 26s linear infinite reverse; }
.orbiter--b span { background: #fff; width: 5px; height: 5px; box-shadow: 0 0 10px #fff; }
.orbiter--c { width: 92%; height: 92%; animation: orbit 48s linear infinite; }
@keyframes twinkle { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.planet { animation: twinkle 3s ease-in-out infinite; }
.planet--two { animation-delay: 1s; } .planet--three { animation-delay: 2s; }
.satellite:before { animation: twinkle 2.4s ease-in-out infinite; }

/* Cinta de servicios */
.marquee { background: var(--orange); color: #111; overflow: hidden; padding: 18px 0; border-block: 1px solid #0003; }
.marquee-track { display: flex; align-items: center; gap: 34px; width: max-content; animation: marquee 32s linear infinite; }
.marquee span { font-family: var(--font-display); font-weight: 800; letter-spacing: -.04em; font-size: clamp(22px, 2.6vw, 38px); white-space: nowrap; }
.marquee i { width: 14px; height: 14px; border: 3px solid #111; border-radius: 50%; flex: none; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(46px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.community-card .card-node span { transition: transform .4s; }
.community-card:hover .card-node span { transform: scale(2.2); }
.community-card:hover .card-node { border-color: var(--orange); }

/* Portafolio: vista previa del video al pasar el mouse */
.work video.hover-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.work video.hover-preview.on { opacity: 1; }
.work figcaption, .work .play { z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-copy *, .nucleus-stage, .nucleus-core, .orbiter, .planet, .satellite:before, .marquee-track { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Filtros del portafolio */
.portfolio-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.portfolio-filters button { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #a29e98; background: none; border: 1px solid #ffffff2a; border-radius: 99px; padding: 10px 16px; cursor: pointer; transition: all .25s; }
.portfolio-filters button:hover { color: #fff; border-color: #fff6; }
.portfolio-filters button.on { background: var(--orange); border-color: var(--orange); color: #111; }
.work.is-hidden { display: none; }
@media (width <= 560px) {
  .portfolio-filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -22px; padding-inline: 22px; scrollbar-width: none; }
  .portfolio-filters::-webkit-scrollbar { display: none; }
  .portfolio-filters button { flex: none; }
}
