/* RubyClaw — rubyclaw.lol
   Hand-written. No external requests, no fonts to fetch, no JS libraries.
   Build: 20261002T070704Z */

/* ---------- tokens ---------- */
:root {
  --bg:        #0a0a0b;
  --bg-alt:    #0e0e10;
  --panel:     #101013;
  --panel-2:   #15151a;
  --ink:       #f4f2ef;
  --muted:     #a7a29b;
  --faint:     #6f6b66;
  --line:      rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);

  --ruby:      #ff4d3d;
  --ruby-dim:  #c3372b;
  --amber:     #ffb057;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", "Cascadia Mono",
          Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 1160px;
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  letter-spacing: 0.004em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }

/* ---------- background treatment (cheap, static, CSS-only) ---------- */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
body::before {   /* aurora wash */
  background-image:
    radial-gradient(1100px 640px at 80% -10%, rgba(255, 77, 61, 0.17), transparent 62%),
    radial-gradient(880px 560px at 8% 2%,    rgba(255, 176, 87, 0.07), transparent 64%),
    radial-gradient(1300px 820px at 50% 112%, rgba(255, 77, 61, 0.08), transparent 60%);
}
body::after {    /* faint grid, masked to the top */
  background-image:
    linear-gradient(to right,  rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 74px 74px;
  -webkit-mask-image: radial-gradient(125% 95% at 50% 0%, #000 26%, transparent 76%);
          mask-image: radial-gradient(125% 95% at 50% 0%, #000 26%, transparent 76%);
}
.site-head, main, .site-foot { position: relative; z-index: 1; }

/* ---------- layout ---------- */
.wrap { width: min(var(--wrap), 100% - 2.75rem); margin-inline: auto; }
.section { padding: clamp(4.5rem, 9vw, 8.5rem) 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255,255,255,0.018) 12%, rgba(255,255,255,0.018) 88%, transparent); }

/* ---------- skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ruby); color: #150604;
  padding: 0.65rem 1rem; border-radius: 0 0 8px 0; z-index: 50;
  font-weight: 600;
}
.skip:focus { left: 0; }

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ruby);
  outline-offset: 3px;
  border-radius: 5px;
}

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 11, 0.86);
  border-bottom: 1px solid var(--line-soft);
}
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.claw { flex: none; width: 26px; height: 26px; }
.hero-mark { width: 56px; height: 56px; flex: none; }
.foot-mark { width: 26px; height: 26px; flex: none; }
.wordmark { font-weight: 700; letter-spacing: -0.02em; font-size: 1.15rem; }
.wordmark span { color: var(--ruby); }
.site-nav { display: flex; align-items: center; gap: 1.7rem; font-size: 0.925rem; }
.site-nav a { color: var(--muted); transition: color 0.18s var(--ease); }
.site-nav a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--line);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-cta:hover { border-color: var(--ruby); color: var(--ruby) !important; }

/* ---------- hero ---------- */
.hero { padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(4rem, 8vw, 7rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: clamp(1.9rem, 4vw, 2.7rem);
}
.hero-brand-text { display: flex; flex-direction: column; gap: 0.4rem; }
.hero-wordmark { font-size: 1.5rem; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--ruby);
}
.hero h1 {
  font-size: clamp(2.5rem, 6.1vw, 4.35rem);
  line-height: 1.03;
  letter-spacing: -0.032em;
  font-weight: 700;
  text-wrap: balance;
  max-width: 15ch;
}
.lede {
  margin-top: 1.75rem;
  font-size: clamp(1.05rem, 1.5vw, 1.19rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 52ch;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.25rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.82rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.975rem;
  border: 1px solid transparent;
  transition: transform 0.16s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn-primary { background: var(--ruby); color: #180604; }
.btn-primary:hover { background: #ff6252; transform: translateY(-1px); }
.btn-primary .arrow { transition: transform 0.16s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--ruby); color: var(--ruby); transform: translateY(-1px); }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem;
  margin-top: 2.1rem;
  font-family: var(--mono);
  font-size: 0.79rem;
  color: var(--faint);
}
.hero-meta li { position: relative; padding-left: 1.05rem; }
.hero-meta li::before {
  content: ""; position: absolute; left: 0; top: 0.52em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--ruby); opacity: 0.75;
}

/* ---------- terminal ---------- */
.term {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255,255,255,0.02) inset;
  overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.018);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); opacity: 0.5; flex: none; }
.dot:first-child { background: var(--ruby); opacity: 0.85; }
.term-title {
  margin-left: 0.6rem;
  font-family: var(--mono); font-size: 0.74rem; color: var(--faint);
}
.term-body {
  margin: 0;
  padding: 1.15rem 1.2rem 1.3rem;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.85;
  color: #ded9d3;
  overflow-x: auto;
  white-space: pre;
}
.term-body .p { color: var(--ruby); }
.term-body .c { color: var(--faint); }
.copy {
  margin-left: auto;
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.24rem 0.6rem;
  cursor: pointer;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.copy:hover { color: var(--ink); border-color: var(--ruby); }
.copy-status { font-family: var(--mono); font-size: 0.74rem; color: var(--ruby); padding: 0 1.2rem 0.9rem; min-height: 0; }

/* ---------- section heads ---------- */
.section-head { margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }
.section-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ruby);
  margin-bottom: 0.9rem;
}
.section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 700;
  text-wrap: balance;
  max-width: 22ch;
}

/* ---------- features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 5vw, 4rem);
}
.feature {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.1rem;
}
.feature-wide { grid-column: 1 / -1; }
.feature-idx {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ruby);
  margin-bottom: 0.9rem;
}
.feature h3 {
  font-size: 1.16rem;
  letter-spacing: -0.012em;
  font-weight: 650;
  margin-bottom: 0.55rem;
}
.feature-wide h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.feature p { color: var(--muted); max-width: 60ch; font-size: 0.99rem; }
.feature code {
  font-size: 0.86em;
  color: var(--ink);
  background: rgba(255, 77, 61, 0.09);
  border: 1px solid rgba(255, 77, 61, 0.16);
  padding: 0.06em 0.34em;
  border-radius: 5px;
}
.feature-foot {
  margin-top: 1.6rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--faint);
}

/* ---------- steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(1.8rem, 4vw, 3.2rem);
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.95rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
}
.step-idx {
  font-family: var(--mono); font-size: 0.76rem;
  color: var(--ruby); padding-top: 0.2rem;
}
.step h3 { font-size: 1.03rem; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 0.35rem; }
.step p { color: var(--muted); font-size: 0.93rem; }
.step code { font-size: 0.84em; color: var(--ink); }

/* ---------- install ---------- */
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2.2rem, 5vw, 4.5rem);
  align-items: start;
}
.install-copy p { color: var(--muted); max-width: 46ch; }
.notes { margin-top: 1.9rem; display: grid; gap: 0.85rem; }
.notes li {
  position: relative; padding-left: 1.5rem;
  color: var(--muted); font-size: 0.94rem; max-width: 48ch;
}
.notes li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 1px; background: var(--ruby);
}
.notes strong { color: var(--ink); font-weight: 600; }
.install-grid .section-head { margin-bottom: 1.6rem; }

/* ---------- license ---------- */
.license-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2.2rem, 5vw, 4.5rem);
  align-items: start;
}
.license-grid p { color: var(--muted); max-width: 54ch; margin-bottom: 1.15rem; }
.license-grid strong { color: var(--ink); font-weight: 600; }
.license-grid a { color: var(--ruby); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.license-link { margin-top: 1.6rem; }
.text-link { font-weight: 600; }
.license-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.7rem 1.8rem;
}
.license-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.95rem 1.4rem; }
.license-card dt {
  font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ruby); padding-top: 0.22rem;
}
.license-card dd { font-size: 0.93rem; color: var(--muted); }
.license-card code { font-size: 0.85em; color: var(--ink); }

/* ---------- repo links ---------- */
.repo-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.repo-link {
  display: flex; flex-direction: column; gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  padding: 1.6rem 1.5rem 1.7rem;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.repo-link:hover { border-color: var(--ruby); transform: translateY(-3px); }
.repo-kicker {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--ruby);
}
.repo-name { font-family: var(--mono); font-size: 0.95rem; color: var(--ink); word-break: break-word; }
.repo-desc { color: var(--muted); font-size: 0.89rem; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 3.2rem 0 2.4rem;
  background: linear-gradient(180deg, transparent, rgba(255,77,61,0.035));
}
.foot-inner {
  display: flex; flex-wrap: wrap; gap: 2rem 4rem;
  justify-content: space-between; align-items: flex-start;
}
.foot-lockup { display: inline-flex; align-items: center; gap: 0.6rem; }
.foot-lockup .wordmark { font-size: 1.18rem; color: var(--ink); }
.foot-brand > p:not(.foot-lockup) { color: var(--faint); font-size: 0.9rem; margin-top: 0.6rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.7rem 1.6rem; font-size: 0.9rem; }
.foot-nav a { color: var(--muted); transition: color 0.18s var(--ease); }
.foot-nav a:hover { color: var(--ruby); }
.foot-base {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: baseline;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft);
}
.signoff, .support { font-size: 0.87rem; color: var(--faint); }
.signoff strong { color: var(--muted); font-weight: 600; letter-spacing: 0.01em; }
.signoff em { color: var(--faint); font-style: italic; }
.foot-legal { font-family: var(--mono); font-size: 0.74rem; color: var(--faint); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .install-grid, .license-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 18ch; }
  .hero-terminal { max-width: 640px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .repo-links { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .feature-wide { grid-column: auto; }
  .term-body { font-size: 0.74rem; }
  .hero-terminal .term-body { white-space: pre-wrap; overflow-wrap: anywhere; }
}
@media (max-width: 460px) {
  body { font-size: 1rem; }
  .wrap { width: min(var(--wrap), 100% - 2rem); }
  .cta-row .btn { flex: 1 1 100%; justify-content: center; }
}

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

.support { font-size: 0.87rem; color: var(--faint); }
.support a { color: var(--faint); text-decoration: underline; }
.support a:hover { color: var(--ruby, #ff4d3d); }
