/* =====================================================
   DGF TRIVELMORRA — main.css
   Reset · Variables · Base · Cursor · Loading · Utilities
   ===================================================== */

/* ── CSS Variables ── */
:root {
  --bg:         #0A0A0A;
  --surface:    #141414;
  --elevated:   #1E1E1E;
  --orange:     #E87722;
  --orange-lt:  #F5944A;
  --sand:       #C0A882;
  --mineral:    #4A7C6F;
  --text:       #F0EDE8;
  --text-dim:   rgba(240,237,232,0.55);
  --text-muted: rgba(240,237,232,0.3);
  --border:     #2A2A2A;
  --geo1:#3D2010; --geo2:#5C3D1A; --geo3:#7A5030;
  --geo4:#4A3020; --geo5:#2C1A0E; --geo6:#1A0F06;
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  cursor: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 2px; }

/* ── Custom Cursor ── */
#cursor {
  position: fixed; width: 20px; height: 20px;
  border: 2px solid var(--orange); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  mix-blend-mode: difference; transition: width .2s, height .2s, background .2s;
}
#cursor-dot {
  position: fixed; width: 4px; height: 4px;
  background: var(--orange); border-radius: 50%;
  pointer-events: none; z-index: 9999;
}
.cursor-hover { width: 40px !important; height: 40px !important; background: rgba(232,119,34,0.15) !important; }

/* ── Loading Screen ── */
#loading-screen {
  position: fixed; inset: 0; background: var(--bg);
  z-index: 9998; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
}
.loader-content h1 {
  font-size: 32px; font-weight: 900; color: var(--orange); letter-spacing: 4px;
  margin: 0;
}
.loading-bar {
  width: 240px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.loading-progress {
  height: 100%; background: var(--orange); width: 0%;
}

/* ── Section Common ── */
section { padding: 100px 80px; position: relative; }
.section-dark  { background: #0A0A0A; }
.section-mid   { background: #0E0E0E; }
.container     { max-width: 1280px; margin: 0 auto; }
.container-narrow { max-width: 800px; margin: 0 auto; }
.section-header { margin-bottom: 56px; }
.section-label {
  font-size: 11px; font-weight: 600; color: var(--orange);
  letter-spacing: 4px; margin-bottom: 16px; display: block;
}
.section-title {
  font-size: clamp(36px,5vw,64px); font-weight: 900;
  letter-spacing: -2px; line-height: 1.08; margin-bottom: 16px;
}
.section-sub {
  font-size: 16px; line-height: 1.7; color: var(--text-dim); max-width: 640px;
}
.text-orange { color: var(--orange); }

/* ── Buttons ── */
.btn-primary {
  background: var(--orange); color: #0A0A0A;
  border: none; padding: 16px 36px; font-size: 13px; font-weight: 700;
  letter-spacing: 2px; cursor: pointer; border-radius: 3px;
  transition: all .25s; text-decoration: none; display: inline-block;
}
.btn-primary:hover { background: var(--orange-lt); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(232,119,34,.4); }
.btn-ghost {
  background: transparent; color: var(--orange);
  border: 1.5px solid var(--orange); padding: 16px 36px;
  font-size: 13px; font-weight: 700; letter-spacing: 2px; cursor: pointer;
  border-radius: 3px; transition: all .25s; text-decoration: none; display: inline-block;
}
.btn-ghost:hover { background: rgba(232,119,34,.1); transform: translateY(-2px); }
.btn-full { width: 100%; text-align: center; }

/* ── Particle Canvas ── */
#particle-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 5;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  padding: 120px 80px 80px; position: relative;
  background: linear-gradient(135deg, #0E0E0E 0%, #1A0800 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--orange), transparent);
}
.page-hero-title {
  font-size: clamp(40px,6vw,80px); font-weight: 900;
  letter-spacing: -3px; line-height: 1; margin-bottom: 20px;
}
.page-hero-sub {
  font-size: 17px; line-height: 1.7; color: var(--text-dim); max-width: 640px;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-dim); margin-top: 24px;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span[aria-current="page"] { color: var(--orange); }

/* ── Numeri ── */
.numeri-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 40px; margin-bottom: 80px;
}
.stat-block { border-left: 2px solid var(--orange); padding-left: 24px; }
.stat-big { font-size: 52px; font-weight: 900; letter-spacing: -2px; color: var(--orange); line-height: 1; margin-bottom: 8px; }
.stat-name { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.stat-desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* Certs */
.certs-section { border-top: 1px solid var(--border); padding-top: 56px; }
.certs-title { font-size: 11px; font-weight: 600; letter-spacing: 3px; color: var(--text-dim); margin-bottom: 32px; }
.certs-row { display: flex; gap: 24px; flex-wrap: wrap; }
.cert-badge {
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  padding: 24px 32px; flex: 1; min-width: 200px; transition: border-color .2s;
}
.cert-badge:hover { border-color: var(--orange); }
.cert-icon { font-size: 24px; font-weight: 900; color: var(--orange); margin-bottom: 8px; }
.cert-name { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.cert-desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* ── Come Lavoriamo ── */
.come-lavoriamo-wrap { display: grid; grid-template-columns: 1fr 420px; gap: 80px; align-items: start; }
.geo-cross-canvas { width:100%; height:300px; border:1px solid var(--border); border-radius:4px; position:sticky; top:100px; }
.steps-grid { display:flex; flex-direction:column; gap:40px; }
.step-item { display:flex; gap:24px; align-items:flex-start; }
.step-num { font-size:48px; font-weight:900; color:var(--orange); opacity:.2; line-height:1; flex-shrink:0; width:60px; }
.step-content h3 { font-size:17px; font-weight:800; margin-bottom:8px; }
.step-content p { font-size:13px; line-height:1.65; color:var(--text-dim); }

/* ── CTA Section ── */
.cta-section { padding: 80px; }
.cta-box { text-align:center; border:1px solid var(--border); border-radius:8px; padding:64px 48px; max-width:720px; margin:0 auto; background:var(--surface); }
.cta-box h2 { font-size:32px; font-weight:900; margin-bottom:16px; }
.cta-box p { font-size:16px; color:var(--text-dim); margin-bottom:32px; line-height:1.7; }

/* ── Form Base ── */
.form-group { margin-bottom: 20px; }
.form-group label { display:block; font-size:10px; font-weight:600; letter-spacing:2px; color:var(--text-dim); margin-bottom:8px; }
.form-hint { font-size:10px; color:var(--text-muted); font-weight:400; letter-spacing:0; margin-left:6px; }
.form-group input,
.form-group textarea,
.form-group select {
  width:100%; background:var(--bg); border:1px solid var(--border);
  color:var(--text); padding:12px 16px; font-size:15px; border-radius:3px;
  outline:none; font-family:inherit; transition:border-color .2s;
  appearance:none; -webkit-appearance:none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color:var(--orange); }
.form-group textarea { resize:vertical; min-height:120px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-checkbox-wrap { display:flex; gap:12px; align-items:flex-start; margin-bottom:24px; }
.form-checkbox-wrap input[type="checkbox"] { width:18px; height:18px; min-width:18px; margin-top:1px; accent-color:var(--orange); }
.form-checkbox-wrap label { font-size:12px; color:var(--text-dim); line-height:1.5; letter-spacing:0; }
.form-checkbox-wrap a { color:var(--orange); }
.honeypot { display:none !important; visibility:hidden !important; }
.form-alert { padding:14px 18px; border-radius:4px; margin-top:16px; font-size:13px; }
.form-alert-success { background:rgba(74,124,111,.15); border:1px solid var(--mineral); color:#7ec8ac; }
.form-alert-error { background:rgba(180,40,40,.12); border:1px solid rgba(200,50,50,.3); color:#e07070; }
.form-note { font-size:11px; color:var(--text-muted); margin-top:10px; line-height:1.5; }
.form-note a { color:var(--orange); }

.privacy-choice > span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.privacy-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 320px;
  margin-bottom: 8px;
}
.privacy-options label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
  margin: 0;
  cursor: pointer;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.privacy-options input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}
.privacy-options label.is-checked,
.privacy-options label:has(input[type="radio"]:checked) {
  border-color: var(--orange);
  background: rgba(232,119,34,0.14);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(232,119,34,0.35) inset;
}
.privacy-options label:has(input[type="radio"]:focus-visible) {
  outline: 2px solid rgba(232,119,34,0.45);
  outline-offset: 2px;
}
.privacy-choice p {
  margin: 0;
  font-size: 12px;
}
.privacy-choice p a {
  color: var(--orange);
  text-decoration: none;
}
.privacy-choice p a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .privacy-options {
    max-width: none;
    width: 100%;
  }
  .privacy-options label {
    font-size: 14px;
    min-height: 48px;
  }
}

/* ── Legal pages ── */
.legal-fallback h2 { font-size:22px; font-weight:800; margin:32px 0 12px; }
.legal-fallback p { font-size:14px; color:var(--text-dim); line-height:1.7; margin-bottom:16px; }
.legal-note { font-size:13px; color:var(--text-dim); }
.legal-date { font-size:12px; color:var(--text-muted); margin-top:32px; }
.legal-table { width:100%; border-collapse:collapse; margin:16px 0; font-size:13px; }
.legal-table th { background:var(--surface); padding:10px 16px; text-align:left; font-size:10px; letter-spacing:1.5px; color:var(--text-dim); border-bottom:1px solid var(--border); }
.legal-table td { padding:10px 16px; border-bottom:1px solid var(--border); color:var(--text-dim); }
.iubenda-embed-wrap { background:var(--surface); border:1px solid var(--border); border-radius:4px; padding:32px; min-height:200px; }

/* ── Come Lavoriamo Layout ── */
.cl-layout { display:grid; grid-template-columns:1fr 480px; gap:80px; align-items:start; margin-top:60px; }
.steps-list { position:relative; }
@media (max-width:1024px) { .cl-layout { grid-template-columns:1fr; } }
