*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0a0a0a;
  --bg-card:     rgba(255,255,255,0.03);
  --border:      rgba(255,255,255,0.10);
  --border-hover:rgba(255,255,255,0.25);
  --text:        #f0f0f0;
  --text-dim:    rgba(240,240,240,0.50);
  --accent:      #ffffff;
  --accent-dim:  rgba(255,255,255,0.35);
  --tag:         rgba(255,255,255,0.40);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: 'Inter', sans-serif;
  color: var(--text);
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.04;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── CANVAS ── */
canvas#waveCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ── STARDUST CANVAS ── */
#stardust-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px;
  background: linear-gradient(to bottom, rgba(10,10,10,0.9), transparent);
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s;
  cursor: pointer;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* ── VIEWPORT SLIDER ── */
.slider-track {
  position: fixed;
  inset: 0;
  display: flex;
  /* width will be set dynamically or just let it expand */
  z-index: 5;
  transition: transform 0.95s cubic-bezier(0.77, 0, 0.175, 1);
}

/* ── SEÇÕES ── */
.section {
  width: 100vw;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  pointer-events: none;
  position: relative;
  overflow: hidden;
}

.section.active { pointer-events: all; }

/* ── VERTICAL SCROLL (Generic) ── */
.scroll-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.scroll-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 140px 24px 120px;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* ── HERO LAYOUT (Asymmetric 2-Column) ── */
#home {
  text-align: left;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.hero-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 clamp(32px, 8vw, 140px);
}

.hero-content {
  flex: 1;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  padding-top: 60px;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--tag);
  margin-bottom: 28px;
  opacity: 0;
}

#home h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4.5vw, 60px);
  font-weight: 300;
  line-height: 1.08;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  opacity: 0;
}

#home h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(13px, 1.2vw, 15px);
  font-weight: 300;
  color: var(--text-dim);
  max-width: 400px;
  line-height: 1.75;
  margin: 0 auto 32px;
  text-align: center;
  opacity: 0;
}

.hero-cta {
  margin-bottom: 48px;
  pointer-events: all;
  opacity: 0;
}

.btn-magnetic {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.45s cubic-bezier(0.23, 1, 0.320, 1);
  position: relative;
  overflow: hidden;
}

.btn-magnetic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.23, 1, 0.320, 1);
  z-index: -1;
}

.btn-magnetic:hover {
  color: var(--bg);
  border-color: var(--accent);
}

.btn-magnetic:hover::before {
  transform: scaleX(1);
}

.btn-magnetic svg {
  transition: transform 0.35s ease;
}
.btn-magnetic:hover svg {
  transform: translate(3px, -3px);
}

/* ── CUSTOM CURSOR ── */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: difference;
  opacity: 0;
  transition: width 0.3s ease, height 0.3s ease, margin 0.3s ease, background 0.3s ease, border 0.3s ease;
  will-change: transform;
}

.cursor-dot.cursor-hover {
  width: 40px;
  height: 40px;
  margin-left: -16px;
  margin-top: -16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.3);
}

/* ── LEGACY BTN (keep for other sections) ── */
.btn-ghost {
  padding: 14px 36px;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, transform 0.2s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--accent-dim); color: var(--accent); transform: translateY(-1px); }

/* ── SOBRE ── */
.sobre-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--tag);
  margin-bottom: 24px;
}

.sobre-titulo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 5.5vw, 80px);
  font-weight: 300;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 32px;
}

.sobre-titulo em {
  font-style: italic;
  color: var(--accent);
}

.sobre-texto {
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 300;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.85;
  margin-bottom: 48px;
}

.sobre-divider {
  width: 48px;
  height: 1px;
  background: var(--border);
  margin: 0 auto 32px;
}

/* Tech Stack Badges */
.tech-badge {
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 40px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: default;
}
.tech-badge:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--bg);
  background: var(--text);
}

/* Sobre — additional blocks */
.sobre-block {
  margin-top: 60px;
  max-width: 600px;
  text-align: center;
}

.sobre-block h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 300;
  color: var(--text);
  margin-bottom: 20px;
}

.sobre-block h3 em {
  font-style: italic;
  color: var(--accent);
}

.sobre-block p {
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.85;
}

.sobre-stats {
  display: flex;
  gap: 48px;
  margin-top: 60px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.sobre-end-spacer {
  height: 80px;
  flex-shrink: 0;
}

/* scroll progress bar */
.scroll-progress {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 80px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.5s ease 1s;
  pointer-events: none;
  z-index: 10;
}

.scroll-progress-fill {
  width: 100%;
  height: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: height 0.15s ease-out;
}

.section.active .scroll-progress {
  opacity: 1;
}

/* entrada da seção */
.section .sobre-tag,
.section .sobre-titulo,
.section .sobre-texto,
.section .sobre-divider,
.section .sobre-block,
.section .sobre-stats,
.section .projetos-tag,
.section .projetos-divider,
.section .projetos-titulo,
.section .featured-project,
.section .contato-titulo,
.section .contato-texto,
.section .contato-cta,
.section .contato-footer {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.active .sobre-tag, .section.active .projetos-tag             { opacity: 1; transform: none; transition-delay: 0.55s; }
.section.active .sobre-divider, .section.active .projetos-divider     { opacity: 1; transform: none; transition-delay: 0.70s; }
.section.active .sobre-titulo, .section.active .projetos-titulo, .section.active .contato-titulo { opacity: 1; transform: none; transition-delay: 0.80s; }
.section.active .sobre-texto, .section.active .featured-project, .section.active .contato-texto  { opacity: 1; transform: none; transition-delay: 0.95s; }
.section.active .sobre-block, .section.active .contato-cta            { opacity: 1; transform: none; transition-delay: 1.10s; }
.section.active .sobre-stats, .section.active .contato-footer         { opacity: 1; transform: none; transition-delay: 1.25s; }


/* ── PROJETOS ── */
#projetos {
  background: transparent;
}

.projetos-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--tag);
  margin-bottom: 24px;
}

.projetos-titulo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 300;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 48px;
}

.projetos-titulo em {
  font-style: italic;
  color: var(--accent);
}

.projetos-divider {
  width: 48px;
  height: 1px;
  background: var(--border);
  margin: 0 auto 32px;
}

.projetos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 960px;
  margin-bottom: 48px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: border-color 0.4s cubic-bezier(0.23, 1, 0.320, 1), transform 0.4s cubic-bezier(0.23, 1, 0.320, 1), box-shadow 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  cursor: default;
}

.project-card:hover {
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(255,255,255,0.06);
}

.project-card .card-icon {
  font-size: 28px;
  margin-bottom: 18px;
  opacity: 0.5;
  color: var(--text-dim);
}

.project-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.project-card p {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ── FEATURED PROJECT (ERP) ── */
.featured-project {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 48px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 24px;
  transition: border-color 0.4s cubic-bezier(0.23, 1, 0.320, 1), transform 0.4s cubic-bezier(0.23, 1, 0.320, 1), box-shadow 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.featured-project:hover {
  border-color: rgba(255,255,255,0.3);
  box-shadow: 0 20px 40px rgba(255,255,255,0.05);
}

.fp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}

.fp-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tag);
  margin-bottom: 8px;
}

.fp-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: var(--text);
  margin: 0;
}

.fp-tech {
  font-size: 11px;
  color: var(--accent);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fp-description p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 800px;
}

.fp-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.module {
  padding: 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s ease;
}

.module:hover {
  border-color: var(--border);
  background: rgba(255,255,255,0.02);
  transform: translateY(-2px);
}

.module h4 {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.module p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}

.fp-gallery {
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  margin-top: 16px;
  position: relative;
  height: 400px;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.fp-gallery-track {
  display: flex;
  gap: 24px;
  height: 100%;
  animation: marquee 60s linear infinite;
  width: max-content;
  align-items: center;
}

.fp-gallery-track:hover {
  animation-play-state: paused;
}

.fp-gallery-track img {
  height: 100%;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #050505;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0.85;
  transition: opacity 0.4s ease, transform 0.4s ease;
  cursor: pointer;
}

.fp-gallery-track img:hover {
  opacity: 1;
  transform: scale(1.02);
  z-index: 2;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 12px)); }
}

/* ── CONTATO ── */
.contato-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.contato-titulo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 300;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 24px;
}

.contato-titulo em {
  font-style: italic;
  color: var(--accent);
}

.contato-texto {
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 300;
  color: var(--text-dim);
  max-width: 480px;
  line-height: 1.85;
  margin-bottom: 48px;
}

.contato-cta {
  margin-bottom: 60px;
}

.contato-footer {
  position: absolute;
  bottom: 32px;
  left: 0;
  width: 100%;
  text-align: center;
}

.contato-footer p {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.4;
}

/* ── TATTOO PROJECT (Projeto 02) ── */
.tattoo-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.tattoo-features {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.t-feature h4 {
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.t-feature p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}

.tattoo-gallery {
  column-count: 2;
  column-gap: 16px;
}

.tattoo-gallery img {
  width: 100%;
  margin-bottom: 16px;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
  filter: grayscale(40%) contrast(110%);
  transition: filter 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
  background: #050505;
}

.tattoo-gallery img:hover {
  filter: grayscale(0%) contrast(100%);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 32px rgba(255,255,255,0.06);
  z-index: 2;
  position: relative;
}

/* ── SCROLL HINT ── */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 1s ease 1.8s forwards;
  pointer-events: none;
}

.scroll-hint span {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.45), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

@media (max-width: 768px) {
  /* Stardust: hide on mobile */
  #stardust-canvas { display: none !important; }

  /* Navigation */
  nav { 
    padding: 20px 16px; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 16px; 
    background: linear-gradient(to bottom, rgba(10,10,10,0.95) 60%, transparent);
  }
  .logo { font-size: 20px; width: 100%; text-align: center; }
  .nav-links { gap: 16px; justify-content: center; width: 100%; flex-wrap: wrap; }
  .nav-links a { font-size: 10px; }

  /* Hero Mobile */
  .hero-layout {
    padding: 120px 24px 40px;
    justify-content: center;
  }
  .hero-content { text-align: center; align-items: center; max-width: 100%; padding-top: 0; }
  .hero-subtitle { text-align: center; }
  #home h1 { font-size: clamp(26px, 7vw, 36px); margin-bottom: 16px; text-align: center; }

  /* Layout */
  .section { padding: 0 16px; }
  .scroll-inner { padding: 140px 0 100px; }
  
  /* Sections internal */
  .sobre-titulo, .projetos-titulo { font-size: clamp(32px, 8vw, 40px); }
  .sobre-texto { font-size: 14px; padding: 0 16px; }
  .sobre-stats { gap: 32px; }
  .stat-number { font-size: 40px; }

  /* Progress Bar */
  .scroll-progress { right: 6px; }

  /* Featured Project Generic */
  .featured-project { padding: 32px 20px; gap: 24px; }
  .fp-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .fp-header h3 { font-size: 26px; }
  .fp-tech { font-size: 10px; padding: 6px 12px; }
  .fp-description p, .module p { font-size: 13px; }
  .fp-modules { grid-template-columns: 1fr; gap: 20px; }
  
  /* Gallery */
  .fp-gallery { 
    height: 220px; 
    margin-top: 12px; 
    border-radius: 4px;
    mask-image: linear-gradient(to right, transparent, black 2%, black 98%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 2%, black 98%, transparent);
  }
  .fp-gallery-track { gap: 12px; }
  .fp-gallery-track img { border-radius: 4px; }

  /* Tattoo Layout Mobile */
  .tattoo-layout { grid-template-columns: 1fr; gap: 32px; }
  .tattoo-gallery { column-count: 1; column-gap: 0; }
  .tattoo-gallery img { margin-bottom: 16px; }

  /* Custom cursor */
  .cursor-dot { display: none !important; }

  /* Contato */
  .contato-titulo { font-size: clamp(28px, 7vw, 40px) !important; }
  .contato-texto { font-size: 14px; padding: 0 16px; }
}
