/* Nuvora — component styles. Every value comes from tokens.css (var(--…)); the type-style
   classes (.display-xl, .h2, .body, .label, .button-md …) set font family, size, line height,
   weight and tracking, so components add them as classes instead of repeating numbers. */

.nv-page { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
.nv-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; }

/* ---------- Logo ---------- */
.nv-logo { display: block; flex: none; overflow: visible; }
.nv-logo__bar { fill: var(--logo-bar); }
.nv-logo__word { fill: var(--logo-word); }
.nv-logo--brand .nv-logo__bar { fill: var(--brand-mark); }
.nv-logo--brand .nv-logo__word { fill: var(--primary-dark6); }
.nv-logo--ink .nv-logo__bar, .nv-logo--ink .nv-logo__word { fill: var(--primary-dark6); }
.nv-logo--white .nv-logo__bar, .nv-logo--white .nv-logo__word { fill: var(--neutral-light6); }

/* ---------- Blueprint corner markers (SpecFrame, FeatureCard) ---------- */
.nv-marker { position: absolute; z-index: 2; width: 16px; height: 16px; box-sizing: border-box; border: 1px solid var(--brand); border-radius: var(--radius-sm); background: var(--bg); pointer-events: none; }
.nv-marker--tl { top: -8px; left: -8px; }
.nv-marker--tr { top: -8px; right: -8px; }
.nv-marker--bl { bottom: -8px; left: -8px; }
.nv-marker--br { bottom: -8px; right: -8px; }

/* ---------- Button ---------- */
.nv-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); box-sizing: border-box; border: 1px solid transparent; border-radius: var(--radius-none); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none; transition: background-color .16s cubic-bezier(.2,.8,.2,1), border-color .16s cubic-bezier(.2,.8,.2,1), color .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s cubic-bezier(.2,.8,.2,1); }
.nv-btn--lg { height: 56px; padding: var(--space-16) var(--space-32); }
.nv-btn--md { height: 48px; padding: var(--space-12) var(--space-24); }
.nv-btn--rg { height: 40px; padding: 10px var(--space-18); }
.nv-btn--sm { height: 36px; padding: var(--space-8) var(--space-12); }
.nv-btn--primary { background: var(--brand); color: var(--on-brand); }
.nv-btn--primary:hover { background: var(--brand-hover); box-shadow: var(--glow-brand); }
.nv-btn--outline { border-color: var(--line-strong); color: var(--ink); }
.nv-btn--outline:hover { border-color: var(--ink); background: var(--bg-hover); }
.nv-btn--ghost { padding-left: 0; padding-right: 0; color: var(--ink); }
.nv-btn--ghost .nv-btn__label { background-image: linear-gradient(var(--brand), var(--brand)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px; transition: background-size .2s cubic-bezier(.2,.8,.2,1); }
.nv-btn--ghost:hover .nv-btn__label { background-size: 100% 1px; }
.nv-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.nv-btn:disabled, .nv-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; box-shadow: none; }
.nv-btn__arrow { display: inline-block; transition: transform .16s cubic-bezier(.2,.8,.2,1); }
.nv-btn:hover .nv-btn__arrow { transform: translateX(4px); }
.nv-btn:disabled .nv-btn__arrow { transform: none; }

/* ---------- Badge ---------- */
.nv-badge { display: inline-flex; align-items: center; gap: var(--space-8); height: 24px; box-sizing: border-box; padding: 0 var(--space-8); border: 1px solid var(--line); border-radius: var(--radius-none); background: var(--bg-raised); color: var(--ink-muted); text-transform: uppercase; white-space: nowrap; }
.nv-badge__dot { width: 6px; height: 6px; flex: none; background: currentColor; }
.nv-badge--brand { border-color: transparent; background: var(--brand-wash); color: var(--brand-text); }
.nv-badge--action { border-color: transparent; background: var(--action-wash); color: var(--action-text); }
.nv-badge--success { border-color: transparent; background: var(--success-bg); color: var(--success-fg); }
.nv-badge--warning { border-color: transparent; background: var(--warning-bg); color: var(--warning-fg); }
.nv-badge--error { border-color: transparent; background: var(--error-bg); color: var(--error-fg); }
.nv-badge--info { border-color: transparent; background: var(--info-bg); color: var(--info-fg); }

/* ---------- Avatar ---------- */
.nv-avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; overflow: hidden; border: 1px solid var(--line-alpha); background: var(--bg-raised); color: var(--ink); vertical-align: middle; }
.nv-avatar--circle { border-radius: var(--radius-full); }
.nv-avatar--square { border-radius: var(--radius-none); }
.nv-avatar--anonymous { background: var(--avatar-empty); }
.nv-avatar--brand { background: var(--brand); }
.nv-avatar--initials { background: var(--brand-wash); color: var(--brand-text); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.02em; }
.nv-avatar__img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- SpecFrame ---------- */
.nv-spec { position: relative; box-sizing: border-box; border: 1px solid var(--line); background: var(--bg); }
.nv-spec--glow { box-shadow: var(--glow-brand); }
.nv-spec__body { position: relative; z-index: 0; height: 100%; box-sizing: border-box; }
.nv-spec__label { position: absolute; right: 0; bottom: calc(100% + var(--space-12)); color: var(--ink-subtle); text-transform: uppercase; white-space: nowrap; }
.nv-spec__gauge { position: absolute; z-index: 1; top: 0; left: 50%; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); transform: translateX(-50%); color: var(--brand-text); text-transform: uppercase; pointer-events: none; }
.nv-spec__tick { display: block; width: 9px; height: var(--space-32); box-sizing: border-box; border-bottom: 1px solid var(--brand); background: linear-gradient(var(--brand), var(--brand)) center / 1px 100% no-repeat; }

/* ---------- SectionHeader ---------- */
.nv-sh { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-16); max-width: 784px; }
.nv-sh--center { align-items: center; margin: 0 auto; text-align: center; }
.nv-sh__eyebrow { display: flex; gap: var(--space-8); margin: 0; color: var(--ink-muted); text-transform: uppercase; }
.nv-sh__index { color: var(--brand-text); }
.nv-sh__slash { color: var(--ink-subtle); }
.nv-sh__title { margin: 0; color: var(--ink); text-wrap: balance; }
.nv-sh__desc { max-width: 560px; margin: 0; color: var(--ink-muted); text-wrap: pretty; }

/* ---------- Hero ---------- */
@keyframes nv-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.nv-hero { position: relative; isolation: isolate; overflow: hidden; padding: var(--space-96) max(var(--grid-margin-mobile), calc((100% - var(--content-width)) / 2)) var(--space-128); background: var(--bg); color: var(--ink); }
.nv-hero__grid { position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(to right, var(--line-faint) 1px, transparent 1px), linear-gradient(to bottom, var(--line-faint) 1px, transparent 1px); background-size: var(--space-64) var(--space-64); -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 25%, transparent 100%); mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 25%, transparent 100%); }
.nv-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-64) var(--grid-gutter); }
.nv-hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-24); }
.nv-hero__title { margin: 0; color: var(--ink); text-wrap: balance; }
.nv-hero__hl { color: var(--brand-display); }
.nv-hero__desc { max-width: 560px; margin: 0; color: var(--ink-muted); text-wrap: pretty; }
.nv-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-16); margin-top: var(--space-8); }
.nv-hero__meta { display: flex; align-items: center; gap: var(--space-12); color: var(--ink-subtle); }
.nv-hero--stacked .nv-hero__copy { align-items: center; max-width: 900px; margin: 0 auto; text-align: center; }
.nv-hero--stacked .nv-hero__actions, .nv-hero--stacked .nv-hero__meta { justify-content: center; }
.nv-hero--split .nv-hero__inner { grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr)); align-items: center; }
.nv-hero--split .nv-hero__copy { grid-column: span 2; }
.nv-hero__copy > *, .nv-hero__visual { animation: nv-rise .48s cubic-bezier(.2,.8,.2,1) both; }
.nv-hero__copy > *:nth-child(2) { animation-delay: .08s; }
.nv-hero__copy > *:nth-child(3) { animation-delay: .16s; }
.nv-hero__copy > *:nth-child(4) { animation-delay: .24s; }
.nv-hero__copy > *:nth-child(5) { animation-delay: .32s; }
.nv-hero__visual { animation-delay: .32s; }
@media (max-width: 959px) { .nv-hero--split .nv-hero__inner { grid-template-columns: minmax(0, 1fr); } .nv-hero--split .nv-hero__copy { grid-column: auto; } }
@media (max-width: 767px) { .nv-hero { padding-top: var(--space-64); padding-bottom: var(--space-64); } .nv-hero__inner { row-gap: var(--space-56); } .nv-hero__title { font-size: 48px; line-height: 60px; letter-spacing: -0.02em; } }

/* ---------- FeatureCard ---------- */
.nv-feature { position: relative; display: flex; flex-direction: column; gap: var(--space-16); min-height: 280px; box-sizing: border-box; padding: var(--space-32); border: 1px solid var(--line); background: var(--bg-raised); color: var(--ink); text-decoration: none; transition: border-color .2s cubic-bezier(.2,.8,.2,1); }
.nv-feature .nv-marker { opacity: 0; transition: opacity .2s cubic-bezier(.2,.8,.2,1); }
a.nv-feature:hover, a.nv-feature:focus-visible { border-color: var(--brand); }
a.nv-feature:hover .nv-marker, a.nv-feature:focus-visible .nv-marker { opacity: 1; }
a.nv-feature:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.nv-feature__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-16); margin-bottom: auto; }
.nv-feature__index { color: var(--brand-text); }
.nv-feature__icon { display: inline-flex; color: var(--ink-muted); }
.nv-feature__title { margin: var(--space-24) 0 0; color: var(--ink); }
.nv-feature__desc { margin: 0; color: var(--ink-muted); }
.nv-feature__more { display: inline-flex; gap: var(--space-8); color: var(--ink); text-transform: uppercase; transition: color .16s cubic-bezier(.2,.8,.2,1); }
a.nv-feature:hover .nv-feature__more { color: var(--brand-text); }
@media (max-width: 767px) { .nv-feature { min-height: 0; padding: var(--space-24); } }

/* ---------- Stat ---------- */
.nv-stat { position: relative; display: flex; flex-direction: column; gap: var(--space-8); padding-top: var(--space-16); border-top: 1px solid var(--line); }
.nv-stat::before { content: ""; position: absolute; top: -1px; left: 0; width: var(--space-24); height: 2px; background: var(--brand); }
.nv-stat__value { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.nv-stat__unit { margin-left: var(--space-4); color: var(--brand-display); }
.nv-stat__label { margin: 0; color: var(--ink-subtle); text-transform: uppercase; }
.nv-stat__caption { margin: 0; color: var(--ink-muted); }

/* ---------- Input ---------- */
.nv-field { display: flex; flex-direction: column; gap: var(--space-8); }
.nv-field__label { color: var(--ink-muted); text-transform: uppercase; }
.nv-field__input { width: 100%; height: 48px; box-sizing: border-box; padding: 0 var(--space-16); border: 1px solid var(--line-strong); border-radius: var(--radius-none); background: var(--bg); color: var(--ink); outline: none; transition: border-color .16s cubic-bezier(.2,.8,.2,1); }
.nv-field__input::placeholder { color: var(--ink-subtle); }
.nv-field__input:hover { border-color: var(--ink-muted); }
.nv-field__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.nv-field.is-error .nv-field__input { border-color: var(--error-normal); }
.nv-field__msg { display: flex; align-items: center; gap: var(--space-8); margin: 0; color: var(--ink-subtle); }
.nv-field__msg.is-error { color: var(--error-fg); }
.nv-field__msg.is-error::before { content: ""; width: 6px; height: 6px; flex: none; background: var(--error-normal); }

/* ---------- EmailCapture ---------- */
.nv-capture { display: flex; flex-direction: column; gap: var(--space-12); width: 100%; max-width: 520px; }
.nv-capture__row { display: flex; }
.nv-capture__input { flex: 1; min-width: 0; height: 48px; box-sizing: border-box; padding: 0 var(--space-16); border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--radius-none); background: var(--bg); color: var(--ink); outline: none; }
.nv-capture__input::placeholder { color: var(--ink-subtle); }
.nv-capture__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; position: relative; z-index: 1; }
.nv-capture.is-error .nv-capture__input { border-color: var(--error-normal); }
.nv-capture__note { display: flex; align-items: center; gap: var(--space-8); min-height: 16px; margin: 0; color: var(--ink-subtle); }
.nv-capture__note.is-error { color: var(--error-fg); }
.nv-capture__note.is-done { color: var(--success-fg); }
.nv-capture__note.is-error::before, .nv-capture__note.is-done::before { content: ""; width: 6px; height: 6px; flex: none; background: var(--error-normal); }
.nv-capture__note.is-done::before { background: var(--success-normal); }
@media (max-width: 480px) { .nv-capture__row { flex-direction: column; gap: var(--space-8); } .nv-capture__input { border-right: 1px solid var(--line-strong); } }

@media (prefers-reduced-motion: reduce) {
  .nv-btn, .nv-btn__arrow, .nv-btn--ghost .nv-btn__label, .nv-feature, .nv-feature .nv-marker, .nv-field__input { transition: none; }
  .nv-btn:hover .nv-btn__arrow { transform: none; }
  .nv-hero__copy > *, .nv-hero__visual { animation: none; }
}
