/* Bastidores Criativo · camada de cena: abertura em vidro, galeria, cards empilhados e rolagem fluida.
   Vem depois do style.css e usa as mesmas cores (variáveis no topo do style.css). */

html.lenis, html.lenis body { height: auto; }
.pill a { white-space: nowrap; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ================= Abertura ================= */
.hero2 { position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(38% 50% at 0% 0%, rgba(42,79,147,.45), transparent 70%), var(--dark); }
.rails2 { position: absolute; inset: 0 auto 0 50%; width: min(1240px, 88%); transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(169,196,224,.07) 0 1px, transparent 1px calc(100% / 6)); border-right: 1px solid rgba(169,196,224,.07);
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.halo { position: absolute; z-index: -1; pointer-events: none; width: 70vw; height: 70vw; max-width: 1000px; max-height: 1000px; right: -12vw; top: 50%; transform: translateY(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(42,79,147,.55), rgba(28,50,96,.22) 55%, transparent 75%); filter: blur(10px); }
.hero2grid { display: grid; grid-template-columns: 1.02fr 1fr; align-items: center; gap: 10px; padding-top: 120px; flex: 1; }
.hero2text { position: relative; z-index: 2; }
.hero2 h1 { font-size: clamp(54px, 6vw, 92px); font-weight: 400; line-height: 1.02; letter-spacing: -.055em; margin: 26px 0 26px; }
.hero2 h1 .w { display: inline-block; will-change: transform, filter, opacity; }
.hero2 h1 .soft { color: var(--soft); }
.hero2 p { color: var(--muted-d); font-size: 18px; line-height: 1.7; max-width: 450px; margin-bottom: 36px; }
.glass { position: relative; height: min(78vh, 700px); min-height: 420px; }
.glass canvas { position: absolute; inset: -10% -18% -10% -10%; width: 128% !important; height: 120% !important; display: block;
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 92%); mask-image: radial-gradient(closest-side, #000 40%, transparent 92%); }
.hero2 > .halo { display: none; }
.glass .fallback { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-18deg) scale(.85); }
.glass.gl .fallback { display: none; }
.hero2 .herofoot { margin-top: 10px; }
.scrollcue { display: inline-flex; align-items: center; gap: 12px; }
.scrollcue::after { content: ""; width: 1px; height: 26px; background: linear-gradient(var(--soft), transparent); animation: cue 2.2s cubic-bezier(.6,0,.2,1) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Palavras dos títulos que sobem ao entrar */
.split .sw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .sw > span { display: inline-block; will-change: transform; }

/* ================= Galeria: a pessoa rola e entra nos trabalhos ================= */
.gallery { position: relative; height: 280vh; background: var(--dark); }
.gallerypin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.gallerywall { position: absolute; left: 50%; top: 50%; width: 150vw; display: grid; gap: 18px; transform: translate(-50%, -50%) scale(.62); transform-origin: 50% 50%; will-change: transform; }
.gw-row { display: flex; gap: 18px; justify-content: center; will-change: transform; }
.gw-row img { flex: none; width: 27vw; aspect-ratio: 808 / 632; object-fit: cover; border-radius: 18px; border: 1px solid var(--proj-line); display: block; box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.gallerypin::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(52% 48% at 50% 50%, rgba(7,11,26,.97), rgba(7,11,26,.8) 55%, rgba(7,11,26,.45)); opacity: var(--veil, 1); }
.gallerytitle { position: relative; z-index: 2; text-align: center; max-width: 820px; padding: 0 6%; will-change: transform, opacity; }
.gallerytitle .eyebrow { justify-content: center; }
.gallerytitle h2 { font-size: clamp(42px, 5.6vw, 84px); letter-spacing: -.05em; line-height: 1.02; margin: 26px 0 22px; }
.gallerytitle h2 span { color: var(--soft); }
.gallerytitle p { color: var(--muted-d); font-size: 17px; line-height: 1.7; max-width: 520px; margin: auto; }

/* ================= Projetos em destaque: cards que se empilham ================= */
.showcase { background: var(--dark); padding: 40px 0 120px; }
.cards { display: grid; gap: 0; }
.scard { position: sticky; top: calc(96px + var(--n, 0) * 14px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0; min-height: min(76vh, 720px); margin-bottom: 9vh;
  border-radius: 26px; overflow: hidden; background: linear-gradient(160deg, #101a3a, var(--dark2) 55%); border: 1px solid var(--proj-line); box-shadow: 0 -20px 60px rgba(0,0,0,.45);
  transform-origin: 50% 0; will-change: transform, filter; }
.scard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(169,196,224,.85), rgba(169,196,224,0) 30%, rgba(169,196,224,0) 75%, rgba(169,196,224,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.scard-media { position: relative; overflow: hidden; background: var(--proj1); }
.scard-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.06); transition: transform 1.4s cubic-bezier(.2,.75,.15,1); }
.scard:hover .scard-media img { transform: scale(1.0); }
.scard-copy { padding: clamp(28px, 3.4vw, 52px); display: flex; flex-direction: column; gap: 18px; justify-content: center; min-width: 0; }
.scard .kind, .morework .kind { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.scard h3 { font-size: clamp(36px, 3.8vw, 58px); font-weight: 400; letter-spacing: -.045em; line-height: 1; }
.scard p { color: var(--muted-d); font-size: 16px; line-height: 1.7; max-width: 46ch; }
.scard ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.scard li { font-size: 13px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line-d); color: var(--on-dark); background: rgba(255,255,255,.03); }
.scard .compare { max-width: 440px; }
.scard-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 6px; }
.button.ghost { background: rgba(255,255,255,.04); color: var(--on-dark); cursor: pointer; font: inherit; font-size: 14px; }
.button.ghost .arr { color: var(--accent); }
.button.small { padding: 13px 18px; gap: 16px; font-size: 13px; }
.vnav .button.small { margin-left: auto; }

.morework { margin-top: 30px; border-top: 1px solid var(--line-d); padding-top: 34px; }
.morehead { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 22px; font-size: 14px; color: var(--muted-d); }
.moregrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.mini { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; display: grid; gap: 12px; }
.mini img { width: 100%; aspect-ratio: 808 / 632; object-fit: cover; border-radius: 14px; border: 1px solid var(--proj-line); display: block; transition: transform .7s cubic-bezier(.2,.75,.15,1), filter .7s; filter: brightness(.85); }
.mini:hover img, .mini:focus-visible img { transform: translateY(-6px); filter: none; }
.mini span { display: grid; gap: 3px; font-size: 13px; color: var(--muted-d); }
.mini b { font-weight: 500; font-size: 16px; color: var(--on-dark); }

/* ================= Processo: fica parado enquanto as etapas acendem ================= */
@media (min-width: 701px) {
  .process.pinned { height: 230vh; padding: 0; }
  .process.pinned .processpin { position: sticky; top: 0; min-height: 100vh; display: flex; align-items: center; padding: 90px 0 40px; }
  .process.pinned .processpin > .container { width: min(1240px, 88%); }
}

/* ================= Manifesto: as palavras acendem com a rolagem ================= */
.manifesto p .mw { display: inline-block; opacity: .16; transition: opacity .2s linear; }
.manifesto p .mw.on { opacity: 1; }
.manifesto p .mw.sky { color: var(--soft); }

/* Contato com o mesmo halo da abertura */
.contact .halo { left: 50%; right: auto; top: 0; transform: translate(-50%, -45%); width: 900px; height: 900px; }

/* ================= Celular ================= */
@media (max-width: 1000px) {
  .hero2grid { grid-template-columns: 1fr; padding-top: 110px; }
  .glass { height: 52vh; min-height: 340px; order: -1; margin-bottom: -40px; }
  .hero2 { justify-content: flex-start; }
  .scard { grid-template-columns: 1fr; min-height: 0; }
  .scard-media { aspect-ratio: 808 / 632; }
  .moregrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .hero2 h1 { font-size: clamp(44px, 12vw, 60px); margin: 18px 0; }
  .hero2 p { font-size: 16px; }
  .glass { height: 44vh; min-height: 300px; margin-bottom: -30px; }
  .gallery { height: 220vh; }
  .gw-row img { width: 46vw; border-radius: 12px; }
  .gallerywall, .gw-row { gap: 10px; }
  .gallerytitle h2 { font-size: 40px; }
  .gallerytitle p { font-size: 15px; }
  .showcase { padding-bottom: 70px; }
  .scard { position: relative; top: 0; margin-bottom: 22px; border-radius: 20px; }
  .scard-copy { padding: 24px 20px 26px; }
  .scard h3 { font-size: 36px; }
  .scard p { font-size: 15px; }
  .moregrid { gap: 12px; }
  .morehead span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery { height: auto; }
  .gallerypin { position: relative; height: auto; padding: 100px 0; }
  .gallerywall { display: none; }
  .gallerypin::after { display: none; }
  .scard { position: relative; top: 0; margin-bottom: 30px; }
  .manifesto p .mw { opacity: 1; }
}
