/* ===========================================================
   Sheltia — Sito di reclutamento
   Design tokens — palette istituzionale Sheltia 
   =========================================================== */
:root {
  /* Palette istituzionale: valori HEX del manuale. Arancio solo CTA. */
  --ink: #071D49;
  --ink-70: rgba(7, 29, 73, 0.80);
  --ink-50: rgba(7, 29, 73, 0.72);
  --grey: #071D49;
  --white: #FFFFFF;
  --offwhite: #F3F8FE;
  --line: rgba(7, 29, 73, 0.16);
  --line-soft: rgba(7, 29, 73, 0.09);
  --blue-light: #8DC8F8;
  --blue: #009FDF;
  --blue-deep: #0077C8;
  --cta: #F18219;

  --font: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max: 1120px;
  --radius: 3px;
}

* { 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(--white);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-70); }

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--white);
  padding: 12px 20px; z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }
:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 3px; }

/* ---------- Tri-bar brand mark (used as kicker device) ---------- */
.tri-bar {
  display: inline-flex;
  height: 12px;
  width: 26px;
  border-radius: 2px;
  overflow: hidden;
  margin-right: 8px;
  vertical-align: middle;
}
.tri-bar span { flex: 1; }
.tri-bar .b1 { background: var(--blue); }
.tri-bar .b2 { background: var(--blue-deep); }
.tri-bar .b3 { background: var(--blue-light); }

.kicker {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-deep);
  margin-bottom: 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; height: 84px;
}
.logo-img { height: 64px; width: auto; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none; font-size: 15px; font-weight: 400;
  color: var(--ink-70); position: relative; padding: 4px 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--blue-deep);
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  text-decoration: none; padding: 12px 22px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary, .btn-gold { text-transform: uppercase; letter-spacing: .035em; background: var(--cta); color: var(--white); border-color: var(--cta); }
.btn-primary:hover, .btn-gold:hover { background: var(--cta); color: var(--white); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.4); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform 0.2s ease, opacity 0.2s ease; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 84px 0 0 0; background: var(--white);
    flex-direction: column; align-items: flex-start; padding: 32px; gap: 28px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links { flex-direction: column; gap: 20px; }
  .nav-links a { font-size: 20px; }
  .nav .btn { width: 100%; justify-content: center; }
}

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: 34px; }

.dark { background: var(--ink); color: var(--white); }
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--white); }
.dark p { color: rgba(255,255,255,0.72); }
.dark .kicker { color: var(--blue-light); }

.offwhite { background: var(--offwhite); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 84px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); max-width: 14ch; }
.hero .lede { font-size: 19px; max-width: 46ch; color: var(--ink-70); }
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero-figure { position: relative; aspect-ratio: 1 / 1.05; }
.hero-figure svg { width: 100%; height: 100%; }

.route-line { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.8s ease forwards; }
.route-line.d2 { animation-delay: 0.15s; }
.route-line.d3 { animation-delay: 0.3s; }
.route-line.d4 { animation-delay: 0.45s; }
.route-dot { opacity: 0; animation: pop 0.5s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .route-line { stroke-dashoffset: 0; animation: none; }
  .route-dot { opacity: 1; animation: none; }
}

/* ---------- Stat bar ---------- */
.stat-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-bar .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 32px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; padding-left: 0; }
.stat .num { font-family: var(--font); font-weight: 700; font-size: 32px; color: var(--ink); display: block; }
.stat .label { font-size: 14px; color: var(--ink-50); margin-top: 4px; }
@media (max-width: 760px) {
  .stat-bar .wrap { grid-template-columns: 1fr 1fr; }
  .stat { border-left: none; border-top: 1px solid var(--line); padding-left: 0; padding-top: 20px; }
}

/* ---------- Value list ---------- */
.value-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.value-list li { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.value-list .mark { font-family: var(--font); font-weight: 700; font-size: 18px; color: var(--blue-deep); }
.value-list h3 { font-size: 20px; margin-bottom: 6px; }
.value-list p { margin: 0; }

/* ---------- Two column ---------- */
.two-col { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 320px; margin: 0 auto; }
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; background: transparent; border: 0; }
.role-card { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(7,29,73,.05); background: var(--white); padding: 36px 32px; display: flex; flex-direction: column; }
.role-card .tag { font-size: 13px; color: var(--blue-deep); font-weight: 700; margin-bottom: 14px; }
.role-card h3 { font-size: 22px; margin-bottom: 10px; }
.role-card p { font-size: 15px; flex-grow: 1; }
.role-card .btn { margin-top: 20px; align-self: flex-start; }
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }

/* ---------- Numbered steps (genuine sequences) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { border-top: 3px solid var(--ink); padding-top: 20px; }
.step:nth-child(4n+1) { border-top-color: var(--blue-deep); }
.step:nth-child(4n+2) { border-top-color: var(--blue-deep); }
.step:nth-child(4n+3) { border-top-color: var(--blue-deep); }
.step:nth-child(4n+4) { border-top-color: var(--ink); }
.step .step-num { font-family: var(--font); font-weight: 700; font-size: 36px; color: var(--ink); display: block; margin-bottom: 8px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14.5px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Quote / testimonial ---------- */
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.quote-card { background: var(--white); padding: 40px; }
.quote-card blockquote { font-size: 20px; font-weight: 400; line-height: 1.5; margin: 0 0 20px; color: var(--ink); }
.quote-person { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.quote-person .who { font-size: 14px; font-weight: 600; }
.quote-person .role { font-size: 13px; color: var(--ink-50); }
@media (max-width: 760px) { .quote-grid { grid-template-columns: 1fr; } }

/* ---------- Placeholder block ---------- */
.placeholder-box {
  border: 1px dashed var(--ink-50); border-radius: var(--radius); padding: 26px;
  display: flex; align-items: center; gap: 16px; color: var(--ink-50); font-size: 14px;
  background: var(--offwhite);
}
.placeholder-box .ph-icon {
  width: 38px; height: 38px; border-radius: 50%; border: 1px dashed var(--ink-50);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* ---------- Branch directory grid (sedi.html) ---------- */
.branch-directory {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  background: transparent;
  border: 0;
}
.branch-tile {
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(7,29,73,.05);
  background: var(--white);
  padding: 28px 26px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: background 0.15s ease;
}
.branch-tile:hover { background: var(--offwhite); }
.branch-tile .city { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.branch-tile .addr { font-size: 13.5px; color: var(--ink-50); margin-bottom: 12px; }
.branch-tile .go { font-size: 13.5px; font-weight: 600; color: var(--blue-deep); }
@media (max-width: 860px) { .branch-directory { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .branch-directory { grid-template-columns: 1fr; } }

/* ---------- Branch page (filiale-*.html) ---------- */
.branch-hero { padding: 60px 0 52px; }
.branch-hero .kicker { margin-bottom: 10px; }
.branch-hero h1 { font-size: clamp(32px, 4.5vw, 46px); }

.branch-manager { padding: 64px 0 80px; }
.branch-manager-grid { display: grid; grid-template-columns: 400px minmax(0,1fr); gap: 48px; align-items: start; }
.branch-manager-content { min-width: 0; }
.branch-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.branch-contact .item { min-width: 0; overflow-wrap: anywhere; }
.branch-hero .lede { margin-bottom: 0; }

.manager-photo-frame {
  width: auto;
  height: auto;

  border: 1px dashed var(--ink-50);
  border-radius: var(--radius);
  background: var(--offwhite);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-50);
  text-align: center;
  padding: 20px;
}
.manager-photo-frame .ph-icon {
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px dashed var(--ink-50);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px;
}
.manager-photo-frame span.note { font-size: 12.5px; max-width: 20ch; }
.manager-photo-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

.manager-name { font-size: 26px; margin-bottom: 2px; }
.manager-role { font-size: 14px; color: var(--grey); font-weight: 600; margin-bottom: 24px; }

.manager-message {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 28px;
  padding-left: 20px;
  border-left: 3px solid var(--blue-deep);
}

.branch-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.branch-contact .item { font-size: 14.5px; }
.branch-contact .item .lbl { display: block; font-size: 12px; color: var(--ink-50); font-weight: 600; margin-bottom: 4px; }
.branch-contact .item a { text-decoration: none; color: var(--ink); font-weight: 600; }
.branch-contact .item a:hover { color: var(--blue-deep); }

/* ---------- Branch grid (legacy — kept for Chi siamo teaser) ---------- */
.branch-grid { columns: 3; column-gap: 40px; }
.branch-grid div { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
@media (max-width: 760px) { .branch-grid { columns: 2; } }
@media (max-width: 500px) { .branch-grid { columns: 1; } }

/* ---------- CTA banner ---------- */
.cta-banner { padding: 88px 0; text-align: left; margin-bottom: -50px}
.cta-banner .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-banner h2 { font-size: 32px; margin-bottom: 0; max-width: 20ch; }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--ink-50); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: 15px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-deep); }
.field textarea { resize: vertical; min-height: 120px; }

.checkbox-field { display: flex; align-items: flex-start; gap: 10px; grid-column: 1 / -1; }
.checkbox-field input { margin-top: 4px; }
.checkbox-field label { font-size: 13.5px; font-weight: 400; color: var(--ink-70); }

.form-note { font-size: 13.5px; color: var(--ink-50); margin-top: 20px; max-width: 60ch; }
.form-status { margin-top: 18px; font-size: 14.5px; display: none; }
.form-status.show { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.65); padding: 64px 0 32px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.14); }
.footer-grid .logo-img { height: 64px; margin-bottom: 14px; }
.footer-grid h4 { color: var(--white); font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { text-decoration: none; color: inherit; }
.footer-grid a:hover { color: var(--white); }
.footer-bottom { padding-top: 28px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255,255,255,0.75); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding: 60px 0 52px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(32px, 4.5vw, 46px); max-width: 18ch; }
.page-hero .lede { font-size: 18px; max-width: 52ch; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.small { font-size: 13.5px; color: var(--ink-50); }

/* Contrasto delle schede bianche dentro sezioni blu. */
.quote-card { color: var(--ink); }
.dark .quote-card h3 { color: var(--ink); }
.dark .quote-card p { color: var(--ink-70); }
.site-footer p { color: rgba(255,255,255,0.80); }
.footer-grid > div { min-width: 0; }
.site-footer a { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .nav { visibility: hidden; bottom: auto; height: calc(100dvh - 84px); overflow-y: auto; }
  .nav.open { visibility: visible; }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 20px; }
  .branch-manager-grid { grid-template-columns: 1fr; gap: 28px; }
  .branch-manager { padding-bottom: 56px; }
  .manager-photo-frame { width: 100%; max-width: 280px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .stat .num { font-size: clamp(21px, 6vw, 28px); }
}

@media (max-width: 860px) { .branch-manager-grid { grid-template-columns: 1fr; gap: 32px; } .manager-photo-frame { max-width: 280px; } }

/* Revisione: card editoriali indipendenti. */
.quote-grid { gap: 24px; background: transparent; border: 0; }
.quote-card { border: 1px solid var(--line); border-radius: 12px; color: #333; }
.quote-card .placeholder-box { color: #444; background: var(--offwhite); border-color: #7b8493; }
.quote-card .ph-icon { border-color: #7b8493; color: #444; }
.hero-photo { aspect-ratio: 7 / 8; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a, .social-pending { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid currentColor; border-radius: 50%; }
.social-pending { opacity: .5; }
.privacy-copy { max-width: 850px; }
.privacy-copy h2 { font-size: 25px; margin-top: 36px; }
.privacy-copy p { max-width: none; }
#share-status { flex-basis: 100%; margin: 0; }
#share-url:not([hidden]) { width: 100%; padding: 12px; }
