/* CodeRight — marketing site. Tokens extracted from the app shell (calm warm-neutral, one copper accent). */

:root {
  --bg: #121211;
  --panel: #161513;
  --raised: #1D1B18;
  --inset: #0E0D0C;
  --line: rgba(255, 248, 236, .07);
  --line-2: rgba(255, 248, 236, .04);
  --line-3: rgba(255, 248, 236, .12);
  --text: #ECE9E3;
  --text-2: #A6A097;
  --text-3: #6E695F;
  --accent: #C8794A;
  --accent-hover: #D38554;
  --accent-soft: rgba(200, 121, 74, .13);
  --verified: #7E9B82;
  --on-accent: #1A1410;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); }

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

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--on-accent);
  padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- nav ---- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(18, 18, 17, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 18px; height: 62px; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -.01em; font-size: 16px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 16px; height: 16px; border-radius: 5px; background: var(--accent); opacity: .92; display: inline-block; }
.nav-links { display: flex; gap: 22px; margin-left: 10px; }
.nav-links a { color: var(--text-2); font-size: 14.5px; }
.nav-links a:hover { color: var(--text); }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ui); font-size: 14.5px; font-weight: 500;
  padding: 9px 17px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line-3); background: transparent; color: var(--text-2);
  transition: background .15s ease, color .15s ease, border-color .15s ease, filter .15s ease;
}
.button:hover { background: var(--raised); color: var(--text); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.button.primary:hover { background: var(--accent); filter: brightness(1.07); color: var(--on-accent); }
.button.lg { padding: 12px 22px; font-size: 15.5px; }

/* ---- hero ---- */
.hero { position: relative; padding: 92px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -160px; left: 50%; transform: translateX(-50%);
  width: 720px; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(200,121,74,.14), rgba(200,121,74,0) 70%);
  filter: blur(6px);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 52px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-3); border: 1px solid var(--line-3); border-radius: 999px; padding: 5px 12px; margin-bottom: 22px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.06; letter-spacing: -.025em; font-weight: 700; margin: 0 0 20px; }
h1 .em { color: var(--accent); }
.lede { font-size: 18.5px; line-height: 1.6; color: var(--text-2); margin: 0 0 30px; max-width: 30em; }
.hero-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--text-3); margin-top: 16px; }
.hero-note .mono { color: var(--text-2); }

/* ---- app preview (faithful miniature of the shell) ---- */
.preview {
  border: 1px solid var(--line-3); border-radius: 14px; overflow: hidden;
  background: var(--bg); box-shadow: 0 24px 70px rgba(0,0,0,.5); font-size: 12px;
}
.pv-bar { display: flex; align-items: center; gap: 7px; padding: 10px 13px; background: var(--panel); border-bottom: 1px solid var(--line); }
.pv-bar .tl { width: 9px; height: 9px; border-radius: 50%; background: var(--raised); }
.pv-bar .tt { margin-left: 8px; color: var(--text-3); font-size: 11.5px; }
.pv-body { display: grid; grid-template-columns: 150px 1fr; min-height: 318px; }
.pv-side { background: var(--panel); border-right: 1px solid var(--line); padding: 12px 9px; }
.pv-brand { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12.5px; margin-bottom: 13px; }
.pv-brand .mk { width: 12px; height: 12px; border-radius: 4px; background: var(--accent); opacity: .9; }
.pv-new { color: var(--text-3); border: 1px solid var(--line-3); border-radius: 7px; padding: 6px 9px; font-size: 11px; margin-bottom: 13px; }
.pv-grp { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 6px 8px 5px; }
.pv-sess { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; color: var(--text-2); font-size: 11.5px; }
.pv-sess.on { background: var(--raised); color: var(--text); }
.pv-sess .st { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); flex: none; }
.pv-sess .st.run { background: var(--verified); }
.pv-sess .st.need { background: var(--accent); }
.pv-sess .mdl { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--text-3); }
.pv-main { display: flex; flex-direction: column; }
.pv-hdr { display: flex; align-items: center; gap: 9px; padding: 11px 15px; border-bottom: 1px solid var(--line); font-size: 12px; }
.pv-hdr .crumb { color: var(--text-3); }
.pv-hdr .pill { margin-left: auto; font-size: 10.5px; color: var(--text-2); border: 1px solid var(--line-3); border-radius: 999px; padding: 3px 9px; }
.pv-stream { padding: 14px 16px; display: flex; flex-direction: column; gap: 11px; }
.pv-you { align-self: flex-end; max-width: 78%; background: var(--raised); border-radius: 12px; padding: 9px 12px; color: var(--text); font-size: 12px; }
.pv-role { font-size: 10px; color: var(--text-3); margin-bottom: 5px; }
.pv-step { display: flex; align-items: flex-start; gap: 9px; color: var(--text-2); font-size: 11.5px; }
.pv-step .ic { width: 16px; height: 16px; flex: none; border-radius: 5px; background: var(--raised); display: grid; place-items: center; font-size: 10px; color: var(--text-3); }
.pv-step b { color: var(--text); font-weight: 500; }
.pv-step .det { color: var(--text-3); font-family: var(--mono); font-size: 10px; }
.pv-peek { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.pv-peek .ph { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-bottom: 1px solid var(--line-2); font-family: var(--mono); font-size: 10.5px; color: var(--text-2); }
.pv-peek .ph .ev { margin-left: auto; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; font-family: var(--ui); font-size: 10px; }
.pv-peek .ph .ev .d { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.pv-peek .code { font-family: var(--mono); font-size: 10.5px; line-height: 1.7; padding: 9px 11px; }
.pv-peek .code .a { color: var(--verified); }
.pv-peek .code .x { color: #B0766A; }
.pv-comp { margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--line); }
.pv-cbox { border: 1px solid var(--line-3); border-radius: 11px; background: var(--raised); padding: 9px 12px; color: var(--text-3); font-size: 11.5px; display: flex; align-items: center; }
.pv-cbox .send { margin-left: auto; width: 22px; height: 22px; border-radius: 7px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 12px; }

/* ---- sections ---- */
section.band { padding: 76px 0; border-top: 1px solid var(--line); }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.14; letter-spacing: -.02em; font-weight: 700; margin: 0 0 16px; }
.section-lede { font-size: 17px; color: var(--text-2); max-width: 40em; margin: 0 0 8px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
.card { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 26px; }
.card .ico { width: 34px; height: 34px; border-radius: 9px; background: var(--raised); border: 1px solid var(--line-3); display: grid; place-items: center; color: var(--accent); font-size: 16px; margin-bottom: 16px; }
.card h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 8px; }
.card p { color: var(--text-2); font-size: 15px; margin: 0; }
.card .mono { color: var(--text-3); font-size: 13px; }

/* model strip */
.models { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip { font-family: var(--mono); font-size: 13px; color: var(--text-2); border: 1px solid var(--line-3); border-radius: 999px; padding: 7px 14px; }
.chip .via { color: var(--text-3); }

/* principles list */
.principles { margin-top: 36px; display: flex; flex-direction: column; gap: 2px; }
.principle { display: grid; grid-template-columns: 26px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.principle:last-child { border-bottom: 0; }
.principle .n { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 2px; }
.principle h3 { font-size: 17px; font-weight: 600; margin: 0 0 5px; letter-spacing: -.01em; }
.principle p { color: var(--text-2); font-size: 15px; margin: 0; max-width: 52em; }

/* ---- waitlist ---- */
.waitlist { text-align: center; }
.waitlist h2 { margin-bottom: 14px; }
.waitlist .section-lede { margin: 0 auto 6px; }
.wl-card { max-width: 480px; margin: 30px auto 0; text-align: left; background: var(--panel); border: 1px solid var(--line-3); border-radius: 14px; padding: 26px; }
.wl-row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.wl-row label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.wl-row input, .wl-row select, .wl-row textarea {
  font: inherit; font-size: 15px; padding: 11px 13px; border: 1px solid var(--line-3);
  border-radius: 9px; background: var(--inset); color: var(--text); width: 100%;
}
.wl-row input::placeholder, .wl-row textarea::placeholder { color: var(--text-3); }
.wl-row input:focus, .wl-row select:focus, .wl-row textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wl-row textarea { min-height: 80px; resize: vertical; }
.wl-card .button.primary { width: 100%; }
.wl-help { font-size: 12.5px; color: var(--text-3); margin: 8px 0 0; }
.wl-status { font-size: 13.5px; margin: 12px 0 0; min-height: 1.2em; color: var(--verified); }
.wl-status.error { color: #C46A3D; }
.wl-step-two { display: none; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.wl-step-two.visible { display: block; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--text-3); font-size: 14px; }
.foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot .brand { font-size: 15px; }
.foot-links { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.foot-links a { color: var(--text-3); font-size: 14px; }
.foot-links a:hover { color: var(--accent); }
.foot-fine { margin-top: 18px; font-size: 12.5px; color: var(--text-3); }

/* ---- legal pages ---- */
.legal { padding: 64px 0 80px; }
.legal h1 { font-size: 34px; margin-bottom: 8px; }
.legal .updated { color: var(--text-3); font-size: 14px; margin-bottom: 36px; font-family: var(--mono); }
.legal h2 { font-size: 21px; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--text-2); font-size: 16px; }
.legal a { color: var(--accent); }
.legal ul { padding-left: 22px; }

/* ---- responsive ---- */
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .preview { order: 2; }
  .grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .nav-actions .button.secondary { display: none; }
  .hero { padding: 60px 0 50px; }
  section.band { padding: 56px 0; }
}
