/* ============================================================
   AGENZIA PRINCIPE 2 — Design System
   Pratiche auto a Torino
   ============================================================ */

/* ---------- Tokens ---------- */
:root{
  /* Brand — Principe Red */
  --red-50:  #FBECEE;
  --red-100: #F6D4D8;
  --red-200: #EFAAB1;
  --red-500: #DE2233;
  --red-600: #D11A2A;   /* primary */
  --red-700: #AF1422;   /* hover */
  --red-800: #8A0F1B;

  /* Ink / neutral (warm-charcoal, on brand with logo black) */
  --ink-900: #14171C;   /* darkest / dark sections */
  --ink-800: #1B1F26;
  --ink-700: #272C34;
  --slate-700: #3A424E; /* strong body */
  --slate-600: #4C5560;
  --slate-500: #6C757F; /* muted */
  --slate-400: #99A1AB;
  --line-300: #DCE0E6;  /* borders */
  --line-200: #E8EBEF;
  --line-100: #F0F2F5;

  /* Surfaces */
  --bg:        #FFFFFF;
  --bg-alt:    #F5F6F8;  /* light gray section */
  --bg-warm:   #FAF9F6;  /* warm white */

  /* Functional */
  --success: #1E8E5A;
  --success-bg: #E7F5EE;
  --warning: #C7860B;
  --warning-bg: #FBF1DE;
  --error:   #C23B2E;
  --error-bg: #FBEAE7;
  --info:    #2C6FB3;
  --info-bg: #E7F0F9;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(20,23,28,.06);
  --sh-sm: 0 2px 8px rgba(20,23,28,.06), 0 1px 2px rgba(20,23,28,.05);
  --sh-md: 0 10px 26px -8px rgba(20,23,28,.14), 0 3px 8px -4px rgba(20,23,28,.08);
  --sh-lg: 0 26px 60px -18px rgba(20,23,28,.28), 0 8px 22px -10px rgba(20,23,28,.14);
  --sh-red: 0 14px 30px -10px rgba(209,26,42,.42);

  /* Type */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;

  /* Layout */
  --container: 1200px;
  --container-wide: 1320px;
  --gutter: 24px;
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--slate-700);
  background:var(--bg);
  font-size:17px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{ margin:0; font-family:var(--font-display); color:var(--ink-900); line-height:1.08; letter-spacing:-.02em; font-weight:800; }
p{ margin:0; }
::selection{ background:var(--red-600); color:#fff; }

/* ---------- Type scale ---------- */
.h1{ font-size:clamp(2.6rem,5.2vw,4.4rem); font-weight:800; letter-spacing:-.035em; line-height:1.02; }
.h2{ font-size:clamp(1.9rem,3.4vw,2.95rem); font-weight:800; letter-spacing:-.03em; line-height:1.05; }
.h3{ font-size:clamp(1.3rem,2vw,1.7rem); font-weight:700; letter-spacing:-.02em; line-height:1.15; }
.h4{ font-size:1.16rem; font-weight:700; letter-spacing:-.01em; }
.body-lg{ font-size:1.18rem; line-height:1.62; }
.body{ font-size:1rem; }
.caption{ font-size:.86rem; color:var(--slate-500); line-height:1.5; }
.label{
  font-family:var(--font-display);
  font-size:.78rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  color:var(--red-600);
}
.label--muted{ color:var(--slate-500); }

/* eyebrow chip */
.eyebrow{
  display:inline-flex; align-items:center; gap:9px;
  font-family:var(--font-display); font-weight:700; font-size:.74rem;
  letter-spacing:.16em; text-transform:uppercase; color:var(--red-700);
  padding:7px 14px 7px 12px; background:var(--red-50);
  border:1px solid var(--red-100); border-radius:var(--r-pill);
}
.eyebrow::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--red-600); flex:none; }
.eyebrow--ondark{ color:#fff; background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.16); }

/* ---------- Layout ---------- */
.container{ width:100%; max-width:var(--container); margin-inline:auto; padding-inline:var(--gutter); }
.container-wide{ width:100%; max-width:var(--container-wide); margin-inline:auto; padding-inline:var(--gutter); }
.section{ padding-block:clamp(64px,8vw,116px); }
.section--tight{ padding-block:clamp(48px,5vw,72px); }
.section--alt{ background:var(--bg-alt); }
.section--warm{ background:var(--bg-warm); }
.section--ink{ background:var(--ink-900); color:#C9CFD8; }
.section--ink h1,.section--ink h2,.section--ink h3,.section--ink h4{ color:#fff; }

.grid{ display:grid; gap:24px; }
.text-center{ text-align:center; }
.measure{ max-width:62ch; }
.measure-sm{ max-width:46ch; }

.section-head{ max-width:680px; margin-bottom:48px; }
.section-head.text-center{ margin-inline:auto; }
.section-head .h2{ margin-top:16px; }
.section-head p{ margin-top:18px; font-size:1.12rem; color:var(--slate-600); }
.section--ink .section-head p{ color:#A7B0BC; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  font-family:var(--font-display); font-weight:700; font-size:.98rem; letter-spacing:.005em;
  padding:14px 24px; border-radius:var(--r-pill); border:1.5px solid transparent;
  transition:transform .18s cubic-bezier(.3,.7,.4,1), box-shadow .2s, background .18s, color .18s, border-color .18s;
  white-space:nowrap; cursor:pointer; line-height:1;
}
.btn svg{ width:18px; height:18px; }
.btn--primary{ background:var(--red-600); color:#fff; box-shadow:var(--sh-red); }
.btn--primary:hover{ background:var(--red-700); transform:translateY(-2px); box-shadow:0 18px 36px -10px rgba(209,26,42,.55); }
.btn--primary:active{ transform:translateY(0); }
.btn--dark{ background:var(--ink-900); color:#fff; }
.btn--dark:hover{ background:var(--ink-700); transform:translateY(-2px); box-shadow:var(--sh-md); }
.btn--ghost{ background:#fff; color:var(--ink-900); border-color:var(--line-300); }
.btn--ghost:hover{ border-color:var(--ink-900); transform:translateY(-2px); box-shadow:var(--sh-sm); }
.btn--ghost-ondark{ background:transparent; color:#fff; border-color:rgba(255,255,255,.28); }
.btn--ghost-ondark:hover{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.55); transform:translateY(-2px); }
.btn--lg{ padding:17px 30px; font-size:1.05rem; }
.btn--sm{ padding:10px 18px; font-size:.86rem; }
.btn--block{ width:100%; }
.btn .arr{ transition:transform .2s; }
.btn:hover .arr{ transform:translateX(3px); }

/* text link with arrow */
.link-arrow{
  display:inline-flex; align-items:center; gap:7px;
  font-family:var(--font-display); font-weight:700; font-size:.92rem; color:var(--red-600);
  letter-spacing:.005em;
}
.link-arrow svg{ width:16px; height:16px; transition:transform .2s; }
.link-arrow:hover svg{ transform:translateX(4px); }

/* ---------- Cards ---------- */
.card{
  background:#fff; border:1px solid var(--line-200); border-radius:var(--r-lg);
  box-shadow:var(--sh-sm); transition:transform .22s cubic-bezier(.3,.7,.4,1), box-shadow .22s, border-color .22s;
}

/* ---------- Header ---------- */
.site-header{
  position:fixed; top:0; left:0; right:0; z-index:100; height:var(--header-h);
  display:flex; align-items:center;
  background:rgba(255,255,255,.82); backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid transparent; transition:border-color .25s, box-shadow .25s, background .25s;
}
.site-header.scrolled{ border-bottom-color:var(--line-200); box-shadow:0 2px 14px rgba(20,23,28,.05); }
.site-header .container-wide{ display:flex; align-items:center; justify-content:space-between; gap:24px; }
.brand{ display:flex; align-items:center; gap:11px; flex:none; }
.brand img{ height:38px; width:auto; }
.nav{ display:flex; align-items:center; gap:4px; }
.nav a{
  font-family:var(--font-display); font-weight:600; font-size:.94rem; color:var(--slate-700);
  padding:9px 14px; border-radius:var(--r-sm); transition:color .15s, background .15s; position:relative;
}
.nav a:hover{ color:var(--ink-900); background:var(--line-100); }
.nav a.active{ color:var(--red-700); }
.header-cta{ display:flex; align-items:center; gap:12px; flex:none; }
.header-phone{ display:inline-flex; align-items:center; gap:8px; font-family:var(--font-display); font-weight:700; font-size:.92rem; color:var(--ink-900); }
.header-phone svg{ width:16px; height:16px; color:var(--red-600); }
.burger{ display:none; width:44px; height:44px; border-radius:var(--r-sm); align-items:center; justify-content:center; color:var(--ink-900); }
.burger:hover{ background:var(--line-100); }

/* mobile nav drawer */
.mobile-nav{
  position:fixed; inset:0; z-index:200; background:var(--ink-900); color:#fff;
  display:flex; flex-direction:column; padding:24px;
  transform:translateY(-100%); opacity:0; pointer-events:none;
  transition:transform .38s cubic-bezier(.4,0,.1,1), opacity .3s;
}
.mobile-nav.open{ transform:translateY(0); opacity:1; pointer-events:auto; }
.mobile-nav .m-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:36px; }
.mobile-nav .m-top img{ height:34px; }
.mobile-nav a{ font-family:var(--font-display); font-weight:700; font-size:1.7rem; padding:14px 0; border-bottom:1px solid rgba(255,255,255,.08); color:#fff; letter-spacing:-.02em; }
.mobile-nav a.active{ color:var(--red-500); }
.mclose{ width:44px;height:44px;border-radius:var(--r-sm);display:flex;align-items:center;justify-content:center;color:#fff;background:rgba(255,255,255,.08); }

/* sticky mobile CTA bar */
.sticky-cta{
  position:fixed; left:0; right:0; bottom:0; z-index:90; display:none;
  gap:10px; padding:12px 14px calc(12px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.94); backdrop-filter:blur(12px); border-top:1px solid var(--line-200);
}
.sticky-cta .btn{ flex:1; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner{
  position:fixed; left:16px; right:16px; bottom:16px; z-index:300;
  max-width:540px; margin-inline:auto;
  background:var(--ink-900); color:#D4DAE2; border:1px solid rgba(255,255,255,.12);
  border-radius:var(--r-lg); box-shadow:var(--sh-lg);
  padding:18px 20px; display:flex; gap:18px; align-items:center; flex-wrap:wrap;
}
.cookie-banner strong{ color:#fff; font-family:var(--font-display); font-size:1rem; display:block; margin-bottom:4px; }
.cookie-banner p{ font-size:.86rem; line-height:1.5; margin:0; }
.cookie-text{ flex:1 1 280px; }
.cookie-actions{ display:flex; gap:10px; flex:none; }
/* lift above the sticky mobile CTA bar when it's visible */
@media(max-width:860px){ .cookie-banner{ left:10px; right:10px; bottom:calc(82px + env(safe-area-inset-bottom)); } }
@media(max-width:600px){ .cookie-banner{ padding:16px; gap:12px; } .cookie-actions{ width:100%; } .cookie-actions .btn{ flex:1; } }

/* ---------- Footer ---------- */
.site-footer{ background:var(--ink-900); color:#9AA3AF; padding-top:72px; }
.site-footer h4{ color:#fff; font-size:1rem; font-family:var(--font-display); letter-spacing:.04em; text-transform:uppercase; margin-bottom:18px; font-weight:700; }
.site-footer a{ color:#9AA3AF; transition:color .15s; }
.site-footer a:hover{ color:#fff; }
.footer-grid{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1.2fr; gap:40px; padding-bottom:56px; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.09); padding:24px 0; display:flex; justify-content:space-between; align-items:center; gap:16px; font-size:.85rem; }
.footer-logo{ height:40px; margin-bottom:18px; }

/* ---------- Service card ---------- */
.svc-card{
  position:relative; display:flex; flex-direction:column; gap:14px;
  padding:26px 24px 24px; background:#fff; border:1px solid var(--line-200);
  border-radius:var(--r-lg); box-shadow:var(--sh-xs);
  transition:transform .22s cubic-bezier(.3,.7,.4,1), box-shadow .24s, border-color .22s;
  overflow:hidden; cursor:pointer; height:100%;
}
.svc-card::after{ content:""; position:absolute; left:0; top:0; height:3px; width:0; background:var(--red-600); transition:width .3s ease; }
.svc-card:hover{ transform:translateY(-5px); box-shadow:var(--sh-md); border-color:transparent; }
.svc-card:hover::after{ width:100%; }
.svc-ico{
  width:50px; height:50px; border-radius:13px; flex:none;
  display:flex; align-items:center; justify-content:center;
  background:var(--red-50); color:var(--red-600);
  transition:background .22s, color .22s, transform .22s;
}
.svc-ico svg{ width:26px; height:26px; }
.svc-card:hover .svc-ico{ background:var(--red-600); color:#fff; transform:rotate(-4deg) scale(1.04); }
.svc-card h3{ font-size:1.18rem; font-weight:700; }
.svc-card p{ color:var(--slate-600); font-size:.96rem; line-height:1.55; flex:1; }
.svc-card .svc-more{ display:inline-flex; align-items:center; gap:6px; font-family:var(--font-display); font-weight:700; font-size:.85rem; color:var(--red-600); margin-top:2px; }
.svc-card .svc-more svg{ width:15px; height:15px; transition:transform .2s; }
.svc-card:hover .svc-more svg{ transform:translateX(4px); }

/* category tag */
.tag{ display:inline-flex; align-items:center; gap:6px; font-family:var(--font-display); font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:5px 11px; border-radius:var(--r-pill); }
.tag--red{ background:var(--red-50); color:var(--red-700); }
.tag--slate{ background:var(--line-100); color:var(--slate-600); }

/* ---------- Reveal animation ----------
   Content is VISIBLE by default; JS arms (hides) below-fold items then
   reveals them. This guarantees content can never be stuck invisible. */
.reveal{ transition:opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.armed{ opacity:0; transform:translateY(26px); }
.reveal.in{ opacity:1 !important; transform:none !important; }
.reveal-d1{ transition-delay:.07s; }
.reveal-d2{ transition-delay:.14s; }
.reveal-d3{ transition-delay:.21s; }
.reveal-d4{ transition-delay:.28s; }
@media (prefers-reduced-motion:reduce){
  .reveal,.reveal.armed{ opacity:1 !important; transform:none !important; transition:none; }
  *{ scroll-behavior:auto !important; }
}

/* ---------- Accordion ---------- */
.acc-item{ border-bottom:1px solid var(--line-200); }
.acc-q{ width:100%; display:flex; align-items:center; justify-content:space-between; gap:20px; text-align:left; padding:24px 4px; font-family:var(--font-display); font-weight:700; font-size:1.12rem; color:var(--ink-900); letter-spacing:-.01em; }
.acc-q:hover{ color:var(--red-700); }
.acc-icon{ flex:none; width:30px; height:30px; border-radius:50%; border:1.5px solid var(--line-300); display:flex; align-items:center; justify-content:center; transition:.25s; position:relative; }
.acc-icon::before,.acc-icon::after{ content:""; position:absolute; background:currentColor; border-radius:2px; }
.acc-icon::before{ width:12px; height:2px; }
.acc-icon::after{ width:2px; height:12px; transition:transform .25s; }
.acc-item.open .acc-icon{ background:var(--red-600); border-color:var(--red-600); color:#fff; }
.acc-item.open .acc-icon::after{ transform:scaleY(0); }
.acc-a{ overflow:hidden; max-height:0; transition:max-height .35s ease; }
.acc-a .acc-a-inner{ padding:0 4px 26px; color:var(--slate-600); font-size:1.02rem; line-height:1.62; max-width:64ch; }

/* ---------- Step / process ---------- */
.step-num{ font-family:var(--font-display); font-weight:800; font-size:1.05rem; width:46px; height:46px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex:none; }

/* breadcrumb */
.breadcrumb{ display:flex; align-items:center; gap:9px; font-size:.86rem; color:var(--slate-500); flex-wrap:wrap; }
.breadcrumb a:hover{ color:var(--red-600); }
.breadcrumb .sep{ color:var(--slate-400); }

/* form */
.field{ display:flex; flex-direction:column; gap:7px; }
.field label{ font-family:var(--font-display); font-weight:600; font-size:.88rem; color:var(--ink-900); }
.field label .req{ color:var(--red-600); }
.field input,.field select,.field textarea{
  font-family:var(--font-body); font-size:1rem; color:var(--ink-900);
  padding:13px 15px; border:1.5px solid var(--line-300); border-radius:var(--r-md); background:#fff;
  transition:border-color .16s, box-shadow .16s; width:100%;
}
.field textarea{ resize:vertical; min-height:130px; }
.field input:focus,.field select:focus,.field textarea:focus{ outline:none; border-color:var(--red-600); box-shadow:0 0 0 4px var(--red-50); }
.field.err input,.field.err select,.field.err textarea{ border-color:var(--error); box-shadow:0 0 0 4px var(--error-bg); }
.field .errmsg{ font-size:.8rem; color:var(--error); font-weight:600; }
.checkbox-row{ display:flex; align-items:flex-start; gap:11px; }
.checkbox-row input{ width:20px; height:20px; flex:none; margin-top:2px; accent-color:var(--red-600); }
.checkbox-row label{ font-size:.9rem; color:var(--slate-600); font-weight:400; line-height:1.5; }

/* misc utilities */
.divider-dot{ width:5px;height:5px;border-radius:50%;background:var(--slate-400);flex:none; }
.kicker-rule{ width:46px; height:3px; background:var(--red-600); border-radius:2px; }
.iconbox{ width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:none; }

/* grids responsive helpers */
.cols-2{ grid-template-columns:repeat(2,1fr); }
.cols-3{ grid-template-columns:repeat(3,1fr); }
.cols-4{ grid-template-columns:repeat(4,1fr); }

@media(max-width:1080px){
  .footer-grid{ grid-template-columns:1fr 1fr; gap:36px; }
  .cols-4{ grid-template-columns:repeat(2,1fr); }
}
/* collapse nav to burger before it crowds the CTA */
@media(max-width:1000px){
  .nav, .header-phone{ display:none; }
  .burger{ display:flex; }
}
@media(max-width:860px){
  :root{ --header-h:64px; }
  .nav, .header-phone{ display:none; }
  .burger{ display:flex; }
  .cols-3{ grid-template-columns:repeat(2,1fr); }
  .sticky-cta{ display:flex; }
  /* reserve room so the fixed sticky CTA never covers the footer bottom row */
  body{ padding-bottom:calc(72px + env(safe-area-inset-bottom)); }
}
@media(max-width:600px){
  :root{ --gutter:18px; }
  .cols-2,.cols-3,.cols-4{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr; gap:30px; }
  .footer-bottom{ flex-direction:column; align-items:flex-start; }
}
