/* ============================================
   NoFS — nofs.ai stylesheet
   Dark theme, clean research aesthetic
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a0f;
  --bg-alt:    #111118;
  --bg-card:   #16161e;
  --bg-hover:  #1e1e2a;
  --border:    #2a2a3a;
  --text:      #d4d4dc;
  --text-dim:  #8888a0;
  --text-muted:#6a6a80;
  --heading:   #f0f0f5;
  --accent:    #7c8cf5;
  --accent-dim:#5c6cd4;
  --green:     #4ade80;
  --blue:      #60a5fa;
  --red:       #f87171;
  --yellow:    #fbbf24;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --max-w:     1100px;
  --radius:    8px;
  --radius-lg: 12px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #a0aeff; }

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-card);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

img { max-width: 100%; }

/* --- Container --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.02em;
}
.nav-brand:hover { color: var(--heading); }
.nav-logo { color: var(--accent); margin-right: 0.25rem; }

.nav-links {
  display: flex;
  gap: 1.5rem;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--heading); }

/* --- Hero --- */
.hero {
  padding: 7rem 1.5rem 5rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,140,245,0.08) 0%, transparent 60%);
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-kicker {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--heading);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #6b7bef;
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Sections --- */
.section {
  padding: 5rem 0;
}

.section-dark {
  background: var(--bg-alt);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  max-width: 700px;
}

.text-muted {
  color: var(--text-muted);
  font-style: italic;
}

/* --- Page Header (sub-pages) --- */
.page-header {
  padding: 4rem 0 2.5rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,140,245,0.06) 0%, transparent 60%);
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-sub {
  font-size: 1.1rem;
  color: var(--text-dim);
}

.breadcrumb {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  transition: color 0.2s;
}
.breadcrumb:hover { color: var(--accent); }

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.col-text p {
  margin-bottom: 1rem;
}

/* --- Flow Diagram --- */
.flow-diagram {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.flow-sub {
  margin-top: 0.5rem;
}

.flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  white-space: nowrap;
}

.flow-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--mono);
}

/* --- Thesis Grid --- */
.thesis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.thesis-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.thesis-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.thesis-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.thesis-card h3 {
  font-size: 1.15rem;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.thesis-card p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* --- Phases Table --- */
.phases-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.phases-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.phases-table th,
.phases-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.phases-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.phases-table td {
  color: var(--text);
}

.phases-table tbody tr:hover {
  background: var(--bg-hover);
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 0.2em 0.65em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-green  { background: rgba(74,222,128,0.15); color: var(--green); }
.badge-blue   { background: rgba(96,165,250,0.15); color: var(--blue); }
.badge-muted  { background: rgba(100,100,120,0.2); color: var(--text-muted); }
.badge-dim    { background: rgba(100,100,120,0.1); color: var(--text-muted); }

/* --- Proven Grid --- */
.proven-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.proven-item {
  display: flex;
  gap: 1rem;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.proven-check {
  color: var(--green);
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.proven-item strong {
  color: var(--heading);
  display: block;
  margin-bottom: 0.25rem;
}

.proven-item p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0;
}

/* --- Research Grid --- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.research-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
}
.research-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.research-suite {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.research-card h3 {
  font-size: 1.1rem;
  color: var(--heading);
  margin: 0.5rem 0;
}

.research-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* --- Hypothesis Cards (research detail pages) --- */
.hypotheses {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 1rem;
}

.hypothesis {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.h-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(124,140,245,0.03);
  flex-wrap: wrap;
}

.h-id {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(124,140,245,0.1);
  padding: 0.25em 0.6em;
  border-radius: 4px;
  flex-shrink: 0;
}

.h-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading);
  flex: 1;
  min-width: 200px;
}

.h-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  flex-shrink: 0;
}

.status-red {
  background: rgba(248,113,113,0.12);
  color: var(--red);
}

.status-green {
  background: rgba(74,222,128,0.12);
  color: var(--green);
}

.status-yellow {
  background: rgba(251,191,36,0.12);
  color: var(--yellow);
}

.h-body {
  padding: 1.75rem;
}

.h-claim {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
}

.h-claim strong, .h-test strong, .h-criteria strong {
  color: var(--heading);
}

.h-test {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.h-test ol {
  margin-top: 0.5rem;
  margin-left: 1.5rem;
}

.h-test ol li {
  margin-bottom: 0.3rem;
  color: var(--text-dim);
}

.h-criteria {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.h-pass, .h-fail {
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.6;
}

.h-pass {
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.15);
}

.h-fail {
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.15);
}

.h-pass strong { color: var(--green); }
.h-fail strong { color: var(--red); }

/* --- Suite Label --- */
.suite-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}

/* --- Phase Timeline (research overview) --- */
.phase-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.phase-item {
  display: flex;
  gap: 1.5rem;
  align-items: start;
}

.phase-number {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(124,140,245,0.1);
  padding: 0.4em 0.7em;
  border-radius: var(--radius);
  flex-shrink: 0;
  min-width: 3.5rem;
  text-align: center;
}

.phase-item h3 {
  font-size: 1.05rem;
  color: var(--heading);
  margin-bottom: 0.25rem;
}

.phase-item p {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* --- Open Questions --- */
.open-questions {
  margin-top: 1rem;
}

.open-questions li {
  margin-bottom: 0.75rem;
  color: var(--text-dim);
  padding-left: 0.5rem;
}

.open-questions li strong {
  color: var(--heading);
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 2rem 0;
}

.cta-section h2 {
  font-size: 2rem;
  color: var(--heading);
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.footer-col a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.footer-copy a {
  color: var(--text-dim);
}

/* --- Roadmap Detail --- */
.roadmap-detail h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.roadmap-detail h3:first-child { margin-top: 0; }

.deliverables {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.deliverable {
  display: flex;
  gap: 1rem;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.section-dark .deliverable {
  background: var(--bg);
}

.d-id {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(124,140,245,0.1);
  padding: 0.3em 0.6em;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.deliverable strong {
  color: var(--heading);
  display: block;
  margin-bottom: 0.25rem;
}
.deliverable p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0;
}

.exit-criteria {
  list-style: none;
  padding: 0;
}
.exit-criteria li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.exit-criteria li::before {
  content: '◇';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* --- Scope Lists --- */
.scope-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.scope-in, .scope-out {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.section-dark .scope-in,
.section-dark .scope-out {
  background: var(--bg);
}

.scope-in h4 { color: var(--green); font-size: 0.9rem; margin-bottom: 0.75rem; }
.scope-out h4 { color: var(--red); font-size: 0.9rem; margin-bottom: 0.75rem; }

.scope-in ul, .scope-out ul {
  list-style: none;
  padding: 0;
}
.scope-in li, .scope-out li {
  font-size: 0.9rem;
  color: var(--text-dim);
  padding: 0.25rem 0;
}

/* --- Non-Goals --- */
.non-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.non-goal {
  display: inline-block;
  padding: 0.5em 1em;
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.15);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-title { font-size: 2.5rem; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .thesis-grid { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: repeat(2, 1fr); }
  .proven-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .h-criteria { grid-template-columns: 1fr; }
  .scope-lists { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero { padding: 4rem 1rem 3rem; }
  .hero-title { font-size: 2rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .research-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.8rem; }
  .page-header h1 { font-size: 1.8rem; }
  .h-header { flex-direction: column; align-items: start; gap: 0.5rem; }
  .section { padding: 3rem 0; }
}
