/* Galáxia de projetos: mapa com 3 planetas e uma cena 3D por projeto */
:root {
  --bg: #07080c;
  --ink: #f2f0e8;
  --muted: #b7b2a3;
  --sand: #f0b66e;
  --lime: #d2ff1f;
  --glass: rgba(14, 12, 10, 0.86);
  --line: rgba(242, 240, 232, 0.16);
  --f-big: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-text: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --gut: clamp(16px, 3vw, 44px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--f-text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.is-map { overflow: hidden; height: 100svh; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul { margin: 0; }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; border-radius: 6px; }

.gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.veil { position: fixed; inset: 0; z-index: 30; pointer-events: none; background: #fff6e8; opacity: 0; transition: opacity 0.5s ease; }
.veil.is-on { opacity: 1; }
.veil.is-dark { background: var(--bg); }

/* barra do topo */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gut); }
.bar__map { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(7, 8, 12, 0.72); text-decoration: none; font-size: 15px; transition: background-color 0.25s, border-color 0.25s, transform 0.2s var(--ease); }
.bar__map:hover { background: rgba(242, 240, 232, 0.12); border-color: rgba(242, 240, 232, 0.35); }
.bar__map:active { transform: scale(0.97); }
.bar__title { font: 700 15px/1 var(--f-text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* mapa */
.map { position: fixed; inset: 0; z-index: 10; pointer-events: none; transition: opacity 0.6s ease; }
body:not(.is-map) .map { opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s 0.4s; }
.map__kicker { position: absolute; left: 0; right: 0; top: 84px; text-align: center; color: #6fa8ff; font-size: clamp(14px, 1.3vw, 17px); }
.map__title { position: absolute; left: 0; right: 0; top: 112px; text-align: center; font: 900 clamp(44px, 7vw, 104px)/0.92 var(--f-big); text-transform: uppercase; letter-spacing: 0.01em; }
.map__hint { position: absolute; left: 0; right: 0; bottom: 86px; text-align: center; color: var(--muted); font-size: 14px; }
.map__toast { position: absolute; left: 50%; bottom: 120px; translate: -50% 0; padding: 10px 18px; border-radius: 999px; background: rgba(30, 30, 34, 0.9); font-size: 14px; opacity: 0; transition: opacity 0.3s; }
.map__toast.is-on { opacity: 1; }
.map__list { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
/* cada botão fica sob o seu planeta (posição vem do 3D) */
.pl { position: absolute; left: 0; top: 0; translate: -50% 0; pointer-events: auto; display: grid; justify-items: center; gap: 2px; padding: 10px 16px; border-radius: 14px; text-align: center; transition: background-color 0.25s, transform 0.25s var(--ease); will-change: transform; }
.pl:hover, .pl:focus-visible, .pl.is-hover { background: rgba(242, 240, 232, 0.08); }
.pl__world { font: 900 clamp(26px, 2.6vw, 38px)/1 var(--f-big); text-transform: uppercase; letter-spacing: 0.02em; }
.pl__proj { font-size: 15px; color: var(--sand); }
.pl[data-planet="coruscant"] .pl__proj { color: #ffd27a; }
.pl[data-planet="dagobah"] .pl__proj { color: #a8d38a; }
.pl__soon { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
/* área de clique do planeta: um círculo invisível sobre a esfera */
.pl::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: var(--d, 200px); height: var(--d, 200px); translate: -50% -6px; border-radius: 50%; }

/* história do projeto (rola sobre a cena) */
.story { position: relative; z-index: 10; }
.story[hidden] { display: none; }
.ch { min-height: 115svh; display: flex; align-items: center; padding: 96px var(--gut); }
.ch:first-child { min-height: 100svh; align-items: flex-end; padding-bottom: 12svh; }
.ch:last-child { min-height: 100svh; }
.card { width: min(440px, 100%); margin-left: auto; padding: 28px 30px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); display: grid; gap: 14px; opacity: 0; translate: 0 40px; transition: opacity 0.9s var(--ease), translate 0.9s var(--ease); }
.ch.is-in .card { opacity: 1; translate: 0 0; }
.ch:first-child .card { margin-left: 0; width: min(560px, 100%); }
.card__kicker { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sand); }
.card__title { font: 900 clamp(64px, 9vw, 132px)/0.86 var(--f-big); text-transform: uppercase; }
.card__lead { font-size: clamp(17px, 1.4vw, 19px); color: #e8e2d4; }
.card__scroll { font-size: 14px; color: var(--muted); }
.card__h3 { font: 900 clamp(36px, 4vw, 54px)/0.95 var(--f-big); text-transform: uppercase; }
.card p, .card li { color: #e3ddcf; }
.card strong { color: var(--ink); }
.card__steps, .card__list { display: grid; gap: 12px; padding-left: 1.2em; }
.card__steps li::marker { color: var(--sand); font-weight: 700; }
.card__list li::marker { color: var(--sand); }
.card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 15px; transition: background-color 0.25s, transform 0.2s var(--ease), border-color 0.25s; }
.btn:hover { background: rgba(242, 240, 232, 0.12); border-color: rgba(242, 240, 232, 0.35); }
.btn:active { transform: scale(0.97); }
.btn--solid { background: var(--sand); color: #1a1208; border-color: var(--sand); font-weight: 700; }
.btn--solid:hover { background: #ffc887; }

.nojs { position: relative; z-index: 10; padding: 120px var(--gut); }

@media (max-width: 760px) {
  .bar__title { display: none; }
  .map__kicker { top: 78px; padding: 0 24px; }
  .map__title { top: 122px; font-size: 44px; }
  .map__hint { display: none; }
  .pl__world { font-size: 26px; }
  .ch { align-items: flex-end; padding-bottom: 8svh; }
  .card { margin-left: 0; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; opacity: 1; translate: 0 0; }
  .veil { transition-duration: 0.2s; }
}

/* balão de fala do C-3PO (segue a cabeça dele na tela) */
.speech { position: fixed; left: 0; top: 0; z-index: 12; max-width: 280px; padding: 12px 16px; border-radius: 16px 16px 16px 4px; background: #fff4dd; color: #2a1d0c; font: 500 15px/1.4 var(--f-text); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); pointer-events: none; translate: -12px calc(-100% - 8px); opacity: 0; scale: 0.9; transform-origin: 0 100%; transition: opacity 0.25s, scale 0.25s var(--ease); }
.speech.is-on { opacity: 1; scale: 1; }
.speech:empty { display: none; }
.speech.is-left { translate: calc(-100% + 12px) calc(-100% - 8px); border-radius: 16px 16px 4px 16px; transform-origin: 100% 100%; }

/* Coruscant: cartões com o verde do ERP */
.story--coruscant .card__kicker, .story--coruscant .card__list li::marker { color: #6ee7a0; }
.story--coruscant .btn--solid { background: #4ade80; border-color: #4ade80; color: #06210f; }
.story--coruscant .btn--solid:hover { background: #6ee7a0; }
.card__meta { font-size: 14px; color: var(--muted); }
.card__mods { display: grid; gap: 8px; padding: 0; list-style: none; font-size: 15px; }
.card__mods li { color: #cfc9bb; }
.card__mods strong { display: inline-block; min-width: 9.5em; color: var(--ink); }

/* Dagobah: cartões com o verde do pântano */
.story--dagobah .card__kicker, .story--dagobah .card__list li::marker { color: #a8d38a; }
.story--dagobah .btn--solid { background: #9bd17a; border-color: #9bd17a; color: #0e1a08; }
.story--dagobah .btn--solid:hover { background: #b4e095; }
.card code { font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: rgba(242, 240, 232, 0.1); }

/* ==========================================================
   Abertura: nome gigante, foto com o lado sombrio no hover, fundo de espaço
   ========================================================== */
/* prólogo rolável por cima do mapa; o céu fica fixo atrás e some quando a galáxia chega */
body.is-map.is-prologue { overflow-x: clip; overflow-y: visible; height: auto; }
html:not(.js) .prologue, html:not(.js) .sky { display: none; }
.sky { position: fixed; inset: 0; z-index: 1; overflow: hidden; isolation: isolate; pointer-events: none; background: #000; opacity: calc(1 - var(--arrive, 0)); }
body:not(.is-prologue) .sky { display: none; }
.prologue { position: relative; z-index: 5; }
.prologue[hidden] { display: none; }
.intro { position: relative; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate; }
/* luz fraca atrás da pessoa, só para a camiseta preta não sumir no céu preto */
.intro::before { content: ""; position: absolute; left: 50%; bottom: -20%; z-index: 0; width: min(90vw, 1100px); height: 75%; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(70, 90, 140, 0.28), rgba(40, 50, 80, 0.1) 55%, transparent); pointer-events: none; }
.intro img { display: block; max-width: none; }
.intro__space { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s ease 0.3s; }
.is-ready .intro__space.is-on { opacity: 1; }
.intro__glow { position: absolute; left: 0; top: 0; width: 70vmin; height: 70vmin; border-radius: 50%; background: radial-gradient(closest-side, rgba(210, 26, 14, 0.4), rgba(210, 26, 14, 0.12) 55%, transparent); opacity: 0; pointer-events: none; will-change: transform, opacity; }

/* enquanto o prólogo está na tela, o mapa só aparece no fim (com a rolagem) e não recebe cliques */
body.is-prologue .map { opacity: clamp(0, calc(var(--arrive, 0) * 1.6 - 0.6), 1); transition: none; }
body.is-prologue:not(.map-live) .pl { pointer-events: none; }
.bar { transition: opacity 0.4s ease; }
body.is-prologue .bar { opacity: 0; pointer-events: none; }

/* letreiro do Star Wars ligado à rolagem */
.crawl { position: relative; height: 420svh; }
.crawl__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; perspective: 380px; perspective-origin: 50% 25%; }
.crawl__plane { position: absolute; left: 50%; bottom: 0; width: min(880px, 92vw); height: 100%; transform: translateX(-50%) rotateX(26deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 4%, #000 40%); mask-image: linear-gradient(to bottom, transparent 4%, #000 40%); }
.crawl__text { position: absolute; left: 0; right: 0; top: 0; transform: translate3d(0, 100vh, 0); color: #ffe81f; font: 700 clamp(24px, 3.4vw, 46px)/1.38 "News Cycle", "Franklin Gothic Medium", "Arial Narrow", sans-serif; text-align: justify; hyphens: auto; will-change: transform; }
.crawl__text p + p { margin-top: 1.1em; }
.crawl__episode, .crawl__title { text-align: center; }
.crawl__episode { font-size: 0.9em; letter-spacing: 0.04em; }
.crawl__title { font: inherit; font-size: 1.6em; line-height: 1.1; text-transform: uppercase; margin: 0.25em 0 1.1em; letter-spacing: 0.02em; }
.crawl__intro { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; padding: 0 var(--gut); text-align: center; color: #4bd5ee; font: 400 clamp(18px, 2.2vw, 30px)/1.4 var(--f-text); opacity: 0; }
.prologue__tail { height: 200svh; }

.skip-crawl { position: fixed; right: var(--gut); bottom: 22px; z-index: 22; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(7, 8, 12, 0.72); font-size: 14px; color: var(--muted); opacity: 0; pointer-events: none; transition: opacity 0.3s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease); }
.skip-crawl.is-on { opacity: 1; pointer-events: auto; }
.skip-crawl:hover { color: var(--ink); border-color: rgba(242, 240, 232, 0.35); }
.skip-crawl:active { transform: scale(0.97); }
@media (max-width: 760px) {
  .crawl { height: 380svh; }
  .crawl__plane { width: 96vw; transform: translateX(-50%) rotateX(22deg); }
}
@media (prefers-reduced-motion: reduce) {
  .crawl { height: auto; padding: 120px 0; }
  .crawl__stage { position: static; height: auto; overflow: visible; perspective: none; }
  .crawl__plane { position: static; transform: none; height: auto; margin: 0 auto; -webkit-mask-image: none; mask-image: none; }
  .crawl__text { position: static; transform: none; }
  .crawl__intro { position: static; translate: none; opacity: 1; margin-bottom: 48px; }
}


.intro__name { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 900 clamp(96px, 24vw, 380px)/0.78 var(--f-big); text-transform: uppercase; letter-spacing: -0.01em; pointer-events: none; user-select: none; }
.intro__name > span { display: flex; overflow: hidden; padding-block: 0.02em; }
.intro__name > span:last-child { color: transparent; -webkit-text-stroke: 2px rgba(242, 240, 232, 0.55); }
.intro__name .ltr { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 55ms + 150ms); }
.is-ready .intro__name .ltr { transform: none; }

/* foto recortada de pé na base da tela; o canvas WebGL desenha a pessoa e o Vader por cima */
.hero__photo { position: absolute; z-index: 2; left: 50%; bottom: 0; translate: -50% 8%; width: min(76vw, 1207px, 135vh); aspect-ratio: 1472 / 1000; margin: 0; overflow: hidden; clip-path: inset(100% 0 0 0); transition: clip-path 1.3s cubic-bezier(0.76, 0, 0.24, 1) 0.25s; touch-action: pan-y; }
.is-ready .hero__photo { clip-path: inset(0 0 0 0); }
.hero__me { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__photo > .hero__me { transform: scale(1.08); transition: transform 1.8s var(--ease) 0.25s; }
.is-ready .hero__photo > .hero__me { transform: scale(1); }

.hero__gl { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.hero__photo.has-gl > .hero__me { opacity: 0; }
.hero__mask { display: none; position: absolute; inset: 0; z-index: 2; clip-path: circle(var(--r, 0px) at var(--x, 50%) var(--y, 30%)); }
.no-gl .hero__mask { display: block; }
.hero__mask .hero__me { filter: grayscale(1) brightness(0.42) contrast(1.2); }
.hero__mask::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 30%, rgba(255, 30, 30, 0.22), transparent 70%); mix-blend-mode: screen; pointer-events: none; }
.hero__vader { position: absolute; left: 28.9%; top: 2%; width: 42.1%; height: auto; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.7)); }
.hero__tip { position: absolute; left: 0; right: 0; bottom: calc(8% + 18px); z-index: 3; text-align: center; font-size: 13px; color: rgba(242, 240, 232, 0.75); text-transform: lowercase; transition: opacity 0.4s; pointer-events: none; }
.hero__tip b { color: #ff5a4d; font-weight: 500; }
.hero__photo.is-active .hero__tip { opacity: 0; }
.tip-touch { display: none; }
@media (hover: none), (pointer: coarse) { .tip-mouse { display: none; } .tip-touch { display: inline; } }

.intro__info { position: absolute; z-index: 3; left: var(--gut); bottom: var(--gut); }
.intro__title { font: 700 clamp(22px, 2vw, 30px)/1.1 var(--f-text); }
.intro__sub { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* entrada dos textos depois que a foto sobe */
.js .intro__info { opacity: 0; }
.is-ready .intro__info { animation: intro-rise 0.9s var(--ease) 1.1s both; }
@keyframes intro-rise { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }

@media (max-width: 860px) {
  .intro__name { justify-content: flex-start; padding-top: 110px; font-size: clamp(80px, 26vw, 200px); }
  .hero__photo { width: min(180vw, 942px, 103svh); }
  .hero__tip { bottom: auto; top: 3%; }
  .intro__info { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .intro__name .ltr { transform: none; transition: none; }
  .hero__photo { clip-path: none; transition: none; }
  .is-ready .intro__info { animation: none; opacity: 1; }
}

/* ==========================================================
   Stack: sabres de luz (entre o letreiro e a chegada da galáxia)
   ========================================================== */
.stack { position: relative; width: min(1180px, 100%); margin: 0 auto; padding: clamp(96px, 14vh, 160px) var(--gut); }
.stack__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: 48px; row-gap: 14px; align-items: end; margin-bottom: clamp(40px, 7vh, 72px); }
.stack__kicker { grid-column: 1 / -1; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: #6fa8ff; }
.stack__title { font: 900 clamp(56px, 8vw, 124px)/0.88 var(--f-big); text-transform: uppercase; color: #ffe81f; }
.stack__lead { color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); }
.sabers { display: grid; gap: 4px; list-style: none; padding: 0; }
.saber { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px 32px; align-items: center; padding: 24px 0; border-top: 1px solid var(--line); }
.saber:last-child { border-bottom: 1px solid var(--line); }
.saber__head { display: grid; grid-template-columns: auto 1fr; align-items: center; row-gap: 14px; }
.saber__hilt { width: 78px; height: 16px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(0, 0, 0, 0.45) 6px 8px) 30px 0 / 34px 100% no-repeat, linear-gradient(180deg, #d9dee5 0%, #7d858f 45%, #3b4048 100%);
  box-shadow: inset -10px 0 0 #2a2e34, inset 8px 0 0 #565c65; }
.saber__blade { height: 6px; border-radius: 0 6px 6px 0; background: #fff;
  box-shadow: 0 0 4px 1px var(--blade), 0 0 14px 3px var(--blade), 0 0 34px 6px color-mix(in srgb, var(--blade) 55%, transparent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease); }
.saber.is-on .saber__blade { transform: scaleX(1); }
.saber:hover .saber__blade { animation: saber-hum 0.12s steps(2) infinite; }
@keyframes saber-hum { 50% { opacity: 0.86; } }
.saber__name { grid-column: 1 / -1; font: 900 34px/1 var(--f-big); text-transform: uppercase; letter-spacing: 0.01em; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.tools li { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 12px; background: rgba(242, 240, 232, 0.04); border: 1px solid var(--line); border-radius: 999px; font-size: 16px; font-weight: 500; transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.25s; }
.tools li:hover { transform: translateY(-2px); border-color: var(--blade); box-shadow: 0 0 14px color-mix(in srgb, var(--blade) 40%, transparent); }
.ico { width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
/* aparecer ao rolar */
.js .stack [data-reveal] { opacity: 0; translate: 0 32px; transition: opacity 0.9s var(--ease), translate 0.9s var(--ease); }
.js .stack [data-reveal].is-in { opacity: 1; translate: 0 0; }
.js .tools li { opacity: 0; translate: 0 12px; transition: opacity 0.6s var(--ease), translate 0.6s var(--ease), transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.25s; transition-delay: calc(0.25s + var(--n, 0) * 50ms), calc(0.25s + var(--n, 0) * 50ms), 0s, 0s, 0s; }
.js .saber.is-on .tools li { opacity: 1; translate: 0 0; }
@media (max-width: 860px) {
  .stack__head { grid-template-columns: 1fr; }
  .saber { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .saber__blade { transform: none; transition: none; }
  .js .stack [data-reveal], .js .tools li { opacity: 1; translate: 0 0; transition: none; }
}

/* rodapé no fim da galáxia: aviso de fã + contato e redes */
.foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 14px var(--gut) 16px; pointer-events: auto; background: linear-gradient(to top, rgba(7, 8, 12, 0.92), rgba(7, 8, 12, 0)); }
body.is-prologue:not(.map-live) .foot { pointer-events: none; }
.foot__legal { font-size: 13px; color: var(--muted); max-width: 52ch; }
.foot__social { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.foot__social a { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: rgba(7, 8, 12, 0.72); color: var(--ink); text-decoration: none; font-size: 15px; transition: background-color 0.25s, border-color 0.25s, transform 0.2s var(--ease); }
.foot__social a:hover { background: rgba(242, 240, 232, 0.12); border-color: rgba(242, 240, 232, 0.35); }
.foot__social a:active { transform: scale(0.96); }
.foot__mail { padding: 0 18px 0 14px; }
.foot__icon { width: 44px; }
.foot__social svg { width: 20px; height: 20px; flex: none; }
.foot__icon svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .foot { flex-direction: column-reverse; align-items: center; text-align: center; padding-bottom: 12px; }
  .foot__legal { font-size: 12px; }
  .foot__mail span { display: none; }
  .foot__mail { width: 44px; padding: 0; }
}
