/* ============================================================
   Novlogics — Shared brand stylesheet
   Apple-clinical system. Loaded by every page.
   Tokens live in novlogics-tokens.css; this file defines the
   base type scale, components, and motion built on those tokens.
   ============================================================ */

@import url("brand_assets/novlogics-logo/brand/novlogics-tokens.css");

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--nl-font-body);
  background: var(--nl-bg);
  color: var(--nl-ink-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

/* ── Type roles ──
   Display = Inter Tight, heavy, tight negative tracking (the Apple/SF feel).
   Tracking tightens as size grows via the size-specific utilities below. */
.nl-display {
  font-family: var(--nl-font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--nl-ink);
}
.nl-display-xl { letter-spacing: -0.045em; line-height: 1.02; }
.nl-display-lg { letter-spacing: -0.04em;  line-height: 1.05; }

.nl-eyebrow {
  font-family: var(--nl-font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nl-teal);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.nl-eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: currentColor;
}

.nl-mono {
  font-family: var(--nl-font-mono);
  font-feature-settings: "tnum" 1;
}

/* Tabular numerals for every metric / clinical value so digits align. */
.nl-tnum { font-variant-numeric: tabular-nums; }

.nl-num {
  font-family: var(--nl-font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ── Focus: one teal ring, everywhere ── */
:focus-visible {
  outline: 2px solid var(--nl-teal);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Buttons — full pill, Apple-style ── */
.nl-btn {
  --btn-y: 0.85rem;
  --btn-x: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--btn-y) var(--btn-x);
  border-radius: 980px;
  border: 1px solid transparent;
  font-family: var(--nl-font-body);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.22s ease-out,
    border-color 0.22s ease-out,
    color 0.22s ease-out,
    transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.nl-btn:active { transform: translateY(0); }

/* On light surfaces */
.nl-btn-primary { background: var(--nl-ink); color: #fff; }
.nl-btn-primary:hover { background: var(--nl-deep); transform: translateY(-1px); }
.nl-btn-ghost { border-color: var(--nl-hairline); color: var(--nl-ink); background: transparent; }
.nl-btn-ghost:hover { border-color: var(--nl-ink); transform: translateY(-1px); }

/* On deep/dark surfaces */
.nl-btn-light { background: #fff; color: var(--nl-ink); }
.nl-btn-light:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(0,0,0,0.28); }
.nl-btn-onDark-ghost { border-color: rgba(255,255,255,0.22); color: rgba(255,255,255,0.85); background: transparent; }
.nl-btn-onDark-ghost:hover { border-color: rgba(255,255,255,0.55); color: #fff; transform: translateY(-1px); }

/* ── Links ── */
.nl-link {
  color: var(--nl-teal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  transition: gap 0.22s cubic-bezier(0.16,1,0.3,1), color 0.22s ease-out;
}
.nl-link:hover { gap: 0.65rem; color: var(--nl-teal-deep); }
.nl-link .nl-arrow { transition: transform 0.22s cubic-bezier(0.16,1,0.3,1); }
.nl-link:hover .nl-arrow { transform: translateX(2px); }

/* ── Cards — one radius, soft cool-tinted layered shadow ── */
.nl-card {
  background: #fff;
  border: 1px solid var(--nl-hairline);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(8,19,31,0.04),
    0 10px 30px -8px rgba(8,19,31,0.06);
  transition:
    transform 0.28s cubic-bezier(0.16,1,0.3,1),
    box-shadow 0.28s ease-out,
    border-color 0.28s ease-out;
}
.nl-card-interactive:hover {
  transform: translateY(-3px);
  border-color: rgba(0,161,154,0.35);
  box-shadow:
    0 2px 4px rgba(8,19,31,0.05),
    0 22px 44px -14px rgba(8,19,31,0.14);
}

/* ── The signature: signal rule (the teal gradient line on every report) ── */
.nl-rule {
  height: 2px;
  border: 0;
  background: linear-gradient(90deg,
    var(--nl-teal) 0%,
    var(--nl-teal-bright) 55%,
    rgba(20,195,186,0.12) 100%);
}

/* ── Scroll reveal (transform/opacity only) ── */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease-out,
    transform 0.7s cubic-bezier(0.16,1,0.3,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ── The hero signal-arc, drawn once on load ── */
.arc-draw {
  stroke-dasharray: var(--arc-len, 1200);
  stroke-dashoffset: var(--arc-len, 1200);
  animation: arc-in 1.8s cubic-bezier(0.16,1,0.3,1) 0.35s forwards;
}
@keyframes arc-in { to { stroke-dashoffset: 0; } }

/* Load-in for hero copy (staggered via inline delay) */
.rise {
  opacity: 0;
  transform: translateY(20px);
  animation: rise-in 0.8s cubic-bezier(0.16,1,0.3,1) forwards;
  animation-delay: var(--rise-delay, 0ms);
}
@keyframes rise-in { to { opacity: 1; transform: none; } }

/* ── Mobile nav overlay ── */
.mobile-nav-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}
.mobile-nav-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-nav-panel {
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav-overlay.open .mobile-nav-panel { transform: translateX(0); }

/* ── Reduced motion: collapse everything to static ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .arc-draw { stroke-dashoffset: 0; animation: none; }
  .rise { opacity: 1; transform: none; animation: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
