/* ==========================================================
   W2W — Home (index.php) · complementa style.css
   ========================================================== */

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--bg);
  transition: opacity .7s var(--ease), visibility .7s;
}
.loader__path { stroke-dasharray: 110; stroke-dashoffset: 110; animation: draw 1.1s var(--ease) forwards; }
.loader__txt { font: 500 12px var(--f-mono); color: var(--dim); letter-spacing: .3em; text-transform: uppercase; opacity: 0; animation: fade .6s .5s forwards; }
body:not(.is-loading) .loader { opacity: 0; visibility: hidden; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 60; height: 2px; width: 100%;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  box-shadow: 0 0 12px rgba(99,102,241,.8);
}

/* ---------- Custom cursor ---------- */
.cursor, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none; border-radius: 50%; opacity: 0; }
.cursor { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid rgba(255,255,255,.35);
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, border-color .3s;
}
.has-cursor .cursor, .has-cursor .cursor-ring { opacity: 1; }
.cursor-ring.is-hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(99,102,241,.12); border-color: rgba(34,211,238,.6); }

/* ---------- Hero ---------- */
.h-hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 130px 0 40px; overflow: hidden; }
.h-hero__globe {
  position: absolute; top: 50%; right: -8vw; translate: 0 -50%;
  width: min(62vw, 900px); aspect-ratio: 1; z-index: -1;
}
.h-hero__inner { position: relative; }
.h-hero__title { font-size: clamp(56px, 11vw, 168px); font-weight: 700; line-height: .92; letter-spacing: -.045em; margin: 10px 0 34px; }
.h-hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.h-hero__title .w { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 90ms + 150ms); }
.is-ready .h-hero__title .w { transform: none; }
.h-hero__lead { max-width: 560px; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); margin-bottom: 38px; }
.h-hero__lead strong { color: var(--text); font-weight: 600; }
.h-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.h-in { opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 90ms + 150ms); }
.is-ready .h-in { opacity: 1; transform: none; }

.h-hero__foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: auto; padding-top: 60px; font: 13px var(--f-mono); color: var(--muted); }
.h-hero__rotator { display: flex; gap: 8px; align-items: center; }
.rot { position: relative; display: inline-block; height: 1.6em; overflow: hidden; vertical-align: bottom; min-width: 15ch; }
.rot b { position: absolute; left: 0; top: 0; font-weight: 500; color: var(--cyan); transform: translateY(110%); opacity: 0; transition: transform .6s var(--ease), opacity .6s; white-space: nowrap; }
.rot b.on { transform: none; opacity: 1; }
.rot b.out { transform: translateY(-110%); opacity: 0; }
.h-hero__scroll { display: flex; align-items: center; gap: 12px; transition: color .3s; }
.h-hero__scroll:hover { color: var(--text); }
.h-hero__scroll span { width: 1px; height: 40px; background: linear-gradient(var(--cyan), transparent); position: relative; overflow: hidden; }
.h-hero__scroll span::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: fall 1.8s infinite; }
@keyframes fall { to { top: 100%; } }

/* ---------- Manifesto ---------- */
.manifesto { padding: clamp(100px, 16vw, 200px) 0; }
.manifesto__text { font: 600 clamp(30px, 4.6vw, 64px)/1.18 var(--f-display); letter-spacing: -.025em; max-width: 1100px; }
.manifesto__text .mw { color: rgba(238,241,248,.14); transition: color .35s; }
.manifesto__text .mw.lit { color: var(--text); }
.manifesto__text .mw.lit.hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.manifesto__sign { display: flex; align-items: center; gap: 12px; margin-top: 40px; font: 500 14px var(--f-mono); color: var(--muted); }

/* ---------- Serviços empilhados ---------- */
.stack { display: grid; gap: 28px; padding-bottom: 40px; }
.stack__card {
  position: sticky; top: calc(110px + var(--i) * 16px);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
  min-height: 440px; padding: clamp(28px, 4.5vw, 56px);
  border-radius: 28px; border: 1px solid var(--border-2);
  background:
    radial-gradient(700px circle at 100% 0%, rgba(99,102,241,.16), transparent 55%),
    linear-gradient(160deg, #10131f, #090b13);
  box-shadow: 0 -30px 60px -30px rgba(0,0,0,.9);
  transform-origin: 50% 0;
  transform: scale(var(--s, 1));
  filter: brightness(var(--b, 1));
  will-change: transform;
}
.stack__n { font: 500 13px var(--f-mono); color: var(--cyan); }
.stack__card h3 { font-size: clamp(30px, 3.6vw, 48px); margin: 16px 0 16px; }
.stack__card p { color: var(--muted); font-size: 17px; max-width: 480px; margin-bottom: 28px; }
.stack__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack__list li { font-size: 13px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-2); color: #cfd5e6; background: rgba(255,255,255,.03); }
.stack__art { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-height: 340px; margin-inline: auto; width: 100%; }
.stack__ring { position: absolute; inset: 8%; border-radius: 50%; border: 1px dashed rgba(99,102,241,.4); animation: spin 30s linear infinite; }
.stack__ring--2 { inset: 22%; border: 1px solid rgba(34,211,238,.25); animation-duration: 18s; animation-direction: reverse; }
.stack__ring::before { content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.stack__icon {
  width: 42%; aspect-ratio: 1; border-radius: 30%; display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(34,211,238,.18), rgba(168,85,247,.22));
  border: 1px solid var(--border-2);
  box-shadow: 0 0 80px -10px rgba(99,102,241,.55), inset 0 1px 0 rgba(255,255,255,.1);
}
.stack__icon svg { width: 46%; height: 46%; fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Segmentos ---------- */
.segs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.seg {
  --mx: 50%; --my: 50%;
  position: relative; padding: 38px 32px 44px; min-height: 240px;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: hidden; isolation: isolate;
}
.seg::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(99,102,241,.18), transparent 50%);
}
.seg:hover::before { opacity: 1; }
.seg__n { font: 12px var(--f-mono); color: var(--dim); }
.seg h3 { font-size: 24px; margin: 50px 0 10px; transition: transform .5s var(--ease); }
.seg p { color: var(--muted); font-size: 15px; max-width: 300px; transition: transform .5s var(--ease); }
.seg:hover h3, .seg:hover p { transform: translateX(6px); }
.seg__arrow { position: absolute; top: 30px; right: 30px; font-size: 22px; color: var(--dim); transition: transform .5s var(--ease), color .3s; }
.seg:hover .seg__arrow { transform: translate(4px, -4px); color: var(--cyan); }

/* ---------- Engenharia / órbita ---------- */
.principles { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 18px; }
.principles li { display: grid; gap: 2px; padding-left: 18px; border-left: 2px solid transparent; border-image: var(--grad) 1; }
.principles b { font: 600 17px var(--f-display); }
.principles span { color: var(--muted); font-size: 15px; }

.orbit { position: relative; width: 100%; max-width: 540px; aspect-ratio: 1; margin: 0 auto; }
.orbit__core {
  position: absolute; inset: 0; margin: auto; width: 26%; height: 26%;
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.35), transparent 70%);
}
.orbit__core img { width: 70%; height: auto; filter: drop-shadow(0 0 30px rgba(99,102,241,.8)); }
.orbit__ring { position: absolute; inset: var(--in); border-radius: 50%; border: 1px solid var(--border-2); animation: spin var(--t) linear infinite; }
.orbit__ring--1 { --in: 24%; --t: 26s; }
.orbit__ring--2 { --in: 12%; --t: 40s; animation-direction: reverse; border-style: dashed; }
.orbit__ring--3 { --in: 0%;  --t: 60s; }
.orbit__ring span { position: absolute; inset: 0; transform: rotate(var(--a)); pointer-events: none; }
.orbit__ring em {
  position: absolute; top: 0; left: 50%;
  font: normal 500 12px var(--f-mono); white-space: nowrap; color: #dfe5ff;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(12,14,24,.92); border: 1px solid var(--border-2);
  box-shadow: 0 0 20px -6px rgba(99,102,241,.6);
  transform: translate(-50%, -50%) rotate(calc(var(--a) * -1));
  animation: counter var(--t) linear infinite;
}
.orbit__ring--2 em { animation-direction: reverse; }
/* contra-rotação: mantém os rótulos sempre na horizontal */
@keyframes counter {
  from { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); }
  to   { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1 - 360deg)); }
}
/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 860px; position: relative; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; }
.timeline::before { background: var(--border); }
.timeline::after { background: var(--grad); transform-origin: 0 0; transform: scaleY(var(--tl, 0)); box-shadow: 0 0 14px rgba(99,102,241,.7); }
.tl { position: relative; padding: 0 0 56px 64px; }
.tl:last-child { padding-bottom: 0; }
.tl__dot { position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border-2); z-index: 1; transition: border-color .4s, box-shadow .4s, background .4s; }
.tl.is-on .tl__dot { border-color: var(--cyan); background: var(--indigo); box-shadow: 0 0 0 6px rgba(99,102,241,.18), 0 0 20px var(--indigo); }
.tl__n { font: 500 13px var(--f-mono); color: var(--cyan); }
.tl h3 { font-size: clamp(22px, 2.4vw, 30px); margin: 8px 0 10px; }
.tl p { color: var(--muted); max-width: 560px; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.faq .section__head { position: sticky; top: 120px; }
.faq__list { display: grid; gap: 12px; }
.qa { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); transition: border-color .3s, background .3s; }
.qa[open] { border-color: var(--border-2); background: var(--surface-2); }
.qa summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 24px; font: 600 17px var(--f-display);
}
.qa summary::-webkit-details-marker { display: none; }
.qa__icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-2); }
.qa__icon::before, .qa__icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 11px; height: 1.5px; margin: -.75px 0 0 -5.5px; background: var(--text); transition: transform .35s var(--ease); }
.qa__icon::after { transform: rotate(90deg); }
.qa[open] .qa__icon { border-color: var(--cyan); }
.qa[open] .qa__icon::after { transform: rotate(0); }
.qa p { padding: 0 24px 24px; color: var(--muted); animation: fade .4s; opacity: 1; }

/* ---------- Big CTA marquee ---------- */
.big-cta {
  position: relative; overflow: hidden;
  padding: clamp(36px, 5vw, 64px) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.big-cta::before, .big-cta::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.5), rgba(34,211,238,.4), transparent);
}
.big-cta::before { top: 0; } .big-cta::after { bottom: 0; }
.big-cta__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.big-cta:hover .big-cta__track { animation-play-state: paused; }
.big-cta__item {
  display: inline-flex; align-items: center; gap: clamp(20px, 3vw, 44px); padding-right: clamp(20px, 3vw, 44px);
  font: 500 clamp(34px, 5.2vw, 76px)/1.1 var(--f-display); letter-spacing: -.035em; white-space: nowrap;
  color: rgba(238,241,248,.28); transition: color .5s var(--ease);
}
.big-cta__item em {
  font-style: normal; font-weight: 600;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .75; transition: opacity .5s var(--ease);
}
.big-cta:hover .big-cta__item { color: rgba(238,241,248,.85); }
.big-cta:hover .big-cta__item em { opacity: 1; }
.big-cta__mark { width: .62em; height: .62em; flex: none; fill: none; stroke: var(--indigo); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.big-cta__btn {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font: 600 15px var(--f-body); color: #fff;
  background: var(--grad); box-shadow: 0 16px 44px -10px rgba(99,102,241,.8);
  opacity: 0; scale: .85; pointer-events: none;
  transition: opacity .4s var(--ease), scale .4s var(--ease);
}
.big-cta:hover .big-cta__btn { opacity: 1; scale: 1; }
.big-cta + .contact { padding-top: clamp(60px, 8vw, 100px); }
@media (pointer: coarse) { .big-cta__item { color: rgba(238,241,248,.6); } }

/* ---------- Footer ---------- */
.h-footer { border-top: 1px solid var(--border); padding: 64px 0 28px; overflow: hidden; }
.h-footer__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.h-footer__tag { color: var(--muted); max-width: 340px; margin-top: 16px; font-size: 15px; }
.h-footer__nav { display: flex; flex-wrap: wrap; gap: 12px 32px; align-content: start; font-size: 15px; color: var(--muted); }
.h-footer__nav a:hover { color: var(--text); }
.h-footer__word {
  font: 700 clamp(120px, 30vw, 420px)/.8 var(--f-display); letter-spacing: -.06em; text-align: center;
  margin: 50px 0 20px;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(99,102,241,.35), transparent 75%);
  -webkit-background-clip: text; background-clip: text;
  user-select: none;
}
.h-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--dim); padding-top: 24px; border-top: 1px solid var(--border); }
.h-footer__bottom a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .h-hero__globe { right: -30vw; width: 110vw; opacity: .55; }
  .stack__card { grid-template-columns: 1fr; min-height: 0; }
  .stack__art { display: none; }
  .segs { grid-template-columns: repeat(2, 1fr); }
  .faq { grid-template-columns: 1fr; gap: 32px; }
  .faq .section__head { position: static; text-align: left; }
  .orbit { max-width: 440px; margin-top: 20px; }
}
@media (max-width: 760px) {
  .h-hero { padding-top: 110px; }
  .h-hero__globe { top: 34%; right: -50vw; width: 140vw; opacity: .45; }
  .h-hero__foot { font-size: 12px; }
  .h-hero__scroll { display: none; }
  .stack__card { top: calc(90px + var(--i) * 10px); padding: 26px; border-radius: 22px; }
  .stack__card p { font-size: 15px; }
  .segs { grid-template-columns: 1fr; }
  .seg { min-height: 0; padding: 28px 24px 32px; }
  .seg h3 { margin-top: 26px; }
  .orbit__ring em { font-size: 10px; padding: 4px 8px; }
  .tl { padding-left: 48px; }
  .qa summary { font-size: 16px; padding: 18px 18px; }
  .qa p { padding: 0 18px 20px; }
  .h-footer__top { flex-direction: column; }
}
@media (pointer: coarse) { .cursor, .cursor-ring { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .h-hero__title .w, .h-in { transform: none; opacity: 1; }
  .manifesto__text .mw { color: var(--text); }
  .stack__card { transform: none; filter: none; }
}
