:root {
  --primary: #bd8062;
  --surface: #faf9f6;
  --on-surface: #1a1a1b;
  --surface-alt: #f0eee6;
  --font-headline: 'Libre Caslon Text', serif;
  --font-body: 'Inter', sans-serif;
  --transition-weighted: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  transition: background-color 0.8s ease;
  overflow-x: hidden;
}

/* ==========================================================================
   ESTILOS DE SEÇÃO GERAIS
   ========================================================================== */
section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

/* ==========================================================================
   HEADER FIXO & NAVEGAÇÃO
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  z-index: 1000;
  background-color: var(--surface);
  transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.site-header.scrolled {
  background-color: var(--surface);
  padding: 1rem 4rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-header .logo, 
.site-header .nav-links a, 
.site-header .btn-cta {
  color: var(--on-surface);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
  position: relative;
}

.site-header .nav-links a:hover,
.site-header .btn-cta:hover,
.site-header .logo:hover {
  color: var(--primary);
}

.site-header .nav-links a.active {
  color: #7a462d !important;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--on-surface);
  border-radius: 2px;
  transition: transform 0.3s var(--transition-weighted), opacity 0.3s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* MENU MOBILE POPUP/DRAWER */
@media (max-width: 900px) {
  .site-header {
    padding: 1.2rem 1.5rem;
  }
  .site-header.scrolled {
    padding: 0.9rem 1.5rem;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--surface);
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    padding: 6rem 2rem 2rem 2rem;
    transition: right 0.4s var(--transition-weighted);
    z-index: 1050;
    display: flex;
    flex-direction: column;
  }
  .nav-menu.is-open {
    right: 0;
  }
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.8rem;
    width: 100%;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    width: 100%;
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  width: 100%;
}

.hero-logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo {
  max-width: 700px;
  width: 100%;
  height: auto;
  display: block;
}

.sub-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
  display: block;
}

/* ==========================================================================
   PORTFOLIO SECTION
   ========================================================================== */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  background-color: var(--surface-alt);
  transition: transform 0.4s var(--transition-weighted);
  width: 100%;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-6px);
}

.image-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--transition-weighted);
}

.project-card:hover .image-wrapper img {
  transform: scale(1.03);
}

.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(26, 26, 27, 0.85), transparent);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.project-card:hover .project-info {
  opacity: 1;
  transform: translateY(0);
}

.project-info h3 {
  font-family: var(--font-headline);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
}

.project-info span {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.project-card.empty-slot {
  background-color: var(--surface-alt);
  pointer-events: none;
  opacity: 0.25;
}

.btn-solid {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
}

.btn-solid.btn-secondary {
  background-color: transparent;
  color: var(--on-surface);
  border: 1px solid var(--on-surface);
}

.btn-solid.btn-secondary:hover {
  background-color: var(--on-surface);
  color: var(--surface);
}

@media (min-width: 901px) {
  .portfolio-section {
    min-height: 100vh;
    padding: 6rem 4rem 3rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .section-header h2 {
    font-family: var(--font-headline);
    font-size: clamp(1.8rem, 2.2vw, 2.5rem);
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: clamp(140px, 20vh, 220px); 
    gap: 1.25rem;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
  }

  .project-card.slot-1 { grid-column: span 7; grid-row: span 2; }
  .project-card.slot-2 { grid-column: span 5; grid-row: span 2; }
  .project-card.slot-3 { grid-column: span 4; grid-row: span 1; }
  .project-card.slot-4 { grid-column: span 4; grid-row: span 1; }
  .project-card.slot-5 { grid-column: span 4; grid-row: span 1; }

  .carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
  }
}

@media (max-width: 900px) {
  .portfolio-section {
    min-height: auto;
    padding: 5rem 1.5rem 3rem 1.5rem;
  }

  .section-header h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
  }

  .project-card {
    width: 100%;
    height: 280px;
  }

  .project-card.empty-slot {
    display: none;
  }

  .carousel-controls {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.8rem;
    margin-top: 1.5rem;
  }

  .carousel-controls .btn-solid {
    width: 100%;
  }

  .project-info {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   SEÇÃO O ESTÚDIO
   ========================================================================== */
.studio-section {
  padding: 5rem 4rem; 
  background-color: var(--surface-alt);
}

.studio-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem; 
  align-items: center;
}

.studio-text-content h2 {
  font-family: var(--font-headline);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 0.5rem 0 1rem 0; 
}

.studio-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 1.5rem; 
}

.studio-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem; 
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 1.5rem; 
}

.pillar h4 {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.pillar p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.studio-image-wrapper {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
}

.studio-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .studio-section {
    padding: 4rem 1.5rem;
  }
  .studio-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .studio-pillars {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .studio-image-wrapper {
    aspect-ratio: 16/10;
  }
}

/* ==========================================================================
   SEÇÃO CONTATO
   ========================================================================== */
.contact-section {
  padding: 6rem 4rem;
  background-color: var(--surface);
  border-top: 1px solid var(--surface-alt);
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.contact-header h2 {
  font-family: var(--font-headline);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  margin: 0.5rem 0 1rem 0;
}

.contact-header p {
  color: #666;
  font-size: 1.05rem;
  line-height: 1.6;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.consultation-process h3,
.channels-info h3 {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.process-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.process-list li {
  display: flex;
  gap: 1.5rem;
}

.step-number {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
}

.process-list h4 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.process-list p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
}

.contact-channels-box {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-channel {
  display: block;
  padding: 1rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.btn-channel.whatsapp {
  background-color: #25d366;
  color: white;
}

.btn-channel.instagram {
  background-color: #e1306c;
  color: white;
}

.secondary-cta-card {
  background-color: var(--surface-alt);
  padding: 2rem;
  border-radius: 6px;
}

.secondary-cta-card h4 {
  font-family: var(--font-headline);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.secondary-cta-card p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.secondary-cta-card .btn-solid {
  background-color: var(--on-surface);
  color: white;
}

@media (max-width: 900px) {
  .contact-section {
    padding: 4rem 1.5rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ==========================================================================
   SEÇÃO SOBRE
   ========================================================================== */
.about-section {
  padding: 6rem 4rem;
  background-color: var(--surface-alt);
}

.about-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.architect-img {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.architect-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.about-text-content h2 {
  font-family: var(--font-headline);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 400;
  margin: 0.5rem 0 1.5rem 0;
}

.about-text-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: #555;
}

@media (max-width: 900px) {
  .about-section {
    padding: 4rem 1.5rem;
  }
  .about-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .architect-img.right {
    display: none;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--on-surface);
  color: #fff;
  padding: 5rem 4rem 2rem 4rem;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-logo {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  display: block;
  margin-bottom: 1rem;
}

.footer-col h4 {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  color: var(--primary);
}

.footer-col p {
  color: #aaa;
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-social-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-social-links a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-social-links a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
}

.dev-whatsapp-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 3rem 1.5rem 1.5rem 1.5rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}