/* =====================================================
   REBESCHINI AMBIENTES PLANEJADOS - DESIGN SYSTEM 2.0
   Sistema de Design Moderno e Elegante
   ===================================================== */

/* =====================================================
   1. CSS VARIABLES (Design Tokens)
   ===================================================== */
:root {
  /* Cores Principais */
  --color-primary: #1E1E1E;           /* Preto elegante */
  --color-secondary: #C49A6C;         /* Dourado amadeirado */
  --color-accent: #007B55;            /* Verde ação */
  --color-accent-hover: #005A3F;      /* Verde escuro */
  
  /* Cores Neutras */
  --color-white: #FFFFFF;
  --color-off-white: #F9F9F9;
  --color-light-gray: #EDEDED;
  --color-gray: #9E9E9E;
  --color-dark-gray: #4A4A4A;
  --color-black: #1C1C1C;
  
  /* Cores de Estado */
  --color-success: #2E7D32;
  --color-error: #D32F2F;
  --color-warning: #F57C00;
  --color-info: #1976D2;
  
  /* Tipografia */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Pesos de Fonte */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  
  /* Tamanhos de Fonte (Escala Tipográfica) */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */
  --font-size-6xl: 3.75rem;     /* 60px */
  --font-size-7xl: 4.5rem;      /* 72px */
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --line-height-loose: 2;
  
  /* Espaçamentos (8px Grid System) */
  --space-1: 0.5rem;    /* 8px */
  --space-2: 1rem;      /* 16px */
  --space-3: 1.5rem;    /* 24px */
  --space-4: 2rem;      /* 32px */
  --space-5: 2.5rem;    /* 40px */
  --space-6: 3rem;      /* 48px */
  --space-7: 3.5rem;    /* 56px */
  --space-8: 4rem;      /* 64px */
  --space-10: 5rem;     /* 80px */
  --space-12: 6rem;     /* 96px */
  --space-16: 8rem;     /* 128px */
  --space-20: 10rem;    /* 160px */
  
  /* Border Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-3xl: 2rem;     /* 32px */
  --radius-full: 9999px;  /* Circular */
  
  /* Sombras */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  
  /* Transições */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Larguras Máximas */
  --max-width-xs: 20rem;      /* 320px */
  --max-width-sm: 24rem;      /* 384px */
  --max-width-md: 28rem;      /* 448px */
  --max-width-lg: 32rem;      /* 512px */
  --max-width-xl: 36rem;      /* 576px */
  --max-width-2xl: 42rem;     /* 672px */
  --max-width-3xl: 48rem;     /* 768px */
  --max-width-4xl: 56rem;     /* 896px */
  --max-width-5xl: 64rem;     /* 1024px */
  --max-width-6xl: 72rem;     /* 1152px */
  --max-width-7xl: 80rem;     /* 1280px */
  --max-width-screen: 90rem;  /* 1440px */
  
  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* =====================================================
   2. RESET & BASE STYLES
   ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-black);
  background-color: var(--color-white);
  overflow-x: hidden;
}

/* =====================================================
   3. TIPOGRAFIA
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

h1 { font-size: clamp(2.5rem, 5vw, var(--font-size-6xl)); }
h2 { font-size: clamp(2rem, 4vw, var(--font-size-5xl)); }
h3 { font-size: clamp(1.75rem, 3.5vw, var(--font-size-4xl)); }
h4 { font-size: clamp(1.5rem, 3vw, var(--font-size-3xl)); }
h5 { font-size: var(--font-size-2xl); }
h6 { font-size: var(--font-size-xl); }

p {
  margin-bottom: var(--space-3);
  line-height: var(--line-height-relaxed);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

/* =====================================================
   4. LAYOUT & CONTAINERS
   ===================================================== */
.container {
  width: 100%;
  max-width: var(--max-width-screen);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
}

.container-narrow {
  max-width: var(--max-width-4xl);
}

.container-reading {
  max-width: var(--max-width-3xl);
}

/* =====================================================
   5. HEADER & NAVIGATION (Global)
   ===================================================== */
.site-header {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: all var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

/* Top Bar (Nível 1) */
.top-bar {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-1) 0;
  font-size: var(--font-size-sm);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  list-style: none;
}

.top-bar-links a {
  color: var(--color-white);
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-fast);
}

.top-bar-links a:hover {
  color: var(--color-secondary);
}

/* Main Navigation (Nível 2) */
.main-nav {
  padding: var(--space-3) 0;
}

.main-nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 60px;
  width: auto;
  transition: transform var(--transition-base);
}

.logo-img:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  align-items: center;
}

.nav-link {
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--color-secondary);
  transition: transform var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-link:hover {
  color: var(--color-secondary);
}

/* Mobile Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.hamburger-bar {
  width: 25px;
  height: 3px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.hamburger.active .hamburger-bar:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 991px) {
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--color-white);
    flex-direction: column;
    padding: var(--space-8) var(--space-4);
    box-shadow: var(--shadow-2xl);
    transition: right var(--transition-slow);
    overflow-y: auto;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .top-bar {
    display: none;
  }
}

/* =====================================================
   6. BOTÕES (Sistema Completo)
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  user-select: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Secondary Button */
.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background: #B08958;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--color-primary);
}

.btn-ghost:hover {
  background: var(--color-off-white);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-lg);
}

.btn-xl {
  padding: var(--space-5) var(--space-8);
  font-size: var(--font-size-xl);
}

/* =====================================================
   7. CARDS
   ===================================================== */
.card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-2);
}

.card-body {
  color: var(--color-dark-gray);
  line-height: var(--line-height-relaxed);
}

/* =====================================================
   8. GRIDS
   ===================================================== */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   9. SECTIONS
   ===================================================== */
.section {
  padding: var(--space-12) 0;
}

.section-sm {
  padding: var(--space-8) 0;
}

.section-lg {
  padding: var(--space-16) 0;
}

.section-title {
  font-size: clamp(2rem, 4vw, var(--font-size-5xl));
  text-align: center;
  margin-bottom: var(--space-2);
  color: var(--color-primary);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  text-align: center;
  color: var(--color-gray);
  max-width: var(--max-width-3xl);
  margin: 0 auto var(--space-8);
  line-height: var(--line-height-relaxed);
}

/* =====================================================
   10. HERO SECTIONS
   ===================================================== */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, #2C2C2C 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/hero-kitchen.jpg') center/cover no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  text-align: center;
  max-width: var(--max-width-4xl);
  margin: 0 auto;
  padding: var(--space-10) var(--space-4);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, var(--font-size-7xl));
  color: var(--color-white);
  margin-bottom: var(--space-4);
  line-height: var(--line-height-tight);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, var(--font-size-2xl));
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-6);
  line-height: var(--line-height-relaxed);
}

.hero-cta {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* =====================================================
   11. FORMS
   ===================================================== */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  border: 2px solid var(--color-light-gray);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  color: var(--color-black);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 123, 85, 0.1);
}

.form-input.error {
  border-color: var(--color-error);
}

.form-error {
  color: var(--color-error);
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
  display: none;
}

.form-error.show {
  display: block;
}

/* =====================================================
   12. FOOTER (Global)
   ===================================================== */
.site-footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-10) 0 var(--space-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-column h4 {
  color: var(--color-secondary);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-3);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-4);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-sm);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-4);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: var(--color-white);
  transition: all var(--transition-base);
}

.social-link:hover {
  background: var(--color-secondary);
  transform: translateY(-3px);
}

/* =====================================================
   13. UTILITIES
   ===================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.highlight {
  color: var(--color-secondary);
  font-weight: var(--font-weight-bold);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  background: var(--color-secondary);
  color: var(--color-white);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
}

/* =====================================================
   14. ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

.animate-slideIn {
  animation: slideInRight 0.8s ease-out;
}

/* =====================================================
   15. LOADING STATES
   ===================================================== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =====================================================
   16. RESPONSIVIDADE
   ===================================================== */
@media (max-width: 1200px) {
  .container {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-8) 0;
  }
  
  .hero {
    min-height: 500px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .section {
    padding: var(--space-6) 0;
  }
  
  .hero {
    min-height: 450px;
  }
}

/* =====================================================
   17. DARK MODE (Preparação)
   ===================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #FFFFFF;
    --color-white: #1E1E1E;
    --color-off-white: #2C2C2C;
    --color-black: #FFFFFF;
  }
  
  /* Descomente quando quiser ativar dark mode automático */
  /* body {
    background: #1E1E1E;
    color: #FFFFFF;
  } */
}

/* =====================================================
   18. PRINT STYLES
   ===================================================== */
@media print {
  .site-header,
  .site-footer,
  .btn,
  .hamburger {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
}

