/* =========================================================
   Studio Equilibrio — demo website for DGN, La bussola operativa
   Design tokens — sistema distinto da Studio Armonia
   ========================================================= */
:root {
  --petrolio: #176B75;
  --petrolio-deep: #0E4950;
  --petrolio-pale: #DCEBEC;
  --sabbia: #F2EDE5;
  --sabbia-deep: #E6DEd0;
  --bianco: #FFFFFF;
  --antracite: #263238;
  --ink-soft: #566268;

  --font-display: "Manrope", -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", -apple-system, "Segoe UI", sans-serif;

  --container: 1140px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--sabbia);
  color: var(--antracite);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--antracite);
}
h1 { font-size: clamp(2.3rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.25rem); }
h3 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1.1em; max-width: 60ch; }
.lede { font-size: 1.15rem; max-width: 50ch; color: var(--antracite); }
.caption { font-size: 0.9rem; color: var(--ink-soft); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85em 1.7em;
  border-radius: var(--radius-sm);
  background: var(--petrolio);
  color: var(--bianco);
  border: 1px solid var(--petrolio);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--petrolio-deep); border-color: var(--petrolio-deep); }

.btn-outline { background: transparent; color: var(--petrolio); border: 1px solid var(--petrolio); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--petrolio); color: var(--bianco); }

.text-link { border-bottom: 2px solid var(--petrolio); padding-bottom: 0.1em; font-weight: 600; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.text-link:hover, .text-link:focus-visible { color: var(--petrolio-deep); border-color: var(--petrolio-deep); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bianco);
  border-bottom: 2px solid var(--petrolio);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 80px; }

.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--antracite); display: flex; align-items: center; gap: 0.55rem; }
.logo svg { width: 26px; height: 26px; flex: none; color: var(--petrolio); }

.nav-links { display: flex; align-items: center; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 0.92rem; font-weight: 600; padding-bottom: 3px; border-bottom: 2px solid transparent; white-space: nowrap; transition: border-color 0.2s var(--ease), color 0.2s var(--ease); }
.nav-links a:hover, .nav-links a:focus-visible { border-color: var(--petrolio); }
.nav-links a[aria-current="page"] { color: var(--petrolio); border-color: var(--petrolio); }
.nav-cta .btn { padding: 0.6em 1.2em; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--antracite);
  border-radius: var(--radius-sm);
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: 80px 0 0 0;
    background: var(--bianco);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 1.5rem 2rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
    border-bottom: 2px solid var(--petrolio);
  }
  .nav-links.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--sabbia-deep); }
  .nav-links a { display: block; padding: 0.9rem 0; }
  .nav-cta { margin-top: 0.75rem; }
}

/* ---------- Photo panels (con overlay duotone, anche prima dell'upload reale) ---------- */
.photo {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--petrolio-pale);
  aspect-ratio: var(--ar, 4 / 3);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(23,107,117,0.55) 0%, rgba(38,50,56,0.18) 60%, rgba(23,107,117,0.08) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.photo-wide { --ar: 16 / 7; }
.photo-tall { --ar: 4 / 5; }

/* ---------- Hero ---------- */
.hero { padding: 3.2rem 0 0; }
.hero-text { max-width: 62ch; margin-bottom: 2.2rem; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero .photo { margin-bottom: -1px; }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--bianco); }

.section-head { margin-bottom: 2.2rem; max-width: 62ch; }
.section-head .rule { width: 46px; height: 5px; background: var(--petrolio); border-radius: 3px; margin-bottom: 0.9rem; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }

/* ---------- Value strip ---------- */
.value-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--sabbia-deep); border-bottom: 1px solid var(--sabbia-deep); }
.value-strip div { padding: 1.8rem 1.6rem; border-left: 1px solid var(--sabbia-deep); }
.value-strip div:first-child { border-left: none; }
.value-strip h3 { font-size: 1rem; margin-bottom: 0.3em; }
.value-strip p { font-size: 0.95rem; margin-bottom: 0; color: var(--ink-soft); }
@media (max-width: 700px) {
  .value-strip { grid-template-columns: 1fr; }
  .value-strip div { border-left: none; border-top: 1px solid var(--sabbia-deep); }
  .value-strip div:first-child { border-top: none; }
}

/* ---------- Service cards ---------- */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }
.service-card { background: var(--bianco); border: 1px solid var(--sabbia-deep); border-radius: var(--radius-md); overflow: hidden; }
.service-card .photo { border-radius: 0; aspect-ratio: 4/3; }
.service-card-body { padding: 1.6rem 1.7rem 1.8rem; }
.service-card h3 { margin-bottom: 0.4em; }
.service-card p { font-size: 0.98rem; }
@media (max-width: 760px) { .service-grid { grid-template-columns: 1fr; } }

/* ---------- Steps (sequenza reale) ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.8rem; }
.step-num { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; color: var(--petrolio); line-height: 1; }
.step-rule { width: 32px; height: 4px; background: var(--petrolio); border-radius: 2px; margin: 0.7rem 0 0.9rem; }
.steps-grid h3 { font-size: 1.05rem; margin-bottom: 0.3em; }
.steps-grid p { font-size: 0.95rem; margin-bottom: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .steps-grid { grid-template-columns: 1fr; } }

/* ---------- Two column (lo studio, pagine servizio) ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; align-items: start; }
.two-col.rev { grid-template-columns: 1fr 1fr; }
.two-col.rev .photo { order: 2; }
@media (max-width: 860px) {
  .two-col, .two-col.rev { grid-template-columns: 1fr; }
  .two-col.rev .photo { order: 0; }
}

.note-box {
  background: var(--petrolio-pale);
  border-left: 4px solid var(--petrolio);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.1rem 1.3rem;
  font-size: 0.95rem;
  color: var(--antracite);
  margin-top: 1.4rem;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 76ch; }
.faq-item { border: 1px solid var(--sabbia-deep); border-radius: var(--radius-sm); margin-bottom: 0.8rem; background: var(--bianco); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--antracite);
  padding: 1.1rem 1.3rem;
}
.faq-q svg { flex: none; width: 18px; height: 18px; color: var(--petrolio); transition: transform 0.2s var(--ease); }
.faq-item.is-open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s var(--ease); }
.faq-a p { padding: 0 1.3rem 1.2rem; font-size: 0.97rem; }
.faq-item.is-open .faq-a { max-height: 20em; }

/* ---------- Contact / booking form ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.8rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.2rem; }
.field label { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.4rem; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  padding: 0.75em 0.9em; border: 1px solid var(--sabbia-deep); border-radius: var(--radius-sm);
  background: var(--bianco); color: var(--antracite);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--petrolio); outline-offset: 1px; }
.field-check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9rem; color: var(--ink-soft); }
.field-check input { width: auto; margin-top: 0.3rem; }

.form-note { font-size: 0.87rem; color: var(--ink-soft); border-left: 3px solid var(--petrolio); padding-left: 0.9rem; margin-top: 1.3rem; }
.form-success { display: none; background: var(--petrolio-pale); border-left: 3px solid var(--petrolio); padding: 1rem 1.2rem; margin-top: 1.3rem; font-size: 0.95rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.form-success.is-visible { display: block; }

.contact-info dt { color: var(--ink-soft); font-size: 0.88rem; margin-top: 1.1rem; }
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { margin: 0.2rem 0 0; font-size: 1.04rem; font-weight: 500; }

.map-note { margin-top: 1.8rem; border: 1px dashed var(--sabbia-deep); border-radius: var(--radius-sm); padding: 1.4rem; color: var(--ink-soft); font-size: 0.88rem; }

/* ---------- CTA band ---------- */
.cta-band {
  border-top: 1px solid var(--sabbia-deep);
  border-bottom: 1px solid var(--sabbia-deep);
  padding: 3.2rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.cta-band h2 { margin-bottom: 0.3rem; }
.cta-band .caption { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--antracite); color: var(--sabbia); padding: 3.2rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.4rem; padding-bottom: 2.2rem; border-bottom: 1px solid rgba(242,237,229,0.18); }
.footer-grid .logo { color: var(--bianco); }
.footer-grid .logo svg { color: var(--petrolio-pale); }
.footer-grid h4 { font-family: var(--font-body); font-weight: 700; font-size: 0.88rem; color: var(--petrolio-pale); margin: 0 0 0.9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; font-size: 0.95rem; }
.footer-grid a:hover, .footer-grid a:focus-visible { color: var(--petrolio-pale); }
.footer-grid p { color: rgba(242,237,229,0.82); font-size: 0.95rem; max-width: 34ch; }

.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1.3rem; }
.disclaimer { font-size: 0.84rem; color: rgba(242,237,229,0.78); max-width: 62ch; }
.disclaimer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.disclaimer a:hover, .disclaimer a:focus-visible { color: var(--petrolio-pale); }

@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: 3.2rem 0 1rem; }
.page-head .lede { margin-top: 0.6rem; }
