/* assets/css/site.css : LV OLIVEIRA TEC, direção "Grafite + Sinal" */
:root {
  --bg: #0b0d12;
  --bg-2: #121520;
  --bg-3: #181c29;
  --fg: #f2f4f7;
  --fg-muted: #9aa3b2;
  --signal: #b6ff3b;
  --signal-ink: #0b0d12;
  --line: rgba(242, 244, 247, .10);
  --line-strong: rgba(242, 244, 247, .22);
  --font-display: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --container: 1120px;
  --gutter: 16px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 500;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 7.2vw, 5.2rem); letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 4vw, 2.8rem); max-width: 22ch; text-wrap: balance; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--signal); color: var(--signal-ink); padding: 8px 12px; z-index: 100; font-weight: 700; }
.skip-link:focus { top: 16px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 14px;
  text-wrap: balance;
}
.eyebrow::before { content: '// ' / ''; color: var(--fg-muted); }
.lead { font-size: 1.15rem; color: var(--fg-muted); max-width: 56ch; }
.mark { color: var(--signal); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: .98rem;
  text-decoration: none;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: .08s; }
.btn-primary { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
.btn-primary:hover { background: #c8ff6a; }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); background: rgba(242, 244, 247, .04); }
.btn-sm { padding: 9px 14px; font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

/* Aviso de idioma */
.lang-hint {
  display: none; justify-content: center; align-items: center; gap: 16px;
  background: var(--bg-3); border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter); font-size: .9rem;
}
.show-lang-hint .lang-hint { display: flex; }
.lang-hint p { margin: 0; }
.lang-hint a { color: var(--fg); text-decoration-color: var(--signal); text-underline-offset: 3px; }
.lang-hint-close { background: none; border: 0; color: var(--fg-muted); font-size: 1.3rem; cursor: pointer; line-height: 1; width: 44px; height: 44px; margin: -10px -12px -10px 0; border-radius: var(--radius); }
.lang-hint-close:hover { color: var(--fg); }

/* Cabeçalho */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 18, .82);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; padding-block: 8px; }
.brand-logo { height: 28px; width: auto; color: var(--fg); display: block; }
.nav-links { display: none; align-items: center; gap: 26px; font-size: .95rem; font-weight: 600; }
.nav-links a { text-decoration: none; color: var(--fg-muted); transition: color .2s var(--ease); }
@media (min-width: 900px) {
  .nav-links a:not(.btn):not(.lang-switch) { padding-block: 10px; }
  .nav-links .lang-switch { position: relative; }
  .nav-links .lang-switch::after { content: ''; position: absolute; inset: -7px -5px; }
}
.nav-links a:hover { color: var(--fg); }
.nav-links .lang-switch:hover { border-color: var(--fg); }
.nav-links .lang-switch { font-family: var(--font-mono); font-size: .85rem; border: 1px solid var(--line-strong); padding: 4px 8px; border-radius: var(--radius); color: var(--fg); }
.nav-links .btn { color: var(--signal-ink); }
.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; width: 44px; height: 44px; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0; cursor: pointer; }
.nav-toggle-bar { width: 20px; height: 2px; background: var(--fg); transition: transform .25s var(--ease); }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}
@media (max-width: 899px) {
  body.nav-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  body.nav-open .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  body.nav-open .nav-links .lang-switch { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0; }
  body.nav-open .nav-links .btn { margin-top: 12px; justify-content: center; padding: 12px 14px; border-bottom: 1px solid var(--signal); }
  body.nav-open .nav-toggle-bar:first-child { transform: translateY(4px) rotate(45deg); }
  body.nav-open .nav-toggle-bar + .nav-toggle-bar { transform: translateY(-4px) rotate(-45deg); }
}

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  /* a rede fica quieta atrás do texto e viva nas bordas */
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 46%, rgba(0, 0, 0, .4), #000 100%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 46%, rgba(0, 0, 0, .4), #000 100%);
}
@media (min-width: 900px) {
  #hero-canvas {
    -webkit-mask-image: radial-gradient(ellipse 48% 62% at 30% 50%, rgba(0, 0, 0, .22), #000 100%);
    mask-image: radial-gradient(ellipse 48% 62% at 30% 50%, rgba(0, 0, 0, .22), #000 100%);
  }
}
.hero-inner { position: relative; padding: clamp(72px, 12vw, 150px) 0 clamp(56px, 8vw, 110px); }
.hero h1 { max-width: 14ch; }
.hero .lead { margin-top: 22px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 44px; font-family: var(--font-mono); font-size: .82rem; color: var(--fg-muted); }
.hero-facts strong { color: var(--fg); font-weight: 700; margin-right: 6px; }
@media (max-width: 719px) { .hero-facts strong { display: inline-block; min-width: 3ch; margin-right: 8px; } }

/* Seções */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background-color: var(--bg-2); background-image: linear-gradient(rgba(242,244,247,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(242,244,247,.04) 1px, transparent 1px); background-size: 48px 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { margin-bottom: 40px; }

.grid-3 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative;
  padding: 28px 24px 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
@media (hover: hover) {
  .card:hover { border-color: rgba(182, 255, 59, .6); transform: translateY(-3px); box-shadow: 0 18px 36px -20px rgba(0, 0, 0, .7); }
  .steps li:hover .step-num { border-color: var(--signal); background: rgba(182, 255, 59, .06); }
  .project:hover { border-color: var(--line-strong); }
}
.card-index { font-family: var(--font-mono); color: var(--signal); font-size: .85rem; margin-bottom: 18px; }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--fg-muted); }
.card ul { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; font-size: .95rem; }
.card li { padding: 5px 0 5px 18px; position: relative; }
.card li::before { content: ''; position: absolute; left: 0; top: 14px; width: 8px; height: 2px; background: var(--signal); }

.steps { display: grid; gap: 0; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start; }
.step-num { font-family: var(--font-mono); font-size: 1.4rem; color: var(--signal); border: 1px solid var(--line-strong); width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--radius); transition: border-color .25s var(--ease), background .25s var(--ease); }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--fg-muted); margin: 0; max-width: 60ch; }
@media (min-width: 900px) { .steps { grid-template-columns: 1fr 1fr; column-gap: 48px; } }

.projects { display: grid; gap: 20px; }
@media (min-width: 900px) { .projects { grid-template-columns: 1fr 1fr; } }
.project { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); overflow: hidden; display: flex; flex-direction: column; transition: border-color .25s var(--ease); }
.project-media { position: relative; margin: 0; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.project-media::after { content: ''; position: absolute; inset: auto 0 0 0; height: 28%; background: linear-gradient(to bottom, transparent, var(--bg-2)); pointer-events: none; }
.project-media img { width: 100%; height: auto; }
.project-body { padding: 24px; }
.project-status { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--signal); margin-bottom: 12px; }
.project-status::before { content: '●  ' / ''; }
.project-tagline { font-weight: 600; margin: 8px 0 14px; }
.project-body p:not(.project-tagline):not(.project-status):not(.project-stack) { color: var(--fg-muted); font-size: .97rem; }
.project-body strong { color: var(--fg); }
.project-body .project-stack { font-family: var(--font-mono); font-size: .8rem; color: var(--fg-muted); margin-top: 16px; margin-bottom: 0; border-top: 1px solid var(--line); padding-top: 14px; }
.project-text { justify-content: center; }
.project h3 { font-size: 1.5rem; }
/* Card só de texto que sobra sozinho na última linha: ocupa a largura toda, em duas colunas */
@media (min-width: 900px) {
  /* Card só de texto sozinho: o grid abaixo depende de .project-body ter exatamente seis filhos nesta ordem: status, h3, tagline, problema, solução, stack. */
  .project-text:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .project-text:last-child:nth-child(odd) .project-body {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); column-gap: 56px; align-items: start; padding: 32px;
  }
  .project-text:last-child:nth-child(odd) .project-body > :nth-child(-n+3) { grid-column: 1; }
  .project-text:last-child:nth-child(odd) .project-status { grid-row: 1; }
  .project-text:last-child:nth-child(odd) h3 { grid-row: 2; }
  .project-text:last-child:nth-child(odd) .project-tagline { grid-row: 3 / span 2; }
  .project-text:last-child:nth-child(odd) .project-body > :nth-child(4) { grid-column: 2; grid-row: 1 / span 2; }
  .project-text:last-child:nth-child(odd) .project-body > :nth-child(5) { grid-column: 2; grid-row: 3; }
  .project-text:last-child:nth-child(odd) .project-stack { grid-column: 2; grid-row: 4; }
}

.stack-strip { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 20px 0; background: var(--bg); }
.stack-strip::before, .stack-strip::after { content: ''; position: absolute; top: 0; bottom: 0; width: clamp(32px, 8vw, 120px); z-index: 1; pointer-events: none; }
.stack-strip::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.stack-strip::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.stack-track { display: flex; gap: 40px; white-space: nowrap; font-family: var(--font-mono); font-size: .9rem; color: var(--fg-muted); width: max-content; padding-left: 40px; }
.js .stack-track { animation: marquee 48s linear infinite; }
.stack-strip:hover .stack-track, .stack-strip:focus-within .stack-track { animation-play-state: paused; }
.stack-track span::after { content: '·'; margin-left: 40px; color: var(--signal); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.about { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .about { grid-template-columns: 1fr 1.6fr; gap: 64px; }
  .about > :first-child { position: sticky; top: 104px; align-self: start; }
}
.about-text p { color: var(--fg-muted); max-width: 64ch; }
.about-links { display: flex; gap: 20px; font-family: var(--font-mono); font-size: .9rem; }
.about-links a { color: var(--fg); text-decoration-color: var(--signal); text-underline-offset: 3px; padding-block: 11px; margin-block: -11px; }
.about-links a:hover, .lang-hint a:hover { text-decoration-thickness: 2px; }

.contact { background:
  radial-gradient(60% 80% at 80% 50%, rgba(182, 255, 59, .08), transparent 70%),
  var(--bg); }
.contact h2 { max-width: 18ch; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-family: var(--font-mono); font-size: .8rem; color: var(--fg-muted); }
.site-footer-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer-links { display: flex; gap: 20px; }
.site-footer-links a { padding-block: 12px; margin-block: -12px; text-underline-offset: 3px; }
.site-footer-links a:hover { color: var(--fg); }

.page-404 main { padding: 120px 0; min-height: 70vh; }

/* Reveal no scroll (só com JS; sem JS tudo fica visível) */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .stack-track, .js .stack-track { animation: none; flex-wrap: wrap; white-space: normal; width: auto; padding-inline: var(--gutter); }
  .stack-strip::before, .stack-strip::after { display: none; }
}
