/* CRM by MCR — one-page site
   Follows the {CRM} by MCR logo: graphite ground, key-cap tiles,
   one amber accent, JetBrains Mono for the wordmark and headings,
   Inter for reading text. The light "card" variant of the logo is
   used once, for the proof section. */

:root {
  --ground: #16181d;     /* logo background */
  --tile: #23262e;       /* key-cap fill */
  --tile-edge: #343843;  /* key-cap border */
  --amber: #f2a93b;      /* braces, cursor, MCR tiles */
  --amber-ink: #b7791f;  /* amber on the light card */
  --text: #f2f3f5;       /* CRM letters */
  --text-soft: #c9ced6;  /* tagline */
  --muted: #8f96a3;      /* "by", "// comment" */
  --card: #f2f3f5;       /* light logo variant */
  --card-ink: #16181d;
  --card-soft: #4a505c;
  --alert: #ff8a73;

  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;

  --measure: 34rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
}

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

a { color: var(--amber); text-underline-offset: 0.2em; }
a:hover { color: var(--text); }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--amber); color: var(--ground); padding: .6rem 1rem; z-index: 10; font-weight: 600; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap {
  width: min(72rem, 100%);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px), 4vw);
  padding-right: max(16px, env(safe-area-inset-right, 0px), 4vw);
}

h1, h2, h3 { font-family: var(--mono); line-height: 1.12; margin: 0; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-weight: 800; letter-spacing: -0.045em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.02em; }
p { margin: 0; }

.brace { color: var(--amber); font-weight: 800; }

/* code-comment line, as in "// by Mathew Cole Rosenberg" */
.comment { font: 400 .92rem/1.5 var(--mono); color: var(--muted); }
.comment::before { content: "// "; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  padding-block: .9rem;
  background: rgba(22, 24, 29, .92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tile-edge);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.wordmark { display: flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; }
.wordmark:hover { color: var(--text); }
/* header logo: the connected C R M / M C R key caps from the brand mark */
.mark-keys { display: block; height: 3.1rem; width: auto; flex: none; }
/* stacked lockup from the brand mark: {CRM} over "by MCR" and the block cursor */
.wordmark-text { display: flex; flex-direction: column; gap: .3rem; }
.wordmark-text .wm-crm { font: 800 1.45rem/1 var(--mono); letter-spacing: -0.04em; }
.wordmark-text .by { display: flex; align-items: center; font: 400 .8rem/1 var(--mono); color: var(--muted); padding-left: .1rem; }
.wordmark-text .by b { font-weight: 500; color: var(--text); margin-left: .45em; }
.wordmark-text .by-cursor { display: inline-block; width: .55em; height: 1.05em; margin-left: .4em; background: var(--amber); }
.header-actions { display: flex; align-items: center; gap: .6rem; }

.btn {
  display: inline-block;
  font: 600 1rem/1 var(--sans);
  padding: .95rem 1.4rem;
  border-radius: 8px;
  border: 2px solid var(--amber);
  background: var(--amber);
  color: var(--ground);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #f6bd65; border-color: #f6bd65; color: var(--ground); }
.btn-quiet { background: transparent; color: var(--amber); padding: .65rem 1rem; }
.btn-quiet:hover { background: var(--amber); color: var(--ground); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 8vw, 6rem); }
.hero-copy { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: end; }
.hero-copy > * { min-width: 0; }
.hero-side .lead { font-size: 1.2rem; color: var(--text-soft); max-width: var(--measure); }
.hero-side .lead-small { margin-top: .9rem; color: var(--muted); max-width: var(--measure); }
.hero-side .btn { margin-top: 1.6rem; }
.hero-side .comment { margin-top: 1rem; }

/* the logo's block cursor, after the headline: the one moving thing on the page */
.cursor {
  display: inline-block;
  width: .45em; height: .78em;
  margin-left: .12em;
  background: var(--amber);
  vertical-align: -0.04em;
  animation: blink 1.1s steps(1) 0s 6 both;
}
@keyframes blink { 50% { opacity: 0; } }

/* feature keys: the logo's key-cap tiles, one per thing the system can do */
.features { min-width: 0; margin-top: clamp(2.5rem, 6vw, 4rem); }
.features-title { font: 700 1rem/1.3 var(--mono); color: var(--text); letter-spacing: -0.02em; }
.features-title::before { content: "// "; color: var(--muted); font-weight: 400; }
.keys { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.keys li {
  background: var(--tile);
  border: 1px solid var(--tile-edge);
  border-bottom-width: 3px;
  border-radius: 10px;
  padding: .8rem .85rem .75rem;
  min-width: 0;
}
.keys b { display: block; font: 700 .9rem/1.25 var(--mono); letter-spacing: -0.02em; color: var(--text); }
.keys span { display: block; margin-top: .3rem; font-size: .8rem; line-height: 1.4; color: var(--muted); }
.features-foot { margin-top: 1rem; font-size: .92rem; color: var(--text-soft); }

/* ---------- sections ---------- */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.rule { border-top: 1px solid var(--tile-edge); }

.lede { max-width: 44rem; }
.lede p { margin-top: 1.25rem; font-size: 1.15rem; color: var(--text-soft); }

/* problem: the scattered tools, on dashed outlines like the logo's dashed line */
.scatter { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; padding: 0; list-style: none; }
.scatter li { padding: .45rem .8rem; border: 1px dashed #5b6170; border-radius: 6px; color: var(--muted); font: .88rem/1.4 var(--mono); }

/* promises: the three things it does, as key caps */
.promise-group { margin-top: 2.75rem; }
.promise-group + .promise-group { margin-top: 2rem; }
.group-label { font: 700 1rem/1.3 var(--mono); color: var(--amber); letter-spacing: -0.02em; }
.group-label::before { content: "// "; color: var(--muted); font-weight: 400; }
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1rem; }
.promise { background: var(--tile); border: 1px solid var(--tile-edge); border-radius: 12px; padding: 1.5rem; }
.promise p { margin-top: .75rem; color: var(--text-soft); }

/* steps: a real sequence, numbered on amber-outlined tiles like M C R */
.steps { counter-reset: step; list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.steps li { counter-increment: step; padding-right: 1.5rem; position: relative; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 2.8rem; height: 2.8rem; border-radius: 8px;
  border: 2px solid var(--amber); color: var(--amber); background: var(--ground);
  font: 800 1.15rem/1 var(--mono);
  margin-bottom: 1rem;
  position: relative; z-index: 1;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 1.4rem; left: 2.8rem; right: 0;
  border-top: 2px dashed #5b6170;
}
.steps p { margin-top: .5rem; color: var(--text-soft); font-size: .98rem; padding-right: .5rem; }

/* showcase: recreated app screens with made-up data, in a light app theme */
.shot { margin: 2.75rem 0 0; }
.shot + .shot { margin-top: 3.5rem; }
.shot figcaption { font-size: 1rem; color: var(--text-soft); margin-bottom: 1rem; }
.shot figcaption b { color: var(--text); font-family: var(--mono); letter-spacing: -0.02em; }
.app {
  --a-bg: #f6f7f9; --a-card: #ffffff; --a-line: #e3e6eb; --a-ink: #1f2430; --a-soft: #6b7280;
  --a-accent: #f2a93b; --a-accent-ink: #8a5a0f; --a-ok: #1f8a5b; --a-warn: #c0492b;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--tile-edge);
  box-shadow: 0 30px 60px -30px #000; background: var(--a-bg); color: var(--a-ink);
  font: 400 13px/1.4 var(--sans); user-select: none;
}
.app-bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: #e9ebef; border-bottom: 1px solid var(--a-line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #c9cdd4; display: block; }
.url { flex: 1; max-width: 340px; background: #fff; border-radius: 6px; padding: 3px 10px; color: var(--a-soft); font-size: 12px; }
.app-body { display: grid; grid-template-columns: 1fr; min-width: 0; }
.app-body.has-side { grid-template-columns: 170px 1fr; }
.app-side { background: #fff; border-right: 1px solid var(--a-line); padding: 14px 10px; display: grid; align-content: start; gap: 2px; }
.app-side span { padding: 7px 10px; border-radius: 6px; color: var(--a-soft); }
.app-side span.on { background: #fdf3e2; color: var(--a-accent-ink); font-weight: 600; }
.logo-box { display: inline-block; font: 700 11px/1 var(--mono); color: var(--a-soft) !important; border: 1px dashed #c9cdd4; border-radius: 6px; padding: 8px 10px !important; margin-bottom: 10px; background: transparent !important; }
.app-main { padding: 16px; min-width: 0; display: grid; gap: 14px; align-content: start; }
.app-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.search { background: #fff; border: 1px solid var(--a-line); border-radius: 6px; padding: 6px 10px; color: #9aa1ad; min-width: 180px; }
.who { color: var(--a-soft); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.kpi small { display: block; color: var(--a-soft); font-size: 11.5px; }
.kpi b { display: inline-block; margin-top: 4px; font: 700 20px/1.1 var(--sans); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 11px; color: var(--a-soft); display: block; margin-top: 3px; }
.kpi em.pill { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--a-line); color: var(--a-soft); vertical-align: 3px; }
.kpi em.pill.ok { color: var(--a-ok); border-color: #bfe3d1; }
.kpi em.pill.warn { color: var(--a-warn); border-color: #f0c9bf; }
.kpi.big { background: linear-gradient(135deg, #f6bd65, #f2a93b); border-color: #e59a2c; color: #2a1d08; }
.kpi.big small, .kpi.big em { color: #5a3d0f; }
.table-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.tool { border: 1px solid var(--a-line); background: #fff; border-radius: 6px; padding: 5px 10px; font-size: 12px; color: var(--a-soft); }
.tool.primary { background: #2f3542; border-color: #2f3542; color: #fff; }
.tool.go { background: var(--a-accent); border-color: var(--a-accent); color: #2a1d08; font-weight: 600; }
.table { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 8px; overflow: hidden; }
.tr { display: grid; grid-template-columns: 1.2fr 1.6fr 1.1fr .7fr; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--a-line); align-items: center; }
.tr > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr.th { border-top: 0; background: #fafbfc; color: var(--a-soft); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tr.total { font-weight: 700; background: #fafbfc; }
.tr .link { color: #2f62c9; }
.tr em { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; }
.tr em.yes { background: #dff3e9; color: var(--a-ok); }
.tr em.no { background: #eceef1; color: var(--a-soft); }
.app-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding-bottom: 10px; border-bottom: 1px solid var(--a-line); color: var(--a-soft); }
.app-nav .on { color: var(--a-accent-ink); font-weight: 600; border-bottom: 2px solid var(--a-accent); padding-bottom: 2px; }
.app-nav .logo-box { margin: 0 6px 0 0; }
.ops-head b { display: block; font: 700 17px/1.2 var(--sans); }
.ops-head small { color: var(--a-soft); }
.ops-cards { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 10px; }
.showcase .tr { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.showcase .shot:first-of-type .tr { grid-template-columns: 1.2fr 1.6fr 1.1fr .7fr; }

/* industries */
.industries { margin-top: 2.5rem; border-top: 1px solid var(--tile-edge); }
.industry { display: grid; grid-template-columns: 14rem 1fr 1.4fr; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--tile-edge); align-items: baseline; }
.industry > * { min-width: 0; }
.industry .pain { color: var(--text-soft); }
.industry .pain::before { content: "The headache: "; font-weight: 600; color: var(--muted); }
.industry .fix::before { content: "What I build: "; font-weight: 600; color: var(--amber); }
.industry-more .more { grid-column: 2 / -1; color: var(--text-soft); max-width: 44rem; }
.industry-more { border-bottom: 0; }

/* proof: the logo's light card variant */
.proof .wrap { display: block; }
.proof-card {
  background: var(--card); color: var(--card-ink);
  border-radius: 16px;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.proof-card > * { min-width: 0; }
.proof-card .brace { color: var(--amber-ink); }
.proof-card p { margin-top: 1.25rem; font-size: 1.1rem; color: var(--card-soft); }
.terms { list-style: none; margin: 0; padding: 0; }
.terms li { padding: 1.2rem 0; border-bottom: 1px solid #d4d8df; }
.terms li:first-child { padding-top: 0; }
.terms li:last-child { border-bottom: 0; }
.terms b { display: block; font: 700 1.15rem/1.25 var(--mono); letter-spacing: -0.02em; }
.terms span { display: block; margin-top: .35rem; color: var(--card-soft); }

/* demo form */
.demo .wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 5vw, 5rem); }
.demo .wrap > * { min-width: 0; }
.demo-intro p { margin-top: 1.25rem; color: var(--text-soft); font-size: 1.1rem; max-width: 28rem; }
.demo-intro .direct { margin-top: 2rem; font-size: 1rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.contact-actions .btn-quiet { padding: .95rem 1.4rem; }

form.request { background: var(--tile); border: 1px solid var(--tile-edge); border-radius: 14px; padding: clamp(1.25rem, 3vw, 2rem); display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.field { display: grid; gap: .4rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .95rem; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text);
  padding: .75rem .85rem; border: 1px solid #454a57; border-radius: 8px; background: var(--ground); width: 100%;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
.field .error { color: var(--alert); font-size: .9rem; }
.field [aria-invalid="true"] { border-color: var(--alert); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: .25rem; }
.form-foot p { color: var(--muted); font-size: .9rem; }

.notice { grid-column: 1 / -1; padding: 1rem 1.1rem; border-radius: 8px; background: var(--ground); border: 1px solid var(--amber); }
.notice strong { display: block; font: 700 1.05rem/1.3 var(--mono); color: var(--amber); }

/* footer */
.site-footer { padding-block: 2.5rem; border-top: 1px solid var(--tile-edge); color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-copy, .proof-card, .demo .wrap { grid-template-columns: 1fr; }
  .hero-copy { gap: 1.5rem; }
  .keys { grid-template-columns: repeat(2, 1fr); }
  .promises { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .steps li:nth-child(2)::after { display: none; }
  .industry { grid-template-columns: 1fr; gap: .5rem; }
  .app-body.has-side { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .kpis, .ops-cards { grid-template-columns: repeat(2, 1fr); }
  .industry-more .more { grid-column: auto; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .steps { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  form.request { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.1rem, 10vw, 2.6rem); }
  section { padding-block: 3rem; }
  .hero { padding-block: 2rem 3rem; }
  .hero-side .lead { font-size: 1.1rem; }
  .hero-side .btn { display: block; text-align: center; }
  .keys { gap: .5rem; }
  .keys li { padding: .7rem .75rem; }
  .keys b { font-size: .85rem; }
  .keys span { display: none; }
  .promise { padding: 1.2rem; }
  .form-foot .btn { width: 100%; }
  .app { font-size: 12px; }
  .app-main { padding: 12px; }
  .kpi b { font-size: 17px; }
  .kpi em.pill { display: none; }
  .table-tools .tool:not(.go) { display: none; }
  .search { min-width: 0; flex: 1; }
  .showcase .tr, .showcase .shot:first-of-type .tr { grid-template-columns: 1.3fr 1fr .8fr; }
  .showcase .shot:first-of-type .tr > span:nth-child(2) { display: none; }
  .showcase .shot:last-of-type .tr > span:nth-child(4) { display: none; }
  .app-nav span:not(.logo-box):not(.on) { display: none; }
  .site-header .wrap { gap: .5rem; }
  .wordmark { gap: .45rem; }
  .mark-keys { height: 2.4rem; }
  .wordmark-text { gap: .2rem; }
  .wordmark-text .wm-crm { font-size: 1.05rem; }
  .wordmark-text .by { font-size: .62rem; }
  .header-actions { gap: .4rem; }
  .site-header .btn-quiet { padding: .5rem .6rem; font-size: .82rem; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}
