/* ClawBank Business Bench — aligned to ClawBank design tokens
   https://clawbank.co/design-system.html
   Display: Newsreader (public stand-in for PP Nikkei / Tiempos until brand fonts are licensed for this host)
*/

:root {
  --bg: #080808;
  --surface: #111111;
  --surface-2: #141210;
  --text: #f0ede6;
  --text-muted: #9d948d;
  --accent: #eb6e12;
  --accent-dim: rgba(235, 110, 18, 0.1);
  --accent-glow: rgba(235, 110, 18, 0.22);
  --border: rgba(240, 237, 230, 0.07);
  --border-hi: rgba(240, 237, 230, 0.14);
  --max-w: 1080px;
  --nav-h: 64px;
  --font-display: "Newsreader", "Times New Roman", Georgia, serif;
  --font-italic: "Newsreader", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 60% at 70% -10%, var(--accent-glow), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 30%, rgba(235, 110, 18, 0.06), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, #0c0b0a 50%, var(--bg) 100%);
  opacity: 1;
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  font-weight: 400;
  color: var(--accent);
}

em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 500;
  color: var(--text);
}

strong {
  font-weight: 500;
  color: var(--text);
}

/* ——— Nav ——— */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-link:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.9rem;
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.nav-cta:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 24px var(--accent-glow);
  text-decoration: none;
}

/* ——— Hero ——— */

.hero {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(3.5rem, 10vh, 6.5rem) clamp(1.25rem, 4vw, 2.5rem)
    clamp(3rem, 8vh, 5rem);
  min-height: calc(100vh - var(--nav-h) - 2.5rem);
  min-height: calc(100dvh - var(--nav-h) - 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.brand-hero {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 14ch;
}

.lede {
  margin: 0 0 2rem;
  max-width: 36rem;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  background: var(--accent);
  color: #140a04;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: none;
  transition: box-shadow 160ms ease, filter 160ms ease;
}

.btn-primary:hover {
  box-shadow: 0 0 28px var(--accent-glow);
  filter: brightness(1.05);
  text-decoration: none;
  color: #140a04;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-hi);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}

/* ——— Ticker ——— */

.ticker {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: var(--surface);
  padding: 0.85rem 0;
}

.ticker-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: ticker 42s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.ticker .dot {
  color: var(--accent);
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ——— Sections ——— */

main {
  position: relative;
  z-index: 1;
}

.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 5.5rem) clamp(1.25rem, 4vw, 2.5rem);
}

.section.surface-alt {
  max-width: none;
  background: var(--surface-2);
  border-block: 1px solid var(--border);
}

.section.surface-alt > * {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  margin: 0 0 1rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-tag.accent {
  color: var(--accent);
}

.section h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.section-body {
  margin: 0 0 1.75rem;
  max-width: 40rem;
  color: var(--text-muted);
  font-weight: 300;
}

.formula {
  margin: 0;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  overflow-x: auto;
}

.formula code {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 400;
  white-space: nowrap;
}

/* ——— Metrics ——— */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-block: 1px solid var(--border);
}

.metric {
  padding: 1.75rem 1.25rem;
  border-right: 1px solid var(--border);
  transition: background 160ms ease;
}

.metric:last-child {
  border-right: none;
}

.metric:hover {
  background: var(--accent-dim);
}

.metric-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.metric-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ——— Protocol steps ——— */

.protocol-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.protocol-steps li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.35rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.protocol-steps li:last-child {
  border-bottom: none;
}

.protocol-steps li:hover {
  background: rgba(235, 110, 18, 0.04);
}

.step-num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1;
  color: var(--accent);
}

.protocol-steps h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.protocol-steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 300;
}

/* ——— Code window ——— */

.code-window {
  margin: 0 0 1.75rem;
  border: 1px solid var(--border-hi);
  background: var(--bg);
  overflow: hidden;
}

.code-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.code-hint {
  color: var(--accent);
}

.code-window pre {
  margin: 0;
  padding: 1.15rem 1.1rem;
  overflow-x: auto;
}

.code-window code {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.55;
  white-space: pre;
}

.link-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.35rem 1.5rem;
}

.link-rail a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0;
  display: block;
  transition: color 140ms ease, border-color 140ms ease;
}

.link-rail a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ——— Requirements ——— */

.req-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.req-grid li {
  background: var(--surface);
  padding: 1.25rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: background 160ms ease;
}

.req-grid li:hover {
  background: #161412;
}

.req-grid strong {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.req-grid span {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* ——— Footer ——— */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem clamp(1.25rem, 4vw, 2.5rem);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-brand {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.footer-meta a {
  color: inherit;
}

.footer-copy {
  margin: 0 0 1.25rem;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 300;
}

.footer-meta {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ——— Responsive ——— */

/* ——— Capability checklist ——— */

.cap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.cap-list li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.cap-list li:last-child {
  border-bottom: none;
}

.cap-list li:hover {
  background: rgba(235, 110, 18, 0.04);
}

.cap-num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.1;
  color: var(--accent);
}

.cap-list strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.cap-list span {
  display: block;
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* ——— Economy action grid ——— */

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.action-grid > div {
  background: var(--bg);
  padding: 1.2rem 1.1rem;
}

.action-grid h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.action-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.action-grid li {
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-muted);
  padding: 0.25rem 0;
}

.action-grid code {
  color: var(--text);
  font-size: 0.8rem;
}

/* ——— Roadmap ——— */

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.roadmap-phase {
  padding: 1.25rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-hi);
}

.roadmap-phase.is-live {
  border-top-color: var(--accent);
}

.phase-label {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.roadmap-phase.is-live .phase-label {
  color: var(--accent);
}

.roadmap-phase h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
}

.roadmap-phase ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.roadmap-phase li {
  position: relative;
  padding: 0.28rem 0 0.28rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--text-muted);
}

.roadmap-phase li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ——— Responsive extras ——— */

@media (max-width: 800px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .metric:nth-child(2) {
    border-right: none;
  }

  .metric:nth-child(1),
  .metric:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .protocol-steps li,
  .cap-list li {
    grid-template-columns: 3rem minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .metric {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .metric:last-child {
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
