/* ============================================================
   Empório Mangabeira — identidade branco, off-white e dourado
   ============================================================ */

:root {
  --background: #fcfbf8;
  --surface: #fffefa;
  --secondary: #f7f3ec;
  --muted: #f0eadf;
  --foreground: #292720;
  --muted-foreground: #69635a;
  --primary: #292720;
  --primary-foreground: #fffdf8;
  --accent: #d1a45d;
  --accent-deep: #a5732a;
  --accent-soft: #f2e0ae;
  --border: #ead8a9;
  --ring: #a5732a;
  --shadow-soft: 0 20px 48px -34px rgba(128, 92, 33, 0.5);
  --shadow-lift: 0 18px 36px -26px rgba(128, 92, 33, 0.62);

  --radius: 1rem;
  --radius-sm: 0.75rem;
  --header-height: 5.5rem;
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 0.75rem);
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent-soft);
  color: var(--foreground);
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  font-weight: 600;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .container { padding-inline: 1.5rem; }
}

.main { padding-top: var(--header-height); }

/* ---------- Skip link and focus ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 60;
  border-radius: 9999px;
  background: var(--accent-deep);
  color: var(--primary-foreground);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 5px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.btn-sm { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 1.75rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

.btn-primary {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--primary-foreground);
  box-shadow: 0 12px 22px -14px rgba(74, 49, 12, 0.72);
}

.btn-primary:hover {
  background: #8d6428;
  border-color: #8d6428;
  box-shadow: 0 15px 27px -15px rgba(102, 72, 25, 0.86);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--accent);
  color: var(--foreground);
}

.btn-outline:hover {
  background: #fbf5e9;
  border-color: var(--accent-deep);
  color: var(--accent-deep);
  transform: translateY(-2px);
}

.btn-light {
  background: #fffdf8;
  border-color: #fffdf8;
  color: var(--accent-deep);
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.7);
}

.btn-light:hover {
  background: #f4ead7;
  border-color: #f4ead7;
  color: #5d400f;
  transform: translateY(-2px);
}

.btn-ghost-light {
  background: rgba(255, 253, 248, 0.06);
  border-color: rgba(255, 253, 248, 0.56);
  color: var(--primary-foreground);
}

.btn-ghost-light:hover {
  background: rgba(255, 253, 248, 0.14);
  border-color: rgba(255, 253, 248, 0.9);
  transform: translateY(-2px);
}

.btn:active { transform: translateY(0); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid rgba(228, 215, 192, 0.8);
  background: rgba(255, 254, 250, 0.9);
  box-shadow: 0 8px 24px -24px rgba(50, 39, 22, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-height);
  padding-block: 0.625rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-logo {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.logo-navbar {
  width: 5.25rem;
  height: 3.5rem;
  border-radius: 0;
}

.brand-name {
  overflow: hidden;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Navigation ---------- */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.nav-desktop a,
.footer-nav a {
  position: relative;
}

.nav-desktop a {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-desktop a::after,
.footer-nav a::after {
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.22s ease;
}

.nav-desktop a:hover,
.nav-desktop a:focus-visible { color: var(--accent-deep); }

.nav-desktop a:hover::after,
.nav-desktop a:focus-visible::after,
.footer-nav a:hover::after,
.footer-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
}

.menu-toggle {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: transparent;
  color: var(--accent-deep);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.menu-toggle:hover {
  border-color: var(--accent);
  background: #fbf5e9;
  transform: translateY(-1px);
}

.menu-icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon-close { display: block; }

@media (min-width: 768px) {
  .menu-toggle { display: none; }
}

.nav-mobile {
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 18px 28px -28px rgba(50, 39, 22, 0.8);
  padding: 0.75rem 1rem 1.25rem;
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.nav-mobile li a {
  display: block;
  border-bottom: 1px solid rgba(228, 215, 192, 0.62);
  color: var(--foreground);
  font-size: 1rem;
  font-weight: 600;
  padding-block: 0.8rem;
}

.nav-mobile li:last-child a { border-bottom: 0; }

.nav-mobile .btn {
  min-height: 2.875rem;
  padding: 0.875rem 1.25rem;
}

@media (min-width: 768px) {
  .nav-mobile { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 88% 14%, rgba(231, 213, 179, 0.5), transparent 24rem),
    linear-gradient(135deg, #fffefa 0%, #f7f2e9 100%);
}

.hero::after {
  position: absolute;
  right: -10rem;
  bottom: -11rem;
  width: 24rem;
  height: 24rem;
  border: 1px solid rgba(173, 130, 64, 0.16);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  gap: 2.5rem;
  padding-block: 3.75rem;
}

.hero h1 {
  max-width: 11ch;
  color: var(--foreground);
  font-size: 2rem;
  line-height: 1.12;
}

.hero h1::before,
.quem-text h2::before,
.localizacao h2::before,
.cta-final h2::before {
  display: block;
  width: 3.25rem;
  height: 2px;
  margin-bottom: 1rem;
  background: var(--accent);
  content: "";
}

.hero-desc {
  max-width: 35rem;
  margin-top: 1.25rem;
  color: var(--muted-foreground);
  font-size: 1.0625rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-img {
  width: 100%;
  height: clamp(21rem, 96vw, 27rem);
  border: 1px solid rgba(173, 130, 64, 0.45);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  object-fit: cover;
  object-position: 54% 52%;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.stars { display: inline-flex; color: var(--accent); }

@media (min-width: 640px) {
  .hero h1 { font-size: 2.5rem; }
  .hero-actions { flex-direction: row; }
  .hero-img { height: 27rem; }
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    padding-block: 5rem;
  }

  .hero h1 { font-size: clamp(2.65rem, 4vw, 3.5rem); }
  .hero-img { height: clamp(27rem, 43vw, 33rem); }
}

/* ---------- Quem Somos ---------- */
.quem-somos {
  background: var(--surface);
  padding-block: 4.5rem;
}

.quem-grid {
  display: grid;
  align-items: center;
  gap: 2.5rem;
}

.quem-img {
  width: 100%;
  height: clamp(20rem, 90vw, 27rem);
  border: 1px solid rgba(173, 130, 64, 0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
  object-position: 56% 50%;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.quem-text { max-width: 34rem; }

.quem-text h2 {
  color: var(--foreground);
  font-size: 1.75rem;
  line-height: 1.18;
}

.quem-text p {
  margin-top: 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.75;
}

@media (min-width: 640px) {
  .quem-somos { padding-block: 6rem; }
  .quem-text h2 { font-size: 2.1rem; }
  .quem-img { height: 27rem; }
}

@media (min-width: 768px) {
  .quem-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 5rem);
  }

  .quem-img { height: 30rem; }
  .quem-text h2 { font-size: 2.55rem; }
}

/* ---------- Localização ---------- */
.localizacao {
  border-block: 1px solid var(--border);
  background:
    radial-gradient(circle at 5% 0%, rgba(231, 213, 179, 0.35), transparent 22rem),
    var(--secondary);
  padding-block: 4.5rem;
}

.localizacao h2 {
  color: var(--foreground);
  font-size: 1.75rem;
  line-height: 1.18;
}

.loca-grid {
  display: grid;
  align-items: stretch;
  gap: 2rem;
  margin-top: 2rem;
}

.loca-info {
  border: 1px solid rgba(228, 215, 192, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 254, 250, 0.78);
  box-shadow: var(--shadow-soft);
  font-style: normal;
  padding: 1rem;
}

.loca-photo {
  width: 100%;
  height: 9.5rem;
  margin-bottom: 1.4rem;
  border: 2px solid var(--accent-soft);
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: center 12%;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.loca-name {
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
}

.loca-line {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.85rem;
  color: var(--muted-foreground);
  line-height: 1.7;
}

.loca-line .ico {
  flex-shrink: 0;
  margin-top: 0.18rem;
  color: var(--accent-deep);
}

.loca-line a {
  text-decoration: underline;
  text-decoration-color: rgba(173, 130, 64, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.loca-line a:hover {
  color: var(--accent-deep);
  text-decoration-color: currentColor;
}

.loca-info .btn { margin-top: 1.75rem; }

.map-frame {
  overflow: hidden;
  border: 1px solid rgba(173, 130, 64, 0.45);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.map-iframe {
  display: block;
  width: 100%;
  height: 18rem;
  border: 0;
}

@media (min-width: 640px) {
  .localizacao { padding-block: 6rem; }
  .localizacao h2 { font-size: 2.1rem; }
  .loca-info { padding: 1.25rem; }
  .loca-photo { height: 11rem; object-position: center 15%; }
  .map-iframe { height: 24rem; }
}

@media (min-width: 768px) {
  .loca-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
  }

  .localizacao h2 { font-size: 2.55rem; }
  .loca-photo { height: 10rem; }
  .map-iframe { height: 100%; min-height: 26rem; }
}

/* ---------- CTA final ---------- */
.cta-final {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(135deg, #201c18 0%, #312c25 100%);
  padding-block: 4.5rem;
}

.cta-final::before,
.cta-final::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.cta-final::before {
  z-index: 0;
  background: radial-gradient(circle at top left, rgba(209, 164, 93, 0.24), transparent 38%),
              radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.09), transparent 36%);
}

.cta-final::after {
  z-index: 0;
  background: linear-gradient(90deg, rgba(26, 23, 20, 0.92), rgba(26, 23, 20, 0.72));
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  text-align: center;
}

.cta-final h2 {
  color: var(--primary-foreground);
  font-size: 1.75rem;
  line-height: 1.18;
}

.cta-final h2::before {
  margin-right: auto;
  margin-left: auto;
  background: #d9bc80;
}

.cta-desc {
  max-width: 38rem;
  margin: 1rem auto 0;
  color: rgba(255, 253, 248, 0.82);
  line-height: 1.72;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .cta-final { padding-block: 5.5rem; }
  .cta-final h2 { font-size: 2.1rem; }
  .cta-actions { flex-direction: row; }
}

@media (min-width: 768px) {
  .cta-final h2 { font-size: 2.55rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 3px solid var(--accent);
  background: linear-gradient(135deg, var(--surface) 0%, #fdfbf6 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 2.5rem;
  padding-block: 3.25rem;
  border-bottom: 1px solid var(--accent-soft);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.footer-brand-copy {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.footer-name {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 1.25rem;
  white-space: nowrap;
}

.footer-meta-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-location {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.4;
}

.footer-identity {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.footer-logo-link {
  display: block;
  width: 5.5rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.footer-logo { width: 100%; height: auto; }

.footer-text {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  display: inline;
  margin: 0;
  white-space: nowrap;
}

.footer-text::before {
  content: "•";
  color: var(--accent);
  margin: 0 0.75rem;
}

.footer-text:first-of-type::before {
  content: none;
}

.footer-text a,
.footer-dev a {
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.footer-text a:hover,
.footer-dev a:hover,
.footer-dev a:focus-visible {
  color: var(--accent-deep);
}

.footer-nav {
  justify-self: end;
}

.footer-nav ul {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  justify-content: flex-end;
}

.footer-nav a {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible { color: var(--accent-deep); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-block: 1.5rem;
  text-align: center;
}

.footer-copy {
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.footer-dev {
  margin-top: 0.25rem;
  color: rgba(105, 99, 90, 0.76);
  font-size: 0.6875rem;
}

.footer-dev a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
}

.footer-dev a:hover,
.footer-dev a:focus-visible { text-decoration-color: currentColor; }

@media (min-width: 640px) {
  .footer-nav { justify-self: end; }
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-nav {
    justify-self: stretch;
  }

  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .footer-text {
    display: block;
  }

  .footer-text::before {
    content: none;
  }

  .footer-nav ul {
    flex-direction: column;
    gap: 0.65rem;
    justify-content: flex-start;
  }
}

/* ---------- Refined, restrained motion ---------- */
@media (hover: hover) and (pointer: fine) {
  .hero-img:hover,
  .quem-img:hover,
  .loca-photo:hover {
    box-shadow: 0 24px 44px -30px rgba(54, 44, 27, 0.74);
    transform: translateY(-3px);
  }

  .footer-logo-link:hover { transform: translateY(-2px); }
}

/* ---------- Mobile adjustments ---------- */
@media (max-width: 767px) {
  :root { --header-height: 4.75rem; }

  .header-bar { min-height: var(--header-height); }
  .logo-navbar { width: 4.4rem; height: 3rem; }
  .brand { gap: 0.65rem; }
  .brand-name { font-size: 1rem; }
  .btn-lg { padding: 0.95rem 1.35rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
