:root {
  --bg: #0a0b0a;
  --bg-2: #0e100e;
  --fg: #f2efe8;
  --fg-2: #9ba095;
  --fg-3: #7a7e75; /* 4.8:1 sobre --bg — passa WCAG AA em texto pequeno */
  --accent: #f9a522;
  --accent-soft: #ffc861;
  --line: rgba(242, 239, 232, 0.09);
  --wrap: 760px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- ambient layers ---------- */

/* slow-drifting ember glow behind everything */
.ambient {
  position: fixed;
  inset: -20vh -20vw;
  z-index: -2;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.55;
}
.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.ambient::before {
  width: 60vw; height: 60vw;
  top: -10vh; left: 8vw;
  background: radial-gradient(circle, rgba(249, 165, 34, 0.30), transparent 68%);
  animation: drift-a 34s var(--ease) infinite alternate;
}
.ambient::after {
  width: 55vw; height: 55vw;
  top: 30vh; right: 2vw;
  background: radial-gradient(circle, rgba(60, 120, 90, 0.22), transparent 68%);
  animation: drift-b 44s var(--ease) infinite alternate;
}
@keyframes drift-a {
  to { transform: translate3d(6vw, 10vh, 0) scale(1.15); }
}
@keyframes drift-b {
  to { transform: translate3d(-8vw, -6vh, 0) scale(0.9); }
}

/* film grain — the thing that keeps flat dark from looking cheap */
.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  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.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* hairline scroll progress */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 101;
}

/* ---------- sticky nav (fades in past the hero) ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  padding: 14px 0;
  background: rgba(10, 11, 10, 0.62);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.topbar.visible {
  opacity: 1;
  transform: none;
  border-bottom-color: var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
}
.topbar .mark {
  font-size: 0.92rem;
  font-weight: 590;
  letter-spacing: -0.01em;
}
.topbar nav {
  display: flex;
  gap: 22px;
  font-size: 0.86rem;
  color: var(--fg-2);
}
@media (max-width: 620px) {
  .topbar nav a:not(.contact) { display: none; }
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- links ---------- */

a {
  color: inherit;
  text-decoration: none;
  position: relative;
}
.u {
  color: var(--accent);
}
.u::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.4s var(--ease);
}
.u:hover::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}
.topbar nav a { transition: color 0.3s var(--ease); }
.topbar nav a:hover { color: var(--fg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

/* pointer-tracked light — sits above ambient, below content */
.hero .spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(560px circle at var(--mx, 50%) var(--my, 40%), rgba(249, 165, 34, 0.10), transparent 62%);
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
.hero:hover .spot { opacity: 1; }

.hero-grid {
  position: relative;
  max-width: 1040px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0 0 26px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(249, 165, 34, 0.55);
  animation: pulse 2.8s ease-out infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(249, 165, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 165, 34, 0); }
}

h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 620;
  margin: 0 0 26px;
  text-wrap: balance;
}
h1 .dim { color: var(--fg-3); }

.hero-sub {
  color: var(--fg-2);
  font-size: 1.05rem;
  max-width: 54ch;
  margin: 0 0 36px;
  text-wrap: pretty;
}
.hero-sub .u { color: var(--accent); }

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 100px;
  font-size: 0.92rem;
  font-weight: 550;
  border: 1px solid var(--line);
  color: var(--fg);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn:hover {
  background: rgba(242, 239, 232, 0.06);
  border-color: rgba(242, 239, 232, 0.22);
  transform: translateY(-1px);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #140a05;
}
.btn.primary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}

/* avatar dissolves into the background instead of sitting in a box */
.avatar-frame {
  position: relative;
  width: clamp(180px, 22vw, 260px);
}
.avatar-frame img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(0.25) contrast(1.05);
  -webkit-mask-image: radial-gradient(115% 92% at 50% 42%, #000 52%, transparent 82%);
  mask-image: radial-gradient(115% 92% at 50% 42%, #000 52%, transparent 82%);
}
.avatar-frame::after {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 165, 34, 0.16), transparent 62%);
  z-index: -1;
}

@media (max-width: 780px) {
  .hero { min-height: auto; padding: 110px 0 64px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .avatar-frame { width: 150px; order: -1; }
}

/* scroll hint — hairline que escorre, no lugar da palavra "Scroll" */
.scroll-hint {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 42px;
  overflow: hidden;
  background: var(--line);
}
.scroll-hint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, var(--accent));
  animation: trickle 2.6s var(--ease) infinite;
}
@keyframes trickle {
  0%   { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}
@media (max-width: 780px) { .scroll-hint { display: none; } }

/* ---------- sections: sticky label in the gutter ---------- */

.section {
  border-top: 1px solid var(--line);
  padding: 88px 0;
}
.section.tint {
  background: linear-gradient(180deg, rgba(242, 239, 232, 0.018), transparent);
}
.section .wrap {
  max-width: 1040px;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 48px;
}
h2 {
  position: sticky;
  top: 88px;
  align-self: start;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-3);
}
@media (max-width: 860px) {
  .section { padding: 64px 0; }
  .section .wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  h2 { position: static; }
}

.body p {
  margin: 0 0 20px;
  font-size: 1.08rem;
  color: rgba(242, 239, 232, 0.88);
  text-wrap: pretty;
}
.body p:last-child { margin-bottom: 0; }
.body strong { font-weight: 600; color: var(--fg); }

.lead {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem) !important;
  line-height: 1.42;
  letter-spacing: -0.02em;
  color: var(--fg) !important;
}

/* carimbo de frescor da seção Now — um /now desatualizado é pior que nenhum */
.stamp {
  margin-top: 28px !important;
  font-size: 0.76rem !important;
  color: var(--fg-3) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 36px 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.stat {
  background: var(--bg-2);
  padding: 22px 18px;
  transition: background 0.4s var(--ease);
}
.stat:hover { background: #131614; }
.stat .num {
  display: block;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat .label {
  display: block;
  margin-top: 6px;
  color: var(--fg-2);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}
@media (max-width: 680px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.tech span {
  font-size: 0.78rem;
  color: var(--fg-2);
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 64px;
  color: var(--fg-3);
  font-size: 0.86rem;
}
footer .wrap {
  max-width: 1040px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
footer nav { display: flex; gap: 20px; }
footer nav a { transition: color 0.3s var(--ease); }
footer nav a:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
