/* ==========================================================
   Página inicial — mecânica e layout (réplica do comportamento
   do mdx.so: scroller próprio, loader, hero fixo, secções com
   snap e fades, showreel, serviços, indicador de barras)
   ========================================================== */

/* viewport fixo + contentor de scroll (Lenis com wrapper) */
html.is-home, html.is-home body { position: fixed; top: 0; left: 0; width: 100%; height: 100svh; overflow: hidden; }
.scroller-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow-x: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch; overscroll-behavior: none; scrollbar-width: none; }
.scroller-wrapper::-webkit-scrollbar { display: none; }
.scroller-content { min-height: 100%; background: #fff; }

/* elementos com autoalpha 0 começam escondidos (sem flash) */
[data-fade-autoalpha="0"] { visibility: hidden; }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 9999; background: #000; display: flex; justify-content: center; align-items: center; padding: 30px; color: #fcfcfd; }
.loader__logo { color: #fff; visibility: hidden; opacity: 0; will-change: transform; }
.loader__logo .logo__img { width: min(66vw, 670px); height: calc(min(66vw, 670px) * 468 / 2190); }
.loader__bottom { position: absolute; left: 0; bottom: 0; width: 100%; display: grid; gap: 22px; opacity: 0; visibility: hidden; will-change: transform; }
.loader__row { display: flex; justify-content: space-between; align-items: center; padding-inline: 30px; max-height: 30px; }
.loader__mask { position: relative; overflow: hidden; height: clamp(12px, 30px, 40px); flex: 1; }
.loader__msg { position: absolute; top: 0; left: 0; white-space: nowrap; font-size: clamp(12px, 30px, 40px); font-weight: 500; line-height: 1; letter-spacing: .03em; }
.loader__counter { font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: .03em; text-align: right; font-variant-numeric: tabular-nums; }
.loader__bar { position: relative; width: 100%; height: 13px; background: #ffffff2b; overflow: hidden; }
.loader__bar-fill { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #fff; transform: translateX(-101%); transition: transform .6s ease-out; }

/* ---------- Indicador de barras (fundo, centro) ---------- */
.bars-indicator { position: fixed; left: 50%; bottom: 25px; transform: translateX(-50%); z-index: 7; pointer-events: none; user-select: none; width: 129px; height: 30px; display: flex; justify-content: space-between; opacity: 0; visibility: hidden; }
.bars-indicator .bar { position: relative; width: 1px; height: 23px; background: #000; top: 8px; animation: floatUpDown 6s ease-in-out infinite; transition: top 1s ease-out; }
.bars-indicator .bar-2 { animation-delay: .5s; }
.bars-indicator .bar-3 { animation-delay: 1s; }
.bars-indicator .bar-4 { animation-delay: 1.5s; }
.bars-indicator[data-active-bar="1"] .bar-1, .bars-indicator[data-active-bar="2"] .bar-2,
.bars-indicator[data-active-bar="3"] .bar-3, .bars-indicator[data-active-bar="4"] .bar-4 { top: 0; }
@keyframes floatUpDown { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---------- Hero ---------- */
.hero { position: relative; top: 0; width: 100%; height: 100svh; padding: 4vw 2.5vw; background: #c1c5c9; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 70% 75% at 50% 45%, #f5f5f5 0%, #e4e5e6 45%, #c1c5c9 100%); }
.hero__gl { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 92vmin; height: 92vmin; z-index: 1; display: block; pointer-events: none; }
.hero__shadow { position: absolute; left: 50%; bottom: 13%; width: 34vw; height: 3.2vw; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.26), transparent 70%); filter: blur(6px); z-index: 0; }
.hero__ellipse-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; width: 80vmin; height: 80vmin; mix-blend-mode: overlay; pointer-events: none; opacity: .75;
  background: radial-gradient(circle, rgba(255,135,40,.95) 0%, rgba(255,150,70,.5) 22%, rgba(255,170,100,0) 52%); }
.hero__ellipse-white-bottom { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; height: 200px; background: #fff; z-index: 2; pointer-events: none;
  mask: linear-gradient(transparent 40%, #000); -webkit-mask: linear-gradient(transparent 40%, #000); }
.hero-flex { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: flex-end; width: 100%; height: 100%; }
.hero-flex__left { display: grid; gap: 1.4vw; max-width: min(41.2vw, 82.4vh); }
.hero-flex__left h1, .hero-flex__left h2 { color: #101820; font-size: min(3.25vw, 6.5vh); font-weight: 600; line-height: .85; letter-spacing: -.035em; }
.hero-flex__left h2 { font-weight: 300; margin-top: 10px; }
.hero-flex__left p { color: #8a8f8d; font-size: min(1.25vw, 2.5vh); line-height: 1.2; width: min(37vw, 74vh); }
.hero-flex__right { display: grid; gap: 1vw; width: 23.5vw; }
.hero-flex__right p { font-size: min(1.25vw, 2.5vh); line-height: 1.2; color: #101820; width: 90%; }
.hero-flex__right p span { color: #8a8f8d; }
.hero-flex__list { display: flex; gap: 6px; flex-wrap: wrap; }
[data-loader-fade-element-positive], [data-loader-fade-element-negative] { visibility: hidden; }
@media (max-width: 900px) {
  .hero { padding: 72px 18px 60px; }
  .hero-flex { flex-direction: column; align-items: flex-start; justify-content: flex-end; }
  .hero-flex__right { display: none; }
}

/* ---------- About (disco branco + brilhos) ---------- */
.about { position: relative; width: 100%; min-height: 100vh; background: #fff; overflow: hidden; margin-top: -1px; }
.about__globe-pos { position: absolute; left: 50%; top: 50%; width: min(92vw, 170vh); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.about__globe { position: absolute; inset: 0; will-change: transform; }
.about__globe-disc { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #fff 0%, #fff 58%, #fdf9f5 84%, rgba(255,255,255,0) 100%); box-shadow: 0 0 140px 50px rgba(255,255,255,.95), inset 0 0 0 1px rgba(16,24,32,.045); }
.about__blob { position: absolute; border-radius: 50%; filter: blur(44px); }
.about__blob--a { left: 17%; top: 19%; width: 24%; height: 50%; transform: rotate(-12deg); background: radial-gradient(ellipse, rgba(238,128,28,1) 0%, rgba(245,150,60,.8) 30%, rgba(255,190,130,.3) 58%, transparent 74%); }
.about__blob--b { left: 60%; top: 52%; width: 26%; height: 32%; transform: rotate(-38deg); background: radial-gradient(ellipse, rgba(238,128,28,1) 0%, rgba(245,150,60,.75) 30%, rgba(255,190,130,.3) 58%, transparent 74%); }
.about-grid { position: absolute; z-index: 1; left: 0; top: 50%; transform: translateY(-50%); display: grid; gap: 26px; width: 100%; height: 100vh; place-content: center; place-items: center; padding: 0 20px; }
.about-grid h2 { position: relative; color: #101820; text-align: center; font-size: clamp(40px, 7.5vw, 150px); font-weight: 300; line-height: 1; letter-spacing: -.045em; max-width: 1425px; margin-bottom: 10px; }
.about-grid h2 span { font-weight: 600; }
.about-grid p { position: relative; color: #101820; font-size: clamp(14px, 1.25vw, 25px); text-align: center; max-width: 1000px; line-height: 1.2; }
.about-grid p span { color: #8a8f8d; }

/* ---------- Ideas (névoa laranja + semicírculo) ---------- */
.ideas { width: 100%; height: 100vh; position: relative; display: flex; justify-content: center; z-index: 1; }
.ideas__blur-0 { border-radius: 50%; position: absolute; width: 35.6vw; height: 35.6vw; background: #ffaa52; filter: blur(200px); left: 50%; top: 50%; transform: translate(-50%, -50%); will-change: transform; pointer-events: none; }
.ideas__blur-1 { position: absolute; top: 8%; left: 50%; margin-left: -12.5vw; width: 25vw; height: 22.5vw; mix-blend-mode: multiply; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(255,140,45,.95) 0%, rgba(255,165,90,.45) 38%, rgba(255,200,150,0) 68%); filter: blur(26px); }
.ideas__blur-2 { position: absolute; top: 22%; left: 50%; margin-left: -28.25vw; width: 56.5vw; height: 56.5vw; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.92) 0%, rgba(255,255,255,.92) 47%, rgba(255,255,255,.98) 49.5%, rgba(255,255,255,0) 50.5%); box-shadow: inset 0 1px 0 rgba(0,0,0,.025); }
.ideas-grid { position: absolute; display: grid; gap: 26px; height: 400px; place-content: center; place-items: center; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(1450px, 100vw); padding: 0 20px; }
.ideas-grid h2 { color: #101820; text-align: center; font-size: clamp(40px, 7.5vw, 150px); font-weight: 300; line-height: 1; letter-spacing: -.045em; max-width: 1447px; }
.ideas-grid h2 span { font-weight: 600; }
.ideas-grid p { color: #8a8f8d; font-size: clamp(14px, 1.25vw, 25px); line-height: 1.2; text-align: center; max-width: 806px; }
.ideas-grid p span { color: #101820; }

/* ---------- Portfolio / showreel ---------- */
.portfolio { display: flex; justify-content: center; align-items: center; width: 100%; height: 100svh; padding: min(6vw, 10vh) min(3.5vw, 7vh); min-height: 600px; background: #fff; transform-origin: center; position: relative; }
.portfolio-wrapper { overflow: hidden; border-radius: 30px; width: 100%; height: 100%; position: relative; display: flex; justify-content: center; align-items: center; will-change: transform; cursor: pointer; clip-path: inset(0% 0% 0% 0% round 30px); background: #0b0b0d; }
.portfolio-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.portfolio-image-layer { position: absolute; inset: 0; z-index: 1; border-radius: 30px; background: #000000b2; pointer-events: none; transition: background .6s cubic-bezier(.625, .05, 0, 1); }
.portfolio-wrapper:hover .portfolio-image-layer { background: #00000065; }
.showreel-btn { position: relative; z-index: 2; display: flex; align-items: center; gap: 28px; color: #fff; font-size: clamp(28px, 3.3vw, 48px); font-weight: 500; line-height: 1; letter-spacing: -.015em; text-transform: uppercase; white-space: nowrap; }
.showreel-btn svg { width: 54px; height: 56px; fill: none; stroke: #fff; stroke-width: 1.6; }
.showreel-btn__divider { width: 2px; height: 32px; background: #fff; transition: transform .6s cubic-bezier(.625, .05, 0, 1); }
.portfolio-wrapper:hover .showreel-btn__divider { transform: scaleY(.8); }

/* ---------- Serviços ---------- */
.services-bg-wrapper { background: #feffff; position: relative; padding-top: min(200px, 20vh); min-height: 100vh; z-index: 1; }
.services-ellipse { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .6;
  background: radial-gradient(ellipse 22% 55% at 2% 45%, rgba(255,150,70,.75), transparent 70%), radial-gradient(ellipse 22% 55% at 98% 60%, rgba(255,150,70,.7), transparent 70%); }
.services { position: absolute; width: 100%; height: fit-content; padding: 0 2.5vw; z-index: 1; top: min(200px, 20vh); }
.services-flex { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
.services-heading { color: #101820; font-size: min(3vw, 6vh); font-weight: 300; line-height: 1; letter-spacing: .01em; width: min(29.5vw, 58.9vh); }
.services-heading span { font-weight: 600; }
.services-text { color: #8a8f8d; font-size: min(1.25vw, 2.5vh); width: min(24.7vw, 49.4vh); line-height: 1.2; }
.services-text span { color: #334049; }
.services-video { position: relative; width: 100%; min-height: 600px; height: min(1080px, 100vh); overflow: hidden; }
.services-container { position: relative; height: 100%; z-index: 2; }
.services-button { display: flex; align-items: center; justify-content: center; gap: .75vw; border-radius: 3.4vw; padding: 1.15vw 1.7vw; width: fit-content; height: fit-content; max-height: 3.4vw; position: absolute; left: 50%; top: 50%; backdrop-filter: blur(8.5px); -webkit-backdrop-filter: blur(8.5px); background: #ffffff1f; box-shadow: 0 18px 40px -24px rgba(255,130,0,.45); color: #101820; white-space: nowrap; }
.services-button::before { content: ""; position: absolute; inset: 0; border-radius: 3.4vw; padding: 1px; pointer-events: none;
  background: linear-gradient(to right, #ffb263, #ffb16335 20%, #fff0 40% 60%, #ffb16335 80%, #ffb263);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; }
.services-button svg { width: 1.2vw; height: 1.2vw; stroke: currentColor; fill: none; stroke-width: 1.5; }
.services-button__text { font-size: 1.5vw; font-weight: 400; line-height: .9; letter-spacing: .02em; }
.services-sphere { position: absolute; width: min(1750px, 175vh); height: min(1000px, 100vh); left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; pointer-events: none; }
.services-sphere canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.services-copy { position: absolute; top: 50%; left: 0; width: 100%; display: grid; align-items: center; justify-items: center; gap: 18px; visibility: hidden; opacity: 0; z-index: 3; pointer-events: none; padding: 0 20px; }
.services-copy h3 { color: #101820; text-align: center; font-size: clamp(36px, 5vw, 100px); font-weight: 300; line-height: 1; letter-spacing: -.045em; width: min(49.4vw, 100%); }
.services-copy h3 span { font-weight: 600; }
.services-copy p { color: #101820; text-align: center; font-size: clamp(14px, 1.25vw, 25px); line-height: 1.2; width: min(36.3vw, 100%); }
.services-copy p span { color: #8a8f8d; }
@media (max-width: 900px) {
  .services { padding: 0 18px; }
  .services-flex { flex-direction: column; }
  .services-heading, .services-text { width: 100%; }
  .services-button { padding: 10px 18px; gap: 8px; }
  .services-button__text { font-size: 16px; }
  .services-button svg { width: 16px; height: 16px; }
}

/* projetos: espaçamento como no original */
.work { padding-top: min(177px, 17.7vh); }
.hero-flex__left .btn, .about-grid .btn { justify-self: start; }

@media (max-width: 900px) {
  .hero-flex__left h1, .hero-flex__left h2 { font-size: clamp(30px, 9vw, 48px); }
  .hero-flex__left p { font-size: 15px; width: 100%; }
  .hero-flex__left { max-width: 100%; gap: 18px; }
  .services-heading { font-size: clamp(28px, 7vw, 40px); }
  .services-text { font-size: 15px; }
  .services-button { padding: 10px 18px; gap: 8px; border-radius: 40px; max-height: none; }
  .services-button__text { font-size: 16px; }
  .services-button svg { width: 16px; height: 16px; }
  .ideas__blur-0 { width: 80vw; height: 80vw; }
  .ideas__blur-1 { width: 60vw; height: 54vw; margin-left: -30vw; }
  .ideas__blur-2 { width: 120vw; height: 120vw; margin-left: -60vw; }
}
