/* =========================================================
  M Estofados - CSS Global
  Design system premium com modo dark/light.

  Onde trocar cores:
  - Variáveis em :root para o dark mode.
  - Variáveis em [data-theme="light"] para o light mode.
========================================================= */

:root {
  color-scheme: dark;

  /* Design System Dark Mode */
  --color-bg: #0d0b09;
  --color-bg-soft: #15110d;
  --color-surface: rgba(24, 20, 15, 0.82);
  --color-surface-strong: #1f1811;
  --color-text: #fff8ed;
  --color-muted: #c7b9a5;
  --color-border: rgba(224, 174, 88, 0.22);
  --color-gold: #dcae55;
  --color-gold-strong: #f2c56b;
  --color-brown: #8a5328;
  --color-shadow: rgba(0, 0, 0, 0.45);

  /* Tipografia e layout */
  --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --container: 1180px;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --transition: 220ms ease;
}

[data-theme="light"] {
  color-scheme: light;

  /* Design System Light Mode */
  --color-bg: #f7f1e8;
  --color-bg-soft: #fffaf2;
  --color-surface: rgba(255, 250, 242, 0.9);
  --color-surface-strong: #ffffff;
  --color-text: #20160f;
  --color-muted: #725f4c;
  --color-border: rgba(138, 83, 40, 0.22);
  --color-gold: #9b671f;
  --color-gold-strong: #b88634;
  --color-brown: #7a4b27;
  --color-shadow: rgba(92, 61, 31, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;

  /*
    Ajuda o menu âncora a parar corretamente abaixo do header fixo.
    No caso do #topo, como ele fica no início real da página, o navegador
    ainda volta para o topo normalmente.
  */
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(220, 174, 85, 0.12), transparent 34rem),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

body.is-menu-open,
body.is-lightbox-open {
  overflow: hidden;
}

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

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

button {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

/*
  Âncora real do topo.
  Ela substitui o uso do id no header fixo.
*/
.page-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.section {
  padding: 96px 0;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-heading h2,
.about-content h2,
.process-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.section-heading p,
.about-content p,
.process-panel p {
  color: var(--color-muted);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--color-gold-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* =========================================================
  Botões globais
========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition:
    transform var(--transition),
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-gold-strong), var(--color-brown));
  color: #160f0a;
  box-shadow: 0 18px 35px rgba(220, 174, 85, 0.22);
}

.btn--secondary {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn--ghost {
  border-color: var(--color-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  backdrop-filter: blur(10px);
}

/* Botões maiores usados exclusivamente na hero */
.btn--hero {
  min-height: 64px;
  padding: 0 38px;
  font-size: 1.05rem;
}

/* =========================================================
  Header e menu responsivo
========================================================= */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(13, 11, 9, 0.72);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(18px);
}

[data-theme="light"] .site-header {
  background: rgba(247, 241, 232, 0.82);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__logo {
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  object-fit: cover;
}

.brand__text {
  display: grid;
  line-height: 1.1;
}

.brand__text strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand__text small {
  color: var(--color-muted);
  font-size: 0.72rem;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.menu a {
  display: inline-flex;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 0.92rem;
  font-weight: 700;
  transition: color var(--transition), background var(--transition);
}

.menu a:hover {
  background: rgba(220, 174, 85, 0.11);
  color: var(--color-text);
}

.theme-toggle,
.menu-toggle {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.theme-toggle {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
}

.theme-toggle__icon {
  font-size: 1.05rem;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 50%;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: currentColor;
  border-radius: 999px;
}

/* =========================================================
  Hero
========================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding-top: 140px;
}

/* Imagem de fundo da hero sem filtro escuro */
.hero__background {
  position: absolute;
  inset: 0;
}

.hero__background picture,
.hero__background img {
  width: 100%;
  height: 100%;
}

.hero__background picture {
  display: block;
}

.hero__background img {
  object-fit: cover;
  object-position: center center;
}

/* Conteúdo centralizado por cima da imagem */
.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: calc(100vh - 140px);
  place-items: center;
}

.hero__copy {
  width: 100%;
  max-width: 760px;
  text-align: center;
}

/* Botões centralizados na hero */
.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 0;
}

/* =========================================================
  Galeria
========================================================= */

.gallery-section {
  background: linear-gradient(180deg, var(--color-bg), var(--color-bg-soft));
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 20px 60px var(--color-shadow);
}

.gallery-card__image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.gallery-card__image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 450ms ease, filter 450ms ease;
}

.gallery-card:hover .gallery-card__image img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.06);
}

.gallery-card__content {
  position: absolute;
  inset: auto 14px 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(13, 11, 9, 0.72);
  color: #fff8ed;
  backdrop-filter: blur(14px);
}

.gallery-card__content span {
  color: var(--color-gold-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-card__content h3 {
  margin: 3px 0 0;
  font-size: 1.05rem;
}

.section-action {
  margin-top: 38px;
  text-align: center;
}

/* =========================================================
  Diferenciais
========================================================= */

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-card {
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(220, 174, 85, 0.12), transparent),
    var(--color-surface);
  box-shadow: 0 20px 50px var(--color-shadow);
}

.feature-card__icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 18px;
  background: rgba(220, 174, 85, 0.16);
  color: var(--color-gold-strong);
}

.feature-card__icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--color-muted);
}

/* =========================================================
  Sobre
========================================================= */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}

.about-media {
  position: relative;
}

.about-media::before {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(220, 174, 85, 0.18), transparent);
}

.about-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: 0 30px 80px var(--color-shadow);
}

.about-content p {
  font-size: 1.03rem;
}

.about-content .btn {
  margin-top: 14px;
}

/* =========================================================
  Processo de atendimento
========================================================= */

.process-section {
  padding-top: 32px;
}

.process-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 38px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(220, 174, 85, 0.18), transparent 30rem),
    var(--color-surface);
  box-shadow: 0 30px 90px var(--color-shadow);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.process-step {
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .process-step {
  background: rgba(138, 83, 40, 0.04);
}

.process-step span {
  color: var(--color-gold-strong);
  font-family: var(--font-display);
  font-size: 2rem;
}

.process-step h3 {
  margin: 6px 0 8px;
}

.process-step p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* =========================================================
  Footer e WhatsApp
========================================================= */

.site-footer {
  padding: 60px 0 24px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-soft);
}

/* Footer com apenas 2 colunas: marca + contato */
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.footer-brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.site-footer p,
.footer-list {
  color: var(--color-muted);
}

.footer-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-list li + li {
  margin-top: 8px;
}

.footer-list a:hover {
  color: var(--color-gold-strong);
}

.footer-bottom {
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(37, 211, 102, 0.35);
  transition: transform var(--transition);
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.03);
}

.whatsapp-float svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

/* =========================================================
  Lightbox da galeria
========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(12px);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__figure {
  max-width: min(92vw, 980px);
  max-height: 86vh;
  margin: 0;
  text-align: center;
}

.lightbox__image {
  max-height: 78vh;
  width: auto;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  object-fit: contain;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}

.lightbox__caption {
  margin-top: 14px;
  color: #fff8ed;
  font-weight: 800;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.lightbox__close {
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 3rem;
  line-height: 0;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 22px;
}

.lightbox__nav--next {
  right: 22px;
}

/* =========================================================
  Animações simples de entrada
========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
  Responsividade
========================================================= */

@media (max-width: 1024px) {
  .gallery-grid,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-panel,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .brand__text small {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .navbar__actions {
    position: fixed;
    top: 78px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    background: var(--color-surface-strong);
    box-shadow: 0 22px 60px var(--color-shadow);
  }

  .navbar__actions.is-open {
    display: flex;
  }

  .menu {
    flex-direction: column;
    align-items: stretch;
  }

  .menu a {
    justify-content: center;
    padding: 13px;
  }

  .theme-toggle {
    align-self: center;
  }

  .hero {
    min-height: 100svh;
    padding-top: 110px;
  }

  .hero__content {
    min-height: calc(100svh - 110px);
    align-items: end;
    padding-bottom: 52px;
  }

  /*
    Ajuste específico do banner mobile.
    A imagem /assets/bannermobile.png foi criada em formato vertical.
  */
  .hero__background img {
    object-position: center top;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .section {
    padding: 72px 0;
  }

  .container {
    width: min(100% - 24px, var(--container));
  }

  .gallery-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero__buttons {
    align-items: stretch;
    flex-direction: column;
    width: min(100%, 340px);
    margin-inline: auto;
  }

  .btn {
    width: 100%;
  }

  .btn--hero {
    min-height: 58px;
    padding: 0 26px;
  }

  .lightbox__nav {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .lightbox__nav--prev {
    left: calc(50% - 68px);
  }

  .lightbox__nav--next {
    right: calc(50% - 68px);
  }

  .whatsapp-float {
    right: 16px;
    bottom: 16px;
  }
}