/* ============================================================
   Digital 4 Service — Foglio di stile principale
   Cormorant Garamond (serif) + Manrope (sans)
   Palette: warm neutrals, brand-900 #1a1a18
   ============================================================ */

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

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

:root {
  --brand-50:  #f8f7f4;
  --brand-100: #f0ede7;
  --brand-200: #e2dcd3;
  --brand-300: #cec4b7;
  --brand-400: #b5a896;
  --brand-500: #9d8e7c;
  --brand-600: #8a7968;
  --brand-700: #73644f;
  --brand-800: #5e5040;
  --brand-900: #1a1a18;
  --gold: #c8a96e;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Manrope', system-ui, sans-serif;
  --max: 1200px;
  --radius: 4px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--brand-900);
  background: var(--brand-50);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── UTILITY ─────────────────────────────────────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: 16px;
}
.serif { font-family: var(--serif); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── NAV ─────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  background: rgba(248,247,244,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--brand-200);
  transition: padding .3s;
}
.nav-brand {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--brand-900);
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-700);
  transition: color .2s;
}
.nav-links a:hover { color: var(--brand-900); }
.nav-cta {
  background: var(--brand-900);
  color: var(--brand-50) !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: background .2s !important;
}
.nav-cta:hover { background: var(--brand-700) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--brand-900); margin: 5px 0; transition: .3s; }

/* ── HERO ────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding-top: 80px;
}
.hero-content {
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 60px 80px 60px;
  background: var(--brand-50);
}
.hero-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 28px;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  color: var(--brand-900);
  margin-bottom: 28px;
}
.hero-title em { font-style: italic; color: var(--brand-600); }
.hero-sub {
  font-size: 17px; line-height: 1.65; color: var(--brand-700);
  max-width: 480px; margin-bottom: 48px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-900); color: var(--brand-50);
  padding: 14px 28px; border-radius: 100px;
  font-size: 14px; font-weight: 600;
  transition: background .2s, transform .1s;
}
.btn-primary:hover { background: var(--brand-700); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--brand-300); color: var(--brand-700);
  padding: 14px 28px; border-radius: 100px;
  font-size: 14px; font-weight: 600;
  transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: var(--brand-900); color: var(--brand-900); }
.hero-image {
  position: relative; overflow: hidden;
  background: var(--brand-100);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-stats {
  display: flex; gap: 40px; margin-top: 64px; padding-top: 32px;
  border-top: 1px solid var(--brand-200);
}
.stat-item {}
.stat-num {
  font-family: var(--serif);
  font-size: 2.5rem; font-weight: 500;
  color: var(--brand-900); line-height: 1;
}
.stat-label { font-size: 12px; color: var(--brand-500); margin-top: 4px; letter-spacing: .04em; }

/* ── MANIFESTO ───────────────────────────────────── */
#manifesto { padding: 120px 0; background: var(--brand-900); }
#manifesto .container { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.manifesto-heading {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.08; color: var(--brand-50);
  letter-spacing: -.01em;
}
.manifesto-heading em { font-style: italic; color: var(--gold); }
.manifesto-body p {
  font-size: 17px; line-height: 1.75; color: var(--brand-300);
  margin-bottom: 20px;
}
.manifesto-body p:last-child { margin-bottom: 0; }

/* ── SERVICES ────────────────────────────────────── */
#servizi { padding: 120px 0; background: var(--brand-50); }
#servizi h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  margin-bottom: 16px; color: var(--brand-900);
}
#servizi .section-intro {
  font-size: 17px; color: var(--brand-600);
  max-width: 560px; margin-bottom: 64px; line-height: 1.65;
}
.services-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--brand-200);
  border-radius: 8px;
  padding: 36px 32px;
  transition: border-color .2s, box-shadow .2s;
}
.service-card:hover { border-color: var(--brand-400); box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.service-card:nth-child(1) { grid-column: span 7; }
.service-card:nth-child(2) { grid-column: span 5; }
.service-card:nth-child(3) { grid-column: span 5; }
.service-card:nth-child(4) { grid-column: span 4; }
.service-card:nth-child(5) { grid-column: span 3; }
.service-icon {
  width: 40px; height: 40px;
  background: var(--brand-100); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; font-size: 20px;
}
.service-card h3 {
  font-family: var(--serif); font-size: 1.5rem;
  margin-bottom: 12px; color: var(--brand-900);
}
.service-card p { font-size: 14px; color: var(--brand-600); line-height: 1.65; }
.service-tag {
  display: inline-block; margin-top: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand-500);
}

/* ── METHODOLOGY ─────────────────────────────────── */
#metodo { padding: 120px 0; background: var(--brand-100); }
#metodo h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  margin-bottom: 16px;
}
#metodo .section-intro {
  font-size: 17px; color: var(--brand-600);
  max-width: 560px; margin-bottom: 64px; line-height: 1.65;
}
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step-card {
  background: #fff;
  border: 1px solid var(--brand-200);
  border-radius: 8px;
  padding: 32px 28px;
}
.step-num {
  font-family: var(--serif); font-size: 3rem;
  color: var(--brand-200); line-height: 1; margin-bottom: 20px;
}
.step-card h3 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 10px; }
.step-card p { font-size: 14px; color: var(--brand-600); line-height: 1.65; }

/* ── PORTFOLIO ───────────────────────────────────── */
#portfolio { padding: 120px 0; background: var(--brand-50); }
#portfolio h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  margin-bottom: 16px;
}
#portfolio .section-intro {
  font-size: 17px; color: var(--brand-600);
  max-width: 560px; margin-bottom: 64px; line-height: 1.65;
}
.portfolio-disclaimer {
  background: var(--brand-100); border: 1px solid var(--brand-200);
  border-radius: 8px; padding: 20px 24px;
  font-size: 14px; color: var(--brand-600); margin-bottom: 40px;
  font-style: italic;
}
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.portfolio-card {
  border: 1px solid var(--brand-200);
  border-radius: 8px; overflow: hidden;
  background: #fff; transition: box-shadow .2s;
}
.portfolio-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.08); }
.portfolio-card-img {
  height: 200px;
  background: var(--brand-900);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.portfolio-card-img-inner {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-900) 100%);
  display: flex; align-items: center; justify-content: center;
}
.portfolio-card-img span {
  font-size: 48px; opacity: .3;
}
.portfolio-meta {
  padding: 4px 24px 0;
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
}
.portfolio-card-body { padding: 8px 24px 28px; }
.portfolio-card-body h3 { font-family: var(--serif); font-size: 1.35rem; margin-bottom: 8px; }
.portfolio-card-body p { font-size: 14px; color: var(--brand-600); line-height: 1.6; }
.portfolio-card-body .challenge {
  margin-top: 16px; padding: 12px 16px;
  background: var(--brand-50); border-radius: 4px;
  font-size: 13px; color: var(--brand-700); font-style: italic;
}

/* ── INVENTORY ───────────────────────────────────── */
#dotazione { padding: 120px 0; background: var(--brand-900); }
#dotazione h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  color: var(--brand-50); margin-bottom: 16px;
}
#dotazione .section-label { color: var(--brand-500); }
#dotazione .section-intro {
  font-size: 17px; color: var(--brand-400);
  max-width: 560px; margin-bottom: 64px; line-height: 1.65;
}
.inventory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.inv-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 28px 24px;
}
.inv-icon { font-size: 28px; margin-bottom: 16px; }
.inv-card h3 { font-family: var(--serif); font-size: 1.2rem; color: var(--brand-50); margin-bottom: 16px; }
.inv-card ul { list-style: none; }
.inv-card ul li {
  font-size: 13px; color: var(--brand-400);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  line-height: 1.4;
}
.inv-card ul li:last-child { border-bottom: none; }
.inv-footnote {
  margin-top: 40px; font-size: 14px; color: var(--brand-500);
  line-height: 1.6; max-width: 700px;
}

/* ── FAQ ─────────────────────────────────────────── */
#faq { padding: 120px 0; background: var(--brand-50); }
#faq h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  margin-bottom: 64px;
}
.faq-list { max-width: 800px; }
.faq-item {
  border-top: 1px solid var(--brand-200);
}
.faq-item:last-child { border-bottom: 1px solid var(--brand-200); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 24px 0; text-align: left;
  font-family: var(--serif); font-size: 1.2rem; font-weight: 500;
  color: var(--brand-900); gap: 16px;
}
.faq-q .icon {
  flex-shrink: 0; width: 24px; height: 24px;
  border: 1.5px solid var(--brand-300); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--brand-500); transition: transform .2s;
}
.faq-item.open .faq-q .icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
}
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p {
  padding-bottom: 24px;
  font-size: 15px; color: var(--brand-600); line-height: 1.75;
}

/* ── CONTACT ─────────────────────────────────────── */
#contatti { padding: 120px 0; background: var(--brand-100); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact-intro h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.5vw, 3.5rem);
  margin-bottom: 20px;
}
.contact-intro p {
  font-size: 17px; color: var(--brand-600); line-height: 1.65;
  margin-bottom: 40px;
}
.contact-email-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 1.2rem;
  color: var(--brand-900); border-bottom: 1px solid var(--brand-300);
  padding-bottom: 4px; transition: border-color .2s;
}
.contact-email-link:hover { border-color: var(--brand-900); }
.contact-note {
  margin-top: 32px; font-size: 14px; color: var(--brand-500);
  line-height: 1.65;
}
.contact-form { background: #fff; border: 1px solid var(--brand-200); border-radius: 8px; padding: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-500); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--brand-200);
  border-radius: var(--radius);
  font-family: var(--sans); font-size: 15px;
  color: var(--brand-900); background: var(--brand-50);
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--brand-900); background: #fff; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-submit {
  width: 100%;
  background: var(--brand-900); color: var(--brand-50);
  padding: 16px 28px; border: none; border-radius: 100px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .2s;
  margin-top: 8px;
}
.form-submit:hover { background: var(--brand-700); }
.form-success {
  display: none;
  text-align: center; padding: 32px;
  font-size: 16px; color: var(--brand-600);
}
.form-success.show { display: block; }
.form-fields.hidden { display: none; }

/* ── FOOTER ──────────────────────────────────────── */
footer {
  background: var(--brand-900);
  padding: 60px 0 32px;
  color: var(--brand-400);
}
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 48px; gap: 40px; flex-wrap: wrap; }
.footer-brand { font-family: var(--serif); font-size: 1.4rem; color: var(--brand-50); margin-bottom: 8px; }
.footer-tagline { font-size: 13px; color: var(--brand-500); max-width: 280px; line-height: 1.5; }
.footer-nav h4 { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-500); margin-bottom: 16px; }
.footer-nav ul { list-style: none; }
.footer-nav ul li { margin-bottom: 10px; }
.footer-nav ul li a { font-size: 14px; color: var(--brand-400); transition: color .2s; }
.footer-nav ul li a:hover { color: var(--brand-50); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-legal { font-size: 12px; color: var(--brand-600); line-height: 1.6; }
.footer-privacy-link { font-size: 12px; color: var(--brand-500); transition: color .2s; }
.footer-privacy-link:hover { color: var(--brand-300); }

/* ── PRIVACY PAGE ────────────────────────────────── */
.privacy-page { padding: 140px 0 80px; max-width: 760px; margin: 0 auto; }
.privacy-page h1 { font-family: var(--serif); font-size: 3rem; margin-bottom: 12px; }
.privacy-page .updated { font-size: 13px; color: var(--brand-500); margin-bottom: 48px; }
.privacy-page h2 { font-family: var(--serif); font-size: 1.6rem; margin: 40px 0 16px; }
.privacy-page h3 { font-size: 1rem; font-weight: 600; margin: 28px 0 10px; }
.privacy-page p { font-size: 15px; color: var(--brand-700); line-height: 1.75; margin-bottom: 16px; }
.privacy-page ul { padding-left: 20px; margin-bottom: 16px; }
.privacy-page ul li { font-size: 15px; color: var(--brand-700); line-height: 1.75; margin-bottom: 6px; }
.privacy-page a { color: var(--brand-900); text-decoration: underline; }

/* ── SCROLL-IN ANIMATIONS ────────────────────────── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1024px) {
  #hero { grid-template-columns: 1fr; }
  .hero-content { padding: 80px 40px 60px; }
  .hero-image { height: 400px; }
  #manifesto .container { grid-template-columns: 1fr; gap: 40px; }
  .services-bento { grid-template-columns: 1fr 1fr; }
  .service-card:nth-child(n) { grid-column: span 6; }
  .service-card:nth-child(5) { grid-column: span 12; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .inventory-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  nav { padding: 16px 24px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--brand-50); border-bottom: 1px solid var(--brand-200); padding: 20px 24px; gap: 16px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero-content { padding: 60px 24px 48px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .services-bento { grid-template-columns: 1fr; }
  .service-card:nth-child(n) { grid-column: span 1; }
  .steps-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .inventory-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
