/* Grainpress — Base. Global defaults, reset, and body-level rules. Implementation: Phase 2. */

/* ----------------------------------------
   Koenig editor content width classes
   Required by Ghost for article rendering
---------------------------------------- */

.kg-width-wide {
  width: 85vw;
  max-width: var(--media-width-fluid, 1120px);
  margin-left: auto;
  margin-right: auto;
}

.kg-width-full {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* ----------------------------------------
   Box model reset
---------------------------------------- */

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

/* ----------------------------------------
   Body defaults
---------------------------------------- */

body {
  margin: 0;
  background-color: var(--gp-bg);
  color: var(--gp-text);
  font-family: var(--font-body);
  font-size: var(--body-standard-size);
  line-height: var(--body-standard-line);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ----------------------------------------
   Heading defaults
   Specific sizes and margins are template-specific
---------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gp-text);
  line-height: 1.2;
  margin: 0;
}

/* ----------------------------------------
   Paragraph
---------------------------------------- */

p {
  margin: 0 0 var(--space-5) 0;
}

/* ----------------------------------------
   Link defaults
---------------------------------------- */

a {
  color: var(--gp-text);
  text-decoration: underline;
}

a:hover {
  opacity: 0.7;
  text-decoration: none;
}

/* ----------------------------------------
   Image and media defaults
---------------------------------------- */

img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

/* ----------------------------------------
   Code defaults — IBM Plex Mono
---------------------------------------- */

code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

pre {
  overflow-x: auto;
  padding: var(--space-5);
  background-color: var(--gp-panel);
}

/* ----------------------------------------
   Caption treatment — Newsreader italic
---------------------------------------- */

figcaption {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--gp-text-muted);
  margin-top: var(--space-2);
}

/* ----------------------------------------
   Article body defaults
   Applied via .post-full-content in post.hbs
---------------------------------------- */

.post-full-content {
  font-family: var(--font-body);
  font-size: var(--article-body-size);
  line-height: var(--article-body-line);
  color: var(--gp-text);
}

/* ----------------------------------------
   Deck / standfirst
   Applied via .post-full-deck in post.hbs
---------------------------------------- */

.post-full-deck {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 23px;
  line-height: 1.5;
  color: var(--gp-text);
}

/* ----------------------------------------
   Metadata label
   Reusable utility for dates, kickers, labels
---------------------------------------- */

.meta {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 1.2px;
  color: var(--gp-text-muted);
  text-transform: uppercase;
}
