/**
 * Design System - Bolos di Sofi
 * Tokens, variáveis e componentes base
 */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* ============================================
   VARIÁVEIS CSS - PALETA DE CORES
   ============================================ */
:root {
  /* Cores Primárias - Fundos */
  --color-cream: #FFF8F1;
  --color-cream-dark: #F5EDE4;
  --color-rose-soft: #F7D9E3;
  --color-rose-medium: #E8B4C4;
  --color-rose-light: #FDF1F4;
  
  /* Cores de Marca - Textos e Destaques */
  --color-chocolate: #5B3A29;
  --color-chocolate-light: #7A5543;
  --color-chocolate-dark: #3D261B;
  --color-gold: #C8A46B;
  --color-gold-soft: #D4BC94;
  --color-gold-dark: #A0824F;
  
  /* Cores Funcionais */
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #128C7E;
  --color-white: #FFFFFF;
  --color-black: #1A1A1A;
  
  /* Cores de Estado */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;
  
  /* Sombras */
  --color-shadow: rgba(91, 58, 41, 0.08);
  --color-shadow-medium: rgba(91, 58, 41, 0.12);
  --color-shadow-strong: rgba(91, 58, 41, 0.15);
  --color-shadow-gold: rgba(200, 164, 107, 0.3);
  
  /* Gradientes */
  --gradient-hero: linear-gradient(
    180deg,
    rgba(91, 58, 41, 0.3) 0%,
    rgba(91, 58, 41, 0.5) 50%,
    rgba(91, 58, 41, 0.7) 100%
  );
  
  --gradient-card: linear-gradient(
    180deg,
    transparent 0%,
    rgba(91, 58, 41, 0.02) 100%
  );

  /* ============================================
     TIPOGRAFIA
     ============================================ */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Escala Mobile First (360px base) */
  --text-hero: 2rem;        /* 32px */
  --text-h1: 1.75rem;       /* 28px */
  --text-h2: 1.375rem;      /* 22px */
  --text-h3: 1.125rem;      /* 18px */
  --text-body: 1rem;        /* 16px */
  --text-small: 0.875rem;    /* 14px */
  --text-xs: 0.75rem;        /* 12px */
  
  /* Pesos */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  
  /* Altura de linha */
  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* ============================================
     ESPAÇAMENTOS
     ============================================ */
  --space-xs: 0.5rem;       /* 8px */
  --space-sm: 0.75rem;      /* 12px */
  --space-md: 1rem;         /* 16px */
  --space-lg: 1.5rem;       /* 24px */
  --space-xl: 2rem;         /* 32px */
  --space-2xl: 3rem;        /* 48px */
  --space-3xl: 4rem;        /* 64px */
  --space-4xl: 6rem;        /* 96px */

  /* ============================================
     BORDAS E RADIUS
     ============================================ */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Bordas decorativas */
  --border-gold: 1px solid rgba(200, 164, 107, 0.3);
  --border-chocolate: 1px solid rgba(91, 58, 41, 0.2);

  /* ============================================
     SOMBRAS DE COMPONENTES
     ============================================ */
  --shadow-sm: 0 2px 8px var(--color-shadow);
  --shadow-md: 0 4px 16px var(--color-shadow-medium);
  --shadow-lg: 0 8px 32px var(--color-shadow-strong);
  --shadow-gold: 0 4px 20px var(--color-shadow-gold);
  --shadow-whatsapp: 0 4px 20px rgba(37, 211, 102, 0.3);

  /* ============================================
     ANIMAÇÕES
     ============================================ */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ============================================
     BREAKPOINTS (referência)
     ============================================ */
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
}

/* ============================================
   TIPOGRAFIA BASE
   ============================================ */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-chocolate);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--color-chocolate);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

/* ============================================
   COMPONENTES BASE
   ============================================ */

/* Container padrão */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-primary {
  background: var(--color-chocolate);
  color: var(--color-cream);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--color-chocolate-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-whatsapp);
}

.btn-whatsapp:hover {
  background: var(--color-whatsapp-dark);
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-chocolate);
  color: var(--color-chocolate);
  padding: calc(var(--space-md) - 2px) var(--space-lg);
  border-radius: var(--radius-md);
}

.btn-outline:hover {
  background: var(--color-rose-light);
}

.btn-large {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-body);
}

/* Cards */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: var(--border-gold);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Section Header (padrão para todas as seções) */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-h1);
  color: var(--color-chocolate);
  margin-bottom: var(--space-sm);
  line-height: var(--leading-tight);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-chocolate-light);
  max-width: 500px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* CTA de seção */
.section-cta {
  text-align: center;
  margin-top: var(--space-xl);
}

/* ============================================
   UTILITÁRIOS DE TEXTO
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-chocolate { color: var(--color-chocolate); }
.text-chocolate-light { color: var(--color-chocolate-light); }
.text-gold { color: var(--color-gold); }
.text-white { color: var(--color-white); }

.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }

.text-hero { font-size: var(--text-hero); }
.text-h1 { font-size: var(--text-h1); }
.text-h2 { font-size: var(--text-h2); }
.text-h3 { font-size: var(--text-h3); }
.text-body { font-size: var(--text-body); }
.text-small { font-size: var(--text-small); }
.text-xs { font-size: var(--text-xs); }

.weight-regular { font-weight: var(--weight-regular); }
.weight-medium { font-weight: var(--weight-medium); }
.weight-semibold { font-weight: var(--weight-semibold); }
.weight-bold { font-weight: var(--weight-bold); }

/* ============================================
   RESPONSIVIDADE TIPOGRAFIA
   ============================================ */
@media (min-width: 768px) {
  :root {
    --text-hero: 2.5rem;      /* 40px */
    --text-h1: 2rem;          /* 32px */
    --text-h2: 1.5rem;        /* 24px */
    --text-h3: 1.25rem;       /* 20px */
  }
}

@media (min-width: 1024px) {
  :root {
    --text-hero: 3rem;         /* 48px */
    --text-h1: 2.5rem;        /* 40px */
    --text-h2: 1.75rem;       /* 28px */
  }
}

/* ============================================
   ACESSIBILIDADE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-chocolate);
  color: var(--color-white);
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
