/* ==========================================================================
   LA BUSSOLA — Design System
   Palette: salvia profondo, muschio, foresta, crema, inchiostro notte
   Display: Fraunces (serif caldo) · Body: Inter · Eyebrow: Inter spaziato
   ========================================================================== */

@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;1,9..144,400;1,9..144,500&family=Inter:wght@300;400;500;600;700&display=swap');

:root{
  /* Palette */
  --cream: #f5f5f0;
  --cream-2: #efefe8;
  --mist: #e2e8e2;
  --sage-pale: #a8b8a8;
  --sage: #8a9a8a;
  --sage-deep: #6b7d6b;
  --forest: #4a5e4a;
  --forest-2: #3c4d3c;
  --ink: #2d3748;
  --ink-soft: #4a5461;
  --white: #ffffff;

  /* Type */
  --display: 'Fraunces', ui-serif, Georgia, serif;
  --body: 'Inter', ui-sans-serif, system-ui, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 18px;
  --radius-sm: 10px;

  --ease: cubic-bezier(.16,.84,.44,1);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin:0;
  font-family: var(--body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

*{ overflow-wrap: break-word; }

img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family: inherit; }

.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Typography ---------- */
h1,h2,h3,h4{
  font-family: var(--display);
  font-weight: 600;
  color: var(--forest-2);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1{ font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2{ font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3{ font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4{ font-size: 1.1rem; }
p{ margin: 0 0 1.1em; color: var(--ink-soft); }
strong{ color: var(--ink); }

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.6em;
  font-family: var(--body);
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: lowercase;
  font-weight: 600;
  color: var(--sage-deep);
  margin-bottom: 1.1em;
}
.eyebrow::before{
  content:"";
  width: 22px; height: 1px;
  background: var(--sage-deep);
  display:inline-block;
}

.lede{ font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; }

.text-center{ text-align:center; }
.center-col{ margin-left:auto; margin-right:auto; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:.6em;
  font-weight: 600;
  font-size: .95rem;
  padding: .95em 1.7em;
  border-radius: 999px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s, color .25s;
  border: 1px solid transparent;
  cursor:pointer;
  white-space: nowrap;
}
.btn-primary{
  background: var(--forest);
  color: var(--cream);
}
.btn-primary:hover{ background: var(--sage-deep); transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(74,94,74,.55); }
.btn-ghost{
  background: transparent;
  border-color: var(--sage-pale);
  color: var(--forest-2);
}
.btn-ghost:hover{ border-color: var(--sage-deep); background: var(--mist); transform: translateY(-2px); }
.btn-light{
  background: var(--cream);
  color: var(--forest-2);
}
.btn-light:hover{ background: var(--white); transform: translateY(-2px); }
.btn-sm{ padding: .6em 1.2em; font-size: .82rem; }
.btn-arrow{ transition: transform .3s var(--ease); }
.btn:hover .btn-arrow{ transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header{
  position: sticky; top:0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid rgba(74,94,74,.1);
}
/* La sfocatura vive su uno pseudo-elemento separato: se stesse direttamente
   su .site-header, il backdrop-filter renderebbe l'header "containing block"
   per i figli in position:fixed (come il menu mobile), rompendone il posizionamento. */
.site-header::before{
  content:"";
  position:absolute; inset:0;
  background: rgba(245,245,240,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index:-1;
}
.site-header .wrap{
  display:flex; align-items:center; justify-content:space-between;
  height: 84px;
}
.brand{ display:flex; align-items:center; gap:.7em; min-width:0; }
.brand img{ height: 42px; width:auto; flex-shrink:0; }
.brand-word{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--forest-2);
  letter-spacing: .01em;
}
.brand-word span{
  display:block;
  font-family: var(--body);
  font-weight: 500;
  font-size: .58rem;
  letter-spacing: .2em;
  color: var(--sage-deep);
  text-transform: lowercase;
  margin-top: 1px;
}

.main-nav{ display:flex; align-items:center; gap: 2.1rem; }
.main-nav a{
  font-size: .93rem; font-weight: 500; color: var(--ink-soft);
  position:relative; padding: 4px 0;
  transition: color .25s;
}
.main-nav a::after{
  content:""; position:absolute; left:0; right:100%; bottom:-3px; height:2px;
  background: var(--sage-deep); transition: right .3s var(--ease);
}
.main-nav a:hover{ color: var(--forest-2); }
.main-nav a:hover::after, .main-nav a.active::after{ right:0; }
.main-nav a.active{ color: var(--forest-2); }

.nav-actions{ display:flex; align-items:center; gap:1.2rem; }
.menu-toggle{
  display:none; background:none; border:none; width:40px; height:40px;
  position:relative; cursor:pointer;
}
.menu-toggle span{
  position:absolute; left:8px; right:8px; height:2px; background: var(--forest-2);
  transition: all .3s var(--ease);
}
.menu-toggle span:nth-child(1){ top:14px; }
.menu-toggle span:nth-child(2){ top:20px; }
.menu-toggle span:nth-child(3){ top:26px; }
.menu-toggle.open span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.menu-toggle.open span:nth-child(2){ opacity:0; }
.menu-toggle.open span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px){
  .main-nav{
    position: fixed; inset: 84px 0 0 0; background: var(--cream);
    flex-direction: column; justify-content:flex-start; align-items:flex-start;
    padding: 2rem var(--pad); gap: 1.4rem;
    transform: translateX(100%); transition: transform .4s var(--ease);
    overflow-y:auto;
  }
  .main-nav.open{ transform: translateX(0); }
  .main-nav a{ font-size: 1.3rem; }
  .menu-toggle{ display:block; }
  .nav-actions .btn-primary{ display:none; }
}

@media (max-width: 600px){
  .site-header .wrap{ height: 68px; }
  .main-nav{ inset: 68px 0 0 0; }
  .brand img{ height: 34px; }
  .brand-word{ font-size: 1.05rem; }
  .brand-word span{ font-size: .5rem; letter-spacing: .14em; }
  .nav-actions{ gap: .6rem; }
}
@media (max-width: 380px){
  .brand-word span{ display:none; }
}

/* ---------- Waypoint / compass motif (signature element) ---------- */
.compass-mark{ position:relative; }
.route-divider{
  display:flex; align-items:center; gap: 10px;
  color: var(--sage-pale); margin: 2.4rem 0;
}
.route-divider .line{ flex:1; height:1px; background: linear-gradient(90deg, transparent, var(--sage-pale), transparent); }
.route-divider svg{ width:20px; height:20px; opacity:.8; }

/* waypoint steps used in service detail "percorso operativo" */
.waypoints{ position:relative; padding-left: 2.6rem; }
.waypoints::before{
  content:""; position:absolute; left: 9px; top:6px; bottom:6px; width:1px;
  background: repeating-linear-gradient(to bottom, var(--sage-pale) 0 6px, transparent 6px 12px);
}
.waypoint{ position:relative; padding-bottom: 1.6rem; }
.waypoint:last-child{ padding-bottom:0; }
.waypoint::before{
  content:""; position:absolute; left:-2.6rem; top:4px; width:11px; height:11px;
  border-radius:50%; background: var(--sage-deep); box-shadow: 0 0 0 4px var(--cream), 0 0 0 5px var(--sage-pale);
}
.waypoint p{ margin:0; }

/* ---------- Hero ---------- */
/* Mobile-first: una colonna di default, il layout a due colonne è un progressive enhancement da 900px in su */
.hero{
  padding: 3rem 0 3.4rem;
  position: relative;
  overflow: hidden;
}
.hero .wrap{
  display:grid;
  grid-template-columns: 1fr;
  gap: 2.4rem;
  align-items:center;
}
.hero .wrap > *{ min-width:0; }
.hero h1{ margin-bottom:.4em; }
.hero .lede{ margin-bottom: 1.8em; }
.hero-actions{ display:flex; flex-direction:column; align-items:stretch; gap:.9rem; }
.hero-actions .btn{ justify-content:center; }
.hero-art{ position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; order:-1; }
.hero-art svg{ width: min(260px, 62vw); height:auto; }
.hero-ring-slow{ animation: spin 90s linear infinite; transform-origin: 260px 260px; }
.hero-ring-slower{ animation: spin 140s linear infinite reverse; transform-origin: 260px 260px; }
@keyframes spin{ to{ transform: rotate(360deg); } }

.hero-badges{
  position:static; transform:none; margin: 1.4rem auto 0;
  display:flex; flex-wrap:wrap; justify-content:center; gap: .6rem;
  background: var(--white); padding: .5rem .9rem; width:max-content; max-width:100%;
  border-radius: 999px; box-shadow: 0 14px 34px -14px rgba(45,55,72,.28);
  font-size: .78rem; font-weight:600; color: var(--forest-2);
}
.hero-badges span{ color: var(--sage-pale); }

/* Decorative SVGs: fluid width instead of fixed pixel attributes */
.deco-svg{ width: min(280px, 78vw); height:auto; }
.deco-svg-sm{ width: min(200px, 55vw); height:auto; }

@media (min-width: 900px){
  .hero{ padding: 4.5rem 0 5rem; }
  .hero .wrap{ grid-template-columns: 1.1fr .9fr; gap: 3rem; }
  .hero-art{ order:0; }
  .hero-art svg{ width: min(440px, 100%); }
  .hero-badges{
    position:absolute; bottom:-18px; left:50%; transform:translateX(-50%);
    margin:0; flex-wrap:nowrap; white-space:nowrap;
  }
  .hero-actions{ flex-direction:row; align-items:center; }
  .hero-actions .btn{ justify-content:flex-start; }
}

@media (max-width: 560px){
  .brk{ display:none; }
}

/* ---------- Sections ---------- */
section{ padding: 5.5rem 0; }
.section-tight{ padding: 3.5rem 0; }
@media (max-width: 560px){
  section{ padding: 3.4rem 0; }
  .section-tight{ padding: 2.4rem 0; }
  .section-head{ margin-bottom: 2rem; }
}
.bg-mist{ background: var(--mist); }
.bg-forest{ background: var(--forest); color: var(--cream); }
.bg-forest h2, .bg-forest h3, .bg-forest h4{ color: var(--cream); }
.bg-forest p{ color: rgba(245,245,240,.82); }
.bg-forest .eyebrow{ color: var(--sage-pale); }
.bg-forest .eyebrow::before{ background: var(--sage-pale); }

.section-head{ max-width: 720px; margin-bottom: 3rem; }
.section-head.wide{ max-width: 900px; }

/* ---------- Grids & Cards ---------- */
.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.grid-2{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }
.grid-3 > *, .grid-2 > *{ min-width:0; }
@media (max-width: 900px){ .grid-3{ grid-template-columns: 1fr; } .grid-2{ grid-template-columns:1fr; } }

.card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.1rem;
  border: 1px solid rgba(74,94,74,.08);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover{ transform: translateY(-5px); box-shadow: 0 22px 44px -20px rgba(45,55,72,.22); }

.icon-tile{
  width:52px; height:52px; border-radius: 14px;
  background: var(--mist);
  display:flex; align-items:center; justify-content:center;
  margin-bottom: 1.3rem;
  color: var(--sage-deep);
}
.icon-tile svg{ width:26px; height:26px; }

/* pillar / method */
.pillar-num{
  font-family: var(--display); font-size: .95rem; color: var(--sage-deep);
  letter-spacing: .05em; margin-bottom: .6rem; display:block;
}

/* Areas / services overview */
.area-block{ margin-bottom: 3.6rem; }
.area-block:last-child{ margin-bottom:0; }
.area-head{ display:flex; align-items:baseline; gap: 1rem; margin-bottom: 1.8rem; flex-wrap:wrap; }
.area-head .num{ font-family: var(--display); font-size: 1rem; color: var(--sage-pale); }

.service-row{
  display:grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items:center;
  padding: 1.6rem 0; border-bottom: 1px solid rgba(74,94,74,.13);
}
.service-row:first-child{ border-top: 1px solid rgba(74,94,74,.13); }
.service-row h4{ margin: 0 0 .35em; }
.service-row p{ margin:0; max-width: 60ch; }
.service-row .btn{ flex-shrink:0; }
@media (max-width: 760px){ .service-row{ grid-template-columns:1fr; } }

/* Team */
.team-card{ text-align:left; }
.team-photo{
  width: 100%; aspect-ratio: 4/5; border-radius: var(--radius);
  background: linear-gradient(155deg, var(--sage-pale), var(--sage-deep));
  display:flex; align-items:center; justify-content:center;
  margin-bottom: 1.4rem; overflow:hidden; position:relative;
}
.team-photo span{
  font-family: var(--display); font-size: 3.4rem; color: var(--cream); opacity:.9;
}
.team-role{ color: var(--sage-deep); font-weight:600; font-size:.85rem; letter-spacing:.03em; margin-bottom:.8rem; display:block; }

/* Testimonials */
.testi-card{
  background: var(--white); border-radius: var(--radius); padding: 2rem;
  border: 1px solid rgba(74,94,74,.08); height:100%;
  display:flex; flex-direction:column;
}
.testi-stars{ color: var(--sage-deep); letter-spacing: 2px; margin-bottom: 1rem; font-size: .95rem; }
.testi-quote{ flex:1; font-style: italic; color: var(--ink-soft); }
.testi-name{ font-weight:700; color: var(--forest-2); margin-top: 1.2rem; font-family: var(--display); }

.testi-track-wrap{ overflow:hidden; }
.testi-track{ display:flex; gap: 1.6rem; transition: transform .5s var(--ease); }
.testi-track .testi-card{ min-width: calc(33.333% - 1.07rem); }
@media (max-width: 900px){ .testi-track .testi-card{ min-width: 100%; } }
.testi-controls{ display:flex; justify-content:center; gap: .8rem; margin-top: 2.2rem; }
.testi-dot{ width:8px; height:8px; border-radius:50%; background: var(--sage-pale); border:none; cursor:pointer; transition: background .25s, transform .25s; }
.testi-dot.active{ background: var(--sage-deep); transform: scale(1.3); }

/* CTA banner */
.cta-banner{
  background: var(--forest); color: var(--cream); border-radius: 24px;
  padding: 3.4rem clamp(1.6rem, 5vw, 4rem);
  display:flex; align-items:center; justify-content:space-between; gap: 2rem; flex-wrap:wrap;
  position:relative; overflow:hidden;
}
.cta-banner h2{ color: var(--cream); margin-bottom:.3em; }
.cta-banner p{ color: rgba(245,245,240,.8); margin:0; max-width:44ch; }
@media (max-width: 640px){
  .cta-banner{ flex-direction:column; align-items:flex-start; padding: 2.2rem 1.6rem; border-radius: 18px; }
  .cta-banner .btn{ width:100%; justify-content:center; }
}

/* Footer */
.site-footer{ background: var(--forest-2); color: rgba(245,245,240,.85); padding: 4.5rem 0 2rem; }
@media (max-width: 560px){
  .site-footer{ padding: 3rem 0 1.6rem; }
  .footer-bottom{ flex-direction:column; gap:.4rem; }
}
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-brand img{ height: 40px; margin-bottom: 1rem; }
.footer-brand p{ color: rgba(245,245,240,.65); max-width: 30ch; }
.site-footer h4{ color: var(--cream); font-family: var(--body); font-size: .85rem; letter-spacing:.08em; text-transform:uppercase; margin-bottom: 1.2rem; }
.site-footer ul li{ margin-bottom: .7rem; }
.site-footer a{ color: rgba(245,245,240,.72); transition: color .2s; }
.site-footer a:hover{ color: var(--cream); }
.footer-bottom{
  border-top: 1px solid rgba(245,245,240,.15); padding-top: 1.6rem;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap: 1rem;
  font-size: .82rem; color: rgba(245,245,240,.55);
}
@media (max-width: 900px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns: 1fr; } }

/* ---------- Page hero (interior pages) ---------- */
.page-hero{ padding: 3.6rem 0 3rem; border-bottom: 1px solid rgba(74,94,74,.1); }
.page-hero .lede{ margin-bottom:0; }
.breadcrumb{ font-size:.82rem; color: var(--sage-deep); margin-bottom: 1rem; display:flex; gap:.5rem; align-items:center; }
.breadcrumb a:hover{ text-decoration: underline; }

/* ---------- Detail table (servizio) ---------- */
.detail-table{ display:grid; grid-template-columns: 220px 1fr; gap: 0; border-top: 1px solid rgba(74,94,74,.14); }
.detail-row{ display:contents; }
.detail-row .k, .detail-row .v{ padding: 1.6rem 0; border-bottom: 1px solid rgba(74,94,74,.14); }
.detail-row .k{ font-family: var(--display); font-weight:600; color: var(--forest-2); padding-right: 1.5rem; }
.detail-row .v p{ margin:0 0 .8rem; }
.detail-row .v p:last-child{ margin-bottom:0; }
@media (max-width: 760px){
  .detail-table{ grid-template-columns: 1fr; }
  .detail-row{ display:block; padding: 1.6rem 0; border-bottom: 1px solid rgba(74,94,74,.14); }
  .detail-row .k, .detail-row .v{ padding: 0; border:none; }
  .detail-row .k{ margin-bottom:.6rem; }
}

@media (max-width: 560px){
  .waypoints{ padding-left: 2.1rem; }
  .waypoint::before{ left: -2.1rem; }
  .card{ padding: 1.6rem; }
  .icon-tile{ width:46px; height:46px; }
  .cta-banner p{ max-width:none; }
}

/* Related services */
.related-card{ display:block; }

/* Reveal on scroll */
.reveal{ opacity:0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in{ opacity:1; transform: translateY(0); }

/* Form */
.contact-form{ display:grid; gap: 1.2rem; }
.form-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width:640px){ .form-row{ grid-template-columns:1fr; } }
label{ display:block; font-size: .85rem; font-weight:600; color: var(--forest-2); margin-bottom: .5rem; }
input, textarea, select{
  width:100%; padding: .85em 1em; border-radius: 10px; border: 1px solid var(--sage-pale);
  background: var(--white); font-family: var(--body); font-size: .95rem; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus{
  outline:none; border-color: var(--sage-deep); box-shadow: 0 0 0 4px rgba(107,125,107,.15);
}
textarea{ min-height: 140px; resize: vertical; }
.form-note{ font-size: .82rem; color: var(--sage-deep); }
@media (max-width: 560px){
  .contact-form .btn{ width:100%; justify-content:center; }
  input, select, textarea{ font-size: 16px; } /* evita zoom automatico su iOS */
}
.form-success{
  display:none; background: var(--mist); border: 1px solid var(--sage-pale); border-radius: 12px;
  padding: 1.2rem 1.4rem; color: var(--forest-2); font-weight:600;
}
.form-success.show{ display:block; }

.info-card{ background: var(--white); border-radius: var(--radius); padding: 2rem; border:1px solid rgba(74,94,74,.08); }
.info-row{ display:flex; gap: 1rem; align-items:flex-start; margin-bottom: 1.4rem; }
.info-row:last-child{ margin-bottom:0; }
.info-row .icon-tile{ margin-bottom:0; flex-shrink:0; }

/* Map placeholder */
.map-frame{ border-radius: var(--radius); overflow:hidden; border: 1px solid rgba(74,94,74,.12); }
.map-frame iframe{ display:block; width:100%; height: 320px; border:0; filter: grayscale(.15) saturate(.9); }

:focus-visible{ outline: 2px solid var(--sage-deep); outline-offset: 3px; }

.mb-0{ margin-bottom:0 !important; }
.mt-lg{ margin-top: 3rem; }
