/* ==========================================================================
   ETIQTÊXTIL · SISTEMA DE DESIGN & LIQUID GLASS
   Design autêntico, dark navy arquitetural, liquid glass e microinterações táteis
   ========================================================================== */

:root {
  /* Fundo Azul Escuro Profundo */
  --bg-primary: #070c14;
  --bg-surface: #0c1422;
  --bg-surface-elevated: #111d30;
  --bg-surface-hover: #172740;

  /* Liquid Glass System (Translucência Refrativa Multicamadas) */
  --liquid-glass-bg: rgba(13, 22, 36, 0.62);
  --liquid-glass-border: rgba(255, 255, 255, 0.12);
  --liquid-glass-specular: rgba(255, 255, 255, 0.22);
  --liquid-glass-shadow: 
    0 20px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4);

  /* Brand Gradient Tokens (da marca EtiqTêxtil) */
  --brand-blue-deep: #006bb5;
  --brand-blue-core: #007ec5;
  --brand-cyan: #00a7e7;
  --gradient-brand: linear-gradient(135deg, #006bb5 0%, #007ec5 50%, #00a7e7 100%);
  --gradient-brand-h: linear-gradient(90deg, #006bb5 0%, #007ec5 50%, #00a7e7 100%);
  --gradient-brand-glow: 0 8px 28px -4px rgba(0, 126, 197, 0.5);

  /* Acento Vibrante e Nobre da Marca (Azul / Ciano) */
  --accent-primary: #00a7e7;
  --accent-hover: #38bdf8;
  --accent-deep: #007ec5;
  --accent-subtle: rgba(0, 167, 231, 0.12);
  --accent-border: rgba(0, 167, 231, 0.35);
  --accent-glow: 0 0 24px rgba(0, 167, 231, 0.35);

  /* Tons de Texto & Tipografia */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8493a8;
  --text-subtle: #4f6177;

  /* Bordas Naturais & Divisores */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);

  /* Status Semânticos */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  /* Tipografia Moderna sem Serifa */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Geometria */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  /* Transições Fluidas (Apple & Emil Kowalski Principles: ease-out natural) */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-fast: 150ms var(--ease-out);
  --transition-normal: 260ms var(--ease-out);
  --transition-fluid: 450ms var(--ease-out);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

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

/* Hardening para Touch & Mobile Native */
button, a, [role="button"], input, select, textarea, .tab-btn, .radio-card, .size-item-card, .finish-macro-card {
  touch-action: manipulation;
}

button, [role="button"], .tab-btn, .radio-card, .size-item-card, .finish-macro-card, .btn {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

input, textarea, select {
  font-size: 16px; /* Previne auto-zoom no iOS Safari */
}

/* Barra de Progresso de Leitura Superior (Scroll Progress) */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-brand-h);
  z-index: 9999;
  transition: width 80ms linear;
  box-shadow: 0 0 12px rgba(0, 167, 231, 0.6);
}

/* Orbs Fluidos no Fundo (Criando Refracao Organica para o Liquid Glass) */
.ambient-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.fluid-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.38;
  will-change: transform;
  animation: floatAmbient 22s ease-in-out infinite alternate;
}

.fluid-blob-1 {
  top: -10%;
  left: 15%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(0, 107, 181, 0.4), transparent 70%);
}

.fluid-blob-2 {
  top: 35%;
  right: -8%;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(0, 126, 197, 0.32), transparent 70%);
  animation-duration: 28s;
  animation-direction: alternate-reverse;
}

.fluid-blob-3 {
  bottom: 5%;
  left: -5%;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(0, 167, 231, 0.22), transparent 70%);
  animation-duration: 25s;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* Tipografia Hierárquica */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Foco Acessível */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.25rem);
  padding-right: clamp(1.25rem, 4vw, 2.25rem);
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   LIQUID GLASS & GLASSMORPHISM CORE
   ========================================================================== */
.liquid-glass {
  background: var(--liquid-glass-bg);
  backdrop-filter: blur(28px) saturate(190%) contrast(105%);
  -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(105%);
  border: 1px solid var(--liquid-glass-border);
  box-shadow: var(--liquid-glass-shadow);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

/* Reflexo Especular Líquido no Topo do Vidro */
.liquid-glass::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--liquid-glass-specular) 50%, transparent 95%);
  pointer-events: none;
}

/* Shimmer de Luz que Segue o Cursor */
.liquid-card {
  --mouse-x: 50%;
  --mouse-y: 50%;
}

.liquid-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 350px at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 80%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.liquid-card:hover::after {
  opacity: 1;
}

/* ==========================================================================
   ANIMAÇÕES VIBRANTES NOS BOTÕES (Apple & Emil Kowalski Principles)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.45rem;
  font-weight: 600;
  font-size: 0.925rem;
  letter-spacing: -0.01em;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 120ms var(--ease-out), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

/* Efeito de Press Feedback Instantâneo */
.btn:active {
  transform: scale(0.965);
}

/* Botão Primário com Gradiente da Marca & Efeito Shimmer Líquido */
.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 20px -2px rgba(0, 126, 197, 0.52), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: rotate(25deg);
  transition: transform 650ms var(--ease-out);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #007ec5 0%, #009be3 50%, #00b4f5 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 167, 231, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.btn-primary:hover::after {
  transform: translateX(380%) rotate(25deg);
}

/* Botão Secundário / Contorno com Vidro Líquido */
.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  color: #ffffff;
}

/* Botão WhatsApp com Pulso Tátil */
.btn-whatsapp {
  background: #1eb854;
  color: #ffffff;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(30, 184, 84, 0.3);
}

.btn-whatsapp:hover {
  background: #1aa34a;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(30, 184, 84, 0.45);
}

/* ==========================================================================
   SCROLLTRIGGER ENGINE & ANIMAÇÕES VARIADAS DE SCROLL
   ========================================================================== */

/* 1. Fade Up Suave com Desfoque Inicial */
[data-scroll="fade-up"] {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  will-change: opacity, transform, filter;
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out), filter 600ms var(--ease-out);
}

[data-scroll="fade-up"].is-inview {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* 2. Slide Lateral da Esquerda */
[data-scroll="slide-right"] {
  opacity: 0;
  transform: translateX(-35px);
  filter: blur(4px);
  will-change: opacity, transform, filter;
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out), filter 650ms var(--ease-out);
}

[data-scroll="slide-right"].is-inview {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

/* 3. Slide Lateral da Direita */
[data-scroll="slide-left"] {
  opacity: 0;
  transform: translateX(35px);
  filter: blur(4px);
  will-change: opacity, transform, filter;
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out), filter 650ms var(--ease-out);
}

[data-scroll="slide-left"].is-inview {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

/* 4. Zoom Escalar Sutil (Scale-Up) */
[data-scroll="scale-up"] {
  opacity: 0;
  transform: scale(0.93);
  will-change: opacity, transform;
  transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out);
}

[data-scroll="scale-up"].is-inview {
  opacity: 1;
  transform: scale(1);
}

/* 5. Cascata Stagger em Grupos de Cards */
.scroll-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  will-change: opacity, transform, filter;
  transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out), filter 550ms var(--ease-out);
}

.scroll-stagger.is-inview > *:nth-child(1) { transition-delay: 40ms; opacity: 1; transform: translateY(0); filter: blur(0); }
.scroll-stagger.is-inview > *:nth-child(2) { transition-delay: 110ms; opacity: 1; transform: translateY(0); filter: blur(0); }
.scroll-stagger.is-inview > *:nth-child(3) { transition-delay: 180ms; opacity: 1; transform: translateY(0); filter: blur(0); }
.scroll-stagger.is-inview > *:nth-child(4) { transition-delay: 250ms; opacity: 1; transform: translateY(0); filter: blur(0); }
.scroll-stagger.is-inview > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: translateY(0); filter: blur(0); }
.scroll-stagger.is-inview > *:nth-child(6) { transition-delay: 390ms; opacity: 1; transform: translateY(0); filter: blur(0); }

/* Acessibilidade para Redução de Movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fluid-blob { display: none; }
  [data-scroll] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .scroll-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
