/* Branding Force — design tokens taken from the Figma file
   'Branding Force Website' (accents/indigo #6155F5, 40px panels, 30px pills). */

:root{
  --indigo:#6155F5;
  --indigo-deep:#3522A2;
  --indigo-card:rgba(121,106,255,.75);
  --white:#fff;
  --black:#000;

  --r-panel:40px;
  --r-pill:30px;

  --bar-h:clamp(74px,11.5vw,166px);
  --gut:clamp(20px,5.3vw,76px);
  --maxw:1440px;

  /* fluid type, anchored to the 1440px Figma frame */
  --t-nav:clamp(19px,3.33vw,48px);
  --t-lede:clamp(26px,4.44vw,64px);
  --t-huge:clamp(38px,6.67vw,96px);
  --t-card-h:clamp(24px,3.33vw,48px);
  --t-card-b:clamp(17px,2.4vw,34px);
  --t-proj:clamp(24px,3.33vw,48px);
  --t-proj-s:clamp(19px,2.78vw,40px);
  --t-small:clamp(15px,2.22vw,32px);
  --t-btn:clamp(17px,2.36vw,34px);
  --t-body:clamp(16px,1.6vw,23px);
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{
  margin:0;background:var(--white);color:var(--black);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  font-size:var(--t-body);line-height:1.45;
  -webkit-font-smoothing:antialiased;overflow-x:clip;
}
img{display:block;max-width:100%}
a{color:inherit}

.shot,.case-hero,.reel{display:block;position:relative}
.shot img,.shot video,.case-hero img,.case-hero video{width:100%;height:100%;object-fit:cover;border-radius:var(--r-panel)}

/* ---------- header ---------- */
/* Three columns with equal outer tracks, so the wordmark sits on the true page
   centre at every width. A flex row centred the logo in the leftover space,
   which put it off-centre by half the difference between the two link widths. */
.bar{
  position:sticky;top:0;z-index:20;background:var(--white);
  height:var(--bar-h);
  display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  padding:0 var(--gut);gap:16px;
}
.bar a{text-decoration:none;color:var(--indigo);font-weight:600;font-size:var(--t-nav);white-space:nowrap}
.bar a:hover,.bar a:focus-visible{text-decoration:underline;text-underline-offset:.18em}
.bar .brand{justify-self:center;display:block}
.bar .brand img{width:clamp(112px,15.2vw,219px);height:auto}
.bar .nav-l{justify-self:start}
.bar .nav-r{justify-self:end}

/* ---------- shared ---------- */
.wrap{max-width:var(--maxw);margin-inline:auto;padding-inline:var(--gut)}
.pill{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:clamp(150px,15.4vw,222px);min-height:clamp(46px,4.65vw,67px);
  padding:0 clamp(20px,2.4vw,34px);
  background:var(--indigo);color:var(--white);border-radius:var(--r-pill);
  font-weight:500;font-size:var(--t-btn);text-decoration:none;
  transition:transform .35s cubic-bezier(.2,.7,.3,1),background-color .3s;
}
.pill:hover,.pill:focus-visible{transform:translateY(-2px) scale(1.02);background:#7568ff}
.foot{padding:clamp(30px,5vw,64px) var(--gut) clamp(34px,5.5vw,72px);text-align:center}
.foot p{margin:0;font-weight:500;font-size:var(--t-small)}
.on-indigo .foot{background:var(--indigo)}
.on-indigo .foot p{color:var(--white)}
:focus-visible{outline:3px solid var(--indigo);outline-offset:4px;border-radius:6px}
.bar a:focus-visible,.on-indigo :focus-visible{outline-color:currentColor}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- home: hero ---------- */
.hero{position:relative;height:clamp(320px,57vw,822px);overflow:hidden;background:var(--indigo-deep)}
.hero img,.hero video{width:100%;height:100%;object-fit:cover;display:block}
.hero .mark{
  position:absolute;inset:0;display:grid;place-items:center;
  padding-inline:clamp(12px,3vw,48px);pointer-events:none;
}
.hero .mark img{width:min(92%,1240px);height:auto;object-fit:contain;filter:drop-shadow(0 6px 40px rgba(0,0,0,.28))}

/* ---------- home: white panel ---------- */
.panel{
  background:var(--white);border-radius:var(--r-panel);
  margin-top:calc(var(--r-panel) * -1);position:relative;z-index:2;
  padding:clamp(26px,4.5vw,64px) 0 clamp(30px,5.6vw,80px);
}
.panel .lede{
  margin:0 0 clamp(18px,2.8vw,40px);
  font-weight:600;font-size:var(--t-lede);color:var(--indigo);line-height:1.12;
  text-wrap:balance;
}
.reel{
  position:relative;
  width:100%;aspect-ratio:1325/687;border-radius:var(--r-panel);
  overflow:hidden;background:#f1f0fb;
}
.reel video,.reel img{width:100%;height:100%;object-fit:cover;border-radius:var(--r-panel)}
.panel .cta{display:flex;justify-content:center;margin-top:clamp(24px,4.4vw,63px)}

/* ---------- home: indigo band ---------- */
.band{background:var(--indigo);color:var(--white);position:relative;overflow:hidden}
.band h2{
  position:relative;margin:0;padding:clamp(46px,7.4vw,107px) 0 clamp(30px,4.6vw,66px);
  font-weight:700;font-size:var(--t-huge);line-height:1.08;text-align:center;text-wrap:balance;
}
.duo{
  display:grid;grid-template-columns:repeat(2,1fr);
  gap:clamp(16px,2.5vw,36px);padding-bottom:clamp(40px,6.7vw,96px);
}
.duo article{
  background:var(--indigo-card);border-radius:var(--r-panel);
  padding:clamp(22px,4.1vw,59px) clamp(20px,3.4vw,49px);
  display:flex;flex-direction:column;gap:clamp(10px,1.2vw,17px);
  backdrop-filter:blur(2px);
}
.duo h3{margin:0;font-weight:700;font-size:var(--t-card-h);line-height:1.1}
.duo p{margin:0;font-weight:400;font-size:var(--t-card-b);line-height:1.24}

/* ---------- home: clients ---------- */
.clients{padding-bottom:clamp(24px,4vw,56px)}
.clients h4{margin:0 0 clamp(14px,2.2vw,32px);font-weight:500;font-size:var(--t-small)}
.clients ul{
  list-style:none;margin:0;padding:0;display:flex;align-items:center;
  justify-content:center;flex-wrap:wrap;gap:clamp(24px,6vw,90px);
}
.clients img{height:clamp(38px,7vw,100px);width:auto;object-fit:contain}
.clients .nbc img{height:clamp(48px,9.5vw,136px)}

/* ---------- work grid ---------- */
.grid{
  display:grid;grid-template-columns:repeat(2,1fr);
  column-gap:clamp(18px,4.3vw,62px);row-gap:clamp(30px,5.4vw,78px);
  padding:clamp(24px,3vw,42px) 0 clamp(40px,6vw,86px);
}
.card{text-decoration:none;display:block}
.card .shot{width:100%;aspect-ratio:631/548;border-radius:var(--r-panel);overflow:hidden}
.card h3{
  margin:clamp(10px,1.4vw,20px) 0 0;font-weight:600;font-size:var(--t-proj);
  color:var(--indigo);line-height:1.1;
}
.card p{margin:2px 0 0;font-weight:400;font-size:var(--t-proj-s);color:var(--black);line-height:1.15}

/* ---------- case study ---------- */
.case-hero{width:100%;aspect-ratio:1317/693;border-radius:var(--r-panel);overflow:hidden;margin-top:clamp(18px,3vw,48px)}

/* São João only. That video carries a white surround 78-521px wide depending on
   the shot, so a 40px radius clips pixels you cannot see. Runs full-bleed with
   square corners instead — same treatment as the .bleed image bands below. */
.case-hero--bleed{aspect-ratio:1440/693;border-radius:0;margin-top:0}
.case-hero--bleed video,.case-hero--bleed img{border-radius:0}
.case-title{margin:clamp(18px,2.8vw,40px) 0 clamp(26px,4.4vw,58px)}
.case-title h1{margin:0;font-weight:600;font-size:var(--t-proj);color:var(--indigo);line-height:1.1}
.case-title p{margin:2px 0 0;font-size:var(--t-proj-s);line-height:1.15}

/* Figma "Rectangle 20" on every case page is a full-bleed indigo band with white
   copy — 5.1:1, which scrapes AA and fails AAA at this size. Run it black on
   white instead: 21:1, and the case copy now reads like body text, not a panel. */
.case-body{background:var(--white);color:var(--black);
  padding:clamp(30px,5vw,66px) 0 clamp(32px,5.4vw,72px);margin-bottom:0}
.case-body p{margin:0;max-width:72ch;color:var(--black);
  font-size:clamp(16px,1.75vw,25px);line-height:1.5}

/* Image bands. In the Figma frames these run the full 1440 width, butted
   together with no gap and no corner radius — not cards inside the margin. */
.bleed{width:100%;aspect-ratio:var(--ar,1440/900);overflow:hidden;display:block}
.bleed>img{width:100%;height:100%;object-fit:cover;display:block}
.bleed .pair{display:grid;grid-template-columns:var(--cols,1fr 1fr);gap:0;width:100%;height:100%}
.bleed .pair>img{width:100%;height:100%;object-fit:cover;display:block;min-width:0}
.case-cta{display:flex;justify-content:center;
  padding:clamp(34px,5.6vw,80px) 0 clamp(30px,5vw,72px)}

/* ---------- contact ---------- */
.contact{padding:clamp(50px,10vw,150px) 0 clamp(40px,8vw,110px);text-align:center}
.contact h1{margin:0 0 clamp(16px,2.6vw,36px);font-weight:600;font-size:var(--t-lede);color:var(--indigo)}
.contact ul{list-style:none;margin:0;padding:0;display:grid;gap:clamp(8px,1.2vw,16px)}
.contact a{font-size:var(--t-proj-s);text-decoration:none;font-weight:500}
.contact a:hover,.contact a:focus-visible{color:var(--indigo)}

/* ---------- responsive ---------- */
@media (max-width:860px){
  .duo{grid-template-columns:1fr}
  .grid{grid-template-columns:1fr}
  :root{--r-panel:26px}
}
@media (max-width:560px){
  /* Below ~561px the 320px floor in .hero's clamp beats 57vw, so the box turns
     1.22:1 while hero.mp4 is 16:9 — object-fit:cover then ate 31% of the width
     on an iPhone. Follow the video's own ratio instead: no crop, and at 560px
     it computes to 315px, so the handover from the base rule is invisible. */
  .hero{height:auto;aspect-ratio:16/9}
  .bar{gap:10px}
  .clients ul{gap:22px}
  .bar .brand img{width:clamp(92px,20vw,219px)}  /* 20vw = 112px exactos a 560px, para casar com a regra base e nao saltar */
  :root{--r-panel:20px}
}

@media (prefers-reduced-motion:reduce){
  .pill{transition:none}
  .pill:hover,.pill:focus-visible{transform:none}
}

/* ---------- motion ---------- */
/* Reveal on enter. Kept in CSS so a JS failure just leaves everything visible. */
.reveal{opacity:0;transform:translateY(26px);
  transition:opacity .75s cubic-bezier(.22,.7,.3,1),transform .75s cubic-bezier(.22,.7,.3,1)}
.reveal.in{opacity:1;transform:none}

/* Work cards: stagger in, lift on hover */
.grid .card{opacity:0;transform:translateY(34px);
  transition:opacity .8s cubic-bezier(.22,.7,.3,1),transform .8s cubic-bezier(.22,.7,.3,1)}
.grid .card.in{opacity:1;transform:none}
.grid .card:nth-child(2){transition-delay:.08s}
.grid .card:nth-child(3){transition-delay:.16s}
.grid .card:nth-child(4){transition-delay:.24s}
.card .shot{transition:transform .55s cubic-bezier(.22,.7,.3,1),box-shadow .55s ease}
.card:hover .shot,.card:focus-visible .shot{
  transform:translateY(-8px) scale(1.012);
  box-shadow:0 26px 60px -22px rgba(38,28,140,.42)}
.card h3,.card p{transition:transform .45s cubic-bezier(.22,.7,.3,1)}
.card:hover h3,.card:hover p{transform:translateX(6px)}

/* Section cards on the homepage */
.duo article{opacity:0;transform:translateY(28px);
  transition:opacity .8s cubic-bezier(.22,.7,.3,1),transform .8s cubic-bezier(.22,.7,.3,1)}
.duo article.in{opacity:1;transform:none}
.duo article:nth-child(2){transition-delay:.1s}

/* Parallax drift — JS writes --p (-1 .. 1) as the element crosses the viewport */
[data-parallax]{will-change:transform}
[data-parallax] img,[data-parallax] video{
  transform:translate3d(0,calc(var(--p,0) * var(--pdist,26px)),0) scale(1.06);
  transition:none}

@media (prefers-reduced-motion:reduce){
  .reveal,.grid .card,.duo article{opacity:1!important;transform:none!important;transition:none!important}
  .card .shot,.card h3,.card p{transition:none}
  .card:hover .shot{transform:none;box-shadow:none}
  [data-parallax] img,[data-parallax] video{transform:none}
}

/* ---------- sound toggle ---------- */
.case-hero{position:relative}
.sound-btn{
  position:absolute;right:clamp(12px,1.6vw,22px);bottom:clamp(12px,1.6vw,22px);z-index:3;
  display:inline-flex;align-items:center;justify-content:center;
  width:clamp(38px,3.2vw,46px);height:clamp(38px,3.2vw,46px);
  padding:0;border:0;border-radius:50%;cursor:pointer;
  background:rgba(20,16,60,.58);color:var(--white);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  transition:background-color .25s ease,transform .25s cubic-bezier(.22,.7,.3,1);
}
.sound-btn:hover,.sound-btn:focus-visible{background:var(--indigo);transform:translateY(-2px)}
.sound-btn svg{width:19px;height:19px;display:block;fill:currentColor}
.sound-btn svg .x,.sound-btn svg .w{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}

/* Only ever injected when video.play() was rejected — Low Power Mode, Low Data
   Mode, or Safari's per-site Auto-Play off. Centred over the poster frame. */
.play-btn{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:3;
  display:inline-flex;align-items:center;justify-content:center;
  width:clamp(54px,6vw,74px);height:clamp(54px,6vw,74px);
  padding:0;border:0;border-radius:50%;cursor:pointer;
  background:rgba(20,16,60,.58);color:var(--white);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  transition:background-color .25s ease,transform .25s cubic-bezier(.22,.7,.3,1);
}
.play-btn:hover,.play-btn:focus-visible{background:var(--indigo);transform:translate(-50%,-50%) scale(1.06)}
.play-btn svg{width:44%;height:44%;display:block;fill:currentColor;margin-left:6%}
@media (prefers-reduced-motion:reduce){ .play-btn{transition:none} .play-btn:hover{transform:translate(-50%,-50%)} }
@media (prefers-reduced-motion:reduce){ .sound-btn{transition:none} .sound-btn:hover{transform:none} }
