:root {
  --bg: #0b0c0f;
  --bg-soft: #0f1115;
  --panel: #12151a;
  --panel-2: #16191f;
  --border: #292d35;
  --border-warm: #4b3527;
  --text: #ece9e3;
  --muted: #a3a6ad;
  --subtle: #747982;
  --ember-deep: #9f431b;
  --ember: #ef742e;
  --ember-bright: #ff985b;
  --copper: #d98445;
  --gold: #d1aa68;
  --gold-bright: #efc879;
  --parchment: #eadcc8;
  --radius: 16px;
  --shell: 1180px;
  --shadow: 0 18px 50px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 14% -5%, rgba(239,116,46,.15), transparent 32rem),
    radial-gradient(circle at 88% 10%, rgba(209,170,104,.075), transparent 30rem),
    radial-gradient(circle at 8% 58%, rgba(143,57,22,.07), transparent 34rem),
    radial-gradient(circle at 92% 68%, rgba(95,120,92,.035), transparent 30rem),
    linear-gradient(180deg, #100e0e 0%, #0c0c0e 46%, #08090b 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}


button, input, textarea, select { font: inherit; }

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


a { color: inherit; }

code, pre {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(calc(100% - 40px), var(--shell));
  margin-inline: auto;
}

.ambient {
  position: fixed;
  inset: -200px auto auto -200px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(239,116,46,.11), rgba(209,170,104,.025) 48%, transparent 72%);
  filter: blur(88px);
  pointer-events: none;
  z-index: -1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(209,170,104,.085);
  background: rgba(12,11,12,.91);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #57331f;
  border-radius: 11px 11px 11px 5px;
  background: linear-gradient(145deg, rgba(239,116,46,.22), rgba(91,35,10,.18));
  color: #ffc195;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .05em;
}

.brand-word {
  display: block;
  font-weight: 900;
  letter-spacing: -.02em;
}

.brand-subtitle {
  display: block;
  color: var(--subtle);
  font-size: .68rem;
  line-height: 1.1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 8px 10px;
  color: #b5b8bf;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 750;
  letter-spacing: .005em;
  border-radius: 8px;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,.045);
}

.nav-toggle {
  display: none;
  width: 39px;
  height: 36px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel);
  cursor: pointer;
}

.nav-toggle > span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: #aeb1b6;
  border-radius: 2px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
  align-items: center;
  gap: 66px;
  min-height: 640px;
  padding-block: 70px;
}

.hero-copy { max-width: 660px; }

.hero-logo-placeholder {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.wyrm-ring {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px 18px 18px 8px;
  border: 1px solid #673a21;
  background: linear-gradient(145deg, rgba(239,116,46,.25), rgba(110,42,12,.18));
  color: #ffc39c;
  font-weight: 950;
  letter-spacing: .04em;
}

.hero-brand {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: .16em;
}

.hero-kicker {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .8rem;
}

.hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.7rem, 5.2vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.hero-lead {
  max-width: 650px;
  margin: 24px 0;
  color: #b8bbc2;
  font-size: 1.08rem;
}

.hero-note {
  margin: 12px 0 0;
  color: var(--subtle);
  font-size: .82rem;
}

.card {
  border: 1px solid #302d2d;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(25,22,21,.96), rgba(16,16,19,.97));
  box-shadow: var(--shadow);
}

.install-strip {
  display: flex;
  align-items: center;
  width: min(100%, 600px);
  gap: 10px;
  padding: 12px 12px 12px 15px;
  border: 1px solid #3a302b;
  border-radius: 11px;
  background: linear-gradient(180deg, #12100f, #0c0c0e);
}

.install-strip code {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  color: #e8e4de;
  font-size: .86rem;
}

.prompt { color: var(--ember-bright); font-weight: 900; }

.copy-button {
  border: 1px solid #493528;
  border-radius: 8px;
  background: rgba(239,116,46,.075);
  color: #d9b49a;
  padding: 7px 10px;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-button:hover {
  border-color: #71452c;
  color: #ffd0b1;
}

.copy-button.copied {
  border-color: #405b47;
  color: #a8d5b3;
}

.hero-code { overflow: hidden; box-shadow: 0 22px 70px rgba(0,0,0,.34); }

.code-window-bar {
  min-height: 43px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #382c26;
  background: linear-gradient(180deg, #1b1715, #141314);
  color: #aa9b8f;
  font-family: monospace;
  font-size: .72rem;
}

.window-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6e3b24;
}

.window-dot:nth-of-type(2) { background: #9d6334; }
.window-dot:nth-of-type(3) { background: #b89555; }
.window-dot:last-of-type { margin-right: 6px; }

pre {
  margin: 0;
  overflow: auto;
}

.hero-code pre {
  padding: 27px;
  background:
    linear-gradient(180deg, #171310, #111113);
  color: #e7ddd0;
  font-size: clamp(.77rem, 1.05vw, .9rem);
  line-height: 1.8;
}

.code-caption {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .78rem;
}

/* ByteWyrm "forge" syntax palette.
   Warm tokens stay distinct without turning every line the same orange. */
pre code {
  color: #e7ddd0;
}

.syn-keyword { color: #ff8d4c; font-weight: 650; }
.syn-string { color: #d7a56a; }
.syn-number { color: #f0c96f; }
.syn-function { color: #ffd083; }
.syn-type { color: #e58a49; }
.syn-namespace { color: #c99055; }
.syn-variable { color: #eadcc8; }
.syn-constant { color: #ffad5f; }
.syn-comment { color: #8f7a62; font-style: italic; }

.section {
  padding-block: 86px;
  scroll-margin-top: 72px;
}

/* Add the dashboard-style scallop pattern to alternating sections,
   starting with the second section on the page (Quick Start). */
main > section:nth-of-type(even) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

main > section:nth-of-type(even)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .11;
  background-image:
    radial-gradient(ellipse at 50% 100%, transparent 0 46%, rgba(118,137,112,.18) 47% 50%, transparent 51%),
    radial-gradient(ellipse at 50% 0%, transparent 0 46%, rgba(118,137,112,.14) 47% 50%, transparent 51%);
  background-size: 76px 44px;
  background-position: 0 0, 38px 22px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.88), rgba(0,0,0,.6) 42%, transparent 100%);
}

main > section:nth-of-type(even) > * {
  position: relative;
  z-index: 1;
}

.section-panel {
  position: relative;
  border-block: 1px solid rgba(209,170,104,.07);
  background:
    radial-gradient(circle at 86% 12%, rgba(209,170,104,.035), transparent 26rem),
    radial-gradient(circle at 8% 80%, rgba(239,116,46,.025), transparent 24rem),
    linear-gradient(180deg, rgba(44,27,19,.10), rgba(20,18,19,.16));
  overflow: hidden;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-kicker {
  margin: 0;
  color: var(--ember-bright);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .15em;
}

.section-heading h2,
.safety-card h2 {
  margin: 5px 0 10px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.section-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.steps,
.docs-grid,
.rule-grid,
.example-grid,
.host-grid,
.link-grid {
  display: grid;
  gap: 16px;
}

.steps { grid-template-columns: repeat(2, 1fr); }

.step {
  min-height: 220px;
  padding: 24px;
  align-content: start;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(239,116,46,.2);
  border-radius: 9px;
  background: rgba(239,116,46,.08);
  color: var(--ember-bright);
  font-size: .75rem;
  font-weight: 900;
}

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

.step > p {
  margin: 0 0 16px;
  color: var(--muted);
}

.step code { color: var(--gold); }

.step pre,
.doc-card pre,
.example-card pre,
.host-card pre {
  padding: 16px;
  border: 1px solid #3a302b;
  border-radius: 10px;
  background:
    linear-gradient(180deg, #171310, #111113);
  color: #e7ddd0;
  line-height: 1.7;
  font-size: .8rem;
}

.inline-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid #3a302b;
  border-radius: 10px;
  background: #0a0c0f;
}

.inline-code-row code {
  flex: 1;
  color: #dfdbd5;
  overflow-x: auto;
  white-space: nowrap;
}

.copy-button.compact { padding: 5px 8px; }

.note {
  margin-top: 20px;
  padding: 16px 20px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  border-color: #343942;
  box-shadow: none;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}

.note strong { color: #ddd7cf; }

.note code { color: var(--gold); }

.docs-grid { grid-template-columns: repeat(2, 1fr); }

.doc-card,
.example-card,
.rule-card,
.host-card {
  padding: 23px;
  box-shadow: none;
}

.method {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.method code {
  color: var(--ember-bright);
  font-weight: 900;
}

.method span {
  color: var(--subtle);
  font-size: .72rem;
}

.doc-card > p,
.rule-card p,
.host-card p {
  color: var(--muted);
  font-size: .9rem;
}

.wide-doc { grid-column: 1 / -1; }

.split-code {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.split-code small {
  display: block;
  margin-bottom: 6px;
  color: var(--subtle);
  font-size: .74rem;
}

.rule-grid { grid-template-columns: repeat(4, 1fr); }

.rule-card {
  min-height: 138px;
  padding: 24px;
}

.rule-card h3 {
  margin: 0 0 9px;
  font-size: 1rem;
}

.rule-card p { margin: 0; }

.rule-card code { color: var(--gold); }

.example-grid { grid-template-columns: repeat(3, 1fr); }

.example-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.example-card pre { min-height: 235px; }

.safety-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 23px;
  padding: 31px 34px;
  border: 1px solid #594426;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(209,170,104,.09), rgba(239,116,46,.035), rgba(17,19,23,.93));
}

.safety-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(209,170,104,.3);
  border-radius: 14px;
  background: rgba(209,170,104,.1);
  color: #e9c57f;
  font-size: 1.15rem;
  font-weight: 950;
}

.safety-card h2 { font-size: 2.15rem; }

.safety-card p {
  max-width: 900px;
  color: #b8b4ac;
}

.host-grid { grid-template-columns: repeat(3, 1fr); }

.host-card {
  padding: 24px;
}

.host-card h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.host-card p { margin-bottom: 0; }

.host-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.host-note {
  color: var(--subtle);
  font-size: .83rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 9px;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 850;
}

.button-primary {
  border-color: #754127;
  background: rgba(239,116,46,.12);
  color: #ffd0b1;
}

.button-secondary {
  background: #111419;
  color: #c5c8cd;
}

.links-section { padding-bottom: 96px; }

.link-grid { grid-template-columns: repeat(2, 1fr); }

.link-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #302d2d;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(36,27,22,.55), rgba(17,18,21,.82));
  text-decoration: none;
}

.link-card:hover {
  border-color: var(--border-warm);
  background: rgba(239,116,46,.035);
}

.link-icon {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 1px solid #30343c;
  border-radius: 10px;
  background: #0a0c0f;
  color: var(--gold);
  font-family: monospace;
  font-size: .7rem;
  font-weight: 900;
}

.link-card strong,
.link-card small { display: block; }

.link-card small {
  margin-top: 2px;
  color: var(--muted);
}

.link-arrow { color: var(--subtle); }

.site-footer {
  border-top: 1px solid rgba(255,255,255,.055);
  background: #08090b;
}

.footer-inner {
  min-height: 120px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-inner p {
  margin-right: auto;
  color: var(--subtle);
  font-size: .84rem;
}

.footer-inner > a {
  color: var(--muted);
  text-decoration: none;
  font-size: .8rem;
}

.footer-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px 9px 9px 4px;
  font-size: .62rem;
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 40px;
  }

  .hero-code {
    width: 100%;
    max-width: 760px;
  }

  .rule-grid { grid-template-columns: repeat(2, 1fr); }
  .example-grid, .host-grid { grid-template-columns: 1fr; }
  .example-card pre { min-height: 0; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, var(--shell)); }

  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 14px;
    right: 14px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(14,16,20,.98);
    box-shadow: var(--shadow);
  }

  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 12px; }

  .brand-subtitle { display: none; }

  .hero {
    padding-block: 52px 44px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 12vw, 4.25rem);
  }

  .section { padding-block: 67px; }

  .steps,
  .docs-grid,
  .rule-grid,
  .link-grid,
  .split-code {
    grid-template-columns: 1fr;
  }

  .wide-doc { grid-column: auto; }

  .safety-card {
    grid-template-columns: 1fr;
    padding: 25px;
  }

  .footer-inner {
    flex-wrap: wrap;
    padding-block: 24px;
    gap: 12px 18px;
  }

  .footer-inner p {
    width: 100%;
    order: 3;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .hero-logo-placeholder {
    align-items: flex-start;
  }

  .wyrm-ring {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
  }

  .install-strip {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .install-strip .copy-button {
    grid-column: 1 / -1;
  }

  .hero-code pre {
    padding: 20px 18px;
    font-size: .73rem;
  }

  .step,
  .doc-card,
  .example-card,
  .rule-card,
  .host-card {
    padding: 20px;
  }

  .host-links .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
