/* =========================================================
   Studio Armonia — demo website for DGN, La bussola operativa
   Design tokens
   ========================================================= */
:root {
  --ivory: #F7F4EC;
  --panel: #EEEAD9;
  --sage-pale: #D9DFC8;
  --sage: #7E8F6C;
  --sage-deep: #44542F;
  --taupe: #9C8E78;
  --taupe-text: #6B5F4C;
  --ink: #332F28;
  --white: #FFFFFF;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1120px;
  --radius: 4px;
  --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(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--sage-deep);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 4.4vw, 3.75rem); }
h2 { font-size: clamp(1.8rem, 2.9vw, 2.5rem); }
h3 { font-size: 1.3rem; font-weight: 500; color: var(--ink); }

p { margin: 0 0 1.1em; max-width: 62ch; }

.lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink); max-width: 46ch; }

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

.caption {
  font-size: 0.92rem;
  color: var(--taupe-text);
  letter-spacing: 0.01em;
}

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

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

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 236, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--sage-pale);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--sage-deep);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo svg { width: 22px; height: 22px; flex: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.92rem;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a:focus-visible { border-color: var(--sage-deep); }
.nav-links a[aria-current="page"] { color: var(--sage-deep); border-color: var(--sage-deep); }

.nav-cta { white-space: nowrap; }
.nav-cta .btn { padding: 0.6em 1.3em; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--sage-deep);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  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: 84px 0 0 0;
    background: var(--ivory);
    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: 1px solid var(--sage-pale);
  }
  .nav-links.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--panel); }
  .nav-links a { display: block; padding: 0.9rem 0; }
  .nav-cta { margin-top: 0.75rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}
.hero-art { justify-self: end; width: 100%; max-width: 420px; }
.hero-art svg { width: 100%; height: auto; }
.photo-frame { overflow: hidden; border-radius: 6px; }
.photo-frame img { width: 100%; height: auto; display: block; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.6rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { justify-self: center; max-width: 220px; order: -1; margin-bottom: 1rem; }
}

/* draw-in animation, once, on load only */
.draw-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw 1.8s var(--ease) forwards 0.2s;
}
@media (prefers-reduced-motion: reduce) { .draw-path { animation: none; stroke-dashoffset: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Banded sections ---------- */
.section { padding: 4rem 0; }
.section-panel { background: var(--panel); }

.band {
  background: var(--sage-deep);
  color: var(--ivory);
  padding: 3.2rem 0;
}
.band p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  line-height: 1.5;
  max-width: 34ch;
  margin: 0;
  color: var(--ivory);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2.2rem;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }

/* ---------- Cards grid (ambiti) ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--sage-pale);
  border-left: 1px solid var(--sage-pale);
}
.grid-4 .card {
  border-right: 1px solid var(--sage-pale);
  border-bottom: 1px solid var(--sage-pale);
  padding: 1.8rem 1.6rem;
}
.card-icon { width: 30px; height: 30px; color: var(--sage-deep); margin-bottom: 1rem; }
.card h3 { margin-bottom: 0.4em; }
.card p { font-size: 0.97rem; margin-bottom: 0; }

@media (max-width: 860px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Timeline (percorso) ---------- */
.timeline { border-top: 1px solid var(--sage-pale); }
.timeline-step {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1.4rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--sage-pale);
}
.timeline-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--sage);
}
.timeline-step h3 { margin-bottom: 0.3em; }
.timeline-step p { margin-bottom: 0; }
@media (max-width: 560px) {
  .timeline-step { grid-template-columns: 40px 1fr; }
  .timeline-num { font-size: 1.4rem; }
}

/* ---------- Two column (chi sono, generic) ---------- */
.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.values-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--sage-pale);
  padding-top: 2rem;
  margin-top: 2.4rem;
}
@media (max-width: 700px) { .values-row { grid-template-columns: 1fr; } }

/* ---------- FAQ accordion ---------- */
.faq-list { border-top: 1px solid var(--sage-pale); max-width: 74ch; }
.faq-item { border-bottom: 1px solid var(--sage-pale); }
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--sage-deep);
  padding: 1.3rem 2.2rem 1.3rem 0;
  position: relative;
  cursor: pointer;
}
.faq-q::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--sage);
  transition: transform 0.2s var(--ease);
}
.faq-item.is-open .faq-q::after { content: "\2212"; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s var(--ease);
}
.faq-a p { padding-bottom: 1.3rem; }
.faq-item.is-open .faq-a { max-height: 20em; }

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

.field { margin-bottom: 1.3rem; }
.field label {
  display: block;
  font-size: 0.92rem;
  color: var(--taupe-text);
  margin-bottom: 0.4rem;
}
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border: 1px solid var(--sage-pale);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--sage-deep);
  outline-offset: 1px;
}
.field-check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.92rem; color: var(--taupe-text); }
.field-check input { width: auto; margin-top: 0.3rem; }

.form-note {
  font-size: 0.88rem;
  color: var(--taupe-text);
  border-left: 2px solid var(--sage);
  padding-left: 0.9rem;
  margin-top: 1.4rem;
}
.form-success {
  display: none;
  background: var(--panel);
  border-left: 2px solid var(--sage-deep);
  padding: 1rem 1.2rem;
  margin-top: 1.4rem;
  font-size: 0.95rem;
}
.form-success.is-visible { display: block; }

.contact-info dt { color: var(--taupe-text); font-size: 0.9rem; margin-top: 1.2rem; }
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { margin: 0.2rem 0 0; font-size: 1.05rem; }

.map-note {
  margin-top: 2rem;
  border: 1px dashed var(--sage-pale);
  border-radius: var(--radius);
  padding: 1.6rem;
  color: var(--taupe-text);
  font-size: 0.9rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: left;
  border-top: 1px solid var(--sage-pale);
  border-bottom: 1px solid var(--sage-pale);
  padding: 3.4rem 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(--sage-deep);
  color: var(--ivory);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(247, 244, 236, 0.22);
}
.footer-grid .logo { color: var(--ivory); }
.footer-grid h4 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--sage-pale);
  margin: 0 0 0.9rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.55rem; }
.footer-grid a { opacity: 0.9; }
.footer-grid a:hover, .footer-grid a:focus-visible { opacity: 1; text-decoration: underline; }
.footer-grid p { color: rgba(247, 244, 236, 0.85); font-size: 0.95rem; max-width: 36ch; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.4rem;
}
.disclaimer {
  font-size: 0.85rem;
  color: rgba(247, 244, 236, 0.8);
  max-width: 60ch;
}
.disclaimer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.disclaimer a:hover, .disclaimer a:focus-visible { color: var(--sage-pale); }

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

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