/*
Theme Name: The Home Front Gazette
Theme URI: https://example.com/home-front-gazette
Author: Your Newsroom
Author URI: https://example.com
Description: A broadsheet-style WordPress theme built for World War II history and news sites. Styled after an American daily newspaper of the early 1940s — hot-metal headlines, column rules, a dateline masthead, and a teletype bulletin sidebar.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: home-front-gazette
Tags: news, blog, one-column, two-columns, right-sidebar, custom-menu, featured-images, translation-ready
*/

/* -------------------------------------------------------------
   0. TOKENS
   Palette pulled from aged newsprint, hot-metal ink, and the
   red grease-pencil used to mark up a proof on the stone.
------------------------------------------------------------- */
:root{
  --paper:        #e9e2cd;   /* base newsprint */
  --paper-light:  #f2ecdc;   /* card / lead-story ground */
  --paper-shadow: #d9d0b4;   /* recessed boxes, ticker */
  --ink:          #201c14;   /* body / headline ink */
  --ink-soft:     #4a4331;   /* captions, meta */
  --ink-faint:    #7a7157;   /* faint rules, disabled */
  --rule:         #201c14;   /* hairlines */
  --grease-red:   #8a2115;   /* proof-mark red, used sparingly */
  --gold-foil:    #96793a;   /* medal-ribbon gold, service stripes */

  --font-display: 'Old Standard TT', 'Times New Roman', serif;
  --font-body:    'PT Serif', Georgia, 'Times New Roman', serif;
  --font-type:    'Special Elite', 'Courier New', monospace;

  --measure: 42ch;
  --rule-w: 1px;
}

/* -------------------------------------------------------------
   1. RESET / BASE
------------------------------------------------------------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(rgba(32,28,20,0.035) 1px, transparent 1px);
  background-size: 3px 3px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--grease-red);
  outline-offset: 2px;
}

.screen-reader-text{
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* -------------------------------------------------------------
   2. WRAPPER / GRID
------------------------------------------------------------- */
.gazette-wrap{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

.gazette-layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 900px){
  .gazette-layout{
    grid-template-columns: 1fr 300px;
    column-gap: 34px;
    align-items: start;
  }
}

/* -------------------------------------------------------------
   3. MASTHEAD
------------------------------------------------------------- */
.masthead{
  padding: 22px 0 0;
}

.masthead-topline{
  display: flex;
  justify-content: space-between;
  font-family: var(--font-type);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  border-bottom: var(--rule-w) solid var(--ink-faint);
  padding-bottom: 6px;
}

.masthead-title-row{
  text-align: center;
  padding: 18px 0 10px;
  border-bottom: 3px double var(--rule);
}

.site-title{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  letter-spacing: 0.01em;
  line-height: 1;
}
.site-title a{ display: inline-block; }

.site-description{
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.masthead-dateline{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-type);
  font-size: 11.5px;
  color: var(--ink);
  padding: 7px 0;
  border-bottom: var(--rule-w) solid var(--rule);
  gap: 10px;
  flex-wrap: wrap;
}
.masthead-dateline span{ white-space: nowrap; }

/* Primary navigation styled as a rule-bound index line */
.gazette-nav{
  border-bottom: 4px solid var(--rule);
  padding: 9px 0;
  margin-bottom: 26px;
}
.gazette-nav ul{
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  font-family: var(--font-display);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}
.gazette-nav li{ position: relative; }
.gazette-nav a{
  display: inline-block;
  padding: 2px 16px;
  border-right: var(--rule-w) solid var(--ink-faint);
}
.gazette-nav li:last-child a{ border-right: none; }
.gazette-nav a:hover{ color: var(--grease-red); }

/* -------------------------------------------------------------
   4. LEAD STORY / FRONT PAGE
------------------------------------------------------------- */
.lead-story{
  border-bottom: 3px double var(--rule);
  padding-bottom: 26px;
  margin-bottom: 30px;
}

.kicker{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grease-red);
  border-top: var(--rule-w) solid var(--grease-red);
  border-bottom: var(--rule-w) solid var(--grease-red);
  display: inline-block;
  padding: 2px 0;
  margin-bottom: 10px;
}

.lead-headline{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.03;
  margin: 0 0 8px;
}

.lead-deck{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.18rem;
  color: var(--ink-soft);
  line-height: 1.35;
  margin: 0 0 14px;
  max-width: 62ch;
}

.entry-meta{
  font-family: var(--font-type);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.entry-meta .sep{ margin: 0 6px; color: var(--ink-faint); }

.lead-figure{
  margin: 0 0 14px;
  border: var(--rule-w) solid var(--rule);
  padding: 6px;
  background: var(--paper-light);
}
.lead-figure figcaption{
  font-family: var(--font-type);
  font-size: 0.72rem;
  color: var(--ink-soft);
  padding: 6px 4px 0;
  border-top: var(--rule-w) dashed var(--ink-faint);
  margin-top: 6px;
}

.lead-body{
  columns: 2;
  column-gap: 28px;
  column-rule: var(--rule-w) solid var(--ink-faint);
}
@media (max-width: 640px){ .lead-body{ columns: 1; } }

.lead-body p{ margin: 0 0 1em; }
.lead-body > p:first-of-type::first-letter{
  font-family: var(--font-display);
  font-weight: 700;
  float: left;
  font-size: 4.6em;
  line-height: 0.82;
  padding: 4px 6px 0 0;
  color: var(--ink);
}

/* -------------------------------------------------------------
   5. STORY GRID (secondary posts on index/archive)
------------------------------------------------------------- */
.story-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 26px;
  row-gap: 0;
}
@media (max-width: 900px){ .story-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .story-grid{ grid-template-columns: 1fr; } }

.story{
  border-right: var(--rule-w) solid var(--ink-faint);
  padding: 0 22px 22px 0;
  margin-bottom: 22px;
}
.story-grid > .story:nth-child(3n){ border-right: none; }
@media (max-width: 900px){ .story-grid > .story:nth-child(2n){ border-right: none; } }
@media (max-width: 560px){ .story{ border-right: none; padding-right: 0; } }

.story-headline{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.12;
  margin: 0 0 6px;
}
.story-headline a:hover{ color: var(--grease-red); }

.story-figure{ margin: 0 0 8px; }
.story-figure img{ filter: grayscale(85%) contrast(1.05); }

.story-excerpt{ font-size: 0.96rem; color: var(--ink-soft); margin: 0 0 8px; }

.read-more{
  font-family: var(--font-type);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: var(--rule-w) solid var(--ink);
}

/* Pagination / "Continued on next page" */
.gazette-pagination{
  font-family: var(--font-type);
  font-size: 0.82rem;
  text-align: center;
  border-top: var(--rule-w) solid var(--rule);
  padding-top: 14px;
  margin: 10px 0 40px;
}
.gazette-pagination a{ padding: 0 10px; border-bottom: var(--rule-w) solid var(--ink); }
.gazette-pagination .current{ padding: 0 10px; color: var(--grease-red); font-weight: 700; }

/* -------------------------------------------------------------
   6. SINGLE POST
------------------------------------------------------------- */
.single-story{ padding-bottom: 30px; }
.single-story .kicker{ margin-top: 8px; }
.single-story .lead-headline{ font-size: clamp(2.1rem, 5vw, 3.6rem); }

.entry-content{
  columns: 2;
  column-gap: 30px;
  column-rule: var(--rule-w) solid var(--ink-faint);
  max-width: none;
}
@media (max-width: 720px){ .entry-content{ columns: 1; } }

.entry-content p{ margin: 0 0 1em; }
.entry-content > p:first-of-type::first-letter{
  font-family: var(--font-display);
  font-weight: 700;
  float: left;
  font-size: 4.4em;
  line-height: 0.82;
  padding: 4px 6px 0 0;
}
.entry-content blockquote{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  border-top: var(--rule-w) solid var(--ink);
  border-bottom: var(--rule-w) solid var(--ink);
  padding: 10px 0;
  margin: 0 0 1em;
}
.entry-content img{ filter: grayscale(85%) contrast(1.05); }
.entry-content figcaption{
  font-family: var(--font-type);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.entry-tags{
  font-family: var(--font-type);
  font-size: 0.76rem;
  border-top: var(--rule-w) dashed var(--ink-faint);
  padding-top: 10px;
  margin-top: 18px;
}
.entry-tags a{ border-bottom: var(--rule-w) solid var(--ink); margin-right: 10px; }

/* -------------------------------------------------------------
   7. SIDEBAR — "WAR BULLETINS" TICKER COLUMN
------------------------------------------------------------- */
.gazette-sidebar{
  padding-top: 4px;
}
.widget{
  background: var(--paper-shadow);
  border: var(--rule-w) solid var(--rule);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.widget-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rule);
}
.widget ul{ list-style: none; margin: 0; padding: 0; }
.widget li{
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: var(--rule-w) dashed var(--ink-faint);
}
.widget li:last-child{ border-bottom: none; }
.widget a:hover{ color: var(--grease-red); }

.widget_search .search-form{ display: flex; gap: 6px; }
.widget_search input[type="search"]{
  flex: 1;
  font-family: var(--font-type);
  padding: 7px 8px;
  border: var(--rule-w) solid var(--ink);
  background: var(--paper-light);
}
.widget_search button{
  font-family: var(--font-type);
  background: var(--ink);
  color: var(--paper-light);
  border: var(--rule-w) solid var(--ink);
  padding: 0 12px;
  cursor: pointer;
}
.widget_search button:hover{ background: var(--grease-red); border-color: var(--grease-red); }

/* -------------------------------------------------------------
   8. FOOTER
------------------------------------------------------------- */
.gazette-footer{
  border-top: 4px solid var(--rule);
  margin-top: 20px;
  padding: 20px 0 40px;
  text-align: center;
}
.gazette-footer p{
  font-family: var(--font-type);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 4px 0;
}
.gazette-footer nav ul{
  list-style: none; display: flex; justify-content: center; gap: 0;
  margin: 0 0 10px; padding: 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
}
.gazette-footer nav a{ padding: 0 10px; border-right: var(--rule-w) solid var(--ink-faint); }
.gazette-footer nav li:last-child a{ border-right: none; }

/* -------------------------------------------------------------
   9. MISC — comments, buttons, alignment helpers
------------------------------------------------------------- */
.alignwide{ max-width: 100%; }
.aligncenter{ margin-left: auto; margin-right: auto; }

.comments-area{
  border-top: 3px double var(--rule);
  margin-top: 30px;
  padding-top: 20px;
}
.comment-list{ list-style: none; margin: 0; padding: 0; }
.comment-list article{
  border-bottom: var(--rule-w) dashed var(--ink-faint);
  padding: 14px 0;
}
.comment-author{ font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.comment-metadata{ font-family: var(--font-type); font-size: 0.72rem; color: var(--ink-soft); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea{
  width: 100%;
  font-family: var(--font-body);
  border: var(--rule-w) solid var(--ink);
  background: var(--paper-light);
  padding: 8px;
  margin-bottom: 10px;
}
.comment-form label{ font-family: var(--font-type); font-size: 0.8rem; }
.comment-form .submit{
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  background: var(--ink);
  color: var(--paper-light);
  border: none;
  padding: 9px 22px;
  cursor: pointer;
}
.comment-form .submit:hover{ background: var(--grease-red); }
