:root {
  --bg: #f7f2e8;
  --bg-soft: #fffdf9;
  --bg-warm: #efe7d9;
  --card: rgba(255, 255, 255, 0.88);
  --text: #1f1d19;
  --muted: #6c665d;
  --green: #187c61;
  --green-dark: #0f614c;
  --border: rgba(24, 124, 97, 0.12);
  --shadow: 0 24px 70px rgba(31, 29, 25, 0.08);
  --container: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Manrope", system-ui, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 16px; color: var(--muted); }
h1, h2, h3, strong { color: var(--text); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { font-size: clamp(2.5rem, 4.8vw, 4.4rem); line-height: 1.03; margin: 0; letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 3vw, 3rem); line-height: 1.08; margin: 0 0 18px; letter-spacing: -0.03em; }
h3 { font-size: 1.3rem; margin: 0 0 12px; }
ul { margin: 0; padding: 0; list-style: none; }
.page-bg { position: fixed; inset: 0; pointer-events: none; z-index: -1; }
.page-bg::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(247,242,232,.56), rgba(247,242,232,.56)), url("assets/sangimignano-bg.png") center center / cover no-repeat fixed; opacity: .56; }
.page-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at top right, rgba(16,185,129,.12), transparent 28%), radial-gradient(circle at bottom left, rgba(5,150,105,.08), transparent 24%), linear-gradient(to right, rgba(16,185,129,.03) 1px, transparent 1px), linear-gradient(to bottom, rgba(16,185,129,.03) 1px, transparent 1px); background-size: auto, auto, 34px 34px, 34px 34px; opacity: .82; }
.container { width: min(calc(100% - 32px), var(--container)); margin: 0 auto; }
.section { padding: 96px 0; }
.section.alt { background: rgba(255,253,249,.76); backdrop-filter: blur(2px); }
.section.beige { background: rgba(239,231,217,.76); backdrop-filter: blur(2px); }
.site-header { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(18px); background: rgba(255,253,249,.88); border-bottom: 1px solid var(--border); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 86px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { width: 62px; height: 62px; padding: 8px; border-radius: 18px; background: white; display: grid; place-items: center; box-shadow: 0 12px 30px rgba(31,29,25,.08); border: 1px solid var(--border); flex: 0 0 auto; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; object-position: center; filter: drop-shadow(0 10px 18px rgba(31,29,25,.08)); }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-text strong { font-size: 1rem; letter-spacing: -0.02em; }
.brand-text strong span { color: var(--green); }
.brand-text small { color: #7a746c; text-transform: uppercase; letter-spacing: .2em; font-size: .68rem; }
.main-nav { display: flex; gap: 26px; font-size: .95rem; color: #5d5850; }
.main-nav a:hover { color: var(--green); }
.menu-toggle { display: none; background: white; border: 1px solid var(--border); border-radius: 14px; width: 48px; height: 48px; padding: 0; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px auto; border-radius: 999px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 18px; font-weight: 700; transition: .25s ease; border: 1px solid transparent; }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: white; border-color: var(--border); color: var(--green-dark); }
.btn-secondary:hover { background: #f6faf7; }
.card { background: rgba(255,255,255,.92); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow); }
.hero-grid, .two-col, .contacts-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 38px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: white; color: var(--green-dark); font-size: .93rem; font-weight: 600; margin-bottom: 20px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.lead { font-size: 1.12rem; max-width: 700px; margin-top: 22px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-card { padding: 24px; }
.hero-card-top { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 24px; background: #f4ecdf; border: 1px solid var(--border); }
.logo-box { width: 158px; max-width: 100%; height: 158px; border-radius: 30px; background: #fffdf9; display: grid; place-items: center; border: 1px solid var(--border); padding: 10px; flex: 0 0 auto; box-shadow: 0 12px 28px rgba(31,29,25,.06); }
.logo-box img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.caps { color: var(--green-dark); text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; margin-bottom: 4px; }
.hero-card-top h2 { font-size: 1.28rem; margin: 0; line-height: 1.35; }
.hero-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.mini-card { border-radius: 24px; padding: 18px; border: 1px solid var(--border); }
.mini-card p { font-size: .92rem; margin-bottom: 8px; }
.mini-card strong { display: block; font-size: 1rem; line-height: 1.6; }
.mini-card.warm { background: #eef8f3; }
.mini-card.dark { background: #1f1d19; }
.mini-card.dark p, .mini-card.dark strong { color: white; }
.mini-card.light { background: white; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.stat-pill { padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.8); border: 1px solid var(--border); color: #4f4a42; font-size: .94rem; box-shadow: 0 14px 30px rgba(31,29,25,.05); }
.section-kicker { color: var(--green); text-transform: uppercase; letter-spacing: .2em; font-weight: 700; font-size: .78rem; margin-bottom: 14px; }
.section-kicker.light { color: #8ee0c3; }
.about-card { padding: 26px; }
.about-highlight { background: #f4ecdf; border-radius: 20px; padding: 20px; margin-bottom: 22px; }
.about-highlight p { color: var(--green-dark); font-size: .9rem; margin-bottom: 10px; }
.about-highlight strong { font-size: 1.02rem; line-height: 1.8; }
.check-list { display: grid; gap: 12px; }
.check-list li { display: flex; align-items: center; gap: 10px; color: #3f3a34; }
.check-list li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(24,124,97,.12); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head.narrow { display: block; }
.pill { display: inline-flex; align-items: center; padding: 10px 14px; border-radius: 999px; background: white; border: 1px solid var(--border); color: var(--green-dark); font-size: .9rem; }
.services-grid, .projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.service-card, .project-card { overflow: hidden; }
.service-image, .project-image { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #ddd; }
.project-image { aspect-ratio: 4 / 3; }
.service-image img, .project-image img { width: 100%; height: 100%; object-fit: cover; }
.service-image::after, .project-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(31,29,25,.62), transparent 60%); }
.service-label, .project-image span { position: absolute; left: 16px; top: 16px; z-index: 1; display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--green-dark); font-size: .78rem; font-weight: 700; box-shadow: 0 8px 24px rgba(31,29,25,.12); }
.project-image span { top: auto; bottom: 16px; }
.service-tags { position: absolute; left: 16px; bottom: 16px; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.service-tags span { background: rgba(255,255,255,.92); color: var(--green-dark); border-radius: 999px; padding: 7px 11px; font-size: .72rem; font-weight: 700; }
.energy-box { position: absolute; left: 16px; bottom: 16px; z-index: 1; background: rgba(255,255,255,.94); padding: 12px; border-radius: 18px; min-width: 168px; box-shadow: 0 10px 28px rgba(31,29,25,.18); }
.energy-box p { color: #3b362f; font-size: .76rem; font-weight: 700; margin-bottom: 6px; }
.energy-box div { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.energy-box span { width: 24px; font-size: .72rem; font-weight: 700; }
.energy-box i { display: block; height: 8px; border-radius: 999px; }
.e1 { width: 34px; background: #15803d; }
.e2 { width: 42px; background: #16a34a; }
.e3 { width: 50px; background: #22c55e; }
.e4 { width: 58px; background: #84cc16; }
.e5 { width: 66px; background: #eab308; }
.e6 { width: 74px; background: #facc15; }
.e7 { width: 82px; background: #f59e0b; }
.e8 { width: 90px; background: #f97316; }
.e9 { width: 100px; background: #ea580c; }
.e10 { width: 110px; background: #dc2626; }
.service-content, .project-content { padding: 22px; }
.service-content ul { display: grid; gap: 8px; margin-top: 16px; }
.service-content li { display: flex; gap: 10px; color: #4b453d; font-size: .95rem; }
.service-content li::before { content: ""; width: 8px; height: 8px; margin-top: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); }
.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.step-card { padding: 22px; }
.step-card span { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 16px; background: var(--green); color: white; font-weight: 800; margin-bottom: 16px; }
.faq-list { display: grid; gap: 16px; }
.faq-card { padding: 22px; }
.contacts { background: rgba(28,27,23,.90); color: white; backdrop-filter: blur(2px); }
.contacts h2, .contacts strong, .contacts p, .contact-list li, .contact-list span { color: white; }
.contact-list { display: grid; gap: 14px; margin-top: 26px; }
.contact-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid rgba(255,255,255,.12); padding-bottom: 12px; }
.contact-form { padding: 24px; background: white; }
.contact-form label { display: block; margin-bottom: 14px; }
.contact-form span { display: block; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.contact-form input, .contact-form textarea { width: 100%; border: 1px solid rgba(24,124,97,.18); border-radius: 16px; padding: 14px 16px; font: inherit; color: var(--text); background: white; }
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid rgba(24,124,97,.18); border-color: var(--green); }
.site-footer { background: rgba(255,253,249,.82); border-top: 1px solid var(--border); backdrop-filter: blur(2px); }
.footer-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.footer-wrap p { margin: 0; font-size: .92rem; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (max-width: 1100px) { .services-grid, .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats-grid, .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .brand-mark { width: 62px; height: 62px; padding: 3px; }
  .main-nav, .desktop-cta { display: none; }
  .menu-toggle { display: inline-block; }
  .nav-wrap { align-items: flex-start; flex-wrap: wrap; padding: 18px 0; }
  .main-nav.open { display: flex; width: 100%; flex-direction: column; gap: 14px; padding-top: 8px; }
  .hero-grid, .two-col, .contacts-grid { grid-template-columns: 1fr; }

  /* Mobile stability fixes */
  html { scroll-behavior: auto; }
  .page-bg::before {
    background: linear-gradient(rgba(247,242,232,.70), rgba(247,242,232,.70)), url("assets/sangimignano-bg.png") center center / cover no-repeat;
    opacity: .42;
  }
  .page-bg::after { opacity: .68; }
  .section.alt, .section.beige, .site-header, .contacts, .site-footer {
    backdrop-filter: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
@media (max-width: 700px) {
  .section { padding: 78px 0; }
  .hero-mini-grid, .stats-grid, .services-grid, .projects-grid, .steps-grid { grid-template-columns: 1fr; }
  .footer-wrap { flex-direction: column; align-items: flex-start; justify-content: center; padding: 18px 0; }
  .contact-list li { flex-direction: column; align-items: flex-start; }
}


@media (max-width: 640px) {
  .hero-card-top { flex-direction: column; align-items: flex-start; }
  .logo-box { width: 128px; height: 128px; }
}
