/* Cuimhne GitHub Pages marketing site.
 * Uses Cuimhne's own Activity Atlas dark-slate tokens (#0F1117, #161B22, #3A76F0, #22D3EE, #F59E0B).
 * Zero external frameworks or trackers, progressive-enhancement OS download detection, responsive mobile-to-desktop.
 */

:root {
  --bg: #0F1117;
  --bg-band: #131722;
  --surface: #161B22;
  --surface-2: #1C2330;
  --fg: #E6EDF3;
  --muted: #94A0B0;
  --muted-2: #6B7686;
  --rule: #252E3D;
  --rule-strong: #354257;
  --blue: #3A76F0;
  --blue-hover: #4E88FA;
  --cyan: #22D3EE;
  --amber: #F59E0B;
  --green: #3FB950;
  --heat-0: #1A212E;
  --heat-1: #1E3A63;
  --heat-2: #2457A6;
  --heat-3: #1A8CD8;
  --heat-4: #22D3EE;
  --shadow: 0 36px 80px -28px rgba(0, 0, 0, 0.85), 0 12px 28px -14px rgba(0, 0, 0, 0.65);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.62 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: #6EA8FE; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
strong, b { font-weight: 700; color: var(--fg); }
code, .mono { font-family: var(--mono); font-size: 0.88em; }
.muted { color: var(--muted); }
.ipa { font-family: var(--sans); font-weight: 400; color: var(--muted); }

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.8em;
  height: 1.8em;
  padding: 0 0.48em;
  margin: 0 0.1em;
  border: 1px solid var(--rule-strong);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--fg);
  font: 700 0.78em/1 var(--mono);
  vertical-align: 0.08em;
}

.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.wrap--wide { width: min(1280px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 820px; }

/* ── Sticky Top Bar ── */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(15, 17, 23, 0.84);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 700 18px/1 var(--mono);
  letter-spacing: 0.22em;
  color: var(--fg);
  text-decoration: none;
}
.wordmark--small { font-size: 14px; }
.top__nav { display: flex; align-items: center; gap: 24px; }
.top__nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.15s ease;
}
.top__nav a:not(.btn):hover { color: var(--fg); }
@media (max-width: 760px) { .top__nav a:not(.btn) { display: none; } }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px rgba(58, 118, 240, 0.6);
}
.btn--small { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn--big { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--rule-strong);
  color: var(--fg);
}
.btn--ghost:hover {
  background: var(--surface-2);
  box-shadow: none;
}
.btn--invert {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #0F1117;
}
.btn--invert:hover {
  background: #E6EDF3;
  box-shadow: 0 12px 28px -10px rgba(255, 255, 255, 0.35);
}

/* ── Hero ── */
.hero {
  position: relative;
  padding: 76px 0 56px;
  isolation: isolate;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  inset: -120px -10% auto;
  height: 620px;
  z-index: -1;
  background:
    radial-gradient(620px 360px at 32% 18%, rgba(58, 118, 240, 0.22), transparent 70%),
    radial-gradient(540px 340px at 68% 24%, rgba(34, 211, 238, 0.15), transparent 70%);
  pointer-events: none;
}
.hero__copy {
  text-align: center;
  max-width: 820px;
  margin-bottom: 44px;
}
.hero__icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.55));
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: rgba(22, 27, 34, 0.85);
  color: var(--muted);
  font: 600 13px/1.2 var(--mono);
}
.eyebrow .dot {
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.22);
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.hl {
  background: linear-gradient(95deg, #5B93FF 0%, #22D3EE 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin: 0 auto 28px;
  max-width: 680px;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
}
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cta__sub {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.cta__sub a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.cta__sub a:hover {
  color: var(--fg);
  text-decoration-color: var(--cyan);
}
.card__dl {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 600;
}
.card__dl a {
  text-decoration: none;
}
.card__dl a:hover {
  text-decoration: underline;
}
.say {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* ── Framed Window Showcase ── */
.window {
  margin: 0;
  border-radius: 14px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.window img { width: 100%; display: block; }
.fine {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
}

/* ── Stats Strip ── */
.stats {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-band);
  padding: 32px 0;
}
.stats__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 860px) { .stats__row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats__row { grid-template-columns: 1fr; } }
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat b {
  font: 800 32px/1.1 var(--mono);
  color: var(--cyan);
  letter-spacing: -0.02em;
}
.stat span { font-size: 14px; color: var(--muted); }

/* ── Sections ── */
section { padding: 76px 0; }
.band {
  background: var(--bg-band);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.kicker {
  margin: 0 0 10px;
  font: 700 12px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.section-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.big {
  margin: 0 0 18px;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.section-lede {
  margin: 0;
  max-width: 720px;
  font-size: 18px;
  color: var(--muted);
}

/* ── Signature Anatomy Card (The Activity Atlas) ── */
.anatomy {
  margin-top: 36px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.anatomy__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.anatomy__title {
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.anatomy__badge {
  font: 600 12px/1 var(--mono);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: var(--cyan);
}
.mini-atlas {
  display: grid;
  grid-template-columns: repeat(24, minmax(10px, 1fr));
  grid-template-rows: repeat(5, 14px);
  gap: 4px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  margin-bottom: 22px;
}
.c {
  border-radius: 3px;
  background: var(--heat-0);
}
.c.l1 { background: var(--heat-1); }
.c.l2 { background: var(--heat-2); }
.c.l3 { background: var(--heat-3); }
.c.l4 { background: var(--heat-4); }
.c.swath {
  outline: 1.5px solid var(--cyan);
  outline-offset: -1px;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.35);
}
.c.swath-end {
  outline: 2px solid #FFFFFF;
  outline-offset: -1px;
}
.c.hit {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.65);
}

.callouts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}
@media (max-width: 900px) { .callouts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .callouts { grid-template-columns: 1fr; } }
.callouts li {
  counter-increment: step;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 16px;
  font-size: 14px;
  color: var(--muted);
}
.callouts li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(58, 118, 240, 0.2);
  color: #7BB0FF;
  font: 700 12px/1 var(--mono);
  margin-bottom: 8px;
}
.callouts li b { display: block; margin-bottom: 4px; font-size: 15px; }

/* ── Alternating Feature Stories ── */
.stories { display: flex; flex-direction: column; gap: 68px; }
.story {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 44px;
  align-items: center;
}
.story--flip { grid-template-columns: 1.25fr 1fr; }
.story--flip .story__text { order: 2; }
@media (max-width: 900px) {
  .story, .story--flip { grid-template-columns: 1fr; gap: 24px; }
  .story--flip .story__text { order: 0; }
}
.story__text h3 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.story__text p { margin: 0 0 16px; color: var(--muted); }
.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: var(--fg);
}
.ticks li {
  position: relative;
  padding-left: 22px;
}
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 800;
}
.shot {
  margin: 0;
  border-radius: 12px;
  border: 1px solid var(--rule-strong);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.shot img { width: 100%; display: block; }

/* ── Keyboard Split ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.keys {
  margin: 0;
  display: grid;
  gap: 10px;
}
.keys > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--rule);
}
.keys dt { white-space: nowrap; }
.keys dd { margin: 0; color: var(--muted); font-size: 15px; text-align: right; }

/* ── Cards Grid ── */
.grid {
  margin-top: 32px;
  display: grid;
  gap: 20px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px;
}
.card__tag {
  display: inline-block;
  font: 700 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  padding: 5px 9px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ── Steps List ── */
.steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: inst;
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  counter-increment: inst;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 20px;
  font-size: 15px;
  color: var(--muted);
}
.steps li::before {
  content: "0" counter(inst);
  display: block;
  font: 700 12px/1 var(--mono);
  color: var(--blue-hover);
  margin-bottom: 8px;
}

/* ── Closing CTA ── */
.final {
  padding: 84px 0;
}
.final__box {
  background: linear-gradient(135deg, #16233E 0%, #11192B 55%, #0F2433 100%);
  border: 1px solid rgba(58, 118, 240, 0.45);
  border-radius: 20px;
  padding: 56px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}
.final__box h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.025em;
}
.final__box p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
}

/* ── Footer ── */
.foot {
  border-top: 1px solid var(--rule);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 14px;
}
.foot__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot__links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot__links a { color: var(--muted); text-decoration: none; }
.foot__links a:hover { color: var(--fg); }
.foot .fine { text-align: left; margin-top: 16px; }
