/* ============================================================
   MASSERIA BABA — styles.css
   Master Template Luxury Masseria v1.0
   Senior Creative Developer — Ultra-Minimal Luxury
   ============================================================ */

/* ── Google Fonts ── */
@import url(\'https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500&display=swap\');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg:            #FFFFFF;
  --bg-elevated:   #F9F8F6;
  --bg-dark:       #141410;
  --text-primary:  #1A1A1A;
  --text-muted:    #7A7A7A;
  --accent:        #556B2F;
  --accent-light:  #8A9A60;
  --border:        rgba(26, 26, 26, 0.08);
  --border-strong: rgba(26, 26, 26, 0.16);

  --serif:  \'Cormorant Garamond\', Georgia, \'Times New Roman\', serif;
  --sans:   \'Inter\', -apple-system, BlinkMacSystemFont, \'Segoe UI\', sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.76, 0, 0.24, 1);

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
  --space-2xl: 11rem;

  --container: 1280px;
  --gutter:    clamp(1.5rem, 5vw, 5rem);
}

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

html {
  font-size: 16px;
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

body.preloader-active {
  overflow: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

/* ============================================================
   GRAIN OVERLAY
   ============================================================ */
.grain-overlay {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox=\'0 0 512 512\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cfilter id=\'n\'%3E%3CfeTurbulence type=\'fractalNoise\' baseFrequency=\'0.75\' numOctaves=\'4\' stitchTiles=\'stitch\'/%3E%3C/filter%3E%3Crect width=\'100%25\' height=\'100%25\' filter=\'url(%23n)\'/%3E%3C/svg%3E");
  background-repeat: repeat;
  animation: grain-move 0.15s steps(1) infinite;
}

@keyframes grain-move {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-2%, -3%); }
  20%  { transform: translate(3%, 1%); }
  30%  { transform: translate(-1%, 4%); }
  40%  { transform: translate(4%, -2%); }
  50%  { transform: translate(-3%, 2%); }
  60%  { transform: translate(2%, -4%); }
  70%  { transform: translate(-4%, 1%); }
  80%  { transform: translate(1%, 3%); }
  90%  { transform: translate(-2%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-dot,
.cursor-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  top: 0;
  left: 0;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  top: 0;
  left: 0;
  transition: width 0.35s var(--ease-out-expo),
              height 0.35s var(--ease-out-expo),
              border-color 0.35s ease,
              background-color 0.35s ease,
              opacity 0.3s ease;
}

.cursor-ring.is-hovering {
  width: 60px;
  height: 60px;
  background: rgba(85, 107, 47, 0.06);
  border-color: var(--accent);
}

.cursor-ring.is-clicking {
  width: 28px;
  height: 28px;
}

@media (hover: none) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
  body {
    cursor: auto;
  }
  button { cursor: pointer; }
  a { cursor: pointer; }
}

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: transform 1s var(--ease-in-out);
}

#preloader.slide-out {
  transform: translateY(-100%);
}

.preloader-logo {
  width: 180px;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transform: translateY(16px);
  animation: preloader-appear 0.9s var(--ease-out-expo) 0.3s forwards;
}

.preloader-tagline {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  text-transform: uppercase;
  opacity: 0;
  animation: preloader-appear 0.9s var(--ease-out-expo) 0.6s forwards;
}

@keyframes preloader-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preloader-line {
  width: 1px;
  height: 0;
  background: var(--accent);
  opacity: 0.4;
  animation: line-grow 1s var(--ease-out-expo) 0.8s forwards;
}

@keyframes line-grow {
  from { height: 0; opacity: 0; }
  to   { height: 40px; opacity: 0.4; }
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 7000;
  padding: 1.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.5s ease,
              backdrop-filter 0.5s ease,
              padding 0.4s ease,
              box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  padding-top: 1rem;
  padding-bottom: 1rem;
  box-shadow: 0 1px 0 rgba(26,26,26,0.06);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.navbar-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.navbar-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.navbar-name .label {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.navbar-name .name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-cta {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--border-strong);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  display: none;
}

@media (min-width: 900px) {
  .navbar-cta { display: inline-block; }
}

.navbar-cta:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: none;
}

.hamburger span {
  display: block;
  height: 1px;
  background: var(--text-primary);
  transition: all 0.4s var(--ease-out-expo);
}

.hamburger span:nth-child(1) { width: 28px; }
.hamburger span:nth-child(2) { width: 20px; }
.hamburger span:nth-child(3) { width: 24px; }

.hamburger:hover span { width: 28px !important; }

.hamburger.is-open span:nth-child(1) {
  width: 28px;
  transform: translateY(6px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-open span:nth-child(3) {
  width: 28px;
  transform: translateY(-6px) rotate(-45deg);
}

#nav-menu {
  position: fixed;
  inset: 0;
  z-index: 6500;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease-in-out),
              visibility 0.5s var(--ease-in-out);
}

#nav-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-menu-item {
  overflow: hidden;
}

.nav-menu-link {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  line-height: 1.2;
  transform: translateY(100%);
  transition: transform 0.7s var(--ease-out-expo), color 0.3s ease;
}

#nav-menu.is-open .nav-menu-link {
  transform: translateY(0);
}

#nav-menu.is-open .nav-menu-item:nth-child(1) .nav-menu-link { transition-delay: 0.05s; }
#nav-menu.is-open .nav-menu-item:nth-child(2) .nav-menu-link { transition-delay: 0.10s; }
#nav-menu.is-open .nav-menu-item:nth-child(3) .nav-menu-link { transition-delay: 0.15s; }
#nav-menu.is-open .nav-menu-item:nth-child(4) .nav-menu-link { transition-delay: 0.20s; }
#nav-menu.is-open .nav-menu-item:nth-child(5) .nav-menu-link { transition-delay: 0.25s; }
#nav-menu.is-open .nav-menu-item:nth-child(6) .nav-menu-link { transition-delay: 0.30s; }

.nav-menu-link:hover {
  color: var(--accent);
}

.nav-menu-footer {
  margin-top: 3rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.5s ease 0.4s;
}

#nav-menu.is-open .nav-menu-footer {
  opacity: 1;
}

/* ============================================================
   UTILITY
   ============================================================ */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-label {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before {
  content: \'\';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
  flex-shrink: 0;
}

.section-title {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s var(--ease-out-expo),
              transform 1.2s var(--ease-out-expo);
}

[data-reveal="left"] { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.94); }

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal-delay="5"] { transition-delay: 0.5s; }
[data-reveal-delay="6"] { transition-delay: 0.6s; }
[data-reveal-delay="7"] { transition-delay: 0.7s; }
[data-reveal-delay="8"] { transition-delay: 0.8s; }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-dark);
}

.hero-media {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.hero-media img {
  width: 100%;
  height: 110%;
  object-fit: cover;
  object-position: center 30%;
  transform: translateY(var(--parallax-y, 0px));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 20, 16, 0.72) 0%,
    rgba(20, 20, 16, 0.2) 50%,
    rgba(20, 20, 16, 0.05) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter) var(--space-xl);
  max-width: 900px;
}

.hero-eyebrow {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-eyebrow::before {
  content: \'\';
  display: block;
  width: 36px;
  height: 1px;
  background: rgba(255,255,255,0.4);
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
}

.hero-title em {
  font-style: italic;
  color: rgba(255,255,255,0.75);
}

.hero-subtitle {
  font-family: var(--serif);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.65);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: #fff;
  padding: 1rem 2.2rem;
  display: inline-block;
  transition: background 0.3s ease, color 0.3s ease;
  cursor: none;
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: none;
  transition: color 0.3s ease;
}

.btn-ghost svg {
  transition: transform 0.4s var(--ease-out-expo);
}

.btn-ghost:hover { color: #fff; }
.btn-ghost:hover svg { transform: translateX(6px); }

.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  right: var(--gutter);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
}

.hero-scroll-indicator span {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #fff;
  writing-mode: vertical-rl;
}

.hero-scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, #fff, transparent);
  animation: scroll-line 1.8s ease-in-out infinite;
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   ANIMA
   ============================================================ */
#anima {
  padding: var(--space-2xl) 0;
  background: var(--bg);
}

.anima-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

@media (max-width: 900px) {
  .anima-grid { grid-template-columns: 1fr; gap: 3rem; }
}

.anima-text { max-width: 520px; }

.anima-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 1.2rem 0 2rem;
}

.anima-body {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.anima-body-plain {
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.anima-signature {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.anima-signature-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
}

.anima-signature-role {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.anima-image-main {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 200px 200px 0 0;
  overflow: hidden;
  background: var(--bg-elevated);
}

.anima-image-wrap { position: relative; }

.anima-image-accent {
  position: absolute;
  bottom: -3rem;
  left: -3rem;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 200px 200px 0 0;
  overflow: hidden;
  border: 6px solid var(--bg);
  background: var(--bg-elevated);
}

/* ============================================================
   PISCINA
   ============================================================ */
#piscina {
  padding: var(--space-2xl) 0;
  background: var(--bg-elevated);
  overflow: hidden;
}

.piscina-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .piscina-inner { grid-template-columns: 1fr; gap: 3rem; }
}

.piscina-text { max-width: 460px; }

.piscina-title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  margin: 1.2rem 0 1.8rem;
}

.piscina-body {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 2rem;
}

.piscina-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.piscina-stat-number {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
}

.piscina-stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.piscina-media { position: relative; }

.piscina-image-main {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 200px 200px 0 0;
  overflow: hidden;
  will-change: transform;
  background: var(--bg);
}

.piscina-image-main img {
  height: 110%;
  transform: translateY(var(--parallax-y-pool, 0px));
}

.piscina-badge {
  position: absolute;
  top: 3rem;
  left: -2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1.2rem 1.6rem;
  min-width: 160px;
}

.piscina-badge-value {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--text-primary);
}

.piscina-badge-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   CAMERE
   ============================================================ */
#camere {
  padding: var(--space-2xl) 0;
  background: var(--bg);
}

.camere-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 4rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.camere-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-top: 1rem;
}

.camere-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  max-width: 300px;
  line-height: 1.7;
}

.camere-track-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow-x: scroll;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-top: 4rem;
  padding-bottom: 2rem;
  cursor: grab;
}

.camere-track-wrap::-webkit-scrollbar { display: none; }

.camere-track {
  display: flex;
  gap: 1.5rem;
  padding-inline: var(--gutter);
  width: max-content;
  padding-bottom: 0.5rem;
}

.camera-card {
  position: relative;
  flex-shrink: 0;
  width: clamp(280px, 28vw, 400px);
  scroll-snap-align: start;
  overflow: hidden;
  cursor: none;
  background: var(--bg-elevated);
}

.camera-card-media {
  aspect-ratio: 4/5;
  overflow: hidden;
}

.camera-card-media img {
  transition: transform 0.9s var(--ease-out-expo);
}

.camera-card:hover .camera-card-media img {
  transform: scale(1.06);
}

.camera-card-body {
  padding: 1.8rem 1.6rem;
  border-top: 1px solid var(--border);
}

.camera-card-number {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.camera-card-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.camera-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.2rem;
}

.camera-card-features {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.camera-tag {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
}

.camera-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ============================================================
   TERRITORIO (Horizontal Scroll)
   ============================================================ */
#territorio {
  padding: var(--space-2xl) 0 0;
  background: var(--bg-elevated);
  overflow: hidden;
}

.territorio-header { padding-bottom: 3rem; }

.territorio-title {
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  margin-top: 1rem;
}

.territorio-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.7;
  margin-top: 1rem;
}

.territorio-track-wrap {
  overflow-x: scroll;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-xl);
  cursor: none;
}

.territorio-track-wrap::-webkit-scrollbar { display: none; }

.territorio-track {
  display: flex;
  gap: 1.5rem;
  padding-inline: var(--gutter);
  width: max-content;
  padding-bottom: 0.5rem;
}

.territorio-card {
  flex-shrink: 0;
  width: clamp(220px, 22vw, 300px);
  cursor: none;
}

.territorio-card-media {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 1.2rem;
}

.territorio-card-media img {
  transition: transform 0.9s var(--ease-out-expo);
}

.territorio-card:hover .territorio-card-media img {
  transform: scale(1.07);
}

.territorio-card-distance {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.territorio-card-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.territorio-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.territorio-drag-hint {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-inline: var(--gutter);
  padding-bottom: 3rem;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.territorio-drag-hint::after {
  content: \'\';
  display: block;
  height: 1px;
  flex: 1;
  background: var(--border-strong);
}

/* ============================================================
   SERVIZI
   ============================================================ */
#servizi {
  padding: var(--space-2xl) 0;
  background: var(--bg);
}

.servizi-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 6rem;
  align-items: start;
}

@media (max-width: 900px) {
  .servizi-inner { grid-template-columns: 1fr; gap: 3rem; }
}

.servizi-text-col .section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-top: 1rem;
}

.servizi-body {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-top: 1.5rem;
  max-width: 340px;
}

.servizi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.servizio-item {
  padding: 2.5rem 2rem;
  background: var(--bg);
  transition: background 0.35s ease;
  height: 100%;
}

.servizio-item:hover { background: var(--bg-elevated); }

.servizio-icon {
  margin-bottom: 1.2rem;
  color: var(--accent);
}

.servizio-icon svg { width: 28px; height: 28px; }

.servizio-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.servizio-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(20, 20, 16, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: none;
  transition: color 0.3s ease;
  background: none;
  border: none;
  font-family: var(--sans);
}

.lightbox-close:hover { color: #fff; }

.lightbox-close-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  transition: border-color 0.3s ease;
}

.lightbox-close:hover .lightbox-close-icon { border-color: rgba(255,255,255,0.6); }

.lightbox-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2rem;
  max-width: 100%;
  align-items: center;
}

.lightbox-track::-webkit-scrollbar { display: none; }

.lightbox-img-wrap {
  flex-shrink: 0;
  height: 80vh;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.lightbox-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.lightbox-caption h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 300;
  color: #fff;
}

.lightbox-caption p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  width: calc(100% - 4rem);
  left: 2rem;
  pointer-events: none;
}

.lightbox-btn {
  pointer-events: all;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  display: grid;
  place-items: center;
  transition: all 0.3s ease;
  cursor: none;
  border-radius: 50%;
}

.lightbox-btn:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}

/* ============================================================
   CTA
   ============================================================ */
#cta {
  padding: var(--space-2xl) 0;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

.cta-bg-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

.cta-bg-text span {
  font-family: var(--serif);
  font-size: clamp(8rem, 20vw, 20rem);
  font-weight: 300;
  color: rgba(255,255,255,0.03);
  white-space: nowrap;
  letter-spacing: -0.02em;
  user-select: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
}

.cta-label {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1.5rem;
}

.cta-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.cta-subtitle {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(255,255,255,0.45);
  margin-bottom: 3rem;
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--bg-dark);
  background: #fff;
  padding: 1.1rem 2.6rem;
  transition: background 0.3s ease, color 0.3s ease, gap 0.4s var(--ease-out-expo);
  cursor: none;
}

.btn-wa:hover {
  background: var(--accent);
  color: #fff;
  gap: 1.2rem;
}

.btn-wa svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 4rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand-logo {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  width: 140px;
  height: auto;
  object-fit: contain;
  margin-bottom: 1.5rem;
}

.footer-brand-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.75;
  max-width: 280px;
}

.footer-col-title {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 1.2rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.3s ease;
}

.footer-links a:hover { color: #fff; }

.footer-contact-item {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.footer-contact-item a {
  color: rgba(255,255,255,0.55);
  transition: color 0.3s ease;
}

.footer-contact-item a:hover { color: #fff; }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.05em;
}

.footer-legal { display: flex; gap: 1.5rem; }

.footer-legal a {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  transition: color 0.3s ease;
  letter-spacing: 0.05em;
}

.footer-legal a:hover { color: rgba(255,255,255,0.5); }

/* ============================================================
   PLACEHOLDERS
   ============================================================ */
.img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8e5e0 0%, #d5d0c8 50%, #c8c2b8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
}

.img-placeholder-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(26,26,26,0.3);
}

/* ============================================================
   RESPONSIVE MISC
   ============================================================ */
@media (max-width: 640px) {
  .hero-cta-group { flex-direction: column; align-items: flex-start; }
  .camere-header { flex-direction: column; align-items: flex-start; }
  .camere-meta { text-align: left; }
  .anima-image-accent { display: none; }
  .piscina-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
  .servizi-grid {
    grid-template-columns: 1fr;
  }
  .servizio-item {
    padding: 1.5rem 1.5rem;
  }
}
