/* ================= RESET ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ================= TOKENS ================= */
:root {
  --bg: #050506;            /* Preto Espacial */
  --surface: #22222A;       /* Roxo Escuro */
  --surface-2: #2C2C36;     /* tom mais claro do Roxo Escuro, p/ profundidade */
  --ink: #E9E9EF;           /* Cinza Claro */
  --ink-soft: #9A9AA6;      /* tom mais escuro do Cinza Claro */

  --accent: #FFE600;        /* Amarelo Neon */
  --accent-ink: #FFE600;
  --accent-soft: rgba(255,230,0,0.12);

  --mint: #A8FF3E;          /* Verde Lima */
  --mint-soft: rgba(168,255,62,0.12);

  --lilac: #6E6E8C;         /* tom claro do Roxo Escuro */
  --peach: #C9B100;         /* tom escuro do Amarelo Neon */

  --line: rgba(233,233,239,0.12);
  --radius: 16px;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ================= BASE ================= */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  padding-top: 84px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

section { padding: 100px 24px; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

a { color: inherit; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ================= NAVBAR ================= */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: rgba(5,5,6,0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-container {
  max-width: 1220px;
  margin: auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}

.cursor {
  color: var(--accent);
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
  z-index: 1;
}

.nav-menu a:not(.btn) {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-menu a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%; height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-menu a:not(.btn):hover { color: var(--ink); }
.nav-menu a:not(.btn):hover::after { width: 100%; }

/* ================= BOTÕES ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--mint);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255,230,0,0.25);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-sm { 
  padding: 9px 18px; 
  font-size: 0.85rem; 
  border-radius: 10px;
  color: var(--bg);
  background: var(--accent-ink); 
}

.btn-sm:hover {
  background: var(--mint);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255,230,0,0.25);
}

/* ================= HERO ================= */
.hero {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 60px 6vw 80px;
}

.hero-text { max-width: 560px; }

.hero-text h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  line-height: 1.1;
  font-weight: 700;
}
.hero-text h1 strong { color: var(--accent-ink); }

.hero-text p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats {
  display: flex;
  gap: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent); }
.stat span { font-size: 0.82rem; color: var(--ink-soft); }

/* ---- VISUAL: browser mockup ---- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 460px;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.75;
  z-index: 0;
}
.blob-mint { width: 260px; height: 260px; background: var(--mint); top: 0; left: 10%; }
.blob-lilac { width: 220px; height: 220px; background: var(--lilac); bottom: 0; right: 8%; }

.browser-frame {
  position: relative;
  z-index: 2;
  width: min(380px, 84vw);
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(0,0,0,0.6), 0 0 50px rgba(255,230,0,0.08);
  overflow: hidden;
  transition: transform 0.4s ease;
}
.browser-frame:hover { transform: translateY(-6px); }

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-1 { background: #F2A6A0; }
.dot-2 { background: #F4D48B; }
.dot-3 { background: #A9DDBD; }
.browser-url {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 20px;
}

.browser-body img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

/* ================= SOBRE ================= */
.sobre { background: var(--surface); }

.sobre-wrapper {
  max-width: 1220px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.sobre-texto { max-width: 460px; }
.sobre h2 { font-size: 2rem; }
.sobre p { color: var(--ink-soft); line-height: 1.7; }

.sobre-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  border-color: var(--accent);
}

.card .icon {
  width: 44px; height: 44px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.card h3 { font-size: 1rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; }

/* ================= PORTFOLIO ================= */
.portfolio { background: var(--bg); text-align: center; }

.portfolio h2 { font-size: 2.1rem; }

.portfolio-desc {
  max-width: 560px;
  margin: 0 auto 56px;
  color: var(--ink-soft);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1220px;
  margin: auto;
}

.portfolio-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
}
.bar-blue { background: var(--accent); }
.bar-mint { background: var(--mint); }
.bar-lilac { background: var(--lilac); }
.bar-peach { background: var(--peach); }

.tag-mono {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-soft);
  margin: 10px 0 14px;
}

.portfolio-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.portfolio-card p { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.55; min-height: 62px; }

.portfolio-card .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent-ink);
}
.portfolio-card .link i { font-size: 0.75rem; transition: transform 0.2s ease; }
.portfolio-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(0,0,0,0.55); }
.portfolio-card:hover .link i { transform: translateX(4px); }

.portfolio-card-cta {
  background: linear-gradient(135deg, var(--accent), var(--mint));
  color: var(--bg);
}
.portfolio-card-cta p { color: rgba(5,5,6,0.65); }
.portfolio-card-cta .tag-mono { color: rgba(5,5,6,0.55); }
.portfolio-card-cta .link { color: var(--bg); }

/* ================= FAQ ================= */
.faq { background: var(--surface); text-align: center; }
.faq h2 { font-size: 2rem; margin-bottom: 40px; }

.faq-list {
  max-width: 680px;
  margin: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item[open] { border-color: var(--accent); box-shadow: 0 12px 26px rgba(255,230,0,0.18); background: var(--surface); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.98rem;
  position: relative;
  padding-right: 30px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0; top: -2px;
  font-size: 1.3rem;
  color: var(--accent-ink);
}
.faq-item[open] summary::after { content: '\2212'; }

.faq-item p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ================= EFEITOS DE LINHAS ANIMADAS ================= */

/* barra de progresso de rolagem */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  box-shadow: 0 0 12px rgba(255,230,0,0.5);
  z-index: 6000;
  transition: width 0.1s ease-out;
}

/* grade de circuito no fundo, fixa e sutil */
.circuit-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: circuitDrift 26s linear infinite;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
}
@keyframes circuitDrift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 64px 128px, 128px 64px; }
}
@media (prefers-reduced-motion: reduce) { .circuit-bg { animation: none; } }

body, .navbar, main, .footer { position: relative; z-index: 1; }

/* divisores de seção que se desenham ao entrar na tela */
.divider-line {
  width: 100%; max-width: 1220px; height: 1px;
  margin: 0 auto; position: relative;
  background: var(--line);
  overflow: hidden;
}
.divider-line::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), var(--mint), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 1.1s ease;
}
.divider-line.in-view::after { transform: scaleX(1); }

/* scanner de luz no mockup do navegador */
.browser-body { position: relative; overflow: hidden; }
.browser-body::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(255,230,0,0.16), transparent);
  animation: scanSweep 4.5s ease-in-out infinite;
}
@keyframes scanSweep {
  0% { top: -40%; }
  60% { top: 100%; }
  100% { top: 100%; }
}
@media (prefers-reduced-motion: reduce) { .browser-body::after { display: none; } }

/* ================= CONTATO ================= */
.contato { background: var(--surface); text-align: center; }
.contato h2 { font-size: 2rem; }
.contato p { color: var(--ink-soft); margin-bottom: 36px; }

.contato form {
  max-width: 440px;
  margin: auto;
  background: var(--bg);
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  text-align: left;
}

.contato input,
.contato textarea {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.contato textarea { min-height: 100px; resize: vertical; }

.contato input:focus,
.contato textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.contato .btn { width: 100%; }

/* ================= FOOTER ================= */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 40px 24px;
}
.footer-content {
  max-width: 1220px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer-logo { color: var(--ink); }
.footer-content p { font-size: 0.85rem; }

/* ================= WHATSAPP FLUTUANTE ================= */
.whatsapp {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 58px; height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: #fff;
  z-index: 1000;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  animation: float 2.5s infinite;
  transition: transform 0.3s ease;
}
.whatsapp:hover { transform: scale(1.08); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ================= LOADER DE ENTRADA ================= */
.loader {
  position: fixed; inset: 0; z-index: 5000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
  overflow: hidden;
}
.loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader__scene {
  position: relative;
  width: min(420px, 88vw);
  display: flex; flex-direction: column; align-items: center;
}

.loader__blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.8; z-index: 0;
}
.loader__blob--mint { width: 260px; height: 260px; background: var(--mint); top: -60px; left: -80px; animation: blobDrift 6s ease-in-out infinite; }
.loader__blob--lilac { width: 220px; height: 220px; background: var(--lilac); bottom: -60px; right: -70px; animation: blobDrift 7s ease-in-out infinite reverse; }
@keyframes blobDrift {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(14px, -10px) scale(1.06); }
}

/* ícones decorativos flutuantes */
.deco {
  position: absolute; z-index: 1;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-ink); font-size: 1rem;
  box-shadow: 0 10px 22px rgba(0,0,0,0.45);
  animation: decoFloat 3.4s ease-in-out infinite;
}
.deco-mono { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; }

.deco-1 { top: 4%; left: 2%; animation-delay: 0s; }
.deco-2 { top: 10%; right: 0%; animation-delay: .4s; }
.deco-3 { bottom: 14%; left: -2%; animation-delay: .8s; }
.deco-4 { bottom: 2%; right: 4%; animation-delay: 1.2s; }
.deco-5 { top: 46%; left: -8%; animation-delay: .6s; }
.deco-6 { top: 42%; right: -8%; animation-delay: 1s; }

@keyframes decoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(6deg); }
}
@media (max-width: 560px) {
  .deco { width: 34px; height: 34px; font-size: 0.85rem; }
  .deco-1, .deco-5 { left: 0%; }
  .deco-2, .deco-6 { right: 0%; }
}

/* ampulheta */
.hourglass { position: relative; z-index: 2; width: 92px; margin-bottom: 22px; filter: drop-shadow(0 14px 24px rgba(0,0,0,0.5)); }
.hourglass__svg { width: 100%; height: auto; overflow: visible; }
.hourglass__frame { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.hourglass__cap { fill: var(--ink); }
.hourglass__sand { fill: var(--accent); transition: height .2s ease, y .2s ease; }
.hourglass__stream { fill: var(--accent); animation: streamPulse .35s ease-in-out infinite; }
@keyframes streamPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.loader__content { position: relative; z-index: 2; text-align: center; }

.loader__logo { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--ink); }

.loader__line {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-soft);
  margin: 16px 0 20px; min-height: 1.2em;
}
.loader__caret {
  display: inline-block; width: 7px; height: 1em; background: var(--accent);
  margin-left: 2px; vertical-align: text-bottom; animation: blink 0.9s step-end infinite;
}

.loader__bar { width: min(280px, 70vw); height: 3px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 0 auto; }
.loader__bar span {
  display: block; height: 100%; width: 0%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--mint));
  transition: width .25s ease;
}

.loader__pct { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent-ink); }

@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
}

/* ================= STAGGER DO REVEAL ================= */
.reveal.in-view { transition-delay: var(--reveal-delay, 0s); }

/* ================= TILT NO BROWSER-FRAME ================= */
#tiltFrame { transition: transform 0.15s ease-out; will-change: transform; }
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  section { padding: 72px 20px; }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 48px 20px 64px;
    min-height: auto;
  }
  .hero-text { max-width: 100%; margin: auto; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; gap: 28px; }
  .hero-visual { margin-top: 44px; min-height: auto; }
  .browser-body img { height: 340px; }

  .menu-toggle { display: flex; }

  .nav-menu {
    position: absolute;
    top: 100%; right: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 220px;
    padding: 22px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.55);
    display: none;
  }
  .nav-menu.active { display: flex;}
  .nav-menu .btn { width: 100%; }

  .sobre-wrapper { grid-template-columns: 1fr; text-align: center; }
  .sobre-texto { margin: auto; }
  .sobre-cards { grid-template-columns: 1fr 1fr; }

  .portfolio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 2.1rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; }
  .hero-stats { flex-wrap: wrap; row-gap: 18px; }
  .sobre-cards { grid-template-columns: 1fr; }
  .browser-frame { width: 100%; }
}

.navbar {
  z-index: 5000;
}

.nav-menu.active {
  z-index: 5001;
}