/* No Lanyard — screen.css
   Grey system. Monocle editorial. Phase 3 build.
   Colour unlocks at Phase 4 Identity.
   ----------------------------------------- */

/* TOKENS */
:root {
  --black:        #111111;
  --dark:         #1a1a1a;
  --mid:          #555555;
  --light:        #888888;
  --border:       #d8d8d8;
  --border-light: #ebebeb;
  --bg:           #ffffff;
  --bg-alt:       #f7f7f5;
  --bg-dark:      #111111;

  --font-serif:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --size-xs:      0.75rem;
  --size-sm:      0.875rem;
  --size-base:    1rem;
  --size-md:      1.125rem;
  --size-lg:      1.375rem;
  --size-xl:      1.75rem;
  --size-2xl:     2.25rem;
  --size-3xl:     3rem;
  --size-4xl:     4rem;
  --size-5xl:     5.5rem;

  --max-width:    1200px;
  --content-width: 720px;
  --gutter:       2rem;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--size-base);
  line-height: 1.6;
  color: var(--dark);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* TYPOGRAPHY GLOBALS */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  font-weight: 700;
  color: var(--black);
}

p { margin-bottom: 1.5em; }
p:last-child { margin-bottom: 0; }


/* ================================================
   HEADER
   ================================================ */

.site-header {
  background: var(--bg);
  padding: 0;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Top nav */
.header-nav {
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--border-light);
}

.nav-list {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.15s;
}

.nav-link:hover { color: var(--black); }

/* Masthead */
.site-masthead {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
  border-bottom: 2px solid var(--black);
}

.site-title-link { text-decoration: none; }

.site-title {
  font-family: var(--font-serif);
  font-size: clamp(var(--size-3xl), 7vw, var(--size-5xl));
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 0.4rem;
}

.site-description {
  font-family: var(--font-sans);
  font-size: var(--size-sm);
  color: var(--light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-rule {
  height: 1px;
  background: var(--border-light);
}


/* ================================================
   HOMEPAGE
   ================================================ */

.homepage {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Featured story */
.featured-story {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.featured-inner {
  max-width: 780px;
}

.featured-label {
  display: inline-block;
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 0.75rem;
}

.featured-title {
  font-size: clamp(var(--size-2xl), 4vw, var(--size-4xl));
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.featured-title a:hover { opacity: 0.75; }

.featured-excerpt {
  font-size: var(--size-md);
  color: var(--mid);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  max-width: 640px;
}

/* Pillar strip */
.pillar-strip {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.pillar-strip-inner {
  display: flex;
  gap: 0;
}

.pillar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 2rem 0.5rem 0;
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  border-right: 1px solid var(--border);
  margin-right: 2rem;
  transition: color 0.15s;
}

.pillar-link:last-child { border-right: none; }
.pillar-link:hover { color: var(--black); }

.pillar-arrow { font-size: var(--size-base); font-weight: 300; }

/* Article listing */
.article-listing {
  padding: 3rem 0;
}

.listing-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

/* ================================================
   POST CARD
   ================================================ */

.post-card {
  padding: 2rem 2rem 2rem 0;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.post-card:nth-child(3n) {
  border-right: none;
  padding-right: 0;
}

.post-card:nth-last-child(-n+3) { border-bottom: none; }

.card-pillar {
  display: inline-block;
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 0.6rem;
  transition: color 0.15s;
}

.card-pillar:hover { color: var(--black); }

.card-title {
  font-family: var(--font-serif);
  font-size: var(--size-lg);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.card-title a:hover { opacity: 0.75; }

.card-excerpt {
  font-size: var(--size-sm);
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-meta {
  font-size: var(--size-xs);
  color: var(--light);
  letter-spacing: 0.02em;
}

.card-image-link { display: block; margin-top: 1rem; }

.card-image {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-alt);
  filter: grayscale(100%);
}

.meta-sep { margin: 0 0.35rem; opacity: 0.4; }


/* ================================================
   ARTICLE — SINGLE
   ================================================ */

.article-single {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.article-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.article-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.article-pillar {
  display: inline-block;
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 1rem;
  transition: color 0.15s;
}

.article-pillar:hover { color: var(--black); }

.article-title {
  font-size: clamp(var(--size-2xl), 4vw, var(--size-4xl));
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.article-standfirst {
  font-family: var(--font-serif);
  font-size: var(--size-lg);
  font-style: italic;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.article-meta {
  font-size: var(--size-xs);
  color: var(--light);
  letter-spacing: 0.02em;
}

/* Feature image */
.article-feature-image {
  max-width: 860px;
  margin: 0 auto 3rem;
}

.article-feature-image img {
  width: 100%;
  filter: grayscale(100%);
}

.article-feature-image figcaption {
  font-size: var(--size-xs);
  color: var(--light);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Article body */
.article-body {
  max-width: var(--content-width);
  margin: 0 auto;
  font-size: var(--size-md);
  line-height: 1.75;
  color: var(--dark);
}

.gh-content h2 {
  font-size: var(--size-xl);
  margin: 2.5rem 0 1rem;
}

.gh-content h3 {
  font-size: var(--size-lg);
  margin: 2rem 0 0.75rem;
}

.gh-content p { margin-bottom: 1.5em; }

.gh-content a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}

.gh-content a:hover { text-decoration-color: var(--black); }

.gh-content blockquote {
  border-left: 3px solid var(--black);
  padding: 1rem 0 1rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-size: var(--size-lg);
  font-style: italic;
  color: var(--mid);
}

.gh-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.gh-content ul, .gh-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5em;
}

.gh-content li { margin-bottom: 0.5em; }
.gh-content ul li { list-style-type: disc; }
.gh-content ol li { list-style-type: decimal; }

/* Koenig width classes — required by Ghost validation */
.gh-content .kg-width-wide {
  width: 85vw;
  min-width: 100%;
  margin: 2em calc(50% - 42.5vw);
}

.gh-content .kg-width-full {
  width: 100vw;
  margin: 2em calc(50% - 50vw);
}

.gh-content .kg-image-card { margin: 2em 0; }
.gh-content .kg-image-card img { filter: grayscale(100%); }
.gh-content .kg-image-card figcaption {
  font-size: var(--size-xs);
  color: var(--light);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Article footer */
.article-footer {
  max-width: var(--content-width);
  margin: 3rem auto 0;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.article-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.tag-link {
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  transition: all 0.15s;
}

.tag-link:hover {
  color: var(--black);
  border-color: var(--black);
}

.article-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--size-xs);
}

.share-label {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light);
}

.share-link {
  color: var(--mid);
  font-weight: 500;
  transition: color 0.15s;
}

.share-link:hover { color: var(--black); }

/* Related articles */
.related-articles {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.related-title {
  font-family: var(--font-sans);
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}


/* ================================================
   TAG / ARCHIVE
   ================================================ */

.tag-archive {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.archive-header {
  padding: 4rem 0 3rem;
  border-bottom: 2px solid var(--black);
  margin-bottom: 3rem;
}

.archive-header-inner { max-width: 640px; }

.archive-label {
  display: inline-block;
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 0.75rem;
}

.archive-title {
  font-size: clamp(var(--size-2xl), 5vw, var(--size-4xl));
  margin-bottom: 1rem;
}

.archive-description {
  font-family: var(--font-serif);
  font-size: var(--size-md);
  font-style: italic;
  color: var(--mid);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.archive-count {
  font-size: var(--size-xs);
  color: var(--light);
  letter-spacing: 0.05em;
}


/* ================================================
   PAGE — STATIC
   ================================================ */

.page-single {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.page-header {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.page-header-inner { max-width: var(--content-width); margin: 0 auto; }

.page-title {
  font-size: clamp(var(--size-2xl), 4vw, var(--size-4xl));
}

.page-body {
  max-width: var(--content-width);
  margin: 0 auto;
  font-size: var(--size-md);
  line-height: 1.75;
}


/* ================================================
   ERROR
   ================================================ */

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: var(--gutter);
}

.error-inner { text-align: center; max-width: 480px; }

.error-code {
  display: block;
  font-size: var(--size-5xl);
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 1rem;
}

.error-title {
  font-size: var(--size-xl);
  margin-bottom: 1rem;
}

.error-body {
  color: var(--mid);
  margin-bottom: 2rem;
}

.error-home {
  font-size: var(--size-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ================================================
   PAGINATION
   ================================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border-light);
}

.older-posts, .newer-posts {
  font-size: var(--size-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.15s;
}

.older-posts:hover, .newer-posts:hover { color: var(--black); }

.page-number {
  font-size: var(--size-xs);
  color: var(--light);
}


/* ================================================
   FOOTER
   ================================================ */

.site-footer {
  background: var(--bg-dark);
  color: #ffffff;
  margin-top: 5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--gutter) 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: var(--size-xl);
  color: #ffffff;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-note {
  font-size: var(--size-xs);
  color: #888;
  letter-spacing: 0.03em;
}

.footer-nav-list {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav-list a {
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  transition: color 0.15s;
}

.footer-nav-list a:hover { color: #ffffff; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  border-top: 1px solid #2a2a2a;
}

.footer-bottom p {
  font-size: var(--size-xs);
  color: #555;
  margin: 0;
}


/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1024px) {
  .listing-inner,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-card:nth-child(3n) {
    border-right: 1px solid var(--border-light);
    padding-right: 2rem;
  }

  .post-card:nth-child(2n) {
    border-right: none;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  :root { --gutter: 1.25rem; }

  .nav-list { gap: 1.25rem; overflow-x: auto; padding-bottom: 0.25rem; }

  .site-masthead { padding: 2rem 0 1.75rem; }

  .listing-inner,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .post-card {
    border-right: none !important;
    padding-right: 0 !important;
    border-bottom: 1px solid var(--border-light);
  }

  .pillar-strip-inner { flex-wrap: wrap; gap: 0.75rem; }
  .pillar-link { border-right: none; margin-right: 0; padding-right: 0; }

  .footer-inner { flex-direction: column; gap: 1.5rem; }

  .article-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .site-title { letter-spacing: -0.01em; }
  .article-title { font-size: var(--size-2xl); }
  .featured-title { font-size: var(--size-xl); }
}
