/* ZIMS Development · navigation, chapter rail, mobile menu, footer */

/* ---------- Brand ---------- */

.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--text); }
.brand__mark { width: 30px; height: auto; flex: none; }
.brand__name {
  display: flex; flex-direction: column; gap: 3px;
  font: 400 1.0625rem/1 var(--font-display);
  letter-spacing: .16em;
}
.brand__name span {
  color: var(--text-3);
  font: 400 .5625rem/1 var(--font-mono);
  letter-spacing: .26em; text-transform: uppercase;
}

/* ---------- Nav bar ---------- */

.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; }
.nav::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(6, 9, 15, .72);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.nav.is-scrolled::before, .nav.is-open::before { opacity: 1; }

.nav__bar {
  position: relative;
  display: flex; align-items: center; gap: 28px;
  height: var(--nav-h);
  transition: height .5s var(--ease);
}
.nav.is-scrolled .nav__bar { height: 64px; }

.nav__links { display: flex; gap: clamp(18px, 2.4vw, 36px); margin-left: auto; }
.nav__links a {
  position: relative;
  padding: 10px 0;
  color: var(--text-2);
  font-size: .9375rem;
  transition: color .3s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--text); }
.nav__links a:hover::after, .nav__links a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle { display: none; width: 44px; height: 44px; margin-left: auto; margin-right: -10px; align-items: center; justify-content: center; }
.nav__toggle-lines { position: relative; width: 22px; height: 10px; }
.nav__toggle-lines i {
  position: absolute; left: 0; right: 0; height: 1.5px; background: var(--text);
  transition: transform .45s var(--ease);
}
.nav__toggle-lines i:first-child { top: 0; }
.nav__toggle-lines i:last-child { bottom: 0; }
.nav.is-open .nav__toggle-lines i:first-child { transform: translateY(4.25px) rotate(45deg); }
.nav.is-open .nav__toggle-lines i:last-child { transform: translateY(-4.25px) rotate(-45deg); }

/* ---------- Mobile menu ---------- */

.menu {
  position: fixed; inset: 0; z-index: -1;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: calc(var(--nav-h) + 32px) var(--gutter) 40px;
  background: rgba(6, 9, 15, .96);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.menu[hidden] { display: none; }
.nav.is-open .menu { opacity: 1; }
.menu__links { display: flex; flex-direction: column; }
.menu__links a {
  display: flex; align-items: baseline; gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font: 300 clamp(1.75rem, 8vw, 2.5rem)/1.1 var(--font-display);
  letter-spacing: -.03em;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.menu__links a span { color: var(--accent); font: 400 .75rem/1 var(--font-mono); letter-spacing: .14em; }
.nav.is-open .menu__links a { opacity: 1; transform: none; }
.nav.is-open .menu__links a:nth-child(2) { transition-delay: .05s; }
.nav.is-open .menu__links a:nth-child(3) { transition-delay: .1s; }
.nav.is-open .menu__links a:nth-child(4) { transition-delay: .15s; }
.nav.is-open .menu__links a:nth-child(5) { transition-delay: .2s; }
.menu__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; color: var(--text-2); }
.menu__foot .btn { margin-bottom: 8px; }

/* Quote request button: always visible, with a count once something is in it. */
.nav__cart {
  position: relative; flex: none;
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--text);
  transition: background-color .3s var(--ease);
}
.nav__cart svg { width: 22px; height: 22px; }
.nav__cart:hover { background: rgba(226, 236, 255, .08); }
.nav__cart-count {
  position: absolute; top: 3px; right: 1px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--on-accent);
  font: 500 .6875rem/18px var(--font-body); text-align: center;
}
.nav__cart-count[hidden] { display: none; }
.nav--solid::before { opacity: 1; }

@media (max-width: 1179px) {
  .nav__links { display: none; }
  .nav__cart { margin-left: auto; }
  .nav__toggle { display: inline-flex; margin-left: 0; }
}
@media (max-width: 959px) {
  .nav__cta { display: none; }
}

/* ---------- Chapter rail ---------- */

.rail {
  position: fixed; right: clamp(14px, 1.6vw, 28px); top: 50%; z-index: 40;
  display: none; flex-direction: column; align-items: flex-end;
  transform: translateY(-50%);
}
.rail a {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  height: 26px; padding-left: 12px;
  color: var(--text-3);
}
.rail a span {
  font: 400 .6875rem/1 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; transform: translateX(8px);
  transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.rail a i {
  width: 14px; height: 1px; background: currentColor;
  transform-origin: right;
  transition: transform .5s var(--ease), background-color .35s var(--ease);
}
.rail a:hover, .rail a:focus-visible { color: var(--text); }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: none; }
.rail a[aria-current="true"] { color: var(--accent); }
.rail a[aria-current="true"] i { transform: scaleX(2); }

@media (min-width: 1180px) and (min-height: 640px) {
  .js-live .rail { display: flex; }
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(rgba(6, 9, 15, .82), var(--canvas) 60%);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--text-3);
  font-size: .9375rem;
}
.footer__top {
  display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 40px clamp(24px, 4vw, 64px);
  padding-block: clamp(56px, 8vw, 96px) 48px;
}
.footer__brand p { max-width: 21rem; margin-top: 22px; color: var(--text-2); }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer__col h2 {
  margin-bottom: 8px;
  color: var(--text-3);
  font: 400 .6875rem/1.4 var(--font-mono);
  letter-spacing: .16em; text-transform: uppercase;
}
.footer__col a, .footer__col p { color: var(--text-2); }
.footer__col a { transition: color .3s var(--ease); }
.footer__col a:hover { color: var(--accent-hover); }

/* Secure payments: the card scheme, 3-D Secure and partner marks, as the payment provider requires.
   Every mark sits on a card of one height with one radius; only the width follows the artwork. */
.pay { padding-block: 36px 30px; border-top: 1px solid var(--line); }
.pay__title {
  color: var(--text-3);
  font: 400 .6875rem/1.4 var(--font-mono);
  letter-spacing: .16em; text-transform: uppercase;
}
.pay__groups { display: flex; flex-wrap: wrap; gap: 26px clamp(24px, 3.4vw, 52px); margin-top: 22px; }
.pay__group h3 { color: var(--text-2); font-size: .8125rem; font-weight: 400; }
.pay__row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pay__card {
  --card-h: 48px;
  display: block;
  height: var(--card-h);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(226, 236, 255, .14);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.pay__card--dark { background: #000; }
.pay__card img { display: block; width: auto; height: 100%; }
a.pay__card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--accent), 0 10px 24px -12px rgba(63, 208, 255, .45); }
.pay__text { display: grid; gap: 6px; margin-top: 26px; max-width: 64rem; font-size: .8125rem; line-height: 1.6; }
.pay__text strong { color: var(--text-2); font-weight: 500; }

@media (max-width: 720px) {
  .pay__card { --card-h: 44px; border-radius: 8px; }
  .pay__groups { gap: 22px; }
}

.footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  padding-block: 22px 32px;
  border-top: 1px solid var(--line);
  font-size: .8125rem;
}
.footer__base a { margin-left: 24px; color: var(--text-2); transition: color .3s var(--ease); }
.footer__base a:first-child { margin-left: 0; }
.footer__base a:hover { color: var(--accent-hover); }

@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer__top { grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
  .footer__col a, .footer__base a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer__col { gap: 0; }
}
