/* ============================================
   KMA MARMORARIA — DESIGN TOKENS
   ============================================ */
:root {
  --black: #121212;
  --black-soft: #1e1e1e;
  --red: #A11C25;
  --red-dark: #7d151c;
  --white: #ffffff;
  --offwhite: #f7f5f3;
  --stone: #e8e4df;
  --text-muted: #6b6b6b;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-w: 1180px;
  --radius: 4px;
  --transition: 220ms ease;

  --header-h: 78px;
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@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-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

button { font-family: inherit; cursor: pointer; border: none; background: none; }

ul { list-style: none; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }

/* ============================================
   LOGO / MARCA
   ============================================ */
.logo-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 30px;
  transform: skewX(-12deg);
  flex-shrink: 0;
}
.logo-mark span { display: block; width: 6px; border-radius: 1px; }
.logo-mark span:nth-child(1) { height: 58%; background: var(--black); }
.logo-mark span:nth-child(2) { height: 100%; background: var(--red); }
.logo-mark span:nth-child(3) { height: 76%; background: var(--black); }

.logo-mark--lg { height: 46px; gap: 6px; }
.logo-mark--lg span { width: 9px; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.5px;
  color: var(--black);
}
.logo-subtitle {
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: 3px;
  font-weight: 600;
  color: var(--red);
  margin-top: 3px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn .icon { width: 19px; height: 19px; fill: currentColor; flex-shrink: 0; }

.btn--primary {
  background: var(--red);
  color: var(--white);
}
.btn--primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(161,28,37,0.35); }

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.55);
}
.btn--ghost:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }

.btn--outline {
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--black);
}
.btn--outline:hover { background: var(--black); color: var(--white); }

.btn--nav { padding: 10px 20px; font-size: 0.88rem; }
.btn--lg { padding: 16px 32px; font-size: 1rem; }
.btn--xl { padding: 19px 42px; font-size: 1.05rem; }

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 500;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition), height var(--transition);
}
.header.is-scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 18px rgba(0,0,0,0.08);
  height: 68px;
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.header .logo-title,
.header .logo-subtitle { color: var(--white); transition: color var(--transition); }
.header .logo-mark span:nth-child(1),
.header .logo-mark span:nth-child(3) { background: var(--white); transition: background var(--transition); }

.header.is-scrolled .logo-title { color: var(--black); }
.header.is-scrolled .logo-subtitle { color: var(--red); }
.header.is-scrolled .logo-mark span:nth-child(1),
.header.is-scrolled .logo-mark span:nth-child(3) { background: var(--black); }

.nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
}
.nav__link {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--white);
  position: relative;
  padding: 6px 2px;
  transition: color var(--transition);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--red);
  transition: right var(--transition);
}
.nav__link:hover::after { right: 0; }
.header.is-scrolled .nav__link { color: var(--black); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--white);
  margin: 0 auto;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
}
.header.is-scrolled .nav-toggle span { background: var(--black); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(18,18,18,0.75) 0%, rgba(18,18,18,0.55) 45%, rgba(18,18,18,0.92) 100%),
    linear-gradient(100deg, rgba(161,28,37,0.28) 0%, rgba(18,18,18,0) 55%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding-top: var(--header-h);
  max-width: 760px;
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.05;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.hero__title-accent { color: var(--red); }
.hero__subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.88);
  max-width: 540px;
  margin-bottom: 38px;
}
.hero__actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 28px;
  height: 46px;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 20px;
}
.hero__scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--white);
  border-radius: 2px;
  animation: scrollDot 1.8s ease infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 24px; }
  100% { opacity: 0; top: 24px; }
}

/* ============================================
   SECTION HEADINGS (shared)
   ============================================ */
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  margin-bottom: 14px;
}
.section-eyebrow--center { text-align: center; }

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--black);
}
.section-title--center { text-align: center; margin-left: auto; margin-right: auto; }

.section-lead {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 50px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ============================================
   ABOUT
   ============================================ */
.about { padding: 110px 0; background: var(--white); }
.about__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  align-items: center;
}
.about__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}
.about__media {
  position: relative;
}
.about__media::before {
  content: '';
  position: absolute;
  top: -18px; left: -18px;
  width: 90px; height: 90px;
  border-top: 4px solid var(--red);
  border-left: 4px solid var(--red);
  z-index: -1;
}
.about__text p { margin-bottom: 18px; color: #333; }
.link-arrow {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: var(--red);
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition);
}
.link-arrow:hover { border-color: var(--red); }

/* ============================================
   GALLERY
   ============================================ */
.gallery { padding: 110px 0; background: var(--offwhite); }

.filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 46px;
}
.filter {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--black);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--black);
  background: transparent;
  transition: background var(--transition), color var(--transition);
}
.filter:hover { background: rgba(18,18,18,0.06); }
.filter.is-active { background: var(--black); color: var(--white); border-color: var(--black); }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  cursor: pointer;
  background: var(--stone);
}
.gallery__item.is-hidden { display: none; }
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease;
}
.gallery__item:hover img { transform: scale(1.07); }
.gallery__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 16px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0) 100%);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
}
.gallery__item:hover figcaption { opacity: 1; transform: translateY(0); }

/* ============================================
   DIFERENCIAIS
   ============================================ */
.diferenciais { padding: 110px 0; background: var(--black); color: var(--white); }
.diferenciais .section-title { color: var(--white); }

.diferenciais__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 20px;
}
.card {
  background: var(--black-soft);
  padding: 38px 28px;
  border-radius: var(--radius);
  border-top: 3px solid var(--red);
  transition: transform var(--transition), background var(--transition);
}
.card:hover { transform: translateY(-6px); background: #242424; }
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(161,28,37,0.18);
  margin-bottom: 22px;
}
.card__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--red);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.card p { color: rgba(255,255,255,0.72); font-size: 0.95rem; }

/* ============================================
   LOCATION
   ============================================ */
.location { padding: 110px 0; background: var(--white); }
.location__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.location__address {
  font-size: 1.1rem;
  line-height: 1.8;
  margin: 24px 0 32px;
  color: #333;
}
.location__map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
  aspect-ratio: 16 / 11;
}
.location__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================
   CTA FINAL
   ============================================ */
.cta-final {
  padding: 120px 0;
  background: linear-gradient(120deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  text-align: center;
}
.cta-final__inner { display: flex; flex-direction: column; align-items: center; }
.cta-final .logo-mark span:nth-child(1),
.cta-final .logo-mark span:nth-child(3) { background: rgba(255,255,255,0.55); }
.cta-final .logo-mark span:nth-child(2) { background: var(--white); }
.cta-final h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 26px 0 14px;
}
.cta-final p { font-size: 1.1rem; margin-bottom: 36px; color: rgba(255,255,255,0.9); }
.cta-final .btn--primary { background: var(--white); color: var(--red); }
.cta-final .btn--primary:hover { background: var(--black); color: var(--white); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

/* ============================================
   FOOTER
   ============================================ */
.footer { background: var(--black); color: var(--white); padding: 56px 0 30px; }
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.footer .logo-mark span:nth-child(1),
.footer .logo-mark span:nth-child(3) { background: var(--white); }
.footer .logo-title { color: var(--white); }
.footer__city { color: rgba(255,255,255,0.75); font-size: 0.95rem; }
.footer__social { display: flex; gap: 16px; }
.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  transition: background var(--transition), border-color var(--transition);
}
.footer__social a:hover { background: var(--red); border-color: var(--red); }
.footer__social .icon { width: 19px; height: 19px; fill: var(--white); }
.footer__social .icon--outline {
  fill: none;
  stroke: var(--white);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer__copy { color: rgba(255,255,255,0.45); font-size: 0.82rem; margin-top: 12px; }

/* ============================================
   WHATSAPP FLOAT BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 600;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: floatPulse 2.6s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.08); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.whatsapp-float .icon { width: 32px; height: 32px; fill: var(--white); }

@keyframes floatPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 0 rgba(37,211,102,0.5); }
  50% { box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 12px rgba(37,211,102,0); }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float { animation: none; }
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10,10,10,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox__close {
  position: absolute;
  top: 22px;
  right: 28px;
  font-size: 2.4rem;
  color: var(--white);
  line-height: 1;
  width: 44px;
  height: 44px;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.6rem;
  color: var(--white);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
}
.lightbox__nav:hover { background: rgba(255,255,255,0.12); }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }

/* ============================================
   REVEAL ON SCROLL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .about__grid, .location__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__media { order: -1; max-width: 460px; margin: 0 auto; }
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }
  .diferenciais__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 24px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }
  .nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__link { color: var(--black) !important; padding: 14px 0; border-bottom: 1px solid #eee; width: 100%; }
  .nav__link::after { display: none; }

  .nav-toggle { display: flex; }
  .btn--nav { display: none; }

  .nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-active span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle.is-active span { background: var(--black); }
}

@media (max-width: 700px) {
  :root { --header-h: 68px; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .diferenciais__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .about, .gallery, .diferenciais, .location { padding: 70px 0; }
  .cta-final { padding: 80px 0; }
  .whatsapp-float { width: 54px; height: 54px; right: 16px; bottom: 16px; }
  .whatsapp-float .icon { width: 28px; height: 28px; }
  .lightbox__nav { width: 44px; height: 44px; font-size: 2rem; }
}

@media (max-width: 420px) {
  .gallery__grid { grid-template-columns: 1fr; }
  .logo-subtitle { letter-spacing: 2px; }
}
