/* Soft Trading — site styles (nav, footer, shared sections) */

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(calc(100% - 32px), 1180px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 8px 18px;
  background: rgba(10, 11, 15, 0.72);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  border: 1px solid var(--line-1);
  border-radius: var(--r-pill);
  transition: box-shadow 220ms ease, border-color 220ms ease;
}
.nav.is-scrolled {
  box-shadow: 0 12px 40px -20px rgba(0,0,0,0.7);
  border-color: var(--line-2);
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: -0.01em; }
.nav__logo {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: radial-gradient(circle at 30% 30%, oklch(0.86 0.13 220), oklch(0.45 0.12 240));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 0 18px -2px var(--accent-cyan-glow);
  position: relative;
}
.nav__logo::after {
  content: '';
  position: absolute; inset: 6px 7px;
  background:
    linear-gradient(to bottom, currentColor 0 100%) 4px 0/2px 100% no-repeat,
    linear-gradient(to bottom, currentColor 0 100%) 9px 4px/2px 50% no-repeat;
  color: rgba(255,255,255,0.85);
  border-radius: 1px;
}
.nav__links { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; align-items: center; }

/* ===== Gradient pill menu items ===== */
.nav-pill {
  --pill-size: 38px;
  --pill-expanded: 158px;
  list-style: none;
}
.nav-pill > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--pill-size);
  height: var(--pill-size);
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--fg-1);
  overflow: hidden;
  cursor: pointer;
  transition: width 480ms cubic-bezier(0.4, 0, 0.2, 1), background 240ms ease, box-shadow 480ms ease, color 240ms ease;
}
.nav-pill > a::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-1);
  border-radius: inherit;
  pointer-events: none;
  z-index: 4;
  transition: opacity 300ms ease;
}

/* Gradient fill on hover */
.nav-pill__gradient {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(45deg, var(--gfrom), var(--gto));
  opacity: 0;
  transition: opacity 460ms ease;
  z-index: 1;
}
/* Blur glow beneath */
.nav-pill__glow {
  position: absolute;
  top: 8px;
  left: 0; right: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(45deg, var(--gfrom), var(--gto));
  filter: blur(14px);
  opacity: 0;
  z-index: 0;
  transition: opacity 460ms ease;
  pointer-events: none;
}
/* Icon (scales out on hover) */
.nav-pill__icon {
  position: relative;
  z-index: 2;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--fg-1);
  transition: transform 360ms cubic-bezier(0.4, 0, 0.2, 1), opacity 240ms ease;
  transition-delay: 0ms;
}
.nav-pill__icon svg { width: 18px; height: 18px; }
/* Label (scales in on hover, hidden by default) */
.nav-pill__label {
  position: absolute;
  z-index: 2;
  color: white;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: scale(0);
  transition: transform 360ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  white-space: nowrap;
}

/* Hover state */
.nav-pill:hover > a {
  width: var(--pill-expanded);
  box-shadow: none;
  color: white;
}
.nav-pill:hover > a::before { opacity: 0; }
.nav-pill:hover .nav-pill__gradient { opacity: 1; }
.nav-pill:hover .nav-pill__glow { opacity: 0.55; }
.nav-pill:hover .nav-pill__icon {
  transform: scale(0);
  transition-delay: 0ms;
}
.nav-pill:hover .nav-pill__label {
  transform: scale(1);
  transition-delay: 140ms;
}

/* Light theme: light pill base + slightly stronger border */
html[data-theme="light"] .nav-pill > a {
  background: var(--bg-1);
  color: var(--fg-1);
}
html[data-theme="light"] .nav-pill > a::before {
  border-color: rgba(15, 20, 35, 0.10);
}
html[data-theme="light"] .nav-pill:hover > a {
  box-shadow: 0 6px 24px -8px rgba(15, 20, 35, 0.20);
}

/* Reduce-motion: shorten the expand */
html[data-animations="off"] .nav-pill > a,
html[data-animations="off"] .nav-pill__gradient,
html[data-animations="off"] .nav-pill__glow,
html[data-animations="off"] .nav-pill__icon,
html[data-animations="off"] .nav-pill__label { transition-duration: 0ms !important; }
.nav__cta { display: flex; gap: 8px; align-items: center; }
.nav__cta .btn { padding: 9px 16px; font-size: 13px; }

.nav__progress {
  position: absolute;
  bottom: -1px; left: 12px; right: 12px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 80ms linear;
  border-radius: 1px;
  opacity: 0.6;
}

@media (max-width: 880px) {
  .nav__links { display: none; }
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--line-1);
  padding: 80px 0 40px;
  margin-top: 80px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.4));
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__col a { color: var(--fg-1); font-size: 14px; transition: color 140ms ease; }
.footer__col a:hover { color: var(--fg-0); }
.footer__brand p { font-size: 14px; color: var(--fg-2); max-width: 280px; line-height: 1.6; }
.footer__brand .nav__brand { margin-bottom: 18px; }

.footer__disclaimer {
  border: 1px solid var(--line-1);
  border-left: 2px solid var(--accent-cyan);
  border-radius: var(--r-2);
  padding: 16px 20px;
  background: var(--bg-1);
  margin-bottom: 32px;
}
.footer__disclaimer p {
  font-size: 12.5px;
  color: var(--fg-2);
  margin: 0;
  line-height: 1.6;
}
.footer__disclaimer strong { color: var(--fg-1); font-weight: 500; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line-1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.footer__bottom .links { display: flex; gap: 24px; }
@media (max-width: 600px) {
  .footer__bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ===== Page header (sub-pages) ===== */
.page-header {
  padding: 160px 0 60px;
  border-bottom: 1px solid var(--line-1);
  position: relative;
}
.page-header__crumb {
  display: flex; gap: 8px; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-3); margin-bottom: 18px;
}
.page-header__crumb a:hover { color: var(--fg-1); }
.page-header h1 { max-width: 18ch; }
.page-header__lede { color: var(--fg-1); max-width: 60ch; margin-top: 18px; font-size: 17px; line-height: 1.55; }
