/* The Midlothian Minute: site layout. Component styles are in bundle.css. */

:root {
  --paper: #ebe6dc; --paper-deep: #ddd5c6; --ink: #16243a; --ink-muted: #4b5669;
  --esk: #2b5c8f; --esk-soft: #bfcddc; --on-esk: #f4f0e7; --brick: #9e3f27;
  --night: #16243a; --on-night: #ebe6dc; --brick-on-night: #df7b5c; --rule: #16243a; --focus: #2b5c8f;
  --font-display: "Gloock", Georgia, "Times New Roman", serif;
  --font-text: "Newsreader", Georgia, "Times New Roman", serif;
  --font-label: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px; --space-8: 32px; --space-12: 48px;
  --radius-0: 0px; --radius-1: 2px; --radius-full: 9999px;
  --shadow-paper: 0 1px 0 rgba(22,36,58,0.10), 0 10px 18px -12px rgba(22,36,58,0.45);
  --gutter: clamp(16px, 4vw, 64px);
}

body { background: var(--paper); color: var(--ink); }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block: 0; }
:where(.mm) * { box-sizing: border-box; }

/* Reset WordPress flow spacing inside our own layout blocks; gaps come from flex and grid. */
.mm :where(p, h1, h2, h3, h4, figure, ul) { margin-block: 0; }
.mm .wp-block-group, .mm .wp-block-buttons { margin-block: 0; }
.mm :where(.is-layout-flow) > * { margin-block-start: 0; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Shared */
.mm-wrap { max-width: 1200px; margin-inline: auto; }
.mm-section { padding: 64px var(--gutter); }
.mm-section--rule { border-top: 2px solid var(--rule); }
.mm-stack { display: flex; flex-direction: column; gap: 16px; }
.mm-stack--tight { gap: 8px; }
.mm-brick-text, .mm-kicker.mm-brick-text { color: var(--brick); }
.mm-brick-word { color: var(--brick); }
.mm-h2 { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 38px; }
.mm-h2--lg { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.12; text-wrap: balance; }
.mm-h3 { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 28px; }
.mm-lede { font-size: 20px; line-height: 30px; }
.mm-body { font-size: 17px; line-height: 27px; }
.mm-caption, .mm .wp-element-caption { font-style: italic; font-size: 14px; line-height: 20px; color: var(--ink-muted); margin: 8px 0 0; text-align: left; }
.mm-bignum { font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--brick); }

/* Buttons (core Button block with our class on the wrapper) */
.mm .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.mm .wp-block-button__link, .mm .mm-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border-radius: 2px; border: 2px solid var(--esk);
  font-family: var(--font-label); font-weight: 600; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; background: var(--esk); color: var(--on-esk); cursor: pointer; }
.mm .wp-block-button__link:hover, .mm .mm-button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mm .mm-btn-ghost .wp-block-button__link { background: transparent; color: var(--ink); border-color: var(--ink); }
.mm .mm-btn-ghost .wp-block-button__link:hover { background: var(--ink); color: var(--paper); }
.mm .mm-btn-brick .wp-block-button__link, .mm .mm-button--brick { background: var(--brick); border-color: var(--brick); color: var(--on-esk); }
.mm .mm-btn-brick .wp-block-button__link:hover, .mm .mm-button--brick:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mm .mm-button--ember { background: var(--brick-on-night); border-color: var(--brick-on-night); color: var(--ink); }
.mm .mm-button--ember:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.mm .mm-btn-onbrick .wp-block-button__link { background: transparent; color: var(--paper); border-color: var(--paper); }
.mm .mm-btn-onbrick .wp-block-button__link:hover { background: var(--paper); color: var(--brick); }

/* Header */
.mm-header { padding: 0 var(--gutter); border-top: 6px solid var(--brick); }
.mm-topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.mm-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.mm-nav a { color: var(--ink); text-decoration: none; }
.mm-nav a:hover { color: var(--esk); text-decoration: underline; text-underline-offset: 3px; }
.mm-nav a.mm-button { color: var(--on-esk); min-height: 40px; padding: 0 16px; font-size: 14px; text-decoration: none; }
.mm-nav a.mm-button:hover { color: var(--paper); text-decoration: none; }
.mm-masthead-logo { display: flex; justify-content: center; padding: 40px 0 24px; }
.mm-masthead-logo img { width: min(620px, 100%); height: auto; display: block; }
.mm-mastline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 8px 0; border-bottom: 1px solid var(--rule); }

/* Hero */
.mm-hero { padding: 56px var(--gutter) 72px; }
.mm-hero__grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.mm-hero__copy { flex: 1 1 440px; max-width: 600px; display: flex; flex-direction: column; gap: 16px; }
.mm-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; }
.mm-hero__collage { flex: 1 1 420px; position: relative; min-height: 520px; overflow: hidden; background: var(--paper); }
.mm-hero__band { position: absolute; left: 0; right: 0; bottom: 0; height: 56%; background: var(--esk-soft); }
.mm-hero__sky { position: absolute; right: 0; bottom: 40px; width: 96%; height: auto; display: block; }
.mm-hero__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: var(--night); }
.mm-hero__tally { position: absolute; right: 24px; top: 24px; z-index: 3; }
.mm-hero__clip { position: absolute; left: 24px; top: 40px; z-index: 4; max-width: calc(100% - 160px); }
.mm-hero__stamp { position: absolute; right: 28px; top: 160px; z-index: 4; background: rgba(235,230,220,0.9); }
.mm-clipping .mm-source { margin-top: 8px; font-style: italic; font-size: 14px; line-height: 20px; color: var(--ink-muted); }

/* Sign-up form (swap for the beehiiv embed) */
.mm-form { display: flex; flex-direction: column; gap: 10px; }
.mm-form__row { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-form small { font-style: italic; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.mm-hero .mm-signup { max-width: none; margin-top: 12px; }

/* What we make */
.mm-intro { max-width: 680px; }
.mm .mm-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; margin-top: 32px; }
.mm-feature { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--rule); }

/* Explainers */
.mm-latest { padding-bottom: 32px; }
.mm-sechead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding-bottom: 8px; border-bottom: 3px solid var(--brick); margin-bottom: 24px; }
.mm-sechead a { font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.mm-feature-story { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.mm-feature-story__media { flex: 1 1 480px; position: relative; }
.mm-feature-story__copy { flex: 1 1 380px; max-width: 560px; display: flex; flex-direction: column; gap: 12px; }
.mm-feature-story__copy h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.1; text-wrap: balance; }
.mm-feature-story__copy .wp-block-buttons { margin-top: 8px; }
.mm-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.mm-media { position: relative; }
.mm-media .mm-tally { position: absolute; left: 12px; top: 12px; z-index: 2; }
.mm-feature-story__media .mm-tally { left: 16px; top: 16px; }
.mm-media .mm-stamp { position: absolute; right: 16px; top: 20px; z-index: 2; background: rgba(235,230,220,0.88); }
.mm-more { padding-top: 32px; padding-bottom: 72px; }
.mm-more__label { padding-top: 16px; border-top: 3px solid var(--brick); color: var(--ink); margin-bottom: 24px; }
.mm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px 32px; }
.mm-card { display: flex; flex-direction: column; gap: 10px; }

/* Community (brick band) */
.mm-stories { padding: 72px var(--gutter); background: var(--brick); color: var(--paper); }
.mm-stories :where(h2, p) { color: var(--paper); }
.mm-stories .mm-kicker { color: var(--paper); }
.mm-stories__grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.mm-stories__copy { flex: 1 1 520px; max-width: 640px; display: flex; flex-direction: column; gap: 14px; }
.mm-stories__copy .wp-block-buttons { margin-top: 8px; }
.mm-stories__clip { flex: 1 1 300px; display: flex; justify-content: center; }
.mm-stories .mm-clipping { transform: rotate(1.5deg); max-width: 340px; background: var(--paper); }
.mm-stories .mm-clipping :where(h3, p) { color: var(--ink); }
.mm-stories .mm-clipping .mm-dateline { color: var(--ink-muted); }
.mm-stories :focus-visible { outline-color: var(--paper); }

/* Final sign-up and footer (night) */
.mm-night { background: var(--night); color: var(--on-night); }
.mm-cta { padding: 72px var(--gutter); }
.mm-cta__grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: space-between; }
.mm-cta__copy { flex: 1 1 420px; max-width: 560px; display: flex; flex-direction: column; gap: 12px; }
.mm-cta__copy :where(h2, p) { color: var(--on-night); }
.mm-cta .mm-kicker { color: var(--brick-on-night); }
.mm-cta .mm-form { flex: 1 1 420px; max-width: 520px; }
.mm-cta .mm-form label { color: var(--on-night); }
.mm-cta .mm-input { border-color: var(--on-night); }
.mm-cta .mm-form small { color: #c9ced8; }
.mm-night :focus-visible { outline-color: #9cc0e6; }
.mm-footer { padding: 40px var(--gutter) 48px; border-top: 1px solid var(--ink-muted); border-bottom: 6px solid var(--brick); }
.mm-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.mm-footer__top > a { flex: 0 1 360px; display: block; }
.mm-footer__top img { width: min(360px, 100%); height: auto; display: block; }
.mm-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--font-label); font-weight: 600; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.mm-footer a { color: var(--on-night); }
.mm-footer a:hover { color: var(--brick-on-night); }
.mm-footer hr { border: 0; border-top: 1px solid var(--ink-muted); margin: 24px 0; }
.mm-footer__small { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 14px; line-height: 20px; color: #c9ced8; }
.mm-footer__small p { margin: 0; max-width: 640px; }

/* Plain pages and posts */
.mm-content { padding: 48px var(--gutter) 72px; }
.mm-content > * { max-width: 680px; margin-inline: auto; }
.mm-content > .alignwide { max-width: 1200px; }
.mm-content > .alignfull { max-width: none; }
.mm-content h1.wp-block-post-title { font-size: clamp(34px, 4vw, 48px); line-height: 1.08; margin-bottom: 24px; }
.mm-post-list .wp-block-post { padding-block: 24px; border-top: 1px solid var(--rule); }

/* Screen-reader text */
.mm-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 600px) {
  .mm-hero__collage { min-height: 440px; }
  .mm-hero__clip { max-width: calc(100% - 40px); top: 110px; }
  .mm-hero__stamp { display: none; }
}

/* Pit tally: centre the label and number as one block inside the disc */
.mm-tally { align-content: center; gap: 0; }
.mm-tally .mm-tally__label { margin-top: 6px; }
.mm-tally--lg .mm-tally__label { margin-top: 8px; }

/* beehiiv embed */
.mm-beehiiv { min-height: 52px; max-width: 560px; }
.mm-beehiiv iframe { max-width: 100%; display: block; }

/* Coming soon */
.mm-coming__grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: space-between; }
.mm-coming__copy { flex: 1 1 520px; max-width: 680px; display: flex; flex-direction: column; gap: 14px; }
.mm-coming__copy .wp-block-buttons { margin-top: 8px; }
.mm-coming__stamp { flex: 0 1 260px; display: flex; justify-content: center; }
.mm-coming__stamp .mm-stamp { font-size: 22px; line-height: 24px; padding: 10px 16px 8px; transform: rotate(-4deg); }
@media (max-width: 600px) { .mm-coming__stamp { display: none; } }
