:root {
  --ink: #080706;
  --cream: #f7f1e7;
  --gold: #c99b4d;
  --wine: #6e202a;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
body.menu-open { overflow: hidden; }

::selection { background: var(--gold); color: var(--ink); }

#preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.25rem;
  background: var(--ink);
}

#preloader img {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transform: scale(.88);
}

#preloader span {
  display: block;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

#site-header.scrolled {
  background: rgba(8, 7, 6, .92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  backdrop-filter: blur(14px);
}

.nav-link { position: relative; transition: color .25s ease; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: var(--gold);
  transition: right .25s ease;
}
.nav-link:hover { color: white; }
.nav-link:hover::after { right: 0; }

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform .25s ease;
}
.menu-lines { position: relative; }
.menu-lines::before,
.menu-lines::after { content: ''; position: absolute; left: 0; }
.menu-lines::before { top: -5px; }
.menu-lines::after { top: 5px; }
.menu-open .menu-lines { background: transparent; }
.menu-open .menu-lines::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-lines::after { top: 0; transform: rotate(-45deg); }

.button-primary,
.button-ghost,
.button-light {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: .8rem;
  border-radius: 999px;
  padding: .85rem 1.5rem;
  font-size: .85rem;
  font-weight: 700;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.button-primary { background: var(--gold); color: var(--ink); border: 1px solid var(--gold); }
.button-primary:hover { transform: translateY(-2px); background: #d9b165; }
.button-ghost { border: 1px solid rgba(255,255,255,.45); color: white; }
.button-ghost:hover { transform: translateY(-2px); border-color: white; background: rgba(255,255,255,.08); }
.button-light { background: white; color: var(--wine); }
.button-light:hover { transform: translateY(-2px); background: var(--cream); }

.scroll-line { width: 52px; height: 1px; overflow: hidden; background: rgba(255,255,255,.25); }
.scroll-line::after { content: ''; display: block; width: 100%; height: 100%; background: var(--gold); animation: scrollLine 1.8s ease-in-out infinite; }
@keyframes scrollLine { 0% { transform: translateX(-100%); } 55%,100% { transform: translateX(100%); } }

.section-pad { padding: 6rem 0; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #9a6b26;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .23em;
  text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 32px; height: 1px; background: currentColor; }
.section-title { margin-top: 1rem; font-family: 'Cormorant Garamond', serif; font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 600; line-height: .94; letter-spacing: -.035em; }
.section-title em { color: var(--gold); font-weight: 500; }
.text-link { display: inline-flex; gap: 1rem; border-bottom: 1px solid #c8b99f; padding-bottom: .5rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; }
.text-link span { color: #9a6b26; transition: transform .25s; }
.text-link:hover span { transform: translateX(5px); }

.service-card { min-height: 250px; padding: 2rem; background: var(--ink); transition: background .35s ease, transform .35s ease; }
.service-card:hover { background: #15120e; }
.service-card > span { color: var(--gold); font-size: .7rem; letter-spacing: .15em; }
.service-card h3 { margin-top: 2.5rem; font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 600; }
.service-card p { margin-top: .75rem; max-width: 19rem; color: rgba(255,255,255,.5); font-size: .85rem; line-height: 1.8; }
.service-card a { display: inline-flex; gap: .75rem; margin-top: 1.5rem; color: var(--ink); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.service-featured { background: var(--gold); color: var(--ink); }
.service-featured:hover { background: #d2a658; }
.service-featured > span, .service-featured p { color: rgba(8,7,6,.65); }

.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 300px; gap: 1rem; }
.gallery-item { position: relative; overflow: hidden; border-radius: 1.5rem; background: #ddd; text-align: left; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.gallery-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72), transparent 55%); opacity: .78; transition: opacity .35s; }
.gallery-item span { position: absolute; z-index: 1; left: 1.5rem; bottom: 1.4rem; color: white; font-family: 'Cormorant Garamond', serif; font-size: 1.65rem; line-height: 1; }
.gallery-item small { display: block; margin-bottom: .45rem; color: #e5c57f; font-family: 'Manrope', sans-serif; font-size: .62rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.gallery-item:hover img { transform: scale(1.055); }
.gallery-item:hover::after { opacity: 1; }

.cta-banner { position: relative; isolation: isolate; }
.cta-banner::before,
.cta-banner::after { content: ''; position: absolute; z-index: -1; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.cta-banner::before { left: -90px; top: -150px; }
.cta-banner::after { right: -90px; bottom: -160px; }

.contact-line { display: grid; grid-template-columns: 90px 1fr; align-items: start; border-top: 1px solid rgba(8,7,6,.12); padding-top: 1.1rem; }
.contact-line span { color: #8b795f; font-size: .7rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.contact-line b { font-weight: 600; line-height: 1.65; }

.map-card {
  overflow: hidden;
  border: 1px solid rgba(8,7,6,.12);
  border-radius: 1.25rem;
  background: var(--ink);
  box-shadow: 0 18px 45px rgba(65,47,28,.12);
}

.map-card iframe {
  display: block;
  width: 100%;
  height: 285px;
  border: 0;
  filter: saturate(.9) contrast(1.03);
}

.map-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.15rem;
  color: white;
  transition: background .25s ease;
}

.map-link:hover { background: #15120e; }
.map-link svg { width: 1.7rem; height: 1.7rem; fill: var(--gold); }
.map-link span { font-size: .83rem; font-weight: 700; line-height: 1.25; }
.map-link small { display: block; margin-bottom: .25rem; color: rgba(255,255,255,.45); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; }
.map-link b { color: var(--gold); font-size: 1.15rem; transition: transform .25s ease; }
.map-link:hover b { transform: translateX(4px); }

.field { display: flex; flex-direction: column; gap: .55rem; }
.field span { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #746a5d; }
.field input,
.field select,
.field textarea { width: 100%; border: 1px solid #ddd4c8; border-radius: .85rem; background: #fcfaf7; padding: .9rem 1rem; outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,155,77,.14); }
.field .invalid { border-color: #a92a2f; }

.floating-actions {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.floating-button {
  position: relative;
  display: grid;
  width: 3.8rem;
  height: 3.8rem;
  place-items: center;
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  box-shadow: 0 10px 28px rgba(0,0,0,.24);
  transition: transform .25s ease, box-shadow .25s ease;
}

.floating-button::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1px solid currentColor;
  border-radius: inherit;
  opacity: 0;
  animation: contactPulse 2.4s ease-out infinite;
}

.floating-button:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 32px rgba(0,0,0,.3);
}

.floating-button svg { width: 1.7rem; height: 1.7rem; fill: currentColor; }
.floating-whatsapp { background: #20bf63; }
.floating-call { background: #147bb3; }

.floating-label {
  position: absolute;
  right: calc(100% + .65rem);
  width: max-content;
  border-radius: .5rem;
  background: var(--ink);
  padding: .45rem .7rem;
  color: white;
  font-size: .68rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateX(7px);
  transition: opacity .2s ease, transform .2s ease;
}

.floating-button:hover .floating-label,
.floating-button:focus-visible .floating-label { opacity: 1; transform: translateX(0); }

@keyframes contactPulse {
  0% { transform: scale(.9); opacity: .45; }
  70%, 100% { transform: scale(1.25); opacity: 0; }
}

@media (min-width: 768px) {
  .section-pad { padding: 8rem 0; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 340px; }
  .gallery-tall { grid-row: span 2; }
  .gallery-wide { grid-column: span 2; }
}

@media (max-width: 767px) {
  .hero-image { object-position: 60% center; }
  .hero-title { font-size: 3.25rem !important; line-height: .9; }
  .gallery-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
  .gallery-item { min-width: 82vw; height: 440px; scroll-snap-align: center; }
  .floating-actions { right: .9rem; bottom: .9rem; gap: .65rem; }
  .floating-button { width: 3.45rem; height: 3.45rem; }
  .floating-button svg { width: 1.55rem; height: 1.55rem; }
  .floating-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
