/* ==========================================================================
   Cokolex component library — translated from the design system's React
   components (Logo, NavBar, Button, Card, Badge, Tag, StatTile, IconButton,
   Eyebrow, Input, Select, Checkbox, Toast, Tabs, Tooltip, Placeholder)
   ========================================================================== */

/* ---- Logo ---- */
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--brand-wordmark); }
.logo--invert { color: var(--white); }
.logo__mark { flex: none; display: block; }
.logo__mark path,
.logo__mark polygon { fill: var(--brand-primary); }
.logo--invert .logo__mark path,
.logo--invert .logo__mark polygon { fill: var(--white); }
.logo__word {
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wordmark);
  line-height: 1;
  white-space: nowrap;
}

/* ---- Eyebrow ---- */
.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  line-height: 1.4;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow--faint { color: var(--text-faint); }
.eyebrow--brand { color: var(--brand-primary); }
.eyebrow--invert { color: rgba(255,255,255,0.72); }

/* ---- NavBar ---- */
.navbar {
  display: flex;
  align-items: center;
  gap: var(--space-9);
  height: var(--site-header-h);
  /* Logo and CTA align with the content edge of .section on wide screens */
  padding: 0 max(var(--page-gutter), calc((100% - var(--page-max)) / 2 + var(--page-gutter)));
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
}
.navbar__nav { display: flex; align-items: center; justify-content: center; gap: var(--space-7); flex: 1; }
.navbar__link {
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  letter-spacing: var(--site-tracking-caps);
  text-transform: uppercase;
  line-height: 1;
  color: var(--text-body);
  transition: var(--transition-control);
}
.navbar__link:hover { color: var(--text-strong); }
.navbar__link.is-active { color: var(--text-strong); }
.navbar__actions { display: flex; align-items: center; gap: var(--gap-inline); }
.navbar__toggle {
  display: none;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  cursor: pointer;
}
.navbar__toggle span, .navbar__toggle span::before, .navbar__toggle span::after {
  content: ''; display: block; width: 16px; height: 2px; background: var(--text-strong); position: relative;
  transition: transform var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard);
}
.navbar__toggle span::before { position: absolute; top: -5px; }
.navbar__toggle span::after { position: absolute; top: 5px; }

@media (max-width: 860px) {
  .navbar { padding: 0 var(--space-6); gap: var(--space-4); justify-content: space-between; }
  .navbar__toggle { display: inline-flex; position: relative; z-index: 51; }
  /* Full-screen nav overlay: slides in from the right, sits below the
     sticky header (which stays visible so the toggle remains reachable
     to close it again). */
  .navbar__nav {
    display: flex;
    position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    background: var(--gradient-cover);
    flex-direction: column; align-items: flex-start; justify-content: center;
    padding: var(--space-8) var(--space-7);
    gap: var(--space-6);
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-out);
    pointer-events: none;
    z-index: 45;
  }
  .navbar__nav.is-open { transform: translateX(0); pointer-events: auto; }
  .navbar__nav .navbar__link {
    color: rgba(255,255,255,0.78);
    font-family: var(--font-display-greek);
    font-size: var(--text-2xl);
    font-weight: var(--weight-regular);
    letter-spacing: var(--site-tracking-headline);
    text-transform: none;
    line-height: var(--leading-snug);
  }
  .navbar__nav .navbar__link:hover,
  .navbar__nav .navbar__link.is-active { color: var(--white); }
  /* The compact header CTA has no room to show real text at this width. */
  .navbar__actions { display: none; }
  /* Hamburger -> X when the menu is open */
  .navbar__toggle[aria-expanded="true"] span { background: transparent; }
  .navbar__toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
  .navbar__toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
}

/* ---- Footer ---- */
.footer {
  background: var(--surface-card);
  border-top: 1px solid var(--border-subtle);
  padding: var(--site-section-pad) var(--page-gutter) var(--space-7);
}
.footer__inner {
  max-width: calc(var(--page-max) - 2 * var(--page-gutter)); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-6);
  /* One continuous hairline across all columns */
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-default);
}
.footer__inner > * { min-width: 0; }
.footer__col {
  display: flex; flex-direction: column; gap: var(--space-3);
  font-size: var(--text-sm);
}
.footer__brand { gap: var(--space-4); }
.footer__links { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__links a,
.footer__contact,
.footer__contact a { color: var(--text-body); transition: var(--transition-control); }
.footer__links a:hover,
.footer__contact a:hover { color: var(--text-strong); }
.footer__contact { display: flex; flex-direction: column; gap: var(--space-3); font-size: var(--text-sm); }
.footer__social { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__social a { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text-body); transition: var(--transition-control); }
.footer__social a:hover { color: var(--text-strong); }
.footer__social svg { width: 16px; height: 16px; flex: none; }
.footer__social--invert a { color: rgba(255,255,255,0.72); }
.footer__social--invert a:hover { color: var(--white); }
.footer__bottom {
  max-width: calc(var(--page-max) - 2 * var(--page-gutter)); margin: var(--space-10) auto 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap;
  font-size: var(--text-xs); color: var(--text-muted);
}
.footer__bottom nav { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.footer__bottom a { color: var(--text-muted); transition: var(--transition-control); }
.footer__bottom a:hover { color: var(--text-strong); }
@media (max-width: 860px) {
  .footer { padding: var(--site-section-pad-mobile) var(--space-6) var(--space-7); }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: var(--space-7) var(--space-6); }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { margin-top: var(--space-9); }
}

/* ---- Button ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 var(--space-5);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-control), transform var(--duration-fast) var(--ease-standard);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--sm { height: 36px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.btn--lg { height: 48px; padding: 0 var(--space-6); font-size: var(--text-md); }
.btn--full { display: flex; width: 100%; }

.btn--primary { background: var(--brand-primary); color: var(--white); }
.btn--primary:hover { background: var(--brand-deep); color: var(--white); }

.btn--secondary { background: var(--surface-card); color: var(--text-strong); border-color: var(--border-default); }
.btn--secondary:hover { background: var(--surface-sunken); color: var(--text-strong); }

.btn--ghost { background: transparent; color: var(--brand-primary); }
.btn--ghost:hover { background: var(--surface-brand-soft); color: var(--brand-primary); }
.btn--ghost-invert { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.35); }
.btn--ghost-invert:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.btn--accent { background: var(--brand-accent); color: var(--ink-900); }
.btn--accent:hover { background: var(--teal-600); color: var(--ink-900); }

.btn--inverse { background: var(--white); color: var(--blue-600); }
.btn--inverse:hover { background: rgba(255,255,255,0.86); color: var(--blue-600); }

/* ---- Card ---- */
.card {
  border-radius: var(--radius-xl);
  padding: var(--pad-card);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  color: var(--text-body);
  box-shadow: var(--shadow-none);
  transition: box-shadow var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard);
}
.card--pad-sm { padding: var(--space-5); }
.card--pad-lg { padding: var(--pad-card-lg); }
.card--sunken { background: var(--surface-sunken); border-color: transparent; }
.card--inverse { background: var(--surface-inverse); border-color: transparent; color: rgba(255,255,255,0.78); }
.card--brand { background: var(--gradient-brand); border-color: transparent; color: rgba(255,255,255,0.86); overflow: hidden; }
/* The one loud moment per page (DESIGN.md §1.2) */
.card--cover { background: var(--gradient-cover); border-color: transparent; color: rgba(255,255,255,0.78); overflow: hidden; }
.card--cover.card--pad-lg { padding: var(--space-10); }
.card--cover h2, .card--cover h3 { color: var(--white); }
.card--cover .section-head p { color: rgba(255,255,255,0.78); }
@media (max-width: 860px) { .card--cover.card--pad-lg { padding: var(--space-7) var(--space-6); } }
.card--interactive { cursor: pointer; }
.card--interactive { transition: var(--transition-control); }
.card--interactive:hover { border-color: var(--border-strong); }

/* ---- Badge ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--text-xs);
  letter-spacing: 0.02em; white-space: nowrap;
  background: var(--surface-sunken); color: var(--text-body);
}
.badge--brand { background: var(--surface-brand-soft); color: var(--blue-600); }
.badge--success { background: var(--surface-accent-soft); color: var(--teal-600); }
.badge--warning { background: rgba(245,165,36,0.14); color: #96620B; }
.badge--danger { background: rgba(229,72,77,0.12); color: #B02226; }
.badge--solid { background: var(--brand-primary); color: var(--white); }
/* Status dot with a slow, quiet pulse ring (e.g. "Coming soon" pill) */
.pulse-dot { position: relative; flex: none; width: 8px; height: 8px; margin-right: 2px; border-radius: 50%; background: var(--brand-primary); }
.pulse-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--brand-primary);
  animation: pulse-ring 2400ms var(--ease-out) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.45; }
  70%, 100% { transform: scale(2.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .pulse-dot::after { animation: none; opacity: 0; } }
/* Quiet outlined pill, e.g. above the hero headline */
.badge--outline {
  height: 32px; padding: 0 var(--space-4);
  background: var(--surface-card); color: var(--text-strong);
  border: 1px solid var(--border-default);
  font-weight: var(--weight-regular); font-size: var(--text-sm); letter-spacing: 0;
}
@media (max-width: 860px) {
  /* Some badges carry a full sentence rather than a short label (e.g. the
     TecDoc "ALL IN ONE" badge); nowrap then forces horizontal overflow. */
  .badge { white-space: normal; height: auto; padding: 6px 12px; }
  /* The hero pill carries a full tagline; wrapped inside a pill it looks clumsy,
     so on narrow screens it becomes a plain balanced caption. */
  .badge--outline { border-color: transparent; background: none; padding: 0; text-wrap: balance; color: var(--text-body); }
}

/* ---- Tag ---- */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 6px 12px; line-height: 1.4;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-body);
  font-family: var(--font-mono); font-size: var(--text-xs);
  transition: var(--transition-control);
}

/* ---- StatTile ---- */
.stat-tile {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
}
.stat-tile--inverse, .stat-tile--brand { border-color: transparent; overflow: hidden; }
.stat-tile--inverse { background: var(--surface-inverse); }
.stat-tile--brand { background: var(--gradient-brand); }
.stat-tile__value {
  font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-3xl);
  line-height: 1; letter-spacing: var(--site-tracking-headline); white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text-strong);
}
.stat-tile--inverse .stat-tile__value, .stat-tile--brand .stat-tile__value { color: var(--white); }
.stat-tile__label {
  font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.4; letter-spacing: var(--tracking-label-tight);
  text-transform: uppercase; color: var(--text-muted);
}
.stat-tile--inverse .stat-tile__label, .stat-tile--brand .stat-tile__label { color: rgba(255,255,255,0.7); }

/* ---- IconButton ---- */
.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-control);
  background: transparent; color: var(--text-muted); border: 1px solid transparent;
}
.icon-btn:hover { background: var(--surface-sunken); }

/* ---- Forms: Input / Select / Checkbox ---- */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field[hidden] { display: none; }
.field__label { font-family: var(--font-sans); font-weight: var(--weight-medium); font-size: var(--text-sm); color: var(--text-strong); }
.field__control {
  display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  transition: var(--transition-control);
}
.field__control:hover { border-color: var(--border-strong); }
.field__control:focus-within { border-color: var(--border-brand); box-shadow: var(--focus-ring); }
/* Only after the user has interacted with the field (no red on page load) */
.field__control:has(:user-invalid) { border-color: var(--status-danger); }
.field__control input, .field__control select {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  /* 16px keeps iOS Safari from zooming into the page on focus */
  font-family: var(--font-sans); font-size: var(--text-md); color: var(--text-strong);
  height: 100%;
}
.field__control input:focus-visible, .field__control select:focus-visible { box-shadow: none; }
.field__control input::placeholder { color: var(--text-muted); }
.field__control select { appearance: none; cursor: pointer; }
.field__select-wrap { position: relative; }
.field__select-wrap select { padding-right: var(--space-6); }
.field__select-wrap::after {
  content: ''; position: absolute; right: var(--space-4); top: 50%;
  width: 7px; height: 7px; margin-top: -5px;
  border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.field__hint { font-family: var(--font-sans); font-size: var(--text-xs); color: var(--text-muted); }

.country-select__flag {
  position: relative; flex: none;
  width: 22px; height: 16px;
  border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--border-default);
}
.flag-icon { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.country-select[data-country="GR"] .flag-icon--GR,
.country-select[data-country="CY"] .flag-icon--CY,
.country-select[data-country="DE"] .flag-icon--DE,
.country-select[data-country="OTHER"] .flag-icon--OTHER { display: block; }

.checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox__box {
  width: 18px; height: 18px; flex: none;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transition-control);
}
.checkbox input:checked ~ .checkbox__box { border-color: var(--brand-primary); background: var(--brand-primary); color: var(--white); }
.checkbox__box::after { content: ''; }
.checkbox input:checked ~ .checkbox__box::after { content: '✓'; font-size: 12px; line-height: 1; }
.checkbox__label { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text-body); }

/* ---- Toast ---- */
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  min-width: 300px; max-width: 420px;
  padding: 14px 16px;
  background: var(--surface-inverse); color: var(--white);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  position: fixed; right: 28px; bottom: 28px; z-index: 200;
  transform: translateY(12px); opacity: 0; pointer-events: none;
  transition: transform var(--duration-slow) var(--ease-out), opacity var(--duration-slow) var(--ease-out);
}
.toast.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast__bar { width: 4px; align-self: stretch; border-radius: var(--radius-pill); background: var(--status-success); flex: none; }
.toast__body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.toast__title { font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.toast__message { font-family: var(--font-sans); font-size: var(--text-xs); color: rgba(255,255,255,0.7); line-height: 1.5; }
.toast__dismiss { cursor: pointer; background: none; border: none; color: rgba(255,255,255,0.5); font-size: 15px; line-height: 1; padding: 0; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: var(--space-6); border-bottom: 1px solid var(--border-default); }
.tab {
  padding: 10px 0 12px; background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--text-sm);
  color: var(--text-muted);
  transition: var(--transition-control);
}
.tab.is-active { color: var(--text-strong); border-bottom-color: var(--brand-primary); }
.tab-panel[hidden] { display: none; }

/* ---- Tooltip (CSS-only) ---- */
.tooltip { position: relative; display: inline-flex; }
.tooltip__bubble {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  padding: 6px 10px; white-space: nowrap; z-index: 40;
  background: var(--surface-inverse); color: var(--white);
  border-radius: var(--radius-xs); box-shadow: var(--shadow-md);
  font-family: var(--font-sans); font-size: var(--text-xs);
  opacity: 0; visibility: hidden;
  transition: opacity var(--duration-base) var(--ease-standard);
}
.tooltip:hover .tooltip__bubble, .tooltip:focus-within .tooltip__bubble { opacity: 1; visibility: visible; }

/* ---- Media frame (real photography / screenshots / video) ---- */
.media-frame {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-default);
  background: var(--surface-sunken);
}
.media-frame--dark { border-color: rgba(255,255,255,0.16); }
.media-frame img, .media-frame video, .media-frame iframe {
  display: block; width: 100%; height: 100%; object-fit: cover; border: none;
}

/* ---- Video facade: YouTube loads only after a click (Datenschutz §4) ---- */
.video-facade {
  position: relative; display: block; width: 100%; max-width: var(--site-measure-headline); margin: 0 auto;
  aspect-ratio: 16 / 9; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--border-default); border-radius: var(--radius-xl);
  background: repeating-linear-gradient(135deg, rgba(17,24,39,0.05) 0 10px, transparent 10px 20px), var(--surface-card);
  transition: var(--transition-control);
}
.video-facade:hover { border-color: var(--border-strong); }
.video-facade__play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-radius: 50%; background: var(--surface-card); border: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition-control);
}
.video-facade__play::before {
  content: ''; margin-left: 5px; width: 16px; height: 20px;
  background: var(--brand-primary);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.video-facade:hover .video-facade__play { border-color: var(--border-brand); }
.video-facade__label {
  position: absolute; left: var(--space-6); bottom: var(--space-5);
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-label-tight);
  text-transform: uppercase; color: var(--text-muted);
}
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Placeholder (stand-in for missing photography) ---- */
.placeholder {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  background: repeating-linear-gradient(135deg, rgba(17,24,39,0.05) 0 10px, transparent 10px 20px);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: var(--space-4);
}
.placeholder--dark {
  border-color: rgba(255,255,255,0.16);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 10px, transparent 10px 20px);
}
.placeholder__label {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-label-tight);
  text-transform: uppercase; color: var(--text-faint);
}
.placeholder--dark .placeholder__label { color: rgba(255,255,255,0.6); }

/* ---- Scroll reveal (class toggled by IntersectionObserver in main.js) ---- */
.reveal {
  opacity: 0;
  transform: translateY(var(--space-4));
  transition: opacity var(--site-duration-reveal) var(--ease-out), transform var(--site-duration-reveal) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
