/*
Theme Name: WSJ
Theme URI: https://wsj.com
Author: Your Name
Author URI: https://example.com
Description: The Wall Street Journal — news site theme. Tailwind CDN, Libre Baskerville, design tokens.
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: wsj
Tags: news, newspaper, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ── Design Tokens ── */
:root {
  --wsj-navy: #0f1e3a;
  --wsj-navy-light: #162b52;
  --wsj-gold: #b8860b;
  --wsj-amber: #c9952c;
  --wsj-red: #c0392b;
  --wsj-green: #1a8c4a;
  --wsj-gray-50: #f7f7f7;
  --wsj-gray-100: #ebebeb;
  --wsj-gray-200: #d9d9d9;
  --wsj-gray-300: #bfbfbf;
  --wsj-gray-400: #999;
  --wsj-gray-500: #767676;
  --wsj-gray-600: #555;
  --wsj-gray-700: #333;
  --wsj-gray-900: #111;
}

body { background: #fff; color: var(--wsj-gray-900); }

/* ── Typography ── */
.wsj-serif { font-family: 'Libre Baskerville', Georgia, 'Times New Roman', Times, serif; }
.wsj-sans  { font-family: Arial, Helvetica, 'Helvetica Neue', sans-serif; }

/* masthead logo */
.wsj-logo {
  font-family: 'Libre Baskerville', Georgia, 'Times New Roman', Times, serif;
  font-size: 62px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--wsj-navy);
}
.wsj-logo .period { color: var(--wsj-gold); }

/* headline scale */
.hl-xl { font-size: 52px; line-height: 1.03; letter-spacing: -0.02em; }
.hl-lg { font-size: 34px; line-height: 1.12; letter-spacing: -0.01em; }
.hl-md { font-size: 24px; line-height: 1.2; }
.hl-sm { font-size: 20px; line-height: 1.25; }
.hl-xs { font-size: 17px; line-height: 1.3; }

/* story body */
.body-text { font-size: 17px; line-height: 1.65; color: var(--wsj-gray-600); }
.body-sm   { font-size: 14px; line-height: 1.55; color: var(--wsj-gray-500); }

/* section label */
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--wsj-navy);
  border-bottom: 2px solid var(--wsj-navy);
  padding-bottom: 6px; display: inline-block;
}

/* top bar tickers */
.ticker-up   { color: var(--wsj-green); }
.ticker-down { color: var(--wsj-red); }

/* thin rule */
.rule { border: 0; border-top: 1px solid var(--wsj-gray-200); margin: 0; }

/* hover underline for links */
.hover-underline { transition: all 0.12s ease; }
.hover-underline:hover { text-decoration: underline; text-underline-offset: 2px; }

/* nav item */
.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--wsj-gray-900);
  padding: 12px 0;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--wsj-navy); }
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 100%; height: 2px; background: var(--wsj-navy);
  transform: scaleX(0); transition: transform 0.15s;
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--wsj-navy); }
.nav-link.active::after { transform: scaleX(1); }

/* card image placeholder gradient */
.img-placeholder {
  background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

/* live dot */
.live-dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; background: var(--wsj-red);
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* sticky market bar animation */
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-track {
  animation: ticker-scroll 45s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }

/* article body */
.article-body { font-family: Georgia, 'Times New Roman', Times, serif; font-size: 18px; line-height: 1.75; color: #333; }
.article-body p { margin-bottom: 1.25em; }
.article-body h2 { font-size: 24px; font-weight: 700; margin-top: 1.8em; margin-bottom: 0.6em; font-family: 'Libre Baskerville', Georgia, serif; }
blockquote {
  border-left: 3px solid var(--wsj-navy); padding-left: 1.25em;
  margin: 1.5em 0; color: #555; font-style: italic; font-size: 19px;
}
.pullquote {
  font-size: 22px; font-weight: 700; color: var(--wsj-navy);
  border-left: 3px solid var(--wsj-amber); padding-left: 1em;
  margin: 1.5em 0; line-height: 1.3;
}

.about-body { font-size: 17px; line-height: 1.7; color: #444; }
.about-body p { margin-bottom: 1.2em; }
.about-body h2 { font-size: 22px; font-weight: 700; margin-top: 1.5em; margin-bottom: 0.5em; color: var(--wsj-gray-900); }

/* responsive grid tweaks */
@media (max-width: 1024px) {
  .hl-xl { font-size: 36px; }
  .hl-lg { font-size: 28px; }
  .wsj-logo { font-size: 42px; }
}
@media (max-width: 640px) {
  .hl-xl { font-size: 28px; }
  .hl-lg { font-size: 22px; }
  .hl-md { font-size: 20px; }
  .wsj-logo { font-size: 32px; }
  .article-body { font-size: 16px; }
}

/* WordPress required align classes */
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--wsj-gray-500); margin-top: 0.5em; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal; }
.sticky { }
.bypostauthor { }
