/* Intelligence Moat — flashmobcluster.com
   Direction: deep slate + phosphor amber (not purple / cream-terracotta / broadsheet) */

:root {
  --bg0: #0b1210;
  --bg1: #121a17;
  --bg2: #1a2420;
  --ink: #e8f0ea;
  --muted: #9aafa3;
  --line: rgba(232, 240, 234, 0.12);
  --amber: #e6b35a;
  --amber-dim: #b8873a;
  --teal: #3d9a7a;
  --buy: #c47a5a;
  --build: #3d9a7a;
  --neutral: #7a8a82;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 68rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(61, 154, 122, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(230, 179, 90, 0.14), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 40%, var(--bg0));
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #f0c878;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: 2rem 0 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 35%, var(--bg0) 92%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 46px,
      rgba(232, 240, 234, 0.03) 46px,
      rgba(232, 240, 234, 0.03) 47px
    );
  pointer-events: none;
  animation: drift 28s linear infinite;
}

@keyframes drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0, 120px 80px; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 40rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--ink);
}

.brand span {
  display: block;
  color: var(--amber);
}

.hero-lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 32rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 2px;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: #1a1408;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  background: #f0c878;
  color: #1a1408;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: transparent;
}

.operator {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* —— Sections —— */
section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.6rem;
}

h2 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 38rem;
}

/* —— Instructions —— */
.steps {
  display: grid;
  gap: 1.25rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.1rem 1.1rem 1.1rem 3.2rem;
  background: rgba(18, 26, 23, 0.7);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--amber);
}

.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

pre.config {
  margin: 1.5rem 0 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  background: #060a09;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.45;
  color: #c8ddd0;
}

/* —— Examples gallery —— */
.example {
  margin-bottom: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

.example:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.example-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.example-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 550;
}

.pattern {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  color: var(--amber);
}

.example-problem {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.era-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 820px) {
  .era-grid {
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
  }
}

.scorecard {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1rem;
}

.scorecard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: center;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  border: 1px solid var(--line);
}

.badge-asof {
  color: var(--muted);
}

.badge-verdict-buy {
  color: #1a100c;
  background: var(--buy);
  border-color: transparent;
}

.badge-verdict-build {
  color: #06140f;
  background: var(--build);
  border-color: transparent;
}

.score-sum {
  font-family: var(--font-mono);
  color: var(--ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.45rem;
  border-radius: 2px;
  border: 1px solid var(--line);
  color: var(--muted);
  max-width: 100%;
}

.chip-buy {
  border-color: rgba(196, 122, 90, 0.55);
  color: #e8b59e;
}

.chip-build {
  border-color: rgba(61, 154, 122, 0.55);
  color: #8fd4b8;
}

.chip-neutral {
  border-color: rgba(122, 138, 130, 0.45);
  color: var(--neutral);
}

.ribbon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  min-width: 7rem;
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  text-align: center;
}

.ribbon .arrow {
  font-size: 1.4rem;
  line-height: 1;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(2px); }
}

.outputs {
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .outputs {
    grid-template-columns: 1.2fr 1fr;
  }
}

.panel {
  background: rgba(11, 18, 16, 0.65);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1rem;
}

.panel h4 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

.excerpt {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.audio-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

audio {
  width: 100%;
  height: 2.4rem;
}

.mcp-one-liner {
  margin: 1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.65rem 0.75rem;
  border-left: 2px solid var(--amber-dim);
  background: rgba(230, 179, 90, 0.06);
}

.mcp-one-liner code {
  color: var(--amber);
}

/* —— Footer —— */
footer {
  padding: 2.5rem 0 3.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin: 0 0 0.5rem;
  max-width: 40rem;
}

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