/* MechBlocks theme — v0.1.0
 * System fonts, generous whitespace, slate palette, modular block visual signature.
 */

/* ============ TOKENS ============ */
:root {
  --accent: #1F3D5C;
  --accent-strong: #16334F;
  --accent-soft: #E8EEF5;

  --ink-900: #0F172A;
  --ink-700: #1F2937;
  --ink-500: #475569;
  --ink-300: #94A3B8;

  --paper: #FFFFFF;
  --paper-shade: #F7F8FA;
  --paper-dark: #0F1B2A;

  --line: #E4E7EB;
  --line-strong: #CBD2DA;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Mono", Menlo, Consolas, "Courier New", monospace;

  --container-max: 1180px;
  --container-narrow: 760px;
  --container-pad: 24px;

  --radius: 4px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);

  --section-pad-y: clamp(64px, 9vw, 120px);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink-900);
}
h1 { font-size: clamp(2.2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 600; color: var(--ink-900); }
em { font-style: italic; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
::selection { background: var(--accent); color: #fff; }

/* ============ LAYOUT ============ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.container--narrow { max-width: var(--container-narrow); }

.section {
  padding: var(--section-pad-y) 0;
}
.section--shade {
  background: var(--paper-shade);
}
.section--cta {
  background: var(--paper-dark);
  color: #E6EDF5;
}
.section--cta h2 { color: #fff; }
.section--cta p { color: rgba(255, 255, 255, 0.78); }

.section__head {
  text-align: center;
  margin-bottom: 56px;
}
.section__head .eyebrow { justify-content: center; }
.section__title { margin-bottom: 16px; }
.section__lede {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--ink-500);
}

.text-center { text-align: center; }
.muted { color: var(--ink-500); font-size: 0.95rem; }

.prose p { font-size: 1.1rem; line-height: 1.7; color: var(--ink-700); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

/* ============ EYEBROW LABEL ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}
.eyebrow--inverse { color: rgba(255, 255, 255, 0.7); }
.eyebrow--inverse::before { background: rgba(255, 255, 255, 0.5); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }

.btn--ghost {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--paper-shade); color: var(--ink-900); border-color: var(--ink-500); }

/* On dark backgrounds (hero + CTA), invert the ghost button for contrast */
.hero .btn--ghost,
.section--cta .btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
}
.hero .btn--ghost:hover,
.section--cta .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
}

.btn--large { padding: 17px 28px; font-size: 1rem; }
.btn--sm { padding: 10px 16px; font-size: 0.85rem; }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 32px;
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.site-header__brand:hover { color: var(--ink-900); text-decoration: none; }
.brand-mark {
  display: inline-block;
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
}
.brand-word { font-family: var(--font-sans); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav li { margin: 0; }
.site-nav a {
  color: var(--ink-700);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav__cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink-900);
  margin: 0 auto;
  transition: transform 0.2s, opacity 0.2s;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: clamp(80px, 12vw, 160px) 0 clamp(72px, 10vw, 140px);
  background: var(--paper-dark);
  color: #E6EDF5;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
}
.hero__headline {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: #fff;
  margin: 0 0 28px;
}
.hero__headline em {
  font-style: normal;
  color: #8FB4D8;
  position: relative;
}
.hero__subhead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 720px;
  margin: 0 0 24px;
}
.hero__brand {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 40px;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Hero pattern: subtle grid of blocks in background */
.hero__pattern {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 50%;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to left, rgba(0,0,0,1), rgba(0,0,0,0));
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1), rgba(0,0,0,0));
}

/* ============ BLOCKS GRID ============ */
.blocks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 48px;
}
.block-tile {
  position: relative;
  padding: 32px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s;
}
.block-tile::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 24px; height: 24px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-top-left-radius: var(--radius);
}
.block-tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.block-tile__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.block-tile__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-700);
  font-weight: 500;
}

.blocks-coda {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--ink-500);
  font-style: italic;
}

/* ============ WHO THIS IS FOR (in problem section) ============ */
.who-this-is-for {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--line-strong);
}
.who-this-is-for__intro {
  font-size: 1.05rem;
  color: var(--ink-700);
  margin: 0 0 18px;
}
.who-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.who-list li {
  position: relative;
  padding: 10px 0 10px 28px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-700);
  border-bottom: 1px dashed var(--line);
}
.who-list li:last-child { border-bottom: 0; }
.who-list li::before {
  content: "▣";
  position: absolute;
  left: 0;
  top: 9px;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1.5;
}

/* ============ WORKFLOW EXAMPLES GRID (on home) ============ */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 0 0 32px;
}
.workflow-card {
  display: block;
  padding: 28px 28px 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--ink-900);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.workflow-card:hover {
  text-decoration: none;
  color: var(--ink-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent-strong);
}
.workflow-card__title {
  font-size: 1.2rem;
  margin: 0 0 10px;
  color: var(--ink-900);
  font-weight: 600;
}
.workflow-card__desc {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ink-500);
}

.link-arrow {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ============ CHECKLIST (Microsoft section bullets) ============ */
.checklist {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 32px;
}
.checklist li {
  position: relative;
  padding-left: 24px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-700);
  margin: 0;
}
.checklist li::before {
  content: "▪";
  position: absolute;
  left: 0;
  top: -2px;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1.5;
}

/* ============ TRUST BAND (between examples and services) ============ */
.trust-band {
  padding: 40px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.trust-band__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.trust-band__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-500);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ PAGE END CTA (page.hbs footer) ============ */
.page-end-cta {
  padding: 40px 0;
  background: var(--paper-shade);
  border-top: 1px solid var(--line);
  text-align: center;
}
.page-end-cta p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-700);
}
.page-end-cta a {
  color: var(--accent);
  font-weight: 500;
  margin-left: 6px;
}

/* ============ EXAMPLE CALLOUT (legacy, kept for inner pages) ============ */
.example-callout {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 40px;
  background: var(--paper-dark);
  color: #E6EDF5;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.example-callout::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #8FB4D8, var(--accent));
}
.example-callout__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8FB4D8;
  margin: 0 0 14px;
}
.example-callout__body {
  font-size: 1.08rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 18px;
}
.example-callout__cta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.example-callout__cta a {
  color: #8FB4D8;
}
.example-callout__cta a:hover {
  color: #fff;
  text-decoration: none;
}

/* ============ SERVICES GRID ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.service-card {
  position: relative;
  display: block;
  padding: 36px 32px 60px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-900);
  transition: border-color 0.2s, transform 0.2s;
}
.service-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  color: var(--ink-900);
  transform: translateY(-3px);
}

/* Flagship card variant (Blueprint) */
.service-card--flagship {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--paper) 80px);
}
.service-card--flagship:hover {
  box-shadow: 0 0 0 1px var(--accent-strong), var(--shadow-md);
}
.service-card__flag {
  position: absolute;
  top: -11px;
  left: 24px;
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  line-height: 1.4;
}
.service-card__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}
.service-card__title {
  font-size: 1.35rem;
  margin: 0 0 10px;
  color: var(--ink-900);
}
.service-card__desc {
  margin: 0 0 24px;
  color: var(--ink-500);
  font-size: 0.98rem;
  line-height: 1.55;
}
.service-card__deliverables-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.service-card__deliverables {
  list-style: none;
  margin: 0;
  padding: 0;
}
.service-card__deliverables li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-700);
}
.service-card__deliverables li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: var(--ink-300);
}
.service-card__arrow {
  position: absolute;
  bottom: 24px;
  right: 28px;
  color: var(--accent);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
}
.service-card:hover .service-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ============ DEFAULT PAGE ============ */
.page-default {
  padding-top: clamp(56px, 8vw, 96px);
}
.page-default__header {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.page-default__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 12px;
}
.page-default__lede {
  font-size: 1.2rem;
  color: var(--ink-500);
  margin: 0;
}
.page-default__body {
  padding-bottom: clamp(64px, 8vw, 96px);
}
.page-default__body section {
  margin-bottom: 40px;
}
.page-default__body h2 {
  font-size: 1.5rem;
  margin-top: 1.5em;
}
.page-default__body h2:first-child { margin-top: 0; }
.page-default__body .lede {
  font-size: 1.2rem;
  color: var(--ink-500);
  margin-bottom: 1.5em;
}
.page-default__body ul,
.page-default__body ol {
  padding-left: 1.4em;
}
.page-default__body .closing {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.page-default__body .cta {
  display: inline-flex;
  padding: 14px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 500;
}
.page-default__body .cta:hover {
  background: var(--accent-strong);
  text-decoration: none;
  color: #fff;
}

/* ============ POST ============ */
.post { padding-top: clamp(48px, 6vw, 80px); }
.post__header { padding-bottom: 32px; }
.post__title { font-size: clamp(2rem, 4vw, 3rem); margin: 8px 0 16px; }
.post__lede { font-size: 1.2rem; color: var(--ink-500); }
.post__meta { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-500); }
.post__feature { margin: 0 0 48px; }
.post__feature img { border-radius: var(--radius); }
.post__body { padding-bottom: 64px; }
.post__body p { font-size: 1.1rem; line-height: 1.7; color: var(--ink-700); }
.post__body h2 { font-size: 1.6rem; margin-top: 1.8em; }
.post__body h3 { font-size: 1.25rem; margin-top: 1.5em; }
.post__body blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 24px;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--ink-700);
}

/* ============ POST LIST ============ */
.post-list { margin: 48px 0; }
.post-list__item { padding: 32px 0; border-bottom: 1px solid var(--line); }
.post-list__item:first-child { padding-top: 0; }
.post-list__link { display: block; color: var(--ink-900); }
.post-list__link:hover { color: var(--accent); text-decoration: none; }
.post-list__title { font-size: 1.5rem; margin: 0 0 8px; }
.post-list__excerpt { color: var(--ink-500); margin: 0 0 12px; }
.post-list__meta { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-300); margin: 0; }

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-shade);
  padding: 72px 0 48px;
  color: var(--ink-500);
  font-size: 0.92rem;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.site-footer__brand .brand-word {
  font-weight: 600;
  color: var(--ink-900);
  font-size: 1.05rem;
  margin-left: 4px;
}
.site-footer__tagline {
  margin-top: 16px;
  max-width: 420px;
  color: var(--ink-500);
}
.site-footer__nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}
.site-footer__nav a {
  color: var(--ink-700);
  font-weight: 500;
}
.site-footer__nav a:hover { color: var(--accent); }
.site-footer__meta {
  grid-column: 1 / -1;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-300);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .blocks-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .site-nav--open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav__cta { margin-left: 0; align-self: flex-start; }

  .hero__pattern { display: none; }

  .services-grid { grid-template-columns: 1fr; }
  .blocks-grid { grid-template-columns: 1fr; }
  .workflow-grid { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }

  .site-footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .site-footer__nav ul { grid-template-columns: 1fr 1fr; }
}
