
/* =========================================
   EPTA FIERA - TOUCHSCREEN APPLICATION
========================================= */

:root {
  --bg: #101217;
  --surface: #191c23;
  --surface-hover: #242831;

  --text: #f8f7f5;
  --muted: #9a9da7;
  --accent: #c4ae91;

  --border: rgba(255, 255, 255, .11);
  --radius: 18px;

  --header-height: 72px;
  --footer-height: 42px;
}

/* =========================================
   RESET AND VIEWPORT
========================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  width: 100%;
  height: 100%;
  margin: 0;

  overflow: hidden;
  overscroll-behavior: none;

  background: var(--bg);
  color: var(--text);

  font-family: "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:disabled {
  cursor: default;
}

[hidden] {
  display: none !important;
}

/* =========================================
   APPLICATION SHELL
========================================= */

.app {
  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100vh;
  height: 100dvh;

  min-height: 0;
  overflow: hidden;
}

.header {
  flex: 0 0 var(--header-height);

  width: 100%;
  min-height: 0;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding: 8px clamp(16px, 3vw, 50px);

  border-bottom: 1px solid var(--border);
}

/* =========================================
   HEADER
========================================= */

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;

  min-width: 0;
  padding: 0;

  border: 0;
  background: transparent;
  color: var(--text);

  font-size: clamp(19px, 2vw, 27px);
  font-weight: 750;
  letter-spacing: -1px;
}

.header-brand small {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
}

.brand-separator {
  width: 1px;
  height: 24px;
  flex-shrink: 0;
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.language-switch {
  display: flex;
  padding: 4px;

  border: 1px solid var(--border);
  border-radius: 100px;
}

.lang-btn {
  width: 48px;
  height: 38px;

  border: 0;
  border-radius: 100px;

  background: transparent;
  color: var(--muted);

  font-size: 13px;
  font-weight: 700;
}

.lang-btn.active {
  background: var(--accent);
  color: var(--bg);
}

.icon-button {
  width: 46px;
  height: 46px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 50%;

  background: transparent;
  color: var(--text);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

/* =========================================
   MAIN CONTENT
========================================= */

.main-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;

  width: 100%;
  min-width: 0;
  min-height: 0;

  overflow: hidden;
}

/* =========================================
   HOME SCREEN
========================================= */

.home {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  max-width: 1100px;
  min-height: 0;

  margin: 0 auto;
  padding: clamp(12px, 3vh, 36px) 24px;

  overflow: hidden;
  /* Taglia solo in verticale: la fascia dei loghi può uscire ai lati della colonna. */
  overflow-x: visible;
  overflow-y: clip;
  text-align: center;
}

.home-eyebrow,
.section-kicker {
  color: var(--accent);

  font-size: clamp(9px, .8vw, 12px);
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.home-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: clamp(90px, 23vh, 225px);
  min-height: 0;

  margin: clamp(12px, 2vh, 28px) 0;
}

.home-logo {
  display: block;

  max-width: min(70vw, 580px);
  max-height: 100%;

  width: auto;
  height: auto;

  object-fit: contain;
}

.home-logo-fallback {
  font-size: clamp(35px, 6vw, 85px);
  font-weight: 750;
  letter-spacing: -.06em;
}

.accent-line {
  width: 60px;
  height: 2px;

  margin: 0 auto clamp(12px, 2vh, 25px);
  background: var(--accent);
}

.home-tagline {
  margin: 0 0 clamp(20px, 4vh, 45px);

  font-size: clamp(15px, 1.6vw, 22px);
  line-height: 1.35;

  color: var(--muted);
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vh, 16px);

  width: min(100%, 480px);
  flex-shrink: 0;
}

.action-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  width: 100%;
  min-height: clamp(54px, 7.5vh, 82px);

  padding: 12px 22px;

  border: 1px solid var(--border);
  border-radius: 14px;

  font-size: clamp(13px, 1.15vw, 17px);
  font-weight: 650;
  text-align: left;

  transition:
    background .2s ease,
    border-color .2s ease;
}

.action-button.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.action-button.secondary {
  background: var(--surface);
  color: var(--text);
}

.action-button.secondary:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.button-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.button-icon {
  font-size: 22px;
}

.action-button .arrow {
  font-size: 24px;
}

/* =========================================
   INNER PAGES - ONE SCREEN
========================================= */

.page-view {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;

  width: 100%;
  max-width: 1600px;
  min-width: 0;
  min-height: 0;

  margin: 0 auto;

  padding:
    clamp(10px, 1.8vh, 22px)
    clamp(16px, 3vw, 50px)
    clamp(8px, 1.5vh, 18px);

  overflow: hidden;
}

.back-button {
  align-self: flex-start;
  flex-shrink: 0;

  min-height: clamp(34px, 4.5vh, 46px);
  padding: 0 18px;

  border: 1px solid var(--border);
  border-radius: 100px;

  background: var(--surface);
  color: var(--text);

  font-size: 13px;
  font-weight: 600;
}

.back-button:hover {
  border-color: var(--accent);
}

/* =========================================
   PAGE HEADING
========================================= */

.page-heading {
  flex: 0 0 auto;
  min-width: 0;

  margin:
    clamp(10px, 2vh, 24px)
    0
    clamp(10px, 1.8vh, 22px);
}

.page-heading h1 {
  margin: 6px 0;

  font-size: clamp(26px, 3.1vw, 49px);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -.045em;
}

.page-description {
  max-width: 900px;
  margin: 0;

  color: var(--muted);

  font-size: clamp(12px, 1vw, 16px);
  line-height: 1.4;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  overflow: hidden;
}

/* =========================================
   PAGE CONTENT AREA
========================================= */

.page-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;

  width: 100%;
  min-width: 0;
  min-height: 0;
  gap: 8px;

  overflow: hidden;
}

/* =========================================
   PAGINATED GRID
========================================= */

.company-grid {
  display: grid;
  flex: 1 1 auto;

  width: 100%;
  min-width: 0;
  min-height: 0;

  grid-template-columns:
    repeat(var(--grid-cols, 3), minmax(0, 1fr));

  grid-template-rows:
    repeat(var(--grid-rows, 2), minmax(0, var(--grid-row-size, 1fr)));
  align-content: start;

  gap: clamp(9px, 1vw, 16px);

  overflow: hidden;
}

/* =========================================
   COMPANY / DIVISION / CATALOGUE CARDS
========================================= */

.company-card {
  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100%;

  min-width: 0;
  min-height: 0;

  padding: clamp(11px, 1.3vw, 22px);

  gap: clamp(8px, 1vh, 14px);

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: var(--surface);
  color: var(--text);

  text-align: left;

  overflow: hidden;

  transition:
    background .2s ease,
    border-color .2s ease;
}

.company-card:hover {
  background: var(--surface-hover);
  border-color: rgba(196, 174, 145, .5);
}

.company-card:active {
  border-color: var(--accent);
}

.company-card:disabled {
  opacity: .55;
}

.card-number {
  flex-shrink: 0;

  color: var(--accent);

  font-size: 11px;
  font-weight: 650;
  letter-spacing: 1px;
}

/* =========================================
   COMPANY LOGOS
========================================= */

.company-logo-frame {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 0;

  padding: clamp(6px, 1vw, 15px);

  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: 12px;

  overflow: hidden;
}

.company-logo {
  display: block;

  width: 100%;
  height: 100%;

  max-width: 100%;
  max-height: 100%;

  object-fit: contain;
  object-position: center;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.company-logo-frame.is-fallback {
  background: rgba(196, 174, 145, .045);
}

.company-logo-placeholder {
  color: var(--muted);

  font-size: clamp(15px, 1.5vw, 25px);
  font-weight: 650;

  text-align: center;
  overflow-wrap: anywhere;
}

/* =========================================
   CARD BOTTOM
========================================= */

.company-card-bottom {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  justify-content: space-between;

  min-width: 0;
  gap: 10px;
}

.company-card-info {
  min-width: 0;
}

.card-title {
  margin: 0 0 5px;

  font-size: clamp(16px, 1.5vw, 25px);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.035em;

  overflow-wrap: anywhere;
}

.card-caption {
  display: block;

  color: var(--muted);

  font-size: clamp(10px, .8vw, 13px);
  line-height: 1.3;
}

.card-arrow {
  display: grid;
  flex: 0 0 auto;
  place-items: center;

  width: clamp(32px, 3vw, 44px);
  height: clamp(32px, 3vw, 44px);

  border-radius: 50%;

  background: rgba(196, 174, 145, .10);
  color: var(--accent);

  font-size: 20px;
}

.company-card:hover .card-arrow {
  background: var(--accent);
  color: var(--bg);
}

/* =========================================
   CATALOGUE COVERS
========================================= */

.catalog-card {
  min-height: 0;
}

.catalog-cover-frame {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: auto;
  min-height: 0;

  padding: clamp(6px, .8vw, 12px);

  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 12px;

  background:
    radial-gradient(
      ellipse at center,
      #30343e 0%,
      #22252d 65%,
      #1d2027 100%
    );

  overflow: hidden;
}

.catalog-cover-image {
  display: block;

  width: 100%;
  height: 100%;

  min-height: 0;
  max-width: 100%;
  max-height: 100%;

  object-fit: contain;
  object-position: center;

  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .28));

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;

  pointer-events: none;
}

.catalog-cover-frame.is-placeholder {
  background: linear-gradient(145deg, #292d36, #20232b);
}

.catalog-cover-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  color: var(--muted);
  text-align: center;
}

.catalog-cover-placeholder span {
  font-size: 12px;
  line-height: 1.3;
}

/* =========================================
   INTERNAL PAGINATION
========================================= */

.page-pager {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  gap: 15px;

  width: 100%;
  height: 40px;

  visibility: hidden;
}

.page-pager.is-visible {
  visibility: visible;
}

.pager-button {
  display: grid;
  place-items: center;

  width: 54px;
  height: 36px;

  border: 1px solid var(--border);
  border-radius: 100px;

  background: var(--surface);
  color: var(--text);

  font-size: 20px;
}

.pager-button:disabled {
  opacity: .25;
}

.pager-button:not(:disabled):active {
  background: var(--accent);
  color: var(--bg);
}

.pager-indicator {
  min-width: 105px;

  text-align: center;
  color: var(--accent);

  font-size: 12px;
  font-weight: 650;

  font-variant-numeric: tabular-nums;
}

/* =========================================
   EMPTY STATE
========================================= */

.empty-state {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 0;

  padding: 20px;

  border: 1px dashed var(--border);
  border-radius: var(--radius);

  background: var(--surface);
  text-align: center;

  overflow: hidden;
}

.empty-state h2 {
  margin: 0 0 10px;
  font-size: clamp(18px, 2vw, 26px);
}

.empty-state p {
  margin: 0;

  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.5;
  color: var(--muted);
}

/* =========================================
   FOOTER
========================================= */

.footer {
  display: flex;
  flex: 0 0 var(--footer-height);
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  width: 100%;
  min-height: 0;

  padding: 5px clamp(16px, 3vw, 50px);

  border-top: 1px solid var(--border);

  color: var(--muted);

  font-size: 10px;
  letter-spacing: .7px;

  white-space: nowrap;
  overflow: hidden;
}

/* =========================================
   PDF VIEWER OVERLAY
========================================= */

.catalog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100vh;
  height: 100dvh;

  min-height: 0;

  background:
    radial-gradient(
      circle at center,
      #181b21 0%,
      #101217 72%,
      #0b0d11 100%
    );

  color: var(--text);

  overflow: hidden;
}

.catalog-overlay[hidden] {
  display: none !important;
}

body.catalog-open {
  overflow: hidden;
}

/* =========================================
   PDF VIEWER TOP BAR
========================================= */

.catalog-topbar {
  position: relative;
  z-index: 20;

  display: flex;
  flex: 0 0 clamp(55px, 8vh, 76px);
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  min-height: 0;
  padding: 8px clamp(14px, 3vw, 50px);
}

.catalog-title {
  min-width: 0;

  color: var(--accent);

  font-size: clamp(11px, 1vw, 15px);
  font-weight: 650;
  letter-spacing: 1px;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;

  width: clamp(43px, 5vh, 55px);
  height: clamp(43px, 5vh, 55px);

  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;

  background: #252932;
  color: #fff;
}

.catalog-close svg {
  width: 23px;
  height: 23px;
}

.catalog-close:active {
  background: var(--accent);
  color: var(--bg);
}

/* =========================================
   PDF VIEWER STAGE
========================================= */

.catalog-stage {
  position: relative;

  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 0;

  padding: 5px 15px;

  overflow: hidden;
  background: transparent;
}

/*
  JS controls the book dimensions.
  Do not stretch or reposition the
  StPageFlip container with CSS.
*/

.book,
.book.stf__parent {
  position: relative;

  display: block !important;
  flex-shrink: 0;

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;

  transform: none;
  box-shadow: none !important;
}

.book .stf__wrapper {
  position: relative;

  width: 100%;
  height: 100% !important;

  padding: 0 !important;
  margin: 0 !important;

  background: transparent !important;
}

.book .stf__block {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  background: transparent !important;
  perspective: 2000px;
}

/* =========================================
   FLIPBOOK PAGES
========================================= */

.flip-page {
  position: absolute;

  width: 100%;
  height: 100%;

  overflow: hidden;

  background: transparent !important;

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;

  transform-style: preserve-3d;
}

.flip-page img {
  display: block;

  width: 100%;
  height: 100%;

  max-width: none;
  max-height: none;

  object-fit: contain;
  object-position: center;

  margin: 0;
  padding: 0;

  background: transparent;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;

  pointer-events: none;
}

.book .stf__item {
  background: transparent !important;
}

.book .stf__outerShadow,
.book .stf__innerShadow,
.book .stf__hardShadow,
.book .stf__hardInnerShadow {
  pointer-events: none;
}

/* =========================================
   PDF LOADING
========================================= */

.catalog-loading {
  position: absolute;
  inset: 0;
  z-index: 10;

  display: grid;
  place-items: center;

  padding: 20px;

  background: #111317;
  color: var(--accent);

  font-size: 15px;
  text-align: center;
}

.catalog-loading[hidden] {
  display: none !important;
}

/* =========================================
   PDF CONTROLS
========================================= */

.catalog-controls {
  position: relative;
  z-index: 20;

  display: flex;
  flex: 0 0 clamp(62px, 8vh, 82px);
  align-items: center;
  justify-content: center;

  min-height: 0;
  gap: 22px;

  padding: 5px 15px;
}

.catalog-nav {
  width: 56px;
  height: 46px;

  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 100px;

  background: #252932;
  color: #fff;

  font-size: 24px;
}

.catalog-nav:disabled {
  opacity: .3;
}

.page-counter {
  min-width: 100px;

  text-align: center;

  color: var(--accent);
  font-size: 13px;
  font-weight: 650;

  font-variant-numeric: tabular-nums;
}

/* =========================================
   COMPACT HEIGHT
========================================= */

@media (max-height: 720px) {
  :root {
    --header-height: 62px;
    --footer-height: 32px;
  }

  .page-view {
    padding-top: 9px;
    padding-bottom: 7px;
  }

  .page-heading {
    margin: 8px 0 10px;
  }

  .page-heading h1 {
    font-size: clamp(23px, 2.6vw, 35px);
    margin: 3px 0;
  }

  .page-pager {
    flex-basis: 34px;
    height: 34px;
  }

  .pager-button {
    height: 32px;
  }

  .company-card {
    padding: 11px;
    gap: 7px;
  }

  .catalog-cover-frame {
    padding: 5px;
  }
}

/* =========================================
   VERY SHORT SCREENS
========================================= */

@media (max-height: 540px) {
  :root {
    --header-height: 52px;
    --footer-height: 26px;
  }

  .header {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .lang-btn {
    height: 30px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .home-logo-wrap {
    height: 16vh;
    margin: 7px 0;
  }

  .home-tagline {
    margin-bottom: 12px;
  }

  .home-actions {
    gap: 7px;
  }

  .action-button {
    min-height: 45px;
    padding: 8px 14px;
  }

  .back-button {
    min-height: 30px;
  }

  .page-heading {
    margin: 5px 0 7px;
  }

  .page-description {
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .card-number {
    font-size: 10px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-caption {
    font-size: 10px;
  }

  .catalog-topbar {
    flex-basis: 46px;
  }

  .catalog-controls {
    flex-basis: 48px;
  }
}

/* =========================================
   NARROW SCREENS
========================================= */

@media (max-width: 650px) {
  .header {
    gap: 8px;
  }

  .header-brand {
    font-size: 19px;
  }

  .header-actions {
    gap: 8px;
  }

  .lang-btn {
    width: 40px;
  }

  .page-heading h1 {
    font-size: clamp(23px, 6vw, 35px);
  }

  .company-card {
    border-radius: 14px;
  }

  .footer span:nth-child(2) {
    display: none;
  }

  .catalog-stage {
    padding: 3px;
  }

  .catalog-controls {
    gap: 12px;
  }
}

/* =========================================
   TOUCHSCREEN
========================================= */

@media (hover: none) {
  .company-card:hover {
    background: var(--surface);
    border-color: var(--border);
  }

  .company-card:active {
    border-color: var(--accent);
    background: var(--surface-hover);
  }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* =========================================
   ABOUT US
========================================= */

.page-content.about-content {
  overflow: hidden;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, .85fr);
  gap: clamp(18px, 3vw, 52px);

  flex: 1 1 auto;
  min-height: 0;
}

.about-story {
  min-height: 0;
  padding-right: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.about-story p {
  max-width: 820px;
  margin: 0 0 clamp(10px, 1.6vh, 18px);

  color: var(--muted);
  font-size: clamp(14px, 1.15vw, 18px);
  line-height: 1.6;
}

.about-story p.about-lead {
  color: var(--text);
  font-size: clamp(16px, 1.45vw, 23px);
  line-height: 1.5;
}

.about-story p strong {
  color: var(--accent);
  font-weight: 700;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 14px);

  max-width: 820px;
  margin: clamp(14px, 2.4vh, 28px) 0;
}

.about-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: clamp(12px, 1.8vh, 20px) clamp(12px, 1.2vw, 20px);

  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.about-stat strong {
  color: var(--accent);
  font-size: clamp(22px, 2.2vw, 36px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.about-stat span {
  color: var(--muted);
  font-size: clamp(11px, .85vw, 14px);
  line-height: 1.35;
}

.about-subtitle {
  margin: 0 0 10px;

  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 650;
}

.about-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  max-width: 820px;
  margin: 0;
  padding: 0;

  list-style: none;
}

.about-values li {
  padding: 7px 14px;

  border: 1px solid var(--border);
  border-radius: 100px;

  color: var(--text);
  font-size: clamp(11px, .9vw, 14px);
}

.about-connect {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 18px);

  min-height: 0;
  padding: clamp(16px, 2.4vh, 28px);

  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);

  overflow: hidden;
}

.about-connect p {
  margin: 0;

  color: var(--muted);
  font-size: clamp(12px, .95vw, 15px);
  line-height: 1.45;
}

.about-qr {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.2vw, 18px);
  min-height: 0;
}

.about-qr-code {
  flex: 0 0 auto;

  width: clamp(96px, 17vh, 170px);
  aspect-ratio: 1;
  padding: 6px;

  border-radius: 12px;
  background: #fff;
}

.about-qr-code img {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
}

.about-qr-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.about-qr-text strong {
  font-size: clamp(13px, 1.05vw, 17px);
  font-weight: 650;
}

.about-qr-text span {
  color: var(--accent);
  font-size: clamp(11px, .85vw, 14px);
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .page-content.about-content {
    overflow-y: auto;
  }

  .about-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-story {
    overflow: visible;
  }
}

@media (max-width: 520px) {
  .about-stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Totem verticale: testo sopra, QR code affiancati sotto. */
.about-connect { align-self: start; }

@media (orientation: portrait) {
  .page-content.about-content { overflow-y: auto; }

  .about-layout {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }

  .about-story { overflow: visible; }

  .about-connect {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  .about-connect > .section-kicker,
  .about-connect > p { grid-column: 1 / -1; }

  .about-qr-code { width: clamp(110px, 14vh, 240px); }
}

@media (orientation: portrait) and (max-width: 520px) {
  .about-connect { grid-template-columns: minmax(0, 1fr); }
}

/* Barra superiore delle pagine interne: indietro + "Chi siamo" */
.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.about-layout.no-connect {
  grid-template-columns: minmax(0, 1fr);
}

.about-qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Pulsante "Chi siamo" nell'header (aziende e categorie) */
.header-about {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  height: 48px;
  padding: 0 18px;

  border: 1px solid var(--accent);
  border-radius: 100px;

  background: transparent;
  color: var(--accent);

  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.header-about[hidden] { display: none; }

.header-about:hover { background: var(--surface-hover); }

.header-about .epta-icon {
  width: 18px;
  height: 18px;
}

@media (max-height: 720px) {
  .header-about { height: 40px; }
}

@media (max-width: 650px) {
  .header-about { padding: 0 12px; }
  .header-about span { display: none; }
}

/* =========================================
   PDF DOWNLOAD (pannello con QR code)
========================================= */

.pdf-download-button .epta-icon {
  width: 18px;
  height: 18px;
}

.pdf-download-panel {
  position: absolute;
  inset: 0;
  z-index: 50;

  display: grid;
  place-items: center;
  padding: 20px;

  background: rgba(0, 0, 0, .55);
}

.pdf-download-panel[hidden] { display: none; }

.pdf-download-card {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;

  width: min(420px, 100%);
  max-height: 100%;
  padding: 28px 26px 22px;
  overflow-y: auto;

  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);

  color: var(--text);
  text-align: center;
}

.pdf-download-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}

.pdf-download-file {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
}

.pdf-download-qr {
  width: min(230px, 60vw);
  aspect-ratio: 1;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
}

.pdf-download-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pdf-download-text {
  margin: 0;
  max-width: 330px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.pdf-download-here {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  min-height: 44px;
  margin-top: 4px;
  padding: 0 18px;

  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface-hover);
  color: var(--text);

  font-size: 13px;
  font-weight: 650;
}

.pdf-download-here:hover { border-color: var(--accent); }
.pdf-download-here:disabled { opacity: .5; }

.pdf-download-here .epta-icon,
.pdf-download-close .epta-icon {
  width: 18px;
  height: 18px;
}

.pdf-download-close {
  position: absolute;
  top: 12px;
  right: 12px;

  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;

  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}

.pdf-download-status {
  min-height: 1em;
  margin: 0;
  color: var(--accent);
  font-size: 12px;
}

/* =========================================
   HOME - LOGHI DELLE AZIENDE
========================================= */

.home-companies {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.6vh, 16px);

  width: 100%;
  margin-top: clamp(40px, 11vh, 150px);
  flex-shrink: 0;
}

.home-companies[hidden] { display: none; }

.home-companies-label {
  color: var(--muted);

  font-size: clamp(9px, .75vw, 11px);
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.home-companies-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.8vw, 40px);

  /* Esce dalla colonna centrale (max 1100px): la fascia usa quasi tutta la
     larghezza dello schermo, sempre su una riga, e si adatta alla risoluzione. */
  width: min(calc(100vw - 48px), 1800px);
  flex-shrink: 0;
}

/* Marca d'acqua: loghi in scala di grigi, tenui, non cliccabili.
   Ogni logo prende la stessa quota della riga (fino a 190px). */
.home-company-logo {
  display: block;

  flex: 1 1 0;
  min-width: 0;
  max-width: 190px;
  height: clamp(36px, 6.5vh, 80px);

  object-fit: contain;

  filter: grayscale(1) brightness(1.25);
  opacity: .4;

  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

@media (max-height: 720px) {
  .home-companies {
    margin-top: 14px;
    gap: 8px;
  }

  .home-companies-label { display: none; }

  .home-company-logo { height: 32px; }
}

@media (max-height: 540px) {
  .home-companies { display: none; }
}

@media (max-width: 650px) {
  .home-companies-row { flex-wrap: wrap; }
  .home-company-logo { flex-basis: 40%; }
}

/* =========================================
   ACCESSO NASCOSTO ALL'AREA RISERVATA
========================================= */

/* Il logo della home si puo "tenere premuto" senza selezioni o menu del browser. */
#logoWrap {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.admin-prompt {
  position: fixed;
  inset: 0;
  z-index: 20000;

  display: grid;
  place-items: center;
  padding: 20px;

  background: rgba(0, 0, 0, .6);
}

.admin-prompt[hidden] { display: none; }

.admin-prompt-card {
  display: flex;
  flex-direction: column;
  gap: 12px;

  width: min(380px, 100%);
  padding: 26px 24px 22px;

  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);

  color: var(--text);
  text-align: center;
}

.admin-prompt-card h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
}

.admin-prompt-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.admin-prompt-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.admin-prompt-actions button {
  flex: 1 1 0;
  min-height: 46px;
  padding: 0 16px;

  border-radius: 100px;
  font-size: 14px;
  font-weight: 650;
}

.admin-prompt-cancel {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.admin-prompt-go {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
}

#logoWrap img {
  pointer-events: none;
  -webkit-user-drag: none;
}

/* =========================================
   STAND-BY
   Composizione centrata e sobria: logo, titolo leggero,
   fascia dei loghi tra due filetti, invito discreto a toccare.
========================================= */

.standby {
  --standby-slot: clamp(200px, 25vw, 440px);

  position: fixed;
  inset: 0;
  z-index: 15000;

  display: grid;
  place-items: center;
  padding: clamp(24px, 5vh, 64px) 0;

  background: var(--bg);
  color: var(--text);
  text-align: center;

  cursor: pointer;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  animation: standby-fade .8s ease both;
}

.standby[hidden] { display: none; }

.standby-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(36px, 8vh, 110px);
  width: 100%;
}

/* ---- Intestazione ---- */
.standby-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
  animation: standby-rise 1s .15s cubic-bezier(.2, .7, .2, 1) both;
}

.standby-group-logo {
  display: block;
  width: auto;
  height: clamp(44px, 6.5vh, 76px);
  margin-bottom: clamp(26px, 5vh, 56px);
  border-radius: 12px;
  pointer-events: none;
}

.standby-head h1 {
  margin: 0;
  font-size: clamp(32px, 3.9vw, 62px);
  font-weight: 300;
  letter-spacing: -.015em;
  line-height: 1.1;
}

.standby-rule {
  display: block;
  width: 56px;
  height: 1px;
  margin: clamp(18px, 3vh, 30px) 0 clamp(14px, 2.4vh, 22px);
  background: var(--accent);
}

.standby-title-en {
  margin: 0;
  color: var(--accent);
  font-size: clamp(11px, .9vw, 14px);
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
}

.standby-title-en:empty { display: none; }

.standby-subtitle {
  max-width: 640px;
  margin: clamp(12px, 2vh, 20px) 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 300;
  line-height: 1.6;
}

.standby-subtitle:empty { display: none; }

/* ---- Fascia dei loghi ---- */
.standby-carousel {
  position: relative;
  width: 100%;
  height: clamp(120px, 19vh, 230px);

  border-top: 1px solid rgba(255, 255, 255, .07);
  border-bottom: 1px solid rgba(255, 255, 255, .07);

  /* I loghi entrano ed escono sfumando ai lati. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);

  pointer-events: none;
}

.standby-carousel[hidden] { display: none; }

.standby-logo {
  position: absolute;
  left: 50%;
  top: 50%;

  width: calc(var(--standby-slot) * .8);
  height: 62%;

  transition:
    transform 1.1s cubic-bezier(.45, 0, .2, 1),
    opacity 1.1s ease;
  will-change: transform, opacity;
}

.standby-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1) brightness(1.4);
  transition: filter 1.1s ease;
}

.standby-logo.is-active img { filter: none; }

/* ---- Invito a toccare ---- */
.standby-start {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: clamp(14px, 2vh, 20px) clamp(32px, 3.4vw, 52px);

  border: 1px solid rgba(196, 174, 145, .55);
  border-radius: 100px;
  background: transparent;
  color: var(--text);

  animation: standby-rise 1s .35s cubic-bezier(.2, .7, .2, 1) both;
}

.standby-start-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.standby-start-text > span {
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.standby-start-text small {
  color: var(--muted);
  font-size: clamp(10px, .75vw, 12px);
  letter-spacing: .2em;
  text-transform: uppercase;
}

.standby-start-text small:empty { display: none; }

/* La cornice "respira": un'onda sottile parte dal bordo del pulsante. */
.standby-start::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--accent);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  animation: standby-ring 2.8s ease-out infinite;
}

@keyframes standby-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes standby-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes standby-ring {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(1.12, 1.35); opacity: 0; }
}

@media (orientation: portrait) {
  .standby { --standby-slot: clamp(170px, 44vw, 520px); }
  .standby-inner { gap: clamp(48px, 7vh, 150px); }
  .standby-group-logo { height: clamp(56px, 5.5vh, 110px); }
  .standby-head h1 { font-size: clamp(32px, 6.4vw, 84px); }
  .standby-title-en { font-size: clamp(11px, 1.7vw, 20px); }
  .standby-subtitle { max-width: 80vw; font-size: clamp(14px, 2.2vw, 28px); }
  .standby-carousel { height: clamp(120px, 13vh, 280px); }
  .standby-start-text > span { font-size: clamp(13px, 2vw, 26px); }
  .standby-start-text small { font-size: clamp(10px, 1.4vw, 17px); }
}

@media (max-height: 620px) {
  .standby-inner { gap: 22px; }
  .standby-group-logo { margin-bottom: 16px; }
  .standby-subtitle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .standby,
  .standby-head,
  .standby-start,
  .standby-start::after { animation: none; }
  .standby-logo,
  .standby-logo img { transition-duration: .01s; }
}

/* =========================================
   CARTE AZIENDE / DIVISIONI / CATALOGHI: RIFINITURA
   Niente "riquadro nel riquadro": il logo poggia sulla carta,
   dimensione ottica uniforme, piede separato da un filetto,
   tipografia più leggera e filetto oro al tocco.
========================================= */

.page-heading h1 {
  font-weight: 600;
  letter-spacing: -.025em;
}

.company-card {
  position: relative;
  gap: 0;
  padding: clamp(14px, 1.5vw, 26px);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, 0) 55%),
    var(--surface);

  transition:
    background .25s ease,
    border-color .25s ease,
    transform .25s ease;
}

/* Filetto oro in alto: compare al passaggio o al tocco. */
.company-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(14px, 1.5vw, 26px);
  right: clamp(14px, 1.5vw, 26px);
  height: 2px;

  background: var(--accent);
  border-radius: 0 0 2px 2px;

  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}

.company-card:hover::before,
.company-card:active::before,
.company-card:focus-visible::before {
  transform: scaleX(1);
}

.company-card:hover {
  border-color: rgba(196, 174, 145, .32);
}

.company-card:active {
  transform: scale(.992);
}

.company-card:disabled::before { display: none; }

.card-number {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2em;
  font-variant-numeric: tabular-nums;
  margin-bottom: clamp(6px, 1vh, 12px);
}

/* Logo libero sulla carta, con la stessa presenza in ogni carta. */
.company-card:not(.catalog-card) .company-logo-frame {
  padding: clamp(4px, 1vh, 14px) clamp(12px, 2vw, 34px);
  background: none;
  border: 0;
  border-radius: 0;
  container-type: size;
}

/* Il logo cresce con lo spazio della carta (container query), con un tetto. */
.company-card:not(.catalog-card) .company-logo {
  width: auto;
  height: auto;
  max-width: min(88cqw, 440px);
  max-height: min(100cqh, 210px);

  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}

.company-card:hover .company-logo {
  transform: scale(1.03);
}

.company-card:not(.catalog-card) .company-logo-frame.is-fallback {
  background: none;
}

/* Piede: nome e invito, separati da un filetto sottile. */
.company-card-bottom {
  align-items: center;
  gap: 14px;
  padding-top: clamp(12px, 1.6vh, 18px);
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.catalog-card .company-card-bottom {
  margin-top: clamp(10px, 1.4vh, 16px);
}

.card-title {
  margin: 0 0 6px;
  font-size: clamp(16px, 1.3vw, 22px);
  font-weight: 600;
  letter-spacing: -.012em;
}

.card-caption {
  color: rgba(196, 174, 145, .78);
  font-size: clamp(9px, .68vw, 11px);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.card-arrow {
  width: clamp(32px, 2.6vw, 42px);
  height: clamp(32px, 2.6vw, 42px);

  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);

  transition:
    background .25s ease,
    border-color .25s ease,
    color .25s ease;
}

.company-card:hover .card-arrow,
.company-card:active .card-arrow {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

@media (max-height: 720px) {
  .company-card { padding: 12px; }
  .company-card::before { left: 12px; right: 12px; }
  .company-card-bottom { padding-top: 9px; }
}

@media (hover: none) {
  .company-card:hover::before { transform: scaleX(0); }
  .company-card:active::before { transform: scaleX(1); }
  .company-card:hover .company-logo { transform: none; }
  .company-card:hover .card-arrow {
    border-color: var(--border);
    background: transparent;
    color: var(--muted);
  }
  .company-card:active .card-arrow {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .company-card:active { transform: none; }
  .company-card:hover .company-logo { transform: none; }
}

/* =========================================
   HOME: IL COLORE PASSA DA UN LOGO ALL'ALTRO
   Livello grigio (marca d'acqua) + livello a colori rivelato da una
   maschera che scorre: entra da sinistra, esce verso destra.
========================================= */

.home-companies-row { position: relative; }

.home-company-logo {
  position: relative;
  filter: none;
  opacity: 1;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.home-company-logo > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hcl-base {
  filter: grayscale(1) brightness(1.25);
  opacity: .4;
  transition: opacity 1s ease;
}

/* Fascia nera al centro di una maschera larga 3 volte il logo:
   100% = nascosto (prima), 50% = visibile, 0% = nascosto (dopo). */
.hcl-color {
  -webkit-mask-image: linear-gradient(90deg, transparent 0 30%, #000 42% 58%, transparent 70% 100%);
  mask-image: linear-gradient(90deg, transparent 0 30%, #000 42% 58%, transparent 70% 100%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;

  transition:
    -webkit-mask-position 1.1s cubic-bezier(.45, 0, .25, 1),
    mask-position 1.1s cubic-bezier(.45, 0, .25, 1);
}

.home-company-logo.is-lit { transform: translateY(-3px) scale(1.06); }
.home-company-logo.is-lit .hcl-base { opacity: 0; }
.home-company-logo.is-lit .hcl-color { -webkit-mask-position: 50% 0; mask-position: 50% 0; }
.home-company-logo.is-past .hcl-color { -webkit-mask-position: 0 0; mask-position: 0 0; }

.home-company-logo.no-anim,
.home-company-logo.no-anim > img { transition: none; }

/* =========================================
   NUOVO CONTATTO (tablet dei commerciali)
========================================= */

.header-lead { position: relative; }
.header-lead svg { width: 18px; height: 18px; }

.lead-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #e0574f;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}
.lead-badge[hidden] { display: none; }

.lead-overlay {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: flex;
  justify-content: center;
  padding: clamp(0px, 3vh, 32px) clamp(0px, 3vw, 32px);
  background: rgba(8, 9, 12, .78);
  backdrop-filter: blur(6px);
  animation: standby-fade .25s ease both;
}
.lead-overlay[hidden] { display: none; }
body.lead-open { overflow: hidden; }

.lead-overlay input,
.lead-overlay textarea {
  user-select: text;
  -webkit-user-select: text;
}

.lead-form {
  display: flex;
  flex-direction: column;
  width: min(980px, 100%);
  max-height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.lead-form[hidden] { display: none; }

.lead-form-head,
.lead-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: clamp(14px, 2vh, 22px) clamp(18px, 2.4vw, 32px);
}
.lead-form-head { border-bottom: 1px solid var(--border); }
.lead-form-foot { border-top: 1px solid var(--border); justify-content: flex-end; }

.lead-eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.lead-form-head h2 { margin: 4px 0 0; font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.02em; }

.lead-close {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 18px;
}

.lead-form-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px clamp(18px, 2.4vw, 32px) 24px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lead-form-body section { padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.lead-form-body section:last-of-type { border-bottom: 0; }
.lead-form-body h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.lead-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lead-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lead-field > span { color: var(--muted); font-size: 12px; font-weight: 600; }
.lead-field input,
.lead-field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* evita lo zoom automatico su iPad */
  outline: none;
}
.lead-field textarea { min-height: 90px; resize: vertical; }
.lead-field input:focus,
.lead-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(196, 174, 145, .18); }
.lead-notes { margin-top: 14px; }

.lead-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lead-chip { position: relative; }
.lead-chip input { position: absolute; opacity: 0; pointer-events: none; }
.lead-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.lead-chip input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.lead-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.lead-docs-list .lead-chip span { border-radius: 12px; }

.lead-photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; }
.lead-photo-button span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px dashed rgba(196, 174, 145, .6);
  border-radius: 12px;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}
.lead-photo-preview { max-height: 90px; border-radius: 8px; border: 1px solid var(--border); }
.lead-photo-preview[hidden] { display: none; }
.lead-link { border: 0; background: none; color: var(--muted); text-decoration: underline; }
.lead-link[hidden] { display: none; }

.lead-muted { margin: 0 0 10px; color: var(--muted); font-size: 13px; }

.lead-consent { }
.lead-privacy-text {
  max-height: 150px;
  overflow-y: auto;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: #cfcfd4;
  font-size: 13px;
  line-height: 1.6;
}
.lead-check {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 12px;
  padding: 10px 0;
  font-size: 15px;
  line-height: 1.45;
  cursor: pointer;
}
.lead-check input { width: 26px; height: 26px; margin: 0; accent-color: var(--accent); }

.lead-error {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(224, 87, 79, .5);
  border-radius: 12px;
  background: rgba(224, 87, 79, .12);
  color: #ffb4ae;
  font-weight: 600;
}
.lead-error[hidden] { display: none; }

.lead-primary,
.lead-secondary {
  min-height: 52px;
  padding: 0 26px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 700;
}
.lead-primary { border: 1px solid var(--accent); background: var(--accent); color: var(--bg); }
.lead-primary:disabled { opacity: .6; }
.lead-secondary { border: 1px solid var(--border); background: transparent; color: var(--text); }

.lead-done { display: grid; place-items: center; width: 100%; }
.lead-done[hidden] { display: none; }
.lead-done-card {
  width: min(520px, 100%);
  padding: 40px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
}
.lead-done-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 30px;
  font-weight: 800;
}
.lead-done-card h2 { margin: 18px 0 8px; font-weight: 600; }
.lead-done-card p { margin: 0 0 24px; color: var(--muted); line-height: 1.5; }
.lead-done-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.lead-notice {
  position: fixed;
  left: 50%;
  bottom: 60px;
  z-index: 16000;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 100px;
  background: #f6efe4;
  color: #1b1b1b;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.lead-notice[hidden] { display: none; }

@media (max-width: 650px) {
  .lead-grid { grid-template-columns: 1fr; }
  .lead-form { border-radius: 0; border: 0; }
  .header-lead span { display: none; }
}

/* Nuovo contatto: scelta della fiera (ognuna con la propria informativa) */
.lead-fair-section .lead-chip span { min-height: 50px; padding: 12px 20px; font-size: 15px; }
.lead-fair-hint { margin: 10px 0 0; }

/* =========================================
   TELEFONO: lista scorrevole e carte compatte
   (il totem e il tablet restano a pagine)
========================================= */

@media (max-width: 650px) {
  /* Si scorre col dito, senza barra di scorrimento visibile. */
  * { scrollbar-width: none; }
  *::-webkit-scrollbar { display: none; width: 0; height: 0; }

  .page-heading { margin: 6px 0 12px; }
  .page-heading h1 { font-size: 24px; margin: 4px 0 6px; }
  .page-description { font-size: 13px; -webkit-line-clamp: 3; line-clamp: 3; }

  .company-grid.is-scroll {
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-content: start;
    gap: 10px;

    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
  }

  .company-grid.is-scroll + .page-pager { display: none; }

  /* Aziende e divisioni: una riga per voce, logo a sinistra. */
  .company-grid.is-scroll .company-card:not(.catalog-card) {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    height: auto;
    min-height: 76px;
    padding: 10px 12px 10px 10px;
    border-radius: 14px;
  }

  .company-grid.is-scroll .company-card:not(.catalog-card)::before { display: none; }
  .company-grid.is-scroll .company-card:not(.catalog-card) .card-number { display: none; }

  .company-grid.is-scroll .company-card:not(.catalog-card) .company-logo-frame {
    flex: 0 0 104px;
    width: 104px;
    height: 56px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    container-type: normal;
  }

  .company-grid.is-scroll .company-card:not(.catalog-card) .company-logo {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
  }

  .company-grid.is-scroll .company-card:not(.catalog-card) .company-logo-placeholder { font-size: 12px; }

  .company-grid.is-scroll .company-card:not(.catalog-card) .company-card-bottom {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 0;
    border-top: 0;
  }

  .company-grid.is-scroll .card-title {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.2;
  }

  .company-grid.is-scroll .card-caption {
    font-size: 9px;
    letter-spacing: .14em;
  }

  .company-grid.is-scroll .card-arrow {
    width: 34px;
    height: 34px;
  }

  /* Cataloghi: due colonne con la copertina. */
  .company-grid.is-scroll .catalog-card {
    height: auto;
    padding: 10px;
    border-radius: 14px;
  }

  .company-grid.is-scroll .catalog-card .card-number { font-size: 9px; margin-bottom: 6px; }

  .company-grid.is-scroll .catalog-cover-frame {
    flex: 0 0 auto;
    aspect-ratio: 3 / 4;
    padding: 6px;
  }

  .company-grid.is-scroll .catalog-card .company-card-bottom {
    margin-top: 10px;
    padding-top: 8px;
    gap: 8px;
  }

  .company-grid.is-scroll .catalog-card .card-title {
    font-size: 13px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .company-grid.is-scroll .catalog-card .card-arrow {
    width: 30px;
    height: 30px;
  }
}

/* =========================================
   HOME: fascia loghi senza salti al caricamento
========================================= */

/* Lo spazio è sempre riservato: prima che arrivino i dati è solo invisibile. */
.home-companies.is-empty { visibility: hidden; }
.home-companies-row { min-height: clamp(36px, 6.5vh, 80px); }

/* Ogni logo entra con una dissolvenza, al suo posto. */
.home-company-logo { opacity: 0; transition: opacity .7s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.home-company-logo.is-ready { opacity: 1; }
.home-company-logo.no-fade { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.home-company-logo.is-broken { visibility: hidden; }

@media (max-height: 720px) {
  .home-companies-row { min-height: 32px; }
}

/* =========================================
   TELEFONO: fascia loghi su una riga e cataloghi a righe
========================================= */

@media (max-width: 650px) {
  /* Una sola riga, altezza fissa, si scorre di lato: nessun salto al caricamento. */
  .home-companies-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 22px;
    width: calc(100vw - 48px);   /* stesso margine dei pulsanti (24px) */
    min-height: 44px;
    /* Parte allineata al bordo sinistro, come il resto della pagina. */
    padding: 0 24px 0 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    /* Solo il lato destro sfuma: fa capire che la riga continua. */
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 80%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 80%, transparent 100%);
  }

  .home-company-logo {
    flex: 0 0 92px;
    max-width: none;
    height: 40px;
  }

  /* Cataloghi: una riga per PDF, copertina piccola a sinistra e titolo. */
  .company-grid.is-scroll .catalog-card {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    padding: 10px 12px 10px 10px;
  }

  .company-grid.is-scroll .catalog-card::before,
  .company-grid.is-scroll .catalog-card .card-number { display: none; }

  .company-grid.is-scroll .catalog-cover-frame {
    flex: 0 0 60px;
    width: 60px;
    height: 78px;
    aspect-ratio: auto;
    padding: 3px;
    border-radius: 8px;
  }

  .company-grid.is-scroll .catalog-cover-placeholder span { font-size: 8px; }

  .company-grid.is-scroll .catalog-card .company-card-bottom {
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    gap: 10px;
  }

  .company-grid.is-scroll .catalog-card .card-title {
    font-size: 15px;
    -webkit-line-clamp: 2;
  }

  .company-grid.is-scroll .catalog-card .card-arrow {
    width: 34px;
    height: 34px;
  }
}

/* =========================================
   TELEFONO: home più compatta
   Niente logo grande né slogan: resta solo DIGITAL EXHIBITION EXPERIENCE
   (tenendolo premuto 3 secondi si apre l'accesso all'Area Riservata).
========================================= */

@media (max-width: 650px) {
  .home-logo-wrap,
  .home .accent-line,
  .home-tagline { display: none; }

  .home-eyebrow {
    margin-bottom: 22px;
    font-size: 11px;
    letter-spacing: 3px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }
}

/* Telefono: loghi su due righe orizzontali (scorrono di lato insieme).
   Altezza fissa: nessun salto mentre i loghi arrivano. */
@media (max-width: 650px) {
  .home-companies-row {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, 38px);
    grid-auto-columns: 84px;
    column-gap: 20px;
    row-gap: 14px;
    align-items: center;
    min-height: 90px;
  }

  .home-company-logo {
    width: 84px;
    height: 38px;
  }
}

/* Telefono: loghi in una griglia 3 x 4, tutti visibili senza scorrere.
   Le 4 righe sono riservate da subito: nessun salto mentre i loghi arrivano. */
@media (max-width: 650px) {
  .home-companies-row {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 36px;
    grid-auto-columns: auto;
    column-gap: 18px;
    row-gap: 14px;
    justify-items: center;
    min-height: calc(36px * 4 + 14px * 3);
    padding: 0;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .home-company-logo {
    width: 100%;
    max-width: 104px;
    height: 36px;
  }
}

/* =========================================
   TELEFONO / SCHERMI STRETTI: "Chi siamo"
   Il blocco cresce con il testo e la pagina scorre: la cornice dei QR
   code resta sempre sotto il testo, mai sopra.
========================================= */

@media (max-width: 900px), (orientation: portrait) {
  .page-content.about-content {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .about-layout {
    flex: 0 0 auto;
    min-height: auto;
    grid-template-rows: auto;
    grid-auto-rows: auto;
    padding-bottom: 20px;
  }

  .about-story,
  .about-connect { min-height: auto; }
}

@media (max-width: 650px) {
  .about-story p { font-size: 15px; }
  .about-story p.about-lead { font-size: 17px; }

  /* Numeri: tre caselle affiancate e compatte. */
  .about-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 18px 0;
  }

  .about-stat { padding: 12px 10px; border-radius: 12px; }
  .about-stat strong { font-size: 22px; }
  .about-stat span { font-size: 11px; }

  .about-values li { font-size: 12px; padding: 6px 12px; }

  /* QR code: uno per riga, codice a sinistra e testo a destra. */
  .about-connect {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 16px;
  }

  .about-qr { gap: 14px; }
  .about-qr-code { width: 104px; }
  .about-qr-text strong { font-size: 15px; }
  .about-qr-text span { font-size: 12px; }
}

/* Telefono: i QR diventano pulsanti-link, tutti allineati. */
@media (max-width: 650px) {
  .about-connect { align-items: stretch; }
  .about-connect > p { display: none; }

  a.about-qr {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
  }

  a.about-qr:active { border-color: var(--accent); }
  a.about-qr .about-qr-code { display: none; }
  a.about-qr .about-qr-text { flex: 1 1 auto; }

  .about-qr-go {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--accent);
  }

  .about-qr-go .epta-icon { width: 16px; height: 16px; }
}

/* Telefono: lo schermo intero non è supportato (iPhone) o non serve: niente pulsante. */
@media (max-width: 650px) {
  #fullscreenButton { display: none; }
}

/* Telefono: piè di pagina solo con "© anno EPTA GRUPPO", centrato. */
@media (max-width: 650px) {
  .footer { justify-content: center; }
  .footer .footer-meta { display: none; }
}

/* =========================================
   TELEFONO: "Torna indietro" compatto
   Freccia rotonda sulla stessa riga dell'etichetta della sezione:
   il titolo sale e la lista guadagna spazio.
========================================= */

@media (max-width: 650px) {
  .page-topbar {
    position: relative;
    height: 0;
    z-index: 2;
  }

  .page-topbar .back-button {
    position: absolute;
    top: 0;
    left: 0;

    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-height: 0;
    padding: 0;
    border-radius: 50%;
  }

  .page-topbar .back-button span { display: none; }
  .page-topbar .back-button svg,
  .page-topbar .back-button .epta-icon { width: 20px; height: 20px; }

  .page-heading { margin-top: 0; }

  .page-heading .section-kicker {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-left: 56px;
  }
}

/* Chi siamo: numeri lunghi sempre dentro la casella */
.about-stat strong { overflow-wrap: anywhere; }

/* Telefono: un numero per riga, valore a sinistra e descrizione a destra. */
@media (max-width: 650px) {
  .about-stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .about-stat {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
  }

  .about-stat strong { font-size: 20px; flex: 0 1 auto; }
  .about-stat span { flex: 0 1 50%; font-size: 12px; text-align: right; }
}

/* =========================================
   "Chi siamo" nelle aziende: sul telefono una riga chiara sotto il titolo
   (l'icona sola nell'header non si capiva). Totem e tablet: pulsante nell'header.
========================================= */

.page-about-row { display: none; }

@media (max-width: 650px) {
  #headerAboutButton { display: none; }

  .page-about-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;

    border: 1px solid rgba(196, 174, 145, .45);
    border-radius: 14px;
    background: rgba(196, 174, 145, .08);
    color: var(--text);
    text-align: left;
  }

  .page-about-row:active { background: rgba(196, 174, 145, .16); }

  .page-about-icon {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
  }

  .page-about-icon .epta-icon,
  .page-about-go .epta-icon { width: 18px; height: 18px; }

  .page-about-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .page-about-text strong { font-size: 15px; font-weight: 650; }

  .page-about-text small {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-about-go { flex: 0 0 auto; color: var(--accent); }
}

/* Telefono: "Chi siamo" discreto, piccola etichetta a destra sulla riga della freccia. */
@media (max-width: 650px) {
  .page-heading { position: relative; }

  .page-about-row {
    position: absolute;
    top: 6px;
    right: 0;

    gap: 6px;
    width: auto;
    height: 32px;
    margin: 0;
    padding: 0 12px 0 8px;

    border: 1px solid rgba(196, 174, 145, .4);
    border-radius: 100px;
    background: transparent;
    color: var(--accent);
  }

  .page-about-icon {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    background: none;
    color: var(--accent);
  }

  .page-about-icon .epta-icon { width: 16px; height: 16px; }
  .page-about-text strong { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
  .page-about-text small,
  .page-about-go { display: none; }

  /* L'etichetta della sezione lascia spazio al pulsante e si accorcia se lunga. */
  .page-heading:has(.page-about-row) .section-kicker {
    padding-right: 120px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
    line-height: 44px;
  }
}
