:root {
  --bg: #0c0c0c;
  --text: #e9e9e9;
  --muted: #9aa1a7;
  --pill: #101010;
  --pill-dot: #5aff7b;
  --btn-bg: #fff;
  --btn-text: #0b0b0b;
  --link: #c6c6c6;
  --maxw: 1280px;

  --grain-op: .08;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  /* Tipografia fluida */
  --step--1: clamp(12px, .75rem + .1vw, 13px);
  --step-0: clamp(14px, .85rem + .2vw, 16px);
  --step-1: clamp(18px, 1.05rem + .25vw, 20px);
  --step-2: clamp(22px, 1.3rem + .5vw, 26px);
  --step-3: clamp(28px, 1.6rem + .8vw, 34px);
  --step-4: clamp(36px, 2rem + 1vw, 44px);
  --step-5: clamp(40px, 2.4rem + 1.6vw, 64px);

  --pad: clamp(16px, 3.5vw, 80px);
  --radius: 18px;
}

/* ====== FIXES GERAIS DE RESPONSIVIDADE (não alteram o visual) ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* permite que conteúdo encolha dentro de grids/flex, evitando cortes laterais */
.shell>*,
.s2-grid>*,
.proj-grid>*,
.proj-head>*,
.stack>*,
.card,
.left-inner,
.right,
.photo {
  min-width: 0;
}

/* palavras/itens longos não estouram no mobile */
.headline-hero,
.eyebrow,
.lead,
.fineprint,
.cta-mail,
.logo-box {
  overflow-wrap: anywhere;
  word-break: normal;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== SHELL / HERO ===== */
.shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.left {
  position: relative;
  display: flex;
}

.left-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px var(--pad);
}

.badge {
  position: absolute;
  top: 28px;
  left: var(--pad);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  background: var(--pill);
  border: 1px solid #1a1a1a;
  color: #cfcfcf;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .1px;
}

.badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pill-dot);
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(90, 255, 123, .12);
  animation: pulse-dot 1.6s infinite cubic-bezier(.66, 0, 0, 1);
}

h1 {
  font-size: var(--step-5);
  line-height: 1.05;
  margin: 0 0 24px;
  font-weight: 600;
  letter-spacing: -.02em;
  max-width: 720px;
}

.lead {
  max-width: 66ch;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.8;
  margin-bottom: 28px;
}

/* Botões */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 6px 18px rgba(0, 0, 0, .35);
  transition: transform .12s ease, box-shadow .2s ease;
  width: 180px;
  padding: 8px;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 26px rgba(0, 0, 0, .45);
}

.cta.small {
  height: 46px;
  padding: 0 22px;
  font-size: 15px;
}

/* Rodapé do hero */
.foot {
  position: absolute;
  left: var(--pad);
  bottom: 26px;
  color: var(--muted);
  font-size: 13px;
}

.foot a {
  color: var(--link);
  text-underline-offset: 3px;
}

/* Foto à direita */
.right {
  flex: 1;
  position: relative;
}

.photo {
  position: sticky;
  top: 0;
  inset-inline: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100svh;
}

.right .photo {
  transition: none !important;
}

/* Entradas suaves */
.hero-enter {
  animation: slideDown .8s var(--ease-out) both;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* máscara/reveal da foto */
.reveal-clip {
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  border-radius: var(--radius);
  animation: clipIn 1.1s var(--ease-out) both .1s;
  border: 1px solid #1e1e1e;
}

@keyframes clipIn {
  from {
    clip-path: inset(0 0 100% 0 round var(--radius));
  }

  to {
    clip-path: inset(0 0 0 0 round var(--radius));
  }
}

/* Typewriter */
.headline-hero {
  animation: none;
}

.typewriter {
  display: inline-block;
  max-width: 100%;
  white-space: pre-wrap;
  overflow: hidden;
  border-right: 2px solid rgba(233, 233, 233, .8);
  animation: caret 1s step-end infinite;
}

@keyframes caret {
  50% {
    border-color: transparent;
  }
}

/* ===== SECTION 2 ===== */
.s2 {
  background: var(--bg);
  padding: 56px 0 90px;
}

.s2-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.s2-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.6fr .95fr;
  gap: 32px;
}

.card {
  background: #131313;
  border: 1px solid #1e1e1e;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 24px 40px rgba(0, 0, 0, .35);
}

.card h3,
.card h2 {
  margin: 0 0 10px;
}

.eyebrow {
  font-size: var(--step-2);
  line-height: 1.35;
  font-weight: 600;
  color: #f0f0f0;
}

.eyebrow span {
  color: #ffb08a;
}

.muted {
  color: var(--muted);
  font-size: clamp(14px, .9rem + .1vw, 15px);
  line-height: 1.8;
  max-width: 65ch;
}

.card.tall {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
}

.card.tall .cta.small {
  align-self: flex-start;
  background: #fff;
  color: #111;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.card.tall .meta {
  margin-top: auto;
}

.card.tall .meta .label {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
}

.card.tall .meta .time {
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: .5px;
}

/* Testimonial */
.testimonial {
  position: relative;
  padding: 28px 32px;
  overflow: hidden;
}

.testimonial-viewport {
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
}

.testimonial-viewport.fade-out {
  opacity: .0;
  transform: translateY(8px);
}

.testimonial .quote {
  font-size: clamp(20px, 1.3rem + .6vw, 32px);
  line-height: 1.35;
  letter-spacing: -.01em;
  margin: 0 0 18px;
  max-width: 75ch;
  color: #f2f2f2;
}

.testimonial .person {
  color: #cfcfcf;
}

.testimonial .name {
  font-weight: 600;
}

.testimonial .role {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.testimonial .dots {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.testimonial .dots i.active {
  background: #cfcfcf;
}

.testimonial .dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3a3a;
  cursor: pointer;
}

.testimonial .arrows {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 12px;
}

.chev {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #151515;
  position: relative;
  cursor: pointer;
}

.chev::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #9e9e9e;
  border-bottom: 2px solid #9e9e9e;
  transform: rotate(-45deg);
}

.chev.left::before {
  transform: rotate(135deg);
}

/* Stack / Tech carousel */
.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card.small {
  padding: 22px 20px;
}

.card.small h3 {
  font-size: var(--step-1);
}

.tech-carousel {
  overflow: hidden;
  position: relative;
  width: min(100%, 360px);
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.tech-track {
  display: flex;
  gap: 8px;
  animation: tech-scroll 8s linear infinite;
}

@keyframes tech-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.pill {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 6px;
  background: #030303;
  border: 1px solid #2b2b2b;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-box {
  margin-top: 12px;
  font-weight: 900;
  font-size: clamp(32px, 2.5rem + .8vw, 56px);
  letter-spacing: .5px;
}

/* Brands */
.brands-marquee {
  position: relative;
  overflow: hidden;
  margin-top: 64px;
}

.brands-track {
  display: inline-flex;
  gap: 40px;
  white-space: nowrap;
  will-change: transform;
  animation: brands-scroll 30s linear infinite;
}

.brands-track span {
  font-weight: 800;
  font-size: clamp(22px, 1.2rem + .8vw, 36px);
  line-height: 1;
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .12);
  text-shadow: 0 0 1px rgba(255, 255, 255, .04);
}

@keyframes brands-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ===== SECTION 3 – PROJECTS ===== */
.projects {
  padding: 80px 0 40px;
}

.proj-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.proj-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.proj-title {
  font-size: var(--step-4);
  line-height: 1.05;
  margin: 0 0 8px;
  font-weight: 600;
}

.proj-desc {
  max-width: 66ch;
  color: var(--muted);
  line-height: 1.8;
}

.proj-ctrl {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
  opacity: .9;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2b2b2b; /* preto acinzentado */
}

.dot.active {
  background: #cfcfcf;
}

/* === GRID E CARDS (desktop/tablet) === */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.proj-card {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #0e0e0e;
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 40px rgba(0, 0, 0, .35);
}

.proj-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .9;
  filter: brightness(.7);
}

.proj-card.p1::after {
  background-image: url('../images/filmes.webp');
}

.proj-card.p2::after {
  background-image: url('../images/youtube.webp');
}

.proj-card.p3::after {
  background-image: url('../images/project-3.jpg');
}

.proj-card.p4::after {
  background-image: url('../images/project-4.jpg');
}

.proj-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.proj-nav .chev {
  width: 36px;
  height: 36px;
}

/* Hover zoom */
.hover-zoom {
  overflow: hidden;
}

.hover-zoom::after {
  transition: transform .6s var(--ease-out), filter .6s;
}

.hover-zoom:hover::after {
  transform: scale(1.05);
  filter: brightness(.85);
}

/* Fallback <img> */
.proj-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* ===== CTA & FOOTER ===== */
.cta-band {
  padding: 72px 0 40px;
}

.cta-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.cta-big {
  font-size: var(--step-3);
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 22px;
}

.cta-mail {
  font-size: clamp(18px, 1.2rem + .6vw, 28px);
  font-weight: 700;
  color: #ffb08a;
  text-decoration: none;
}

footer {
  padding: 32px 0 72px;
}

.foot-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.brand {
  font-weight: 900;
  font-size: clamp(22px, 1.2rem + .8vw, 32px);
  margin-bottom: 8px;
}

.fineprint {
  color: var(--muted);
  font-size: var(--step--1);
  max-width: 70ch;
  line-height: 1.8;
}

/* Granulado */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  opacity: var(--grain-op);
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'>\
  <filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/>\
  <feComponentTransfer><feFuncA type='table' tableValues='0 0 .05 0'/></feComponentTransfer></filter>\
  <rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
  animation: grainShift 12s steps(10) infinite;
}

@keyframes grainShift {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-10px, 8px);
  }

  50% {
    transform: translate(6px, -12px);
  }

  75% {
    transform: translate(-4px, 6px);
  }

  100% {
    transform: translate(0, 0);
  }
}

/* Cursor custom */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 3;
  transition: transform .15s var(--ease-out), opacity .2s;
}

/* Barra de progresso */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #ffb08a, #fff);
  z-index: 4;
  box-shadow: 0 0 16px rgba(255, 176, 138, .6);
}

/* Entradas on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), filter .6s;
  filter: blur(2px);
}

.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Stagger delay */
[data-stagger].is-visible>* {
  --idx: var(--i, 0);
  transition-delay: calc(0.05s * var(--idx));
}

/* Micro vibez */
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 4px rgba(90, 255, 123, 0.12), 0 0 0 0 rgba(90, 255, 123, 0.3);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(90, 255, 123, 0), 0 0 0 8px rgba(90, 255, 123, 0);
  }

  100% {
    box-shadow: 0 0 0 4px rgba(90, 255, 123, 0.12), 0 0 0 0 rgba(90, 255, 123, 0.3);
  }
}

/* ======= RESPONSIVIDADE ======= */
@media (max-width: 1200px) {
  .shell {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  }

  .testimonial .quote {
    font-size: clamp(18px, 1.1rem + .6vw, 28px);
  }

  .s2-grid {
    grid-template-columns: 1fr 1.2fr .9fr;
  }
}

@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .left-inner {
    padding-top: 48px;
  }

  .badge {
    position: static;
    margin: 10px 0 0;
  }

  .foot {
    position: static;
    margin-top: 24px;
  }

  .right {
    order: -1;
  }

  .photo {
    position: relative;
    height: min(64svh, 520px);
    border-radius: 0;
  }

  .s2 {
    padding: 48px 0 72px;
  }

  .s2-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .brands-track {
    gap: 28px;
  }

  .proj-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .proj-title {
    font-size: clamp(28px, 1.6rem + .6vw, 36px);
  }

  .proj-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo {
    height: min(56svh, 460px);
  }
}

/* ====== ALTERAÇÃO PEDIDA: 1 CARD POR VEZ NO MOBILE COM SCROLL ====== */
@media (max-width: 720px) {
  .proj-wrap { padding-inline: var(--pad); }

 
  .proj-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 16px;

    width: 100%;
    padding-bottom: 6px;

    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  
  
  .proj-card {
    flex: 0 0 calc(100% - (var(--pad) * 2));
    scroll-snap-align: start;
    min-width: 0;           
  }

  /* opcional: esconder a barra de rolagem no iOS/Android */
  .proj-grid::-webkit-scrollbar { display: none; }
}

/* ===== FIX: SECTION 2 igual ao layout de referência ===== */
@media (min-width: 1025px) {
  .s2-grid {
    grid-template-columns:
      clamp(30px, 24vw, 310px) minmax(600px, 1fr) clamp(320px, 24vw, 310px);
    gap: 24px;
    align-items: stretch;
  }

  .card,
  .testimonial,
  .stack .card {
    border-radius: 12px;
    background: #141414;
    border: 1px solid #1a1a1a;
    box-shadow: 0 24px 40px rgba(0, 0, 0, .35);
  }

  .card.tall {
    padding: 32px;
  }

  .testimonial {
    padding: 40px 44px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .testimonial .quote {
    font-size: clamp(26px, 2.4vw + .2rem, 40px);
    line-height: 1.2;
    letter-spacing: -.01em;
    max-width: 40ch;
    margin-bottom: 24px;
  }

  .testimonial .arrows {
    right: 24px;
    bottom: 22px;
  }

  .stack {
    gap: 24px;
  }

  .stack .card.small {
    padding: 28px;
  }
}

/* Acessibilidade: reduz movimento */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}