/*
 * elitesoft — our clients (inc/views-clients.php): the plot of the countries, the sectors as
 * CAD layers, every logo on a sheet of its own; and the two slow rows of logos on the home page.
 */

/* ---------- the plot ---------- */
.cplot {
  margin: 0 0 clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--sheet);
  overflow: hidden;
}
.cplot svg { display: block; width: 100%; height: auto; }
.cplot__grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cplot__grid line.is-ten { stroke: var(--line-2); }
.cplot__grid text { fill: var(--muted); font: 500 12px/1 var(--sans); letter-spacing: .04em; }
.cplot__routes path {
  fill: none; stroke: var(--tungsten-line); stroke-width: 1.4; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.cplot__hq rect { fill: var(--sky); }
.cplot__hq text { fill: var(--sky); font: 600 13px/1 var(--sans); letter-spacing: .02em; }
.cplot__pt { cursor: pointer; outline: none; }
.cplot__dot { fill: var(--surface-2); stroke: var(--tungsten); stroke-width: 1.6; vector-effect: non-scaling-stroke; transition: fill .2s var(--ease-out); }
.cplot__halo { fill: var(--tungsten); opacity: 0; transition: opacity .25s var(--ease-out); }
.cplot__n { fill: var(--ink); font: 700 13px/1 var(--display); text-anchor: middle; pointer-events: none; }
.cplot__name { fill: var(--ink-soft); font: 600 14px/1 var(--sans); pointer-events: none; paint-order: stroke; stroke: var(--sheet); stroke-width: 4px; stroke-linejoin: round; }
.cplot__pt:hover .cplot__halo, .cplot__pt:focus-visible .cplot__halo, .cplot__pt.is-on .cplot__halo { opacity: .18; }
.cplot__pt:hover .cplot__dot, .cplot__pt:focus-visible .cplot__dot, .cplot__pt.is-on .cplot__dot { fill: var(--tungsten); }
.cplot__pt:hover .cplot__n, .cplot__pt:focus-visible .cplot__n, .cplot__pt.is-on .cplot__n { fill: var(--tungsten-ink); }
.cplot__pt:focus-visible .cplot__dot { stroke: var(--ink); stroke-width: 2.4; }

/* the one moment of the page: the routes are drawn from the offices, then the countries appear */
@media (prefers-reduced-motion: no-preference) {
  .cplot.is-ready .cplot__routes path { stroke-dashoffset: 1; }
  .cplot.is-ready .cplot__pt { opacity: 0; }
  .cplot.is-in .cplot__routes path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s var(--ease-in-out) calc(var(--i) * 70ms); }
  .cplot.is-in .cplot__pt { opacity: 1; transition: opacity .5s var(--ease-out) calc(500ms + var(--i) * 70ms); }
}

/* ---------- layers and countries ---------- */
.cl__tools { display: grid; gap: 18px; margin-bottom: clamp(28px, 4vw, 44px); }
.cl__tools[hidden] { display: none; }
.cl__lbl { margin: 0 0 8px; color: var(--muted); font-size: var(--t-xs); font-weight: 600; letter-spacing: .02em; }
.cl__layers ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cl__layer {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px 6px 10px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
  color: var(--ink); font: 600 var(--t-sm)/1.2 var(--sans); cursor: pointer;
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out), opacity .2s var(--ease-out);
}
.cl__layer:hover { background: var(--surface-2); border-color: rgba(238, 234, 227, .32); }
.cl__layer:focus-visible, .cl__cc:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 2px; }
.cl__sw { width: 12px; height: 12px; border-radius: 2px; background: var(--sec); flex: none; }
.cl__n { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
/* the eye of a CAD layer: open when the layer shows */
.cl__eye { position: relative; width: 16px; height: 10px; border: 1.5px solid currentColor; border-radius: 50% / 60%; flex: none; color: var(--ink-soft); }
.cl__eye::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: currentColor; }
.cl__layer[aria-pressed="false"] { opacity: .55; background: transparent; }
.cl__layer[aria-pressed="false"] .cl__sw { background: transparent; box-shadow: inset 0 0 0 1.5px var(--sec); }
.cl__layer[aria-pressed="false"] .cl__eye::before { content: ""; position: absolute; left: -3px; right: -3px; top: 50%; height: 1.5px; background: currentColor; transform: rotate(-30deg); }
.cl__layer[aria-pressed="false"] .cl__eye::after { display: none; }

.cl__countries { display: flex; flex-wrap: wrap; gap: 6px; }
.cl__cc {
  min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: transparent; color: var(--ink-soft); font: 600 var(--t-sm)/1.2 var(--sans); cursor: pointer;
  transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.cl__cc span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.cl__cc:hover { border-color: var(--line-2); color: var(--ink); }
.cl__cc[aria-pressed="true"] { background: var(--tungsten); border-color: var(--tungsten); color: var(--tungsten-ink); }
.cl__cc[aria-pressed="true"] span { color: rgba(26, 18, 6, .7); }
.cl__count { margin: 0; color: var(--muted); font-size: var(--t-sm); min-height: 1.4em; }

/* ---------- a country ---------- */
.cl__land { margin-bottom: clamp(36px, 5vw, 64px); scroll-margin-top: 110px; }
.cl__land[hidden] { display: none; }
.cl__lt { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; font: 700 clamp(22px, 2.2vw, 30px)/1.15 var(--display); letter-spacing: -0.02em; }
.cl__ltcc {
  align-self: center; min-width: 40px; padding: 4px 6px; border: 1px solid var(--tungsten-line); border-radius: var(--r-xs);
  color: var(--tungsten); font: 700 13px/1 var(--sans); letter-spacing: .06em; text-align: center;
}
.cl__ltn { color: var(--muted); font: 500 var(--t-sm)/1 var(--sans); }

.cl__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }

/* ---------- a client on its sheet ---------- */
.csheet {
  --paper: #EFEBE3;
  position: relative; height: 168px; border-radius: var(--r); overflow: hidden; outline: none;
  background: var(--paper); box-shadow: 0 0 0 1px rgba(0, 0, 0, .06) inset;
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.csheet--dark { --paper: var(--surface-2); box-shadow: 0 0 0 1px var(--line) inset; }
/* the sector's colour: the edge of the sheet, as a layer colour */
.csheet::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--sec); z-index: 2; }
/* a fold in the corner, like a plotted sheet */
.csheet::after { content: ""; position: absolute; right: 0; top: 0; width: 18px; height: 18px; background: linear-gradient(225deg, var(--ground) 50%, rgba(0, 0, 0, .14) 50%); z-index: 2; }
.csheet__logo { position: absolute; inset: 0 0 0 4px; display: grid; place-items: center; padding: 22px 24px; transition: transform .35s var(--ease-out); }
.csheet__logo img { max-width: 100%; max-height: 84px; width: auto; height: auto; object-fit: contain; }
.csheet__tb {
  position: absolute; left: 4px; right: 0; bottom: 0; z-index: 1; padding: 10px 14px 12px;
  background: rgba(11, 14, 18, .92); color: var(--ink); backdrop-filter: blur(6px);
  transform: translateY(100%); transition: transform .32s var(--ease-out);
}
.csheet__tb p { margin: 0; }
.csheet__name { font: 700 var(--t-sm)/1.25 var(--sans); }
.csheet__sec { display: flex; align-items: center; gap: 7px; margin-top: 3px !important; color: var(--ink-soft); font-size: var(--t-xs); }
.csheet__dot { width: 8px; height: 8px; border-radius: 2px; background: var(--sec); flex: none; }
.csheet__sw { margin-top: 4px !important; color: var(--tungsten); font-size: var(--t-xs); font-weight: 600; }
.csheet:hover, .csheet:focus-visible, .csheet.is-open { --lift: -4px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06) inset, var(--shadow-float); }
.csheet:focus-visible { box-shadow: 0 0 0 2px var(--tungsten), var(--shadow-float); }
.csheet:hover .csheet__tb, .csheet:focus-visible .csheet__tb, .csheet.is-open .csheet__tb { transform: translateY(0); }
.csheet:hover .csheet__logo, .csheet:focus-visible .csheet__logo, .csheet.is-open .csheet__logo { transform: translateY(-22px) scale(.92); }
.csheet.is-off { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .csheet.is-back { animation: csheet-in .45s var(--ease-out) both; }
}
@keyframes csheet-in { from { opacity: 0; } to { opacity: 1; } }

.cl__end { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: clamp(20px, 3vw, 32px); border-top: 1px solid var(--line); }
.cl__end p { margin: 0; font: 600 var(--t-lg)/1.35 var(--display); }

/* ---------- home: two slow rows ---------- */
/* its own ground: the building of the home page must not show through the text */
.hcl { position: relative; z-index: 1; background: var(--ground); }
.hcl__head { display: grid; gap: 14px; justify-items: start; margin-bottom: clamp(26px, 3.5vw, 40px); }
.hcl__head .lead { margin: 0; max-width: 56ch; }
.hcl__belt {
  display: grid; gap: 12px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.hcl__row { display: flex; width: max-content; }
.hcl__run { display: flex; gap: 12px; margin: 0; padding: 0 12px 0 0; list-style: none; }
.hcl__item { display: grid; place-items: center; width: 184px; height: 92px; padding: 14px 18px; border-radius: var(--r); background: #EFEBE3; flex: none; }
.hcl__item--dark { background: var(--surface-2); box-shadow: 0 0 0 1px var(--line) inset; }
.hcl__item img { max-width: 100%; max-height: 52px; width: auto; height: auto; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .hcl__row { animation: hcl-run calc(var(--n) * 3.4s) linear infinite; }
  .hcl__row--back { animation-direction: reverse; }
  /* they keep moving under the pointer (Κώστας 2026-11-21) */
}
@keyframes hcl-run { to { transform: translateX(-50%); } }

@media (max-width: 640px) {
  /* the plot keeps a readable size and slides sideways */
  .cplot { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .cplot svg { width: 760px; max-width: none; }
  .cl__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .csheet { height: 118px; }
  .csheet__logo { padding: 14px 14px; }
  .csheet__logo img { max-height: 56px; }
  .csheet__tb { padding: 8px 10px 9px; }
  .csheet.is-open .csheet__logo { transform: translateY(-30px) scale(.8); }
  .hcl__item { width: 150px; height: 78px; }
}
