/* ============================================================
   NEXUM — Chrome: transition banner, navigation, footer
   ============================================================ */

/* ---------- Transition banner (persistent, not dismissible) ---------- */
.banner {
  position: fixed; inset-block-start: 0; inset-inline: 0;
  z-index: 90;
  min-height: var(--banner-h);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--fg-2);
}
.banner__inner {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0.35rem 1rem;
  padding: 0.55rem var(--gutter);
  font-size: var(--t-small);
  line-height: 1.45;
  text-align: center;
}
.banner__mark {
  font-family: var(--font-mono); font-size: var(--t-mono);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.banner__lead { color: var(--fg-1); font-weight: 600; }
.banner__sub { color: var(--fg-3); }
.banner__link {
  display: inline-flex; align-items: center; gap: 0.4em;
  color: var(--accent); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.banner__link:hover { border-bottom-color: var(--accent-line); }
.banner__link svg { width: 0.85em; height: 0.85em; }

@media (max-width: 860px) {
  .banner__sub { display: none; }
}
@media (max-width: 700px) {
  .banner__inner { flex-direction: column; gap: 0.15rem; padding-block: 0.5rem; }
  .banner__mark { display: none; }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset-block-start: var(--banner-h);
  inset-inline: 0;
  z-index: 80;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease),
              backdrop-filter 0.35s var(--ease);
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: 100%; max-width: var(--w-wide); margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.05em;
  text-decoration: none; flex-shrink: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.06rem; letter-spacing: 0.30em;
  color: var(--fg-1);
}
.brand__mark { width: 1.15em; height: 0.96em; margin-inline: 0.06em 0.24em; }
.brand__mark path { stroke: var(--accent); }

.nav__links {
  display: flex; align-items: center; gap: 0.15rem;
  margin-inline-start: auto;
  list-style: none;
}
.nav__link {
  display: inline-block;
  padding: 0.5rem 0.7rem;
  font-size: 0.875rem;
  color: var(--fg-2);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: color 0.2s var(--ease);
  position: relative;
}
.nav__link:hover { color: var(--fg-1); }
.nav__link[aria-current="true"] { color: var(--accent); }
.nav__link[aria-current="true"]::after {
  content: ""; position: absolute;
  inset-inline: 0.7rem; inset-block-end: 0.15rem;
  height: 1px; background: var(--accent);
}

.nav__tools { display: flex; align-items: center; gap: 0.5rem; margin-inline-start: 0.5rem; }

.switch {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-med);
  border-radius: 999px;
  padding: 2px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.switch__opt {
  min-width: 34px; height: 28px;
  padding-inline: 0.45rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-3);
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease);
}
.switch__opt[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.switch__opt:hover:not([aria-pressed="true"]) { color: var(--fg-1); }

.theme-toggle {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-med); border-radius: 999px;
  color: var(--fg-2);
  transition: border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.theme-toggle:hover { color: var(--fg-1); border-color: var(--line-strong); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav__cta { padding: 0.6rem 1.15rem; min-height: 40px; }
.nav__cta--demo {
  opacity: 0; visibility: hidden; width: 0; padding-inline: 0; overflow: hidden;
  transition: opacity 0.3s var(--ease), width 0.3s var(--ease), padding 0.3s var(--ease);
}
.nav__cta--demo.is-shown { opacity: 1; visibility: visible; width: auto; padding-inline: 1.15rem; }

.nav__burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-med); border-radius: var(--r-sm);
  color: var(--fg-1);
}
.nav__burger span {
  display: block; width: 17px; height: 1.5px; background: currentColor;
  position: relative; transition: background-color 0.2s var(--ease);
}
.nav__burger span::before, .nav__burger span::after {
  content: ""; position: absolute; inset-inline: 0; height: 1.5px; background: currentColor;
  transition: transform 0.28s var(--ease);
}
.nav__burger span::before { top: -5px; }
.nav__burger span::after  { top: 5px; }
.nav__burger[aria-expanded="true"] span { background: transparent; }
.nav__burger[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span::after  { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Mobile drawer ---------- */
.drawer {
  position: fixed;
  inset-block-start: calc(var(--banner-h) + var(--nav-h));
  inset-block-end: 0; inset-inline: 0;
  z-index: 79;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--gutter) 2.5rem;
  overflow-y: auto;
  display: none;
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}
.drawer.is-open { display: block; opacity: 1; }
.drawer__list { list-style: none; display: flex; flex-direction: column; }
.drawer__link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.35rem; letter-spacing: -0.02em;
  color: var(--fg-1); text-decoration: none;
}
.drawer__link[aria-current="true"] { color: var(--accent); }
.drawer__link .idx { font-family: var(--font-mono); font-size: var(--t-mono); color: var(--fg-4); letter-spacing: 0.1em; }
.drawer__foot { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.drawer__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.drawer__row .mono { color: var(--fg-3); }

@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__cta--demo { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__tools { margin-inline-start: auto; }
}
@media (max-width: 520px) {
  .nav__cta { display: none; }
}

body.is-locked { overflow: hidden; }

/* ---------- Footer ---------- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: clamp(3.5rem, 2rem + 5vw, 6rem) 2rem;
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(120px, 1fr));
  gap: clamp(1.75rem, 3vw, 3rem);
  padding-bottom: clamp(2.5rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.footer__brand .brand { font-size: 1rem; margin-bottom: 1.1rem; }
.footer__claim { color: var(--fg-2); font-size: var(--t-small); max-width: 32ch; }
.footer__origin { margin-top: 1.25rem; }
.footer__col h3 {
  font-family: var(--font-mono); font-size: var(--t-mono); font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3);
  margin-bottom: 1.1rem;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer__col a {
  font-size: var(--t-small); color: var(--fg-2); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.4em;
}
.footer__col a:hover { color: var(--accent); }
.footer__col a svg { width: 0.8em; height: 0.8em; opacity: 0.7; }

.footer__contact { padding-block: 2rem; border-bottom: 1px solid var(--line); }
.footer__contact dl {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.25rem 2rem;
}
.footer__contact dt {
  font-family: var(--font-mono); font-size: var(--t-mono); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-4); margin-bottom: 0.35rem;
}
.footer__contact dd { font-size: var(--t-small); color: var(--fg-2); line-height: 1.6; }
.footer__contact dd a { color: var(--fg-1); text-decoration: none; border-bottom: 1px solid var(--line-med); }
.footer__contact dd a:hover { color: var(--accent); border-bottom-color: var(--accent-line); }

.footer__disclaimer {
  padding-block: 1.75rem;
  font-size: var(--t-small);
  color: var(--fg-2);
  max-width: 78ch;
  line-height: 1.65;
}
.footer__bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.75rem;
  justify-content: space-between;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; list-style: none; }
.footer__legal a { font-size: var(--t-small); color: var(--fg-3); text-decoration: none; }
.footer__legal a:hover { color: var(--accent); }
.footer__copy { font-size: var(--t-small); color: var(--fg-3); }

@media (max-width: 980px) {
  .footer__top { grid-template-columns: repeat(2, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
}

/* Legal links leave the site — small, consistent signal */
.footer__legal a {
  display: inline-flex; align-items: center; gap: 0.35em;
}
.footer__legal a svg { width: 0.72em; height: 0.72em; opacity: 0.55; flex-shrink: 0; }
.footer__legal a:hover svg { opacity: 1; }
