/*
Theme Name: Apacha Solutions Child
Template: extendable
Description: Child theme per Apacha Solutions — replica landing ri Apacha-10 con block template FSE.
Author: Davide
Version: 1.1.0
*/

/* === Impostazioni globali tema (sovrascrivono il parent) === */
:root {
  --paper:#f3f0e8;
  --surface:#fbf9f4;
  --surface-2:#efece3;
  --ink:#1b1813;
  --ink-2:#3c372e;
  --ink-soft:#736c5f;
  --line:#e2ddd1;
  --line-2:#d3cdbe;
  --accent:#d96a2b;
  --accent-deep:#b8531c;
  --on-accent:#fff8f2;
  --video:#211d18;
  --maxw:1120px;
  --font-display:"Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body:"Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono:"Space Mono", ui-monospace, Menlo, Consolas, monospace;
  --r:14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* === Tipografia === */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.04; }
h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; }
h3 { font-size: 19px; line-height: 1.2; font-weight: 600; }
p { margin: 0; }
.lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-2); max-width: 46ch; text-wrap: pretty; line-height: 1.55; }

.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-deep); margin: 0;
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--accent); display: inline-block; }

/* === Bottoni === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 15px;
  line-height: 1; text-decoration: none; background: var(--accent);
  color: var(--on-accent); border: 1.5px solid var(--accent);
  padding: 14px 20px; border-radius: 11px; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 1px 0 var(--accent-deep);
}
.btn:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn .arr { font-family: var(--font-mono); font-size: 16px; transition: transform .15s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: var(--surface); border-color: var(--ink); transform: none; }
.btn.sm { padding: 10px 15px; font-size: 13.5px; border-radius: 9px; }
.btn.block { width: 100%; }

/* === Hero / Opt-in === */
.hero { padding: clamp(40px, 6vw, 82px) 0 clamp(48px, 6vw, 90px); }
.hero-grid { display: grid; grid-template-columns: 1.12fr 1fr; gap: clamp(28px, 4vw, 52px); align-items: start; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 7px 9px; margin-top: 26px; }
.chip { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .02em; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); padding: 6px 11px; border-radius: 20px; display: inline-flex; gap: 7px; align-items: center; }
.chip b { color: var(--accent-deep); font-weight: 700; }

.video-frame { position: relative; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: var(--video); border: 1px solid #14110d; box-shadow: 0 24px 50px -28px rgba(27,24,19,.7); }
.video-frame .play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.55); display: grid; place-items: center; }

.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 24px; box-shadow: 0 14px 34px -26px rgba(27,24,19,.5); }
.card .form-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card .form-head .t { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.card .form-head .free { font-family: var(--font-mono); font-size: 11px; color: var(--accent-deep); border: 1px solid var(--accent); border-radius: 20px; padding: 3px 9px; }

.field { margin-bottom: 13px; }
.field label { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.field input { width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 9px; padding: 12px 13px; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,106,43,.16); }
.field input.err { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.14); }

.consent { display: flex; gap: 10px; align-items: flex-start; margin: 11px 0; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.consent input { appearance: none; -webkit-appearance: none; flex: none; width: 19px; height: 19px; margin: 1px 0 0; border: 1.5px solid var(--line-2); border-radius: 5px; background: var(--paper); cursor: pointer; position: relative; }
.consent input:checked { background: var(--accent); border-color: var(--accent); }
.consent a { color: var(--accent-deep); text-underline-offset: 2px; }
.consent .req { color: var(--accent-deep); font-weight: 700; }
.form-foot { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); margin-top: 12px; }
.form-err { display: none; font-family: var(--font-mono); font-size: 11.5px; color: #c0392b; margin-top: 10px; }
.form-err.show { display: block; }
.ok { display: none; text-align: left; }
.ok.show { display: block; }

/* === Sezioni === */
section.block { padding: clamp(56px, 7vw, 100px) 0; border-top: 1px solid var(--line); }
.sec-head { max-width: 60ch; }
.sec-head h2 { margin-top: 14px; }
.sec-head .lead { margin-top: 16px; }

/* === 3 consigli === */
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.tip { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 24px; }
.tip .no { font-family: var(--font-mono); font-size: 13px; color: var(--accent-deep); letter-spacing: .05em; }
.tip h3 { margin: 30px 0 10px; font-size: 20px; }
.tip .blur { height: 10px; border-radius: 4px; background: var(--line); margin-bottom: 9px; }
.tip .lock { position: absolute; top: 20px; right: 20px; font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-soft); border: 1px solid var(--line-2); border-radius: 20px; padding: 4px 9px; }
.tip .big-no { position: absolute; right: -10px; bottom: -22px; font-family: var(--font-display); font-weight: 700; font-size: 120px; color: var(--surface-2); line-height: 1; z-index: 0; }
.tip > * { position: relative; z-index: 1; }

/* === Due strade === */
.roads { display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: stretch; margin-top: 44px; }
.road { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 28px; }
.road.bad { background: var(--surface-2); border-style: dashed; }
.road.good { border-color: var(--accent); }
.road .kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.road.good .kicker { color: var(--accent-deep); }
.road h3 { margin: 8px 0 14px; font-size: 23px; }
.road ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.road li { display: flex; gap: 11px; font-size: 15px; color: var(--ink-2); }
.road li .b { font-family: var(--font-mono); flex: none; }
.road.good li .b { color: var(--accent-deep); }
.vs { display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.vs span { border: 1px solid var(--line-2); border-radius: 50%; width: 46px; height: 46px; display: grid; place-items: center; background: var(--paper); }
.roads-note { margin-top: 26px; font-family: var(--font-mono); font-size: 13px; color: var(--accent-deep); text-align: center; }

/* === Chi sono === */
.about { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.photo { aspect-ratio: 4/5; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; }
.photo .ph-cap { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.about .lead { margin-top: 16px; }
.about .sign { font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: 18px; color: var(--ink-2); margin-top: 22px; padding-left: 16px; border-left: 2px solid var(--accent); }

/* === CTA finale === */
.final { background: var(--ink); color: var(--paper); border-radius: 22px; padding: clamp(34px, 5vw, 60px); display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 4vw, 52px); align-items: center; }
.final h2 { color: var(--paper); }
.final .eyebrow { color: var(--accent); }
.final .eyebrow::before { background: var(--accent); }
.final .lead { color: #d8d2c6; }
.final .card { background: #262119; border-color: #3a342a; }
.final .card .form-head .t { color: var(--paper); }
.final .field input { background: #1b1813; border-color: #3a342a; color: var(--paper); }
.final .field label { color: #a59d8e; }
.final .consent { color: #c9c2b5; }
.final .consent input { background: #1b1813; border-color: #3a342a; }

/* === Footer === */
footer { border-top: 1px solid var(--line); padding: 54px 0 40px; margin-top: 8px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.foot-about { font-size: 13.5px; color: var(--ink-soft); max-width: 34ch; line-height: 1.5; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 400; margin: 0 0 14px; }
.foot-col a { display: block; text-decoration: none; color: var(--ink-2); font-size: 14px; padding: 5px 0; }
.foot-col a:hover { color: var(--accent-deep); }
.legal { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: space-between; }
.legal p { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); line-height: 1.6; max-width: 74ch; }

/* === Cookie banner === */
.cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; transform: translateY(120%); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.cookie.show { transform: translateY(0); }
.cookie-in { max-width: var(--maxw); margin: 0 auto; padding: 0 28px 18px; }
.cookie-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 18px 20px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.cookie-card p { font-size: 13px; color: var(--ink-2); flex: 1 1 360px; line-height: 1.5; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* === Responsive === */
@media (max-width: 900px) {
  .hero-grid, .about, .final { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 18px; }
  .tips, .roads { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* === Cookie Bar === */
.cookie{position:fixed; left:0; right:0; bottom:0; z-index:60; transform:translateY(120%); transition:transform .35s cubic-bezier(.2,.8,.2,1);}
.cookie.show{transform:translateY(0);}
.cookie-in{max-width:var(--maxw); margin:0 auto; padding:0 28px 18px;}
.cookie-card{background:var(--surface); border:1px solid var(--line-2); border-radius:var(--r); padding:18px 20px; box-shadow:0 22px 50px -26px rgba(27,24,19,.5); display:flex; gap:20px; align-items:center; flex-wrap:wrap;}
.cookie-card p{font-size:13px; color:var(--ink-2); flex:1 1 360px; line-height:1.5;}
.cookie-card p a{color:var(--accent-deep);}
.cookie-actions{display:flex; gap:10px; flex-wrap:wrap;}

/* === Cookie Preferences Modal === */
.modal-ov{position:fixed; inset:0; z-index:70; background:rgba(27,24,19,.55); backdrop-filter:blur(3px); display:flex; align-items:center; justify-content:center; padding:20px; opacity:0; pointer-events:none; transition:opacity .25s ease;}
.modal-ov.show{opacity:1; pointer-events:auto;}
.modal{width:min(560px,100%); max-height:calc(100vh - 40px); overflow:auto; background:var(--surface); border:1px solid var(--line-2); border-radius:18px; box-shadow:0 30px 70px -30px rgba(27,24,19,.7); transform:translateY(10px) scale(.98); transition:transform .25s cubic-bezier(.2,.8,.2,1);}
.modal-ov.show .modal{transform:none;}
.modal-hd{padding:24px 24px 16px; border-bottom:1px solid var(--line); position:relative;}
.modal-hd .eyebrow{margin:0 0 12px;}
.modal-hd h3{font-family:var(--font-display); font-weight:600; font-size:22px; letter-spacing:-.01em;}
.modal-hd p{margin-top:10px; font-size:14px; color:var(--ink-2); line-height:1.5;}
.modal-hd .x{position:absolute; top:18px; right:18px; width:34px; height:34px; border-radius:9px; border:1px solid var(--line-2); background:var(--paper); cursor:pointer; display:grid; place-items:center; font-family:var(--font-mono); font-size:16px; color:var(--ink-soft); line-height:1;}
.modal-hd .x:hover{border-color:var(--ink); color:var(--ink);}
.modal-body{padding:8px 24px 4px;}
.cat{display:flex; gap:16px; align-items:flex-start; padding:18px 0; border-bottom:1px solid var(--line);}
.cat:last-child{border-bottom:none;}
.cat .txt{flex:1;}
.cat .txt h4{font-family:var(--font-display); font-weight:600; font-size:15.5px; margin:0 0 5px; display:flex; align-items:center; gap:9px;}
.cat .txt .badge{font-family:var(--font-mono); font-size:9.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--accent-deep); border:1px solid var(--accent); border-radius:20px; padding:2px 7px;}
.cat .txt p{margin:0; font-size:13px; color:var(--ink-soft); line-height:1.45;}
.sw{position:relative; flex:none; width:46px; height:27px;}
.sw input{position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer;}
.sw .track{position:absolute; inset:0; background:var(--line-2); border-radius:20px; transition:background .18s;}
.sw .track::after{content:""; position:absolute; top:3px; left:3px; width:21px; height:21px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .18s;}
.sw input:checked + .track{background:var(--accent);}
.sw input:checked + .track::after{transform:translateX(19px);}
.sw input:disabled{cursor:not-allowed;}
.sw input:disabled + .track{background:var(--accent); opacity:.45;}
.modal-ft{padding:18px 24px 24px; display:flex; gap:10px; flex-wrap:wrap; border-top:1px solid var(--line); background:var(--surface-2); border-radius:0 0 18px 18px;}
.modal-ft .btn{flex:1 1 auto;}

/* === Pagine legali === */
.doc { padding: clamp(40px, 5vw, 80px) 0; }
.doc-hero h1 { margin: 14px 0; }
.doc-hero .meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); margin-top: 8px; }
.doc-body { max-width: 72ch; margin-top: 36px; }
.doc-body h2 { font-size: 22px; margin: 28px 0 10px; }
.doc-body h3 { font-size: 17px; margin: 22px 0 8px; color: var(--accent-deep); }
.doc-body p { font-size: 15.5px; color: var(--ink-2); line-height: 1.65; margin: 0 0 14px; }
.doc-body ul, .doc-body ol { padding-left: 22px; }
.doc-body li { font-size: 15px; color: var(--ink-2); line-height: 1.6; margin-bottom: 6px; }
