/* ================================================================
   MARA PRODUTORA — sistema visual
   Inspiração: workingstifffilms.com — cinematográfico, anos 2000 descolado
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Bitter:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Homemade+Apple&display=swap');

@font-face {
  font-family: 'Tusker Grotesk';
  src: url('../fonts/TuskerGrotesk-4800Super.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* paleta — brief */
  --color-sand:   #f2eadb;
  --color-dark:   #2e2d2d;
  --color-red:    #991004;
  --color-blue:   #627890;
  --color-cobalt: #374454;
  --color-wine:   #610a1a;
  --color-cream:  #e2dab4;

  /* tipografia */
  --font-display: 'Tusker Grotesk', 'Anton', 'Impact', sans-serif;
  --font-body:    'Bitter', Georgia, serif;
  --font-hand:    'Homemade Apple', cursive;

  /* fluid scale */
  --f-12:  clamp(10px, 0.8333vw, 12px);
  --f-14:  clamp(11px, 0.97vw,   14px);
  --f-18:  clamp(13px, 1.25vw,   18px);
  --f-20:  clamp(14px, 1.3888vw, 20px);
  --f-28:  clamp(18px, 1.94vw,   28px);
  --f-40:  clamp(22px, 2.77vw,   40px);
  --f-54:  clamp(28px, 3.75vw,   54px);
  --f-80:  clamp(36px, 5.55vw,   80px);
  --f-120: clamp(48px, 8.33vw,  120px);
  --f-180: clamp(64px, 12.5vw,  180px);
  --f-240: clamp(72px, 16.66vw, 240px);
  --f-280: clamp(80px, 19.44vw, 280px);
  --f-300: clamp(80px, 20.83vw, 300px);

  /* grid */
  --col: 4.1666vw;
  --pad: 2.4vw;

  /* grão */
  --grain-opacity: 0.18;

  --ease-cine: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--color-sand);
  color: var(--color-dark);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
ul { list-style: none; }
img, video { display: block; max-width: 100%; }

::selection { background: var(--color-red); color: var(--color-sand); }

/* ---------- type utilities ---------- */
.f-12  { font-size: var(--f-12);  }
.f-14  { font-size: var(--f-14);  }
.f-18  { font-size: var(--f-18);  }
.f-20  { font-size: var(--f-20);  }
.f-28  { font-size: var(--f-28);  }
.f-40  { font-size: var(--f-40);  }
.f-54  { font-size: var(--f-54);  }
.f-80  { font-size: var(--f-80);  }
.f-120 { font-size: var(--f-120); }
.f-180 { font-size: var(--f-180); }
.f-240 { font-size: var(--f-240); }
.f-280 { font-size: var(--f-280); }
.f-300 { font-size: var(--f-300); }

.display, h1, h2, .work-title, .hero, .text-scale {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.caption {
  font-family: var(--font-body);
  font-size: var(--f-12);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}

.hand { font-family: var(--font-hand); text-transform: none; line-height: 1.1; }
.Red  { color: var(--color-red); }
.italic { font-style: italic; }

/* ---------- grid ---------- */
.ws-grid { display: flex; flex-wrap: wrap; }
.grid-between { justify-content: space-between; }
.ws-xl-24 { width: 100%; }
.ws-xl-17 { width: 69.6595vw; }
.ws-xl-12 { width: 49.0259vw; }
.ws-xl-11 { width: 44.9654vw; }
.ws-xl-8  { width: 32.4675vw; }
.ws-xl-6  { width: 24.5vw; }
.ws-xl-os-1 { margin-left: 4.1666vw; }
.ws-xl-os-2 { margin-left: 8.33vw; }

/* ---------- grain overlay ---------- */
#noise {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.85 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

/* sand vignette pra dar peso cinematográfico */
.vignette::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(46,45,45,0.18) 100%);
}

/* ---------- nav ---------- */
#menu {
  position: fixed; top: 0; left: 0; right: 0;
  height: 80px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  z-index: 200;
  mix-blend-mode: difference;
  color: var(--color-sand);
}
#menu a { color: var(--color-sand); }
#logo {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 10px;
  text-transform: uppercase;
}
#logo .dot {
  width: 8px; height: 8px; background: var(--color-red); border-radius: 50%;
  display: inline-block;
}
#nav {
  display: flex; gap: clamp(20px, 2.6vw, 38px);
  font-family: var(--font-body);
  font-size: var(--f-14);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}
#nav a { position: relative; padding: 6px 0; }
#nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease-cine);
}
#nav a:hover::after, #nav a.selected::after {
  transform: scaleX(1); transform-origin: left;
}
#nav a.selected { color: var(--color-red); }

/* ---------- buttons ---------- */
.button {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 28px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--f-14);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative; overflow: hidden;
  transition: color 0.55s var(--ease-cine);
  cursor: pointer;
  isolation: isolate;
}
.button::before {
  content: ""; position: absolute; inset: 0;
  background: var(--color-red);
  transform: translateY(101%);
  transition: transform 0.55s var(--ease-cine);
  z-index: -1;
}
.button:hover { color: var(--color-sand); border-color: var(--color-red); }
.button:hover::before { transform: translateY(0); }
.button .arrow { font-size: 1.2em; transition: transform 0.4s var(--ease-cine); }
.button:hover .arrow { transform: translateX(4px); }

.button-filled { background: var(--color-dark); color: var(--color-sand); border-color: var(--color-dark); }
.button-filled::before { background: var(--color-red); }
.button-filled:hover { border-color: var(--color-red); }

/* ---------- footer ---------- */
footer {
  background: var(--color-dark);
  color: var(--color-sand);
  padding: clamp(40px, 5vw, 80px) var(--pad) 30px;
  position: relative;
}
footer .footer-headline {
  font-family: var(--font-display);
  font-size: var(--f-180);
  line-height: 0.86;
  text-transform: uppercase;
  margin-bottom: 0.4em;
}
footer .footer-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 4vw;
  padding-top: 18px;
  border-top: 1px solid rgba(242,234,219,0.18);
  position: relative;
}
footer .footer-meta::before {
  /* faixa de perfuração de filme acima do meta */
  content: "";
  position: absolute;
  top: -10px; left: 0; right: 0;
  height: 4px;
  background-image: radial-gradient(circle, rgba(242,234,219,0.35) 0 1.5px, transparent 2px);
  background-size: 14px 4px;
  background-repeat: repeat-x;
}
footer .fm-social {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
footer .fm-social a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--color-sand);
  opacity: 0.78;
  transition: opacity .2s, color .2s, transform .2s;
}
footer .fm-social a:hover {
  opacity: 1;
  color: var(--color-red);
  transform: translateY(-1px);
}
footer .fm-social svg { flex-shrink: 0; }
footer .fm-rec {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid rgba(242,234,219,0.22);
  background: rgba(242,234,219,0.04);
  white-space: nowrap;
  justify-self: center;
}
footer .fm-rec-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-red);
  box-shadow: 0 0 10px var(--color-red);
  animation: fmRecPulse 1.4s ease-in-out infinite;
}
@keyframes fmRecPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}
footer .fm-tc { color: var(--color-red); opacity: 0.85; }
footer .fm-info {
  display: flex; gap: 12px; align-items: center; justify-content: flex-end;
  flex-wrap: wrap;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}
footer .fm-sep { color: var(--color-red); opacity: 0.7; }

@media (max-width: 800px) {
  footer .footer-meta {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  footer .fm-rec { justify-self: flex-start; }
  footer .fm-info { justify-content: flex-start; }
}

/* legacy fallback (caso alguém ainda renderize meta antiga) */
footer .footer-meta-legacy {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-top: 1px solid rgba(242,234,219,0.18);
  padding-top: 24px;
  font-size: var(--f-12);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
footer a:hover { color: var(--color-red); }

/* ---------- spinning badge ---------- */
.spin-badge {
  width: clamp(80px, 10vw, 140px);
  height: clamp(80px, 10vw, 140px);
  position: relative;
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin-badge .core {
  position: absolute; inset: 30%;
  background: var(--color-red); border-radius: 50%;
}

/* ---------- video card (placeholder genérico) ---------- */
.video-still {
  position: relative;
  width: 100%; aspect-ratio: 16/10;
  background:
    linear-gradient(135deg, #3a3938 0%, #2a2928 50%, #1f1e1d 100%);
  overflow: hidden;
  isolation: isolate;
}
.video-still::before {
  /* film grain pattern */
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.08), transparent 60%);
  mix-blend-mode: overlay;
}
.video-still .play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(242,234,219,0.6);
  display: grid; place-items: center;
  color: var(--color-sand);
  transition: transform 0.5s var(--ease-cine), background 0.5s var(--ease-cine);
}
.video-still:hover .play {
  background: var(--color-red);
  border-color: var(--color-red);
  transform: translate(-50%,-50%) scale(1.08);
}
.video-still .play svg { width: 18px; height: 18px; margin-left: 3px; }
.video-still .timecode {
  position: absolute; bottom: 14px; right: 14px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(242,234,219,0.7);
  background: rgba(0,0,0,0.4);
  padding: 4px 8px;
}
.video-still .frame-marks {
  position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
  background-image:
    repeating-linear-gradient(90deg, rgba(242,234,219,0.18) 0 1px, transparent 1px 18px);
  border-top: 1px solid rgba(242,234,219,0.12);
}
.video-still .corner {
  position: absolute; width: 24px; height: 24px;
  border: 1px solid rgba(242,234,219,0.45);
}
.video-still .corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.video-still .corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }

/* ---------- work card ---------- */
.work-box {
  background: var(--color-sand);
  padding: 16px;
  position: relative;
  cursor: pointer;
  transition: background 0.55s var(--ease-cine);
}
.work-box .work-subtitle {
  font-family: var(--font-body);
  font-size: var(--f-12);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 14px 0 6px;
  transition: color 0.55s var(--ease-cine);
}
.work-box .work-title {
  font-family: var(--font-display);
  font-size: var(--f-54);
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--color-red);
  transition: color 0.55s var(--ease-cine);
}
.work-box .progress-bar {
  height: 2px; background: rgba(46,45,45,0.18);
  margin-top: 16px;
  position: relative;
  transform: translateY(20px); opacity: 0;
  transition: transform 0.55s var(--ease-cine), opacity 0.55s var(--ease-cine);
}
.work-box .progress-bar .progress-inner {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--color-sand);
  width: 0;
  transition: width 0.2s linear;
}
.work-box:hover {
  background: var(--color-red);
}
.work-box:hover .work-subtitle { color: var(--color-sand); }
.work-box:hover .work-title    { color: var(--color-sand); }
.work-box:hover .progress-bar  { transform: translateY(0); opacity: 1; }
.work-box:hover .progress-bar .progress-inner { width: 60%; }

/* ---------- marquee ---------- */
.marquee {
  display: flex; gap: 0.4em;
  white-space: nowrap;
  width: 100%; overflow: hidden;
}
.marquee .track {
  display: flex; gap: 0.4em;
  animation: scrollX 32s linear infinite;
  flex-shrink: 0;
}
@keyframes scrollX {
  to { transform: translateX(-50%); }
}
.marquee.pause:hover .track { animation-play-state: paused; }

/* ---------- intro overlay ---------- */
.intro-overlay {
  position: fixed; inset: 0;
  background: var(--color-dark);
  z-index: 1000;
  display: grid; place-items: center;
  transition: transform 1.5s var(--ease-cine);
}
.intro-overlay.gone { transform: translateX(-101%); }
.intro-logo {
  font-family: var(--font-display);
  color: var(--color-sand);
  font-size: clamp(80px, 14vw, 200px);
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 0.05em;
  transform: scale(0.6);
  opacity: 0;
  animation: introLogo 2.4s var(--ease-cine) forwards;
}
.intro-logo .dot {
  width: 0.18em; height: 0.18em;
  background: var(--color-red); border-radius: 50%;
  align-self: center;
  transform: scale(0);
  animation: introDot 0.6s var(--ease-back) 0.8s forwards;
}
@keyframes introLogo {
  0%   { opacity: 0; transform: scale(0.45); }
  40%  { opacity: 1; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(0.85) translateY(-30vh); }
}
@keyframes introDot {
  to { transform: scale(1); }
}

/* ---------- chars reveal ---------- */
.split-line { display: block; overflow: hidden; }
.split-line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: charUp 1.1s var(--ease-cine) forwards;
}
@keyframes charUp { to { transform: translateY(0); } }

/* stagger for first 12 chars */
.split-line > span:nth-child(1)  { animation-delay: 0.05s; }
.split-line > span:nth-child(2)  { animation-delay: 0.10s; }
.split-line > span:nth-child(3)  { animation-delay: 0.15s; }
.split-line > span:nth-child(4)  { animation-delay: 0.20s; }
.split-line > span:nth-child(5)  { animation-delay: 0.25s; }
.split-line > span:nth-child(6)  { animation-delay: 0.30s; }
.split-line > span:nth-child(7)  { animation-delay: 0.35s; }
.split-line > span:nth-child(8)  { animation-delay: 0.40s; }
.split-line > span:nth-child(9)  { animation-delay: 0.45s; }
.split-line > span:nth-child(10) { animation-delay: 0.50s; }
.split-line > span:nth-child(11) { animation-delay: 0.55s; }
.split-line > span:nth-child(12) { animation-delay: 0.60s; }

/* fade-in-up scroll trigger */
.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease-cine), transform 1s var(--ease-cine); }
.fade-up.in { opacity: 1; transform: translateY(0); }

/* page transition */
.page-enter {
  animation: pageEnter 0.6s var(--ease-cine) backwards;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* horizontal rule (table-list style) */
.table-list { width: 100%; }
.table-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid rgba(46,45,45,0.18);
  font-size: var(--f-18);
}
.table-list li .caption { color: var(--color-red); }

/* tag/chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- tweaks panel polish ---------- */
[data-tweaks-panel] { font-family: var(--font-body); }
