/*
  EVIT — Foundation
  Single source of truth for brand values shared by every page.
  Change the custom properties in :root to update the whole site.
*/
:root {
  /* Brand palette */
  --bg: #EAEBE4;
  --bg-line: rgba(30, 34, 38, 0.05);
  --ink: #1E2226;
  --surface: #FAFAF6;
  --accent: #FF6A13;
  --accent-ink: #1E2226;
  --steel: #3D5A66;
  --line: #C9CCC2;
  --muted: #6B6F68;

  /* Typography */
  --font-display: 'Big Shoulders Display', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Layout and interaction */
  --content-width: 1280px;
  --page-gutter: 1.5rem;
  --transition-fast: 150ms ease;
}

/* Shared defaults. Page-specific layout remains in each page for now. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); }

/* All existing content containers use the same configurable maximum width. */
:is(.hero, .section, .breadcrumb, .cat-hero, .product-hero, .brands-inner, .about-inner, .quote-inner, .footer-inner) {
  max-width: var(--content-width);
  padding-inline: var(--page-gutter);
}

/* The company section uses the full available width while retaining its responsive grid. */
body > .about .about-inner { width: 100%; max-width: none; }

:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- rev02d: riquadri arrotondati su tutte le pagine ---------- */
.nameplate, .toc-item, .footer-contact, .detail-photo, .data-table-wrap, .facts, .alert, .draft { border-radius: 16px; }
.facts, .detail-photo, .toc-item { overflow: hidden; }
.toc-item .thumb { border-radius: 12px; overflow: hidden; }
.who span { border-radius: 999px; padding-inline: 1.1rem; }
.btn { border-radius: 10px; }
.form-group input, .form-group select, .form-group textarea { border-radius: 10px; }
.tag { border-radius: 6px; }

/* ---------- rev02e: intestazioni tabelle nel blu acciaio del sito ---------- */
.data-table thead th{background:#3D5A66 !important;color:#FFFFFF !important;border-bottom:1px solid #557482;}
.data-table thead tr:last-child th{border-bottom:3px solid #FF6A13;}
.data-table thead tr + tr th{background:#4E6E7B !important;}

/* ---------- rev02g: codici cliccabili e scheda articolo ---------- */
button.cod{all:unset;cursor:pointer;font-weight:700;color:#3D5A66;border-bottom:1.5px dotted #3D5A66;padding:0 1px;display:inline-flex;align-items:center;gap:.35rem;}
button.cod::after{content:"";width:14px;height:14px;flex:none;background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23FF6A13' stroke-width='1.6'%3E%3Crect x='1.5' y='2.5' width='13' height='11' rx='2'/%3E%3Cpath d='M4 10.5h8M4 10.5V7m8 3.5V7'/%3E%3C/svg%3E");}
button.cod:hover,button.cod:focus-visible{color:#FF6A13;border-bottom-color:#FF6A13;}
button.cod:focus-visible{outline:2px solid #3D5A66;outline-offset:2px;border-radius:3px;}
.data-table tbody tr:has(button.cod):hover{background:#EEF3F5 !important;}
.sk{position:fixed;inset:0;z-index:1000;background:rgba(20,28,32,.62);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:1.5rem;animation:skf .18s ease;}
@keyframes skf{from{opacity:0}to{opacity:1}}
.sk-panel{width:min(1000px,100%);max-height:94vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 40px 90px -20px rgba(0,0,0,.55);animation:sku .22s ease;}
@keyframes sku{from{transform:translateY(14px);opacity:.4}to{transform:none;opacity:1}}
.sk-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;padding:1.1rem 1.4rem .9rem;border-bottom:1px solid #E3E8EA;position:sticky;top:0;background:#fff;z-index:1;}
.sk-serie{font-family:'IBM Plex Mono',monospace;font-size:.72rem;letter-spacing:.14em;color:#3D5A66;text-transform:uppercase;}
.sk-head h3{font-family:'Big Shoulders Display',sans-serif;font-weight:900;font-size:2rem;line-height:1;margin-top:.2rem;color:#1E2226;}
.sk-x{width:40px;height:40px;border-radius:50%;border:1px solid #D3DBDF;background:#fff;font-size:1.4rem;line-height:1;cursor:pointer;flex:none;}
.sk-x:hover{background:#3D5A66;color:#fff;border-color:#3D5A66;}
.sk-fig{margin:0;padding:1rem 1.4rem 0;}
.sk-fig img{display:block;width:100%;height:auto;border:1px solid #E3E8EA;border-radius:12px;}
.sk-fig figcaption{font-family:'IBM Plex Mono',monospace;font-size:.72rem;color:#6B6F68;margin-top:.45rem;}
.sk-nofig{margin:1rem 1.4rem 0;padding:1.4rem;border:1px dashed #C9D5DA;border-radius:12px;background:#F4F7F8;color:#3D5A66;font-size:.92rem;}
.sk-tab{padding:1.1rem 1.4rem 0;}
.sk-label{font-family:'IBM Plex Mono',monospace;font-size:.7rem;letter-spacing:.16em;color:#3D5A66;margin-bottom:.45rem;}
.sk-scroll{overflow-x:auto;border:1px solid #D3DBDF;border-radius:12px;}
.sk-tab table{border-collapse:collapse;width:100%;font-size:.84rem;}
.sk-tab th{background:#3D5A66;color:#fff;font-family:'IBM Plex Mono',monospace;font-size:.66rem;letter-spacing:.04em;text-transform:uppercase;font-weight:500;padding:.55rem .7rem;text-align:left;border-bottom:3px solid #FF6A13;vertical-align:bottom;}
.sk-tab td{padding:.65rem .7rem;font-weight:600;white-space:nowrap;}
.sk-foot{display:flex;gap:.75rem;flex-wrap:wrap;padding:1.1rem 1.4rem 1.3rem;}
@media (max-width:640px){
  .sk{padding:0;align-items:flex-end;}
  .sk-panel{border-radius:18px 18px 0 0;max-height:92vh;}
  .sk-tab table,.sk-tab thead,.sk-tab tbody,.sk-tab tr{display:block;}
  .sk-tab thead{display:none;}
  .sk-tab td{display:flex;justify-content:space-between;gap:1rem;border-bottom:1px solid #EEF1F2;white-space:normal;}
  .sk-tab td::before{content:attr(data-h);font-family:'IBM Plex Mono',monospace;font-size:.68rem;color:#6B6F68;text-transform:uppercase;font-weight:400;}
}
@media (prefers-reduced-motion: reduce){.sk,.sk-panel{animation:none;}}

/* ---------- rev02h: piede scheda chiaro ---------- */
.sk .sk-foot{background:#fff;color:#1E2226;font-size:1rem;border-top:1px solid #E3E8EA;margin-top:1.1rem;}
.sk .sk-foot .btn-outline{color:#1E2226;border-color:#1E2226;}
.sk .sk-foot .btn-outline:hover{background:#1E2226;color:#fff;}

/* rev02k: badge più richiesti + riga evidenziata */
.top-badge{display:inline-block;margin-left:.35rem;padding:.1rem .45rem;border-radius:999px;background:#FF6A13;color:#fff;font-family:'IBM Plex Mono',monospace;font-size:.6rem;font-weight:600;letter-spacing:.03em;white-space:nowrap;vertical-align:middle;}
table.data-table tr.row-hit td{background:#FFE9DB !important;transition:background 1.5s;}
