/* Yazan Alpha Technologies — company site
   Premium-minimal research-lab aesthetic: dark neutral base, strong typography,
   subtle data-inspired accents. No frameworks, no external assets. */

:root {
  --bg: #0b0e12;
  --bg-raise: #10141a;
  --bg-panel: #131820;
  --line: #232a34;
  --line-soft: #1a212b;
  --text: #e8ebee;
  --text-mute: #9aa4b0;
  --text-dim: #6b7684;
  --accent: #57c2ae;        /* evidence teal */
  --accent-dim: #2e6f64;
  --amber: #d9a441;         /* status amber */
  --danger: #c96a5a;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, Menlo, monospace;
  --sans: -apple-system, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 68rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* faint plot-grid backdrop — the one data-inspired flourish */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.22;
  z-index: 0;
}

main, header.site-header, footer.site-footer { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--bg);
  padding: 0.5rem 1rem; z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 1.5rem;
  max-width: var(--maxw); margin: 0 auto;
}

.wordmark {
  font-weight: 750; letter-spacing: 0.14em; font-size: 1rem;
  color: var(--text); white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.wordmark .wm-alpha { color: var(--accent); }
.wordmark .wm-tick { color: var(--text-dim); font-family: var(--mono); font-weight: 400; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--text); font: inherit; padding: 0.35rem 0.7rem;
  border-radius: 4px; cursor: pointer;
}

.site-nav ul { display: flex; gap: 1.4rem; list-style: none; }
.site-nav a {
  color: var(--text-mute); font-size: 0.92rem; letter-spacing: 0.02em;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .nav-bar { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 0 0.75rem; }
  .site-nav li { border-top: 1px solid var(--line-soft); }
  .site-nav a { display: block; padding: 0.7rem 0.25rem; }
}

/* ---------- typography blocks ---------- */

.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent);
  display: block; margin-bottom: 0.9rem;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.08; letter-spacing: -0.02em; font-weight: 750;
  max-width: 22ch;
}
h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.015em; line-height: 1.2; font-weight: 700;
  margin-bottom: 1rem; max-width: 30ch;
}
h3 { font-size: 1.08rem; font-weight: 650; margin-bottom: 0.4rem; }

.lede { font-size: 1.15rem; color: var(--text-mute); max-width: 58ch; margin-top: 1.2rem; }
p + p { margin-top: 0.9rem; }

.motto {
  font-family: var(--mono); color: var(--text-mute); font-size: 0.95rem;
  letter-spacing: 0.04em; margin-top: 1.6rem;
}
.motto b { color: var(--accent); font-weight: 500; }

/* ---------- sections ---------- */

.hero { padding: 5.5rem 0 4rem; border-bottom: 1px solid var(--line); }
.section { padding: 4rem 0; border-bottom: 1px solid var(--line-soft); }
.section:last-of-type { border-bottom: none; }
.section > .container > p, .section p { max-width: 62ch; }

.page-hero { padding: 4rem 0 2.8rem; border-bottom: 1px solid var(--line); }

/* ---------- buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.btn {
  display: inline-block; padding: 0.65rem 1.3rem; border-radius: 5px;
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid var(--line);
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--accent); color: #07110e; border-color: var(--accent); }
.btn.primary:hover { background: #6fd0bd; }
.btn.secondary { color: var(--text); }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- research loop (the flow) ---------- */

.loop { margin-top: 2.6rem; }
.loop ol {
  list-style: none; display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden;
  counter-reset: step;
}
.loop li {
  background: var(--bg-panel); padding: 1.1rem 1rem 1.2rem; position: relative;
  counter-increment: step;
}
.loop li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 0.7rem; color: var(--text-dim);
  display: block; margin-bottom: 0.5rem;
}
.loop li::after {
  content: "→"; position: absolute; top: 1rem; right: 0.8rem;
  color: var(--accent-dim); font-family: var(--mono); font-size: 0.85rem;
}
.loop li:last-child::after { content: "↺"; color: var(--accent); }
.loop .step-name {
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.12em;
  color: var(--text); display: block; margin-bottom: 0.35rem;
}
.loop li.step-market .step-name { color: var(--amber); }
.loop .step-desc { font-size: 0.85rem; color: var(--text-mute); line-height: 1.5; }

@media (max-width: 860px) { .loop ol { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .loop ol { grid-template-columns: 1fr; } }

/* ---------- cards / grids ---------- */

.grid { display: grid; gap: 1.2rem; margin-top: 2rem; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 1.4rem 1.4rem 1.5rem;
}
.card p { font-size: 0.95rem; color: var(--text-mute); }
.card .eyebrow { margin-bottom: 0.6rem; }

/* ---------- status card ---------- */

.status-card {
  background: var(--bg-panel); border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 8px; padding: 1.5rem; margin-top: 2rem; max-width: 40rem;
}
.status-card h3 {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-mute); margin-bottom: 1rem;
}
.status-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.55rem 1.4rem; }
.status-card dt { color: var(--text-mute); font-size: 0.92rem; }
.status-card dd { font-family: var(--mono); font-size: 0.85rem; }
.tag { padding: 0.1rem 0.55rem; border-radius: 3px; white-space: nowrap; }
.tag.on   { color: var(--accent); border: 1px solid var(--accent-dim); }
.tag.off  { color: var(--amber);  border: 1px solid #6e5524; }
@media (max-width: 480px) { .status-card dl { grid-template-columns: 1fr; gap: 0.15rem; } .status-card dd { margin-bottom: 0.6rem; } }

/* ---------- pipeline (technology page) ---------- */

.pipeline { list-style: none; margin-top: 2.4rem; max-width: 46rem; }
.pipeline li {
  position: relative; padding: 0 0 1.9rem 2.2rem;
  border-left: 1px solid var(--line);
  margin-left: 0.5rem;
}
.pipeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.pipeline li::before {
  content: ""; position: absolute; left: -5px; top: 0.45rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.pipeline .stage {
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.1em;
  color: var(--text); display: block; margin-bottom: 0.3rem;
}
.pipeline p { font-size: 0.95rem; color: var(--text-mute); max-width: 56ch; }

/* ---------- principle list (governance) ---------- */

.principles { list-style: none; margin-top: 2rem; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.principles li { background: var(--bg-panel); padding: 1.3rem 1.4rem; }
.principles .p-name { font-weight: 650; display: block; margin-bottom: 0.3rem; }
.principles p { font-size: 0.95rem; color: var(--text-mute); max-width: 70ch; }

blockquote.doctrine {
  border-left: 3px solid var(--accent); padding: 0.4rem 0 0.4rem 1.4rem;
  margin: 2.2rem 0; font-size: 1.25rem; line-height: 1.5; font-weight: 600;
  max-width: 40ch;
}
blockquote.doctrine footer { font-size: 0.85rem; color: var(--text-dim); font-weight: 400; margin-top: 0.5rem; font-family: var(--mono); }

/* ---------- prose helpers ---------- */

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.4rem; }
.prose ul { padding-left: 1.3rem; margin: 0.8rem 0; }
.prose li { margin: 0.35rem 0; color: var(--text-mute); }
.note {
  font-size: 0.9rem; color: var(--text-dim); border-top: 1px solid var(--line-soft);
  padding-top: 1rem; margin-top: 2.2rem; max-width: 62ch;
}

.link-card {
  display: block; background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 1.4rem 1.5rem; margin-top: 2rem; max-width: 40rem;
  color: var(--text);
}
.link-card:hover { border-color: var(--accent); text-decoration: none; }
.link-card .lc-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 0.5rem; }
.link-card .lc-title { font-weight: 650; font-size: 1.1rem; }
.link-card .lc-sub { color: var(--text-mute); font-size: 0.92rem; margin-top: 0.3rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line); margin-top: 4rem;
  padding: 2.4rem 0 2.8rem; font-size: 0.88rem; color: var(--text-dim);
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: baseline; }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 1.2rem; list-style: none; }
.site-footer a { color: var(--text-mute); }
.site-footer .f-motto { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.05em; width: 100%; color: var(--text-dim); }

/* ---------- 404 ---------- */

.err-code { font-family: var(--mono); font-size: clamp(4rem, 14vw, 8rem); color: var(--line); font-weight: 700; line-height: 1; }
