:root {
  --bg: #f7f5f2;
  --fg: #1f2933;
  --muted: #52606d;
  --accent: #8a5a3b;
  --accent-dark: #6f4630;
  --card: #ffffff;
  --border: #e4e7eb;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

.top-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("assets/gallery_gen/ultima.jpeg");
  background-size: cover;
  background-position: center;
  opacity: 0.10;
  filter: saturate(0.85) brightness(1.05);
  animation: headerPan 24s ease-in-out infinite alternate;
  pointer-events: none;
  will-change: transform;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner { display: flex; align-items: center; gap: 1rem; padding-block: 0.75rem; flex-wrap: wrap; position: relative; z-index: 1; }
.logo-link { display: inline-block; line-height: 0; }
.logo-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.logo { height: 56px; width: auto; transition: transform 0.3s var(--ease); }
.logo-link:hover .logo { transform: scale(1.03); }
.main-nav { margin-left: auto; }
.menu { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.menu a {
  position: relative;
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
  padding: 0.5rem;
  display: inline-block;
  min-height: 44px;
  min-width: 44px;
  line-height: 44px;
  transition: color 0.25s var(--ease);
}
.menu a::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.55rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.menu a:hover, .menu a:focus { color: var(--accent); }
.menu a:hover::after, .menu a:focus-visible::after { transform: scaleX(1); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 1.25rem;
  cursor: pointer;
}
.lang-switcher { display: flex; gap: 0.5rem; }
.lang-switcher a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  min-height: 32px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.lang-switcher a:hover { border-color: var(--accent); color: var(--accent); }
.lang-switcher a[aria-current="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 4.5rem 0;
  background: #f7f5f2;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -6%;
  z-index: 0;
  background-image: url("assets/gallery_gen/ultima.jpeg");
  background-size: cover;
  background-position: center;
  opacity: 0.34;
  filter: saturate(0.9) brightness(0.95);
  animation: kenBurns 26s ease-in-out infinite alternate;
  will-change: transform;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(138, 90, 59, 0.14), transparent 55%),
    linear-gradient(135deg, rgba(247, 245, 242, 0.88), rgba(239, 231, 223, 0.72));
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 0.5rem; letter-spacing: -0.02em; }
.lead { font-size: 1.25rem; color: var(--accent); font-weight: 600; margin: 0 0 1rem; }
.hero p { max-width: 60ch; color: var(--muted); }

/* Entrada do hero (só visual, roda mesmo sem JS) */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes headerPan {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-3%, 2%, 0); }
}
.hero .container > * { animation: fadeUp 0.7s var(--ease) both; }
.hero .container > *:nth-child(2) { animation-delay: 0.08s; }
.hero .container > *:nth-child(3) { animation-delay: 0.16s; }
.hero .container > *:nth-child(4) { animation-delay: 0.24s; }
.hero .container > *:nth-child(5) { animation-delay: 0.32s; }
.hero .container > *:nth-child(6) { animation-delay: 0.4s; }

/* ---------- Botões ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:hover, .btn:focus {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn:active { transform: translateY(0); }

/* ---------- Seções / revelar ao rolar ---------- */
.section { padding: 4rem 0; }
.section.alt { background: #fff; }
.section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 0; }
section[id] { scroll-margin-top: 92px; }

html.anim .reveal {
  transform: translateY(26px);
  transition: transform 0.7s var(--ease);
  transition-delay: calc(var(--d, 0) * 80ms);
}
html.anim .reveal.in { transform: none; }

/* ---------- Serviços ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.service {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.service:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #d8cfc7; }
.service img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}
.service:hover img { transform: scale(1.02); }
.service h3 { margin: 0.75rem 0 0.25rem; font-size: 1.125rem; }
.service p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Galeria ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.gallery img, .gallery video {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  position: relative;
  z-index: 0;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.35s var(--ease);
}
.gallery img { cursor: zoom-in; }
.gallery img:hover, .gallery img:focus-visible {
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
  filter: brightness(1.04);
  z-index: 2;
}
.gallery img:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Contato ---------- */
.social { list-style: none; padding: 0; }
.social a { color: var(--accent); font-weight: 600; }
form { max-width: 640px; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field input, .field textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: #fff;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.map { margin-top: 2rem; }
.map iframe { width: 100%; max-width: 600px; height: 450px; border: 0; border-radius: 8px; }
.form-status { margin-top: 0.75rem; font-weight: 600; }
.form-status.error { color: #b00020; }
.form-status.success { color: #1b7a3d; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.3s var(--ease);
}
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Instagram / rodapé ---------- */
/* ---------- FAQ ---------- */
#faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.875rem 1.125rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s var(--ease);
}
#faq details[open] { border-color: var(--accent); }
#faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--fg);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.25s var(--ease);
}
#faq details[open] summary::after { transform: rotate(45deg); }
#faq details p { margin: 0.75rem 0 0; color: var(--muted); }
.instagram-widget { margin-top: 1.5rem; padding: 1rem; border: 1px dashed var(--border); border-radius: 8px; background: #fff; }
.site-footer { background: #fff; border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: var(--accent); }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .main-nav { margin-left: auto; order: 2; position: relative; }
  .menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 220px;
    max-width: 80vw;
    width: max-content;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    z-index: 60;
  }
  .menu.open { display: flex; }
  .menu a { display: block; line-height: 1.4; padding: 0.5rem 0.75rem; }
  .menu a::after { display: none; }
  .header-inner { align-items: flex-start; }
  .lang-switcher { order: 3; margin-left: 0.25rem; }
  .logo { height: 48px; }
  .hero { padding: 3rem 0; }
  .hero::after { display: none; }
  .section { padding: 3rem 0; }
  .map iframe { height: 320px; }
}

@media (max-width: 420px) {
  .header-inner { gap: 0.5rem; }
  .logo { height: 40px; }
  .lang-switcher a { min-width: 28px; min-height: 28px; }
}

/* ---------- Acessibilidade / movimento reduzido ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.anim .reveal { opacity: 1; transform: none; }
  .gallery img:hover, .service:hover { transform: none; }
}
