/* ===== TRASVERSO — Shared Stylesheet ===== */

:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --ink: #182028;
  --muted: #5d6772;
  --line: #d8d2c7;
  --accent: #314d43;
  --accent-2: #a67c52;
  --max: 1160px;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(24, 32, 40, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 239, 0.88);
  border-bottom: 1px solid rgba(216, 210, 199, 0.85);
}

/* backdrop-filter on pseudo-element so fixed children (mobile nav) are not confined */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(12px);
  z-index: -1;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

/* ===== Nav ===== */
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.96rem;
}

.nav a {
  white-space: nowrap;
}

.nav a:hover { color: var(--ink); }

/* ===== Hamburger ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 21;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-family: inherit;
  font-size: 1rem;
  transition: 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #283f37;
}

.btn-secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.7);
}

.nav-cta { display: none; }

/* ===== Hero ===== */
.hero {
  padding: 88px 0 54px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.95fr 0.9fr;
  gap: 42px;
  align-items: center;
}

.hero-grid--wide {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(49, 77, 67, 0.08);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.8rem, 5vw, 4.8rem); }

.hero p.lead {
  margin: 22px 0 0;
  max-width: 62ch;
  font-size: 1.12rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-card {
  background: linear-gradient(160deg, #ffffff 0%, #f1ece2 100%);
  border: 1px solid rgba(216, 210, 199, 0.8);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.hero-card h3 {
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.bullet-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bullet-list li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  transform: translateY(-50%);
}

/* ===== Sections ===== */
section { padding: 42px 0; }

.section-head {
  margin-bottom: 28px;
  max-width: 72ch;
}

.section-head p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

/* ===== Grids ===== */
.grid-2,
.grid-3 {
  display: grid;
  gap: 22px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.grid-auto {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid rgba(216, 210, 199, 0.9);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

/* ===== Problem box ===== */
.problem-box {
  background: #f0ebe1;
  border: 1px solid rgba(166, 124, 82, 0.18);
  border-radius: 24px;
  padding: 30px;
}

.problem-box p {
  margin: 0;
  font-size: 1.08rem;
}

.statement {
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.highlight { color: var(--accent); }

/* ===== Steps ===== */
.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
}

.step {
  position: relative;
  padding: 24px 24px 24px 78px;
  background: var(--surface);
  border: 1px solid rgba(216, 210, 199, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 22px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); }

/* ===== Quote ===== */
.quote-box {
  background: #1f2a31;
  color: #eef2f3;
  border-radius: 24px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.quote-box p {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.quote-box small {
  display: inline-block;
  margin-top: 16px;
  color: rgba(238, 242, 243, 0.72);
}

/* Testimonianza lunga (paragrafi multipli) */
.quote-box--story p {
  margin: 0 0 18px;
}

.quote-box--story p:last-of-type {
  margin-bottom: 0;
}

/* ===== About ===== */
.about {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.about-panel {
  background: var(--surface);
  border: 1px solid rgba(216, 210, 199, 0.9);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.about-panel p {
  margin: 0 0 16px;
  color: var(--muted);
}

/* ===== CTA ===== */
.cta { padding: 30px 0 80px; }

.cta-box {
  background: linear-gradient(145deg, #314d43 0%, #243831 100%);
  color: #fff;
  border-radius: 30px;
  padding: 42px;
  box-shadow: var(--shadow);
}

.cta-box p {
  margin: 14px 0 0;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.82);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.cta-box .btn-primary { background: #fff; color: var(--accent); }
.cta-box .btn-secondary { color: #fff; border-color: rgba(255, 255, 255, 0.3); }


/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid rgba(216, 210, 199, 0.8);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ===== Lead (per-chi, chi-ci-e-passato) ===== */
.lead-text {
  color: var(--muted);
  max-width: 700px;
}

/* ===== Privacy page ===== */
.prose {
  width: min(calc(100% - 40px), 820px);
  margin: 60px auto;
}

.prose h1 {
  font-size: 2.4rem;
  margin-bottom: 24px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.prose h2 {
  margin-top: 36px;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.prose p { color: var(--muted); }

.prose a {
  color: var(--accent);
  font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-grid,
  .hero-grid--wide,
  .grid-3,
  .grid-2,
  .about {
    grid-template-columns: 1fr;
  }

  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: inline-flex; }

  .nav {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 15;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    font-size: 1.2rem;
  }

  .nav.open { display: flex; }

  .nav a { color: var(--ink); }

  .hero { padding-top: 60px; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .header-inner { padding: 16px 0; }

  .hero-card,
  .card,
  .step,
  .about-panel,
  .cta-box,
  .quote-box,
  .problem-box {
    padding: 22px;
  }

  .cta { padding-bottom: 56px; }

  .form-grid { grid-template-columns: 1fr; }

  .prose { margin: 40px auto; }
}
