/* ══════════════════════════════════════
   BORGHI VIVI — v3
   Fraunces + Inter + IBM Plex Mono
   Palette: Pergamena · Inchiostro · Ruggine · Cenere · Seppia
   ══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;1,9..144,400&family=Inter:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --pergamena: #EDE5D3;
  --inchiostro: #1D2138;
  --ruggine: #A44A2E;
  --ruggine-light: #C05A3A;
  --ruggine-faint: rgba(164,74,46,0.07);
  --ruggine-glow: rgba(164,74,46,0.15);
  --cenere: #6E6A62;
  --seppia: #7A4E2D;
  --bianco: #FAFAF7;
  --pergamena-chiara: #F5F0E6;
  --border-soft: rgba(29,33,56,0.08);
  --border-warm: rgba(122,78,45,0.15);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--pergamena);
  color: var(--inchiostro);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── TIPOGRAFIA ── */
h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--inchiostro);
}
h1 { font-size: clamp(2.8rem, 5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; font-weight: 600; }
h1 em, h2 em { font-style: italic; color: var(--ruggine); }
h3 em { font-style: normal; color: var(--ruggine); }

p { max-width: 600px; color: var(--cenere); }
p + p { margin-top: 1rem; }
strong { font-weight: 500; color: var(--inchiostro); }

a { color: var(--ruggine); text-decoration: none; transition: all 0.25s ease; }
a:hover { color: var(--ruggine-light); }

/* ── MONO LABELS ── */
.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ── NAV ── */
nav {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.6rem 0.5rem 0.8rem;
  background: rgba(237,229,211,0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 20px rgba(29,33,56,0.06);
  width: fit-content;
  max-width: calc(100vw - 2rem);
}
.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  margin-right: 1.2rem; text-decoration: none;
}
.nav-logo-img { height: 30px; width: auto; border-radius: 4px; }
.nav-logo-text {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem; font-weight: 700;
  color: var(--inchiostro);
}
.nav-links {
  display: flex; align-items: center; gap: 0.2rem;
  list-style: none;
}
.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem; font-weight: 400;
  color: var(--cenere); text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: all 0.25s ease;
}
.nav-links a:hover { color: var(--inchiostro); background: rgba(29,33,56,0.04); }
.nav-links a.active { color: var(--inchiostro); font-weight: 500; background: rgba(29,33,56,0.05); }
.nav-cta {
  background: var(--inchiostro) !important; color: var(--pergamena) !important;
  padding: 0.45rem 1.2rem !important;
  font-weight: 500 !important;
}
.nav-cta:hover { background: #2A2E4A !important; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--inchiostro); margin: 4px 0; }

@media (max-width: 900px) {
  nav { top: 12px; padding: 0.5rem 0.6rem 0.5rem 0.8rem; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(237,229,211,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column; gap: 0;
    justify-content: center; align-items: center;
    z-index: 200;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.2rem; padding: 1rem; }
  .nav-logo-text { font-size: 0.95rem; }
}

/* ── HERO ── */
.hero-overlay {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--pergamena);
  padding-top: 80px;
  display: flex; flex-direction: column;
  justify-content: center;
}
.hero-main-text {
  position: relative;
  padding: 4rem 4vw 0;
  z-index: 1;
}
.hero-line {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 7.5vw, 8rem);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.hero-line-dark { color: var(--inchiostro); }
.hero-line-accent { color: var(--ruggine); font-style: italic; }
.hero-image {
  position: absolute;
  right: 3%;
  top: 50%;
  transform: translateY(-50%);
  width: 36%; max-width: 440px;
  z-index: 2;
  pointer-events: none;
}
.hero-image img {
  width: 100%; display: block;
  mix-blend-mode: screen;
}
.hero-bottom {
  position: relative; z-index: 3;
  padding: 3rem 8vw 5rem;
  display: flex; gap: 3rem; align-items: flex-start;
}
.hero-bottom-left { max-width: 420px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cenere); margin-bottom: 1rem;
}
.hero-tag::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--ruggine);
}
.hero-body {
  font-size: 1rem; color: var(--cenere);
  line-height: 1.85; margin-bottom: 2rem;
}

/* ── RECANATI SECTION ── */
.recanati-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center; margin-top: 2rem;
}
.recanati-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(29,33,56,0.1);
}
.recanati-img img { width: 100%; display: block; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500; font-size: 0.88rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.3s ease;
  border: none; cursor: pointer;
}
.btn-primary {
  background: var(--ruggine); color: var(--pergamena);
  box-shadow: 0 4px 16px rgba(164,74,46,0.2);
}
.btn-primary:hover {
  background: var(--ruggine-light); color: var(--pergamena);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(164,74,46,0.25);
}
.btn-primary::after { content: '→'; margin-left: 0.3rem; }
.btn-dark {
  background: var(--inchiostro); color: var(--pergamena);
}
.btn-dark:hover { background: #2A2E4A; color: var(--pergamena); transform: translateY(-2px); }
.btn-dark::after { content: '→'; margin-left: 0.3rem; }
.btn-ghost {
  color: var(--cenere); font-size: 0.85rem; font-weight: 400;
  padding: 0; border-radius: 0;
  border-bottom: 1px solid rgba(29,33,56,0.2);
}
.btn-ghost:hover { color: var(--ruggine); border-color: var(--ruggine); }

.btn-row { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }

/* ── SEZIONI ── */
section { padding: 6rem 8vw; }
.section-wide { max-width: 1080px; margin: 0 auto; }

.section-label {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ruggine); margin-bottom: 1.2rem;
}
.section-label::before {
  content: ''; width: 20px; height: 1.5px;
  background: var(--ruggine);
}

.bg-white { background: var(--bianco); }
.bg-pergamena { background: var(--pergamena); }
.bg-chiara { background: var(--pergamena-chiara); }
.bg-dark {
  background: var(--inchiostro);
  border-radius: var(--radius); margin: 0 2rem;
}
.bg-dark h2, .bg-dark h3 { color: var(--pergamena); }
.bg-dark .section-label { color: var(--seppia); }
.bg-dark .section-label::before { background: var(--seppia); }
.bg-dark p { color: rgba(237,229,211,0.5); }
.bg-dark .card-num { color: var(--ruggine); opacity: 0.3; }

/* ── CARDS ── */
.card-grid { display: grid; gap: 1.2rem; margin-top: 2.5rem; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  padding: 2rem 1.8rem;
  background: var(--bianco);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}
.card:hover {
  border-color: var(--border-warm);
  box-shadow: 0 8px 30px rgba(164,74,46,0.06);
  transform: translateY(-2px);
}
.card p { font-size: 0.88rem; line-height: 1.7; }

.card-dark {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(237,229,211,0.08);
  border-radius: var(--radius);
}
.card-dark:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(164,74,46,0.3);
  transform: translateY(-2px);
}
.card-dark h3 { color: var(--pergamena); }
.card-dark p { color: rgba(237,229,211,0.45); }

.card-num {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem; font-weight: 700;
  color: var(--ruggine); opacity: 0.15;
  line-height: 1; margin-bottom: 0.8rem;
}

/* ── PARTNER ── */
.partner-row {
  display: flex; align-items: center; justify-content: center;
  gap: 3rem; flex-wrap: wrap; margin-top: 2rem;
}
.partner-item {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem; font-weight: 500;
  color: var(--inchiostro); opacity: 0.25;
  letter-spacing: 0.05em;
  transition: opacity 0.3s;
}
.partner-item:hover { opacity: 0.5; }

/* ── TWO-COL ── */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5rem; align-items: start; margin-top: 2.5rem;
}

/* ── STEPS ── */
.steps { display: flex; flex-direction: column; margin-top: 2rem; }
.step {
  display: flex; gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 38px; height: 38px; min-width: 38px;
  border-radius: var(--radius-sm);
  background: var(--ruggine);
  display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem; font-weight: 500; color: var(--pergamena);
}
.step h4 {
  font-family: 'Fraunces', serif;
  font-size: 1rem; font-weight: 600;
  color: var(--inchiostro); margin-bottom: 0.3rem;
}
.step p { font-size: 0.88rem; }

/* ── FAQ ── */
.faq { margin-top: 2.5rem; }
.faq-item { padding: 1.5rem 0; border-bottom: 1px solid var(--border-soft); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-family: 'Fraunces', serif;
  font-size: 1rem; font-weight: 600;
  color: var(--inchiostro); margin-bottom: 0.5rem;
}
.faq-a { font-size: 0.9rem; line-height: 1.8; }

/* ── FORM ── */
.form-wrap { max-width: 460px; }
form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--cenere);
}
input, textarea {
  background: var(--bianco);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  font-size: 0.9rem; font-family: 'Inter', sans-serif;
  color: var(--inchiostro); outline: none;
  transition: all 0.25s ease;
}
input:focus, textarea:focus {
  border-color: var(--ruggine);
  box-shadow: 0 0 0 3px var(--ruggine-glow);
}
textarea { resize: vertical; min-height: 100px; }
.submit-btn {
  background: var(--ruggine); color: var(--pergamena); border: none;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-pill);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: all 0.3s ease;
  width: fit-content;
  box-shadow: 0 4px 16px rgba(164,74,46,0.18);
}
.submit-btn:hover {
  background: var(--ruggine-light);
  transform: translateY(-2px);
}
.submit-btn::after { content: ' →'; }
.form-note { font-size: 0.72rem; color: var(--cenere); margin-top: 0.2rem; }

/* ── HIGHLIGHT BOX ── */
.highlight-box {
  background: var(--ruggine-faint);
  border: 1px solid rgba(164,74,46,0.12);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  font-size: 0.9rem; color: var(--cenere); line-height: 1.75;
}
.highlight-box strong { color: var(--ruggine); font-weight: 500; }

/* ── CONTACT ── */
.contact-emails { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.2rem; }
.contact-email { display: flex; flex-direction: column; gap: 0.15rem; }
.contact-email a { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 600; }
.contact-email span { font-size: 0.82rem; color: var(--cenere); }

/* ── FOOTER ── */
footer {
  background: var(--inchiostro);
  color: rgba(237,229,211,0.3);
  padding: 3rem 8vw;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: 0 2rem;
}
.footer-logo {
  display: flex; align-items: center; gap: 0.5rem;
}
.footer-logo-img {
  height: 26px; width: auto; border-radius: 3px;
  filter: brightness(4) saturate(0.3);
  opacity: 0.7;
}
.footer-logo-text {
  font-family: 'Fraunces', serif;
  font-size: 1rem; font-weight: 700;
  color: var(--pergamena);
}
.footer-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem;
}
.footer-right a { color: rgba(237,229,211,0.5); text-decoration: none; transition: color 0.2s; }
.footer-right a:hover { color: var(--ruggine); }
.footer-mid { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.03em; }

/* ── PAGE HEADER ── */
.page-header { padding: 9rem 8vw 3.5rem; }
.page-header h1 { margin-bottom: 1rem; }
.page-header p { font-size: 1.05rem; max-width: 520px; line-height: 1.85; }

/* ── CTA BANNER ── */
.cta-banner {
  background: var(--pergamena-chiara);
  border-radius: var(--radius); margin: 0 2rem;
  padding: 5rem 8vw; text-align: center;
}
.cta-banner p { margin: 1rem auto 2rem; text-align: center; max-width: 460px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 3rem; }
  .card-grid-3, .card-grid-2 { grid-template-columns: 1fr; }
  section { padding: 4rem 6vw; }
  .page-header { padding: 7rem 6vw 2.5rem; }
  .bg-dark, footer, .cta-banner { margin: 0; border-radius: 0; }
  .hero-overlay { min-height: auto; }
  .hero-line { font-size: 5vw; }
  .hero-image { width: 40%; right: 0; }
  .hero-bottom { flex-direction: column; gap: 2rem; }
  .partner-row { gap: 2rem; }
  .recanati-layout { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .hero-line { font-size: 3rem; white-space: normal; }
  .hero-image { width: 45%; right: -2%; opacity: 0.4; }
  .hero-body { font-size: 0.92rem; }
  .hero-main-text { padding: 3rem 6vw 0; }
  .hero-bottom { padding: 2rem 6vw 3rem; }
  h2 { font-size: 1.6rem; }
  .btn-row { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .partner-row { flex-direction: column; gap: 1rem; }
  footer { flex-direction: column; gap: 1.2rem; text-align: center; }
  .footer-right { align-items: center; }
  .footer-logo { justify-content: center; }
  .contact-emails { gap: 1.5rem; }
  .form-wrap { max-width: 100%; }
  .cta-banner { padding: 3rem 6vw; }
  .page-header { padding: 6rem 6vw 2rem; }
  .page-header h1 { font-size: 2rem; }
  .page-header p { font-size: 0.95rem; }
  .card { padding: 1.5rem; }
  .step { gap: 1rem; }
  .grazie-card { padding: 2.5rem 1.5rem; }
  .grazie-card h1 { font-size: 1.4rem; }
}

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0; transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
}
.fade-up:nth-child(2) { animation-delay: 0.12s; }
.fade-up:nth-child(3) { animation-delay: 0.24s; }
.fade-up:nth-child(4) { animation-delay: 0.36s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Grazie page */
.grazie-wrap {
  min-height: 85vh; display: flex;
  align-items: center; justify-content: center;
  padding: 6rem 2rem 4rem;
}
.grazie-card {
  background: var(--bianco);
  border-radius: var(--radius);
  padding: 3.5rem 3rem; max-width: 520px; width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(29,33,56,0.06);
  border: 1px solid var(--border-soft);
}
.grazie-check {
  width: 56px; height: 56px;
  background: var(--ruggine); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.8rem; font-size: 1.4rem; color: var(--pergamena);
}
.grazie-card h1 { font-size: 1.7rem; margin-bottom: 0.8rem; }
.grazie-card > p { margin: 0 auto; text-align: center; }
.grazie-steps {
  background: var(--pergamena); border-radius: var(--radius-sm);
  padding: 1.5rem; text-align: left; margin: 2rem 0;
}
