/* ============================================================================
   novustech.dev — site styles. Every value derives from tokens.css.
   Mobile-first; dark parity via BOTH [data-theme="dark"] and the OS media query.
   ========================================================================== */

html { scroll-padding-top: 5rem; scroll-behavior: smooth; }

/* ------------------------------------------------------------------ header */
.appbar { position: sticky; top: 0; z-index: 40; }
.brandlock { text-decoration: none; color: inherit; }
.brandlock .appname { color: var(--text); }
.applinks { display: none; align-items: center; gap: var(--space-5); }
.applinks a { color: var(--text-secondary); text-decoration: none; font-weight: var(--weight-medium); font-size: var(--text-sm); }
.applinks a:hover { color: var(--text); text-decoration: none; }
.appnav__inner a { display: inline-block; padding: .75rem var(--space-2); color: var(--text-secondary); text-decoration: none; font-weight: var(--weight-medium); font-size: var(--text-sm); white-space: nowrap; }
.appnav__inner a:hover { color: var(--text); text-decoration: none; }
@media (min-width: 900px) {
  .applinks { display: flex; }
  .appnav { display: none; }
}

.themetoggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; flex: 0 0 auto;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  color: var(--text-secondary); cursor: pointer; transition: border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.themetoggle:hover { border-color: var(--accent); color: var(--text); }
.themetoggle svg { width: 20px; height: 20px; }
html.js .themetoggle { display: inline-flex; }
.tt-sun { display: none; } .tt-moon { display: block; }
[data-theme="dark"] .tt-sun { display: block; } [data-theme="dark"] .tt-moon { display: none; }
[data-theme="light"] .tt-sun { display: none; } [data-theme="light"] .tt-moon { display: block; }

/* ---------------------------------------------------------------- sections */
.section { padding-block: var(--space-8); }
.band { background: var(--bg-subtle); }
.eyebrow { margin: 0 0 var(--space-2); font-size: var(--text-xs); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--accent-text); }
.section h2 { font-size: var(--text-3xl); line-height: var(--lh-3xl); }
.lede { font-size: var(--text-md); line-height: var(--lh-md); color: var(--text-secondary); max-width: 60ch; }
.small { font-size: var(--text-sm); }
@media (min-width: 760px) {
  .section { padding-block: var(--space-9); }
  .section h2 { font-size: var(--text-4xl); line-height: var(--lh-4xl); }
}

/* ------------------------------------------------------------- pictographs */
.vlogo .vmark { color: var(--accent-text); }
[data-theme="dark"] .vlogo .vmark { color: var(--blue-300); }

/* -------------------------------------------------------------------- hero
   Authored dark (canonical title design): fixed blue-ramp colours, identical
   in both themes — kicker blue-300, secondary blue-100, primary white. */
.hero { background: var(--blue-900); color: #FFFFFF; }
.hero__inner { display: grid; gap: var(--space-7); padding-block: var(--space-8); }
.hero__eyebrow { color: var(--blue-300); }
.hero__title { color: #FFFFFF; font-size: clamp(2.25rem, 5.5vw, 3.75rem); line-height: 1.08; margin-bottom: var(--space-4); }
.hero__lede { color: var(--blue-100); font-size: var(--text-lg); line-height: var(--lh-lg); max-width: 54ch; }
.hero__sub { color: var(--blue-300); max-width: 58ch; margin-bottom: var(--space-5); }
.hero .btn--secondary { color: var(--blue-100); border-color: var(--blue-700); }
.hero .btn--secondary:hover { background: color-mix(in srgb, var(--blue-400) 16%, transparent); border-color: var(--blue-400); }
.hero .wm .nm { color: var(--blue-200); }
.hero .wm .sf { color: var(--blue-300); }
.hero .vlogo .vmark { color: var(--blue-300); }
@media (min-width: 980px) {
  .hero__inner { grid-template-columns: 1.05fr .95fr; align-items: center; gap: var(--space-8);
    min-height: min(820px, calc(100vh - 3.5rem)); }
}

.npmchip { display: inline-flex; align-items: center; gap: var(--space-4); max-width: 100%;
  margin-top: var(--space-5); padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--blue-800) 42%, var(--blue-900));
  border: 1px solid var(--blue-700); border-radius: var(--radius-md); cursor: pointer;
  transition: border-color var(--dur) var(--ease-out); }
.npmchip:hover { border-color: var(--blue-400); }
.npmchip__cmd { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--blue-100); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npmchip__hint { font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--blue-300); }

/* -------------------------------------------------- hero switchboard (sig.) */
.sb { display: flex; flex-direction: column; gap: var(--space-3); }
.sb__verticals { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.sb__modules { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
.sb__tile { display: flex; align-items: center; justify-content: center; padding: var(--space-3) var(--space-2);
  background: color-mix(in srgb, var(--blue-800) 42%, var(--blue-900));
  border: 1px solid var(--blue-800); border-radius: var(--radius-md); }
.sb .vlogo { gap: .4rem; }
.sb .vlogo .vmark { height: 1.3rem; width: 1.3rem; }
.sb .wm { font-size: var(--text-base); }
.sb__rails { display: none; }
.sb__ai { position: relative; display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap;
  padding: var(--space-4) var(--space-5);
  background: color-mix(in srgb, var(--blue-800) 42%, var(--blue-900));
  border: 1px solid var(--blue-700); border-radius: var(--radius-md); }
.sb__aitag { color: var(--blue-300); font-size: var(--text-sm); }
.sb__caption { margin: var(--space-1) 0 0; color: var(--blue-300); font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide); text-transform: uppercase; }
@media (min-width: 560px) {
  .sb__verticals { grid-template-columns: repeat(4, 1fr); }
  .sb__modules { grid-template-columns: repeat(3, 1fr); }
  .sb__rails { display: grid; height: 42px; }
  .sb__rails--4 { grid-template-columns: repeat(4, 1fr); }
  .sb__rails--3 { grid-template-columns: repeat(3, 1fr); }
}
.rail { position: relative; justify-self: center; width: 2px; height: 100%;
  background: color-mix(in srgb, var(--blue-400) 30%, transparent); border-radius: 1px; }
.rail::after { content: ""; position: absolute; left: 50%; translate: -50% 0; top: -3px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue-300);
  animation: pipdrop 2.8s var(--ease-in-out) infinite; animation-delay: var(--pd, 0s); }
@keyframes pipdrop {
  0% { top: -3px; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: calc(100% - 4px); opacity: 0; }
}

/* AI pips — canonical pulse, staggered .5s (tokens.css §D3) */
.aipip { position: absolute; top: 0; transform: translateY(-50%); width: 9px; height: 9px;
  border-radius: 50%; background: var(--blue-300);
  animation: novapulse2 2.4s var(--ease-in-out) infinite; animation-delay: var(--pp, 0s); }
.aipip:nth-child(1) { left: 20%; }
.aipip:nth-child(2) { left: 50%; }
.aipip:nth-child(3) { left: 80%; }
.aipip--accent { background: var(--accent-text); }
@keyframes novapulse2 {
  0%, 100% { transform: translateY(-50%) scale(1); opacity: .55; }
  50% { transform: translateY(-50%) scale(1.5); opacity: 1; }
}

/* ------------------------------------------------------------------- cards */
.cards { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.cards .card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); }
.cards .card p { margin: 0; }
.cards .card h3 { margin: 0; }
@media (min-width: 560px) { .cards--4, .cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards--4 { grid-template-columns: repeat(4, 1fr); } .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.cards--kit { grid-template-columns: 1fr; }
@media (min-width: 900px) { .cards--kit { grid-template-columns: repeat(3, 1fr); } }
.vcard__tag { color: var(--text-secondary); font-size: var(--text-sm); margin: 0; }
.cardlink { margin-top: auto; color: var(--accent-text); font-weight: var(--weight-medium); font-size: var(--text-sm); }

/* -------------------------------------------------------- modular components */
.arch { display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.arch__row { display: grid; gap: var(--space-3); }
@media (min-width: 760px) { .arch__row { grid-template-columns: repeat(3, 1fr); } }
.arch__tile { position: relative; display: flex; flex-direction: column; gap: var(--space-2);
  text-decoration: none; color: inherit; }
.arch__tile:hover { text-decoration: none; }
.arch__tag { color: var(--text-secondary); font-size: var(--text-sm); }
.arch__band { position: relative; display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap;
  padding: var(--space-4) var(--space-5); background: var(--accent-subtle);
  border: 1px solid var(--accent); border-radius: var(--radius-lg); }
.arch__band .arch__tag { color: var(--accent-text); }

/* --------------------------------------------------------------- design kit */
.kitver { vertical-align: middle; margin-left: var(--space-2); }
.tokgrid { display: grid; grid-template-columns: 1fr; gap: var(--space-2); }
@media (min-width: 420px) { .tokgrid { grid-template-columns: repeat(2, 1fr); } }
.tok { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: var(--space-2);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  font: inherit; font-size: var(--text-xs); color: var(--text-secondary); cursor: pointer; text-align: left;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); }
.tok:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); border-color: var(--accent); }
.tok__chip { width: 22px; height: 22px; flex: 0 0 auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.tok__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tok code { color: var(--text); white-space: nowrap; }
.tok__hex { font-family: var(--font-mono); white-space: nowrap; }

.spec { margin: 0 0 var(--space-2); }
.spec--display { font-size: var(--text-display); line-height: 1; font-weight: var(--weight-bold);
  color: var(--accent-text); margin-bottom: var(--space-1); }
.spec--xl { font-size: var(--text-xl); line-height: var(--lh-xl); font-weight: var(--weight-bold); }
.spec--mono { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-secondary); }
.demo-row { margin-top: var(--space-1); }
.demo-stats { margin-top: var(--space-2); }
.foundations { margin-top: var(--space-6); }
@media (min-width: 560px) { .foundations { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .foundations { grid-template-columns: repeat(4, 1fr); } }

/* ---------------------------------------------------------------- terminal */
.term { display: grid; gap: .4rem; margin: var(--space-2) 0 var(--space-2);
  padding: var(--space-4); background: var(--blue-900); border: 1px solid var(--blue-800);
  border-radius: var(--radius-md); overflow-x: auto; }
.term code { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--blue-100); white-space: nowrap; }
.term .term__dim { color: var(--blue-300); }

/* ------------------------------------------------------------------- stats */
.bigstats { margin-top: var(--space-6); }
.bigstats .stat__value { font-size: var(--text-4xl); line-height: 1.05; }
.bigstats .stat__value span { color: var(--accent-text); }

/* ------------------------------------------------------------------ footer */
.foot { background: var(--surface); border-top: 1px solid var(--border); padding-block: var(--space-7) var(--space-6); }
.foot-cta h2 { margin-bottom: var(--space-2); }
.foot-cta p { margin: 0; max-width: 52ch; }
.foot__cols { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot__cols { grid-template-columns: repeat(3, 1fr); } }
.foot h4 { margin-bottom: var(--space-3); }
.foot__base { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  margin-top: var(--space-7); flex-wrap: wrap; }

/* -------------------------------------------------------------- copy toast */
.copytoast { position: fixed; left: 50%; bottom: var(--space-5); z-index: 60;
  translate: -50% 8px; opacity: 0; pointer-events: none;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  background: var(--neutral-800); color: var(--neutral-0); font-size: var(--text-sm);
  transition: opacity var(--dur) var(--ease-out), translate var(--dur) var(--ease-out); }
.copytoast.show { opacity: 1; translate: -50% 0; }

/* ------------------------------------------------------------ scroll reveal
   Gated behind html.js so content is always visible without JavaScript.
   prefers-reduced-motion collapses the transition via the tokens.css kill-switch. */
html.js .rv { opacity: 0; transform: translateY(14px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
  transition-delay: var(--d, 0s); }
html.js .rv.in { opacity: 1; transform: none; }

/* ------------------------------------------------- dark parity (OS, no toggle)
   Mirrors of the [data-theme="dark"] component rules, per the LOCKED
   dark-parity rule in tokens.css §3. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .wm .nm { color: var(--blue-200); }
  :root:not([data-theme]) .wm .sf { color: var(--blue-300); }
  :root:not([data-theme]) .vlogo .vmark { color: var(--blue-300); stroke: var(--blue-300); }
  :root:not([data-theme]) .theme-novus, :root:not([data-theme]) .theme-novapay { --accent-text: var(--blue-300); --accent-subtle: rgba(59,154,224,.16); }
  :root:not([data-theme]) .theme-novabank { --accent-text: var(--green-300); --accent-subtle: rgba(43,178,102,.16); }
  :root:not([data-theme]) .theme-novastore { --accent-text: var(--amber-300); --accent-subtle: rgba(232,163,0,.16); }
  :root:not([data-theme]) .theme-novatrust { --accent-text: var(--blue-300); --accent-subtle: rgba(59,154,224,.16); }
  :root:not([data-theme]) .theme-novaai { --accent-text: var(--indigo-300); --accent-subtle: rgba(83,74,183,.22); }
  :root:not([data-theme]) .theme-novaboost { --accent-text: var(--orange-300); --accent-subtle: rgba(232,120,48,.16); }
  :root:not([data-theme]) .tt-sun { display: block; }
  :root:not([data-theme]) .tt-moon { display: none; }
  /* hero is authored-dark: fixed blue ramp, nothing to re-tune */
}
