/* ===============================================
   RAFAEL MUNARO ARQUITETURA - STYLES
   Minimalista elegante, responsivo e premium
   =============================================== */

/* CSS CUSTOM PROPERTIES (DESIGN TOKENS) */
:root {
  /* Cores principais */
  --rm-olive: #545943;
  --rm-sage: #9BA187;
  --rm-rust: #B66C48;
  --rm-brown: #8C421E;
  
  /* Background gradiente */
  --bg-gradient: linear-gradient(180deg, #ffffff 0%, #fbfbf9 60%, #f7f7f4 100%);
  
  /* Espaçamentos */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Tipografia */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-secondary: 'Manrope', system-ui, -apple-system, sans-serif;
  
  /* Escala tipográfica responsiva */
  --text-xs: clamp(0.75rem, 0.9vw, 0.875rem);
  --text-sm: clamp(0.875rem, 1vw, 1rem);
  --text-base: clamp(1rem, 1.2vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.4vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.6vw, 1.5rem);
  --text-2xl: clamp(1.4rem, 2.2vw, 2rem);
  --text-3xl: clamp(2rem, 3vw, 3rem);
  --text-4xl: clamp(2.6rem, 4vw, 4rem);
  
  /* Raios */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(84, 89, 67, 0.08);
  --shadow-md: 0 4px 16px rgba(84, 89, 67, 0.12);
  --shadow-lg: 0 8px 32px rgba(84, 89, 67, 0.16);
  
  /* Transições */
  --transition-fast: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Breakpoints para referência */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
}

/* RESET E BASE STYLES */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-3xl);
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: #374151;
  background: var(--bg-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Melhor legibilidade */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  color: var(--rm-olive);
  margin-bottom: var(--space-md);
}

h1 { font-size: var(--text-4xl); font-weight: 800; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); font-weight: 600; }

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--rm-rust);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--rm-brown);
  outline: none;
}

/* Estados de foco visíveis */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--rm-rust);
  outline-offset: 2px;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* UTILITÁRIOS */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-xl);
  }
}

.section {
  padding: var(--space-3xl) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__title {
  position: relative;
  margin-bottom: var(--space-lg);
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--rm-rust);
  border-radius: 2px;
}

.section__subtitle {
  font-size: var(--text-lg);
  color: #6B7280;
  max-width: 600px;
  margin: 0 auto;
}

/* COMPONENTES - BOTÕES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: center;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  min-height: 44px; /* Acessibilidade touch */
}

.btn--primary {
  background: var(--rm-rust);
  color: white;
  border-color: var(--rm-rust);
}

.btn--primary:hover,
.btn--primary:focus {
  background: var(--rm-brown);
  border-color: var(--rm-brown);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--rm-olive);
  color: white;
  border-color: var(--rm-olive);
}

.btn--secondary:hover,
.btn--secondary:focus {
  background: var(--rm-sage);
  border-color: var(--rm-sage);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--rm-olive);
  border-color: var(--rm-olive);
}

.btn--outline:hover,
.btn--outline:focus {
  background: var(--rm-olive);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--full {
  width: 100%;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(84, 89, 67, 0.1);
  z-index: 1000;
  transition: all var(--transition-base);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  min-height: 70px;
}

.nav__logo {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--rm-olive);
  text-decoration: none;
}

.nav__list {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  align-items: center;
}

.nav__link {
  font-weight: 500;
  color: #374151;
  padding: var(--space-sm) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rm-rust);
  transition: width var(--transition-base);
}

.nav__link:hover::after,
.nav__link:focus::after {
  width: 100%;
}

.nav__link:hover,
.nav__link:focus {
  color: var(--rm-rust);
}

.nav__cta {
  font-size: var(--text-sm);
  padding: var(--space-sm) var(--space-lg);
}

/* Menu Mobile */
.nav__toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav__toggle span {
  width: 25px;
  height: 2px;
  background: var(--rm-olive);
  margin: 3px 0;
  transition: all var(--transition-fast);
}

.nav__close {
  display: none;
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: 2rem;
  color: var(--rm-olive);
  cursor: pointer;
}

@media (max-width: 1023px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    transition: right var(--transition-base);
    z-index: 1001;
  }
  
  .nav__menu.active {
    right: 0;
  }
  
  .nav__list {
    flex-direction: column;
    padding: var(--space-3xl) var(--space-lg) var(--space-lg);
    gap: var(--space-lg);
    align-items: stretch;
  }
  
  .nav__link {
    padding: var(--space-md) 0;
    font-size: var(--text-lg);
  }
  
  .nav__toggle {
    display: flex;
  }
  
  .nav__close {
    display: block;
  }
  
  .nav__cta {
    margin-top: var(--space-lg);
  }
}

/* HERO SECTION */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1920&h=1080&fit=crop');
  background-size: cover;
  background-position: center;
  z-index: -1;
}

.hero__content {
  text-align: center;
  color: white;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-2xl) 0;
}

.hero__title {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: white;
  margin-bottom: var(--space-lg);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero__subtitle {
  font-size: var(--text-xl);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-2xl);
  line-height: 1.4;
}

.hero__actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* PORTFOLIO SECTION */
.portfolio {
  background: rgba(249, 250, 251, 0.5);
}

.portfolio__filters {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.filter__btn {
  padding: var(--space-sm) var(--space-lg);
  background: white;
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-lg);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  transition: all var(--transition-base);
}

.filter__btn:hover,
.filter__btn:focus,
.filter__btn--active {
  background: var(--rm-olive);
  border-color: var(--rm-olive);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .portfolio__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .portfolio__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portfolio__item {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
}

.portfolio__item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.portfolio__figure {
  position: relative;
  margin: 0;
}

.portfolio__image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.portfolio__item:hover .portfolio__image {
  transform: scale(1.05);
}

.portfolio__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

.portfolio__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-xs);
}

.portfolio__category {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ABOUT SECTION */
.about__content {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 1024px) {
  .about__content {
    grid-template-columns: 1fr 400px;
  }
}

.about__description {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: #4B5563;
  margin-bottom: var(--space-xl);
}

.about__highlights {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.about__highlight {
  position: relative;
  padding: var(--space-sm) 0 var(--space-sm) var(--space-xl);
  font-weight: 500;
  color: #374151;
}

.about__highlight::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--rm-rust);
  font-weight: 700;
}

.about__social {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.social__link {
  padding: var(--space-sm) var(--space-lg);
  background: var(--rm-sage);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all var(--transition-base);
}

.social__link:hover,
.social__link:focus {
  background: var(--rm-olive);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.about__image {
  position: relative;
}

.about__photo {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* SERVICES & PROCESS SECTION */
.services {
  background: rgba(249, 250, 251, 0.5);
}

.process__steps {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .process__steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .process__steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.process__step {
  text-align: center;
  padding: var(--space-xl);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
}

.process__step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.process__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--rm-rust);
  color: white;
  font-size: var(--text-xl);
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: var(--space-lg);
}

.process__title {
  font-size: var(--text-xl);
  color: var(--rm-olive);
  margin-bottom: var(--space-md);
}

.process__description {
  color: #6B7280;
  line-height: 1.6;
}

/* AREAS SECTION */
.areas__list {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .areas__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .areas__list {
    grid-template-columns: repeat(4, 1fr);
  }
}

.area__item {
  text-align: center;
  padding: var(--space-xl);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.area__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.area__item--special {
  border: 2px solid var(--rm-sage);
  background: rgba(155, 161, 135, 0.05);
}

.area__title {
  color: var(--rm-olive);
  margin-bottom: var(--space-sm);
}

.area__description {
  color: #6B7280;
  font-size: var(--text-sm);
}

/* CONTACT SECTION */
.contact__content {
  display: grid;
  gap: var(--space-2xl);
}

@media (min-width: 1024px) {
  .contact__content {
    grid-template-columns: 1fr 1.5fr;
  }
}

.contact__info {
  display: grid;
  gap: var(--space-xl);
}

.contact__item {
  text-align: center;
}

@media (min-width: 1024px) {
  .contact__item {
    text-align: left;
  }
}

.contact__title {
  font-size: var(--text-lg);
  color: var(--rm-olive);
  margin-bottom: var(--space-sm);
}

.contact__link {
  font-size: var(--text-base);
  font-weight: 500;
  display: block;
  transition: all var(--transition-fast);
}

.contact__address {
  font-style: normal;
  color: #6B7280;
  line-height: 1.6;
}

/* FORM STYLES */
.contact__form {
  padding: var(--space-2xl);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.form__group {
  margin-bottom: var(--space-xl);
}

.form__label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  color: var(--rm-olive);
}

.form__input,
.form__textarea {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--rm-rust);
  outline: none;
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

/* FOOTER */
.footer {
  background: var(--rm-olive);
  color: white;
  padding: var(--space-3xl) 0 var(--space-lg);
}

.footer__content {
  display: grid;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer__content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer__content {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer__title {
  font-size: var(--text-xl);
  color: white;
  margin-bottom: var(--space-md);
}

.footer__subtitle {
  font-size: var(--text-lg);
  color: white;
  margin-bottom: var(--space-md);
}

.footer__description,
.footer__info {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.footer__list {
  list-style: none;
}

.footer__link {
  color: rgba(255, 255, 255, 0.8);
  display: block;
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer__link:hover,
.footer__link:focus {
  color: white;
}

.footer__social-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer__social-link {
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}

.footer__social-link:hover,
.footer__social-link:focus {
  background: var(--rm-rust);
  color: white;
  transform: translateY(-2px);
}

.footer__bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer__copyright {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
}

/* WHATSAPP FLOAT */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: #25D366;
  color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  transition: all var(--transition-base);
  text-decoration: none;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
  background: #20c157;
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(37, 211, 102, 0.4);
}

.whatsapp-float__text {
  font-size: var(--text-sm);
}

@media (max-width: 767px) {
  .whatsapp-float {
    bottom: var(--space-md);
    right: var(--space-md);
    padding: var(--space-md);
  }
  
  .whatsapp-float__text {
    display: none;
  }
  
  .whatsapp-float::before {
    content: '💬';
    font-size: 20px;
  }
}

/* ANIMAÇÕES E MICRO-INTERAÇÕES */
@media (prefers-reduced-motion: no-preference) {
  .portfolio__item,
  .process__step,
  .area__item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
  }
  
  .portfolio__item:nth-child(1) { animation-delay: 0.1s; }
  .portfolio__item:nth-child(2) { animation-delay: 0.2s; }
  .portfolio__item:nth-child(3) { animation-delay: 0.3s; }
  .portfolio__item:nth-child(4) { animation-delay: 0.4s; }
  .portfolio__item:nth-child(5) { animation-delay: 0.5s; }
  .portfolio__item:nth-child(6) { animation-delay: 0.6s; }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* RESPONSIVIDADE ADICIONAL */
@media (max-width: 480px) {
  :root {
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 48px;
  }
  
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .portfolio__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .process__steps,
  .areas__list {
    grid-template-columns: 1fr;
  }
  
  .footer__social-links {
    justify-content: center;
  }
}

/* SCROLL SUAVE E OTIMIZAÇÕES */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* IMPRESSÃO */
@media print {
  .header,
  .whatsapp-float,
  .nav__toggle,
  .nav__close {
    display: none !important;
  }
  
  .hero {
    min-height: 50vh;
    padding: var(--space-lg) 0;
  }
  
  body {
    background: white;
  }
  
  .section {
    padding: var(--space-lg) 0;
  }
}
