/* =====================================================
   WEBTOWN PREMIUM LANDING PAGE (Apple Style)
===================================================== */

:root {
  /* CORES BASE */
  --color-black: #1d1d1f;
  --color-white: #FFFFFF;
  --color-gray-100: #F5F5F7;
  --color-gray-300: #D2D2D7;
  --color-gray-600: #86868b;

  /* DESTAQUE */
  --color-primary: #0071E3;
  --color-primary-hover: #0077ED;
  --color-primary-soft: rgba(0, 113, 227, 0.12);

  /* TIPOGRAFIA */
  --font-primary: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-secondary: "Inter", sans-serif;

  --text-hero: 64px;
  --text-section-title: 48px;
  --text-subtitle: 24px;
  --text-body: 17px;
  --text-small: 14px;

  /* ESPAÇAMENTO */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 96px;

  /* BORDAS */
  --radius-sm: 18px;
  --radius-pill: 999px;

  /* SOMBRA */
  --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.06);

  /* TRANSIÇÕES */
  --transition-smooth: all 0.3s ease;
  --transition-cinematic: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* RESET E BASE GLOBAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-body);
  line-height: 1;
  color: var(--color-black);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

/* TIPOGRAFIA */
h1 {
  font-size: var(--text-hero);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

h2 {
  font-size: var(--text-section-title);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.subtitle {
  font-size: var(--text-subtitle);
  color: var(--color-gray-600);
  letter-spacing: 0.008em;
  line-height: 1.33333;
}

.small-text {
  font-size: var(--text-small);
  color: var(--color-gray-600);
}

/* NAVEGAÇÃO / HEADER */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 999;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 21px;
  font-weight: 600;
  color: var(--color-black);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: var(--color-black);
  opacity: 0.8;
  font-weight: 400;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 1;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
  position: relative;
  /* overflow: hidden removido — permite o efeito translateY nos cards */
}

.section-light {
  background: var(--color-gray-100);
}

/* DARK SECTIONS & PARALLAX BACKGROUNDS */
.bg-dark {
  color: var(--color-white);
}

.bg-dark .subtitle,
.bg-dark .small-text {
  color: rgba(255, 255, 255, 0.7);
}

.hero-bg {
  background-size: cover;
  background-position: center 50%;
  background-color: #05071a;
  will-change: background-position;
  overflow: hidden;
  /* necessário para clip do bg com parallax */
}

.cta-bg {
  background-size: cover;
  background-position: center 50%;
  background-color: #05071a;
  will-change: background-position;
  overflow: hidden;
  /* necessário para clip do bg com parallax */
}

/* Overlay for better text readability */
.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 10, 40, 0.3);
  z-index: 1;
}

.bg-dark .container {
  position: relative;
  z-index: 2;
}

/* BOTÕES */
.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.4);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.bg-dark .btn-secondary {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  background: var(--color-primary-soft);
}

.bg-dark .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
}

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius-sm);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.07);
  position: relative;
  /* necessário para z-index acima do ::before da section */
  transition: all 0.3s ease;
}

.card:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(0, 113, 227, 0.3);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 56px rgba(0, 113, 227, 0.18);
}

.card h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

/* ── EFEITO HOVER UNIFICADO (padrão channel-item) ── */
/* Aplicado a todos os cards das páginas index e contato */
.card,
.portfolio-card,
.number-item,
.channel-item {
  /* garante que qualquer card tenha a transição correta */
  transition: background 0.3s ease, border-color 0.3s ease,
    transform 0.3s ease, box-shadow 0.3s ease;
}

.number-item {
  padding: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.number-item:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(0, 113, 227, 0.3);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 56px rgba(0, 113, 227, 0.18);
}

/* PORTFÓLIO */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.portfolio-card {
  display: block;
  background: var(--color-gray-100);
  border-radius: var(--radius-sm);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-black);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(0, 0, 0, 0.07);
  position: relative;
  /* necessário para z-index correto */
  transition: all 0.3s ease;
}

.portfolio-card:hover {
  border-color: rgba(0, 113, 227, 0.3);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 56px rgba(0, 113, 227, 0.18);
}

/* BROWSER MOCKUP SCROLLING EFFECT */
.browser-mockup {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.browser-header {
  height: 24px;
  background: #e5e5ea;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
}

.browser-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.browser-header .dot.red {
  background: #ff5f56;
}

.browser-header .dot.yellow {
  background: #ffbd2e;
}

.browser-header .dot.green {
  background: #27c93f;
}

.browser-viewport {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: top center;
  transition: background-position 4s ease-in-out;
}

.portfolio-card:hover .browser-viewport {
  background-position: bottom center;
}

.portfolio-content {
  padding: 24px;
  background: var(--color-white);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.portfolio-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* NUMBERS */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  margin-top: 64px;
}

.number-item h3 {
  font-size: 56px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

/* LINKS */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* SCROLL CINEMATOGRÁFICO & TEXT REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: var(--transition-cinematic);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.text-reveal-wrapper {
  overflow: hidden;
  display: inline-block;
  vertical-align: top;
}

.text-reveal-item {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease-out;
}

.text-reveal-item.active {
  transform: translateY(0);
  opacity: 1;
}

/* RESPONSIVIDADE */
@media (max-width: 1024px) {
  h1 {
    font-size: 56px;
  }

  h2 {
    font-size: 40px;
  }

  .section {
    padding: 80px 0;
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: 40px;
    line-height: 1.1;
  }

  h2 {
    font-size: 32px;
  }

  .subtitle {
    font-size: 19px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
    margin-bottom: 12px;
  }

  .section {
    padding: 64px 0;
  }

  .nav-links {
    display: none;
  }

  /* NUMBERS GRID SINGLE LINE RESPONSIVE */
  .numbers-grid {
    gap: 8px;
  }

  .number-item h3 {
    font-size: 28px;
  }

  .number-item .small-text {
    font-size: 11px;
    line-height: 1.3;
  }

  /* PORTFOLIO GRID RESPONSIVE */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}