/* Nexus demo — design tokens, components and motion.
   Source of truth for the look: the Paper file "Nexus · Landing mockup". */

@font-face { font-family: "Manrope"; src: url("assets/fonts/Manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("assets/fonts/SourceSerif4-Italic.woff2") format("woff2"); font-style: italic; font-weight: 200 900; font-display: swap; }

:root {
  --page: #0B0B0C; --app: #0F1011; --panel: #17181A; --raised: #1C1D1F; --row: #1F2023; --row-2: #2A2B2E;
  --line: rgba(255,255,255,0.08); --line-2: rgba(255,255,255,0.16); --line-3: rgba(255,255,255,0.4);
  --ink: #FFFFFF; --muted: #9A9CA0; --label: #B4B6BA; --chip-ink: #D5D7DA;
  --btn: #FFFFFF; --btn-ink: #0B0B0C;
  --teal: #2C4F6E; --teal-ink: #DCEBF6; --accent: #6FA3A8; /* "teal" is now the X-ray blue tag colour */
  --glass: #FFFFFF38; --glass-hover: #FFFFFF4D; --glass-line: #FFFFFF8C; --glass-shine: rgba(255,255,255,0.35); --glass-ink: #FFFFFF;
  --navy: #0B2440; --navy-2: #123A63; --navy-3: #1B4F7D;
  --sidebar: #0B0B0C;
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --sans: "Manrope", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --page: #FAFAF7; --app: #FAFAF7; --panel: #FFFFFF; --raised: #FFFFFF; --row: #F1F1EC; --row-2: #E9E9E3;
  --line: rgba(17,18,19,0.1); --line-2: rgba(17,18,19,0.2); --line-3: rgba(17,18,19,0.45);
  --ink: #1C1D1F; --muted: #63656A; --label: #55575B; --chip-ink: #2B2C2F;
  --btn: #111213; --btn-ink: #FFFFFF;
  --glass: rgba(17,18,19,0.10); --glass-hover: rgba(17,18,19,0.16); --glass-line: rgba(17,18,19,0.35); --glass-shine: #FFFFFF99; --glass-ink: #1C1D1F;
  --sidebar: #F1F1EC;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 300; letter-spacing: -0.03em; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--teal); color: var(--teal-ink); }
.no-trans, .no-trans * { transition: none !important; }
/* Moving between pages: the old page fades out as the new one fades in, instead of a hard cut. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out 220ms ease both; }
::view-transition-new(root) { animation: page-in 380ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
/* The theme switch draws its own circle, so the page fade stays out of its way. */
:root.no-trans::view-transition-old(root), :root.no-trans::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

.serif { font-family: var(--serif); font-style: italic; color: var(--muted); letter-spacing: 0; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.tabnum { font-variant-numeric: tabular-nums; }

/* Logo: two transparent PNGs cut from the client's logo file, white for dark surfaces and full colour for light */
.logo { display: block; width: 154px; height: 36px; background: url("assets/logo-white.png") center / contain no-repeat; }
:root[data-theme="light"] .logo { background-image: url("assets/logo-color.png"); }
.logo.on-photo, :root[data-theme="light"] .nav:not(.is-stuck) .logo { background-image: url("assets/logo-white.png"); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: scale 150ms ease-out, background-color 150ms ease, border-color 150ms ease; }
.btn:active { scale: 0.96; }
/* Primary buttons are frosted glass: white-translucent on dark, dark-translucent on light */
.btn-primary { background: var(--glass); color: var(--glass-ink); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-shine); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: var(--glass-hover); } }
.btn-outline { border: 1px solid var(--line-3); }
.btn-on-photo { background: #FFFFFF; color: #0B0B0C; }
.btn-outline-on-photo { border: 1px solid rgba(255,255,255,0.5); color: #FFFFFF; }
.btn svg { transition: translate 200ms var(--ease-out); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-2); position: relative; transition: scale 150ms ease-out, border-color 150ms ease; }
.icon-btn:active { scale: 0.96; }
.link { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); }
/* Section label: a quiet dot-and-text marker, so it never reads as a button */
.pill { display: inline-flex; align-items: center; gap: 8px; color: var(--label); font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: 0.01em; }
.pill::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; background: var(--row-2); color: var(--chip-ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-teal { background: var(--teal); color: var(--teal-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover, .icon-btn:hover { border-color: var(--ink); }
  .btn-outline-on-photo:hover { border-color: #FFFFFF; }
  .btn:hover svg { translate: 3px 0; }
}

/* Theme toggle: sun and moon cross-fade with a quarter turn */
.theme-toggle svg { position: absolute; transition: opacity 200ms ease, rotate 300ms var(--ease-out), scale 300ms var(--ease-out); }
.theme-toggle .sun { opacity: 0; rotate: -90deg; scale: 0.6; }
:root[data-theme="light"] .theme-toggle .sun { opacity: 1; rotate: 0deg; scale: 1; }
:root[data-theme="light"] .theme-toggle .moon { opacity: 0; rotate: 90deg; scale: 0.6; }

/* Toast */
.toasts { position: fixed; right: 28px; bottom: 28px; z-index: 40; display: grid; gap: 10px; justify-items: end; }
.toast { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 16px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0,0,0,0.35); font-size: 14px; font-weight: 500; animation: toast-in 280ms var(--ease-out) both; }
.toast.is-out { animation: toast-out 180ms ease-in both; }
.toast .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); }
.toast button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-3); font-size: 13px; font-weight: 600; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.demo-note { font-size: 12px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .ghost { transform: translate(-50%, 0); }
  .strip-track { transform: none; }
}

[hidden] { display: none !important; }

/* Language switch (added by shared.js beside each theme button) */
.lang-switch { display: inline-grid; place-items: center; font-size: 12px; line-height: 1; font-weight: 600; letter-spacing: 0.04em; text-decoration: none; }

/* Filled buttons turn the heartbeat blue under the pointer, on every page. */
.btn.btn-primary, .btn.btn-glass { transition: scale 150ms ease-out, background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
@media (hover: hover) and (pointer: fine) {
  .btn.btn-primary:not(:disabled):hover, .btn.btn-glass:not(:disabled):hover { background: #6FA3A8; border-color: #6FA3A8; color: #0B0B0C; }
}
