/* ==========================================================
   Teddy House Ortigia — style.css
   Palette: avorio caldo, inchiostro, verde-mare, terracotta
   ========================================================== */

:root {
  --ivory: #f7f4ee;
  --ivory-deep: #efe9df;
  --ink: #23272c;
  --ink-soft: #4c5158;
  --sea: #2e6470;
  --sea-dark: #224b54;
  --terra: #c2764f;
  --line: #ddd5c8;
  --white: #ffffff;
  --shadow: 0 20px 60px rgba(35, 39, 44, .12);
  --radius: 14px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: min(1180px, 92%);
  max-width: 1180px;
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
}

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }

.intro { background: var(--ivory); }

/* ---------- Tipografia ---------- */

h1, h2, h3, .footer-logo {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: .01em;
}

h1 { font-size: clamp(2.6rem, 6.5vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }

.lead { font-size: 1.12rem; }

.kicker {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1rem;
}
.kicker.light { color: #e8c8ab; }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

/* ---------- Bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 2rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .04em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--sea);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(46, 100, 112, .35);
}
.btn-primary:hover { background: var(--sea-dark); }

.btn-ghost {
  border-color: rgba(255, 255, 255, .65);
  color: var(--white);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }

.btn-outline {
  border-color: var(--sea);
  color: var(--sea);
}
.btn-outline:hover { background: var(--sea); color: var(--white); }

.btn-small { padding: .55rem 1.4rem; font-size: .85rem; }

.btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; fill: none; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.1rem 0;
  margin-bottom: calc(-1 * var(--header-h, 90px));
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
}

/* Se il sito gira dentro WordPress e si è collegati come amministratori,
   la barra di amministrazione di WordPress occupa la parte alta dello schermo:
   il menu si aggancia subito sotto invece di sovrapporsi. Non ha alcun effetto
   per i visitatori del sito, che non vedono quella barra. */
body.admin-bar .th-site .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .th-site .site-header { top: 46px; }
}

.site-header.scrolled {
  background: rgba(247, 244, 238, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(35, 39, 44, .08);
  padding: .65rem 0;
}

.header-inner {
  width: min(1280px, 94%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: .7rem; }

.brand-mark {
  width: 46px; height: 46px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  transition: color .35s ease;
}
.brand-text em { font-style: italic; font-weight: 400; }
.site-header.scrolled .brand-text { color: var(--ink); }

.main-nav { display: flex; gap: 2.2rem; }

.main-nav a {
  font-size: .92rem;
  font-weight: 400;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .92);
  position: relative;
  transition: color .35s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 1.5px;
  background: var(--terra);
  transition: width .3s ease;
}
.main-nav a:hover::after { width: 100%; }
.site-header.scrolled .main-nav a { color: var(--ink-soft); }

.header-actions { display: flex; align-items: center; gap: .9rem; }

.lang-select { position: relative; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid rgba(255, 255, 255, .55);
  background: transparent;
  color: var(--white);
  border-radius: 999px;
  padding: .4rem .9rem;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  cursor: pointer;
  transition: all .3s ease;
}
.lang-toggle:hover { background: rgba(255, 255, 255, .15); }
.lang-toggle svg {
  width: 13px; height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s ease;
}
.lang-select.open .lang-toggle svg { transform: rotate(180deg); }
.site-header.scrolled .lang-toggle {
  border-color: var(--line);
  color: var(--ink);
}
.site-header.scrolled .lang-toggle:hover { background: var(--ivory-deep); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 160px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  list-style: none;
  padding: .4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  z-index: 120;
}
.lang-select.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.lang-menu button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: .55rem .85rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 400;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.lang-menu button:hover { background: var(--ivory); color: var(--ink); }
.lang-menu button.active { color: var(--sea); font-weight: 500; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-burger span {
  width: 24px; height: 2px;
  background: var(--white);
  transition: all .3s ease;
}
.site-header.scrolled .nav-burger span { background: var(--ink); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; }
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: heroZoom 14s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 24, 28, .55) 0%, rgba(20, 24, 28, .25) 45%, rgba(20, 24, 28, .62) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(820px, 90%);
  padding-top: 3rem;
}

.hero-kicker {
  font-size: .85rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  font-weight: 400;
  color: #ecd9c6;
  margin-bottom: 1.4rem;
}

.hero h1 { color: var(--white); margin-bottom: 1.4rem; text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }

.hero-sub {
  font-size: 1.15rem;
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto 2.4rem;
  color: rgba(255, 255, 255, .92);
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 2.2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 44px;
  border: 1.5px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
}
.hero-scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--white);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Intro ---------- */

.intro-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}

.intro-text h2 { margin-bottom: 1.4rem; }
.intro-text p { margin-bottom: 1.1rem; color: var(--ink-soft); max-width: 520px; }

.intro-stats {
  display: flex;
  gap: 2.6rem;
  margin-top: 2.4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--sea);
  line-height: 1;
}
.stat-label {
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.intro-images { position: relative; }

.intro-img-main {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.intro-img-main img { aspect-ratio: 3 / 3.6; object-fit: cover; width: 100%; }

.intro-img-accent {
  position: absolute;
  bottom: -2.5rem; left: -3.2rem;
  width: 46%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 6px solid var(--ivory);
  box-shadow: var(--shadow);
}
.intro-img-accent img { aspect-ratio: 3 / 3.8; object-fit: cover; width: 100%; }

/* ---------- Appartamenti ---------- */

.apartments { background: var(--white); }

.apartment {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: center;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
}
.apartment + .apartment { border-top: 1px solid var(--line); }
.apartments .apartment:first-of-type { padding-top: 0; }

.apartment--reverse .apartment-info { order: 2; }
.apartment--reverse .gallery-grid { order: 1; }

.apartment-info h3 { margin: 0 0 1.1rem; }

.specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.3rem;
}
.specs li {
  font-size: .8rem;
  letter-spacing: .05em;
  padding: .32rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--ivory);
}

.apartment-info > p { color: var(--ink-soft); margin-bottom: 1.6rem; }

.amenities {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem 1.2rem;
  margin-bottom: 2rem;
}
.amenities li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .92rem;
  color: var(--ink-soft);
}
.amenities svg {
  width: 21px; height: 21px;
  flex: none;
  stroke: var(--sea);
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Gallery a mosaico: 5 visibili, il resto solo nel lightbox */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 130px;
  gap: 10px;
}

.gallery-grid a {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-grid a:nth-child(n+6) { display: none; }
.gallery-grid a:first-child { grid-column: span 2; grid-row: span 2; }

.gallery-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery-grid a:hover img { transform: scale(1.06); }

.more-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  background: rgba(28, 32, 36, .55);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: .05em;
  transition: background .3s ease;
}
.more-badge em { font-style: normal; margin-left: .35rem; font-weight: 300; }
.gallery-more:hover .more-badge { background: rgba(28, 32, 36, .38); }

/* ---------- Features ---------- */

.features { background: var(--ivory); }

.features .section-head { text-align: center; margin-inline: auto; }
.info .section-head { text-align: center; margin-inline: auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 2rem;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 62px; height: 62px;
  margin: 0 auto 1.3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ivory);
  border: 1px solid var(--line);
}
.feature-icon svg {
  width: 28px; height: 28px;
  stroke: var(--terra);
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 { font-size: 1.4rem; margin-bottom: .7rem; }
.feature-card p { font-size: .95rem; color: var(--ink-soft); }

/* ---------- Posizione ---------- */

.location { background: var(--white); }

.location-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.location-text h2 { margin-bottom: 1.3rem; }
.location-text .lead { color: var(--ink-soft); margin-bottom: 1.6rem; }

.location-address {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 1.6rem;
}
.location-address svg {
  width: 22px; height: 22px;
  flex: none;
  stroke: var(--terra);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landmarks { list-style: none; }
.landmarks li {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .98rem;
}
.landmarks li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--terra);
  flex: none;
}

.location-map {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--ivory-deep);
  aspect-ratio: 4 / 3.4;
}
.location-map iframe {
  width: 100%; height: 100%;
  border: 0;
  display: block;
  filter: saturate(.85);
}

.map-pin-shield {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  width: 50px; height: 68px;
  cursor: pointer;
}

/* ---------- Informazioni utili ---------- */

.info { background: var(--ivory); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.info-icon {
  width: 52px; height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ivory);
  border: 1px solid var(--line);
}
.info-icon svg {
  width: 24px; height: 24px;
  stroke: var(--sea);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-card h3 { font-size: 1.3rem; margin-bottom: .45rem; }
.info-card p { font-size: .95rem; color: var(--ink-soft); }

.info-card--highlight {
  grid-column: 1 / -1;
  background: #fdf6ec;
  border-color: #e8d3ba;
}
.info-card--highlight .info-icon {
  background: var(--white);
  border-color: #e8d3ba;
}
.info-card--highlight .info-icon svg { stroke: var(--terra); }

/* ---------- Booking / Contatti ---------- */

.booking {
  position: relative;
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

.booking-bg { position: absolute; inset: 0; }
.booking-bg img { width: 100%; height: 100%; object-fit: cover; }
.booking-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 42, 47, .88), rgba(26, 42, 47, .82));
}

.booking-inner { position: relative; z-index: 2; max-width: 760px; }

.booking h2 { color: var(--white); margin-bottom: 1.2rem; }
.booking .lead { color: rgba(255, 255, 255, .88); margin-bottom: 2.4rem; }

.booking-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.6rem;
}

.btn-whatsapp {
  background: #23a35a;
  color: var(--white);
  box-shadow: 0 10px 26px rgba(35, 163, 90, .4);
}
.btn-whatsapp:hover { background: #1d8a4c; }
.btn-whatsapp svg { fill: currentColor; stroke: none; }

.btn-ghost-light {
  border-color: rgba(255, 255, 255, .6);
  color: var(--white);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); }

.booking-platforms p {
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .65);
  margin-bottom: .5rem;
}

.platform-links {
  display: flex;
  gap: .9rem;
  justify-content: center;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
}
.platform-links a { border-bottom: 1px solid rgba(255, 255, 255, .4); transition: border-color .3s ease; }
.platform-links a:hover { border-color: var(--white); }
.platform-links span { color: rgba(255, 255, 255, .5); }

/* ---------- Footer ---------- */

.site-footer {
  background: #1c2124;
  color: #b9bdc2;
  padding-top: 4rem;
  font-size: .92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-logo-img {
  width: 74px; height: 74px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 1rem;
}

.footer-logo {
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: .6rem;
}
.footer-logo em { font-style: italic; font-weight: 400; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #7f858c;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  padding: .28rem 0;
  transition: color .3s ease;
}
.footer-col a:hover { color: var(--white); }

.footer-legal p { margin-bottom: .7rem; font-size: .84rem; line-height: 1.5; }
.footer-legal strong { color: #e4e6e9; font-weight: 500; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 1.4rem 0;
  text-align: center;
  font-size: .85rem;
  color: #7f858c;
}

/* ---------- Pagina legale (privacy) ---------- */

.legal-main { padding: 9.5rem 0 5rem; }
.legal-main .container { width: min(780px, 92%); }
.legal-main h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .5rem; }

.legal-updated {
  font-size: .85rem;
  letter-spacing: .06em;
  color: var(--ink-soft);
  margin-bottom: 2.6rem;
}

.legal-main h2 {
  font-size: 1.35rem;
  margin: 2.2rem 0 .7rem;
}

.legal-main p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.legal-main a {
  color: var(--sea);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-footer {
  background: #1c2124;
  color: #7f858c;
  text-align: center;
  font-size: .85rem;
  padding: 1.4rem 0;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(16, 19, 22, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }

.lb-figure {
  max-width: min(1100px, 88vw);
  max-height: 86vh;
  text-align: center;
}
.lb-figure img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  margin-inline: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lb-figure figcaption {
  margin-top: 1rem;
  color: rgba(255, 255, 255, .7);
  font-size: .9rem;
  letter-spacing: .12em;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .8);
  cursor: pointer;
  transition: color .25s ease, transform .25s ease;
  z-index: 2;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--white); }

.lb-close { top: 1.2rem; right: 1.6rem; font-size: 2.6rem; line-height: 1; }
.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  padding: 1rem;
}
.lb-prev { left: .8rem; }
.lb-next { right: .8rem; }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }

body.lb-locked { overflow: hidden; }

/* ---------- Animazioni reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg img { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .apartment,
  .apartment--reverse { grid-template-columns: 1fr; }
  .apartment--reverse .apartment-info { order: 1; }
  .apartment--reverse .gallery-grid { order: 2; }
  .gallery-grid { grid-auto-rows: 110px; }

  .intro-grid { grid-template-columns: 1fr; }
  .intro-images { max-width: 560px; }
  .intro-img-accent { left: auto; right: -1rem; bottom: -2rem; }

  .location-grid { grid-template-columns: 1fr; }

  /* Testo centrato su mobile/tablet, per coerenza con la hero sopra */
  .intro-text,
  .apartment-info,
  .location-text,
  .section-head,
  .apartments .kicker {
    text-align: center;
  }
  .section-head { margin-inline: auto; }
  .intro-text p,
  .apartment-info > p,
  .location-text .lead {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  .intro-stats,
  .specs {
    justify-content: center;
  }
  .amenities li,
  .location-address,
  .landmarks li {
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 40vw;
    background: var(--ivory);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform .4s ease;
    box-shadow: -20px 0 60px rgba(0, 0, 0, .15);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a,
  .site-header.scrolled .main-nav a {
    color: var(--ink);
    font-size: 1.15rem;
  }

  .nav-burger { display: flex; z-index: 110; }
  body.nav-open .nav-burger span { background: var(--ink); }
  body.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .header-actions .btn { display: none; }

  .features-grid { grid-template-columns: 1fr; }

  .info-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .intro-stats { gap: 1.6rem; flex-wrap: wrap; }

  .amenities { grid-template-columns: 1fr 1fr; }

  /* Niente foto a tutto schermo su mobile: si mostra intera, come un
     banner, e il testo va sotto invece che sopra — cosi non va mai tagliata. */
  .hero {
    min-height: auto;
    display: block;
    color: var(--ink);
    overflow: visible;
  }
  .hero-bg {
    position: static;
    aspect-ratio: 1600 / 1067;
    width: 100%;
    overflow: hidden;
  }
  .hero-bg img { transform: none; animation: none; }
  .hero-bg::after { display: none; }
  .hero-content {
    position: static;
    width: min(820px, 90%);
    margin-inline: auto;
    padding: 2.6rem 0 3rem;
  }
  .hero-kicker { color: var(--terra); }
  .hero h1 { color: var(--ink); text-shadow: none; }
  .hero-sub { color: var(--ink-soft); }
  .hero-scroll { display: none; }
  .hero-cta .btn-ghost { border-color: var(--sea); color: var(--sea); }
  .hero-cta .btn-ghost:hover { background: var(--sea); color: var(--white); }
}

@media (max-width: 560px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 120px;
  }
  .gallery-grid a:nth-child(n+6) { display: none; }
  .gallery-grid a:first-child { grid-column: span 2; grid-row: span 2; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }

  .hero-sub { font-size: 1.02rem; }

  .booking-cta .btn { width: 100%; justify-content: center; }
}
