/* ============================================================
   ΤΗΛΕΜΑΤΙΚΗ ICT — Components (v2 · Calm Enterprise)
   ============================================================ */

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-size: var(--fs-ui);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  line-height: 1;
  border: var(--border-w) solid transparent;
  transition: background-color var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard),
              transform var(--dur-base) var(--ease-standard);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--text-title);
  border-color: var(--border-strong);
}
.btn--secondary:hover {
  color: var(--text-title);
  border-color: var(--accent);
  background: var(--surface-tint);
}

.btn--ghost {
  background: transparent;
  color: var(--text-link);
  padding-inline: var(--space-3);
}
.btn--ghost:hover { background: var(--surface-tint); }

.btn--lg { padding: 16px 32px; font-size: var(--fs-body); }
.btn--sm { padding: 9px 18px; font-size: var(--fs-caption); }

/* Arrow affordance — slides on hover */
.btn .btn-arrow { transition: transform var(--dur-base) var(--ease-standard); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ============ Badges & chips ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  background: var(--surface-tint);
  color: var(--text-eyebrow);
  line-height: 1.3;
}
.badge--outline {
  background: transparent;
  border: var(--border-w) solid var(--border-subtle);
  color: var(--text-muted);
}
.badge--success { background: rgba(31, 157, 114, 0.12); color: var(--tm-success); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  border: var(--border-w) solid var(--border-subtle);
  color: var(--text-body);
  background: var(--surface-card);
  transition: border-color var(--dur-base) var(--ease-standard),
              background-color var(--dur-base) var(--ease-standard);
}
.chip:hover { border-color: var(--accent); }

/* ============ Cards ============ */
.card {
  position: relative;
  background: var(--surface-card);
  border: var(--border-w) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-slow) var(--ease-standard),
              transform var(--dur-slow) var(--ease-standard),
              border-color var(--dur-slow) var(--ease-standard);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Signature (v3): on hover a bright head traces the border, DRAWING it on
   the first lap; afterwards the full cyan border stays and the head keeps
   circulating. Uses an SVG rect stroke (injected in js/site.js) so the
   speed is uniform along every side — square or oblong. --tm-perim (the
   perimeter length) is set per card in js/site.js. */
.card--rule { --tm-lap: 1.9s; position: relative; }
.card-outline {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none; z-index: 1;
}
/* Rects declare pathLength="1000" (in site.js), so every dash length is a
   fraction of the perimeter: fixed numbers in the keyframes (no per-card
   vars → clean interpolation that loops), and uniform speed on every side
   whatever the aspect ratio. */
.card-outline rect { fill: none; vector-effect: non-scaling-stroke; }
.card-outline .co-fill {
  stroke: var(--tm-cyan-500); stroke-width: 1.75;
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  opacity: 0; transition: opacity var(--dur-base) var(--ease-standard);
}
.card-outline .co-head {
  stroke: #FFFFFF; stroke-width: 2.25; stroke-linecap: round;
  stroke-dasharray: 28 972; stroke-dashoffset: 0;
  opacity: 0; transition: opacity var(--dur-base) var(--ease-standard);
}
.card--rule:hover .co-fill { opacity: 1; animation: tmDrawL var(--tm-lap) linear forwards; }
/* Head hidden while the border draws (animation-delay = one lap), then it
   appears and circulates forever. Longhand: the shorthand mis-parses two
   var() time values. */
.card--rule:hover .co-head {
  animation-name: tmHeadL;
  animation-duration: var(--tm-lap);
  animation-timing-function: linear;
  animation-delay: var(--tm-lap);
  animation-iteration-count: infinite;
}
@keyframes tmDrawL { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes tmHeadL {
  from { opacity: 1; stroke-dashoffset: 0; }
  to   { opacity: 1; stroke-dashoffset: -1000; }
}
@media (prefers-reduced-motion: reduce) {
  .card--rule:hover .co-fill { animation: none; stroke-dashoffset: 0; }
  .card-outline .co-head { display: none; }
}

.card h3, .card h4 { margin-bottom: var(--space-2); }
.card .card-desc { color: var(--text-muted); font-size: var(--fs-small); line-height: var(--lh-relaxed); }

/* Service icon tile: ~30px glyph on 58px pale-cyan tile */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: var(--surface-tint);
  color: var(--accent);
  margin-bottom: var(--space-4);
}
.icon-tile svg { width: 30px; height: 30px; }

/* ============ Bento grid ============ */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}
.bento > * { grid-column: span 4; }
.bento .span-3 { grid-column: span 3; }
.bento .span-4 { grid-column: span 4; }
.bento .span-6 { grid-column: span 6; }
.bento .span-8 { grid-column: span 8; }
.bento .span-12 { grid-column: span 12; }

@media (max-width: 960px) {
  .bento > *, .bento .span-3, .bento .span-4, .bento .span-6, .bento .span-8 { grid-column: span 6; }
}
@media (max-width: 620px) {
  .bento > *, .bento .span-3, .bento .span-4, .bento .span-6, .bento .span-8 { grid-column: span 12; }
}

/* ============ Stats / KPIs ============ */
.stat { display: flex; flex-direction: column; gap: var(--space-2); }
.stat .stat-value {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-h2);
  color: var(--text-title);
  line-height: 1;
}
/* Units may be Greek — Plex Mono lacks Greek, so units use the sans face */
.stat .stat-value .unit {
  color: var(--text-numeral);
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: 0.6em;
}
.stat .stat-label {
  font-size: var(--fs-small);
  color: var(--text-muted);
  line-height: var(--lh-snug);
}

/* ============ Header ============ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: var(--border-w) solid transparent;
  transition: background-color var(--dur-slow) var(--ease-standard),
              border-color var(--dur-slow) var(--ease-standard),
              backdrop-filter var(--dur-slow) var(--ease-standard);
}
.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--header-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-title);
  font-weight: var(--fw-black);
  font-size: 17px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand img { width: 34px; height: 34px; }
.brand .brand-ict { color: var(--text-numeral); margin-left: -2px; }

/* Header over dark hero (before scroll): force light text */
.site-header--overlay:not(.is-scrolled) {
  --text-title: #F4F7FB;
  --text-body: #C6CFDE;
  --text-muted: #B9C4D6;
  --text-numeral: var(--tm-cyan-500);
}

.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
.nav-link {
  font-size: var(--fs-ui);
  font-weight: var(--fw-medium);
  color: var(--text-body);
  position: relative;
  padding-block: 6px;
}
.nav-link:hover { color: var(--text-title); }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--rule-accent);
  transition: right var(--dur-base) var(--ease-standard);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { right: 0; }
.nav-link[aria-current="page"] { color: var(--text-title); font-weight: var(--fw-semibold); }

/* Small controls (theme + lang) */
.ctrl-group { display: flex; align-items: center; gap: var(--space-2); }
.ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 34px;
  padding-inline: 8px;
  border-radius: var(--radius-md);
  border: var(--border-w) solid var(--border-subtle);
  color: var(--text-body);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  background: transparent;
  transition: border-color var(--dur-base) var(--ease-standard),
              background-color var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard);
}
.ctrl:hover { border-color: var(--accent); color: var(--text-title); }
.ctrl[aria-pressed="true"], .ctrl.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.ctrl svg { width: 16px; height: 16px; }

/* Language toggle (EL/EN) — text-based ctrl */
.lang-toggle {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-decoration: none;
}

/* Theme toggle shows/hides sun vs moon */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Mobile nav */
.nav-burger { display: none; }
@media (max-width: 860px) {
  .nav { display: none; }
  .nav-burger { display: inline-flex; }
  .nav.is-open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface-page);
    border-bottom: var(--border-w) solid var(--border-subtle);
    padding: var(--space-4) var(--gutter) var(--space-6);
    box-shadow: var(--shadow-lg);
  }
  .nav.is-open .nav-link {
    padding: 14px 4px;
    font-size: var(--fs-body);
    border-bottom: var(--border-w) solid var(--border-subtle);
  }
  .nav.is-open .nav-link:last-child { border-bottom: 0; }
}

/* ============ Forms ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field .label {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-title);
}
.field .hint { font-size: var(--fs-caption); color: var(--text-muted); }

.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: var(--border-w) solid var(--border-strong);
  background: var(--surface-card);
  color: var(--text-body);
  font-size: var(--fs-small);
  transition: border-color var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard);
}
.input::placeholder, .textarea::placeholder { color: var(--tm-gray-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}
.textarea { min-height: 120px; resize: vertical; }

/* ============ Trust strip ============ */
.trust-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
}
.trust-strip .trust-label {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.trust-strip > img {
  height: 26px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(1);
  transition: opacity var(--dur-base) var(--ease-standard),
              filter var(--dur-base) var(--ease-standard);
}
.trust-strip > img:hover { opacity: 1; filter: grayscale(0); }
/* logos inside .logo-card render full colour — no filters */
.trust-strip .logo-card img { filter: none; opacity: 1; }

/* ============ Footer ============ */
.site-footer {
  background: var(--surface-dark-2);
  padding-block: var(--space-8) var(--space-5);
}
/* Contact strip at the top of the footer — phone, email, address, large type
   (the only place on the page these details appear) */
.site-footer .footer-contact {
  display: flex; flex-wrap: wrap; gap: 14px clamp(24px, 4vw, 56px);
  padding-bottom: var(--space-6); margin-bottom: var(--space-7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.site-footer .footer-contact-item {
  display: inline-flex; align-items: center; gap: 12px;
  color: #F4F7FB; font-size: clamp(17px, 1.35vw, 20px); font-weight: var(--fw-semibold);
  text-decoration: none; line-height: 1.3;
}
.site-footer .footer-contact-item svg { width: 22px; height: 22px; flex: none; color: var(--tm-cyan-500); }
.site-footer .footer-contact-item:hover { color: var(--tm-cyan-300); }
/* phone-only extras (shown by swipe.css): labels on the contact tiles, "back to top" */
.site-footer .fci-label, .site-footer .footer-top { display: none; }
/* ISO certifications under the brand blurb */
.site-footer .footer-certs { margin-top: 18px; }
.site-footer .footer-certs-title {
  font-size: var(--fs-caption); font-weight: var(--fw-semibold); letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-on-dark-muted); margin-bottom: 8px;
}
.site-footer .footer-certs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer .footer-certs .badge { cursor: default; }
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;   /* brand | company | services (contact details live in the contact section) */
  gap: var(--space-7);
}
@media (max-width: 960px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; } .site-footer .footer-grid > :first-child { grid-column: 1 / -1; } }


.site-footer .footer-title {
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--tm-cyan-500);
  margin-bottom: var(--space-4);
}
.site-footer .footer-link {
  display: block;
  padding-block: 6px;
  color: var(--text-on-dark-muted);
  font-size: var(--fs-small);
}
.site-footer .footer-link:hover { color: var(--tm-cyan-300); }
.site-footer .footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  color: #93A1B8;
  font-size: var(--fs-caption);
}
/* Phones: compact footer — brand on top, Company | Services side by side;
   tighter spacing throughout */
@media (max-width: 620px) {
  .site-footer { padding-block: 28px 16px; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 16px 16px; }
  .site-footer .footer-grid > :first-child { grid-column: 1 / -1; }
  .site-footer .footer-contact { flex-direction: row; flex-wrap: wrap; gap: 12px 12px; padding-bottom: 14px; margin-bottom: 14px; }
  .site-footer .footer-contact-item { font-size: clamp(14px, 4vw, 16px); gap: 7px; }   /* phone + email fit one line from 360px up */
  .site-footer .footer-contact-item svg { width: 18px; height: 18px; }
  .site-footer .footer-contact-item:last-child { flex-basis: 100%; }   /* phone + email share a line, address below */
  .site-footer .footer-grid > :first-child p { margin-top: 10px !important; }
  .site-footer .footer-grid > :first-child > div { margin-top: 12px !important; }
  .site-footer .footer-certs ul { gap: 6px; }
  .site-footer .footer-certs { margin-top: 12px; }
  .site-footer .footer-title { margin-bottom: 6px; }
  .site-footer .footer-link { padding-block: 4px; }
  .site-footer .footer-bottom { margin-top: 16px; padding-top: 12px; flex-direction: column; align-items: flex-start; gap: 6px; font-size: var(--fs-caption); }
}


/* ============ Tables (specs, comparisons) ============ */
.table-wrap { overflow-x: auto; }
table.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}
.tm-table th, .tm-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: var(--border-w) solid var(--border-subtle);
}
.tm-table th {
  font-weight: var(--fw-semibold);
  color: var(--text-title);
  background: var(--surface-subtle);
}
