/* Migo site: shared styles (tokens, header, menu, footer, marquee, reveal, modal) */

:root {
  --primary: #B143F5;      /* buttons, key actions */
  --secondary: #C7AAFE;    /* accents, eyebrows */
  --dark: #000A30;         /* section backgrounds */
  --accent-pink: #CC77AA;  /* home logo band gradient start */
  --accent-violet: #8F4BFC;/* home logo band gradient end */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--dark); overflow-x: hidden; scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background: var(--dark); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Site header ---------- */
.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.7rem clamp(1.5rem, 4vw, 3rem);
  pointer-events: none;
  animation: headIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes headIn {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.site-head__logo,
.site-head__burger { pointer-events: auto; }

.site-head__logo img { height: clamp(34px, 3.2vw, 42px); width: auto; display: block; }

.site-head__burger {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid rgba(199, 170, 254, 0.65);
  background: rgba(0, 10, 48, 0.25);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.site-head__burger span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-head__burger:hover,
.site-head__burger:focus-visible {
  border-color: var(--primary);
  transform: scale(1.06);
  box-shadow: 0 6px 30px rgba(177, 67, 245, 0.3);
}

.site-head__burger:hover span:nth-child(2) { width: 16px; transform: translateX(4px); }
.site-head__burger:focus-visible { outline: 2px solid var(--secondary); outline-offset: 4px; }

/* ---------- Partner logo marquee (positioning is set by each page) ---------- */
.logos {
  padding: 2.6rem 0 2.8rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.logos__track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Two identical sets; each carries the inter-set gap as padding so the
   -50% loop point lands exactly on the seam: no jump, constant glide */
.logos__set {
  display: flex;
  align-items: center;
  gap: clamp(3.5rem, 7vw, 7rem);
  padding-right: clamp(3.5rem, 7vw, 7rem);
}

.logo {
  opacity: 0.85;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img { width: auto; height: 36px; display: block; }
.logo--volker img { height: 34px; }
.logo--network img { height: 44px; }
.logo--rog img { height: 44px; }
.logo--loram img { height: 24px; }
.logo--ecdp img { height: 34px; }
.logo--dcrail img { height: 36px; }

/* ---------- Background swirls (hero ribbon echoes) ---------- */
.bg-swirl {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  filter: blur(9px);
  height: 100%;
  top: 0;
}

.bg-swirl--right {
  right: max(-160px, -11vw);
  width: clamp(420px, 48vw, 720px);
  opacity: 0.75;
  animation: swirlDrift 26s ease-in-out infinite alternate;
}

.bg-swirl--left {
  left: max(-200px, -14vw);
  width: clamp(380px, 44vw, 660px);
  opacity: 0.45;
  animation: swirlDriftFlip 31s ease-in-out infinite alternate;
}

@keyframes swirlDrift {
  from { transform: translateY(-1.5%) rotate(-1.2deg); }
  to   { transform: translateY(1.5%) rotate(1.2deg); }
}

@keyframes swirlDriftFlip {
  from { transform: scaleX(-1) translateY(1.5%) rotate(-1.2deg); }
  to   { transform: scaleX(-1) translateY(-1.5%) rotate(1.2deg); }
}

@media (max-width: 640px) { .bg-swirl { display: none; } }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: linear-gradient(180deg, var(--dark), #000618);
  border-top: 1px solid rgba(199, 170, 254, 0.14);
  padding: clamp(4rem, 8vh, 6rem) clamp(1.5rem, 5vw, 4rem) 2rem;
}

/* The whoosh: a light trail racing along the footer's top edge,
   like a train passing at speed */
.whoosh {
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  pointer-events: none;
  overflow: hidden;
}

.whoosh span {
  position: absolute;
  top: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, rgba(177, 67, 245, 0.45) 40%, var(--secondary) 78%, #fff);
  box-shadow: 0 0 12px rgba(177, 67, 245, 0.85), 0 0 34px rgba(177, 67, 245, 0.4);
}

.whoosh__trail {
  width: 260px;
  height: 3px;
  animation: whoosh 7s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.whoosh__echo {
  width: 110px;
  height: 2px;
  opacity: 0.55;
  animation: whoosh 7s cubic-bezier(0.45, 0, 0.2, 1) 0.22s infinite;
}

@keyframes whoosh {
  0%       { transform: translateX(-320px); opacity: 0; }
  4%       { opacity: 1; }
  52%      { transform: translateX(calc(100vw + 60px)); opacity: 1; }
  53%, 100% { transform: translateX(calc(100vw + 60px)); opacity: 0; }
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.9fr 1.1fr;
  gap: clamp(1.8rem, 4vw, 3.2rem);
  width: min(1240px, 100%);
  margin: 0 auto;
}

@media (max-width: 1080px) { .footer__grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 720px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__brand img { height: 38px; width: auto; margin-bottom: 1.2rem; }

.footer__brand p {
  color: rgba(237, 240, 255, 0.55);
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 34ch;
}

.footer__strap {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary);
}

.footer h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.footer ul { list-style: none; }
.footer li { padding: 0.32rem 0; }

.footer__grid a {
  color: rgba(237, 240, 255, 0.62);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.footer__grid a:hover { color: var(--secondary); padding-left: 4px; }

.footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--primary);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.88rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(177, 67, 245, 0.35);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.footer__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 44px rgba(177, 67, 245, 0.5);
  padding-left: 1.5rem !important;
}

.footer__cta svg { width: 18px; }

.footer__note {
  margin-top: 1.1rem;
  color: rgba(237, 240, 255, 0.45);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer__bottom {
  width: min(1240px, 100%);
  margin: clamp(3rem, 6vh, 4.5rem) auto 0;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(237, 240, 255, 0.45);
}

.footer__bottom nav { display: flex; gap: 1.6rem; }

.footer__bottom a {
  color: rgba(237, 240, 255, 0.55);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer__bottom a:hover { color: var(--secondary); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(38px);
  filter: blur(8px);
  transition:
    opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }

/* Tilt variant: starts leaning slightly back, lifts up to face you */
.reveal--tilt {
  transform: perspective(1100px) rotateX(10deg) translateY(44px);
  transform-origin: 50% 100%;
  transition-duration: 1.15s;
}

.reveal.is-in { opacity: 1; transform: none; filter: none; }

/* ---------- Feature info modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  visibility: hidden;
  transition: visibility 0s 0.5s;
}

.modal.is-open { visibility: visible; transition-delay: 0s; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 24, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.45s ease;
  cursor: pointer;
}

.modal.is-open .modal__backdrop { opacity: 1; }

.modal__panel {
  position: relative;
  width: min(480px, 100%);
  background: var(--dark);
  border: 1px solid rgba(199, 170, 254, 0.2);
  border-radius: 20px;
  padding: 2.4rem 2.2rem 2.2rem;
  box-shadow: 0 40px 100px rgba(0, 2, 18, 0.7), 0 0 60px rgba(177, 67, 245, 0.12);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.is-open .modal__panel { opacity: 1; transform: none; }

.modal__close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(199, 170, 254, 0.4);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}

.modal__close:hover { transform: rotate(90deg); border-color: var(--primary); }
.modal__close svg { width: 15px; }

.modal__eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--secondary);
}

.modal h3 {
  margin-top: 0.5rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
}

.modal__sub {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(237, 240, 255, 0.6);
}

.modal form { margin-top: 1.6rem; display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }

.modal .field { display: flex; flex-direction: column; gap: 0.35rem; }
.modal .field--full { grid-column: 1 / -1; }

@media (max-width: 480px) { .modal .field { grid-column: 1 / -1; } }

.modal label {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(237, 240, 255, 0.65);
}

.modal input {
  font-family: inherit;
  font-size: 0.92rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(199, 170, 254, 0.18);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.modal input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(177, 67, 245, 0.18);
}

.modal__submit {
  grid-column: 1 / -1;
  margin-top: 0.4rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(177, 67, 245, 0.35);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.modal__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 44px rgba(177, 67, 245, 0.5);
}

.modal__thanks { margin-top: 1.6rem; display: none; }
.modal__thanks p { color: rgba(237, 240, 255, 0.75); line-height: 1.7; }
.modal.is-sent form { display: none; }
.modal.is-sent .modal__thanks { display: block; }

/* ---------- Slide-out menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
  transition: visibility 0s 0.75s;
}

.menu.is-open { visibility: visible; transition-delay: 0s; }

.menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 4, 24, 0.45);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  transition: opacity 0.6s ease, backdrop-filter 0.6s ease;
  cursor: pointer;
}

.menu.is-open .menu__backdrop {
  opacity: 1;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(1060px, calc(100vw - 150px));
  background: var(--dark);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.5);
  transform: translateX(103%);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.menu.is-open .menu__panel { transform: translateX(0); }

@media (max-width: 720px) { .menu__panel { width: 100vw; } }

.menu__swirl {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(26%, 300px);
  background: url('../img/menu-sidebar-swirl.jpg') center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
  mask-image: linear-gradient(90deg, transparent, #000 40%);
  pointer-events: none;
}

@media (max-width: 720px) { .menu__swirl { opacity: 0.45; } }

.menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.2rem clamp(1.5rem, 4vw, 3.2rem) 1rem;
  position: relative;
  z-index: 1;
}

.menu__logo img { height: 40px; width: auto; display: block; }

.menu__close {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(199, 170, 254, 0.55);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}

.menu__close:hover { transform: rotate(90deg); border-color: var(--primary); }
.menu__close svg { width: 20px; }

.menu__nav {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  padding: 1rem clamp(1.5rem, 5vw, 4rem) 8rem clamp(1.5rem, 5vw, 3.2rem);
  max-width: 780px;
  width: 100%;
}

.acc { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

.acc__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.3rem;
  padding: 1.5rem 0.2rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: #fff;
}

.acc__num {
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.06em;
  border-right: 2px solid rgba(199, 170, 254, 0.35);
  padding-right: 1.3rem;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.acc__title {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 700;
  flex: 1;
}

.acc__title::after { content: "."; color: var(--primary); }

.acc__chev {
  width: 26px;
  color: var(--primary);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}

.acc.is-open .acc__chev { transform: rotate(180deg); }

.acc__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.acc.is-open .acc__body { grid-template-rows: 1fr; }

.acc__inner { overflow: hidden; }

.acc__links {
  list-style: none;
  columns: 2;
  column-gap: 3rem;
  padding: 0 0 1.6rem 4.4rem;
}

.acc__links--1col { columns: 1; }

@media (max-width: 720px) { .acc__links { columns: 1; padding-left: 3rem; } }

.acc__links li { break-inside: avoid; padding: 0.35rem 0; }

.acc__links a {
  color: rgba(237, 240, 255, 0.85);
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.acc__links a::before { content: "\2013"; color: var(--primary); }

.acc__links a:hover { color: #fff; transform: translateX(3px); }

.menu__cta {
  position: absolute;
  right: clamp(1.5rem, 3vw, 2.5rem);
  bottom: 6.2rem;
  z-index: 2;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05rem 1.7rem;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(177, 67, 245, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.menu__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 44px rgba(177, 67, 245, 0.5);
}

.menu__cta svg { width: 20px; }

.menu__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: rgba(0, 5, 26, 0.72);
  padding: 1.15rem clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: rgba(237, 240, 255, 0.85);
}

.menu__bar strong {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Staggered entrance for menu items once the panel has arrived */
.menu .acc, .menu .menu__head, .menu .menu__cta {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu.is-open .menu__head { opacity: 1; transform: none; transition-delay: 0.25s; }
.menu.is-open .acc { opacity: 1; transform: none; }
.menu.is-open .acc:nth-child(1) { transition-delay: 0.32s; }
.menu.is-open .acc:nth-child(2) { transition-delay: 0.39s; }
.menu.is-open .acc:nth-child(3) { transition-delay: 0.46s; }
.menu.is-open .acc:nth-child(4) { transition-delay: 0.53s; }
.menu.is-open .acc:nth-child(5) { transition-delay: 0.60s; }
.menu.is-open .acc:nth-child(6) { transition-delay: 0.67s; }
.menu.is-open .menu__cta { opacity: 1; transform: none; transition-delay: 0.72s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .logos__track { animation: none; }
  .site-head { animation-duration: 0.01ms; animation-delay: 0ms; }
  .whoosh span { animation: none; opacity: 0; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .menu__panel, .menu__backdrop, .acc__body, .menu .acc, .menu .menu__head, .menu .menu__cta { transition: none; }
  .menu .acc, .menu .menu__head, .menu .menu__cta { opacity: 1; transform: none; }
  .bg-swirl--left, .bg-swirl--right { animation: none; }
}
