/* =================================================================
   STARFLY — "Feed Vivo" · Versão CLARA (roxo)
   ================================================================= */
:root {
  --bg:      #f1efe9;   /* off-white quente */
  --bg-2:    #e7e4db;
  --fg:      #131016;   /* quase preto */
  --muted:   #6f6a72;
  --line:    rgba(19,16,22,0.12);
  --accent:  #6d28d9;   /* roxo */
  --accent-2:#8b5cf6;   /* roxo claro */
  --pop:     #ffd84d;   /* amarelo sticker */
  --card:    #ffffff;

  --ff-display: "Bricolage Grotesque", sans-serif;
  --ff-body:    "Inter", sans-serif;
  --ff-mono:    "Space Mono", monospace;
  --pad: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(0.65, 0.05, 0, 1);
}

/* Dark Mode — Roxo Escuro */
[data-theme="dark"] {
  --bg:      #0d0d0d;   /* preto */
  --bg-2:    #1a1a1a;   /* cinza muito escuro */
  --fg:      #f5f5f5;   /* branco */
  --muted:   #a0a0a0;   /* cinza claro */
  --line:    rgba(255,255,255,0.1);
  --accent:  #a78bfa;   /* roxo claro para dark */
  --accent-2:#7c3aed;   /* roxo escuro */
  --pop:     #ffd84d;   /* amarelo mantém igual */
  --card:    #1a1a1a;   /* cards escuros */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--ff-body); line-height: 1.5; overflow-x: hidden;
}
@media (max-width: 900px) { body { cursor: auto; } }
a { color: inherit; text-decoration: none; }
mark { background: none; color: var(--accent); }
::selection { background: var(--accent); color: #fff; }
section { padding: clamp(70px, 12vh, 150px) var(--pad); }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* grão */
.grain {
  position: fixed; inset: -50%; z-index: 9998; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .6s steps(2) infinite; mix-blend-mode: multiply;
}
@keyframes grain { 0%{transform:translate(0,0)} 50%{transform:translate(-3%,2%)} 100%{transform:translate(2%,-2%)} }

/* =================================================================
   CURSOR — vira ▶ PLAY
   ================================================================= */
.cursor { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; }
.cursor__dot {
  position: fixed; top: 0; left: 0; width: 12px; height: 12px; box-sizing: border-box;
  border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s, border-color .25s, transform .12s var(--ease);
}
.cursor__media {
  position: absolute; top: 0; left: 0; transform: translate(-50%, -50%) scale(0);
  background: var(--accent); color: #fff; border-radius: 50px; padding: 14px 20px;
  font-family: var(--ff-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em;
  white-space: nowrap; transition: transform .35s var(--ease);
}
.cursor.is-play .cursor__dot { opacity: 0; }
.cursor.is-play .cursor__media { transform: translate(-50%, -50%) scale(1); }
.cursor.is-hover .cursor__dot { width: 40px; height: 40px; background: transparent; border: 1.5px solid var(--accent); }
.cursor.is-down .cursor__dot { transform: translate(-50%, -50%) scale(.72); }
.cursor.is-hover.is-down .cursor__dot { transform: translate(-50%, -50%) scale(.82); }
@media (max-width: 900px) { .cursor { display: none; } }

/* =================================================================
   PRELOADER
   ================================================================= */
.loader { position: fixed; inset: 0; z-index: 10000; background: var(--accent); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; }
.loader__rocket { width: clamp(90px, 14vw, 150px); height: auto; opacity: 0; transform: scale(.5) rotate(-12deg); filter: drop-shadow(0 8px 24px rgba(0,0,0,.25)); }
.loader__brand { font-family: var(--ff-display); font-weight: 800; font-size: clamp(28px, 6vw, 48px); }
.loader__brand em { font-style: normal; color: var(--pop); }
.loader__count { position: absolute; bottom: var(--pad); right: var(--pad); font-family: var(--ff-mono); font-size: clamp(40px, 9vw, 90px); font-weight: 700; }

/* =================================================================
   NAV
   ================================================================= */
.nav { position: fixed; top: 0; left: 0; width: 100%; z-index: 900; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--pad); background: rgba(241,239,233,.85); backdrop-filter: blur(10px); transition: background .3s var(--ease); }
[data-theme="dark"] .nav { background: rgba(13,13,13,.85); }
.nav__logo { font-family: var(--ff-display); font-weight: 800; font-size: 24px; display: inline-flex; align-items: center; gap: 8px; }
.nav__logo em { font-style: normal; color: var(--accent); }
.nav__rocket { width: 26px; height: 26px; object-fit: contain; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav__links { display: flex; gap: 4px; background: rgba(255,255,255,.6); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 40px; padding: 6px; transition: background .3s var(--ease), border-color .3s var(--ease); }
[data-theme="dark"] .nav__links { background: rgba(26,26,26,.6); }
.nav__links a { font-family: var(--ff-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 14px; border-radius: 30px; transition: background .3s var(--ease), color .3s var(--ease); }
.nav__links a:hover { background: var(--accent); color: #fff; }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle { background: none; border: none; cursor: pointer; font-size: 20px; padding: 8px; border-radius: 50%; transition: background .3s var(--ease), transform .3s var(--ease); }
.theme-toggle:hover { background: rgba(109,40,217,.1); transform: scale(1.1); }
[data-theme="dark"] .theme-toggle:hover { background: rgba(167,139,250,.1); }
.theme-toggle__icon { display: inline-block; transition: transform .4s var(--ease); }
.nav__cta { font-family: var(--ff-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--fg); color: var(--bg); border-radius: 40px; padding: 12px 20px; display: inline-flex; gap: 8px; align-items: center; transition: background .3s var(--ease); }
.nav__cta:hover { background: var(--accent); }
.nav__cta i { transition: transform .3s var(--ease); }
.nav__cta:hover i { transform: translateX(4px); }
.nav__burger { display: none; background: none; border: 0; flex-direction: column; gap: 6px; cursor: pointer; }
.nav__burger span { width: 28px; height: 2px; background: var(--fg); transition: transform .4s var(--ease); }
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 900px) { .nav__links, .nav__cta { display: none; } .nav__burger { display: flex; } }

.menu { position: fixed; inset: 0; z-index: 850; background: var(--accent); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: var(--pad); clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease); }
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu__links { display: flex; flex-direction: column; gap: 4px; }
.menu__links a { font-family: var(--ff-display); font-weight: 800; font-size: clamp(34px, 11vw, 70px); display: flex; gap: 14px; align-items: baseline; }
.menu__links em { font-family: var(--ff-mono); font-size: 14px; font-style: normal; color: var(--pop); }
.menu__foot { display: flex; gap: 18px; margin-top: 40px; font-family: var(--ff-mono); font-size: 13px; flex-wrap: wrap; }

/* =================================================================
   HERO
   ================================================================= */
.hero { min-height: 100svh; padding: 130px var(--pad) 40px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.hero__eyebrow { font-family: var(--ff-mono); font-size: 13px; color: var(--accent); margin-bottom: 28px; display: inline-block; }
.hero__title { font-family: var(--ff-display); font-weight: 800; font-size: clamp(46px, 10.5vw, 175px); line-height: .92; letter-spacing: -0.03em; }
.hero__l1 { display: block; }
.hero__swap { display: block; position: relative; height: 1em; overflow: hidden; color: var(--accent); }
.hero__swap b { position: absolute; left: 0; top: 0; font-weight: 800; opacity: 0; }
.hero__swap b.is-active { position: relative; opacity: 1; }
.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: 44px; flex-wrap: wrap; }
.hero__lead { max-width: 460px; font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* botões */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ff-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; padding: 15px 26px; border-radius: 50px; transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease); }
.btn i { transition: transform .3s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--fg); transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--fg); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); }
.btn--lg { padding: 20px 38px; font-size: 14px; }

/* selo girando */
.badge { position: absolute; right: var(--pad); bottom: 36px; width: 110px; height: 110px; display: grid; place-items: center; }
.badge__spin { width: 100%; height: 100%; animation: spin 16s linear infinite; }
.badge__spin text { font-family: var(--ff-mono); font-size: 8.5px; letter-spacing: .12em; fill: var(--fg); text-transform: uppercase; }
.badge__arrow { position: absolute; font-size: 22px; color: var(--accent); }
@media (max-width: 700px) { .badge { display: none; } }

/* =================================================================
   REEL STRIP
   ================================================================= */
.reels { padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.reels__gallery { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; }
.reels__gallery::-webkit-scrollbar { display: none; }
.reels__gallery.is-grabbing { cursor: grabbing; }
.reels__track { display: flex; gap: 16px; padding: 24px; width: max-content; }
.reel { position: relative; width: clamp(130px, 16vw, 190px); aspect-ratio: 9/16; border-radius: 12px; overflow: hidden; flex-shrink: 0; cursor: pointer; }
.reel--wide { aspect-ratio: auto; width: calc(clamp(130px, 16vw, 190px) * 3.1605); align-self: stretch; }
.reel__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s var(--ease); }
.reel__thumb[src]:not([src=""]) { opacity: 1; }
.reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel__tag { position: absolute; top: 10px; left: 10px; z-index: 2; font-family: var(--ff-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; background: rgba(255,255,255,.85); color: var(--fg); padding: 4px 9px; border-radius: 20px; }
.reel__play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(255,255,255,.9); color: var(--accent); border-radius: 50%; font-size: 14px; font-style: normal; opacity: 0.8; transform: scale(1); transition: .4s var(--ease); z-index: 2; }
.reel:hover .reel__play { opacity: 1; transform: scale(1.1); }
.reel.is-playing .reel__play { opacity: 0; transform: scale(.7); }

/* modal do player do YouTube (abre ao clicar em um reel/trabalho com data-yt) */
.yt-modal { position: fixed; inset: 0; z-index: 10001; display: none; align-items: center; justify-content: center; padding: 40px; }
.yt-modal.is-open { display: flex; }
.yt-modal__backdrop { position: absolute; inset: 0; background: rgba(10,8,15,.9); cursor: pointer; }
.yt-modal__box { position: relative; width: min(960px, 100%); aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.yt-modal__frame, .yt-modal__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.yt-modal__close { position: absolute; top: -40px; right: 0; background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; font-family: var(--ff-body); }
.r1 { background: transparent; }
.r2 { background: transparent; }
.r3 { background: transparent; }
.r4 { background: transparent; }
.r5 { background: transparent; }

/* =================================================================
   SOBRE
   ================================================================= */
.tag { font-family: var(--ff-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); display: inline-block; }
.sobre__statement { font-family: var(--ff-display); font-weight: 700; font-size: clamp(28px, 5.2vw, 78px); line-height: 1.04; letter-spacing: -.02em; max-width: 20ch; margin: 30px 0 60px; }
.sobre__statement .w { display: inline-block; overflow: hidden; vertical-align: top; }
.sobre__statement .w > span { display: inline-block; }
.sobre__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); max-width: 1000px; margin-left: auto; }
.sobre__cols p { font-size: clamp(16px, 1.3vw, 19px); color: var(--muted); }
.sobre__cols strong { color: var(--accent); font-weight: 600; }
@media (max-width: 700px) { .sobre__cols { grid-template-columns: 1fr; } }

/* =================================================================
   TRABALHOS (galeria arrastável)
   ================================================================= */
.works__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 36px; }
.works__hint { font-family: var(--ff-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.works__gallery { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
.works__gallery::-webkit-scrollbar { display: none; }
.works__gallery.is-grabbing { cursor: grabbing; }
.works__track { display: flex; gap: 22px; width: max-content; }
.work { width: clamp(280px, 42vw, 540px); }
.work__media { position: relative; aspect-ratio: 4/3; border-radius: 24px; overflow: hidden; cursor: pointer; display: flex; align-items: center; justify-content: center; border: 3px solid var(--accent); }
.work__media video, .work__media img { width: 100%; height: 100%; object-fit: contain; }
.work__thumb { opacity: 0; transition: opacity .3s var(--ease); }
.work__thumb[src]:not([src=""]) { opacity: 1; }
.work__play { position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; display: grid; place-items: center; background: rgba(255,255,255,.9); color: var(--accent); border-radius: 50%; font-size: 20px; font-style: normal; opacity: 0.8; transform: scale(1); transition: .4s var(--ease); pointer-events: none; }
.work:hover .work__play { opacity: 1; transform: scale(1.1); }
.work.is-playing .work__play { opacity: 0; transform: scale(.7); }
.work__media::after { content: ""; position: absolute; inset: 0; background: rgba(109,40,217,0); transition: background .4s var(--ease); pointer-events: none; }
.work:hover .work__media::after { background: rgba(109,40,217,.18); }
.work.is-playing .work__media::after { background: rgba(109,40,217,0); }
.work__meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; gap: 16px; }
.work__meta h3 { font-family: var(--ff-display); font-weight: 700; font-size: clamp(18px, 2vw, 26px); letter-spacing: -.01em; }
.work__meta span { font-family: var(--ff-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.w1 .work__media { background: linear-gradient(135deg, #8b5cf6, #2e1065); }
.w2 .work__media { background: linear-gradient(135deg, #ffd84d, #6d28d9); }
.w3 .work__media { background: linear-gradient(135deg, #c4b5fd, #4c1d95); }
.w4 .work__media { background: linear-gradient(135deg, #a78bfa, #1e1b4b); }
.w5 .work__media { background: linear-gradient(135deg, #ede9fe, #7c3aed); }
.w6 .work__media { background: linear-gradient(135deg, #6d28d9, #1e1b4b); }
.w7 .work__media { background: linear-gradient(135deg, #7c3aed, #2e1065); cursor: pointer; }
.w8 .work__media { background: linear-gradient(135deg, #c4b5fd, #6d28d9); cursor: default; }
.w9 .work__media { background: linear-gradient(135deg, #ffd84d, #4c1d95); }
.w10 .work__media { background: linear-gradient(135deg, #7c3aed, #2e1065); }
.w11 .work__media { background: linear-gradient(135deg, #6d28d9, #1e1b4b); }
.w12 .work__media { background: linear-gradient(135deg, #a78bfa, #1e1b4b); }

/* =================================================================
   SERVIÇOS (bento)
   ================================================================= */
.servicos__head { margin-bottom: 50px; }
.servicos__title { font-family: var(--ff-display); font-weight: 800; font-size: clamp(36px, 7vw, 110px); line-height: .92; letter-spacing: -.03em; margin-top: 14px; }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border-radius: 18px; padding: clamp(24px, 3vw, 40px); min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .4s var(--ease), background .4s var(--ease); border: 1px solid var(--line); }
.card:hover { transform: translateY(-6px); }
.card--big { grid-column: span 2; min-height: 280px; }
.card--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.card__n { font-family: var(--ff-mono); font-size: 13px; color: var(--accent); }
.card--accent .card__n { color: var(--pop); }
.card h3 { font-family: var(--ff-display); font-weight: 700; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.05; letter-spacing: -.01em; margin: 40px 0 10px; }
.card p { font-size: 14px; color: var(--muted); }
.card--accent p { color: rgba(255,255,255,.85); }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); } .card--big { grid-column: span 2; } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .card--big { grid-column: span 1; } }

/* =================================================================
   STORYMAKER
   ================================================================= */
.story { background: var(--fg); color: var(--bg); border-radius: 0; text-align: center; }
[data-theme="dark"] .story { background: var(--bg); color: var(--fg); }
.story__live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--pop); margin-bottom: 28px; }
.story__live i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b3b; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1; box-shadow:0 0 0 0 rgba(255,59,59,.6)} 50%{opacity:.6; box-shadow:0 0 0 8px rgba(255,59,59,0)} }
.story__title { font-family: var(--ff-display); font-weight: 800; font-size: clamp(32px, 6.5vw, 100px); line-height: .95; letter-spacing: -.03em; max-width: 16ch; margin: 0 auto 28px; }
.story__title mark { color: var(--accent-2); }
.story__lead { max-width: 56ch; margin: 0 auto 36px; color: rgba(241,239,233,.72); font-size: clamp(16px, 1.4vw, 19px); }
[data-theme="dark"] .story__lead { color: rgba(255,255,255,.8); }

/* =================================================================
   CLIENTES
   ================================================================= */
.clients { padding: clamp(50px, 8vh, 90px) 0; overflow: hidden; }
.clients__label { display: block; text-align: center; font-family: var(--ff-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 34px; }
.clients__track { display: flex; align-items: center; gap: 48px; width: max-content; will-change: transform; }
.clients__track img {
  height: clamp(46px, 6.5vw, 68px); width: auto; max-width: 210px; object-fit: contain;
  filter: grayscale(1) opacity(.6); transition: filter .35s var(--ease);
}
.clients__track img:hover { filter: grayscale(0) opacity(1); }
.client-badge {
  font-family: var(--ff-display); font-weight: 700; font-size: clamp(18px, 2.4vw, 30px);
  color: var(--fg); opacity: .55; white-space: nowrap; transition: opacity .35s var(--ease);
}
.client-badge:hover { opacity: 1; }
.clients__track i { color: var(--accent); font-style: normal; }

/* =================================================================
   CTA
   ================================================================= */
.cta { text-align: center; position: relative; background: var(--accent); color: #fff; padding: clamp(90px, 16vh, 200px) var(--pad); }
.cta__badge { position: absolute; top: 8%; right: 8%; width: 120px; height: 120px; display: grid; place-items: center; background: var(--pop); border-radius: 50%; }
.cta__badge .badge__spin text { fill: var(--fg); }
.cta__badge > span { position: absolute; font-size: 26px; color: var(--fg); }
.cta__title { font-family: var(--ff-display); font-weight: 800; font-size: clamp(34px, 7vw, 110px); line-height: .94; letter-spacing: -.03em; max-width: 15ch; margin: 0 auto 14px; }
.cta__sub { font-family: var(--ff-display); font-weight: 600; font-size: clamp(22px, 4vw, 60px); color: var(--pop); margin-bottom: 50px; letter-spacing: -.01em; }
.cta .btn--solid { background: #fff; color: var(--accent); }
.cta .btn--solid:hover { background: var(--fg); color: #fff; }
@media (max-width: 700px) { .cta__badge { width: 84px; height: 84px; top: 4%; right: 5%; } }

/* =================================================================
   FOOTER
   ================================================================= */
.footer { padding: 0 var(--pad) 30px; overflow: hidden; }
.footer__big { font-family: var(--ff-display); font-weight: 800; line-height: .82; font-size: clamp(90px, 26vw, 420px); letter-spacing: -.04em; text-align: center; color: var(--fg); margin-bottom: -1vw; }
.footer__big em { font-style: normal; color: var(--accent); }
.footer__meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; font-family: var(--ff-mono); font-size: 12px; color: var(--muted); padding-top: 20px; border-top: 1px solid var(--line); }
.footer__socials { display: flex; gap: 16px; }
.footer__socials a:hover { color: var(--accent); }

.reveal { will-change: transform, opacity; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .grain { display: none; } }
