/* ==========================================================================
   Rafael Guia — Conceitual, Minimalista & Sofisticado
   Disposição Perfeita: Celular Totalmente Visível Abaixo do Cabeçalho
   Hospedagem: Cloudflare Pages
   ========================================================================== */

:root {
  --bg-deep: #060504;
  --bg-surface: #0e0c0a;
  --bg-elevated: #161310;
  
  --coffee-glow: rgba(195, 128, 76, 0.16);
  --coffee-accent: #c98a4b;
  --coffee-light: #dfa870;

  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.22);
  --cyan: #06b6d4;
  --gold: #f59e0b;

  --border: rgba(255, 240, 225, 0.08);
  --border-light: rgba(255, 240, 225, 0.14);

  --text-white: #ffffff;
  --text-muted: #9c9288;
  --text-dim: #60574e;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-white);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-deep);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Fundo Fino & Nobre: Degradê Suave na Rolagem (Mais Claro para Mais Escuro) */
.ambient-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.15s ease-out;
}

/* Camada Inicial (Topo): Café Fino suavemente mais luminoso */
.ambient-start {
  background: 
    radial-gradient(circle at 50% 36%, rgba(195, 128, 76, 0.14) 0%, rgba(125, 78, 42, 0.06) 42%, transparent 72%),
    radial-gradient(circle at 50% 90%, rgba(95, 58, 30, 0.05) 0%, transparent 55%),
    #070605;
  opacity: 1;
}

/* Camada Final (Fundo): Café Torrado mais escuro e profundo */
.ambient-end {
  background: 
    radial-gradient(circle at 50% 36%, rgba(135, 80, 42, 0.06) 0%, rgba(80, 45, 22, 0.02) 42%, transparent 72%),
    radial-gradient(circle at 50% 90%, rgba(55, 30, 15, 0.02) 0%, transparent 55%),
    #040302;
  opacity: 0;
}

/* Microtextura Tátil de Café Fino (Pó de Café / Veludo Fosco) */
.ambient-noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.024'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Header Fixo Minimalista */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  background: rgba(6, 5, 4, 0.82);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-white);
}

.brand-glyph {
  width: 9px;
  height: 9px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald);
}

.brand-text {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.header-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-main);
  font-size: 0.76rem;
  font-weight: 500;
}

.nav-link {
  color: rgba(255, 255, 255, 0.52);
  text-decoration: none;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--coffee-light);
  background: rgba(201, 138, 75, 0.12);
  font-weight: 600;
}

.nav-dot {
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.55rem;
  user-select: none;
}

.nav-label-mobile {
  display: none;
}

.btn-minimal {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: #25D366;
  border: 1px solid #20ba59;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.28);
  transition: all 0.2s ease;
}

.btn-minimal:hover {
  background: #20ba59;
  border-color: #1eb757;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transform: translateY(-1px);
}

.btn-minimal svg {
  stroke: #ffffff;
  stroke-width: 2.4;
}

/* ==========================================================================
   SCROLLYTELLING CONTAINER
   Sticky Stage ancorado rigorosamente abaixo do header (sem corte no topo)
   ========================================================================== */

.scrolly-container {
  position: relative;
  height: 480vh;
  z-index: 10;
  margin-top: 0;
}

.scrolly-stage {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4.5rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 2rem 2.25rem 2rem;
  overflow: hidden;
}

/* Smartphone Escultural: Altura dinâmica que nunca ultrapassa o viewport */
.phone-viewport {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame {
  width: min(340px, 85vw);
  height: min(580px, calc(100vh - var(--header-height) - 64px));
  background: #000000;
  border-radius: 42px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.95),
    0 30px 80px -15px rgba(0, 0, 0, 0.98),
    0 10px 40px -10px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.6s ease;
}

/* Ilha Dinâmica */
.phone-island {
  height: 28px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
}

.island-camera {
  width: 76px;
  height: 16px;
  background: #0a0c10;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Barra de Topo do App */
.phone-app-bar {
  background: #0f141c;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 5;
  flex-shrink: 0;
}

.app-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #042f20;
  border: 1px solid var(--emerald);
  color: var(--emerald);
  font-weight: 800;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-meta {
  flex: 1;
}

.app-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.2;
}

.verified-icon {
  color: var(--emerald);
}

.app-sub {
  font-size: 0.62rem;
  color: var(--emerald);
  font-family: var(--font-mono);
}

.app-chip {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 0.1rem 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  color: var(--text-dim);
}

/* Tela do Telefone e Fases */
.phone-screen {
  flex: 1;
  position: relative;
  background: #07090d;
  padding: 1rem 0.85rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen-phase {
  position: absolute;
  inset: 1rem 0.85rem;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: all 0.5s var(--ease-out-expo);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.screen-phase.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Card Fase 0: Welcome */
.welcome-card {
  background: #0d1118;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  text-align: center;
}

.welcome-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--emerald);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.welcome-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.welcome-lead {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.welcome-features {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-align: left;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}

.wf-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: #cbd5e1;
}

.wf-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 5px var(--emerald);
}

/* Bolhas de Mensagem */
.bubble {
  padding: 0.8rem 0.95rem;
  border-radius: 13px;
  font-size: 0.78rem;
  line-height: 1.5;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.bubble-bot {
  background: #182029;
  color: #e9edef;
  border-top-left-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.connected-bubble {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.bubble-header-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--emerald);
  font-weight: 700;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.25rem;
}

.bot-intro {
  margin-bottom: 0.35rem;
}

.bot-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.bot-points li {
  position: relative;
  padding-left: 0.75rem;
}

.bot-points li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--emerald);
}

.ref {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
}

.bot-followup {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 0.35rem;
}

.bubble-time {
  display: block;
  text-align: right;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.25rem;
}

/* Card Fase 2: Indicadores */
.indicators-card {
  background: #0d1118;
  border: 1px solid var(--border-light);
  border-radius: 13px;
  padding: 0.85rem;
}

.ind-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.ind-ticker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-white);
}

.ind-audit-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ind-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.ind-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.ind-label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: var(--text-dim);
}

.ind-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--emerald);
  letter-spacing: -0.02em;
}

.ind-source {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--cyan);
}

.ind-hash {
  margin-top: 0.35rem;
  padding: 0.35rem;
  background: rgba(245, 158, 11, 0.05);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: 5px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 5px var(--gold);
}

/* Card Fase 3: Macro */
.macro-card {
  background: #0d1118;
  border: 1px solid var(--border-light);
  border-radius: 13px;
  padding: 0.85rem;
}

.macro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.macro-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cyan);
}

.macro-origin {
  font-size: 0.6rem;
  color: var(--text-dim);
}

.macro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.macro-item {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.m-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
}

.m-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-white);
}

.m-source {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: var(--emerald);
}

.macro-footer {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 0.35rem;
}

/* Card Fase 5: CTA no Celular */
.cta-card-phone {
  background: #0d1118;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 1.25rem 0.85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

.cta-phone-icon {
  color: var(--emerald);
  margin-bottom: 0.6rem;
}

.cta-phone-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.cta-phone-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.btn-phone-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--emerald);
  color: #032317;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}

.btn-phone-wa:hover {
  background: #34d399;
  transform: scale(1.03);
}

.cta-phone-badges {
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  margin-top: 0.9rem;
}

/* Legenda de Rodapé da Fase */
.phase-caption {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.65rem;
  flex-shrink: 0;
}

.caption-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.15rem;
}

.phase-caption p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Narrativa Lateral */
.stage-narrative {
  width: 480px;
  position: relative;
  min-height: 320px;
}

.narrative-block {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-out-expo);
  width: 100%;
}

.narrative-block.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
}

.n-pill {
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--coffee-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: inline-block;
  margin-bottom: 1rem;
}

.n-title {
  font-size: clamp(1.75rem, 2.7vw, 2.35rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.text-emerald {
  color: #ffffff;
}

.n-desc {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.8;
  letter-spacing: -0.01em;
}

.narrative-scroll-hint {
  margin-top: 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--emerald);
  letter-spacing: 0.05em;
  animation: bounceHint 2s infinite;
}

@keyframes bounceHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.btn-primary-small {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--text-white);
  color: #000000;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  transition: all 0.2s ease;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.btn-primary-small:hover {
  background: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   RODAPÉ TRANSPARENTE E DISCRETO
   Totalmente sem preenchimento, flutuando suavemente na base da tela.
   Nunca quebra o sticky, nunca empurra a tela, zero solavancos.
   ========================================================================== */

.footer-discrete {
  position: absolute;
  bottom: 0.75rem;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.22);
  background: transparent;
  border: none;
  pointer-events: none;
  z-index: 20;
  letter-spacing: 0.01em;
  padding: 0 1rem;
}

.footer-discrete .f-item {
  color: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

.footer-discrete a.f-item {
  pointer-events: auto;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-discrete a.f-item:hover {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
}

.footer-discrete .f-dot {
  opacity: 0.25;
  user-select: none;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */

@media (max-width: 1024px) {
  .scrolly-stage {
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    padding: 1rem 1.25rem 2.5rem 1.25rem;
  }
  .phone-frame {
    width: 280px;
    height: min(460px, 54vh);
  }
  .stage-narrative {
    width: 100%;
    text-align: center;
    min-height: 120px;
  }
  .narrative-block {
    top: 0;
    transform: none;
  }
  .narrative-block.active {
    transform: none;
  }
  .header-inner {
    padding: 0 1rem;
  }
  .header-tag {
    display: none;
  }
  .footer-discrete {
    bottom: 0.45rem;
    font-size: 0.65rem;
    gap: 0.4rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  .nav-label-desktop {
    display: none;
  }
  .nav-label-mobile {
    display: inline;
  }
  .header-nav {
    gap: 0.25rem;
    font-size: 0.72rem;
  }
  .nav-link {
    padding: 0.2rem 0.35rem;
  }
  .btn-minimal {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    gap: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .narrative-scroll-hint {
    animation: none;
  }
  .screen-phase,
  .narrative-block {
    transition: none !important;
  }
}
