/* Ourobuild follows the Aylith warm-stone ramps with one copper accent. */

:root {
  --bg: #f8f7f4;
  --bg-2: #faf8f5;
  --surface: #f3efe8;
  --surface-hi: #e8e0d4;
  --line: #c9c3b3;
  --line-soft: #e1ddd3;

  --bone: #131110;
  --bone-2: #46423a;
  --muted: #615b50;

  --brass: oklch(0.46 0.115 50);
  --brass-hi: oklch(0.36 0.09 50);
  --copper: var(--brass);
  --venom: var(--brass);
  --venom-deep: var(--brass-hi);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1220px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --z-bar: 40;
  --z-tip: 60;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0907;
    --bg-2: #131110;
    --surface: #1c1a16;
    --surface-hi: #332f29;
    --line: #46423a;
    --line-soft: #332f29;
    --bone: #f3efe8;
    --bone-2: #e8e0d4;
    --muted: #b0a08a;
    --brass: oklch(0.73 0.115 50);
    --brass-hi: oklch(0.8 0.09 50);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--bone-2);
  background: var(--bg);
  background-image:
    radial-gradient(80% 55% at 50% -8%, color-mix(in oklch, var(--brass) 10%, var(--bg)) 0%, transparent 60%),
    radial-gradient(60% 50% at 100% 105%, color-mix(in oklch, var(--brass) 6%, var(--bg)) 0%, transparent 55%);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brass);
  color: var(--bg);
  padding: 0.7rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.skip:focus {
  left: 0;
}
:focus-visible {
  outline: 2.5px solid var(--venom);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ───────────────────────── topbar ───────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.4rem);
  background: color-mix(in oklch, var(--bg) 72%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.brand__mark {
  width: 28px;
  height: 28px;
}
.bm-ring {
  fill: none;
  stroke: var(--brass);
  stroke-width: 2.4;
}
.bm-head {
  fill: var(--venom);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--bone);
}
.brand__name--foot {
  font-size: 1.05rem;
}

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.6rem);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}
.topnav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.topnav a:hover {
  color: var(--bone);
}
.topnav__cta {
  color: var(--bg) !important;
  background: var(--brass);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 500;
}
.topnav__cta:hover {
  background: var(--brass-hi);
}
@media (max-width: 640px) {
  .topnav a:not(.topnav__cta) {
    display: none;
  }
}

/* ───────────────────────── primitives ───────────────────────── */
main {
  position: relative;
  z-index: 2;
}
section {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.4rem);
}
.section-head {
  max-width: 46ch;
  margin-bottom: clamp(2rem, 5vw, 3.4rem);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head h2 {
  margin: 0 0 0.7rem;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--bone);
  text-wrap: balance;
  letter-spacing: -0.035em;
  line-height: 1.02;
  font-weight: 700;
  margin: 0;
}
h1 {
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  margin-bottom: 1.4rem;
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
}
h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.025em;
}
p {
  text-wrap: pretty;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--venom);
  margin: 0 0 1.4rem;
}
.snake {
  color: var(--venom);
  font-size: 1.1em;
  transform: translateY(-1px);
}

.u-brass {
  color: var(--brass);
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  letter-spacing: -0.01em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn--solid {
  background: var(--brass);
  color: var(--bg);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--brass) 50%, transparent);
}
.btn--solid:hover {
  background: var(--brass-hi);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -14px color-mix(in oklch, var(--brass) 70%, transparent);
}
.btn--ghost {
  border-color: var(--line);
  color: var(--bone);
}
.btn--ghost:hover {
  border-color: var(--brass);
  color: var(--brass);
  transform: translateY(-2px);
}

/* ───────────────────────── hero ───────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(1.4rem, 4vw, 3.4rem);
  align-items: center;
  padding-top: clamp(2rem, 4vw, 3.2rem);
  padding-bottom: clamp(2.4rem, 5vw, 4rem);
}
@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__copy {
    order: 0;
  }
  .ring {
    order: 1;
  }
  .kicker,
  .hero__actions,
  .hero__loopline {
    justify-content: center;
  }
  .hero__lede {
    margin-inline: auto;
  }
}

.hero__lede {
  font-size: clamp(1.04rem, 1.5vw, 1.2rem);
  color: var(--bone-2);
  max-width: 50ch;
  margin: 0 0 1.5rem;
}
.hero__scope {
  max-width: 54ch;
  padding: 0.8rem 1rem;
  margin: 0 0 1.5rem;
  border-left: 2px solid var(--brass);
  background: var(--bg-2);
  color: var(--bone-2);
  font-size: 0.91rem;
}
.hero__scope strong {
  color: var(--bone);
}
@media (max-width: 920px) {
  .hero__scope {
    margin-inline: auto;
    text-align: left;
  }
}
.hero__loopline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: -0.01em;
  color: var(--bone);
  margin: 0 0 2rem;
}
.hero__loopline i {
  color: var(--brass);
  font-style: normal;
}
.hero__loopline .rev {
  color: var(--venom);
  font-size: 1.15em;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ring */
.ring {
  margin: 0;
  width: min(100%, 540px);
  justify-self: center;
}
.ring__svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.ring__track {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 2 7;
}
.ring__center-k {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--muted);
  letter-spacing: 0.04em;
}
.ring__center {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  fill: var(--brass);
  letter-spacing: -0.02em;
}

.node__hit {
  fill: transparent;
  cursor: pointer;
}
.node__dot {
  fill: var(--bg-2);
  stroke: var(--brass);
  stroke-width: 2;
  transition: fill 0.3s var(--ease), stroke 0.3s var(--ease), r 0.3s var(--ease);
}
.node__num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  fill: var(--brass);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  transition: fill 0.3s var(--ease);
}
.node__label {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: var(--muted);
  dominant-baseline: middle;
  pointer-events: none;
  transition: fill 0.3s var(--ease);
}
.node.is-on .node__dot {
  fill: var(--venom);
  stroke: var(--venom);
}
.node.is-on .node__num {
  fill: var(--bg);
}
.node.is-on .node__label {
  fill: var(--bone);
}
.node:hover .node__dot {
  stroke: var(--brass-hi);
}
.node:hover .node__label {
  fill: var(--bone);
}

/* serpent beads (injected) */
.bead {
  fill: var(--brass);
}
.bead--head {
  fill: var(--venom);
}
@media (prefers-reduced-motion: no-preference) {
  .ring__serpent {
    transform-origin: 200px 200px;
    transform-box: view-box;
    animation: orbit 13s linear infinite;
  }
}
@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.ring figcaption {
  margin-top: 0.6rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ───────────────────────── the loop / layers ───────────────────────── */
.loop {
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}
.layers {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: layer;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.layer {
  display: grid;
  grid-template-columns: 3.4rem 12rem 1fr auto;
  gap: clamp(0.8rem, 2.5vw, 1.8rem);
  align-items: center;
  padding: clamp(1rem, 2.4vw, 1.45rem) clamp(1.1rem, 3vw, 1.9rem);
  border-top: 1px solid var(--line-soft);
  transition: background 0.25s var(--ease);
}
.layer:first-child {
  border-top: 0;
}
.layer:hover {
  background: var(--surface);
}
.layer__n {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--brass);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.layer:last-child .layer__n {
  background: var(--venom);
}
.layer__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--bone);
  letter-spacing: -0.02em;
}
.layer__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.layer__by {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--brass);
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .layer {
    grid-template-columns: 2.6rem 1fr;
    grid-template-areas: "n name" "n desc" "n by";
    row-gap: 0.25rem;
    column-gap: 1rem;
    align-items: start;
  }
  .layer__n {
    grid-area: n;
  }
  .layer__name {
    grid-area: name;
  }
  .layer__desc {
    grid-area: desc;
  }
  .layer__by {
    grid-area: by;
    text-align: left;
  }
}

/* ───────────────────────── scaffolder + engines ───────────────────────── */
.scaffold {
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center;
}
@media (max-width: 880px) {
  .scaffold {
    grid-template-columns: 1fr;
  }
}
.scaffold__copy p {
  color: var(--bone-2);
  font-size: 1.04rem;
  margin: 0 0 1.1rem;
}
.scaffold__copy strong {
  color: var(--brass);
  font-weight: 600;
}
.scaffold__note {
  color: var(--muted) !important;
  font-size: 0.96rem !important;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.1rem;
}
.scaffold__note em {
  color: var(--venom);
  font-style: normal;
  font-weight: 600;
}

.engines {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  overflow: hidden;
}
.engines__pick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.6rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}
.engines__pick button {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.engines__pick button:hover {
  color: var(--bone);
}
.engines__pick button[aria-selected="true"] {
  color: var(--bg);
  background: var(--brass);
  font-weight: 500;
}
.engines__out {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  min-height: 12rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
}
.engines__out .eo-head {
  color: var(--bone);
  margin-bottom: 0.8rem;
}
.engines__out .eo-head b {
  color: var(--venom);
}
.engines__out ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.engines__out li {
  color: var(--muted);
  padding: 0.15rem 0;
}
.engines__out li::before {
  content: "+ ";
  color: var(--brass);
}
.engines__out li.eo-adapter::before {
  content: "↳ ";
  color: var(--venom);
}
.engines__out li.eo-adapter {
  color: var(--bone-2);
}

/* ───────────────────────── artifacts ───────────────────────── */
.artifacts {
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}
.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.art {
  background: var(--bg-2);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: background 0.3s var(--ease);
}
.art:hover {
  background: var(--surface);
}
.art__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--copper);
}
.art h3 {
  margin: 0;
}
.art > code {
  align-self: flex-start;
  color: var(--brass);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.78rem;
}
.art p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}
.art p code {
  color: var(--bone);
}

/* ───────────────────────── cli / terminal ───────────────────────── */
.cli {
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1.6rem, 4vw, 3.4rem);
  align-items: center;
}
@media (max-width: 880px) {
  .cli {
    grid-template-columns: 1fr;
  }
}
.cli__copy p {
  color: var(--bone-2);
  margin: 0 0 1.4rem;
  font-size: 1.04rem;
}
.cli__copy code {
  color: var(--brass);
}
.cli__cmds {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.cli__cmds li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 1rem;
  position: relative;
}
.cli__cmds li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--brass);
}
.cli__cmds b {
  color: var(--bone);
  font-weight: 600;
}

.term {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: 0 40px 80px -50px color-mix(in oklch, var(--bone) 28%, transparent);
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-soft);
}
.term__bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line);
}
.term__bar i:nth-child(1) {
  background: var(--line);
}
.term__bar i:nth-child(2) {
  background: var(--brass);
}
.term__bar i:nth-child(3) {
  background: var(--line);
}
.term__bar span {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}
.term__body {
  margin: 0;
  padding: 1.2rem 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--bone-2);
  min-height: 17rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.term__body .t-cmd {
  color: var(--bone);
}
.term__body .t-cmd::before {
  content: "$ ";
  color: var(--venom);
}
.term__body .t-ok {
  color: var(--venom-deep);
}
.term__body .t-brass {
  color: var(--brass);
}
.term__body .t-dim {
  color: var(--muted);
}
.term__caret {
  display: inline-block;
  width: 0.5rem;
  height: 1rem;
  background: var(--brass);
  vertical-align: -2px;
}
.cli__caption {
  grid-column: 2;
  margin: -1.8rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
@media (max-width: 880px) {
  .cli__caption {
    grid-column: 1;
    margin-top: -1rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .term__caret {
    animation: blink 1.1s steps(1) infinite;
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ───────────────────────── start ───────────────────────── */
.start {
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.start__card {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(2.2rem, 6vw, 4.2rem) clamp(1.2rem, 5vw, 3rem);
  background:
    radial-gradient(120% 130% at 50% 0%, color-mix(in oklch, var(--brass) 12%, var(--bg-2)) 0%, var(--bg-2) 58%);
  position: relative;
  overflow: hidden;
}
.start__card .kicker {
  justify-content: center;
}
.start__card > p {
  max-width: 46ch;
  margin: 0 auto 1.9rem;
  color: var(--bone-2);
}
.start__card p code {
  color: var(--brass);
}
.start__cmd {
  display: inline-flex;
  align-items: stretch;
  margin: 0 auto 1.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
  max-width: 100%;
}
.start__cmd code {
  padding: 0.85rem 0.7rem 0.85rem 1.4rem;
  color: var(--bone);
  font-size: 0.86rem;
  white-space: nowrap;
  overflow-x: auto;
}
.start__cmd code::before {
  content: "$ ";
  color: var(--venom);
}
.copy {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--brass);
  border: 0;
  padding: 0 1.3rem;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.copy:hover {
  background: var(--brass-hi);
}
.copy.is-done {
  background: var(--venom);
}
.start__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}
.start__links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.start__links a:hover {
  color: var(--brass);
}

/* ───────────────────────── footer ───────────────────────── */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2.4rem) 3rem;
  border-top: 1px solid var(--line-soft);
  position: relative;
  z-index: 2;
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.foot__by {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
}
.foot__by a {
  color: var(--brass);
  text-decoration: none;
}
.foot__note {
  margin: 1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-word;
}

/* ───────────────────────── reveal ───────────────────────── */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  will-change: opacity, transform;
}
.js [data-reveal].in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
