/* ==========================================================================
   Casa in Centro a Rovigo — stylesheet
   ========================================================================== */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #23211d;
  --muted: #6b6560;
  --border: #e6ded2;
  --accent: #a8562f;
  --accent-dark: #8a4425;
  --deep: #2f3b33;
  --deep-light: #3d4b41;
  --cream: #f6f1e7;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px -12px rgba(35, 33, 29, 0.18);
  --shadow-sm: 0 4px 14px -6px rgba(35, 33, 29, 0.15);
  --maxw: 1180px;
  --font-head: "Manrope", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
/* Lo scroll fluido verso le ancore è gestito via JS (vedi main.js):
   scroll-behavior: smooth in CSS impedisce lo scroll nativo al click
   su link "#ancora" quando la distanza da percorrere è grande. */

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 0.6em;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(246,241,231,0.55);
}
.btn-outline:hover { background: rgba(246,241,231,0.12); }
.btn-block { width: 100%; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--deep);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand small { display: block; font-weight: 600; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.03em; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:hover { color: var(--accent-dark); text-decoration: none; }
.header-cta { display: flex; align-items: center; gap: 16px; }
.header-price {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--deep);
  font-size: 1.05rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: 0.2s;
}
.nav-toggle span::before { position: absolute; top: -7px; width: 24px; }
.nav-toggle span::after { position: absolute; top: 7px; width: 24px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--cream);
  padding: 150px 0 110px;
  background:
    linear-gradient(180deg, rgba(20,22,18,0.62) 0%, rgba(20,22,18,0.72) 55%, rgba(20,22,18,0.88) 100%),
    url("../img/hero.jpg") center 62% / cover no-repeat;
}
.hero-inner { max-width: 760px; }
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  color: #fff;
}
.hero .lead {
  font-size: 1.15rem;
  color: rgba(246,241,231,0.92);
  max-width: 620px;
  margin-bottom: 1.6em;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 2em;
}
.badge {
  background: rgba(246,241,231,0.14);
  border: 1px solid rgba(246,241,231,0.3);
  color: var(--cream);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.hero-price-card {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  background: rgba(246,241,231,0.1);
  border: 1px solid rgba(246,241,231,0.28);
  border-radius: var(--radius);
  padding: 16px 22px;
  margin-bottom: 1.8em;
}
.hero-price-card .amount {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.hero-price-card .amount-note { color: rgba(246,241,231,0.8); font-size: 0.9rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head { max-width: 700px; margin-bottom: 2.6em; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Description ---------- */
.description-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: start;
}
.description-text p { margin: 0 0 1.2em; color: var(--text); }
.description-text .note {
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  margin-top: 1.6em;
}

.facts-card {
  background: var(--deep);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.facts-card h3 { color: #fff; font-size: 1.1rem; margin-bottom: 1em; }
.facts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.facts-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.95rem;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(246,241,231,0.14);
}
.facts-list li:last-child { border-bottom: none; padding-bottom: 0; }
.facts-list .k { color: rgba(246,241,231,0.72); }
.facts-list .v { font-weight: 700; text-align: right; }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature h3 { font-size: 1.02rem; margin-bottom: 0.4em; }
.feature p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  border: none;
  padding: 0;
  background: var(--border);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .zoom-hint {
  position: absolute;
  inset: auto 8px 8px auto;
  background: rgba(20,22,18,0.55);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.gallery-item:hover .zoom-hint, .gallery-item:focus-visible .zoom-hint { opacity: 1; }

/* ---------- Floor plan ---------- */
.plan-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.plan-block img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: #fff;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15,15,13,0.94);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(92vw, 1400px); max-height: 88vh; text-align: center; }
.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 6px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.22); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; max-width: 780px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 700;
  font-family: var(--font-head);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { transition: transform 0.2s; color: var(--accent-dark); flex-shrink: 0; }
.faq-item[open] summary .chev { transform: rotate(45deg); }
.faq-item .faq-answer { padding: 0 22px 20px; color: var(--muted); margin: 0; }
.faq-empty {
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
}
.contact-info {
  background: var(--deep);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 34px;
}
.contact-info h3 { color: #fff; }
.contact-info p { color: rgba(246,241,231,0.85); }
.contact-info .contact-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(246,241,231,0.14);
  font-size: 0.88rem;
  color: rgba(246,241,231,0.68);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--text);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; font-size: 0.86rem; color: var(--muted); }
.checkbox-field input { width: auto; margin-top: 3px; }
.form-msg { margin-top: 14px; font-size: 0.9rem; }
.form-msg.success { color: #2e6b3e; }
.form-msg.error { color: #b03434; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 500;
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0 0 16px; font-size: 0.92rem; color: var(--text); }
.cookie-banner-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.btn-outline-dark {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline-dark:hover { background: var(--cream); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep);
  color: rgba(246,241,231,0.75);
  padding: 46px 0 28px;
  font-size: 0.9rem;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(246,241,231,0.12);
  margin-bottom: 20px;
}
.footer-brand { color: #fff; font-family: var(--font-head); font-weight: 800; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: rgba(246,241,231,0.75); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; color: rgba(246,241,231,0.55); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .description-grid, .plan-block, .contact-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .plan-block { text-align: center; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .header-price { display: none; }
  body.nav-open .main-nav {
    display: flex;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 18px 24px 26px;
    gap: 18px;
  }
  .hero { padding: 120px 0 80px; }
  .feature-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
  section { padding: 56px 0; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 420px) {
  .gallery-grid { gap: 10px; }
}
