/*
Theme Name:  Tabloid Press
Theme URI:   https://example.com/tabloid-press
Author:      Claude
Description: A graphically rich, clean tabloid newspaper theme. Big splash headlines, kicker stamps, breaking-news ticker, and a disciplined story grid.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tabloid-press
Tags:        news, magazine, three-columns, custom-menu, featured-images
*/

/* ---------------------------------------------------------------------------
   TOKENS
--------------------------------------------------------------------------- */
:root {
  --red:        #C8102E;
  --red-dark:   #9E0C24;
  --ink:        #14141A;
  --paper:      #FFFFFF;
  --flash:      #FFD400;
  --newsprint:  #F4F4F1;
  --rule:       #E2E2DE;
  --meta:       #6E6E76;

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-cond:    'Oswald', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1200px;
  --gutter: 24px;
}

/* ---------------------------------------------------------------------------
   RESET / BASE
--------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

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

.screen-reader-text {
  position: absolute !important;
  clip-path: inset(50%);
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------------------------
   MASTHEAD
--------------------------------------------------------------------------- */
.masthead { background: var(--red); color: #fff; }
.masthead__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter) 14px;
  max-width: var(--wrap);
  margin: 0 auto;
}
.masthead__brand {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.9;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}
.masthead__brand:hover { color: var(--flash); }
.masthead__tagline {
  font-family: var(--font-cond);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0.9;
  margin: 0;
}
.masthead__date {
  font-family: var(--font-cond);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
}

/* Nav strip */
.navstrip { background: var(--ink); }
.navstrip ul {
  list-style: none;
  margin: 0 auto;
  max-width: var(--wrap);
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
}
.navstrip a {
  display: block;
  padding: 12px 18px;
  font-family: var(--font-cond);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  text-decoration: none;
}
.navstrip a:hover,
.navstrip .current-menu-item > a { background: var(--red); color: #fff; }

/* Breaking ticker */
.ticker {
  background: var(--flash);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.ticker__label {
  flex: none;
  background: var(--ink);
  color: var(--flash);
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 8px 16px;
  display: flex;
  align-items: center;
}
.ticker__track { flex: 1; overflow: hidden; position: relative; }
.ticker__items {
  display: inline-flex;
  gap: 48px;
  white-space: nowrap;
  padding: 8px 24px;
  animation: ticker-scroll 30s linear infinite;
  font-family: var(--font-cond);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
}
.ticker__items a { text-decoration: none; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__items { animation: none; white-space: normal; }
}

/* ---------------------------------------------------------------------------
   KICKER STAMPS — the signature element
--------------------------------------------------------------------------- */
.stamp {
  display: inline-block;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 5px 12px;
  background: var(--flash);
  color: var(--ink);
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.85);
}
.stamp--red { background: var(--red); color: #fff; }

/* Red ribbon section slugs */
.slug {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 48px 0 24px;
}
.slug__label {
  font-family: var(--font-display);
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--red);
  color: #fff;
  padding: 4px 18px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%);
}
.slug::after {
  content: "";
  flex: 1;
  height: 3px;
  background: var(--ink);
}

/* ---------------------------------------------------------------------------
   SPLASH HERO
--------------------------------------------------------------------------- */
.splash {
  position: relative;
  display: block;
  color: #fff;
  text-decoration: none;
  min-height: 420px;
  background: var(--ink);
  overflow: hidden;
}
.splash__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.splash__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,14,0.92) 0%, rgba(10,10,14,0.35) 55%, rgba(10,10,14,0.05) 100%);
}
.splash__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  padding: 40px;
  max-width: var(--wrap);
  margin: 0 auto;
}
.splash__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6.5vw, 84px);
  line-height: 0.95;
  text-transform: uppercase;
  margin: 14px 0 10px;
  max-width: 18ch;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.splash:hover .splash__title { color: var(--flash); }
.splash__standfirst {
  font-size: 18px;
  line-height: 1.5;
  max-width: 62ch;
  margin: 0;
  color: #EDEDEA;
}
.splash__meta {
  margin-top: 14px;
  font-family: var(--font-cond);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #C9C9C4;
}

/* ---------------------------------------------------------------------------
   STORY GRID + CARDS
--------------------------------------------------------------------------- */
.front-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 28px;
}
.card { display: flex; flex-direction: column; }
.card__thumb { position: relative; background: var(--newsprint); }
.card__thumb img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card__thumb .stamp {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 11px;
  padding: 4px 10px;
}
.card__title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 14px 0 8px;
}
.card__title a { text-decoration: none; }
.card__excerpt { font-size: 14.5px; color: #3A3A40; margin: 0; }
.card__meta {
  margin-top: 10px;
  font-family: var(--font-cond);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--meta);
}

/* Lead card spans the grid */
.card--lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.card--lead .card__thumb img { aspect-ratio: 16 / 10; }
.card--lead .card__title { font-size: clamp(28px, 3.5vw, 44px); margin-top: 0; }

/* ---------------------------------------------------------------------------
   SIDEBAR — MOST READ (ranked, so numbered)
--------------------------------------------------------------------------- */
.rail { border-top: 6px solid var(--ink); padding-top: 4px; }
.rail__title {
  font-family: var(--font-display);
  font-size: 24px;
  text-transform: uppercase;
  margin: 10px 0 6px;
}
.mostread { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.mostread li {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.mostread li::before {
  content: counter(rank);
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  color: var(--red);
}
.mostread a {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
}
.rail .widget { margin-bottom: 32px; }
.rail .widget-title { font-family: var(--font-display); font-size: 22px; text-transform: uppercase; }

/* ---------------------------------------------------------------------------
   SINGLE ARTICLE
--------------------------------------------------------------------------- */
.article { max-width: 760px; margin: 0 auto; padding: 40px var(--gutter) 64px; }
.article__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
  text-transform: uppercase;
  margin: 14px 0 12px;
}
.article__standfirst {
  font-size: 20px;
  line-height: 1.55;
  font-weight: 500;
  color: #33333A;
  border-left: 6px solid var(--red);
  padding-left: 18px;
  margin: 0 0 18px;
}
.article__byline {
  font-family: var(--font-cond);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--meta);
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  margin-bottom: 24px;
}
.article__hero { margin: 0 0 8px; }
.article__hero figcaption {
  font-size: 13px;
  color: var(--meta);
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}
.article__body { font-size: 17.5px; }
.article__body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 0.8;
  float: left;
  padding: 6px 10px 0 0;
  color: var(--red);
}
.article__body h2, .article__body h3 {
  font-family: var(--font-cond);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.article__body blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 6px solid var(--flash);
  font-family: var(--font-cond);
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  text-transform: uppercase;
}
.article__tags a {
  display: inline-block;
  font-family: var(--font-cond);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--newsprint);
  padding: 5px 12px;
  margin: 0 6px 6px 0;
}
.article__tags a:hover { background: var(--red); color: #fff; }

/* Archive header */
.archive-head { background: var(--newsprint); border-bottom: 3px solid var(--ink); }
.archive-head h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  text-transform: uppercase;
  margin: 0;
  padding: 28px 0;
}

/* Pagination */
.pagination { margin: 40px 0; font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 2px; }
.pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  text-decoration: none;
  margin-right: 6px;
}
.pagination .current { background: var(--ink); color: #fff; }

/* ---------------------------------------------------------------------------
   FOOTER
--------------------------------------------------------------------------- */
.colophon { background: var(--ink); color: #C9C9C4; margin-top: 64px; }
.colophon__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px var(--gutter);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.colophon__brand {
  font-family: var(--font-display);
  font-size: 40px;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
}
.colophon h2 {
  font-family: var(--font-cond);
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--flash);
}
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon a { color: #C9C9C4; text-decoration: none; line-height: 2; }
.colophon a:hover { color: #fff; }
.colophon__legal {
  border-top: 1px solid #2A2A32;
  font-size: 13px;
  padding: 16px var(--gutter);
  max-width: var(--wrap);
  margin: 0 auto;
}

/* ---------------------------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .front-columns { grid-template-columns: 1fr; }
  .card--lead { grid-template-columns: 1fr; }
  .colophon__inner { grid-template-columns: 1fr; gap: 24px; }
  .masthead__inner { flex-direction: column; align-items: flex-start; gap: 4px; }
  .splash__content { padding: 24px; }
}

/* WordPress core alignment classes */
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--meta); }
.sticky {}
.bypostauthor {}
