/* ==========================================================================
   ESTILOS OFICIAIS — SOLUÇÕES CRIATIVAS | MS MORAES SARMENTO
   Fontes oficiais locais da pasta 'fontes' (Metropolis)
   ========================================================================== */

@font-face {
  font-family: "Metropolis";
  src: url("../fontes/METROPOLIS-REGULAR.OTF") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Metropolis";
  src: url("../fontes/METROPOLIS-MEDIUM.OTF") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Metropolis";
  src: url("../fontes/METROPOLIS.BOLD.OTF") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Cores Oficiais da Identidade */
  --color-orange: #FF3E01;        /* Laranja vibrante oficial da Capa e Acentos */
  --color-cream: #F7E1B8;         /* Creme do logo MS */
  --color-dark: #000000;          /* Preto profundo do Case Cleanly e Tipografia da Capa */
  --color-light-bg: #EAEAEA;      /* Cinza claro de fundo das Páginas 2 e 3 do PDF */
  --color-text-body: #4D4D4D;     /* Cinza médio do texto corrido e itens inativos */
  --color-white: #FFFFFF;

  /* Tipografia oficial: Metropolis da pasta fontes */
  --font-family: "Metropolis", system-ui, -apple-system, sans-serif;

  /* Curvas de transição refinadas */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  
  --max-content-width: 1583px;
  --page-pad: clamp(24px, 4.5vw, 76px);
}

/* Reset Universal */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Metropolis", sans-serif !important;
}

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

body {
  font-family: "Metropolis", sans-serif !important;
  background-color: var(--color-light-bg);
  color: var(--color-text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.4;
  overflow-x: hidden;
}

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

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

button, input, select, textarea, a, p, span, h1, h2, h3, h4, h5, h6, li {
  font-family: "Metropolis", sans-serif !important;
}

.page-container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
}

/* ==========================================================================
   BARRA SUPERIOR (HEADER)
   ========================================================================== */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 16px var(--page-pad);
  transition: background-color 240ms ease, box-shadow 240ms ease;
}

.topbar-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar.scrolled {
  background: rgba(234, 234, 234, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
}

.topbar.on-hero.scrolled {
  background: rgba(255, 62, 1, 0.92);
}

.topbar.on-dark.scrolled {
  background: rgba(0, 0, 0, 0.92);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
}

.nav-item {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-dark);
  position: relative;
  padding: 4px 0;
  transition: color 180ms ease;
}

.topbar.on-hero .nav-item {
  color: var(--color-dark);
}

.topbar.on-dark .nav-item {
  color: var(--color-white);
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms var(--ease-out);
}

.nav-item:hover {
  color: var(--color-orange);
}

.nav-item:hover::after {
  transform: scaleX(1);
}

.logo-img {
  height: 38px;
  width: auto;
  display: block;
  transition: transform 160ms var(--ease-out);
}

.topbar:not(.on-hero):not(.on-dark) .logo-img {
  filter: brightness(0.2);
}

.logo:active .logo-img {
  transform: scale(0.96);
}

.menu-toggle {
  display: none;
}

/* ==========================================================================
   SEÇÃO 1: HERO / CAPA (PÁGINA 1)
   ========================================================================== */
.section-hero {
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--color-orange);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: var(--page-pad);
  overflow: hidden;
}

.hero-content {
  width: 100%;
  max-width: var(--max-content-width);
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================================
   ESTRUTURA DAS SEÇÕES E FLUXO NATURAL DO SITE
   Layout idêntico ao PDF com ocupação completa de largura
   ========================================================================== */
.section-page {
  width: 100%;
  padding: clamp(80px, 9vw, 130px) var(--page-pad);
  position: relative;
}

.section-hero {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--color-orange);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: var(--page-pad);
  overflow: hidden;
}

.section-services {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--color-light-bg);
}

.section-portfolio {
  width: 100%;
  background-color: var(--color-light-bg);
}

.section-case {
  width: 100%;
  background-color: var(--color-dark);
  color: var(--color-white);
  padding-bottom: clamp(90px, 11vw, 150px);
}

/* ==========================================================================
   TIPOGRAFIA E ALINHAMENTO DA CAPA (VETOR ORIGINAL texto_secao1.svg)
   ========================================================================== */
.hero-brand-wrap {
  width: 100%;
  max-width: 820px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.hero-svg-logo {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

.scroll-arrow {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 44px;
  border: 2px solid var(--color-dark);
  border-radius: 14px;
  opacity: 0.6;
  transition: opacity 180ms ease, transform 180ms var(--ease-out);
}

.scroll-arrow span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background-color: var(--color-dark);
  border-radius: 2px;
  animation: scroll-indicator 1.8s var(--ease-in-out) infinite;
}

@keyframes scroll-indicator {
  0% { transform: translateY(0); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

.scroll-arrow:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(3px);
}

/* ==========================================================================
   TAG DE SEÇÃO (QUADRADINHO LARANJA + TÍTULO)
   ========================================================================== */
.section-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-dark);
  margin-bottom: clamp(24px, 4vw, 48px);
}

.section-tag-light {
  color: var(--color-white);
}

.tag-square {
  width: 15px;
  height: 15px;
  background-color: var(--color-orange);
  display: inline-block;
  flex-shrink: 0;
}

/* ==========================================================================
   SEÇÃO 2: NOSSOS SERVIÇOS (PÁGINA 2)
   ========================================================================== */
.section-page {
  padding: clamp(80px, 9vw, 130px) var(--page-pad);
}

.section-services {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--color-light-bg);
}

.services-content {
  margin: auto 0;
  padding-left: clamp(0px, 5vw, 80px);
}

.services-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.services-menu li {
  font-size: clamp(3rem, 6.6vw, 6.4rem);
  line-height: 1.15;
  font-weight: 300;
  color: var(--color-text-body);
  letter-spacing: -0.015em;
}

.services-menu li a, 
.services-menu li span {
  display: inline-block;
  transition: color 200ms ease, transform 200ms var(--ease-out);
}

.services-menu .service-active a {
  color: var(--color-orange);
  font-weight: 400;
}

@media (hover: hover) and (pointer: fine) {
  .services-menu li:hover a,
  .services-menu li:hover span {
    color: var(--color-orange);
    transform: translateX(10px);
  }
}

/* ==========================================================================
   SEÇÃO 3: DESIGN GRÁFICO (PÁGINA 3)
   ========================================================================== */
.section-portfolio {
  background-color: var(--color-light-bg);
}

.page-title {
  font-size: clamp(2.8rem, 5.8vw, 5.2rem);
  font-weight: 400;
  color: var(--color-orange);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: clamp(28px, 4vw, 52px);
}

/* Grade de 12 itens com proporção quadrada idêntica */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(14px, 2.8vw, 42px);
  margin-bottom: clamp(36px, 5vw, 64px);
}

.grid-card {
  aspect-ratio: 1 / 1;
  border-radius: clamp(12px, 1.3vw, 18px);
  overflow: hidden;
  background-color: #D6D6D6;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  transition: transform 180ms var(--ease-out), box-shadow 240ms ease;
  position: relative;
}

.grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
  }
  .grid-card:hover img {
    transform: scale(1.05);
  }
}

.grid-card:active {
  transform: scale(0.97);
}

.grid-card:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 3px;
}

.portfolio-manifesto {
  max-width: 65ch;
  font-size: clamp(1.05rem, 1.55vw, 1.45rem);
  line-height: 1.45;
  color: var(--color-dark);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   SEÇÃO 4: CASE CLEANLY (PÁGINA 4)
   ========================================================================== */
.section-case {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding-bottom: clamp(90px, 11vw, 150px);
}

.case-layout {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr 1.05fr;
  gap: clamp(16px, 2.4vw, 36px);
  align-items: stretch;
}

.case-column {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vw, 36px);
}

.case-panel {
  border-radius: clamp(12px, 1.3vw, 18px);
  overflow: hidden;
  cursor: pointer;
  background-color: #111111;
  transition: transform 180ms var(--ease-out), box-shadow 240ms ease;
}

.case-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .case-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  }
  .case-panel:hover img {
    transform: scale(1.03);
  }
}

.case-panel:active {
  transform: scale(0.98);
}

.col-mobile .case-panel {
  height: 100%;
}

.col-mobile .case-panel img {
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   RODAPÉ
   ========================================================================== */
.footer {
  background-color: var(--color-orange);
  color: var(--color-dark);
  padding: clamp(48px, 6vw, 84px) var(--page-pad);
  text-align: center;
}

.footer-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-words {
  display: flex;
  flex-direction: column;
  font-weight: 900;
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-align: right;
}

.footer-logo-img {
  height: clamp(3.2rem, 6.2vw, 4.8rem);
  width: auto;
  display: block;
}

.footer-copy {
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.85;
}

/* ==========================================================================
   LIGHTBOX DIALOG (MODAL DE ZOOM)
   ========================================================================== */
.lightbox {
  margin: auto;
  border: 0;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}

.lightbox[open] {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox-window {
  position: relative;
  z-index: 2;
  max-width: min(92vw, 1080px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.96);
  opacity: 0;
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}

.lightbox[open] .lightbox-window {
  transform: scale(1);
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  color: var(--color-white);
  font-size: 1.8rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 160ms var(--ease-out);
}

.lightbox-close:hover {
  transform: scale(1.1);
}

.lightbox-close:active {
  transform: scale(0.9);
}

.lightbox-body img {
  max-height: 78vh;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 14px;
  text-align: center;
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 1100px) {
  .portfolio-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: 0;
    background: var(--color-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s 220ms;
    z-index: 101;
  }

  .nav.menu-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .nav-item {
    color: var(--color-white);
    font-size: 1.5rem;
    font-weight: 500;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 38px;
    height: 38px;
    z-index: 102;
  }

  .menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-dark);
    transition: transform 220ms var(--ease-out), background-color 220ms ease;
  }

  .topbar.on-dark .menu-toggle span,
  .menu-open .menu-toggle span {
    background-color: var(--color-white);
  }

  .menu-open .menu-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-open .menu-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .case-layout {
    grid-template-columns: 1fr;
  }

  .col-mobile .case-panel {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 580px) {
  .hero-brand-wrap {
    max-width: 90vw;
  }

  .services-menu li {
    font-size: 11vw;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Suporte a Redução de Movimento */
@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;
  }
  .scroll-arrow span {
    animation: none;
  }
}
