/* ==========================================================================
   Site Rodrigo — estilos próprios
   Base visual = 1367 Studio (1367.css). Aqui ficam:
   - ajustes do banner / logo 3D
   - blocos vindos do Ownitt (Showreel, Definição, Pergunta), refeitos
     com as fontes do guillaumezhu.com (Cabinet Grotesk e Satoshi) e o laranja do 1367
   ========================================================================== */

:root {
  --round: 40px;
  --primary: #f43c00;
  --ink: #000;
  --cream: #f4f1ea;
  --font-title: 'Cabinet Grotesk', Arial, Helvetica, sans-serif;
  --font-text: 'Cabinet Grotesk', Arial, Helvetica, sans-serif;
  --font-mono: 'Satoshi', Arial, Helvetica, sans-serif;
  --gutter-x: clamp(20px, 4vw, 56px);
  --max-content-width: 1440px;
  --app-height: 100vh;
}
@supports (height: 100svh) {
  :root { --app-height: 100svh; }
}
@media (max-width: 760px) {
  :root { --round: 28px; }
}

html, body { overscroll-behavior: none; }
body { overflow-x: clip; }
img, video, canvas { max-width: 100%; }

/* -------------------------------------------------------------- Banner */
#video-frame video { background: #ebe7c6; }
/* A camada laranja e a frase final ficam invisíveis por cima do banner até o
   fim do scroll: sem isso elas bloqueiam o clique no "Book a call". */
#orange-overlay,
#project-content { pointer-events: none; }
/* Frases em PT ficam mais longas: equilibra as linhas (sem palavra sozinha no fim) */
#project-content h2,
.projects__lede { text-wrap: balance; }

/* -------------------------------------------------------------- Logo 3D */
/* tamanho e posição do bloco: iguais ao do 1367 (280px, ver o style no index.html) */
#logo3d {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===================================================== Showreel (Ownitt) */
.showreel { background: #000; position: relative; }
/* Bloco fixo do vídeo: termina nas barras pretas, que se juntam ao preto dos projetos */
.showreel__pin { position: relative; height: var(--app-height); overflow: hidden; }
@media (max-width: 760px), (prefers-reduced-motion: reduce) {
  .showreel__pin { height: auto; overflow: visible; }
}
.showreel__stage {
  width: 100%;
  height: var(--app-height);
  color: var(--ink);
  background: #000;
  position: relative;
  overflow: hidden;
}
.showreel__wall { z-index: 0; background: #000; position: absolute; inset: 0; }
.showreel__screen {
  z-index: 1;
  clip-path: inset(35% round var(--round));
  will-change: clip-path;
  background: #000;
  position: absolute;
  inset: 0;
}
.showreel__video {
  object-fit: contain;
  width: 74%;
  height: 74%;
  display: block;
  position: absolute;
  top: 13%;
  left: 13%;
}
.showreel__bar-top,
.showreel__bar-bottom {
  z-index: 4;
  pointer-events: none;
  will-change: transform;
  background: #000;
  height: 50%;
  position: absolute;
  left: 0;
  right: 0;
}
.showreel__bar-top { transform-origin: top; top: 0; transform: scaleY(0); }
.showreel__bar-bottom { transform-origin: bottom; bottom: 0; transform: scaleY(0); }
.showreel__frame {
  z-index: 3;
  pointer-events: none;
  will-change: width, height, opacity;
  border: 1px solid #0a0a0b2e;
  border-radius: var(--round);
  width: 30%;
  height: 30%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 50px 110px -40px #00000080;
}
.showreel__corner {
  border: 2px solid var(--ink);
  width: calc(var(--round) + 8px);
  height: calc(var(--round) + 8px);
  position: absolute;
}
.showreel__corner--tl { border-bottom: 0; border-right: 0; border-top-left-radius: var(--round); top: -1px; left: -1px; }
.showreel__corner--tr { border-bottom: 0; border-left: 0; border-top-right-radius: var(--round); top: -1px; right: -1px; }
.showreel__corner--bl { border-top: 0; border-right: 0; border-bottom-left-radius: var(--round); bottom: -1px; left: -1px; }
.showreel__corner--br { border-top: 0; border-left: 0; border-bottom-right-radius: var(--round); bottom: -1px; right: -1px; }
.showreel__head {
  z-index: 5;
  padding: 18vh var(--gutter-x);
  text-align: center;
  pointer-events: none;
  color: var(--ink);
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  display: flex;
  position: absolute;
  inset: 0;
}
.showreel__kicker,
.showreel__title {
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0;
  font-weight: 700;
  line-height: 0.95;
}
.showreel__kicker { font-size: clamp(1.3rem, 3vw, 2.4rem); }
.showreel__title { font-size: clamp(2.4rem, 6vw, 5.5rem); }
.showreel__kicker em,
.showreel__title em {
  font-style: normal;
  font-weight: 300;
  text-transform: none;
  letter-spacing: -0.04em;
  opacity: 0.5;
}
.showreel__controls {
  z-index: 6;
  opacity: 0;
  visibility: hidden;
  gap: 0.8rem;
  display: flex;
  position: absolute;
  bottom: 18vh;
  left: 50%;
  transform: translate(-50%);
}
.showreel__ctrl {
  isolation: isolate;
  color: var(--cream);
  cursor: pointer;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 12px;
  line-height: 1;
  transition: color 0.3s ease, border-color 0.3s ease;
  background: #0a0a0b59;
  border: 1px solid #f4f1ea80;
  border-radius: 999px;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8em 1.3em;
  display: inline-flex;
  position: relative;
  overflow: hidden;
}
.showreel__ctrl::before {
  content: "";
  z-index: -1;
  background: var(--primary);
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  position: absolute;
  inset: 0;
  transform: translateY(101%);
}
.showreel__ctrl svg { width: 16px; height: 16px; }
@media (hover: hover) {
  .showreel__ctrl:hover { color: #fff; border-color: var(--primary); }
  .showreel__ctrl:hover::before { transform: translateY(0); }
}
.showreel__progress {
  z-index: 3;
  pointer-events: none;
  background: #0a0a0b1f;
  height: 2px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}
.showreel__progress-fill {
  transform-origin: 0;
  background: var(--primary);
  will-change: transform;
  width: 100%;
  height: 100%;
  display: block;
  transform: scaleX(0);
}
@media (max-width: 760px) {
  .showreel__stage {
    background: var(--cream);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: auto;
    padding: 16vh 20px 11vh;
    display: flex;
  }
  .showreel__wall { background: var(--cream); }
  .showreel__screen {
    aspect-ratio: 16 / 9;
    clip-path: none;
    will-change: auto;
    border-radius: 6px;
    width: min(92vw, 520px);
    height: auto;
    position: relative;
    inset: auto;
    box-shadow: 0 40px 90px -45px #00000073;
  }
  .showreel__video { object-fit: cover; width: 100%; height: 100%; inset: 0; }
  .showreel__bar-top,
  .showreel__bar-bottom,
  .showreel__frame,
  .showreel__head,
  .showreel__progress { display: none; }
  .showreel__controls {
    opacity: 1;
    visibility: visible;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: clamp(1rem, 3vh, 1.6rem);
    position: static;
    transform: none;
  }
  .showreel__ctrl { color: var(--ink); background: transparent; border-color: #0a0a0b66; }
}

/* ===================================================== Projetos */
.projects { background: var(--ink); color: var(--cream); position: relative; }
.projects__pin { height: var(--app-height); position: relative; }
.projects__stage { width: 100%; height: var(--app-height); background: var(--ink); position: relative; overflow: hidden; }
.projects__panel {
  width: 100%;
  height: var(--app-height);
  background: var(--panel-bg, var(--ink));
  color: var(--panel-fg, var(--cream));
  will-change: transform;
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translateZ(0);
}
.projects__panel--project { clip-path: inset(100% 0% 0% 0% round var(--round) var(--round) 0 0); }
.projects__panel--intro { justify-content: center; align-items: center; display: flex; }
.projects__intro {
  width: 100%;
  max-width: var(--max-content-width);
  text-align: center;
  padding: 0 clamp(24px, 6vw, 90px);
  position: relative;
}
.projects__lede {
  font-family: var(--font-title);
  letter-spacing: -0.045em;
  font-size: clamp(2.7rem, 7.6vw, 8.4rem);
  font-weight: 700;
  line-height: 0.98;
  margin: 0;
}
.projects__word { will-change: transform, opacity; display: inline-block; }
.projects__word--em { color: #ffffff5c; font-weight: 500; }
.projects__word-break { display: none; }

/* cada site: texto à esquerda e, à direita, a gravação da rolagem do site numa janela de navegador */
.projects__panel--project {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.5fr);
  align-items: center;
  gap: clamp(28px, 4.5vw, 72px);
  padding: 96px clamp(24px, 5vw, 72px) clamp(28px, 6vh, 56px);
}
.projects__text { z-index: 2; min-width: 0; }
.projects__index {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
  margin: 0 0 clamp(1rem, 3vh, 2rem);
}
.projects__title {
  font-family: var(--font-title);
  letter-spacing: -0.045em;
  font-size: clamp(2.8rem, 5.6vw, 6.4rem);
  font-weight: 700;
  line-height: 0.92;
  text-wrap: balance;
  margin: 0;
}
.projects__desc {
  font-family: var(--font-mono);
  max-width: 46ch;
  margin: clamp(0.9rem, 2.4vh, 1.8rem) 0 0;
  font-size: clamp(0.92rem, 1.08vw, 1.15rem);
  font-weight: 500;
  line-height: 1.5;
}
.projects__desc strong {
  display: block;
  font-family: var(--font-title);
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.55em;
}
/* crédito embaixo do vídeo: "Criado por Rodrigo Manfredo" e, nos sites feitos com a agência, "by [logo da Gamá]" */
.projects__credit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;   /* a base da logo da Gamá alinha com a base do texto */
  justify-content: center;
  gap: 0.45em 0.6em;
  margin: calc(clamp(14px, 2.2vh, 22px) + 5px) 0 0;
  font-family: var(--font-body);
  font-size: clamp(0.72rem, 0.8vw, 0.84rem);
  font-weight: 500;
  line-height: 1;
}
.projects__credit > span { opacity: 0.72; }
.projects__credit-name {
  font-family: var(--font-title);
  font-size: 1.45em;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.projects__credit svg { width: clamp(51px, 4.2vw, 67px); height: auto; aspect-ratio: 1000 / 315; display: block; overflow: visible; margin-left: 0.15em; }
.gl-base { fill: var(--gl-base, var(--panel-fg, currentColor)); }
.gl-accent { fill: var(--gl-accent, #e73636); }
.projects__link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--panel-bg);
  background: var(--panel-fg);
  border-radius: 999px;
  align-items: center;
  gap: 0.6em;
  margin-top: clamp(1.4rem, 4vh, 2.4rem);
  padding: 1.15em 1.9em;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.3s ease;
  display: inline-flex;
}
.projects__link:hover { opacity: 0.88; transform: translateY(-2px); }

/* janela de navegador: a largura respeita a altura da tela (16:9 + barra), para nunca cortar */
.projects__media {
  z-index: 1;
  width: min(100%, calc((var(--app-height) - 290px) * 1.7778));
  justify-self: end;
  min-width: 0;
}
.projects__device {
  width: 100%;
  border-radius: calc(var(--round) * 0.6);
  background: #0b0b0b;
  box-shadow: 0 50px 100px -40px #0000008c, 0 0 0 1px #ffffff1a;
  overflow: hidden;
  position: relative;
}
.projects__bar {
  height: 34px;
  background: #151515;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  display: flex;
}
.projects__bar i { width: 10px; height: 10px; border-radius: 50%; background: #ffffff33; display: block; }
.projects__bar span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ffffffa6;
  background: #ffffff17;
  border-radius: 999px;
  margin: 0 auto;
  padding: 5px 16px;
  transform: translateX(-17px);
}
.projects__video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  height: auto;
  background: #0b0b0b;
  will-change: transform;
  display: block;
}

/* versão de celular: o vídeo em pé dentro de uma moldura de telefone (aparece só em telas estreitas) */
.projects__phone { display: none; }

@media (max-width: 860px) {
  .projects__device { display: none; }
  .projects__phone {
    display: block;
    position: relative;
    aspect-ratio: 390 / 844;
    height: clamp(300px, calc(var(--app-height) - 430px), 560px);
    margin: 0 auto;
    padding: 6px;
    border-radius: 30px;
    background: #0b0b0b;
    box-shadow: 0 30px 60px -30px #0000008c, 0 0 0 1px #ffffff1a;
    overflow: hidden;
  }
  .projects__phone .projects__video {
    position: absolute;
    inset: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    aspect-ratio: auto;
    border-radius: 24px;
  }
  .projects__word-break { width: 100%; height: 0; display: block; }
  .projects__panel--project {
    grid-template-columns: 1fr;
    align-content: center;
    gap: clamp(20px, 3.5vh, 32px);
    padding: 84px 20px 28px;
  }
  .projects__title { font-size: clamp(2.4rem, 11vw, 4.2rem); }
  .projects__desc { max-width: 44ch; font-size: 0.9rem; }
  .projects__link { margin-top: 1.1rem; padding: 1em 1.6em; }
  .projects__credit { margin-top: 17px; font-size: 0.68rem; }
  .projects__media { width: 100%; justify-self: stretch; }
  .projects__device { border-radius: 14px; }
  .projects__bar { height: 26px; padding: 0 10px; }
  .projects__bar span { font-size: 9px; padding: 3px 12px; transform: translateX(-13px); }
}

/* ===================================================== Cursor (Ownitt) */
@media (hover: hover) and (pointer: fine) {
  html.has-custom-cursor,
  html.has-custom-cursor * { cursor: none !important; }
}
.cursor-dot {
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 10001;
  opacity: 0;
  will-change: transform;
  background: #fff;
  border-radius: 50%;
  width: 6px;
  height: 6px;
  transition: opacity 0.2s;
  position: fixed;
  top: 0;
  left: 0;
}
.cursor-dot.is-visible { opacity: 1; }
.cursor-dot.is-hidden { opacity: 0; }
.cursor-ring {
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  will-change: transform;
  border: 1.5px solid #0a0a0b8c;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  transition: opacity 0.2s, width 0.3s cubic-bezier(0.77, 0, 0.175, 1), height 0.3s cubic-bezier(0.77, 0, 0.175, 1), background 0.3s;
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 0 0 0 1.5px #f4f1eab3;
}
.cursor-ring.is-visible { opacity: 1; }
.cursor-ring.is-clickable { background: #f4f1ea24; border-color: #0a0a0b66; width: 52px; height: 52px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee { to { transform: translateX(-33.3333%); } }

@media (prefers-reduced-motion: reduce) {
  .projects { margin-top: 0; background: var(--ink); }
  .projects__pin { height: auto; }
  .projects__stage { background: var(--ink); flex-direction: column; height: auto; display: flex; overflow: visible; }
  .projects__panel { height: auto; min-height: 92vh; position: relative; inset: auto; z-index: auto !important; }
  .projects__panel--project { clip-path: none !important; border-radius: var(--round) var(--round) 0 0; }
  .projects__panel--intro { min-height: 80vh; }
}
