/* ==========================================================================
   Saúde Interativa — Precision Hybrid Design System
   ========================================================================== */

/* Google Font & Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-color: #000000;
  
  /* Left-Side Typography (Pure Crisp White) */
  --text-left-white: #ffffff;
  --text-left-white-90: rgba(255, 255, 255, 0.92);
  
  /* Right-Side Typography (Solid Clean Black / Obsidian) */
  --text-right-black: #0f172a;
  --text-right-secondary: #334155;
  --accent-primary: #0284c7;
  
  /* Glass UI Accents */
  --left-glass-bg: rgba(0, 0, 0, 0.32);
  --left-glass-border: rgba(255, 255, 255, 0.22);
  --light-panel-bg: rgba(255, 255, 255, 0.88);
  --light-panel-border: rgba(255, 255, 255, 0.95);
  
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

html {
  background-color: var(--bg-color);
  color: var(--text-left-white);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-color);
  color: var(--text-left-white);
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background-color: rgba(2, 132, 199, 0.3);
  color: #ffffff;
}

/* ==========================================================================
   Background Frame Scrub Engine
   ========================================================================== */
.scroll-frame-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background-color: var(--bg-color);
  overflow: hidden;
  pointer-events: none;
}

.frame-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

/* ==========================================================================
   Fixed Floating Island Navbar (Cápsulas Flutuantes Individuais)
   ========================================================================== */
.navbar {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 50;
  width: 100%;
  height: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  pointer-events: none;
}

@media (min-width: 640px) {
  .navbar {
    top: 20px;
  }
}

.nav-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .nav-container {
    padding: 0 28px;
  }
}

@media (min-width: 768px) {
  .nav-container {
    padding: 0 40px;
  }
}

/* Cápsula 1: Logotipo / Brand (Branco Sólido) */
.nav-brand {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 9999px;
  padding: 8px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all 250ms ease;
}

.nav-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.nav-brand svg {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

.brand-text {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: #0f172a;
}

@media (min-width: 640px) {
  .brand-text {
    font-size: 1rem;
  }
}

/* Cápsula 2: Links Centrais (Branco Sólido) */
.nav-links {
  pointer-events: auto;
  display: none;
  align-items: center;
  gap: 28px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 9999px;
  padding: 9px 26px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all 250ms ease;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .nav-links {
    gap: 32px;
    padding: 10px 30px;
  }
}

.nav-link {
  color: #334155;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 200ms ease;
  display: inline-flex;
  align-items: center;
}

@media (min-width: 640px) {
  .nav-link {
    font-size: 0.875rem;
  }
}

.nav-link:hover {
  color: var(--accent-primary);
}

.nav-link sup {
  margin-left: 3px;
  font-family: var(--font-family);
  font-size: 9px;
  font-weight: 600;
  color: var(--accent-primary);
}

/* Cápsula 3: Botão de Consulta (Branco Sólido com Inversão no Hover) */
.nav-reveal {
  pointer-events: auto;
}

.btn-consultation {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 9999px;
  padding: 10px 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: all 250ms ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .btn-consultation {
    padding: 10px 22px;
    font-size: 0.875rem;
  }
}

.btn-consultation:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Page Layout & Scroll Storytelling Track
   ========================================================================= */
.page-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
}

.scroll-track {
  position: relative;
  width: 100%;
  height: 280vh;
}

.fixed-section {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 96px 20px 48px;
  will-change: opacity, transform;
  pointer-events: none;
}

@media (min-width: 640px) {
  .fixed-section {
    padding: 112px 32px 48px;
  }
}

@media (min-width: 768px) {
  .fixed-section {
    padding: 112px 48px 64px;
  }
}

.hero-top-row,
.hero-bottom-row,
.capability-top-row,
.capability-left-col,
.capability-panel-wrapper,
.capability-row {
  will-change: opacity, transform;
}

/* ==========================================================================
   Section One (Hero)
   ========================================================================== */
.hero-top-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 32px;
}

@media (min-width: 640px) {
  .hero-top-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-end;
  }
}

/* Right: Intro Text in Bottom Row (Sem caixas - apenas efeito esfumaçado nas letras) */
.hero-intro {
  max-width: 440px;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (min-width: 768px) {
  .hero-intro {
    text-align: right;
    padding-bottom: 4px;
  }
}

.hero-intro-text {
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.625;
  color: #ffffff;
  text-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.75),
    0 0 12px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(0, 0, 0, 0.35);
}

@media (min-width: 640px) {
  .hero-intro-text {
    font-size: 1.1875rem;
  }
}

.hero-bottom-row {
  margin-top: auto;
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 768px) {
  .hero-bottom-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
  }
}

/* Left Accent Badge (WHITE) */
.left-accent-badge {
  display: inline-flex;
  align-items: center;
  border-left: 3px solid #ffffff;
  background: var(--left-glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--left-glass-border);
  border-left: 3px solid #ffffff;
  border-radius: 4px;
  padding: 8px 14px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.badge-text {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Left Headline (WHITE) */
.hero-headline {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .hero-headline {
    font-size: 3.75rem;
  }
}

@media (min-width: 1024px) {
  .hero-headline {
    font-size: 4.5rem;
  }
}

/* ==========================================================================
   Spacer (Scroll Runway)
   ========================================================================== */
.spacer-80vh {
  height: 140vh;
  width: 100%;
}

.spacer-bottom {
  height: 60vh;
  width: 100%;
}

/* ==========================================================================
   Section Two (Capability)
   ========================================================================== */
.capability-top-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 32px;
}

@media (min-width: 640px) {
  .capability-top-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-end;
  }
}

/* Right: Intro Text (BLACK - NO BOX / NO BACKGROUND) */
.capability-intro {
  max-width: 440px;
  margin-left: auto;
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
}

@media (min-width: 640px) {
  .capability-intro {
    text-align: right;
  }
}

.capability-intro-text {
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.625;
  color: #ffffff;
  text-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.75),
    0 0 12px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(0, 0, 0, 0.35);
}

@media (min-width: 640px) {
  .capability-intro-text {
    font-size: 1.1875rem;
  }
}

.capability-bottom-area {
  margin-top: auto;
  padding-top: 64px;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 48px;
}

@media (min-width: 768px) {
  .capability-bottom-area {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 64px;
  }
}

/* Left Column (WHITE) */
.capability-left-col {
  max-width: 576px;
}

.capability-body-text {
  margin-top: 24px;
  max-width: 448px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-left-white-90);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

@media (min-width: 640px) {
  .capability-body-text {
    font-size: 1.0625rem;
  }
}

.capability-cta-group {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn-primary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9999px;
  background: #ffffff;
  color: #000000;
  padding: 12px 26px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 250ms ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

@media (min-width: 640px) {
  .btn-primary-pill {
    font-size: 0.875rem;
  }
}

.btn-primary-pill:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary-pill svg {
  width: 14px;
  height: 14px;
}

.btn-secondary-pill {
  border-radius: 9999px;
  border: 1px solid var(--left-glass-border);
  background: var(--left-glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  color: #ffffff;
  padding: 12px 26px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 250ms ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

@media (min-width: 640px) {
  .btn-secondary-pill {
    font-size: 0.875rem;
  }
}

.btn-secondary-pill:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.capability-rt {
  margin-top: 18px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   Right Frosted Capability Panel (BLACK TEXT on Light Frosted Glass)
   ========================================================================== */
.capability-panel-wrapper {
  width: 100%;
  max-width: 480px;
}

.capability-panel {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--light-panel-border);
  background: var(--light-panel-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 8px 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

@media (min-width: 640px) {
  .capability-panel {
    padding: 8px 28px;
  }
}

.capability-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  cursor: default;
  transition: transform 250ms ease;
  will-change: transform, opacity;
}

.capability-row:last-child {
  border-bottom: none;
}

.capability-row:hover {
  transform: translateX(4px);
}

.row-index {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  padding-top: 2px;
}

.row-content {
  flex: 1;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.row-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-right-black);
  letter-spacing: -0.015em;
}

@media (min-width: 640px) {
  .row-title {
    font-size: 1.1875rem;
  }
}

.row-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-right-secondary);
  transition: transform 250ms ease, color 250ms ease;
}

.capability-row:hover .row-chevron {
  transform: translateX(4px);
  color: var(--accent-primary);
}

.row-body {
  margin-top: 6px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #334155;
}

/* ==========================================================================
   Mobile Responsive Optimizations (< 768px)
   ========================================================================== */
@media (max-width: 767px) {
  /* Máscara escura no fundo para contraste ideal no mobile */
  .scroll-frame-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.25) 35%,
      rgba(0, 0, 0, 0.45) 70%,
      rgba(0, 0, 0, 0.70) 100%
    );
    pointer-events: none;
    z-index: 1;
  }

  .navbar {
    top: 10px;
  }

  .nav-container {
    padding: 0 10px;
  }

  .nav-brand {
    padding: 6px 12px;
    gap: 8px;
  }

  .nav-brand svg {
    width: 18px;
    height: 18px;
  }

  .brand-text {
    font-size: 0.875rem;
  }

  .btn-consultation {
    padding: 7px 14px;
    font-size: 0.75rem;
  }

  .fixed-section {
    padding: 68px 16px 20px;
    justify-content: space-between;
  }

  /* Section 1 Mobile */
  .hero-bottom-row {
    padding-top: 16px;
    gap: 16px;
  }

  .hero-headline {
    font-size: 2.125rem;
    line-height: 1.1;
  }

  .left-accent-badge {
    padding: 6px 10px;
    margin-bottom: 12px;
  }

  .badge-text {
    font-size: 10px;
  }

  .hero-intro {
    max-width: 100%;
    text-align: left;
  }

  .hero-intro-text {
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  /* Section 2 Mobile */
  .section-two {
    justify-content: flex-end;
  }

  .capability-bottom-area {
    order: 1;
    margin-top: auto;
    padding-top: 0;
    gap: 14px;
  }

  .capability-top-row {
    order: 2;
    margin-top: 12px;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
  }

  .capability-intro {
    max-width: 100%;
    text-align: left;
    margin-left: 0;
  }

  .capability-intro-text {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .capability-body-text {
    margin-top: 10px;
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .capability-cta-group {
    margin-top: 14px;
    gap: 8px;
  }

  .btn-primary-pill,
  .btn-secondary-pill {
    padding: 9px 18px;
    font-size: 0.75rem;
    flex: 1 1 auto;
    justify-content: center;
  }

  .capability-panel {
    padding: 2px 14px;
    border-radius: 16px;
  }

  .capability-row {
    padding: 10px 0;
    gap: 12px;
  }

  .row-index {
    font-size: 10px;
  }

  .row-title {
    font-size: 0.875rem;
  }

  .row-body {
    margin-top: 3px;
    font-size: 0.75rem;
    line-height: 1.4;
  }
}

/* Extra small devices (<= 380px) */
@media (max-width: 380px) {
  .hero-headline {
    font-size: 1.875rem;
  }

  .brand-text {
    font-size: 0.8125rem;
  }

  .btn-consultation {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
}
