/* AFELTEC — light on black */

:root {
  --bg: #050505;
  --bg-2: #0d0d0c;
  --fg: #f3f1ec;
  --muted: #8b877e;
  --line: rgba(243, 241, 236, 0.1);
  --accent: #d9ceb2;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1320px;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* language switch — PT is the default markup */
html[lang="pt-BR"] [data-l="en"],
html[lang="en"] [data-l="pt"] { display: none !important; }

.muted { color: var(--muted); }

/* film grain */
.grain {
  position: fixed; inset: -50%;
  z-index: 100; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -1%); }
  75% { transform: translate(-1%, -3%); }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  transition: background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5, 5, 5, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 28px; }
.brand .brand-word { width: 104px; opacity: .92; }
.nav-links { display: none; gap: 36px; font-size: 14px; color: var(--muted); }
.nav-links a { position: relative; transition: color .3s; }
.nav-links a:hover { color: var(--fg); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang {
  font: 500 12px/1 var(--mono); letter-spacing: .04em;
  background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 10px 6px;
}
.lang-sep { margin: 0 4px; opacity: .4; }
html[lang="pt-BR"] .lang-pt, html[lang="en"] .lang-en { color: var(--fg); }
.pill {
  font-size: 14px; font-weight: 500;
  padding: 9px 16px; border-radius: 99px;
  border: 1px solid var(--line);
  transition: background .3s, color .3s, border-color .3s;
}
.pill:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

@media (min-width: 860px) {
  .nav-links { display: flex; }
}
@media (max-width: 380px) {
  .brand .brand-word { display: none; }
}

/* ---------- hero ---------- */
.hero {
  --mx: 50%; --my: 40%;
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 96px var(--gutter) 56px;
  overflow: hidden;
  isolation: isolate;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(rgba(243, 241, 236, .22) 1px, transparent 1.3px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(420px circle at var(--mx) var(--my), #000 0%, transparent 70%);
          mask-image: radial-gradient(420px circle at var(--mx) var(--my), #000 0%, transparent 70%);
}
.hero-glow {
  position: absolute; z-index: -1;
  width: 70vmax; height: 70vmax; left: var(--mx); top: var(--my);
  translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(217, 206, 178, .13), transparent);
  pointer-events: none;
}

.hero-mark {
  align-self: center; justify-self: center;
  width: min(62vw, 46svh, 520px);
  perspective: 900px;
  margin-top: 4svh;
}
.mark-tilt {
  --rx: 0deg; --ry: 0deg; --lx: 30%; --ly: 30%;
  position: relative;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .6s var(--ease);
  animation: mark-in 1.6s var(--ease) both .1s;
}
.mark-tilt img { width: 100%; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .8)); }
.mark-sheen {
  position: absolute; inset: 0;
  -webkit-mask: url("../brand/mark.webp") center / 100% 100% no-repeat;
          mask: url("../brand/mark.webp") center / 100% 100% no-repeat;
  background: radial-gradient(circle at var(--lx) var(--ly), rgba(255, 250, 235, .95), rgba(217, 206, 178, .25) 22%, transparent 45%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
@keyframes mark-in {
  from { opacity: 0; clip-path: inset(100% 0 0 0); transform: translateY(40px) scale(.96); filter: blur(10px); }
  to { opacity: 1; clip-path: inset(0 0 0 0); filter: blur(0); }
}
/* touch devices: let the light sweep on its own */
@media (hover: none) {
  .mark-sheen { animation: sweep 6s ease-in-out infinite alternate; }
}
@keyframes sweep {
  from { --lx: 10%; --ly: 20%; }
  to { --lx: 90%; --ly: 80%; }
}
@property --lx { syntax: "<percentage>"; inherits: true; initial-value: 30%; }
@property --ly { syntax: "<percentage>"; inherits: true; initial-value: 30%; }

.hero-copy { max-width: 1100px; animation: rise 1.2s var(--ease) both .5s; }
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font: 400 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 22px;
}
.dash { width: 28px; height: 1px; background: var(--accent); }
h1 {
  font-weight: 500;
  font-size: clamp(2.3rem, 7.2vw, 6.2rem);
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.ticker {
  margin-top: 26px;
  font: 400 clamp(14px, 1.6vw, 18px)/1.2 var(--mono);
  color: var(--accent);
  display: flex; gap: .6em; align-items: baseline;
  min-height: 1.2em;
}
.ticker-prompt { color: var(--muted); }
.caret { animation: blink 1s steps(1) infinite; margin-left: -.4em; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }

.scroll-cue {
  position: absolute; right: var(--gutter); bottom: 56px;
  width: 1px; height: 64px; background: var(--line); overflow: hidden;
}
.scroll-cue span {
  position: absolute; inset: 0; background: var(--fg);
  animation: cue 2.2s var(--ease) infinite;
}
@media (max-width: 959px) { .scroll-cue { display: none; } }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.25fr 1fr;
    grid-template-rows: 1fr;
    align-items: end;
    padding-bottom: 12svh;
  }
  .hero-copy { grid-column: 1; grid-row: 1; }
  .hero-mark { grid-column: 2; grid-row: 1; width: min(38vw, 66svh, 600px); margin: 0; align-self: center; }
}

/* ---------- core expertise marquee ---------- */
.marquee {
  display: flex; overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 22px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex; flex: none; gap: 0;
  animation: marquee 60s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee li {
  display: flex; align-items: center;
  font-size: clamp(1.1rem, 2.2vw, 1.75rem); font-weight: 400; letter-spacing: -.02em;
  color: var(--muted); white-space: nowrap;
  transition: color .3s;
}
.marquee li::after {
  content: ""; width: 6px; height: 6px; margin: 0 clamp(20px, 3vw, 40px);
  background: var(--accent); transform: rotate(45deg); opacity: .6;
}
.marquee li:hover { color: var(--fg); }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
}

/* ---------- sections ---------- */
.section {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(88px, 14vw, 180px) var(--gutter) 0;
}
.label {
  display: flex; gap: 14px; align-items: center;
  font: 400 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 18px; margin-bottom: clamp(36px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.label > span:first-child { color: var(--accent); }
.h2 {
  font-weight: 500; font-size: clamp(1.9rem, 4.6vw, 3.8rem);
  line-height: 1.02; letter-spacing: -.04em; text-wrap: balance;
  margin-bottom: clamp(36px, 5vw, 64px);
}

/* manifesto: words light up as you scroll */
.manifesto {
  font-weight: 400;
  font-size: clamp(1.6rem, 4.2vw, 3.5rem);
  line-height: 1.12; letter-spacing: -.035em;
  max-width: 1100px;
  text-wrap: pretty;
}
.manifesto .w { opacity: .16; transition: opacity .35s; }
.manifesto .w.on { opacity: 1; }

.about-grid {
  display: grid; gap: 48px;
  margin-top: clamp(56px, 9vw, 120px);
}
.k { font: 400 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.founder-name { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -.03em; margin-bottom: 6px; }
.alumni-k { margin: 28px 0 10px; }
.alumni { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 500; letter-spacing: -.02em; color: var(--accent); }
.alumni i { font-style: normal; color: var(--muted); margin: 0 .25em; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 0; }
.stat { border-left: 1px solid var(--line); padding-left: 16px; }
.stat dt { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 300; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat dd { font-size: 14px; color: var(--muted); margin-top: 10px; line-height: 1.35; }
@media (min-width: 860px) {
  .about-grid { grid-template-columns: 1fr 1.6fr; align-items: end; }
}

/* expertise list */
.xp li {
  position: relative;
  display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; row-gap: 6px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  cursor: default;
}
.xp li::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease);
}
.xp-n { font: 400 12px/2.4 var(--mono); color: var(--muted); grid-row: span 2; }
.xp h3 {
  font-weight: 500; font-size: clamp(1.4rem, 3.4vw, 2.6rem);
  letter-spacing: -.035em; line-height: 1.08;
  transition: transform .6s var(--ease), color .4s;
}
.xp p { color: var(--muted); font-size: 15px; transition: color .4s; }
@media (hover: hover) {
  .xp li:hover::after { transform: scaleX(1); }
  .xp li:hover h3 { transform: translateX(14px); color: var(--accent); }
  .xp li:hover p { color: var(--fg); }
}
@media (min-width: 860px) {
  .xp li { grid-template-columns: 80px 1.3fr 1fr; align-items: baseline; padding: 34px 0; }
  .xp-n { grid-row: auto; }
  .xp p { text-align: right; font-size: 16px; }
}

/* clients */
.clients {
  display: grid; gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  background: var(--line); border: 1px solid var(--line);
}
.clients a {
  position: relative; display: block; overflow: hidden; background: var(--bg);
  aspect-ratio: 8 / 5;
}
.clients img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.clients .mono { opacity: .55; transform: scale(.82); }
.clients .color { opacity: 0; transform: scale(1.06); }
.clients span {
  position: absolute; left: 12px; bottom: 10px; z-index: 1;
  font: 400 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: #fff; mix-blend-mode: difference;
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s, transform .4s var(--ease);
}
.clients a:hover .mono, .clients a:focus-visible .mono { opacity: 0; transform: scale(.9); }
.clients a:hover .color, .clients a:focus-visible .color { opacity: 1; transform: scale(1); }
.clients a:hover span, .clients a:focus-visible span { opacity: 1; transform: none; }
@media (hover: none) {
  .clients .mono { opacity: .8; transform: none; }
}
@media (min-width: 1024px) { .clients { grid-template-columns: repeat(5, 1fr); } }

/* contact */
.contact { padding-bottom: clamp(88px, 12vw, 160px); }
.contact-title {
  font-weight: 500; font-size: clamp(2.3rem, 8vw, 7.5rem);
  line-height: .95; letter-spacing: -.05em; text-wrap: balance;
  margin-bottom: clamp(36px, 6vw, 72px);
}
.mail {
  display: inline-flex; align-items: center; gap: .3em;
  font-size: clamp(1.25rem, 4.4vw, 3.4rem); font-weight: 300; letter-spacing: -.035em;
  color: var(--accent);
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  padding-bottom: 6px;
  transition: background-size .7s var(--ease);
  max-width: 100%;
}
.mail-text { overflow-wrap: anywhere; }
.mail .arrow { width: .9em; height: .9em; flex: none; transition: transform .5s var(--ease); }
.mail:hover { background-size: 100% 1px; }
.mail:hover .arrow { transform: translate(4px, -4px); }
.contact-row { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: 99px;
  border: 1px solid var(--line); font-size: 15px; font-weight: 500;
  transition: background .3s, color .3s, border-color .3s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn:hover .muted { color: #5c5a55; }

/* footer */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px;
  padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font: 400 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.footer img { width: 22px; }
.footer a { transition: color .3s; }
.footer a:hover { color: var(--fg); }
.to-top { margin-left: auto; }

/* scroll reveal */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

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