/* =========================================================
   FREELANCE PERÚ EXPERIENCES — BASE COMPARTIDA
   ========================================================= */
@view-transition { navigation: auto; }

:root {
  --noche: #0B0F14;
  --piedra: #151B22;
  --piedra-2: #1C242D;
  --oro: #E8B04A;
  --oro-claro: #F4CB7A;
  --terracota: #D9653B;
  --selva: #1F6B52;
  --turquesa: #2BB5A7;
  --arena: #F3E9D7;
  --arena-70: rgba(243, 233, 215, .74);
  --arena-50: rgba(243, 233, 215, .56);
  --rojo: #D91023;
  --accent: var(--oro);
  --linea: rgba(243, 233, 215, .12);

  --f-impacto: "Anton", "Bebas Neue", Impact, sans-serif;
  --f-editorial: "Fraunces", Georgia, serif;
  --f-texto: "Manrope", system-ui, sans-serif;
  --f-firma: "Caveat", cursive;

  /* escala tipográfica fluida */
  --t-mega: clamp(4.5rem, 19vw, 20rem);
  --t-h1: clamp(2.6rem, 6.4vw, 6rem);
  --t-h2: clamp(2.1rem, 4.6vw, 4.4rem);
  --t-h3: clamp(1.35rem, 2vw, 1.75rem);
  --t-lead: clamp(1.05rem, 1.35vw, 1.3rem);
  --t-body: 1rem;
  --t-label: .75rem;

  /* escala de espacios: 8 16 24 32 48 64 96 128 */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;
  --gutter: 64px;
  --header-h: 84px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}
@media (max-width: 899px) {
  :root { --gutter: 24px; --header-h: 68px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--noche); color: var(--arena);
  font-family: var(--f-texto); font-size: var(--t-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--oro); color: var(--noche); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* grano de película sobre todo el sitio */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 9000; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grano 1.2s steps(6) infinite;
}
@keyframes grano { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

/* ---------- tipografía utilitaria ---------- */
.impacto { font-family: var(--f-impacto); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; line-height: .92; }
.editorial { font-family: var(--f-editorial); font-style: italic; font-weight: 400; font-variation-settings: "SOFT" 100, "WONK" 1; }
.firma { font-family: var(--f-firma); font-weight: 600; color: var(--oro); }
.etiqueta {
  font-family: var(--f-texto); font-size: var(--t-label); font-weight: 700; letter-spacing: .24em;
  text-transform: uppercase; color: var(--arena-70); display: inline-flex; align-items: center; gap: 10px;
}
.etiqueta::before { content: ""; width: 28px; height: 1px; background: var(--accent); transition: background .8s; }
.oro { color: var(--oro); }
.contenedor { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- botones ---------- */
.btn {
  --bg: var(--oro); --fg: var(--noche);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 28px; border-radius: 999px; background: var(--bg); color: var(--fg);
  font-weight: 800; font-size: .95rem; letter-spacing: .02em; overflow: hidden; isolation: isolate;
  transition: box-shadow .5s var(--ease), background .4s;
  box-shadow: 0 10px 30px -12px rgba(232, 176, 74, .55);
  will-change: transform;
}
.btn::before { /* brillo dorado que barre */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .9s var(--ease);
}
.btn:hover::before { transform: translateX(120%); }
.btn:hover { box-shadow: 0 14px 40px -10px rgba(232, 176, 74, .8), 0 0 0 1px rgba(255,255,255,.2) inset; }
.btn--ghost { --bg: rgba(243,233,215,.06); --fg: var(--arena); box-shadow: inset 0 0 0 1px rgba(243,233,215,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--oro), 0 10px 30px -14px rgba(232,176,74,.6); }
.btn--wa { --bg: #1FAF5A; --fg: #fff; box-shadow: 0 10px 30px -12px rgba(31, 175, 90, .6); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn .btn__txt { position: relative; display: inline-block; }

/* ---------- encabezado ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 500; height: var(--header-h);
  display: flex; align-items: center; transition: background .5s, backdrop-filter .5s, box-shadow .5s, transform .6s var(--ease), opacity 1s .9s;
}
.site-header.is-solid {
  background: rgba(11, 15, 20, .62); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 1px 0 var(--linea);
}
.site-header.is-hidden { transform: translateY(-110%); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); width: 100%; padding-inline: var(--gutter); }
.marca { display: flex; align-items: center; gap: 12px; line-height: 1; }
.marca img { width: 44px; height: 44px; transition: transform 1.2s var(--ease); }
.marca:hover img { transform: rotate(180deg); }
.marca__txt { display: flex; flex-direction: column; }
.marca__f { font-family: var(--f-firma); font-size: 1.7rem; font-weight: 700; color: var(--arena); line-height: .9; }
.marca__p { font-family: var(--f-texto); font-weight: 800; font-size: .62rem; letter-spacing: .28em; color: var(--oro); }
.nav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 30px); }
.nav a { position: relative; font-size: .86rem; font-weight: 600; color: var(--arena-70); padding: 8px 0; transition: color .3s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--oro); transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--arena); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.header-cta { min-height: 44px; padding: 0 20px; font-size: .85rem; }
.menu-btn { display: none; width: 48px; height: 48px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(243,233,215,.3); position: relative; }
.menu-btn span { position: absolute; left: 14px; right: 14px; height: 2px; background: var(--arena); border-radius: 2px; transition: transform .5s var(--ease), top .5s var(--ease); }
.menu-btn span:nth-child(1) { top: 19px; } .menu-btn span:nth-child(2) { top: 27px; }
.menu-open .menu-btn span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { top: 23px; transform: rotate(-45deg); }
@media (max-width: 1180px) { .nav { display: none; } .menu-btn { display: block; } }
@media (max-width: 599px) { .header-cta { display: none; } .marca img { width: 38px; height: 38px; } .marca__f { font-size: 1.45rem; } }

/* ---------- menú a pantalla completa ---------- */
.menu {
  position: fixed; inset: 0; z-index: 450; display: grid; align-content: center;
  padding: calc(var(--header-h) + 16px) var(--gutter) 96px; visibility: hidden; pointer-events: none;
}
.menu__bg { position: absolute; inset: 0; background: var(--noche); clip-path: circle(0% at calc(100% - 48px) 40px); transition: clip-path .9s var(--ease-in-out); }
.menu__fotos { position: absolute; inset: 0; overflow: hidden; }
.menu__fotos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: scale(.96); transition: opacity .8s, transform 1.6s var(--ease); }
.menu__fotos img.fill { object-fit: cover; filter: none; }
.menu__fotos .on { opacity: .75; transform: scale(1); }
.menu__fotos::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,15,20,.9) 0%, rgba(11,15,20,.55) 50%, rgba(11,15,20,.15) 100%); }
.menu-open .menu { visibility: visible; pointer-events: auto; }
.menu-open .menu__bg { clip-path: circle(150% at calc(100% - 48px) 40px); }
.menu__links { position: relative; display: flex; flex-direction: column; gap: 2px; }
.menu__links a { display: flex; align-items: baseline; gap: 14px; font-family: var(--f-impacto); text-transform: uppercase; font-size: clamp(2.2rem, 9vw, 4.2rem); line-height: 1.08; color: var(--arena); overflow: hidden; }
.menu__links a small { font-family: var(--f-texto); font-size: .72rem; letter-spacing: .2em; color: var(--oro); }
.menu__links a span { display: inline-block; transform: translateY(110%); transition: transform .8s var(--ease), color .3s; }
.menu-open .menu__links a span { transform: none; }
.menu__links a:hover span, .menu__links a:focus-visible span { color: var(--oro); }
.menu__pie { position: relative; margin-top: var(--s5); display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: .9rem; color: var(--arena-70); opacity: 0; transition: opacity .6s .5s; }
.menu-open .menu__pie { opacity: 1; }
.menu-open { overflow: hidden; }

/* ---------- cortina de transición entre páginas ---------- */
.cortina { position: fixed; inset: 0; z-index: 8000; pointer-events: none; display: grid; place-items: center; }
.cortina__panel { position: absolute; inset: 0; background: linear-gradient(160deg, #10161d 0%, var(--noche) 60%); visibility: hidden; }
.cortina__panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--oro), transparent); box-shadow: 0 0 30px var(--oro); }
.cortina__logo { position: relative; width: 84px; height: 84px; opacity: 0; }
.cortina.is-cubriendo { pointer-events: auto; }

/* ---------- cursor propio ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 9500; pointer-events: none; display: none; }
.cursor__aro { position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 1px solid rgba(243,233,215,.6); display: grid; place-items: center; transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .35s, border-color .35s; }
.cursor__punto { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--oro); }
.cursor__txt { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--noche); opacity: 0; transition: opacity .25s; }
.cursor.is-link .cursor__aro { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--oro); background: rgba(232,176,74,.12); }
.cursor.is-label .cursor__aro { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--oro); border-color: var(--oro); }
.cursor.is-label .cursor__txt { opacity: 1; }
.cursor.is-label .cursor__punto, .cursor.is-link .cursor__punto { opacity: 0; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; } }

/* ---------- flotantes: WhatsApp y sonido ---------- */
.flotantes { position: fixed; z-index: 400; inset: auto 0 0 0; pointer-events: none; }
.fab { pointer-events: auto; position: fixed; bottom: 24px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.fab--wa { right: 6px; background: #1FAF5A; color: #fff; box-shadow: 0 10px 30px -8px rgba(31,175,90,.7); }
.fab--wa::before, .fab--wa::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #1FAF5A; animation: pulso 2.6s var(--ease) infinite; }
.fab--wa::after { animation-delay: 1.3s; }
@keyframes pulso { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
.fab--wa svg { width: 26px; height: 26px; }
.fab--sonido { left: 6px; background: rgba(21,27,34,.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(232,176,74,.45); }
@media (min-width: 900px) { .fab--wa { right: 6px; } .fab--sonido { left: 6px; } }
.ondas { display: flex; align-items: center; gap: 3px; height: 18px; }
.ondas i { width: 3px; height: 30%; border-radius: 2px; background: var(--oro); transition: height .3s; }
.sonando .ondas i { animation: onda 1s ease-in-out infinite; }
.ondas i:nth-child(2) { animation-delay: .15s !important; } .ondas i:nth-child(3) { animation-delay: .3s !important; } .ondas i:nth-child(4) { animation-delay: .45s !important; }
@keyframes onda { 0%,100% { height: 25%; } 50% { height: 100%; } }
.burbuja {
  pointer-events: auto; position: fixed; max-width: 250px; padding: 14px 16px; border-radius: 16px; font-size: .86rem; line-height: 1.4;
  background: rgba(21,27,34,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 20px 40px -20px #000, inset 0 0 0 1px var(--linea);
  opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .5s var(--ease), transform .5s var(--ease); visibility: hidden;
}
.burbuja.on { opacity: 1; transform: none; visibility: visible; }
.burbuja--wa { right: 6px; bottom: 88px; }
.burbuja--sonido { left: 6px; bottom: 88px; }
.burbuja b { color: var(--oro); }
.burbuja__cerrar { position: absolute; top: 6px; right: 8px; width: 24px; height: 24px; font-size: 16px; line-height: 1; color: var(--arena-50); }
.burbuja__acciones { display: flex; gap: 8px; margin-top: 10px; }
.burbuja__acciones button { padding: 6px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(243,233,215,.25); }
.burbuja__acciones button:first-child { background: var(--oro); color: var(--noche); box-shadow: none; }
/* mensaje junto al botón de sonido */
.pista-sonido {
  pointer-events: auto; position: fixed; left: 66px; bottom: 30px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px 0 10px; border-radius: 999px;
  background: rgba(21,27,34,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--arena); font-size: .82rem; font-weight: 700; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(232,176,74,.45), 0 12px 30px -14px #000;
  opacity: 0; visibility: hidden; transform: translateX(-12px) scale(.96); transform-origin: left center;
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s;
}
.pista-sonido.on { opacity: 1; visibility: visible; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease), visibility 0s; animation: pista-pulso 2.8s ease-in-out 1s infinite; }
.pista-sonido.chau { transform: translateX(-40px) scale(.6); }
.pista-sonido__flecha { display: grid; width: 16px; height: 16px; color: var(--oro); animation: pista-flecha 1.4s ease-in-out infinite; }
.pista-sonido__nota { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--oro); color: var(--noche); }
.pista-sonido__nota svg { width: 14px; height: 14px; }
.pista-sonido__flecha svg { width: 16px; height: 16px; }
.pista-sonido:hover { box-shadow: inset 0 0 0 1px var(--oro), 0 12px 30px -10px rgba(232,176,74,.5); }
@keyframes pista-pulso { 0%, 100% { box-shadow: inset 0 0 0 1px rgba(232,176,74,.45), 0 0 0 0 rgba(232,176,74,.35); } 50% { box-shadow: inset 0 0 0 1px rgba(232,176,74,.8), 0 0 0 8px rgba(232,176,74,0); } }
@keyframes pista-flecha { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }
@media (min-width: 900px) {
  .pista-sonido.mini { left: 6px; bottom: 86px; width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%; }
  .pista-sonido.mini .pista-sonido__txt, .pista-sonido.mini .pista-sonido__flecha { display: none; }
  .pista-sonido.mini .pista-sonido__nota { width: 30px; height: 30px; animation: nota-salto 1.2s ease-in-out infinite; }
}
@keyframes nota-salto { 50% { transform: translateY(-4px) rotate(-8deg); } }
.fab--sonido:not(.sonando)::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--oro); animation: pulso 2.8s var(--ease) infinite; }

/* celular: barra inferior propia para los flotantes */
@media (max-width: 899px) {
  .flotantes { height: 72px; background: linear-gradient(0deg, rgba(11,15,20,.92), rgba(11,15,20,0)); }
  .fab { bottom: 10px; }
  .fab--wa { right: 16px; } .fab--sonido { left: 16px; }
  .burbuja { left: 80px; right: 80px; bottom: 10px; max-width: none; min-height: 52px; padding: 8px 30px 8px 12px; font-size: .76rem; line-height: 1.3; border-radius: 14px; display: flex; align-items: center; gap: 8px; }
  .burbuja--wa, .burbuja--sonido { left: 80px; right: 80px; bottom: 10px; }
  .burbuja__acciones { margin: 0; flex: none; }
  .burbuja__acciones button:last-child { display: none; }
  .burbuja__cerrar { top: 50%; transform: translateY(-50%); right: 4px; }
  .pista-sonido { left: 76px; right: 76px; bottom: 12px; height: 48px; white-space: normal; line-height: 1.25; font-size: .76rem; padding: 0 12px 0 6px; border-radius: 14px; }
  body { padding-bottom: 0; }
}

/* ---------- pie de página ---------- */
.pie { position: relative; padding: var(--s7) 0 calc(var(--s5) + 72px); background: linear-gradient(180deg, var(--noche), #070a0e); border-top: 1px solid var(--linea); overflow: hidden; }
.pie__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s5); }
.pie h3 { font-family: var(--f-texto); font-size: var(--t-label); letter-spacing: .24em; text-transform: uppercase; color: var(--oro); margin: 0 0 var(--s3); }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pie a { color: var(--arena-70); transition: color .3s; }
.pie a:hover { color: var(--oro); }
.pie__lema { font-family: var(--f-firma); font-size: 1.6rem; color: var(--oro); margin: var(--s2) 0; }
.pie__texto { color: var(--arena-70); max-width: 34ch; margin: 0; }
.pie__redes { display: flex; gap: 10px; margin-top: var(--s3); }
.pie__redes a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--linea); transition: box-shadow .3s, color .3s; }
.pie__redes a:hover { box-shadow: inset 0 0 0 1px var(--oro); }
.pie__redes svg { width: 18px; height: 18px; }
.pie__mapa { margin-top: var(--s2); border-radius: 16px; overflow: hidden; aspect-ratio: 16/10; box-shadow: inset 0 0 0 1px var(--linea); filter: grayscale(.4) contrast(1.05); }
.pie__mapa iframe { width: 100%; height: 100%; border: 0; display: block; }
.pie__base { margin-top: var(--s6); padding-top: var(--s3); border-top: 1px solid var(--linea); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); font-size: .82rem; color: var(--arena-50); }
.pie__base .corazon { color: var(--rojo); }
@media (max-width: 1023px) { .pie__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .pie__grid { grid-template-columns: 1fr; } }

/* ---------- utilidades de foto sin recorte (regla C) ---------- */
.foto { position: relative; overflow: hidden; background: var(--piedra); }
.foto__fondo { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; opacity: .9; }
.foto__img { position: relative; width: 100%; height: 100%; object-fit: contain; }

/* reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  body::after { animation: none; }
}
