/* Variáveis de cor e forma: design system da Lume (tema Flux) */
:root {
  --bg: #0A0A0A;
  --bg-2: #131313;
  --surface: #171717;
  --surface-2: #1F1F1F;
  --surface-3: #2A2A2A;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #FFFFFF;
  --text-mute: rgba(255, 255, 255, 0.65);
  --text-soft: rgba(255, 255, 255, 0.4);
  --lime: #D4F050;
  --lime-deep: #B8D830;
  --lime-soft: rgba(212, 240, 80, 0.12);
  --lime-glow: rgba(212, 240, 80, 0.35);
  --violet: #6F4FE8;
  --violet-soft: rgba(111, 79, 232, 0.15);
  --shadow-glow: 0 0 40px rgba(212, 240, 80, 0.18);
  --radius: 1rem;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 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(--text);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
.mono { font-family: var(--mono); }
.mini { font-size: 11px; letter-spacing: .04em; color: var(--text-soft); margin: 0; }
.mute { color: var(--text-soft); }

/* Atmosfera */
.bg-glow {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 85% 5%, rgba(212, 240, 80, 0.07), transparent 70%),
    radial-gradient(50vw 50vh at 0% 60%, rgba(111, 79, 232, 0.06), transparent 70%);
}
.grain {
  position: fixed; inset: 0; z-index: -1; 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");
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px clamp(16px, 4vw, 48px);
  background: rgba(10, 10, 10, .72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { font-family: var(--mono); font-size: 14px; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime-glow); }
.nav nav { display: flex; gap: clamp(12px, 3vw, 28px); }
.nav nav a { font-size: 14px; text-decoration: none; color: var(--text-mute); transition: color .2s; }
.nav nav a:hover { color: var(--lime); }

main, .foot { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* Hero */
.hero {
  min-height: calc(100svh - 60px);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 64px);
  align-items: center; padding: 48px 0 72px;
}
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--lime); display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); display: inline-block; animation: pulse 1.8s ease-in-out infinite; flex: none; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 var(--lime-glow); } 50% { box-shadow: 0 0 0 7px rgba(212,240,80,0); } }
h1 {
  font-size: clamp(64px, 11vw, 148px); line-height: .86; letter-spacing: -.05em;
  font-weight: 800; margin: 0 0 24px;
}
h1::after { content: "."; color: var(--lime); }
.lede { font-size: clamp(18px, 2vw, 22px); color: var(--text-mute); max-width: 34ch; margin: 0 0 24px; }
.lede em { font-style: normal; color: var(--text); font-weight: 600; background: linear-gradient(transparent 62%, rgba(212,240,80,.28) 0); }
.stack { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 32px; }
.stack li { font-family: var(--mono); font-size: 12.5px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 15px; transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn-primary { background: var(--lime); color: #0A0A0A; box-shadow: var(--shadow-glow); }
.btn-primary:hover { background: var(--lime-deep); transform: translateY(-2px); box-shadow: 0 0 56px rgba(212,240,80,.32); }
.btn-ghost { border: 1px solid var(--border-strong); background: var(--surface); }
.btn-ghost:hover { border-color: var(--lime); transform: translateY(-2px); }

.hero-flow {
  margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow-glow), 0 30px 60px rgba(0,0,0,.5); overflow: hidden;
}
.flow-head, .demo-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--text-mute); background: var(--bg-2);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.live { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--lime); display: flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); animation: pulse 1.4s infinite; }
.flow-svg { display: block; width: 100%; height: auto; padding: 12px 8px 0; }
.flow-log { list-style: none; margin: 0; padding: 12px 16px 16px; font-size: 12px; height: 104px; overflow: hidden; border-top: 1px solid var(--border); }
.flow-log li { color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: logIn .4s var(--ease) both; }
.flow-log li b { color: var(--lime); font-weight: 500; }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } }

/* SVG nodes */
.wire { fill: none; stroke: rgba(212,240,80,.22); stroke-width: 1.5; stroke-dasharray: 4 5; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -18; } }
.packet { fill: var(--lime); filter: drop-shadow(0 0 5px var(--lime)); }
.packet.v { fill: #9C83FF; filter: drop-shadow(0 0 5px var(--violet)); }
.node rect { fill: var(--surface-2); stroke: var(--border-strong); }
.node text { fill: var(--text); font-family: var(--mono); font-size: 12px; text-anchor: middle; }
.node text.sub { fill: var(--text-soft); font-size: 10px; }
.node.core rect { fill: var(--lime-soft); stroke: var(--lime); }
.node.core text { fill: var(--lime); font-weight: 500; }
.node.seg rect { stroke: rgba(111,79,232,.6); }
.ring { fill: none; stroke: var(--lime); stroke-opacity: .5; transform-origin: 226px 150px; animation: ring 2.4s var(--ease) infinite; }
@keyframes ring { from { transform: scale(.8); opacity: .8; } to { transform: scale(1.35); opacity: 0; } }

/* Seções */
.label { font-family: var(--mono); font-size: 13px; color: var(--lime); margin: 0 0 16px; }
h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1; letter-spacing: -.035em; font-weight: 800; margin: 0 0 20px; }
.about { padding: 96px 0; border-top: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.about-copy p { color: var(--text-mute); margin: 0 0 16px; font-size: 18px; }
.about-copy strong { color: var(--text); font-weight: 600; }

.projects { padding: 96px 0 64px; border-top: 1px solid var(--border); }
.note { font-family: var(--mono); font-size: 12.5px; color: var(--text-soft); margin: 0 0 48px; }

.card {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr); gap: clamp(20px, 3vw, 44px); align-items: center;
  padding: clamp(20px, 3vw, 36px); margin-bottom: 28px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.75);
  transition: border-color .35s, box-shadow .35s;
}
.card:hover { border-color: rgba(212,240,80,.35); box-shadow: var(--shadow-glow); }
.card.flip .card-copy { order: 2; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .08em; color: var(--lime);
  padding: 5px 10px; border-radius: 999px; background: var(--lime-soft);
}
.tag-wip { color: #B9A8FF; background: var(--violet-soft); }
.tag-wip .pulse-dot { background: #9C83FF; width: 7px; height: 7px; }
.card h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.08; letter-spacing: -.025em; margin: 16px 0 12px; font-weight: 800; }
.card-copy > p { color: var(--text-mute); margin: 0 0 20px; }
.card-copy strong { color: var(--text); }
.metrics { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metrics li { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.metrics b { display: block; font-size: 24px; letter-spacing: -.02em; color: var(--lime); font-weight: 800; line-height: 1.1; }
.metrics span { font-size: 13px; color: var(--text-mute); line-height: 1.35; display: block; margin-top: 2px; }
.metrics-text b { display: none; }
.metrics-text span { color: var(--text); font-family: var(--mono); font-size: 12px; margin: 0; }

.demo {
  background: var(--bg); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.25);
  overflow: hidden; min-width: 0; position: relative;
}
.chip { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--lime); border: 1px solid rgba(212,240,80,.4); padding: 2px 8px; border-radius: 999px; }

/* ===== Telas reais (capturas com dados fictícios) ===== */
.card.wide { grid-template-columns: 1fr; }
.card.wide .card-copy { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 40px; align-items: start; }
.card.wide .card-copy > :not(.metrics) { grid-column: 1; }
.card.wide .metrics { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.app-top .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.metrics b.b-sm { font-size: 18px; }
.app-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 11.5px; color: var(--text-mute); background: var(--bg-2); }
.fict { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--lime); border: 1px dashed rgba(212,240,80,.45); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.shot { box-shadow: 0 30px 60px rgba(0,0,0,.45); }
.shot-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b1120; }
.frame { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .8s var(--ease); }
.frame.on { opacity: 1; }
.frame img { display: block; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; transition: transform 2.6s cubic-bezier(.33,0,.15,1); will-change: transform; }
.cursor {
  position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; z-index: 3; pointer-events: none; opacity: 0;
  transition: left 1.1s cubic-bezier(.45,0,.2,1), top 1.1s cubic-bezier(.45,0,.2,1), opacity .4s;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11-6.5 1.2L16 21l-3 1.4-3.6-6.8L4 20z' fill='%23fff' stroke='%230A0A0A' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}
.cursor.on { opacity: 1; }
.cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--lime); opacity: 0; }
.cursor.click::after { animation: clickRing .6s var(--ease); }
@keyframes clickRing { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(1.6); } }
.callout {
  position: absolute; z-index: 4; max-width: min(300px, 70%); padding: 8px 12px; border-radius: 10px; pointer-events: none;
  background: rgba(10,10,10,.88); border: 1px solid rgba(212,240,80,.5); color: var(--text); font-size: 12.5px; line-height: 1.35;
  box-shadow: 0 0 24px rgba(212,240,80,.2); opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s var(--ease);
  backdrop-filter: blur(6px);
}
.callout b { color: var(--lime); font-weight: 600; }
.callout.on { opacity: 1; transform: none; }
.shot-foot { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--bg-2); min-height: 42px; }
.shot-dots { display: flex; gap: 6px; flex: none; }
.shot-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--surface-3); transition: width .4s var(--ease), background .4s; }
.shot-dots i.on { width: 20px; background: var(--lime); }
.shot-cap { margin: 0; font-size: 12.5px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Demo 4: MCP */
.card-wip { border-style: dashed; border-color: rgba(111,79,232,.4); }
.term { margin: 0; padding: 16px; font-size: 12.5px; line-height: 1.6; height: 300px; overflow: hidden; white-space: pre-wrap; word-break: break-word; color: var(--text-mute); }
.term .p { color: var(--lime); }
.term .r { color: var(--text); }
.term .x { color: #F87171; }
.term .ok { color: var(--lime); }
.term .caret { display: inline-block; width: 8px; height: 15px; background: var(--lime); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Footer */
.foot { padding: 96px clamp(16px, 4vw, 48px) 48px; border-top: 1px solid var(--border); text-align: center; }
.foot .cta { justify-content: center; }
.foot-big { font-size: clamp(40px, 8vw, 96px); font-weight: 800; letter-spacing: -.045em; line-height: 1; margin: 0 0 32px; }
.foot-small { margin-top: 48px; }

/* Reveal ao rolar */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal:nth-child(2) { transition-delay: .08s; }
.hero .reveal:nth-child(3) { transition-delay: .16s; }
.hero .reveal:nth-child(4) { transition-delay: .24s; }
.hero .reveal:nth-child(5) { transition-delay: .32s; }
.hero-flow.reveal { transition-delay: .3s; }

/* Responsivo */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 40px; }
  .about-grid { grid-template-columns: 1fr; }
  .card { grid-template-columns: 1fr; }
  .card.flip .card-copy { order: 0; }
}
@media (max-width: 760px) {
  .card.wide .card-copy { grid-template-columns: 1fr; }
  .card.wide .metrics { grid-column: 1; grid-row: auto; margin-top: 4px; }
  .callout { font-size: 11px; padding: 6px 9px; }
  .cursor { width: 16px; height: 16px; }
  .shot-cap { white-space: normal; font-size: 12px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .nav nav a[href^="https"] { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics b { font-size: 20px; }
  .btn { padding: 12px 18px; }
  .term { font-size: 11.5px; height: 320px; }
}

/* Movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .packet { display: none; }
}
