/* ==========================================================================
   Melodix Software — components.css
   Nav, brand mark, buttons, cards, chips, links, equaliser, footer.
   ========================================================================== */

/* ------------------------------------------------------------------- nav */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-nav.is-stuck {
  background: rgba(7, 7, 15, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 16px clamp(20px, 5vw, 40px);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}

.brand-logo-wrap {
  position: relative;
  display: inline-block;
  height: 45px;
  aspect-ratio: 720 / 259;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 0 rgba(124, 92, 255, 0));
  transform-origin: left center;
  animation: logo-signal-in 0.9s var(--ease) both;
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
}

.brand:hover .brand-logo,
.brand:focus-visible .brand-logo {
  transform: translateY(-1px) scale(1.025);
  filter:
    drop-shadow(0 0 8px rgba(169, 155, 255, 0.42))
    drop-shadow(0 0 18px rgba(34, 211, 238, 0.2));
}

.brand-logo-wrap--footer {
  height: 58px;
}

.brand-logo--footer {
  animation-delay: 0.12s;
}

/* The four vertical strokes in the Melodix M move like a restrained equaliser. */
.brand-signal-bars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.brand-signal-bars i {
  position: absolute;
  width: max(0.82%, 1px);
  border-radius: 999px;
  transform-origin: center bottom;
  animation: brand-signal-bounce 1.25s ease-in-out infinite;
  box-shadow: 0 0 5px rgba(169, 155, 255, 0.28);
}

.brand-signal-bars i:nth-child(1) {
  left: 41.1%; top: 15.4%; height: 30.9%;
  background: linear-gradient(#ffe1ad, #ef9fd8);
  animation-delay: -0.15s;
}

.brand-signal-bars i:nth-child(2) {
  left: 42.8%; top: 8.1%; height: 31.7%;
  background: linear-gradient(#ffe6b3, #b9a4ff);
  animation-delay: -0.8s;
}

.brand-signal-bars i:nth-child(3) {
  left: 44.6%; top: 13.5%; height: 18.9%;
  background: linear-gradient(#f7d6c8, #a88cff);
  animation-delay: -0.42s;
}

.brand-signal-bars i:nth-child(4) {
  left: 46.25%; top: 19.3%; height: 7%;
  background: linear-gradient(#d5adff, #9277ff);
  animation-delay: -1.05s;
}

@keyframes brand-signal-bounce {
  0%, 100% { transform: scaleY(0.58); opacity: 0.78; }
  50% { transform: scaleY(1.08); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-signal-bars i {
    animation: none;
    transform: none;
    opacity: 1;
  }
}

@keyframes logo-signal-in {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateX(-8px);
    filter: drop-shadow(0 0 16px rgba(34, 211, 238, 0.6));
  }
  65% { opacity: 1; }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateX(0);
    filter: drop-shadow(0 0 0 rgba(124, 92, 255, 0));
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.95rem;
  font-weight: 550;
}

.nav-menu > a:not(.btn) {
  color: var(--text-mid);
  transition: color 0.2s var(--ease);
  position: relative;
}

.nav-menu > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-menu > a:not(.btn):hover { color: var(--text); }
.nav-menu > a[aria-current="true"] { color: var(--text); }
.nav-menu > a[aria-current="true"]::after { transform: scaleX(1); }

/* Language switcher mirrors FlowZart's compact DE / EN pill. */
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.language-switcher button {
  min-width: 38px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.language-switcher button:hover { color: var(--text); }

.language-switcher button[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--violet), #5b46d8);
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.34);
}

/* burger — hidden on desktop */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 650;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn--sm { padding: 9px 18px; font-size: 0.9rem; }

.btn--primary {
  background: linear-gradient(135deg, var(--violet), #5b46d8);
  color: #fff;
  box-shadow: 0 8px 26px rgba(124, 92, 255, 0.34);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(124, 92, 255, 0.5);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-2px);
}

/* ------------------------------------------------------- generic cards */

.card {
  padding: 30px 26px;
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-mid); font-size: 0.97rem; }

.card-glyph {
  display: block;
  font-size: 1.7rem;
  margin-bottom: 16px;
  line-height: 1;
}

/* ----------------------------------------------------------------- chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.chips li {
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  color: var(--text-mid);
}

/* ----------------------------------------------------------- arrow links */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--accent, var(--violet-light));
}

.link-arrow::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}
.link-arrow:hover::after { transform: translateX(4px); }

.link-arrow--dim { color: var(--text-mid); }

/* -------------------------------------------------------- equaliser bars */

.eq {
  display: flex;
  align-items: flex-end;
  gap: 11px;
  height: 52px;
  margin-top: 52px;
  opacity: 0.8;
}

.eq span {
  flex: 0 0 8px;
  border-radius: 3px 3px 1px 1px;
  background: var(--grad);
  animation: eq-bounce 1.4s ease-in-out infinite;
  transform-origin: bottom;
}

.eq span:nth-child(1)  { height: 30%; animation-delay: -0.10s; }
.eq span:nth-child(2)  { height: 62%; animation-delay: -0.90s; }
.eq span:nth-child(3)  { height: 96%; animation-delay: -0.35s; }
.eq span:nth-child(4)  { height: 48%; animation-delay: -1.15s; }
.eq span:nth-child(5)  { height: 78%; animation-delay: -0.55s; }
.eq span:nth-child(6)  { height: 36%; animation-delay: -1.30s; }
.eq span:nth-child(7)  { height: 88%; animation-delay: -0.20s; }
.eq span:nth-child(8)  { height: 54%; animation-delay: -0.75s; }
.eq span:nth-child(9)  { height: 70%; animation-delay: -1.05s; }
.eq span:nth-child(10) { height: 40%; animation-delay: -0.45s; }
.eq span:nth-child(11) { height: 92%; animation-delay: -1.25s; }
.eq span:nth-child(12) { height: 58%; animation-delay: -0.65s; }
.eq span:nth-child(13) { height: 34%; animation-delay: -0.95s; }
.eq span:nth-child(14) { height: 82%; animation-delay: -0.30s; }
.eq span:nth-child(15) { height: 46%; animation-delay: -1.20s; }
.eq span:nth-child(16) { height: 66%; animation-delay: -0.50s; }
.eq span:nth-child(17) { height: 28%; animation-delay: -0.85s; }
.eq span:nth-child(18) { height: 74%; animation-delay: -0.15s; }

@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1); }
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: 40px;
  padding-top: 60px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.06));
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand p {
  margin-top: 16px;
  max-width: 30em;
  color: var(--text-dim);
  font-size: 0.93rem;
}

.footer-col h4 { margin-bottom: 16px; color: var(--text-dim); }

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col a,
.footer-col address {
  color: var(--text-mid);
  font-size: 0.93rem;
  transition: color 0.2s var(--ease);
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding-block: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 860px) {
  .nav-burger { display: flex; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px clamp(20px, 5vw, 40px) 26px;
    background: rgba(9, 9, 18, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .nav-menu.is-open { display: flex; }

  .nav-menu > a:not(.btn) { padding: 12px 4px; }
  .nav-menu > a:not(.btn)::after { display: none; }
  .nav-menu .btn { margin-top: 10px; }

  .nav-menu .language-switcher {
    order: -1;
    align-self: flex-start;
    margin-bottom: 8px;
  }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
}
