/* ============================================================
   NEXORA — design system
   Deep charcoal + warm off-white, restrained violet-to-teal accent.
   ============================================================ */
:root {
  --charcoal-950: #0e0e12;
  --charcoal-900: #141419;
  --charcoal-800: #1d1d24;
  --charcoal-700: #2a2a33;
  --paper: #faf8f4;
  --surface: #ffffff;
  --ink: #191920;
  --ink-soft: #3d3d47;
  --muted: #6e6e7a;
  --muted-dark: #a7a7b3;
  --line: #e8e4da;
  --line-dark: #2c2c35;
  --violet: #7c5cff;
  --teal: #2dd4bf;
  --accent-gradient: linear-gradient(120deg, var(--violet), var(--teal));
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 16, 20, 0.06);
  --shadow-md: 0 8px 24px rgba(16, 16, 20, 0.08);
  --shadow-lg: 0 20px 48px rgba(16, 16, 20, 0.14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 0.6em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: inherit; }
::selection { background: rgba(124, 92, 255, 0.22); }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--charcoal-950); color: #fff; padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0; text-decoration: none; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Focus visibility */
:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4.5rem 0; }
.section--tight { padding: 3rem 0; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.9rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 42rem; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1rem; min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-word { font-weight: 800; font-size: 1.22rem; letter-spacing: 0.08em; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.main-nav a.nav-link {
  text-decoration: none; font-weight: 550; font-size: 0.95rem; color: var(--ink-soft);
  padding: 0.55rem 0.85rem; border-radius: var(--radius-sm);
}
.main-nav a.nav-link:hover { color: var(--ink); background: rgba(16,16,20,0.05); }
.main-nav a.nav-link[aria-current="page"] { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: inherit; font-weight: 650; font-size: 0.95rem;
  padding: 0.7rem 1.35rem; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--charcoal-950); color: #fff; }
.btn--primary:hover { background: var(--charcoal-800); box-shadow: var(--shadow-md); }
.btn--accent { background: var(--accent-gradient); color: #fff; }
.btn--accent:hover { box-shadow: var(--shadow-md); filter: brightness(1.05); }
.btn--ghost { background: transparent; color: inherit; border-color: var(--line); }
.btn--ghost:hover { border-color: var(--muted); }
.on-dark .btn--ghost { border-color: var(--line-dark); }
.btn--lg { padding: 0.9rem 1.8rem; font-size: 1.02rem; }
.nav-cta { margin-left: 0.75rem; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.55rem 0.65rem; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ============ Hero ============ */
.hero {
  background: var(--charcoal-950); color: #f5f5f7;
  padding: 5.5rem 0 5rem; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 320px at 12% 8%, rgba(124,92,255,0.20), transparent 65%),
    radial-gradient(520px 300px at 88% 90%, rgba(45,212,191,0.13), transparent 65%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 0.7rem; }
.hero .sub { color: var(--muted-dark); font-size: 1.12rem; max-width: 34rem; margin-bottom: 1.8rem; }
.hero-ctas { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero .btn--primary { background: #fff; color: var(--charcoal-950); }
.hero .btn--primary:hover { background: #ececf0; }
.hero-visual { display: flex; justify-content: center; }
.app-tile {
  background: var(--charcoal-800); border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg); padding: 1.75rem; width: 100%; max-width: 340px;
  box-shadow: var(--shadow-lg);
}
.app-tile .tile-icon { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 1.1rem; box-shadow: var(--shadow-md); }
.app-tile h3 { color: #fff; margin-bottom: 0.4rem; font-size: 1.25rem; }
.app-tile p { color: var(--muted-dark); font-size: 0.94rem; margin-bottom: 1.2rem; }
.tile-status {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--teal); border: 1px solid rgba(45,212,191,0.4);
  padding: 0.25rem 0.6rem; border-radius: 999px; margin-bottom: 1rem;
}
.app-tile .btn { width: 100%; }

/* ============ App cards / grids ============ */
.apps-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
  gap: 1.5rem; margin-top: 2.2rem;
}
.app-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem; display: flex; flex-direction: column; gap: 0.7rem;
  box-shadow: var(--shadow-sm); transition: box-shadow 0.15s ease, transform 0.15s ease;
  text-decoration: none; color: inherit;
}
a.app-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.app-card-top { display: flex; align-items: center; gap: 1rem; }
.app-card-icon { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: var(--shadow-sm); }
.app-card h3 { margin: 0; font-size: 1.18rem; }
.app-card .tagline { color: var(--ink-soft); font-size: 0.95rem; margin: 0; flex: 1; }
.card-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.2rem; }
.pill {
  font-size: 0.75rem; font-weight: 650; letter-spacing: 0.04em;
  background: rgba(16,16,20,0.05); border: 1px solid var(--line);
  padding: 0.22rem 0.65rem; border-radius: 999px; color: var(--ink-soft);
}
.pill--status { background: rgba(45,212,191,0.12); border-color: rgba(45,212,191,0.45); color: #0f766e; }
.card-link { font-weight: 700; font-size: 0.95rem; margin-top: auto; padding-top: 0.6rem; }
.card-link span.arrow { display: inline-block; transition: transform 0.15s ease; }
a.app-card:hover .card-link span.arrow { transform: translateX(4px); }
.empty-state {
  text-align: center; padding: 3.5rem 2rem; border: 1px dashed var(--line);
  border-radius: var(--radius-lg); background: var(--surface); margin-top: 2.2rem;
}
.empty-state h3 { margin-bottom: 0.4rem; }
.empty-state p { color: var(--muted); margin-bottom: 0.4rem; }

/* ============ Value props ============ */
.props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.2rem; }
.prop {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.8rem; box-shadow: var(--shadow-sm);
}
.prop-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 1rem;
  background: var(--accent-gradient); display: flex; align-items: center; justify-content: center;
}
.prop-icon svg { width: 22px; height: 22px; stroke: #fff; }
.prop h3 { margin-bottom: 0.45rem; }
.prop p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

/* ============ Studio band / final CTA ============ */
.band { background: var(--charcoal-950); color: #f5f5f7; border-radius: 0; }
.band h2 { color: #fff; }
.band .lead { color: var(--muted-dark); }
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.final-cta { text-align: center; padding: 5rem 0; }
.final-cta h2 { margin-bottom: 0.6rem; }
.final-cta p { color: var(--ink-soft); margin-bottom: 1.6rem; }

/* ============ Footer ============ */
.site-footer { background: var(--charcoal-950); color: var(--muted-dark); padding: 3.5rem 0 2rem; font-size: 0.94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand .brand-word { color: #fff; }
.footer-brand p { margin: 0.9rem 0 0; max-width: 22rem; font-size: 0.92rem; }
.footer-col h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { text-decoration: none; color: var(--muted-dark); }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--line-dark); padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.86rem; }

/* ============ Directory page ============ */
.page-head { padding: 4rem 0 1rem; }
.page-head h1 { margin-bottom: 0.5rem; }
.controls { display: flex; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 0.5rem; align-items: center; }
.search-box { position: relative; flex: 1 1 280px; max-width: 420px; }
.search-box input {
  width: 100%; font: inherit; padding: 0.75rem 1rem 0.75rem 2.7rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.search-box input:focus { outline: 3px solid var(--violet); outline-offset: 1px; border-color: transparent; }
.search-box svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); }
.filter-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.filter-row label { font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.filter-row select {
  font: inherit; font-size: 0.92rem; padding: 0.6rem 0.9rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.results-note { color: var(--muted); font-size: 0.92rem; margin-top: 1.2rem; }

/* ============ App detail ============ */
.breadcrumb { font-size: 0.88rem; color: var(--muted); margin: 2.2rem 0 1.6rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb .sep { margin: 0 0.5rem; }
.detail-hero { display: flex; gap: 1.8rem; align-items: flex-start; margin-bottom: 2.5rem; flex-wrap: wrap; }
.detail-icon { width: 104px; height: 104px; border-radius: 26px; flex: none; box-shadow: var(--shadow-md); }
.detail-identity h1 { margin-bottom: 0.3rem; }
.detail-identity .tagline { font-size: 1.12rem; color: var(--ink-soft); max-width: 40rem; margin-bottom: 1rem; }
.detail-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; margin-top: 0.4rem; }
.status-note { font-size: 0.88rem; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; margin-top: 1rem; }
.detail-main h2 { font-size: 1.35rem; margin-top: 2.4rem; }
.detail-main h2:first-child { margin-top: 0; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.feature-list li { display: flex; gap: 0.8rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.9rem 1.1rem; }
.feature-list .check { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-gradient); display: flex; align-items: center; justify-content: center; margin-top: 0.1rem; }
.feature-list .check svg { width: 13px; height: 13px; stroke: #fff; }
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; display: flex; gap: 1rem; align-items: flex-start; }
.steps li::before {
  content: counter(step); flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--charcoal-950); color: #fff; font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.steps strong { display: block; margin-bottom: 0.15rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }
.detail-side .side-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm);
}
.detail-side h3 { font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1rem; font-size: 0.93rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }
.side-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.side-links a { text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.side-links a:hover { text-decoration: underline; }

/* ============ Prose pages ============ */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.6rem; font-size: 1.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.5rem; }
.placeholder-note {
  border-left: 4px solid var(--violet); background: rgba(124,92,255,0.07);
  padding: 0.9rem 1.2rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem; color: var(--ink-soft); margin: 1.2rem 0;
}
.placeholder-note strong { color: var(--ink); }
code.inline { background: rgba(16,16,20,0.06); padding: 0.15rem 0.45rem; border-radius: 6px; font-size: 0.88em; }

/* ============ Support / contact ============ */
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
.support-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.7rem; box-shadow: var(--shadow-sm); }
.support-card h3 { margin-bottom: 0.5rem; }
.support-card p { color: var(--ink-soft); font-size: 0.96rem; margin-bottom: 0.8rem; }
.honest-state {
  background: rgba(16,16,20,0.04); border: 1px dashed var(--line); border-radius: var(--radius-md);
  padding: 1rem 1.2rem; font-size: 0.94rem; color: var(--ink-soft);
}
.faq-list { margin-top: 1.5rem; display: grid; gap: 1rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1.2rem 1.4rem; }
.faq-item h3 { margin-bottom: 0.35rem; font-size: 1.02rem; }
.faq-item p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* ============ Updates ============ */
.update-entry { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.7rem; margin-top: 1.4rem; box-shadow: var(--shadow-sm); }
.update-entry .update-meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.5rem; }

/* ============ 404 ============ */
.page-404 { text-align: center; padding: 6rem 0; }
.page-404 .big { font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; letter-spacing: -0.04em;
  background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { order: -1; }
  .app-tile { max-width: 300px; }
  .props { grid-template-columns: 1fr; }
  .band-grid { grid-template-columns: 1fr; gap: 2rem; }
  .detail-grid { grid-template-columns: 1fr; gap: 2rem; }
  .support-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 3.2rem 0; }
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 0.75rem 1.5rem 1.25rem; gap: 0.15rem;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a.nav-link { padding: 0.8rem 0.5rem; font-size: 1.02rem; }
  .nav-cta { margin: 0.6rem 0 0; }
  .nav-cta .btn { width: 100%; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .detail-hero { gap: 1.2rem; }
  .detail-icon { width: 84px; height: 84px; border-radius: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
