:root {
  --paper: #efeae1;
  --ink: #1d1d1b;
  --garden: #3d4a2e;
  --gold: #d8b46a;

  --font-display: "Fraunces", serif;
  --font-body: "Public Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.6em;
  color: var(--garden);
}

h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }

p { max-width: 62ch; }

a { color: inherit; }

/* -- topbar -- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1.25rem;
  color: #fff;
  background: var(--ink);
}

.brand {
  display: block;
  height: 100px;
  width: 100px;
  object-fit: contain;
}

.lang-toggle {
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  border-radius: 3px;
  padding: 0.4em 0.8em;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 767px) {
  .topbar { justify-content: center; position: fixed; }
  .lang-toggle { position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); }
}

/* -- hero scroll-scrubbing -- */
.hero-scrub {
  position: relative;
  height: 300vh;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--ink);
}

.hero-fg {
  position: absolute;
  top: 50%;
  left: 50%;
  will-change: transform;
  transform: translate(-50%, -50%);
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: cover;
}

.hero-desktop {
  display: none;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(29,29,27,.8), rgba(29,29,27,0) 55%);
  pointer-events: none;
}

@media (min-width: 768px) {
  .hero-scrub { height: 100vh; }
  .hero-sticky { position: relative; }
  .hero-fg { display: none; }
  .hero-desktop {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.hero-caption {
  position: absolute;
  left: 6%;
  bottom: 8%;
  color: #fff;
  z-index: 2;
}

.hero-caption h1 {
  color: #fff;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}

.hero-caption p {
  font-size: 1.05rem;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}

/* -- sections -- */
.section {
  padding: 5rem 6%;
  max-width: 1100px;
  margin: 0 auto;
}

.intro p { color: var(--ink); }

#territorio {
  background: var(--ink);
  color: var(--paper);
  max-width: none;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

#territorio > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

#territorio h2 { color: var(--gold); }

#territorio p { color: var(--paper); }

.amenities {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.amenities li {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--garden);
  border: 1px solid var(--gold);
  border-radius: 3px;
  padding: 0.4em 0.9em;
}

.amenities svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold);
}

.poi {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  max-width: 46ch;
}

.poi li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6em 0;
  border-bottom: 1px solid rgba(216,180,106,.35);
  font-size: 0.92rem;
}

.poi li:first-child { border-top: 1px solid rgba(216,180,106,.35); }

.poi-meta { color: var(--gold); white-space: nowrap; }

/* -- gallery -- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

.gallery-item {
  border: none;
  background: #e2ddd1;
  cursor: pointer;
  padding: 0;
  display: block;
  min-height: 140px;
  overflow: hidden;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-a { grid-column: span 3; grid-row: span 2; }
.item-b { grid-column: span 3; }
.item-c { grid-column: span 3; }
.item-d { grid-column: span 2; }
.item-e { grid-column: span 4; }

@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .item-a, .item-b, .item-c, .item-d, .item-e { grid-column: span 1; grid-row: auto; }
}

/* -- lightbox -- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20,20,16,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox[hidden] { display: none; }

.lightbox-content {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-align: center;
  max-width: min(90vw, 700px);
  max-height: 90vh;
}

.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto 1rem;
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* -- CTA buttons -- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  padding: 0.9em 1.8em;
  border-radius: 3px;
  font-size: 1.05rem;
}

.cta-whatsapp {
  text-align: center;
  padding: 3rem 6%;
}

.whatsapp-lead {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--garden);
}

.btn-whatsapp {
  background: var(--garden);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.btn-whatsapp svg {
  width: 22px;
  height: 22px;
}

.faq details {
  border-bottom: 1px solid rgba(216,180,106,.45);
  padding: 0.9rem 0;
}

.faq details:first-of-type { border-top: 1px solid rgba(216,180,106,.45); }

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--garden);
}

.faq details p { margin: 0.6rem 0 0; }

.map-embed {
  position: relative;
  padding-top: 56%;
  border: 1px solid var(--gold);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.cta-booking {
  text-align: center;
}

.booking-card {
  display: inline-block;
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 2.5rem 3rem;
}

.cta-lead {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--garden);
}

.rating {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--garden);
  margin-top: -0.6rem;
}

.btn-booking {
  background: var(--ink);
  color: var(--gold);
}

/* -- footer -- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 3rem 6%;
  text-align: center;
  font-size: 0.9rem;
}

.footer p {
  margin-left: auto;
  margin-right: auto;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 0.4em;
}

.footer-links a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-copy {
  opacity: 0.6;
  margin-top: 1.5em;
}

/* -- bilingual toggle -- */
html[data-lang="en"] [data-lang="it"] { display: none; }
html:not([data-lang="en"]) [data-lang="en"] { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
