/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font: inherit; border: none; background: none; cursor: pointer; }

/* ===== Tokens ===== */
:root {
  --black: #000000;
  --white: #ffffff;
  --gray-muted: #b5b5b5;
  --gray-text: #4a4a4a;
  --font-display: "Zalando Sans Expanded", sans-serif;
  --font-body: "Inter", sans-serif;
  --container: 1140px;
  --header-h: 96px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.4;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 0 30px;
  border-radius: 999px;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}
.btn:hover { opacity: 0.75; }

.btn-dark { background: var(--black); color: var(--white); }
.btn-light { background: var(--white); color: var(--black); }

.btn-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}
.btn-row-center { justify-content: center; }

.icon-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}
.icon-btn img { width: 100%; height: 100%; }
.icon-btn:hover { opacity: 0.7; }
.icon-btn-dark { border-color: var(--black); }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  transition: background 0.3s ease;
}
.site-header.scrolled { background: var(--black); }
.has-light-hero .site-header { background: var(--black); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  width: 100%;
  padding: 0 clamp(20px, 4vw, 60px);
  transition: height 0.3s ease, padding 0.3s ease;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--white);
  transition: font-size 0.3s ease, gap 0.3s ease;
}
.logo-icon {
  width: 22px;
  height: 22px;
  transition: width 0.3s ease, height 0.3s ease;
}

.nav-toggle {
  position: relative;
  z-index: 206;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle img {
  width: 26px;
  transition: width 0.3s ease, opacity 0.2s ease;
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  width: 27px;
  height: 3px;
  border-radius: 2px;
  background: var(--white);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.nav-toggle.open img { opacity: 0; }
.nav-toggle.open::before {
  opacity: 1;
  transform: rotate(45deg);
}
.nav-toggle.open::after {
  opacity: 1;
  transform: rotate(-45deg);
}

.main-nav {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(320px, 80vw);
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 32px 48px;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 205;
}
.main-nav.open { transform: translateX(0); }

.main-nav a {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--white);
}
.main-nav a:hover { opacity: 0.7; }

/* =========================================================
   SHOWCASE ANIMADO DE PROJETOS
   ========================================================= */

.projects-showcase {
  --showcase-background: #050505;
  --showcase-gap: clamp(10px, 1vw, 18px);
  --showcase-height: 100vh;

  position: relative;
  width: 100%;
  min-height: var(--showcase-height);
  background: var(--showcase-background);
  overflow: hidden;
  isolation: isolate;
}

.projects-showcase__viewport {
  position: relative;
  width: 100%;
  height: var(--showcase-height);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.projects-showcase__viewport.is-dragging {
  cursor: grabbing;
}

/*
  O track é mais largo do que a tela.
  O JavaScript movimentará este elemento horizontalmente.
*/
.projects-showcase__track {
  position: absolute;
  top: 0;
  left: 0;

  display: flex;
  align-items: stretch;
  gap: var(--showcase-gap);

  height: 100%;
  padding: 12px 0;

  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  contain: layout paint;
}

/*
  Cada project-panel funciona como uma máscara.
  A imagem continua grande, mas apenas a área do painel aparece.
*/
.project-panel {
  position: relative;

  flex: 0 0 auto;
  width: clamp(210px, 22vw, 340px);
  height: 100%;

  overflow: hidden;
  background: #111;

  transform: translateZ(0);
  will-change: width;
  backface-visibility: hidden;
  contain: paint;
  cursor: pointer;
}

/*
  Camada escura sobre os cards fechados.
*/
.project-panel::after {
  content: "";

  position: absolute;
  inset: 0;
  z-index: 2;

  pointer-events: none;

  background: rgba(0, 0, 0, 0.6);
  opacity: 1;
  transition:
    opacity 280ms ease-out;
}

/*
  A imagem precisa ocupar o painel inteiro.
  object-fit: cover mantém o painel sempre preenchido.
*/
.project-panel img,
.project-panel video {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  user-select: none;
  pointer-events: none;

  transform: scale(1.015);
  transition:
    transform 1600ms cubic-bezier(0.65, 0, 0.35, 1);

  backface-visibility: hidden;
}

/*
  Estado do projeto expandido.
*/
.project-panel.is-active {
  z-index: 3;
}

.project-panel.is-active::after {
  opacity: 0;
}

.project-panel.is-active img,
.project-panel.is-active video {
  transform: scale(1);
}

/*
  Sombras laterais opcionais.
  Elas ajudam a integrar a animação com as bordas da tela.
*/
.projects-showcase__viewport::before,
.projects-showcase__viewport::after {
  content: "";

  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 10;

  width: clamp(22px, 5vw, 100px);

  pointer-events: none;
}

.projects-showcase__viewport::before {
  left: 0;

  background:
    linear-gradient(
      90deg,
      var(--showcase-background) 0%,
      rgba(5, 5, 5, 0) 100%
    );
}

.projects-showcase__viewport::after {
  right: 0;

  background:
    linear-gradient(
      270deg,
      var(--showcase-background) 0%,
      rgba(5, 5, 5, 0) 100%
    );
}

/*
  Texto de destaque sobreposto ao showcase.
*/
.projects-showcase__overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.65) 100%);
}

.projects-showcase__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  padding: 0 clamp(20px, 4vw, 60px) 70px;
  pointer-events: none;
}

.projects-showcase__heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4.6vw, 62px);
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--white);
  max-width: 1000px;
}


/* =========================================================
   TABLETS
   ========================================================= */

@media (max-width: 1024px) {
  .projects-showcase {
    --showcase-height: 100svh;
  }

  .project-panel {
    width: clamp(190px, 30vw, 290px);
  }
}


/* =========================================================
   CELULARES
   ========================================================= */

@media (max-width: 700px) {
  .projects-showcase {
    --showcase-gap: 9px;
    --showcase-height: 100svh;
  }

  .projects-showcase__track {
    padding: 8px 0;
  }

  .project-panel {
    width: clamp(145px, 44vw, 230px);
  }

  .projects-showcase__viewport::before,
  .projects-showcase__viewport::after {
    width: 24px;
  }
}


/* =========================================================
   ACESSIBILIDADE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .project-panel::after,
  .project-panel img,
  .project-panel video {
    transition: none;
  }
}

/* ===== Page hero (páginas internas) ===== */
.page-hero {
  position: relative;
  height: 78vh;
  min-height: 460px;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.page-hero-inner {
  width: 100%;
  padding: clamp(150px, 22vh, 220px) clamp(20px, 4vw, 60px) 0;
}

.page-hero p {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: var(--gray-muted);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 90px);
  line-height: 1.05;
  text-transform: uppercase;
}

/* ===== Zoom parallax (galeria de identidade visual) ===== */
.zoom-parallax {
  position: relative;
  height: 300vh;
  background: var(--black);
}

.zoom-parallax__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.zoom-parallax__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.zoom-parallax__box {
  position: relative;
  width: 25vw;
  height: 25vh;
  overflow: hidden;
  border-radius: 10px;
}

.zoom-parallax__box picture { display: contents; }

.zoom-parallax__box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zoom-parallax__item--1 .zoom-parallax__box { top: -30vh; left: 5vw; width: 35vw; height: 30vh; }
.zoom-parallax__item--2 .zoom-parallax__box { top: -10vh; left: -25vw; width: 20vw; height: 45vh; }
.zoom-parallax__item--3 .zoom-parallax__box { left: 27.5vw; width: 25vw; height: 25vh; }
.zoom-parallax__item--4 .zoom-parallax__box { top: 27.5vh; left: 5vw; width: 20vw; height: 25vh; }
.zoom-parallax__item--5 .zoom-parallax__box { top: 27.5vh; left: -22.5vw; width: 30vw; height: 25vh; }
.zoom-parallax__item--6 .zoom-parallax__box { top: 22.5vh; left: 25vw; width: 15vw; height: 15vh; }

@media (max-width: 700px) {
  .zoom-parallax__box { border-radius: 6px; }
}

/* ===== Identity projects ===== */
.identity-projects { background: var(--white); }

.identity-project {
  padding: clamp(120px, 9vw, 120px) 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.identity-project:first-child { border-top: none; }

.identity-project__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  width: 100%;
  margin-bottom: clamp(40px, 5vw, 64px);
  padding: 0 clamp(20px, 3vw, 40px);
  text-align: left;
  align-items: start;
}

.identity-project__eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray-text);
  margin-bottom: 14px;
}

.identity-project__head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 18px;
}

.identity-project__head p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--gray-text);
}

.identity-project__col--extra {
  padding-top: clamp(0px, 8vw, 96px);
}

@media (max-width: 900px) {
  .identity-project__head { grid-template-columns: 1fr; gap: 24px; }
  .identity-project__col--extra { padding-top: 0; }
}

.identity-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(10px, 1.4vw, 20px);
  padding: 0 clamp(20px, 3vw, 40px);
  padding-bottom: 200px;
}

.identity-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.identity-gallery__item { cursor: zoom-in; }

/* ===== Lightbox das galerias de identidade ===== */
.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(0, 0, 0, 0.96);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.project-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.project-lightbox__bar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px clamp(16px, 3vw, 36px);
}

.project-lightbox__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
}

.project-lightbox__close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-size: 30px;
}

.project-lightbox__stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 12px clamp(54px, 8vw, 110px);
  touch-action: pan-y;
}

.project-lightbox__image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.project-lightbox__nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font-size: 28px;
}
.project-lightbox__prev { left: clamp(8px, 2vw, 28px); }
.project-lightbox__next { right: clamp(8px, 2vw, 28px); }

.project-lightbox__counter {
  min-height: 48px;
  display: grid;
  place-items: center;
  font-size: 12px;
  letter-spacing: 1px;
}

.identity-gallery__item { grid-column: span 12; aspect-ratio: 16 / 9; }
.identity-gallery__item--half { grid-column: span 6; }
.identity-gallery__item--third { grid-column: span 4; aspect-ratio: 4 / 6; }
.identity-gallery__item--tall { aspect-ratio: 5 / 5; }
.identity-gallery__item--wide { aspect-ratio: 16 / 8; }

@media (max-width: 700px) {
  .identity-gallery__item--half,
  .identity-gallery__item--third {
    grid-column: span 12;
    aspect-ratio: 4 / 3;
  }
}

/* ===== Depth gallery (galeria em profundidade, lançamentos) ===== */
.depth-gallery {
  position: relative;
  height: 350vh;
  background: #050505;
}

.depth-gallery__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  perspective: 1200px;
}

.depth-gallery__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.depth-gallery__item {
  position: absolute;
  top: 50%;
  left: 50%;
  height: calc(clamp(170px, 20vw, 360px) * var(--depth-scale, 1));
  width: auto;
  border-radius: 14px;
  overflow: hidden;
  will-change: transform, opacity, filter;
  pointer-events: none;
}

.depth-gallery__item img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
  display: block;
}

.depth-gallery__vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 35%, rgba(0,0,0,0.9) 100%);
}

.depth-gallery__heading {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  text-align: center;
  color: var(--white);
  pointer-events: none;
  padding: 0 clamp(20px, 4vw, 60px);
}

.depth-gallery__heading p {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: var(--gray-muted);
}

.depth-gallery__heading h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 90px);
  line-height: 1.05;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .depth-gallery__item { height: calc(clamp(130px, 32vw, 200px) * var(--depth-scale, 1)); }
}

/* ===== Scroll pages (prints de página completa) ===== */
.scroll-pages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  padding: 0 clamp(20px, 3vw, 40px);
  margin-bottom: clamp(56px, 7vw, 90px);
}

.scroll-pages__frame {
  height: clamp(420px, 62vh, 720px);
  overflow-y: auto;
  border-radius: 14px;
  background: #eee;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.3) transparent;
}
.scroll-pages__frame::-webkit-scrollbar { width: 6px; }
.scroll-pages__frame::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.3);
  border-radius: 999px;
}
.scroll-pages__frame::-webkit-scrollbar-track { background: transparent; }

.scroll-pages__frame img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .scroll-pages { grid-template-columns: 1fr; }
}

/* Variante sem autoplay: rolagem só manual (mouse/touch), usada na
   galeria masonry da página Web Design. */
.web-masonry__frame {
  overflow-y: auto;
  border-radius: 14px;
  background: #eee;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.3) transparent;
}
.web-masonry__frame::-webkit-scrollbar { width: 6px; }
.web-masonry__frame::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.3);
  border-radius: 999px;
}
.web-masonry__frame::-webkit-scrollbar-track { background: transparent; }

.web-masonry__frame img {
  width: 100%;
  height: auto;
  display: block;
}

.scroll-pages__frame,
.web-masonry__frame {
  cursor: zoom-in;
}

/* ===== Loop carousel (carrossel infinito 4:5) ===== */
.loop-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  --carousel-gap: 20px;
  --carousel-item-w: 260px;
}

.loop-carousel__viewport {
  overflow: hidden;
}

.loop-carousel__track {
  display: flex;
  gap: var(--carousel-gap);
  width: max-content;
  cursor: grab;
  will-change: transform;
}
.loop-carousel.is-dragging .loop-carousel__track { cursor: grabbing; }

.loop-carousel__item {
  flex: 0 0 auto;
  width: var(--carousel-item-w);
  border-radius: 14px;
  overflow: hidden;
}

.loop-carousel__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* A altura explícita evita diferenças do aspect-ratio em itens flexíveis
   entre Safari e Chrome. O valor é calculado pelo carrossel no JavaScript. */
#projetos-lancamento .loop-carousel__item {
  height: var(--carousel-item-h);
  aspect-ratio: auto;
}

.loop-carousel__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(40px, 8vw, 140px);
  pointer-events: none;
  z-index: 2;
}
.loop-carousel__fade--left {
  left: 0;
  background: linear-gradient(90deg, var(--white) 0%, rgba(255,255,255,0) 100%);
}
.loop-carousel__fade--right {
  right: 0;
  background: linear-gradient(270deg, var(--white) 0%, rgba(255,255,255,0) 100%);
}

/* ===== Lightbox de páginas completas ===== */
body.page-lightbox-open { overflow: hidden; }

.page-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 28px);
  background: rgba(0, 0, 0, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.page-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.page-lightbox__dialog {
  position: relative;
  width: min(1180px, 100%);
  height: min(94dvh, 980px);
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.25s ease;
}

.page-lightbox.is-open .page-lightbox__dialog {
  transform: translateY(0) scale(1);
}

.page-lightbox__bar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px 0 20px;
  color: var(--white);
  background: var(--black);
}

.page-lightbox__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.page-lightbox__close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--white);
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.page-lightbox__close:hover { background: rgba(255, 255, 255, 0.14); }

.page-lightbox__scroller {
  height: calc(100% - 52px);
  overflow: auto;
  overscroll-behavior: contain;
  background: #eee;
}

.page-lightbox__image {
  width: 100%;
  height: auto;
  max-width: none;
  display: block;
}

/* ===== Statement ===== */
.statement { padding: clamp(120px, 18vw, 140px) 0; }

.statement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 8vw, 120px);
  align-items: start;
}

.statement h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.3;
  text-transform: uppercase;
  max-width: 520px;
}

.statement-text p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--gray-text);
  margin-bottom: 16px;
  max-width: 440px;
}

/* ===== Services (sticky stacking blocks) ===== */
.services { position: relative; }

.service-block {
  position: sticky;
  top: 0;
  z-index: var(--service-stack, 1);
  height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
}

.service-frame {
  width: 100%;
  height: calc(100vh - 40px);
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  grid-template-rows: 1fr 1.6fr 1fr;
  gap: 4px;
  background: var(--black);
  transform-origin: center top;
  will-change: transform, filter;
}

.service-img-side-left { grid-column: 1; grid-row: 1 / 4; }
.service-img-side-right { grid-column: 3; grid-row: 1 / 4; }
.service-img-top { grid-column: 2; grid-row: 1; }
.service-img-bottom { grid-column: 2; grid-row: 3; }
.service-text { grid-column: 2; grid-row: 2; }
.service-text-full { grid-row: 4 / 4; }

.service-img {
  position: relative;
  background-color: #ddd;
  background-size: cover;
  background-position: center;
}

.service-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.service-img-hero { background-position: top center; }

.service-text {
  background: var(--black);
  color: var(--white);
  padding: clamp(20px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: left;
}

.service-text h3 {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 34px);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.service-text p {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-muted);
  margin-bottom: 18px;
}

.service-text .btn-row {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.service-text .btn { height: 40px; font-size: 11px; padding: 0 22px; }
.service-text .icon-btn { width: 40px; height: 40px; }

/* ===== Story hero ===== */
.story-hero {
  --story-main-scale: 1;
  --story-copy-opacity: 0;
  --story-copy-offset: 36px;
  position: relative;
  height: 3600px;
  background: var(--black);
  color: var(--white);
}

.story-hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
}

.story-center-image {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: min(64vw, 820px);
  max-height: 85vh;
  height: auto;
  background-color: #171717;
  box-shadow: 0 40px 100px rgba(0,0,0,0.4);
  transform: translate(-50%, -50%) scale(var(--story-main-scale));
  transform-origin: center;
  will-change: transform;
}

.story-copy {
  position: absolute;
  left: clamp(20px, 4vw, 64px);
  right: clamp(20px, 4vw, 64px);
  bottom: clamp(52px, 9vh, 110px);
  z-index: 8;
  max-width: min(760px, 72vw);
  opacity: var(--story-copy-opacity);
  transform: translate3d(0, var(--story-copy-offset), 0);
  pointer-events: none;
  will-change: opacity, transform;
}

.story-copy p {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.2px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.story-copy h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.08;
  text-transform: uppercase;
  max-width: 980px;
}

.story-gradient {
  position: absolute;
  inset: auto 0 0;
  z-index: 7;
  height: 48vh;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.86) 78%, var(--black) 100%);
  pointer-events: none;
}

.story-parallax {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  margin: 0 auto;
}

.story-float {
  position: absolute;
  width: 18vw;
  max-width: 260px;
  min-width: 130px;
  opacity: var(--story-opacity, 0);
  border-radius: 0;
  object-fit: cover;
  box-shadow: 0 28px 70px rgba(0,0,0,0.3);
  transform: translate3d(0, var(--story-offset, 0px), 0);
  will-change: opacity, transform;
}

.story-float-1 {
  --story-y-start: 760px;
  --story-y-end: -610px;
  --story-reveal-start: 0.18;
  top: 8%;
  left: 4vw;
  z-index: 4;
  width: 30vw;
  max-width: 450px;
  min-width: 160px;
}

.story-float-2 {
  --story-y-start: 760px;
  --story-y-end: -220px;
  --story-reveal-start: 0.08;
  top: 4%;
  right: 4vw;
  z-index: 1;
  width: 50vw;
  max-width: 640px;
  min-width: 320px;
}

.story-float-3 {
  --story-y-start: 820px;
  --story-y-end: -40px;
  --story-reveal-start: 0.34;
  right: 4vw;
  bottom: 30%;
  z-index: 6;
  width: 30vw;
  max-width: 400px;
  min-width: 150px;
}

.story-float-4 {
  --story-y-start: 920px;
  --story-y-end: -280px;
  --story-reveal-start: 0.24;
  left: 5vw;
  bottom: 30%;
  z-index: 3;
  width: 40vw;
  max-width: 500px;
  min-width: 260px;
}

/* ===== Projects ===== */
.projects { padding: 60px 0 120px; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 40px;
}

.projects-rows {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 clamp(20px, 3vw, 40px);
  margin-bottom: 32px;
}

.project-row {
  display: flex;
  gap: 20px;
}

.project-card {
  flex-grow: var(--ratio);
  flex-shrink: 1;
  flex-basis: 0;
  min-width: 0;
}

.project-thumb {
  width: 100%;
  height: clamp(50vh, 26vw, 460px);
  background-color: #ddd;
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  transition: transform 0.3s ease;
  overflow: hidden;
}
.project-card:hover .project-thumb { transform: scale(1.01); }

.project-caption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 4px;
}

.project-caption strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.project-caption span {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  color: var(--gray-text);
}

.ver-mais-row { display: flex; justify-content: center; }
.ver-mais {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ver-mais img { width: 22px; height: 22px; }

/* ===== About ===== */
.about { padding: 12em 0 7em; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text {
  padding-left: max(40px, calc((100vw - var(--container)) / 2 + 40px));
  padding-right: 40px;
}

.about-text h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 36px);
  text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: 20px;
  max-width: 420px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-text);
  margin-bottom: 14px;
  max-width: 440px;
}

.about-image {
  width: 100%;
  height: clamp(320px, 70vw, 660px);
  background-color: #ddd;
  background-size: cover;
  background-position: center;
  border-radius: 24px 0 0 24px;
}

/* ===== CTA ===== */
.cta { padding: 9em 0 15em; text-align: center; }

.cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5.5vw, 56px);
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 20px;
}

.cta p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-text);
  max-width: 420px;
  margin: 0 auto;
}

/* ===== Footer ===== */
.site-footer {
  padding: 40px 0 32px;
  overflow: hidden;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 11.96vw;
  line-height: 1;
  width: 100vw;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  margin-bottom: 40px;
}

.footer-card {
  background: var(--black);
  color: var(--white);
  border-radius: 24px;
  margin: 0 clamp(16px, 2vw, 32px);
}

.footer-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-row:last-child { border-bottom: none; }

.footer-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  text-transform: uppercase;
  flex-shrink: 0;
  width: 120px;
}

.footer-row-content {
  display: flex;
  align-items: right;
  text-align: right;
  gap: 24px;
  margin-left: auto;
  font-size: 16px;
  font-weight: 300;
  max-width: 480px;
  line-height: 1.6;
}

.footer-contact-content a:hover { opacity: 0.7; }

.footer-social { display: flex; gap: 10px; margin-left: 8px; }
.footer-social img { width: 18px; height: 18px; }

.footer-copy {
  font-size: 12px;
  font-weight: 300;
  text-align: center;
  margin-top: 28px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .statement-grid { grid-template-columns: 1fr; gap: 24px; }
  .service-frame { grid-template-columns: 0.7fr 1.6fr 0.7fr; }
  .story-hero { height: 2200px; }
  .story-hero-stage { min-height: 640px; }
  .story-center-image { width: min(72vw, 680px); }
  .story-copy { max-width: min(620px, 82vw); }
  .story-float {
    width: 22vw;
    min-width: 118px;
    max-width: 220px;
  }
  .story-float-1 {
    left: 5vw;
    width: 24vw;
    max-width: 220px;
  }
  .story-float-2 {
    right: 3vw;
    width: 46vw;
    min-width: 260px;
    max-width: 420px;
  }
  .story-float-3 {
    right: 6vw;
    width: 22vw;
    max-width: 200px;
  }
  .story-float-4 {
    left: 6vw;
    width: 38vw;
    min-width: 220px;
    max-width: 340px;
  }
  .about-grid { grid-template-columns: 1fr; }
  .about-text { padding-left: 40px; }
  .about-image { order: -1; border-radius: 24px; min-height: 600px; }
  .footer-row { flex-wrap: wrap; }
  .footer-row-content { margin-left: 0; max-width: 100%; }
}

@media (max-width: 640px) {
  :root { --header-h: 88px; }

  .header-inner {
    height: 88px;
    padding-inline: 20px;
  }

  .logo {
    gap: 9px;
    font-size: 17px;
  }

  .logo-icon { width: 21px; height: 21px; }
  .nav-toggle img { width: 25px; }

  .site-header.scrolled .header-inner { height: 56px; }
  .site-header.scrolled .logo {
    gap: 7px;
    font-size: 13px;
  }
  .site-header.scrolled .logo-icon { width: 17px; height: 17px; }
  .site-header.scrolled .nav-toggle img { width: 21px; }

  .container { padding: 0 20px; }
  .project-row { flex-direction: column; }
  .project-card { flex-basis: auto; }
  .project-thumb { height: auto; aspect-ratio: var(--ratio); }

  .service-block { position: static; height: auto; padding: 40px 0; }
  .service-frame {
    height: auto;
    max-height: none;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .service-frame > *:nth-child(1) { grid-column: 1; grid-row: 1; aspect-ratio: 1; }
  .service-frame > *:nth-child(2) { grid-column: 2; grid-row: 1; aspect-ratio: 1; }
  .service-frame > *:nth-child(3) { grid-column: 1 / 3; grid-row: 2; padding: 24px 20px; }
  .service-frame > *:nth-child(4) { grid-column: 1; grid-row: 3; aspect-ratio: 1; }
  .service-frame > *:nth-child(5) { grid-column: 2; grid-row: 3; aspect-ratio: 1; }

  .story-hero { height: 1900px; }
  .story-hero-stage { min-height: 560px; }
  .story-center-image {
    width: 85vw;
    height: auto;
    max-height: 78svh;
    aspect-ratio: auto;
    object-fit: contain;
  }
  .story-copy { bottom: 44px; }
  .story-copy p { font-size: 11px; margin-bottom: 12px; }
  .story-copy h2 {
    max-width: 420px;
    font-size: clamp(27px, 10vw, 46px);
  }
  .story-float-1 {
    --story-y-start: 620px;
    --story-y-end: -950px;
    left: 5vw;
    top: 7%;
    width: 38vw;
    min-width: 120px;
    max-width: 190px;
  }
  .story-float-2 {
    --story-y-start: 720px;
    --story-y-end: -1050px;
    right: 0vw;
    top: 18%;
    width: 60vw;
    min-width: 250px;
    max-width: 320px;
  }
  .story-float-3 {
    --story-y-start: 680px;
    --story-y-end: -820px;
    right: 5vw;
    bottom: 21%;
    width: 38vw;
    min-width: 120px;
    max-width: 190px;
  }
  .story-float-4 {
    --story-y-start: 760px;
    --story-y-end: -900px;
    left: -2vw;
    bottom: 8%;
    width: 58vw;
    min-width: 220px;
    max-width: 300px;
  }
}

/* =========================================================
   TILT GALLERY (hero da página Web Design)
   Grade de 3 colunas que parte inclinada em perspectiva 3D,
   se achata conforme o scroll avança e, na segunda metade,
   as colunas deslizam em velocidades diferentes (parallax).
   Tudo ligado à posição de rolagem, mesma técnica de
   .zoom-parallax / .depth-gallery.
   ========================================================= */

.tilt-heading {
  position: relative;
  background: var(--white);
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 20px) clamp(20px, 4vw, 60px) 30px;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 80px;
}

.tilt-heading__inner {
  max-width: 720px;
}

.tilt-heading__eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 18px;
  color: var(--gray-text);
}

.tilt-heading h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 90px);
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.tilt-heading__sub {
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-text);
  max-width: 480px;
  margin: 0 auto 28px;
}

.tilt-gallery {
  position: relative;
  height: 190vh;
  background: var(--white);
}

.tilt-gallery__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  perspective: 1200px;
  perspective-origin: center top;
}

.tilt-gallery__grid {
  position: absolute;
  left: 50%;
  top: calc(3.4vw + 12px);
  transform-origin: 50% 0%;
  transform-style: preserve-3d;
  width: 100vw;
  height: auto;
  translate: -50% 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.2vw, 20px);
  will-change: transform;
}

.tilt-gallery__col {
  position: relative;
  height: 100%;
  overflow: visible;
  will-change: transform;
}

.tilt-gallery__col--b { margin-top: -10%; }
.tilt-gallery__col--c { margin-top: 3%; }

.tilt-gallery__col-track {
  display: flex;
  flex-direction: column;
  height: auto;
  gap: clamp(10px, 1.2vw, 20px);
  will-change: transform;
}

.tilt-gallery__cell {
  width: 100%;
  aspect-ratio: 13 / 9;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.tilt-gallery__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 800px) {
  .tilt-gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    width: 100vw;
  }
}

@media (max-width: 640px) {
  .page-hero {
    height: auto;
    min-height: 52svh;
    align-items: center;
  }
  .page-hero-inner {
    padding: calc(var(--header-h) + 24px) 20px 40px;
  }

  .tilt-heading {
    min-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: calc(var(--header-h) + 44px) 20px 48px;
  }

  .tilt-heading h1 {
    font-size: clamp(38px, 13vw, 58px);
    line-height: 0.95;
  }

  .tilt-gallery {
    height: auto;
    padding: 16px 0 56px;
    overflow: hidden;
  }

  .tilt-gallery__sticky {
    position: relative;
    top: auto;
    height: auto;
    perspective: 1500px;
    overflow: visible;
  }

  .tilt-gallery__grid {
    position: relative;
    top: auto;
    width: 120vw;
    gap: 8px;
  }

  .tilt-gallery__col--b { margin-top: -8%; }
  .tilt-gallery__col--c { margin-top: 2%; }
  .tilt-gallery__col-track { gap: 8px; }
  .tilt-gallery__cell { border-radius: 7px; }

  .statement { padding: 80px 0; }
  .statement-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }
  .statement h2 {
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.25;
  }
  .statement-text p {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 16px;
  }

  .cta {
    padding: 80px 20px;
  }
  .cta h2 {
    font-size: clamp(32px, 10vw, 42px);
    margin-bottom: 18px;
  }
  .cta p {
    font-size: 14px;
    line-height: 1.6;
  }
  .cta .btn-row { margin-top: 26px; }

  .statement h2,
  .story-copy h2,
  .about-text h2,
  .cta h2,
  .projects-showcase__heading {
    font-size: 6.5vw;
    line-height: 1.15;
  }

  .site-footer { padding-top: 24px; }
  .footer-wordmark { margin-bottom: 24px; }
  .footer-card {
    margin-inline: 12px;
    border-radius: 20px;
  }
  .footer-card-inner { padding-inline: 20px; }
  .footer-row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    padding: 24px 0;
  }
  .footer-label {
    width: auto;
    font-size: 13px;
    line-height: 1.3;
  }
  .footer-row-content {
    width: 100%;
    max-width: none;
    margin-left: 0;
    justify-content: flex-end;
    text-align: right;
    font-size: 12px;
    line-height: 1.5;
  }
  .footer-contact-content {
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    overflow-wrap: anywhere;
  }
  .footer-social { margin: 4px 0 0; }
  .footer-copy {
    padding-inline: 16px;
    font-size: 10px;
    line-height: 1.4;
  }

  #projetos-lancamento .identity-project,
  #projetos-identidade .identity-project {
    padding: 10px 0;
  }
  #projetos-lancamento .identity-project:first-child,
  #projetos-identidade .identity-project:first-child {
    padding-top: 40px;
  }
  #projetos-lancamento .identity-project__head,
  #projetos-identidade .identity-project__head {
    margin-bottom: 28px;
  }

  #projetos-identidade .identity-gallery {
    padding-bottom: 0;
  }
  #projetos-identidade .identity-gallery__item,
  #projetos-identidade .identity-gallery__item--half,
  #projetos-identidade .identity-gallery__item--third,
  #projetos-identidade .identity-gallery__item--tall,
  #projetos-identidade .identity-gallery__item--wide {
    aspect-ratio: auto;
  }
  #projetos-identidade .identity-gallery img {
    height: auto;
    object-fit: contain;
  }

  .identity-project__eyebrow {
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: 0.7px;
    margin-bottom: 12px;
  }
  .identity-project__head h3 {
    font-size: 9vw;
    line-height: 1.05;
    margin-bottom: 22px;
  }
  #projetos-lancamento .scroll-pages {
    gap: 14px;
    margin-bottom: 36px;
  }
  #projetos-lancamento .scroll-pages__frame {
    height: min(68svh, 560px);
  }

  .loop-carousel__fade { width: 18vw; }
  .loop-carousel__item {
    aspect-ratio: 8 / 7;
    background: var(--white);
  }
  .loop-carousel__item img {
    object-fit: cover;
  }

  .page-hero h1,
  .depth-gallery__heading h1,
  .tilt-heading h1 {
    font-size: 8vw;
    line-height: 1;
  }

  .page-lightbox { padding: 0; }
  .page-lightbox__dialog {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }
  .page-lightbox__bar { height: 56px; }
  .page-lightbox__scroller { height: calc(100% - 56px); }

  .project-lightbox__bar { min-height: 56px; }
  .project-lightbox__stage { padding-inline: 46px; }
  .project-lightbox__nav {
    width: 38px;
    height: 38px;
  }

  /* Cada imagem flutuante percorre uma etapa própria no mobile. */
  .story-float-1 {
    --story-reveal-start: 0.12;
    --story-reveal-end: 0.7;
  }
  .story-float-2 {
    --story-reveal-start: 0.18;
    --story-reveal-end: 0.78;
  }
  .story-float-3 {
    --story-reveal-start: 0.38;
    --story-reveal-end: 1;
  }
  .story-float-4 {
    --story-reveal-start: 0.28;
    --story-reveal-end: 0.9;
  }
}

/* =========================================================
   MASONRY DE SITES (galeria scrollável de prints de páginas)
   ========================================================= */

.web-masonry {
  column-count: 3;
  column-gap: clamp(16px, 2vw, 28px);
  padding: 0 clamp(20px, 3vw, 40px);
  margin-bottom: clamp(56px, 7vw, 90px);
}

.web-masonry .web-masonry__frame {
  break-inside: avoid;
  margin-bottom: clamp(16px, 2vw, 28px);
  width: 100%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

@media (max-width: 900px) {
  .web-masonry { column-count: 2; }
}
@media (max-width: 560px) {
  .web-masonry { column-count: 1; }
}
