/* =============================================
   CAMPUSUITE – Stylesheet
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #F5F2ED;
  --surface:   #FFFFFF;
  --ink:       #1C1A17;
  --ink-muted: #6B6760;
  --accent:    #B8924A;
  --accent-light: #EDE4D4;
  --border:    #DDD8CF;
  --radius:    10px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --nav-h: 72px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── UTILITIES ──────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 48px;
}
.section-title em { font-style: italic; color: var(--accent); }

/* ── BUTTONS ────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover { background: #333; transform: translateY(-1px); }
.btn-primary.light { background: #fff; color: var(--ink); }
.btn-primary.light:hover { background: var(--accent-light); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--border);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 13px 26px;
  border-radius: 4px;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--accent-light); }

/* ── NAVIGATION ─────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(245, 242, 237, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 40px;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
  flex: 1;
}
.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
  font-size: 13px;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  padding: 9px 20px;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity var(--transition);
  white-space: nowrap;
}
.nav-cta:hover { opacity: 0.85; }

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink);
  margin-left: auto;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 40px 24px;
  gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.mobile-cta {
  margin-top: 12px;
  text-align: center;
  background: var(--accent);
  color: #fff !important;
  padding: 12px 0 !important;
  border-radius: 4px;
  font-weight: 500;
  border: none !important;
}

/* ── HERO ───────────────────────────────────── */
.hero-wrapper {
  position: relative;
  background-image: url('home.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

/* Velatura sopra l'immagine — funziona su tutti i browser incluso Safari mobile */
.hero-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245, 242, 237, 0.75);
  z-index: 1;
}

/* Il contenuto deve stare sopra la velatura */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.2;
  z-index: 1;
  pointer-events: none;
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero-title em { font-style: italic; color: var(--accent); font-weight: 400; }

.hero-sub {
  font-size: 17px;
  color: var(--ink-muted);
  max-width: 460px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { display: flex; flex-direction: column; gap: 20px; }

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.hero-card-img { height: 220px; background: var(--accent-light); }
.hero-placeholder, .photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-muted);
  font-size: 13px;
}
.hero-placeholder svg { width: 60px; opacity: 0.4; }

.hero-card-body { padding: 16px 20px; }
.hero-card-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-muted); margin-bottom: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot.green { background: #3DAA6A; }
.hero-card-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.hero-card-detail { font-size: 13px; color: var(--ink-muted); }

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--surface);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.stat-n { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--ink); }
.stat-l { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-top: 2px; }

/* ── WHY SECTION ────────────────────────────── */
.why {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.why-card {
  background: var(--surface);
  padding: 36px 28px;
  transition: background var(--transition);
}
.why-card:hover { background: var(--accent-light); }
.why-icon { width: 44px; margin-bottom: 16px; color: var(--accent); }
.why-icon svg { width: 100%; }
.why-card h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.why-card p { font-size: 14px; color: var(--ink-muted); line-height: 1.65; }

/* ── BANNER CTA ─────────────────────────────── */
.banner { background: var(--ink); padding: 72px 0; }
.banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 10px;
}
.banner h2 em { font-style: italic; color: var(--accent); }
.banner p { font-size: 15px; color: rgba(255,255,255,0.6); }

/* ── PAGE HERO (inner pages) ────────────────── */
.page-hero { padding: 80px 0 64px; border-bottom: 1px solid var(--border); }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  margin: 10px 0 16px;
}
.page-title em { font-style: italic; color: var(--accent); }
.page-sub { font-size: 16px; color: var(--ink-muted); }

/* ── GALLERY ───────────────────────────────── */
.gallery-section { padding: 72px 0; border-bottom: 1px solid var(--border); }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.gallery-main { height: 500px; background: var(--accent-light); border-radius: var(--radius); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-main svg { width: 70px; opacity: 0.3; }
.gallery-thumbs { display: grid; grid-template-rows: 160px 160px 160px; gap: 12px; }
.gallery-thumb { background: var(--accent-light); border-radius: var(--radius); overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb svg { width: 40px; opacity: 0.3; }
.gallery-thumb span { font-size: 12px; }

/* ── SERVICES ────────────────────────────────  */
.services-section { padding: 100px 0; background: var(--surface); border-top: 1px solid var(--border); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.service-item:hover { background: var(--accent-light); }
.service-item:nth-child(3n) { border-right: none; }
.service-item:nth-child(n+7) { border-bottom: none; }
.service-icon { flex-shrink: 0; width: 36px; color: var(--accent); margin-top: 3px; }
.service-icon svg { width: 100%; }
.service-item h4 { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.service-item p { font-size: 13px; color: var(--ink-muted); line-height: 1.55; }

/* ── FLOOR PLAN ──────────────────────────────  */
.floorplan-section { padding: 100px 0; }
.floorplan-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: center;
}
.floorplan-legend { list-style: none; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; }
.floorplan-legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-muted); }
.legend-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }
.floorplan-note { font-size: 13px; color: var(--ink-muted); font-style: italic; margin-top: 8px; }
.floorplan-image img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.floorplan-placeholder {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--ink-muted);
  background: var(--surface);
}
.floorplan-placeholder svg { width: 100%; max-width: 340px; color: var(--ink-muted); opacity: 0.7; }
.floorplan-placeholder p { font-size: 13px; color: var(--ink-muted); }
.replace-hint { font-size: 11px; color: var(--accent); font-family: monospace; background: var(--accent-light); padding: 4px 8px; border-radius: 4px; text-align: center; }

/* ── CONTACT PAGE ────────────────────────────  */
.contact-section { padding: 80px 0 100px; }
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.8fr; gap: 80px; align-items: start; }
.contact-info h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: 32px; }
.contact-detail { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.contact-detail svg { width: 20px; flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.contact-detail strong { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 3px; }
.contact-detail p { font-size: 14px; line-height: 1.6; }

.contact-form-wrapper { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; }
.contact-form { display: flex; flex-direction: column; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.full { grid-column: 1/-1; }
.form-group label { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.form-group label span { color: var(--accent); }
.form-group input, .form-group textarea {
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); background: #fff; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #B5B0A8; }

.btn-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ink); color: #fff; border: none; border-radius: 6px;
  padding: 15px 28px; font-family: var(--font-body); font-size: 15px;
  font-weight: 500; cursor: pointer;
  transition: background var(--transition), transform var(--transition); width: 100%;
}
.btn-submit:hover { background: #333; transform: translateY(-1px); }
.btn-submit svg { width: 18px; }

.form-error { background: #FFF0F0; border: 1px solid #F0BEBE; color: #C0392B; padding: 12px 16px; border-radius: 6px; font-size: 14px; margin-bottom: 8px; }
.form-success { text-align: center; padding: 20px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.form-success svg { width: 52px; color: #3DAA6A; }
.form-success h3 { font-family: var(--font-display); font-size: 1.8rem; }
.form-success p { color: var(--ink-muted); font-size: 15px; }

/* ── FOOTER ──────────────────────────────────  */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 13px; color: var(--ink-muted); }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { font-size: 13px; color: var(--ink-muted); text-decoration: none; transition: color var(--transition); }
.footer-nav a:hover { color: var(--ink); }

/* ── RESPONSIVE ──────────────────────────────  */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 60px 24px; gap: 48px; min-height: auto; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service-item:nth-child(3n) { border-right: 1px solid var(--border); }
  .service-item:nth-child(2n) { border-right: none; }
  .floorplan-wrapper { grid-template-columns: 1fr; gap: 40px; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: block; }
  .nav { padding: 0 24px; }
  .container { padding: 0 20px; }
  .why-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .service-item:nth-child(n) { border-right: none; }
  .banner-inner { flex-direction: column; text-align: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .contact-form-wrapper { padding: 24px; }
}

/* ── ENTRANCE ANIMATIONS ─────────────────────  */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-content > * { animation: fadeUp 0.7s ease both; }
.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-content > *:nth-child(3) { animation-delay: 0.25s; }
.hero-content > *:nth-child(4) { animation-delay: 0.35s; }
.hero-visual { animation: fadeUp 0.8s 0.2s ease both; }

/* ── FIX HERO MOBILE ─────────────────────────  */
@media (max-width: 640px) {
  .hero-wrapper {
    background-position: 65% center;
    background-attachment: scroll;
  }
}