/* ============================================================
   NEXORA · Base / Global — Apple Minimal
   No gradients, no grid lines, no glows.
   ============================================================ */

html { background: var(--bg-page); overflow-x: hidden; }

body {
  background: var(--bg-page);
  background-attachment: scroll;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
  overflow-x: hidden;
}

/* Scrollbar — minimal */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: #d2d2d7; border-radius: var(--radius-full); border: none; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2c2c2e; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a6; }

/* Focus — Apple-like */
:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout primitives --------------------------- */

.container { width: min(100% - (var(--container-pad) * 2), var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - (var(--container-pad) * 2), var(--container-narrow)); margin-inline: auto; }
.section { position: relative; padding-block: var(--section-pad); }
.section-alt { background: var(--bg-page); }

/* Section heading block */
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lead { margin-top: var(--space-5); }
.section-head.center .lead { margin-inline: auto; }

/* Eyebrow label — flat pill */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 0.4rem 0.9rem;
  border: none;
  border-radius: var(--radius-full);
  background: #f5f5f7;
  margin-bottom: var(--space-5);
  box-shadow: none;
  backdrop-filter: none;
}

[data-theme="dark"] .eyebrow { background: #1c1c1e; }

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-2);
  box-shadow: none;
  animation: none;
}

/* ---------- Icon primitives ------------------------------ */

.icon { width: 1.1em; height: 1.1em; flex: none; color: currentColor; }
.icon use { pointer-events: none; }
.icon-sm { width: 0.95em; height: 0.95em; }
.icon-lg { width: 1.4em; height: 1.4em; }
.icon-xl { width: 1.8em; height: 1.8em; }

/* ---------- Decorative helpers — disabled --------------- */

.orb { display: none; }

.grid-lines {
  display: none;
}

.hr-fade {
  height: 1px;
  border: 0;
  background: #f5f5f7;
}

[data-theme="dark"] .hr-fade { background: #1c1c1e; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: -100%; left: 1rem; z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--bg-elevated);
  color: var(--text-1);
  border: none;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease-out);
}

.skip-link:focus { top: 1rem; }

[id] { scroll-margin-top: 96px; }
.no-scroll { overflow: hidden; }

/* ---------- Reveal-on-scroll system ---------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--rd, 0s);
  will-change: opacity, transform;
}

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

/* ---------- Keyframes ------------------------------------ */

@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes float-y { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
@keyframes marquee-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes dash-move { to { stroke-dashoffset: -240; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes orbit {
  from { transform: rotate(0deg) translateX(var(--orbit-r, 120px)) rotate(0deg) translate(-50%, -50%); }
  to { transform: rotate(360deg) translateX(var(--orbit-r, 120px)) rotate(-360deg) translate(-50%, -50%); }
}
@keyframes node-travel {
  0%, 12% { color: var(--text-1); box-shadow: none; }
  26%, 100% { color: var(--text-2); box-shadow: none; }
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes refresh-item { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes scan-y { 0% { top: 6%; opacity: 0; } 12% { opacity: 0.3; } 88% { opacity: 0.3; } 100% { top: 94%; opacity: 0; } }

@keyframes popupIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes popupOut {
  from { opacity: 1; transform: none; filter: none; }
  to { opacity: 0; transform: translateY(4px) scale(0.98); filter: blur(4px); }
}

/* ---------- Reduced motion -------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
