/* Madame Marie & Entrecasa — estilos do site (CSS próprio, sem framework).
   Tokens herdados do site anterior (Lovable) para manter a identidade visual. */

:root {
  --background: 35 30% 96%;
  --foreground: 30 10% 15%;
  --card: 35 25% 93%;
  --primary: 36 50% 42%;
  --primary-foreground: 35 30% 96%;
  --secondary: 35 20% 88%;
  --muted: 35 15% 90%;
  --muted-foreground: 30 8% 50%;
  --accent: 36 60% 48%;
  --border: 35 20% 85%;
  --ring: 36 50% 42%;
  --whatsapp: 142 70% 40%;

  --font-display: 'Playfair Display', serif;
  --font-body: 'Cormorant Garamond', serif;
  --font-ui: 'Montserrat', sans-serif;

  --c-background: hsl(var(--background));
  --c-foreground: hsl(var(--foreground));
  --c-primary: hsl(var(--primary));
  --c-muted: hsl(var(--muted-foreground));
  --c-border: hsl(var(--border));
}

*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--c-border); }

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

body {
  margin: 0;
  background: var(--c-background);
  color: var(--c-foreground);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); font-weight: 400; }
p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; padding: 0; cursor: pointer; }
input { font: inherit; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

.icon { width: 1.5rem; height: 1.5rem; flex: none; }

/* ---------- Container ---------- */
.container { width: 100%; margin-inline: auto; padding-inline: 1.5rem; }
@media (min-width: 768px)  { .container { padding-inline: 3rem; } }
/* Como no site anterior: largura total até 1535px e máximo de 1400px a partir daí. */
@media (min-width: 1536px) { .container { max-width: 1400px; } }
.container--narrow { max-width: 56rem !important; }

/* ---------- Cabeçalho ---------- */
.site-header { position: relative; z-index: 50; background: var(--c-background); border-bottom: 1px solid var(--c-border); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; padding-block: 1rem; }
.site-header__logo { display: block; }
.site-header__logo img { height: 3rem; width: auto; object-fit: contain; }
.site-header__right { display: flex; align-items: center; gap: 1rem; }
.site-header__toggle { padding: 0.5rem; color: var(--c-foreground); transition: color .15s; }
.site-header__toggle:hover { color: var(--c-primary); }
.site-header__toggle .icon { width: 22px; height: 22px; display: block; }

.site-nav { display: none; align-items: center; gap: 2rem; }
.site-nav a, .site-menu-mobile a {
  font-family: var(--font-ui); font-size: .75rem; line-height: 1rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--c-muted); transition: color .15s;
}
.site-nav a:hover, .site-menu-mobile a:hover { color: var(--c-foreground); }

.site-menu-mobile {
  position: absolute; top: 100%; left: 0; right: 0; background: var(--c-background);
  border-bottom: 1px solid var(--c-border); box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
}
.site-menu-mobile nav { display: flex; flex-direction: column; gap: 1rem; padding-block: 1rem; }
.site-menu-mobile a { padding-block: .5rem; border-bottom: 1px solid var(--c-border); }
.site-menu-mobile a:last-child { border-bottom: 0; }

@media (min-width: 768px) {
  .site-header__logo img { height: 4rem; }
  .site-nav { display: flex; }
  .site-header__toggle, .site-menu-mobile { display: none !important; }
}

/* ---------- Banner ---------- */
.hero { position: relative; width: 100%; height: 70vh; overflow: hidden; background: hsl(var(--muted)); }
.hero__empty { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--c-muted); }
.hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s .8s; }
.hero__slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s ease; }
.hero__slide picture { display: block; width: 100%; height: 100%; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform .8s ease; }
.hero__slide.is-active img { transform: scale(1); }
.hero__link { display: block; width: 100%; height: 100%; }
.hero__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, hsl(var(--foreground) / .6), hsl(var(--foreground) / .2), transparent); }
.hero__caption { position: absolute; inset: 0; display: flex; align-items: flex-end; padding-bottom: 5rem; pointer-events: none; }
.hero__caption .container { width: 100%; }
.hero__caption h2 { font-size: 1.875rem; line-height: 2.25rem; letter-spacing: .025em; margin-bottom: .75rem; color: hsl(var(--primary-foreground)); }

.hero__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); padding: .5rem; border-radius: 9999px;
  background: hsl(var(--background) / .2); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  color: hsl(var(--primary-foreground)); transition: background-color .15s; line-height: 0;
}
.hero__arrow:hover { background: hsl(var(--background) / .4); }
.hero__arrow--prev { left: 1rem; }
.hero__arrow--next { right: 1rem; }
.hero__dots { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; gap: .75rem; }
.hero__dot { width: .5rem; height: .5rem; border-radius: 9999px; background: hsl(var(--primary-foreground) / .4); transition: all .3s; }
.hero__dot.is-active { width: 2rem; background: hsl(var(--primary-foreground)); }

@media (min-width: 768px) {
  .hero { height: 85vh; }
  .hero__caption { padding-bottom: 7rem; }
  .hero__caption h2 { font-size: 3rem; line-height: 1; }
}
@media (min-width: 1024px) { .hero__caption h2 { font-size: 3.75rem; } }

/* ---------- Seções ---------- */
.section { padding-block: 4rem; }
@media (min-width: 768px) { .section { padding-block: 6rem; } }

.section__head { text-align: center; margin-bottom: 3rem; }
.section__head h2, .sobre h2 { font-size: 1.875rem; line-height: 2.25rem; margin-bottom: 1rem; }
.section__head p { font-size: 1.125rem; line-height: 1.75rem; color: var(--c-muted); max-width: 36rem; margin-inline: auto; }
@media (min-width: 768px) { .section__head h2, .sobre h2 { font-size: 2.25rem; line-height: 2.5rem; } }

.rule { width: 4rem; height: 1px; background: var(--c-primary); margin: 0 auto 1.5rem; }
.rule--left { margin: 0 0 2.5rem; }

/* Setores */
.section--setores { background: hsl(var(--secondary) / .3); }
.setores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 640px)  { .setores { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px)  { .setores { gap: 1.5rem; } }
@media (min-width: 1024px) { .setores { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.setor-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  height: 10rem; padding: 1.5rem; background: var(--c-background); border: 1px solid var(--c-border);
  transition: all .3s;
}
.setor-card:hover, .setor-card:focus-visible { border-color: var(--c-primary); box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); }
.setor-card > .icon { width: 2.5rem; height: 2.5rem; color: var(--c-primary); margin-bottom: 1rem; stroke-width: 1.25; }
.setor-card picture { display: block; margin-bottom: 1rem; }
.setor-card picture img { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.setor-card h3 { font-size: 1.125rem; line-height: 1.75rem; margin-bottom: .25rem; transition: color .15s; }
.setor-card:hover h3 { color: var(--c-primary); }
.setor-card__sub {
  font-size: .6rem; text-transform: uppercase; letter-spacing: .025em; color: var(--c-muted);
  margin-bottom: .5rem; white-space: nowrap;
}
.setor-card__sub--empty { display: block; height: 0; }
.setor-card__cta {
  display: flex; align-items: center; gap: .25rem; font-family: var(--font-ui); font-size: .75rem; line-height: 1rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--c-primary); opacity: 0; transition: opacity .3s;
}
.setor-card:hover .setor-card__cta, .setor-card:focus-visible .setor-card__cta { opacity: 1; }
.setor-card__cta .icon { width: .75rem; height: .75rem; stroke-width: 2; }
@media (min-width: 768px) {
  .setor-card { height: 11rem; padding: 2rem; }
  .setor-card h3 { font-size: 1.25rem; }
  .setor-card__sub { font-size: .65rem; }
}

/* Banco de imagens */
.bank-search { position: relative; max-width: 42rem; margin: 0 auto 2.5rem; }
.bank-search > .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--c-muted); stroke-width: 2; }
.bank-search input {
  width: 100%; padding: .75rem 2.5rem; font-family: var(--font-ui); font-size: .875rem; line-height: 1.25rem;
  background: hsl(var(--card)); border: 1px solid var(--c-border); color: var(--c-foreground); border-radius: 0;
}
.bank-search input::placeholder { color: var(--c-muted); opacity: 1; }
.bank-search input:focus { outline: 2px solid hsl(var(--ring)); outline-offset: 0; }
.bank-search__clear { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: var(--c-muted); line-height: 0; transition: color .15s; }
.bank-search__clear:hover { color: var(--c-foreground); }
.bank-search__clear .icon { width: 1rem; height: 1rem; stroke-width: 2; }

.bank-state { text-align: center; padding-block: 5rem; }
.bank-state .icon { display: block; width: 3rem; height: 3rem; color: var(--c-muted); margin: 0 auto 1rem; stroke-width: 2; }
.bank-state p { font-size: 1.125rem; line-height: 1.75rem; color: var(--c-muted); }
.bank-count { font-family: var(--font-ui); font-size: .75rem; line-height: 1rem; color: var(--c-muted); text-align: center; margin-bottom: 1.5rem; }
.bank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 640px) { .bank-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .bank-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
.bank-item { position: relative; overflow: hidden; aspect-ratio: 1; background: hsl(var(--card)); cursor: pointer; padding: 0; width: 100%; }
.bank-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.bank-item:hover img { transform: scale(1.05); }
.bank-item__name {
  position: absolute; inset: 0; display: flex; align-items: flex-end; background: hsl(var(--foreground) / 0);
  transition: background-color .3s; text-align: left;
}
.bank-item:hover .bank-item__name, .bank-item:focus-visible .bank-item__name { background: hsl(var(--foreground) / .3); }
.bank-item__name span {
  display: block; width: 100%; padding: .75rem; transform: translateY(100%); transition: transform .3s;
  font-family: var(--font-ui); font-size: .75rem; line-height: 1rem; color: hsl(var(--primary-foreground));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bank-item:hover .bank-item__name span, .bank-item:focus-visible .bank-item__name span { transform: translateY(0); }

.bank-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.bank-pager button {
  display: flex; align-items: center; gap: .25rem; padding: .5rem .75rem; font-family: var(--font-ui);
  font-size: .75rem; line-height: 1rem; letter-spacing: .025em; border: 1px solid var(--c-border);
}
.bank-pager button:hover:not(:disabled) { background: hsl(var(--accent)); }
.bank-pager button:disabled { opacity: .4; pointer-events: none; }
.bank-pager .icon { width: 1rem; height: 1rem; stroke-width: 2; }
.bank-pager span { font-family: var(--font-ui); font-size: .875rem; color: var(--c-muted); }

.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; background: hsl(var(--foreground) / .9); }
.lightbox__box { position: relative; max-width: 56rem; max-height: 90vh; }
.lightbox__box img { max-width: 100%; max-height: 85vh; object-fit: contain; margin-inline: auto; }
.lightbox__actions { position: absolute; top: 1rem; right: 1rem; display: flex; gap: .5rem; }
.lightbox__btn { padding: .5rem; border-radius: 9999px; background: #262626; color: #fff; line-height: 0; transition: background-color .15s; }
.lightbox__btn:hover { background: #404040; }
.lightbox__btn .icon { width: 1.25rem; height: 1.25rem; stroke-width: 2; }
.lightbox__box p { text-align: center; font-size: 1.125rem; line-height: 1.75rem; margin-top: 1rem; color: hsl(var(--primary-foreground) / .8); }

/* Sobre */
.section--sobre { background: hsl(var(--secondary)); }
.sobre { max-width: 48rem; margin-inline: auto; text-align: center; }
.sobre .rule { margin-bottom: 2rem; }
.sobre__destaque { font-size: 1.25rem; line-height: 1.625; color: var(--c-muted); margin-bottom: 1.5rem; }
.sobre__texto { font-size: 1.125rem; line-height: 1.625; color: var(--c-muted); }
@media (min-width: 768px) { .sobre__destaque { font-size: 1.5rem; } }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--c-foreground); color: var(--c-background); }
.site-footer__body { padding-block: 2.5rem; }
.site-footer__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.site-footer__name { font-size: 1.25rem; line-height: 1.75rem; margin-bottom: 1rem; }
.site-footer__desc { font-size: 1.125rem; line-height: 1.625; color: hsl(var(--background) / .7); }
.site-footer__head {
  font-family: var(--font-ui); font-size: .75rem; line-height: 1rem; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 1rem; color: hsl(var(--background) / .6);
}
.site-footer__list { display: flex; flex-direction: column; gap: .5rem; font-size: 1.125rem; line-height: 1.75rem; color: hsl(var(--background) / .7); }
.site-footer__list a { transition: color .15s; }
.site-footer__list a:hover { color: var(--c-background); }
.site-footer__legal { border-top: 1px solid hsl(var(--background) / .1); padding-top: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.site-footer__legal p { font-size: .875rem; line-height: 1.25rem; color: hsl(var(--background) / .4); }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) {
  .site-footer__body { padding-block: 3rem; }
  .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__legal { flex-direction: row; justify-content: space-between; }
}

.site-footer__stripe { height: 2px; width: 100%; background: linear-gradient(90deg, #9b4dca 0%, #06b6d4 50%, #f59e0b 100%); }
.site-credit { background: var(--c-background); padding-block: 1rem; }
.site-credit__inner { display: flex; align-items: center; justify-content: center; gap: .5rem; padding-inline: 1rem; }
.site-credit span { font-family: var(--font-ui); font-size: .75rem; line-height: 1rem; color: var(--c-muted); }
.site-credit__link { position: relative; display: block; }
.site-credit__link img { height: 1.25rem; width: auto; transition: all .3s; }
.site-credit__link:hover img { transform: scale(1.1); filter: brightness(1.25); }
.site-credit__link::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; filter: blur(12px); transform: scale(1.5);
  background: linear-gradient(90deg, #9b4dca 0%, #06b6d4 50%, #f59e0b 100%); transition: opacity .3s;
}
.site-credit__link::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; transition: width .3s;
  background: linear-gradient(90deg, #9b4dca 0%, #06b6d4 50%, #f59e0b 100%);
}
.site-credit__link:hover::before { opacity: 1; }
.site-credit__link:hover::after { width: 100%; }

/* ---------- WhatsApp ---------- */
.whatsapp-fab {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 40; width: 3.5rem; height: 3.5rem; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center; color: hsl(var(--primary-foreground));
  background: hsl(var(--whatsapp)); box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  transition: all .3s;
}
.whatsapp-fab:hover { background: hsl(142 70% 35%); transform: scale(1.1); box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); }
.whatsapp-fab .icon { stroke-width: 2; }

/* ---------- Página de setor ---------- */
.setor-page { padding-top: 6rem; padding-bottom: 4rem; }
.back-link {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 2rem; font-family: var(--font-ui);
  font-size: .75rem; line-height: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); transition: color .15s;
}
.back-link:hover { color: var(--c-primary); }
.back-link .icon { width: 1rem; height: 1rem; stroke-width: 2; }
.setor-page h1 { font-size: 1.875rem; line-height: 2.25rem; margin-bottom: .5rem; }
@media (min-width: 768px) { .setor-page h1 { font-size: 2.25rem; line-height: 2.5rem; } }
.setor-page__sub { font-size: 1.5rem; line-height: 2rem; margin-top: 3rem; margin-bottom: 1.5rem; }
.empty { text-align: center; color: var(--c-muted); padding-block: 2.5rem; }

.contatos { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .contatos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.contato-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; background: var(--c-background); border: 1px solid var(--c-border); }
@media (min-width: 768px) { .contato-card { padding: 1.5rem; } }
.contato-card__cargo { font-family: var(--font-ui); font-size: .75rem; line-height: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c-primary); }
.contato-card h3 { font-size: 1.125rem; line-height: 1.75rem; }
.contato-card__local { font-family: var(--font-ui); font-size: .75rem; line-height: 1rem; color: var(--c-muted); }
.contato-card__acoes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; font-family: var(--font-ui);
  font-size: .75rem; line-height: 1rem; letter-spacing: .025em; transition: background-color .15s;
}
.chip .icon { width: .875rem; height: .875rem; stroke-width: 2; }
.chip--mail { background: hsl(var(--primary) / .1); color: var(--c-primary); }
.chip--mail:hover { background: hsl(var(--primary) / .2); }
.chip--whats { background: hsl(var(--whatsapp) / .1); color: hsl(142 70% 30%); }
.chip--whats:hover { background: hsl(var(--whatsapp) / .2); }

/* ---------- Páginas de erro ---------- */
.erro-page { padding: 6rem 1.5rem; text-align: center; }
.erro-page h1 { font-size: 2.25rem; line-height: 2.5rem; margin-bottom: 1rem; }
.erro-page p { font-size: 1.25rem; line-height: 1.75rem; color: var(--c-muted); margin-bottom: 1rem; }
.erro-page a { color: var(--c-primary); text-decoration: underline; }

/* ---------- Revelação ao rolar (só com JS) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
