/* =========================================================================
   MATEUS LANGE — teux.studio
   Cores e fontes nos tokens abaixo. Tema claro: data-scheme="light" no <html>.
   ========================================================================= */

:root {
  --bg: #0b0b0b;
  --text: #f2f2f0;
  --muted: #6e6e6b;
  --soft: #a3a3a0;
  --line: rgba(242, 242, 240, 0.12);
  --surface: #161616;
  --red: #e1121b;
  --on-red: #ffffff;

  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 2.6vw, 40px);
  --max: 1600px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.2, 1);

  color-scheme: dark;
}
:root[data-scheme="light"] {
  --bg: #ffffff;
  --text: #0b0b0b;
  --muted: #9b9b98;
  --soft: #5c5c59;
  --line: rgba(11, 11, 11, 0.12);
  --surface: #f0f0ee;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--red); color: var(--on-red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.accent { color: var(--red); }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 1000; background: var(--red); color: var(--on-red); padding: 10px 14px; }
.skip:focus { left: 16px; }

.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: none; animation: blink 2.4s ease-in-out infinite; }
.footer .dot { margin-right: 8px; vertical-align: 1px; }
@keyframes blink { 50% { opacity: 0.3; } }

.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 0.3s;
}
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.nav__in { display: flex; justify-content: space-between; align-items: center; height: var(--nav-h); }
.nav__brand { font-weight: 700; font-size: 19px; letter-spacing: -0.03em; }
.nav__links { display: flex; gap: clamp(20px, 3vw, 44px); font-weight: 500; font-size: 14px; }
.nav__links a { transition: color 0.2s; }
.nav__links a:hover { color: var(--red); }

/* ---------- HERO ---------- */
.hero { padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 8px); }
.hero__name {
  font-weight: 700; font-size: 17vw;
  line-height: 0.86; letter-spacing: -0.065em;
  white-space: nowrap;
  margin-left: -0.04em;
}
.hero__name span { display: inline-block; padding-right: 0.04em; }
.js .hero__name span { opacity: 0; transform: translateY(6%); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .hero__name.is-in span { opacity: 1; transform: none; }

.hero__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gutter);
  margin-top: clamp(40px, 5vw, 72px);
}
.hero__intro { grid-column: 1 / 5; align-self: center; display: grid; gap: 22px; max-width: 34ch; }
.hero__intro p:first-child { font-size: 15px; line-height: 1.55; }
.hero__list { grid-column: 7 / 9; display: grid; align-content: start; gap: 14px; }
.hero__list button {
  font-size: clamp(16px, 1.25vw, 19px); font-weight: 500; letter-spacing: -0.01em;
  color: var(--muted); transition: color 0.2s;
  display: flex; align-items: center; gap: 10px;
}
.hero__list button::before { content: ""; width: 0; height: 7px; border-radius: 50%; background: var(--red); transition: width 0.3s var(--ease); }
.hero__list button:hover { color: var(--soft); }
.hero__list button[aria-selected="true"] { color: var(--text); }
.hero__list button[aria-selected="true"]::before { width: 7px; }
.hero__reel { grid-column: 9 / 13; }
.hero__media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.hero__media .media { transition: opacity 0.35s var(--ease); }
.hero__media.is-swapping .media { opacity: 0; }
.hero__caption { display: grid; gap: 4px; margin-top: 14px; }
.hero__tag { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.hero__desc { color: var(--soft); max-width: 46ch; }

/* ---------- SECTIONS ---------- */
.section { padding-top: clamp(100px, 12vw, 180px); scroll-margin-top: var(--nav-h); }
.title { font-weight: 700; font-size: clamp(44px, 7.4vw, 120px); line-height: 0.92; letter-spacing: -0.055em; margin-bottom: clamp(32px, 4vw, 56px); }
.title--xl { font-size: clamp(56px, 12vw, 200px); line-height: 0.86; letter-spacing: -0.065em; }

/* ---------- MEDIA ---------- */
.media { position: absolute; inset: 0; }
.media > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.media video, .media img { object-fit: cover; }
.ph { display: grid; place-content: center; justify-items: center; gap: 4px; padding: 16px; background: var(--surface); color: var(--muted); text-align: center; font-size: 13px; }
.ph b { color: var(--red); font-weight: 600; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- SELECTED WORKS ---------- */
.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 5vw, 72px) var(--gutter); }
.work.is-wide { grid-column: 1 / -1; }
.work__media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 11; overflow: hidden; background: var(--surface); }
.work.is-wide .work__media { aspect-ratio: 21 / 9; }
.work__media .media { transition: transform 1s var(--ease); }
.work__media:hover .media, .work__media:focus-visible .media, .work.is-active .media { transform: scale(1.03); }
.work__title { margin-top: 14px; font-weight: 600; font-size: 17px; letter-spacing: -0.015em; }
.work__title span { color: var(--soft); font-weight: 500; }
.work__tags { display: flex; flex-wrap: wrap; margin-top: 6px; color: var(--soft); font-size: 13px; }
.work__tags li + li::before { content: "·"; margin: 0 9px; color: var(--muted); }

/* ---------- ABOUT ---------- */
.about { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px var(--gutter); }
.about__text { grid-column: 1 / 10; font-weight: 600; font-size: clamp(26px, 3.4vw, 52px); line-height: 1.08; letter-spacing: -0.04em; text-wrap: balance; }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px var(--gutter); margin-top: clamp(24px, 4vw, 56px); }
.stats li { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.stats strong { font-weight: 700; font-size: clamp(40px, 5.4vw, 88px); line-height: 0.95; letter-spacing: -0.055em; }
.stats li:not(:last-child) strong { font-variant-numeric: tabular-nums; }
.stats span { color: var(--soft); }

/* ---------- WORLDWIDE ---------- */
.world { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gutter); align-items: start; }
.world__text { grid-column: 1 / 5; color: var(--soft); max-width: 36ch; }
.clocks { grid-column: 7 / 13; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 var(--gutter); }
.clocks li { display: grid; gap: 2px; padding-block: 14px; border-top: 1px solid var(--line); }
.clocks strong { font-weight: 600; }
.clocks span { color: var(--soft); font-variant-numeric: tabular-nums; }
.clocks .is-base strong, .clocks .is-you strong { color: var(--red); }

/* ---------- CONTACT ---------- */
.contact { padding-bottom: clamp(100px, 12vw, 160px); }
.contact__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gutter); }
.contact__grid > .status { grid-column: 1 / 5; align-self: start; }
.contact__grid > div { grid-column: 7 / 13; }
.contact__email { display: inline-block; font-weight: 600; font-size: clamp(22px, 2.6vw, 40px); letter-spacing: -0.035em; overflow-wrap: anywhere; border-bottom: 2px solid var(--text); padding-bottom: 4px; transition: color 0.2s, border-color 0.2s; }
.contact__email:hover { color: var(--red); border-color: var(--red); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; padding: 13px 22px; border-radius: 999px; background: var(--red); color: var(--on-red); font-weight: 600; border: 1px solid var(--red); transition: opacity 0.2s, background-color 0.2s, color 0.2s; }
.btn:hover { opacity: 0.85; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); opacity: 1; }
.contact__links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 32px; font-weight: 500; }
.contact__links span { color: var(--soft); margin-right: 8px; font-weight: 400; }
.contact__links a:hover { color: var(--red); }

/* ---------- FOOTER ---------- */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--soft); font-size: 13px; }
.footer__brand { color: var(--text); font-weight: 700; letter-spacing: -0.02em; }
.footer__legal span + span:not(:empty)::before { content: " · CNPJ "; }

/* ---------- CURSOR (círculo que segue o mouse sobre vídeos) ---------- */
.follow {
  position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none;
  width: 76px; height: 76px; margin: -38px 0 0 -38px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--red); color: var(--on-red);
  font-weight: 600; font-size: 13px;
  transform: translate3d(-200px, -200px, 0);
  transition: scale 0.3s var(--ease);
  scale: 0;
  will-change: transform;
}
.follow.is-on { scale: 1; }
.follow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- MODAL ---------- */
.modal {
  position: fixed; inset: 0; z-index: 150;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 24px);
  background: var(--bg);
  animation: fade 0.25s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } }
.modal__bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; height: 48px; margin-bottom: 16px; }
.modal__bar h3 { font-weight: 600; font-size: 17px; letter-spacing: -0.015em; }
.modal__actions { display: flex; gap: 24px; font-weight: 500; }
.modal__actions > *:hover { color: var(--red); }
.modal__media { position: relative; min-height: 0; display: grid; place-items: center; }
.modal__media video { max-width: 100%; max-height: 100%; background: #000; }
.modal__ph { position: relative; width: min(100%, 1100px); aspect-ratio: 16 / 9; max-height: 100%; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .hero__intro { grid-column: 1 / 7; }
  .hero__list { grid-column: 7 / 13; }
  .hero__reel { grid-column: 1 / -1; }
  .world__text, .clocks { grid-column: 1 / -1; }
  .contact__grid > .status, .contact__grid > div { grid-column: 1 / -1; }
  .about__text { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .nav__links { gap: 16px; font-size: 13px; }
  .nav__links a { padding-block: 12px; }
  .nav__links a[href="#worldwide"] { display: none; }
  .hero__list button { padding-block: 10px; }
  .hero__grid { row-gap: 20px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__intro, .hero__list, .hero__reel { grid-column: 1 / -1; }
  .hero__list { grid-auto-flow: column; justify-content: start; gap: 20px; }
  .hero__list button::before { display: none; }
  .hero__media { aspect-ratio: 4 / 5; }
  .works { grid-template-columns: minmax(0, 1fr); }
  .work.is-wide .work__media { aspect-ratio: 16 / 11; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .footer { flex-direction: column; }
}
@media (max-width: 360px) {
  .nav__brand { font-size: 16px; }
  .nav__links { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
