/* CodeOrch — orchestra pit / cue-light rehearsal hall */
/* data-redesign="orchestra-pit-cuelight-20260824" */

:root {
  --pit: #14100e;
  --pit-2: #1c1512;
  --walnut: #3a2418;
  --velvet: #6b1e2c;
  --score: #f4ead0;
  --paper: #fbf4e4;
  --staff: #d4c4a0;
  --ink: #1a120e;
  --mute: #6e5e4e;
  --brass: #c9a227;
  --brass-hot: #e8c45a;
  --cue-r: #ff5f57;
  --cue-y: #febc2e;
  --cue-g: #28c840;
  --rule: rgba(201, 162, 39, 0.28);
  --hair: #e4d6b6;
  --max: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: rgba(107, 30, 44, 0.22); color: var(--ink); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  background:
    radial-gradient(ellipse 70% 28% at 50% -8%, rgba(201, 162, 39, 0.16), transparent 52%),
    repeating-linear-gradient(
      to bottom,
      transparent 0 8px,
      rgba(107, 30, 44, 0.07) 8px 9px,
      transparent 9px 16px,
      rgba(107, 30, 44, 0.07) 16px 17px,
      transparent 17px 24px,
      rgba(107, 30, 44, 0.07) 24px 25px,
      transparent 25px 32px,
      rgba(107, 30, 44, 0.07) 32px 33px,
      transparent 33px 40px,
      rgba(107, 30, 44, 0.07) 40px 41px,
      transparent 41px 76px
    ),
    var(--score);
}

h1, h2, h3 {
  font-family: var(--serif);
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 650;
}
h1 { margin: 0 0 1rem; font-size: clamp(2.35rem, 5vw, 3.55rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.14rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
code { font-family: var(--mono); font-size: 0.9em; }
button, input, select, textarea { font-family: inherit; }

a { color: var(--velvet); }
a:hover { color: var(--walnut); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.wrap { width: min(var(--max), calc(100% - 4.5rem)); margin: 0 auto; }

.pit-rails {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(74, 21, 32, 0.16) 0, rgba(74, 21, 32, 0.16) 18px, transparent 18px),
    linear-gradient(-90deg, rgba(74, 21, 32, 0.16) 0, rgba(74, 21, 32, 0.16) 18px, transparent 18px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
  background: rgba(244, 234, 208, 0.92);
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 650;
  letter-spacing: -0.03em;
  font-size: 1.18rem;
}
.wordmark svg { width: 30px; height: 30px; display: block; }
.wordmark .baton { transform-origin: 8px 22px; transition: transform 280ms var(--ease); }
.wordmark:hover .baton { transform: rotate(-12deg); }

.nav-toggle {
  display: none;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}
.nav-list a { text-decoration: none; color: var(--ink); }
.nav-list a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brass); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--ink);
  color: var(--score) !important;
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 4px;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 200ms var(--ease);
}
.btn:hover { background: var(--velvet); border-color: var(--velvet); }
.btn-ghost {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--paper); }
.btn-brass {
  background: var(--brass);
  color: var(--ink) !important;
  border-color: var(--brass);
}
.btn-brass:hover { background: var(--brass-hot); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--velvet);
  margin-bottom: 0.7rem;
}
.cues { display: inline-flex; gap: 5px; }
.cue {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.cue.r { background: var(--cue-r); animation: wink 2.8s ease-in-out infinite; }
.cue.y { background: var(--cue-y); animation: wink 2.8s ease-in-out 0.4s infinite; }
.cue.g { background: var(--cue-g); animation: wink 2.8s ease-in-out 0.9s infinite; }
@keyframes wink {
  0%, 72%, 100% { opacity: 1; }
  80% { opacity: 0.35; }
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 3rem;
  align-items: center;
  padding: 3.4rem 0 2.4rem;
}
.lede { font-size: 1.12rem; color: var(--mute); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.3rem 0 0.8rem; }
.hero-note {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--mute);
}

.stand {
  position: relative;
  background: var(--walnut);
  border-radius: 10px 10px 4px 4px;
  padding: 10px 10px 0;
  box-shadow:
    0 28px 60px rgba(20, 16, 14, 0.28),
    inset 0 1px 0 rgba(232, 196, 90, 0.25);
}
.stand::after {
  content: "";
  display: block;
  width: 18px;
  height: 42px;
  margin: 0 auto;
  background: linear-gradient(#5a3a24, #2a1810);
  clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
}
.stand-plate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.7rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-hot);
}
.win {
  background: var(--pit);
  color: #e8dcc4;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #2a211c;
  padding: 0.55rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #b8a888;
}
.win-body { padding: 0.85rem 0.95rem 1rem; font-family: var(--mono); font-size: 0.78rem; }
.lane {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.42rem 0.5rem;
  border-left: 3px solid transparent;
  margin-bottom: 0.28rem;
}
.lane.play {
  background: rgba(40, 200, 64, 0.08);
  border-left-color: var(--cue-g);
  animation: play 2.2s ease-in-out infinite;
}
.lane.wait { border-left-color: var(--cue-y); background: rgba(254, 188, 46, 0.07); }
.lane.done { border-left-color: var(--brass); }
.lane .plus, .plus { color: #7dcea0; }
.lane .minus, .minus { color: #e08a7a; }
@keyframes play {
  0%, 100% { background: rgba(40, 200, 64, 0.06); }
  50% { background: rgba(40, 200, 64, 0.14); }
}

.section { position: relative; z-index: 1; padding: 3.2rem 0; }
.section-head { max-width: 46rem; margin-bottom: 1.6rem; }
.sub { color: var(--mute); }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 0 1px 0 rgba(201, 162, 39, 0.18);
}
.card svg { width: 100%; height: 72px; margin: 0.2rem 0 0.7rem; }
.card p { color: var(--mute); font-size: 0.95rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.step {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 1.15rem 1.2rem;
}
.step .n {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--velvet);
  margin-bottom: 0.5rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  align-items: start;
}

.agent-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}
.pill {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--hair);
  border-radius: 99px;
  background: var(--paper);
}

.sec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.sec-grid article {
  background: var(--pit);
  color: #e8dcc4;
  border-radius: 8px;
  padding: 1.2rem;
}
.sec-grid h3 { color: var(--brass-hot); }
.sec-grid p { color: #c4b49a; }

.cli {
  background: var(--pit);
  color: #e8dcc4;
  border-radius: 8px;
  padding: 1rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  overflow: auto;
}
.cli .ok { color: var(--cue-g); }
.cli .dim { color: #8a7a68; }
.cli .cmd { color: var(--brass-hot); }

.faq details {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "♩ "; color: var(--brass); }
.faq details[open] summary { margin-bottom: 0.45rem; }
.faq details p { color: var(--mute); }

.cta-band {
  background: var(--pit);
  color: var(--score);
  border-radius: 10px;
  padding: 2rem 2.1rem;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 1.4rem;
  align-items: center;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: #c4b49a; }
.install {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: #2a211c;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  color: var(--brass-hot);
}

.page { position: relative; z-index: 1; padding: 3rem 0 4rem; }
.page h1 { max-width: 22ch; }
.page .lede { margin-bottom: 1.6rem; }

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.4rem 0 2rem;
}
.plan.featured { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }
.price {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: 0.2rem 0 0.6rem;
}

.doc-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
}
.doc-side ul { list-style: none; margin: 0; padding: 0; }
.doc-side a { text-decoration: none; color: var(--ink); font-size: 0.92rem; }
.doc-side li { margin: 0.45rem 0; }
.endpoint {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--pit);
  color: var(--brass-hot);
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
}

.posts, .log, .crew { display: grid; gap: 1rem; }
.post, .log-item, .crew article {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 1.15rem 1.25rem;
}
.post .when, .log-item .when {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--velvet);
}

.measure {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--mute);
  border-top: 1px dashed var(--staff);
  padding-top: 0.7rem;
  margin-top: 0.8rem;
}

form { display: grid; gap: 0.65rem; max-width: 28rem; margin-top: 1.2rem; }
label { font-size: 0.82rem; color: var(--mute); }
input, textarea {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}

.site-footer {
  position: relative;
  z-index: 1;
  background: var(--pit);
  color: #c4b49a;
  padding: 2.4rem 0 1.6rem;
  margin-top: 1rem;
}
.site-footer a { color: var(--brass-hot); }
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}
.site-footer h3 { color: var(--score); font-size: 0.95rem; font-family: var(--serif); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.3rem 0; }
.legal {
  border-top: 1px solid rgba(201, 162, 39, 0.18);
  padding-top: 1rem;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 480ms var(--ease), transform 480ms var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 800px) {
  .wrap { width: min(var(--max), calc(100% - 1.5rem)); }
  .nav-toggle { display: inline-block; }
  .site-header nav { width: 100%; }
  .header-inner { flex-wrap: wrap; }
  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.6rem;
  }
  .nav-list.is-open { display: flex; }
  .hero, .facts, .steps, .split, .sec-grid, .cta-band, .plans, .doc-layout, .foot-grid {
    grid-template-columns: 1fr;
  }
  .lane { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cue, .lane.play, .reveal, .wordmark .baton { animation: none; transition: none; }
  .reveal { opacity: 1; transform: none; }
}
