/* MAGRS home theme (draft 2026-10-26). Square-tile magazine layout.
   Used by /index.php, the tile article pages and /contact.php. Other pages keep /assets/magrs.css (unchanged). */
:root {
  --accent: #2E6BFF;        /* MAGRS blue, the theme's single accent */
  --navy: #0B1F3A;
  --ink: #000000;
  --paper: #ffffff;
  --panel: #f2f2f2;
  --rule: #d9d9d9;
  --muted: rgba(0, 0, 0, 0.6);
  --slate: #3a4556;
  --head: 96px;
  --f-body: Roboto, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-head: Oswald, "Arial Narrow", Impact, sans-serif;
  --f-alt: Karla, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--head); }
body.mt { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/24px var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.mt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: white bar, logo left, square menu toggle flush right */
.mt-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: stretch; justify-content: space-between;
  min-height: var(--head); padding-left: 24px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.mt-brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; padding: 12px 12px 12px 0; }
.mt-brand__badge { width: 56px; height: 56px; display: block; }
.mt-brand__text { display: flex; flex-direction: column; }
.mt-brand__title { font: 700 30px/1 var(--f-head); text-transform: uppercase; letter-spacing: 0.08em; }
.mt-brand__subtitle { font: 400 13px/18px var(--f-alt); text-transform: uppercase; letter-spacing: 0.0625em; color: var(--muted); margin-top: 6px; }
.mt-brand:hover .mt-brand__title { color: var(--accent); }
.mt-toggle { flex: 0 0 73px; width: 73px; border: 0; border-left: 1px solid var(--rule); background: var(--paper); cursor: pointer; padding: 0; position: relative; color: var(--ink); }
.mt-toggle__icon, .mt-toggle__icon::before, .mt-toggle__icon::after { position: absolute; left: 50%; width: 16px; height: 2px; margin-left: -8px; background: currentColor; content: ""; transition: transform .2s, top .2s, opacity .2s; }
.mt-toggle__icon { top: 50%; }
.mt-toggle__icon::before { top: -5px; left: 0; margin: 0; }
.mt-toggle__icon::after { top: 5px; left: 0; margin: 0; }
.mt-toggle:hover, .mt-toggle:focus-visible { color: var(--accent); }
.mt-menu-open .mt-toggle { color: var(--accent); }
.mt-menu-open .mt-toggle__icon { background: transparent; }
.mt-menu-open .mt-toggle__icon::before { top: 0; transform: rotate(45deg); }
.mt-menu-open .mt-toggle__icon::after { top: 0; transform: rotate(-45deg); }

/* Slide-down menu panel (shown as a plain list if scripts are off) */
.mt-menu { background: var(--panel); border-bottom: 1px solid var(--rule); }
.mt-js .mt-menu { display: none; position: fixed; top: var(--head); left: 0; right: 0; bottom: 0; z-index: 29; overflow-y: auto; border: 0; }
.mt-js.mt-menu-open .mt-menu { display: block; }
.mt-menu__inner { max-width: 500px; margin: 0 auto; padding: 48px 24px; }
.mt-menu__title { font: 700 24px/36px var(--f-head); text-transform: uppercase; letter-spacing: 0.0625em; margin-bottom: 12px; }
.mt-menu a { display: block; padding: 8px 0; border-top: 1px solid var(--rule); font: 700 14px/24px var(--f-body); color: var(--accent); text-decoration: none; }
.mt-menu a:last-child { border-bottom: 1px solid var(--rule); }
.mt-menu a:hover, .mt-menu a:focus-visible { color: var(--ink); }

/* Hero: black featured band, title centered (article-header look) */
.mt-hero { background: #0c0e12; /* same near-black as the badge art, so the badge has no visible box */ color: #fff; text-align: center; }
.mt-hero__inner { max-width: 768px; margin: 0 auto; padding: 56px 24px 64px; }
.mt-hero__badge { width: 150px; height: 150px; display: block; margin: 0 auto 24px; }
.mt-hero h1 { font: 700 44px/1.18 var(--f-head); text-transform: uppercase; letter-spacing: 0.0625em; margin: 0 0 24px; }
.mt-hero__lead { font-size: 18px; line-height: 30px; color: rgba(255, 255, 255, 0.85); margin: 0 auto 24px; max-width: 640px; }
.mt-hero__tagline { font: 400 15px/24px var(--f-alt); text-transform: uppercase; letter-spacing: 0.12em; color: #fff; margin: 0 0 32px; }
.mt-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 28px; }
.mt-btn { display: inline-block; padding: 12px 24px; font: 700 15px/24px var(--f-head); text-transform: uppercase; letter-spacing: 0.0625em; text-decoration: none; border: 2px solid var(--accent); }
.mt-btn--solid { background: var(--accent); color: #fff; }
.mt-btn--solid:hover { background: #fff; border-color: #fff; color: var(--ink); }
.mt-btn--line { border-color: #fff; color: #fff; }
.mt-btn--line:hover { background: #fff; color: var(--ink); }
.mt-hero__note { font-size: 14px; color: rgba(255, 255, 255, 0.6); margin: 0; }

/* Square tile grid: 1 / 2 / 3 columns, edge to edge, no gutters */
.mt-grid { display: grid; grid-template-columns: 1fr; }
.mt-tile { position: relative; display: block; aspect-ratio: 1 / 1; color: #fff; text-decoration: none; overflow: hidden; background: var(--ink); }
.mt-tile--1 { background: var(--navy); }
.mt-tile--2 { background: var(--ink); }
.mt-tile--3 { background: var(--slate); }
.mt-grid .mt-tile::after { content: ""; position: absolute; inset: 0; background: var(--accent); opacity: 0; transition: opacity .2s; }
.mt-grid .mt-tile:hover::after, .mt-grid .mt-tile:focus-visible::after { opacity: 0.6; }
/* Thumbnail tiles: the image fills the whole tile edge to edge (no padding or inset); the label strip overlays its foot */
.mt-tile__img { position: absolute; inset: 0; margin: 0; padding: 0; width: 100%; height: 100%; display: block; }
.mt-tile__img img { width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; display: block; object-fit: cover; object-position: center; }
.mt-tile--img .mt-tile__band { background: rgba(0, 0, 0, 0.62); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.mt-tile__band { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 12px 24px 24px; background: rgba(0, 0, 0, 0.25); text-align: center; }
.mt-tile__meta { display: block; font-size: 14px; line-height: 24px; color: #fff; }
.mt-tile__title { display: block; font: 700 22px/30px var(--f-head); text-transform: uppercase; letter-spacing: 0.0625em; }

/* Sections in article style: centered text column, Oswald uppercase heads, hairline rules */
.mt-section { border-top: 1px solid var(--rule); padding: 72px 24px; scroll-margin-top: var(--head); }
.mt-section--tight { padding-top: 48px; padding-bottom: 48px; }
.mt-section--dark { background: var(--ink); color: #fff; border-top: 0; }
.mt-section--muted { background: var(--panel); }
.mt-entry { max-width: 624px; margin: 0 auto; }
.mt-entry--center { text-align: center; }
.mt-entry--center .mt-prose { text-align: left; }
.mt-meta { font-size: 14px; line-height: 24px; color: var(--muted); margin-bottom: 4px; }
.mt-section h2 { font: 400 30px/36px var(--f-head); text-transform: uppercase; letter-spacing: 0.0625em; margin: 0 0 24px; }
.mt-section--dark h2 { font-weight: 700; }
.mt-h2-link { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.mt-h2-link:hover { color: var(--accent); }
.mt-prose p, .mt-entry > p { margin: 0 0 24px; }
.mt-prose ul { margin: 0 0 24px; padding-left: 1.25em; }
.mt-prose li { margin-bottom: 8px; }
.mt-prose strong { font-weight: 700; }
.mt-section--dark .mt-prose p { color: rgba(255, 255, 255, 0.88); }
.mt-section--dark .mt-prose strong { color: #fff; }

/* AI or SI inset: panel grey with accent edge */
.mt-inset { background: var(--panel); border-left: 4px solid var(--accent); padding: 20px 24px; margin: 0 auto; }
.mt-inset p { margin: 0 0 6px; }
.mt-inset p:last-child { margin: 0; }
.mt-inset .rm-inset__headline { font: 700 20px/28px var(--f-head); text-transform: uppercase; letter-spacing: 0.0625em; margin-bottom: 10px; }

/* Principle quote */
.mt-quote blockquote { margin: 0 0 16px; font: 400 22px/34px var(--f-body); }
.mt-quote__byline { font: 400 15px/24px var(--f-alt); text-transform: uppercase; letter-spacing: 0.0625em; margin: 0 0 4px; }
.mt-quote__motto { font-style: italic; color: var(--muted); margin: 0 0 48px; }

/* Pillars as square tiles with text */
.mt-pillars { display: grid; grid-template-columns: 1fr; margin: 0 -24px -72px; }
.mt-pillar { position: relative; color: #fff; display: flex; align-items: flex-end; min-height: 320px; }
.mt-pillar__body { width: 100%; padding: 24px; background: rgba(0, 0, 0, 0.25); text-align: center; }
.mt-pillar__title { font: 700 22px/30px var(--f-head); text-transform: uppercase; letter-spacing: 0.0625em; margin-bottom: 8px; }
.mt-pillar p { margin: 0; color: rgba(255, 255, 255, 0.9); }

/* Contact rows like menu rows */
.mt-rows { margin: 0 0 24px; }
.mt-rows p { margin: 0; padding: 10px 0; border-top: 1px solid var(--rule); font-weight: 700; }
.mt-rows p:last-child { border-bottom: 1px solid var(--rule); }
.mt-rows a { text-decoration: none; }
.mt-rows a:hover { text-decoration: underline; }
.mt-fine { font-size: 14px; color: var(--muted); }

/* Plain theme page (contact.php): one home-style section with the title as h1 */
.mt-page { border-top: 0; }
.mt-page h1 { font: 400 36px/48px var(--f-head); text-transform: uppercase; letter-spacing: 0.0625em; margin: 0 0 24px; }
.mt-page__meta { margin: 0 0 8px; }
.mt-page__home { margin: 48px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 14px; }
.mt-page__home a { text-decoration: none; font-weight: 700; }
.mt-page__home a:hover { text-decoration: underline; }

/* Footer: white, hairline, small muted text */
.mt-footer { border-top: 1px solid var(--rule); padding: 18px 24px 24px; font-size: 12px; line-height: 20px; color: var(--muted); }
.mt-footer a { color: var(--muted); }
.mt-footer a:hover { color: var(--accent); }
.mt-footer__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; }
.mt-footer__links { display: flex; gap: 16px; }
.magrs-seal img { display: block; }
.privacy-blurb { margin: 8px 0 0; }
.marshall-principle { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); }
.marshall-principle p { margin: 0; }
.marshall-principle blockquote { margin: 6px 0 0; padding: 0; border: 0; font-style: normal; }

@media (min-width: 568px) {
  .mt-grid { grid-template-columns: repeat(2, 1fr); }
  .mt-pillars { grid-template-columns: repeat(3, 1fr); }
  .mt-pillar { aspect-ratio: 1 / 1; min-height: 0; }
}
@media (min-width: 1024px) {
  .mt-grid { grid-template-columns: repeat(3, 1fr); }
  .mt-hero h1 { font-size: 52px; }
}
@media (max-width: 567px) {
  :root { --head: 73px; }
  .mt-brand__badge { width: 40px; height: 40px; }
  .mt-brand__title { font-size: 24px; }
  .mt-brand__subtitle { font-size: 10px; line-height: 14px; margin-top: 4px; letter-spacing: 0.04em; }
  .mt-hero__inner { padding: 40px 20px 48px; }
  .mt-hero__badge { width: 112px; height: 112px; }
  .mt-hero h1 { font-size: 32px; }
  .mt-hero__lead { font-size: 16px; line-height: 26px; }
  .mt-section { padding: 48px 20px; }
  .mt-section h2 { font-size: 26px; line-height: 32px; }
  .mt-pillars { margin: 0 -20px -48px; }
  .mt-quote blockquote { font-size: 19px; line-height: 30px; }
  .mt-page h1 { font-size: 28px; line-height: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
