﻿/* =========================================================
   NRC IA — style.css v50
   Cinematografico · Mobile-first · Nova direcao
   ========================================================= */

/* RESET */
*,*::before,*::after { box-sizing: border-box }
html,body { margin:0; padding:0; width:100%; max-width:100vw }
html { scroll-behavior:smooth; background:#0A0A0A; overflow-x:clip }
body { overflow-x:clip }
body { font-family:var(--sans); color:var(--branco-filme); background:#0A0A0A;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility }
img,video { display:block; max-width:100% }
button { font:inherit; color:inherit; background:none; border:0; padding:0; cursor:pointer }
a { color:inherit; text-decoration:none }
ol,ul { margin:0; padding:0; list-style:none }
p,h1,h2,h3,h4 { margin:0 }

/* TOKENS */
:root {
  --preto-cinema:  #0A0A0A;
  --azul-noite:    #0F1A2E;
  --azul-profundo: #07111F;
  --branco-filme:  #F5F1EA;
  --cinza-fantasma:#6B6B6B;
  --azul-nrc:      #1B4FD8;
  --azul-tecnico:  #2563EB;
  --rec:           #D9302F;
  --ambar:         #E8B65F;
  --editorial: 'Cormorant Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Inter', system-ui, sans-serif;
  --topbar-h: 72px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* TOPBAR */
.topbar {
  position: fixed; top:0; left:0; right:0; z-index:100;
  height: var(--topbar-h);
  padding: 0 28px;
  padding-top: var(--safe-t);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: rgba(7, 10, 16, 0.45);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid rgba(245, 241, 234, 0.06);
  transition: background 0.4s ease, border-color 0.4s ease;
}
.topbar.is-scrolled {
  background: rgba(7, 10, 16, 0.90);
  border-bottom-color: rgba(245, 241, 234, 0.10);
}
.topbar__brand { justify-self: start; }
.topbar__spacer { justify-self: end; display: block; }
.topbar__logo {
  width: auto; height: 56px; object-fit: contain; opacity: 1; display: block;
}
/* Nav central (tipografia do Portfólio) */
.topbar__nav {
  display: none;
  justify-self: center;
  align-items: center;
  gap: clamp(24px, 3vw, 44px);
}
.topbar__link {
  font-family: var(--font-mono, var(--mono));
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.82);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color .25s ease;
  white-space: nowrap;
}
.topbar__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: #6BA3DE;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.76,0,.24,1);
}
.topbar__link:hover { color: #F5F1EA; }
.topbar__link:hover::after { transform: scaleX(1); }
/* Hamburger: visible on mobile only */
.topbar__menu {
  width:32px; height:32px; display:flex; flex-direction:column; justify-content:center; gap:5px;
  background:none; border:0; cursor:pointer; padding:4px;
  justify-self: end;
  grid-column: 3;
}
.topbar__menu span {
  display:block; height:1px; background:var(--branco-filme); opacity:.8;
  transition: transform .25s, opacity .2s;
}
.topbar__menu.is-open span:nth-child(1) { transform: rotate(45deg) translate(4px,4px) }
.topbar__menu.is-open span:nth-child(2) { opacity:0 }
.topbar__menu.is-open span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px) }
@media (min-width: 900px) {
  .topbar__nav { display: inline-flex; }
  .topbar__menu { display: none !important; }
}

/* CAMERA VIVA HUD */
.camviva {
  position: fixed; top: calc(var(--topbar-h) + 8px + var(--safe-t)); right:20px; z-index:90;
  display: flex; align-items:center; gap:6px;
  opacity:.7; pointer-events:none;
  transition: opacity .4s;
}
.camviva__cross {
  width:14px; height:14px; flex-shrink:0; color:var(--branco-filme);
}
.camviva__text {
  font-family:var(--mono); font-size:9px; letter-spacing:.08em;
  color:var(--branco-filme); white-space:nowrap;
}

/* CENAS base */
.cena { position:relative; width:100%; }

/* =========================================================
   CENA 01 — HERO
   ========================================================= */
.cena--hero {
  height: 100dvh;
  min-height: 100vh;
  background: var(--preto-cinema);
  display: flex; flex-direction:column;
  overflow: hidden;
}

/* video bg */
.hero__bg {
  position: absolute; inset:0; z-index:0;
}
.hero__video {
  width:100%; height:100%; object-fit:cover;
  filter: saturate(0) brightness(.4) contrast(1.1);
}
.hero__tint {
  position:absolute; inset:0;
  background: linear-gradient(
    180deg,
    rgba(10,10,10,0.3) 0%,
    rgba(10,10,10,0.15) 40%,
    rgba(10,10,10,0.5) 80%,
    rgba(10,10,10,0.85) 100%
  );
}

/* letterbox bars */
.hero__bar {
  position:absolute; left:0; right:0; z-index:1;
  background: var(--preto-cinema);
}
.hero__bar--top { top:0; height:8% }
.hero__bar--bottom { bottom:0; height:8% }

/* corner labels */
.hero__corner-label {
  position:absolute; z-index:3;
  font-size:9px; letter-spacing:.1em; opacity:.6;
  color:var(--branco-filme);
}
.hero__corner-label--tl { top:calc(8% + 12px); left:20px }
.hero__corner-label--br { bottom:calc(8% + 12px); right:20px }
.hero__corner-label--bl { bottom:calc(8% + 12px); left:20px }

/* cursor blink */
.hero__cursor {
  display:inline-block; width:2px; height:0.9em;
  background:var(--branco-filme); margin-left:2px;
  vertical-align:middle; opacity:1;
  animation: cursorBlink 1s step-end infinite;
}
@keyframes cursorBlink { 0%,100%{opacity:1} 50%{opacity:0} }

/* content */
.hero__content {
  position:relative; z-index:2;
  display:flex; flex-direction:column;
  justify-content:flex-end;
  height:100%;
  padding: 0 28px calc(8% + 48px) 28px;
  padding-top: calc(var(--topbar-h) + var(--safe-t));
  gap:0;
}
.hero__title {
  font-family: var(--editorial);
  font-weight: 300; font-style:italic;
  font-size: clamp(22px, 5.5vw, 40px);
  letter-spacing: .02em;
  line-height: 1.3;
  color: var(--branco-filme);
  margin-bottom: 16px;
}
.hero__sub {
  font-family: var(--mono);
  font-size: clamp(9px, 2.2vw, 12px);
  line-height: 1.65;
  color: var(--branco-filme);
  opacity: .7;
  max-width: 340px;
  margin-bottom: 32px;
}
.hero__ctas {
  display:flex; flex-direction:column; align-items:flex-start; gap:20px;
}
.hero__btn-primary {
  display:flex; flex-direction:column; align-items:center; gap:6px;
  cursor:pointer;
}
.hero__btn-icon {
  width:60px; height:60px; border-radius:50%;
  border:1px solid rgba(245,241,234,0.5);
  display:flex; align-items:center; justify-content:center;
  font-size:20px; color:var(--branco-filme);
  transition: border-color .25s, background .25s;
  background: rgba(245,241,234,0.05);
}
.hero__btn-primary:hover .hero__btn-icon,
.hero__btn-primary:focus .hero__btn-icon {
  border-color: var(--branco-filme); background: rgba(245,241,234,0.12);
}
.hero__btn-label { font-family:var(--mono); font-size:9px; letter-spacing:.15em; opacity:.7 }
.hero__btn-secondary {
  font-family:var(--mono); font-size:10px; letter-spacing:.12em;
  color:var(--branco-filme); opacity:.6;
  border-bottom:1px solid rgba(245,241,234,.3);
  padding-bottom:1px;
  transition: opacity .2s;
}
.hero__btn-secondary:hover { opacity:1 }

/* =========================================================
   CENA 02 — CASTING
   ========================================================= */
.cena--casting {
  background: var(--azul-noite);
  padding: 80px 0 80px;
}
.casting__header {
  padding: 0 28px 48px;
}
.casting__kicker {
  font-family:var(--mono); font-size:9px; letter-spacing:.15em;
  color:var(--cinza-fantasma); text-transform:uppercase;
  margin-bottom: 16px; display:block;
}
.casting__title {
  font-family:var(--editorial); font-weight:300;
  font-size: clamp(28px, 7vw, 48px);
  line-height:1.2; color:var(--branco-filme);
}
.casting__title em { font-style:italic; opacity:.85 }

.casting__list {
  display:flex; flex-direction:column; gap:24px;
  padding: 0 20px;
}

/* Fichas 9:16 */
.ficha {
  position:relative;
  aspect-ratio: 9/16;
  border-radius:4px;
  overflow:hidden;
  background: var(--azul-profundo);
  transition: opacity .4s;
}
.ficha.is-faded { opacity:.4; pointer-events:none }
.ficha.is-chosen { outline:1px solid var(--rec); outline-offset:2px }

.ficha__media {
  position:absolute; inset:0;
}
.ficha__media img {
  width:100%; height:100%; object-fit:cover;
  filter: grayscale(.3) contrast(1.1) brightness(.85);
}
.ficha__vinheta {
  position:absolute; inset:0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(7,17,31,0.85) 100%);
}

.ficha__overlay {
  position:absolute; inset:0; z-index:2;
  display:flex; flex-direction:column;
  padding:20px;
}
.ficha__code {
  font-size:9px; letter-spacing:.15em; color:var(--branco-filme); opacity:.7;
}
.ficha__bottom {
  margin-top:auto;
  margin-bottom:80px;
  max-width:75%;
}
.ficha__name {
  font-family:var(--editorial); font-weight:300;
  font-size: clamp(26px, 6.5vw, 38px);
  color:var(--branco-filme); line-height:1.1;
}
.ficha__tagline {
  font-size:10px; letter-spacing:.1em; color:var(--branco-filme); opacity:.65;
  margin-top:6px;
}
.ficha__status {
  position:absolute; top:20px; right:20px; z-index:3;
  font-size:9px; letter-spacing:.1em; color:var(--branco-filme); opacity:.7;
}
.ficha__overlay .ficha__code { padding-right:110px; }

/* Drawer */
.ficha__drawer {
  position:absolute; bottom:0; left:0; right:0; z-index:4;
  background: rgba(7,17,31,0.97);
  padding:20px;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.ficha__drawer[hidden] { display:none }
.ficha__drawer.is-open { transform: translateY(0); display:block }
.ficha__specs {
  list-style:none; padding:0; margin:0 0 16px;
  display:flex; flex-direction:column; gap:8px;
}
.ficha__specs li {
  display:flex; justify-content:space-between;
  font-size:9px; letter-spacing:.08em; color:var(--branco-filme); opacity:.8;
  border-bottom:1px solid rgba(245,241,234,.08); padding-bottom:6px;
}
.ficha__whatsapp {
  font-size:10px; letter-spacing:.12em; color:var(--azul-tecnico);
  border-bottom:1px solid var(--azul-tecnico); padding-bottom:1px;
}

.ficha__actions {
  position:absolute; bottom:16px; left:20px; right:20px; z-index:5;
  display:flex; justify-content:space-between; align-items:center;
}
.ficha__details-btn {
  font-size:9px; letter-spacing:.1em; color:var(--branco-filme); opacity:.6;
  transition:opacity .2s;
}
.ficha__details-btn:hover { opacity:1 }
.ficha__choose-btn {
  font-size:9px; letter-spacing:.12em; color:var(--branco-filme);
  background: rgba(245,241,234,.1);
  border:1px solid rgba(245,241,234,.25); border-radius:2px;
  padding:6px 12px; transition: background .2s, border-color .2s;
}
.ficha__choose-btn:hover { background: rgba(245,241,234,.18); border-color:rgba(245,241,234,.5) }

/* Stamp overlay */
.casting__stamp {
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%) rotate(-8deg);
  z-index:200; pointer-events:none; width:200px;
  animation: stampIn .35s cubic-bezier(.25,.46,.45,.94) forwards;
}
.casting__stamp[hidden] { display:none }
@keyframes stampIn {
  from { transform:translate(-50%,-50%) rotate(-8deg) scale(.6); opacity:0 }
  to   { transform:translate(-50%,-50%) rotate(-8deg) scale(1); opacity:1 }
}

.casting__reset {
  display:block; margin:32px auto 0;
  font-size:10px; letter-spacing:.12em; color:var(--cinza-fantasma);
  border-bottom:1px solid var(--cinza-fantasma); padding-bottom:1px;
  transition: color .2s;
}
.casting__reset:hover { color:var(--branco-filme) }
.casting__reset[hidden] { display:none }

/* =========================================================
   CENA 03 — PLANTA VIVA
   ========================================================= */
.cena--planta {
  position:relative;
  min-height:400vh;
  background: var(--azul-profundo);
}

/* grid only in this section */
.planta__grid {
  position:absolute; inset:0; z-index:0; pointer-events:none;
  background-image:
    linear-gradient(rgba(245,241,234,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,241,234,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* progress bar (absolute inside sticky stage) */
.planta__progbar {
  position:absolute; top:0; right:18px;
  height:100%; width:auto; z-index:20;
  pointer-events:none;
}
.planta__progbar-fill {
  position:absolute; top:0; right:0;
  width:1px; height:0%; background:var(--branco-filme); opacity:.55;
}
.planta__progbar-labels {
  position:absolute; top:0; right:8px;
  display:flex; flex-direction:column; justify-content:space-between;
  height:100%; padding:14vh 0;
}
.planta__progbar-labels span {
  font-size:8px; letter-spacing:.1em; color:var(--branco-filme);
  opacity:.22; transition:opacity .3s; white-space:nowrap;
}
.planta__progbar-labels span.is-active { opacity:.85 }

/* sticky stage */
.planta__sticky {
  position:sticky; top:0; z-index:5;
  height:100vh; width:100%;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}

.planta__svg-wrap {
  /* overridden below in planta section */
  transition: transform .6s cubic-bezier(.25,.46,.45,.94), opacity .4s;
}

.planta__svg {
  width:100%; height:auto;
  display:block;
}

/* F6 volume — 3D tilt via JS class */
.planta__svg-wrap.is-volume {
  transform: perspective(600px) rotateX(42deg) translateY(-20px);
}
.planta__svg-wrap.is-camera {
  transform: perspective(600px) rotateX(20deg) translateY(-10px) scale(1.15);
}

/* pframe groups */
.pframe { transition: opacity .5s }

/* F8 frame final */
.planta__frame8 {
  position:absolute; inset:0; z-index:10;
  background: var(--preto-cinema);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .6s;
}
.planta__frame8.is-visible { opacity:1; pointer-events:auto }
.planta__frame8-bars { position:absolute; inset:0; pointer-events:none }
.planta__frame8-bar { position:absolute; left:0; right:0; background:var(--preto-cinema) }
.planta__frame8-bar--top { top:0; height:12% }
.planta__frame8-bar--bottom { bottom:0; height:12% }
.planta__frame8-text {
  font-family:var(--editorial); font-weight:300; font-style:italic;
  font-size:clamp(20px,5vw,36px);
  color:var(--branco-filme); text-align:center; z-index:1;
}
.planta__frame8-label {
  font-size:9px; letter-spacing:.15em; color:var(--branco-filme); opacity:.5;
  margin-top:16px; z-index:1;
}

/* Rulers */
.planta__ruler {
  position:absolute; z-index:15; pointer-events:none;
  background:repeating-linear-gradient(
    90deg,
    rgba(245,241,234,.12) 0px, rgba(245,241,234,.12) 1px,
    transparent 1px, transparent 10px
  );
}
.planta__ruler--top {
  top:0; left:0; right:0; height:12px;
  background:repeating-linear-gradient(
    90deg,
    rgba(245,241,234,.18) 0px, rgba(245,241,234,.18) 1px,
    transparent 1px, transparent 10px
  );
}
.planta__ruler--left {
  top:0; left:0; bottom:0; width:12px;
  background:repeating-linear-gradient(
    180deg,
    rgba(245,241,234,.18) 0px, rgba(245,241,234,.18) 1px,
    transparent 1px, transparent 10px
  );
}

/* F8 video cover */
.planta__frame8 video {
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; filter:saturate(0) brightness(.5); z-index:0;
}

/* SVG wrap wider for new 520x420 viewBox */
.planta__svg-wrap {
  width:100%; max-width:500px;
  padding:12px;
  transition: transform .6s cubic-bezier(.25,.46,.45,.94), opacity .4s;
}

/* Hide progbar on frame8 */
.cena--planta.is-f8 .planta__progbar { opacity:0; transition:opacity .4s }

/* =========================================================
   FOOTER CTA
   ========================================================= */
.cena--cta {
  background: var(--preto-cinema);
  padding: 80px 28px calc(80px + var(--safe-b));
}
.footer-cta { max-width:420px }
.footer-cta__meta {
  font-size:9px; letter-spacing:.15em; color:var(--cinza-fantasma); margin-bottom:24px;
}
.footer-cta__title {
  font-family:var(--editorial); font-weight:300;
  font-size:clamp(28px,7vw,50px); line-height:1.2;
  color:var(--branco-filme); margin-bottom:36px;
}
.footer-cta__title em { font-style:italic }
.footer-cta__btn {
  display:inline-block;
  font-size:11px; letter-spacing:.15em; color:var(--branco-filme);
  border:1px solid rgba(245,241,234,.35); border-radius:2px;
  padding:14px 24px; transition:background .2s, border-color .2s;
}
.footer-cta__btn:hover { background:rgba(245,241,234,.08); border-color:rgba(245,241,234,.7) }

/* =========================================================
   MENU OVERLAY
   ========================================================= */
.menu {
  position:fixed; inset:0; z-index:300;
  background:rgba(7,17,31,0.97); backdrop-filter:blur(16px);
  display:flex; flex-direction:column;
  padding:80px 28px 40px;
  transform:translateX(100%); transition:transform .4s cubic-bezier(.25,.46,.45,.94);
}
.menu.is-open { transform:translateX(0) }
.menu__close {
  position:absolute; top:20px; right:20px;
  font-size:18px; color:var(--branco-filme); opacity:.7; cursor:pointer;
  padding:8px;
}
.menu__inner { display:flex; flex-direction:column; height:100%; }
.menu__list { display:flex; flex-direction:column; gap:24px; margin-bottom:auto }
.menu__link {
  font-size:13px; letter-spacing:.12em; color:var(--branco-filme); opacity:.75;
  transition:opacity .2s;
}
.menu__link:hover { opacity:1 }
.menu__wa {
  font-size:11px; letter-spacing:.15em; color:var(--azul-tecnico);
  border-bottom:1px solid var(--azul-tecnico); padding-bottom:2px;
  align-self:flex-start; margin-bottom:24px;
}
.menu__foot {
  font-size:9px; letter-spacing:.1em; color:var(--cinza-fantasma);
}

/* =========================================================
   REDUCED MOTION FALLBACK
   ========================================================= */
@media (prefers-reduced-motion:reduce) {
  .hero__cursor { animation:none; opacity:1 }
  .planta__svg-wrap { transition:none !important; transform:none !important }
  .pframe { transition:none !important }
  .casting__stamp { animation:none }
}

/* =========================================================
   TABLET
   ========================================================= */
@media (min-width:768px) {
  .casting__list { padding:0 40px; gap:32px }
  .ficha { max-width:400px; margin:0 auto }
  .hero__content { padding-left:48px; padding-right:48px }
  .casting__header { padding-left:48px }
  .footer-cta { padding-left:48px }
}