/* ============================================================================
   CalmMeter — marketing subpage of calmbit.cz
   Same matte dark neutrals and section rhythm as the rest of the site, but the
   accent is the coral sampled from the app icon — the violet already belongs
   to ShellBoard. Everything is scoped under `.calmmeter` so it never leaks.
   Tokens mirror the design handoff (`design_handoff_calmmeter_page/README.md`).
   ============================================================================ */

.calmmeter {
  /* fonts — Instrument Sans in the mocks is a placeholder for the site's Geist */
  --font-ui: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* surfaces */
  --bg-0: #0a0b0f;
  --bg-alt: #0e0f15;
  --bg-card: #101117;
  --bg-panel: #191a22;

  /* lines */
  --line-section: rgba(255, 255, 255, 0.05);
  --line-divider: rgba(255, 255, 255, 0.06);
  --line-card: rgba(255, 255, 255, 0.08);
  --line-panel: rgba(255, 255, 255, 0.10);
  --line-ghost: rgba(255, 255, 255, 0.14);

  /* text */
  --fg: #eceef2;
  --muted: #9a9ca8;
  --muted-2: #8b8d99;
  --dim: #7c7e8a;
  --dimmer: #6f7180;
  --dimmest: #5f6069;
  --code: #c9cbd6;

  /* accent (coral, from the app icon) */
  --accent: #d4704c;
  --accent-hover: #de7d59;
  --accent-light: #ef9a80;
  --accent-link-hover: #f7bda9;
  --accent-warm: #ff7a63;
  --accent-pill: #ff9d8b;

  /* status */
  --green: #4ade80;
  --orange: #f0a03c;
  --red: #ef5350;

  background: var(--bg-0);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.calmmeter *,
.calmmeter *::before,
.calmmeter *::after { box-sizing: border-box; }

.calmmeter ::selection { background: var(--accent); color: #fff; }

.calmmeter a { color: var(--accent-light); text-decoration: none; transition: color .15s ease; }
.calmmeter a:hover { color: var(--accent-link-hover); }

/* ---------- layout primitives ---------- */
.cm-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.cm-mono { font-family: var(--font-mono); }

.cm-section { padding: 96px 0; background: var(--bg-0); }
.cm-section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line-section);
  border-bottom: 1px solid var(--line-section);
}

.calmmeter code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--code);
}

/* $ cd ~/path eyebrow — the calmbit signature, muted variant */
.cm-kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dimmer);
  margin: 0;
}

.cm-h2 {
  margin: 18px 0 12px;
  font-size: clamp(30px, 4.2vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--fg);
  text-wrap: balance;
}
.cm-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- hero ---------- */
.cm-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 96px 32px 40px;
  text-align: center;
}
.cm-hero__eyebrow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dimmer);
}
.cm-badge {
  padding: 4px 10px;
  border: 1px solid rgba(255, 122, 99, 0.35);
  border-radius: 999px;
  color: var(--accent-pill);
  background: rgba(255, 122, 99, 0.08);
  white-space: nowrap;
}
.cm-hero__icon {
  width: 88px;
  height: 88px;
  margin: 32px auto 0;
  display: block;
  border-radius: 20px;
}
.cm-hero h1 {
  margin: 26px 0 0;
  font-size: clamp(40px, 6.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}
.cm-hero h1 em { font-style: italic; color: var(--accent-light); font-weight: 600; }
.cm-hero__sub {
  max-width: 640px;
  margin: 24px auto 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.cm-hero__sub code { font-size: 15px; }
.cm-hero__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.cm-hero__note {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dimmest);
}

/* ---------- buttons ---------- */
/* Scoped with `.calmmeter` so they out-specify the generic `.calmmeter a` colour above. */
.calmmeter .cm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
  transition: background .15s ease;
}
.calmmeter .cm-btn:hover { background: var(--accent-hover); color: #fff; }
.calmmeter .cm-btn--lg { padding: 13px 24px; border-radius: 10px; font-size: 15px; }

.calmmeter .cm-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 9px;
  border: 1px solid var(--line-ghost);
  color: var(--fg);
  font-weight: 500;
  font-size: 14.5px;
  transition: border-color .15s ease, color .15s ease;
}
.calmmeter .cm-ghost:hover { border-color: rgba(255, 255, 255, 0.24); color: var(--fg); }
.calmmeter .cm-ghost--lg { padding: 13px 24px; border-radius: 10px; font-size: 15px; }

/* ---------- app mockup ---------- */
.cm-mockup { max-width: 1120px; margin: 0 auto; padding: 24px 32px 96px; }
.cm-mock {
  border: 1px solid var(--line-card);
  border-radius: 16px;
  background: linear-gradient(180deg, #15161d, #0d0e13);
  padding: 0 0 56px;
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}
.cm-mock__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 7px 18px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--line-divider);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--code);
}
.cm-mock__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(212, 112, 76, 0.28);
  color: #fff;
  white-space: nowrap;
}
.cm-mock__bar span:not(.cm-mock__item) { color: var(--dimmer); white-space: nowrap; }
.cm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }

.cm-mock__panelwrap { display: flex; justify-content: flex-end; padding: 14px 26px 0; }
.cm-panel {
  width: 340px;
  max-width: 100%;
  border: 1px solid var(--line-panel);
  border-radius: 14px;
  background: var(--bg-panel);
  padding: 18px 20px 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.85);
  text-align: left;
}
.cm-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.cm-panel__title { font-weight: 600; font-size: 15px; }
.cm-panel__refresh { color: var(--dimmer); font-size: 14px; }
.cm-panel__rows { display: flex; flex-direction: column; gap: 16px; }
.cm-meter__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
}
.cm-meter__value { font-family: var(--font-mono); }
.cm-meter__track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  margin: 7px 0 5px;
  overflow: hidden;
}
.cm-meter__fill { height: 100%; }
.cm-meter__reset { font-family: var(--font-mono); font-size: 11.5px; color: var(--dimmer); }
.cm-panel__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line-card);
  font-size: 12px;
  color: var(--dimmer);
}
.cm-panel__foot-actions { display: flex; gap: 14px; }
.cm-mock__cap {
  margin: 34px auto 0;
  max-width: 520px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dimmest);
  line-height: 1.7;
}

/* ---------- features (hairline grid) ---------- */
.cm-feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  margin-top: 52px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
}
.cm-feat { background: var(--bg-alt); padding: 30px 26px; }
.cm-feat__n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 14px;
}
.cm-feat h3 { margin: 0 0 10px; font-size: 17px; font-weight: 600; }
.cm-feat p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--muted-2); }

/* ---------- menu-bar formats ---------- */
.cm-fmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 44px;
}
.cm-card {
  border: 1px solid var(--line-card);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 22px;
}
.cm-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 13px;
  min-height: 29px;
}
.cm-fmt__label { margin-top: 16px; font-size: 14px; font-weight: 600; }
.cm-fmt__note { margin-top: 4px; font-size: 13px; color: var(--dim); }

.cm-thresholds {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding: 18px 22px;
  border: 1px solid var(--line-card);
  border-radius: 12px;
  background: var(--bg-card);
  flex-wrap: wrap;
}
.cm-thresholds__label { font-size: 14px; color: var(--muted-2); }
.cm-threshold {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ---------- preferences ---------- */
.cm-prefs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 56px;
  align-items: start;
}
.cm-prefs .cm-lead { max-width: 420px; }
.cm-prefs__list {
  border: 1px solid var(--line-card);
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
}
.cm-prefs__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  font-size: 14.5px;
}
.cm-prefs__row + .cm-prefs__row { border-top: 1px solid var(--line-divider); }
.cm-prefs__value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dim);
  text-align: right;
}
.cm-prefs__value--on { color: var(--green); }

/* ---------- privacy ---------- */
.cm-priv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.cm-priv {
  border: 1px solid var(--line-card);
  border-left: 2px solid var(--accent-warm);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 26px;
}
.cm-priv h3 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.cm-priv p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.65; color: var(--muted-2); }
.cm-priv p:last-child { margin-bottom: 0; }

/* ---------- download ---------- */
.cm-download { text-align: center; }
.cm-download .cm-h2 { margin-left: auto; margin-right: auto; }
.cm-download .cm-lead { max-width: 520px; margin: 0 auto 36px; }
.cm-dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
.cm-dl { padding: 26px; }
.cm-dl__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.cm-dl__title { font-size: 16px; font-weight: 600; }
.cm-dl__tag { font-family: var(--font-mono); font-size: 11.5px; color: var(--dimmer); }
.cm-dl__body { margin: 0 0 20px; font-size: 14.5px; line-height: 1.6; color: var(--muted-2); }
.cm-dl__body--mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  word-break: break-all;
}

/* ---------- footer ---------- */
.cm-footer { border-top: 1px solid var(--line-divider); background: var(--bg-0); }
.cm-footer__inner { max-width: 1120px; margin: 0 auto; padding: 44px 32px 56px; }
.cm-footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-divider);
}
.cm-footer__app { display: flex; align-items: center; gap: 11px; font-weight: 600; }
.cm-footer__app img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.cm-footer__links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.calmmeter .cm-footer__links a { color: var(--muted-2); }
.calmmeter .cm-footer__links a:hover { color: var(--fg); }
.cm-footer__legal {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--dimmest);
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .cm-wrap { padding: 0 20px; }
  .cm-section { padding: 64px 0; }
  .cm-hero { padding: 64px 20px 32px; }
  .cm-mockup { padding: 20px 20px 64px; }
  .cm-mock { padding-bottom: 36px; }
  .cm-mock__panelwrap { padding: 14px 16px 0; justify-content: center; }
  .cm-mock__bar { gap: 12px; padding: 7px 12px; }
  .cm-prefs { gap: 36px; }
  .cm-footer__inner { padding: 36px 20px 44px; }
}
