/* ==========================================================================
   BARBER AI OS - Ethereal Glass Design System
   ========================================================================== */

/* IMPORT PREMIUM FONTS */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&display=swap');

/* =========================================
   1. CSS VARIABLES (DESIGN TOKENS)
   ========================================= */
:root {
  /* Colors - Deep OLED Blacks & subtle glass */
  --bg-pure: #050505;
  --bg-shell: rgba(255, 255, 255, 0.03);
  --bg-core: rgba(255, 255, 255, 0.02);
  --bg-blur: rgba(5, 5, 5, 0.6);
  
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.4);
  
  --accent-gold: #D4AF37;
  --accent-emerald: #10B981;
  --accent-glow: rgba(212, 175, 55, 0.15);
  
  /* Hairlines & Borders */
  --border-shell: rgba(255, 255, 255, 0.08);
  --border-core: rgba(255, 255, 255, 0.04);
  --border-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.15);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Radii for Double-Bezel Architecture */
  --radius-shell: 2rem;
  --radius-core: calc(2rem - 0.375rem);
  --radius-pill: 9999px;

  /* Spacing / Macro-Whitespace */
  --section-py: 160px; /* Massive whitespace */
  --gap-lg: 2rem;
  --gap-md: 1.5rem;

  /* Transitions */
  --transition-fluid: all 700ms cubic-bezier(0.32, 0.72, 0, 1);
  --transition-fast: all 300ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* =========================================
   2. RESET & BASE
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* Radial Gradient Mesh Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* Subtle Film Grain Noise (Fixed position, pointer events none) */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)'/%3E%3C/svg%3E");
  opacity: 0.03;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* =========================================
   3. TYPOGRAPHY
   ========================================= */
.text-colossal {
  font-size: clamp(3rem, 6vw + 1rem, 6.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
}

h2 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.text-body-lg {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 400;
}

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

.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  background: var(--bg-shell);
  border: 1px solid var(--border-shell);
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
}

/* =========================================
   4. LAYOUT & CONTAINERS
   ========================================= */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-spacing {
  padding: var(--section-py) 0;
}

/* =========================================
   5. COMPONENTS
   ========================================= */

/* Double-Bezel Card Architecture */
.double-bezel-shell {
  background: var(--bg-shell);
  border: 1px solid var(--border-shell);
  padding: 0.5rem;
  border-radius: var(--radius-shell);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.double-bezel-core {
  background: var(--bg-core);
  border: 1px solid var(--border-core);
  border-radius: var(--radius-core);
  padding: 2.5rem;
  box-shadow: var(--border-highlight);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Button-in-Button (CTA) */
.btn-magnetic-group {
  display: inline-flex;
  align-items: center;
  background: var(--text-primary);
  color: var(--bg-pure);
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-fluid);
  cursor: pointer;
  border: none;
  outline: none;
  gap: 1rem;
}

.btn-magnetic-group:active {
  transform: scale(0.98);
}

.btn-magnetic-group .btn-inner-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-pill);
  background: rgba(5, 5, 5, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fluid);
}

.btn-magnetic-group:hover .btn-inner-icon {
  transform: translateX(2px) scale(1.05);
  background: rgba(5, 5, 5, 0.15);
}

/* Fluid Island Nav */
.fluid-nav-wrapper {
  position: fixed;
  top: 1.5rem;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 1.5rem;
}

.fluid-nav-pill {
  background: var(--bg-blur);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-shell);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.nav-brand {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Hamburger Menu styles */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* Asymmetrical Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap-lg);
}

.bento-col-8 {
  grid-column: span 8;
}

.bento-col-4 {
  grid-column: span 4;
}

.bento-col-6 {
  grid-column: span 6;
}

.bento-row-2 {
  grid-row: span 2;
}

/* Icon Wrappers */
.icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: var(--bg-shell);
  border: 1px solid var(--border-shell);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

/* =========================================
   6. SCROLL ANIMATIONS (INTERSECTION OBSERVER)
   ========================================= */
.reveal-up {
  opacity: 0;
  transform: translateY(4rem);
  filter: blur(8px);
  transition: opacity 1s cubic-bezier(0.32, 0.72, 0, 1), 
              transform 1s cubic-bezier(0.32, 0.72, 0, 1),
              filter 1s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform, opacity, filter;
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* =========================================
   7. RESPONSIVE FALLBACKS
   ========================================= */
@media (max-width: 768px) {
  .section-spacing {
    padding: 80px 0;
  }
  
  .bento-grid {
    grid-template-columns: 1fr;
    gap: var(--gap-md);
  }
  
  .bento-col-8, .bento-col-4, .bento-col-6 {
    grid-column: span 1;
  }
  
  .bento-row-2 {
    grid-row: span 1;
  }
  
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .double-bezel-core {
    padding: 1.5rem;
  }
}


/* ==========================================================================
   Menu do celular
   Antes o botao existia mas so disparava um alert de "implementacao
   pendente". Estas regras dao a ele um menu de verdade.
   ========================================================================== */

@media (max-width: 768px) {
  .nav-links {
    /* O bloco de cima ja tinha "display: none" para .nav-links no celular.
       Sem redefinir AQUI, opacity e visibility nao adiantam nada: elemento
       com display:none nao aparece de jeito nenhum. Era por isso que tocar
       no menu nao fazia nada. */
    display: flex;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem;
    border-radius: 18px;
    background: rgba(12, 12, 14, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-shell);
    /* Fechado: invisivel E fora do alcance do toque e do leitor de tela.
       Só opacity deixaria links invisiveis ainda clicaveis. */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .nav-links.aberto {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
  }

  .nav-links a:active { background: rgba(255, 255, 255, 0.06); }

  .fluid-nav-pill { position: relative; }

  /* O X quando aberto */
  .hamburger.ativo .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .hamburger.ativo .hamburger-line:nth-child(2) { opacity: 0; }
  .hamburger.ativo .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .hamburger-line { transition: transform 0.2s ease, opacity 0.2s ease; }
}
