/* =====================================================================
   FOURFRONT DAILY — STYLESHEET
   ---------------------------------------------------------------------
   How this file is organised (use Ctrl/Cmd+F to jump to a section):
   1.  Variables (colors, fonts, spacing)      -> :root
   2.  Reset & base element styles             -> BASE
   3.  Layout helpers (container, grid)         -> LAYOUT
   4.  Buttons, tags, forms                     -> COMPONENTS: UI
   5.  Header, nav, ticker                      -> COMPONENTS: HEADER
   6.  Hero section                             -> COMPONENTS: HERO
   7.  Story cards                              -> COMPONENTS: CARD
   8.  Section titles & category bands          -> COMPONENTS: SECTIONS
   9.  Newsletter band                          -> COMPONENTS: NEWSLETTER
   10. Footer                                   -> COMPONENTS: FOOTER
   11. Article / post page                      -> PAGE: POST
   12. About & Contact pages                    -> PAGE: ABOUT/CONTACT
   13. Responsive breakpoints                   -> MEDIA QUERIES

   Tip for beginners: every color, font and spacing value in the whole
   site is defined ONCE below in :root. Change a value there and it
   updates everywhere it's used.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. VARIABLES
--------------------------------------------------------------------- */
:root {
  /* --- Neutral palette --- */
  --ink: #15181d;            /* main text color */
  --ink-soft: #4b515a;       /* secondary/muted text */
  --paper: #fefefe;          /* page background */
  --paper-dim: #f2f1ec;      /* card / band background */
  --line: #e3e1da;           /* borders, hairlines */
  --white: #ffffff;

  /* --- Category colors (the four "beats") --- */
  --retail: #d69e2e;
  --retail-dark: #a97a1e;
  --entertainment: #c0247e;
  --entertainment-dark: #8c1a5c;
  --technology: #0072ce;
  --technology-dark: #00509a;
  --sports: #1e9e5a;
  --sports-dark: #146b3d;

  /* --- The "spectrum" (signature 4-color gradient) --- */
  --spectrum: linear-gradient(90deg, var(--retail) 0%, var(--entertainment) 34%, var(--technology) 66%, var(--sports) 100%);

  /* --- Type --- */
  --font-display: 'Archivo Black', 'Arial Black', sans-serif;
  --font-head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Lora', Georgia, serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* --- Spacing scale --- */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.5rem;
  --sp-5: 4rem;

  /* --- Shape / shadow --- */
  --radius: 10px;            /* softer, more modern corners */
  --radius-sm: 6px;          /* smaller elements (thumbnails, chips) */
  --shadow: 0 6px 24px rgba(21, 24, 29, 0.08);
  --shadow-lg: 0 14px 40px rgba(21, 24, 29, 0.12);
  --container: 1240px;
}

/* ---------------------------------------------------------------------
   2. BASE
--------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.1;
  margin: 0 0 var(--sp-2);
  letter-spacing: 0.01em;
}

p { margin: 0 0 var(--sp-2); }

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: var(--font-ui); cursor: pointer; }

input, textarea, button {
  font-family: var(--font-ui);
  font-size: 1rem;
}

:focus-visible {
  outline: 3px solid var(--technology);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------------
   3. LAYOUT
--------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

.spectrum-rule {
  height: 5px;
  width: 100%;
  background: var(--spectrum);
}

.grid { display: grid; gap: var(--sp-3); }

/* ---------------------------------------------------------------------
   4. COMPONENTS: UI (buttons, tags, forms)
--------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.75em 1.5em;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--white); }

.tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3em 0.7em;
  border-radius: 2px;
  color: var(--white);
}
.tag-retail { background: var(--retail); }
.tag-entertainment { background: var(--entertainment); }
.tag-technology { background: var(--technology); }
.tag-sports { background: var(--sports); }

.eyebrow {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4em;
  display: block;
}
.eyebrow-retail { color: var(--retail-dark); }
.eyebrow-entertainment { color: var(--entertainment-dark); }
.eyebrow-technology { color: var(--technology-dark); }
.eyebrow-sports { color: var(--sports-dark); }

/* Forms */
.form-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
input[type="text"], input[type="email"], input[type="search"], textarea {
  flex: 1;
  min-width: 180px;
  padding: 0.75em 1em;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
textarea { width: 100%; min-height: 140px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--technology); }
label { font-family: var(--font-ui); font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 0.3em; }
.field { margin-bottom: var(--sp-2); }
.form-note { font-family: var(--font-ui); font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.5em; min-height: 1.2em; flex-basis: 100%; }
.form-note.success { color: var(--sports-dark); font-weight: 600; }
.form-note.error { color: var(--entertainment-dark); font-weight: 600; }

/* Media placeholder (used instead of stock photos — see README) */
.placeholder-media {
  position: relative;
  overflow: hidden;
}
.placeholder-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 45%),
                     radial-gradient(circle at 85% 80%, rgba(0,0,0,0.15), transparent 50%);
}
.media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.placeholder-media svg {
  width: 100%;
  height: 100%;
  display: block;
}
.ph-retail { background: linear-gradient(135deg, var(--retail), var(--retail-dark)); }
.ph-entertainment { background: linear-gradient(135deg, var(--entertainment), var(--entertainment-dark)); }
.ph-technology { background: linear-gradient(135deg, var(--technology), var(--technology-dark)); }
.ph-sports { background: linear-gradient(135deg, var(--sports), var(--sports-dark)); }

/* ---------------------------------------------------------------------
   5. COMPONENTS: HEADER, NAV, TICKER
--------------------------------------------------------------------- */
.site-header { background: var(--paper); position: sticky; top: 0; z-index: 50; }

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}

.logo { display: flex; align-items: center; gap: 0.6rem; }
.logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: block;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.logo-text em { font-style: normal; color: var(--ink-soft); font-weight: 400; }

.main-nav { display: flex; align-items: center; gap: var(--sp-3); }
.nav-link {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  padding: 0.4em 0;
  position: relative;
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 3px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-retail:hover, .nav-retail.active { color: var(--retail-dark); }
.nav-entertainment:hover, .nav-entertainment.active { color: var(--entertainment-dark); }
.nav-technology:hover, .nav-technology.active { color: var(--technology-dark); }
.nav-sports:hover, .nav-sports.active { color: var(--sports-dark); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.icon-btn {
  background: none; border: none; padding: 0.4rem;
  display: flex; color: var(--ink); border-radius: var(--radius);
}
.icon-btn:hover { background: var(--paper-dim); }
.icon-btn svg { width: 20px; height: 20px; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none; border: none; padding: 0.4rem;
}
.menu-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.search-panel {
  max-height: 0;
  overflow: hidden;
  background: var(--paper-dim);
  transition: max-height 0.25s ease;
}
.search-panel.is-open { max-height: 220px; }
.search-form { display: flex; gap: 0.5rem; padding: var(--sp-2) 0; }
.search-form button { padding: 0.75em 1.4em; border-radius: var(--radius); border: none; background: var(--ink); color: var(--white); font-weight: 600; }
.search-results { padding-bottom: var(--sp-2); }
.search-results a {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.6em 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-ui); font-size: 0.9rem;
}
.search-results a:hover { color: var(--technology); }
.search-empty { font-family: var(--font-ui); font-size: 0.85rem; color: var(--ink-soft); padding: 0.5em 0; }

/* Ticker */
.ticker {
  display: flex;
  align-items: center;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}
.ticker-label {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--entertainment);
  padding: 0.55em var(--sp-2);
}
.ticker-track { flex: 1; overflow: hidden; position: relative; }
.ticker-content {
  display: inline-flex;
  gap: 3rem;
  white-space: nowrap;
  padding: 0.55em 0;
  padding-left: 100%;
  animation: ticker-scroll 32s linear infinite;
}
.ticker-content a { font-family: var(--font-ui); font-size: 0.85rem; color: var(--white); opacity: 0.9; }
.ticker-content a:hover { opacity: 1; text-decoration: underline; }
.ticker-track:hover .ticker-content { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---------------------------------------------------------------------
   6. COMPONENTS: HERO
--------------------------------------------------------------------- */
.hero { padding: var(--sp-4) 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--sp-4);
}
.hero-feature { display: flex; flex-direction: column; }
.hero-feature .placeholder-media { aspect-ratio: 16/9; border-radius: var(--radius); }
.hero-feature .tag { position: absolute; top: 1rem; left: 1rem; }
.hero-feature .placeholder-media { position: relative; }
.hero-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0.6em 0 0.4em;
}
.hero-excerpt { font-size: 1.1rem; color: var(--ink-soft); }
.hero-meta { font-family: var(--font-ui); font-size: 0.85rem; color: var(--ink-soft); }

.top-stories { display: flex; flex-direction: column; gap: var(--sp-3); }
.top-stories h2 {
  font-family: var(--font-ui); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.85rem; color: var(--ink-soft); border-bottom: 2px solid var(--line); padding-bottom: 0.6em;
}
.top-story {
  display: flex; gap: 1rem; align-items: flex-start;
  padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line);
}
.top-story:last-child { border-bottom: none; padding-bottom: 0; }
.top-story .placeholder-media { width: 84px; height: 64px; flex-shrink: 0; border-radius: var(--radius); }
.top-story h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.2em; }
.top-story:hover h3 { text-decoration: underline; }

/* ---------------------------------------------------------------------
   7. COMPONENTS: CARD
--------------------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--spectrum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::before { transform: scaleX(1); }
.card .placeholder-media { aspect-ratio: 16/10; }
.card-body { padding: var(--sp-2) var(--sp-2) var(--sp-3); display: flex; flex-direction: column; gap: 0.5em; flex: 1; }
.card-title { font-size: 1.2rem; font-weight: 600; }
.card:hover .card-title { text-decoration: underline; }
.card-excerpt { font-size: 0.95rem; color: var(--ink-soft); flex: 1; }
.card-meta { font-family: var(--font-ui); font-size: 0.78rem; color: var(--ink-soft); display: flex; gap: 0.6em; }

.cards-grid { grid-template-columns: repeat(4, 1fr); }
.cards-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cards-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------------------------------------------------------------------
   8. COMPONENTS: SECTIONS / CATEGORY BANDS
--------------------------------------------------------------------- */
.section { padding: var(--sp-4) 0; }
.section-title-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: var(--sp-3); gap: var(--sp-2); flex-wrap: wrap;
}
.section-title { font-size: clamp(1.5rem, 3vw, 2.1rem); text-transform: uppercase; }
.section-title-rule { width: 60px; height: 4px; margin-top: 0.4em; background: var(--spectrum); }
.section-link { font-family: var(--font-ui); font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

.band { padding: var(--sp-4) 0; border-top: 1px solid var(--line); }
.band-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-3); flex-wrap: wrap; gap: 1rem; }
.band-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); text-transform: uppercase; }
.band-desc { font-family: var(--font-ui); color: var(--ink-soft); font-size: 0.95rem; max-width: 46ch; }
.band-retail { border-top-color: var(--retail); }
.band-entertainment { border-top-color: var(--entertainment); }
.band-technology { border-top-color: var(--technology); }
.band-sports { border-top-color: var(--sports); }

.more-note {
  margin-top: var(--sp-3);
  padding: var(--sp-2);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
}

/* Category page hero banner */
.cat-hero { padding: var(--sp-4) 0; color: var(--white); }
.cat-hero-retail { background: linear-gradient(120deg, var(--retail-dark), var(--retail)); }
.cat-hero-entertainment { background: linear-gradient(120deg, var(--entertainment-dark), var(--entertainment)); }
.cat-hero-technology { background: linear-gradient(120deg, var(--technology-dark), var(--technology)); }
.cat-hero-sports { background: linear-gradient(120deg, var(--sports-dark), var(--sports)); }
.cat-hero-eyebrow { font-family: var(--font-ui); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.85rem; opacity: 0.85; }
.cat-hero-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.4rem); margin: 0.3em 0 0.3em; }
.cat-hero-desc { font-size: 1.1rem; max-width: 60ch; opacity: 0.95; }

/* ---------------------------------------------------------------------
   9. COMPONENTS: NEWSLETTER BAND
--------------------------------------------------------------------- */
.newsletter-band {
  background: var(--ink);
  color: var(--white);
  padding: var(--sp-5) 0;
  position: relative;
  overflow: hidden;
}
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.newsletter-copy h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: 0.3em; }
.newsletter-copy p { color: rgba(255,255,255,0.75); margin: 0; max-width: 50ch; }
.newsletter-band .form-row { min-width: 320px; }
.newsletter-band input[type="email"] { border: none; }
.newsletter-band button { border: none; background: var(--white); color: var(--ink); font-weight: 700; padding: 0.75em 1.6em; border-radius: var(--radius); }
.newsletter-band button:hover { background: var(--paper-dim); }
.newsletter-band .form-note { color: rgba(255,255,255,0.75); }
.newsletter-band .form-note.success { color: #8ce6b0; }

/* ---------------------------------------------------------------------
   10. COMPONENTS: FOOTER
--------------------------------------------------------------------- */
.site-footer { background: var(--paper-dim); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1.2fr;
  gap: var(--sp-4);
  padding: var(--sp-5) 0 var(--sp-3);
}
.footer-brand p { color: var(--ink-soft); font-size: 0.92rem; max-width: 34ch; }
.footer-social { display: flex; gap: 0.7rem; margin-top: var(--sp-2); }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.footer-social svg { width: 16px; height: 16px; }

.footer-col h3 { font-family: var(--font-ui); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--sp-2); }
.footer-col li { margin-bottom: 0.6em; font-family: var(--font-ui); font-size: 0.92rem; }
.footer-col a:hover { color: var(--technology-dark); text-decoration: underline; }
.footer-newsletter .newsletter-form { display: flex; gap: 0.5rem; margin-top: 0.8rem; }
.footer-newsletter input { padding: 0.65em 0.9em; }
.footer-newsletter button { padding: 0 1.1em; border-radius: var(--radius); border: none; background: var(--ink); color: var(--white); font-weight: 600; }

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  border-top: 1px solid var(--line);
  padding: var(--sp-2) 0 var(--sp-3);
  font-family: var(--font-ui); font-size: 0.82rem; color: var(--ink-soft);
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------------------------------------------------------------------
   11. PAGE: SINGLE POST / ARTICLE
--------------------------------------------------------------------- */
.post-header { padding: var(--sp-4) 0 var(--sp-3); }
.post-header .eyebrow { font-size: 0.85rem; }
.post-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0.2em 0 0.5em;
}
.post-byline { font-family: var(--font-ui); font-size: 0.9rem; color: var(--ink-soft); display: flex; gap: 0.6em; flex-wrap: wrap; }
.post-hero-media { aspect-ratio: 21/9; border-radius: var(--radius); margin: var(--sp-3) 0; }

.post-body { max-width: 74ch; margin: 0 auto; padding-bottom: var(--sp-5); font-size: 1.12rem; }
.post-body p { margin-bottom: 1.3em; }
.post-body h2 { font-size: 1.5rem; margin: 1.6em 0 0.5em; }
.post-body blockquote {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  border-left: 4px solid var(--technology);
  margin: 1.8em 0;
  padding: 0.2em 0 0.2em 1em;
  color: var(--ink);
}
.post-share { display: flex; align-items: center; gap: 0.7rem; margin: var(--sp-3) 0; padding: var(--sp-2) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.post-share span { font-family: var(--font-ui); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.share-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.share-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.share-btn svg { width: 17px; height: 17px; }

.author-box {
  display: flex; gap: 1rem; align-items: center;
  background: var(--paper-dim); padding: var(--sp-3); border-radius: var(--radius);
  margin: var(--sp-4) auto; max-width: 74ch;
}
.author-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--spectrum);
  flex-shrink: 0;
}
.author-box h3 { font-size: 1rem; margin-bottom: 0.2em; }
.author-box p { font-family: var(--font-ui); font-size: 0.88rem; color: var(--ink-soft); margin: 0; }

.related-posts { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-3) var(--sp-5); }

/* ---------------------------------------------------------------------
   12. PAGE: ABOUT / CONTACT
--------------------------------------------------------------------- */
.page-hero { padding: var(--sp-4) 0 var(--sp-3); text-align: left; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.2rem); }
.page-hero p { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; }

.about-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); margin: var(--sp-3) 0 var(--sp-5); }
.value-card { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius); }
.value-card .eyebrow { font-size: 0.7rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); padding-bottom: var(--sp-5); align-items: start; }
.contact-info .card { padding: var(--sp-3); border: none; }
.contact-info h3 { font-size: 1.1rem; }
.contact-info p { color: var(--ink-soft); font-size: 0.95rem; }
.contact-form-wrap { background: var(--paper-dim); padding: var(--sp-4); border-radius: var(--radius); }

/* ---------------------------------------------------------------------
   13. MEDIA QUERIES
--------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 var(--sp-3);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.is-open { max-height: 400px; padding: var(--sp-2) var(--sp-3) var(--sp-3); }
  .nav-link { width: 100%; padding: 0.7em 0; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: flex; }

  .cards-grid { grid-template-columns: 1fr !important; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-inner { flex-direction: column; align-items: flex-start; }
  .top-story .placeholder-media { width: 64px; height: 50px; }
}

/* =====================================================================
   14. HOMEPAGE — DENSE / MODERN LAYOUT (added in redesign)
   ---------------------------------------------------------------------
   New homepage building blocks inspired by dense news homepages:
   - .lead        : the 3-column featured zone at the top
   - .trending    : the ranked "Trending Now" rail (left)
   - .lead-main   : the big feature + secondary stories (center)
   - .rail        : the sidebar column (right)
   - .sectionfront: the compact 4-column "Browse by Section" block
   Everything reuses the site's colors, fonts and spacing tokens.
   ===================================================================== */

/* Softer, friendlier cards site-wide */
.card { border-radius: var(--radius); }
.card:hover { box-shadow: var(--shadow-lg); }

/* Shared small rail heading (reused by trending + rail blocks) */
.rail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  font-family: var(--font-ui); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.78rem; font-weight: 700; color: var(--ink-soft);
  border-bottom: 2px solid var(--ink); padding-bottom: 0.55em; margin-bottom: var(--sp-2);
}
.rail-head .rail-more { font-size: 0.72rem; color: var(--technology-dark); }
.rail-head .rail-more:hover { text-decoration: underline; }
.rail-flame { color: var(--entertainment); }

/* ---- FEATURED ZONE (3 columns) ---- */
.lead { padding: var(--sp-4) 0 var(--sp-3); }
.lead-grid {
  display: grid;
  grid-template-columns: 250px 1fr 300px;
  gap: var(--sp-4);
  align-items: start;
}

/* Trending rail (left) */
.trending-list { display: flex; flex-direction: column; }
.trending-item {
  display: grid; grid-template-columns: 26px 1fr 56px; gap: 0.7rem; align-items: center;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line);
}
.trending-item:first-child { padding-top: 0; }
.trending-item:last-child { border-bottom: none; }
.trending-rank {
  font-family: var(--font-display); font-size: 1.15rem; line-height: 1;
  color: var(--ink); background: linear-gradient(120deg, var(--technology), var(--entertainment));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.trending-item h3 { font-family: var(--font-ui); font-weight: 600; font-size: 0.9rem; line-height: 1.25; margin: 0; }
.trending-item:hover h3 { color: var(--technology-dark); }
.trending-thumb { width: 56px; height: 42px; border-radius: var(--radius-sm); overflow: hidden; }
.trending-thumb .placeholder-media { width: 100%; height: 100%; border-radius: var(--radius-sm); }

/* Big feature + secondary (center) */
.lead-main { display: flex; flex-direction: column; gap: var(--sp-3); }
.feature { display: flex; flex-direction: column; }
.feature .placeholder-media { aspect-ratio: 16/9; border-radius: var(--radius); position: relative; }
.feature .tag { position: absolute; top: 0.9rem; left: 0.9rem; }
.feature-title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin: 0.5em 0 0.3em;
}
.feature:hover .feature-title { text-decoration: underline; }
.feature-excerpt { font-size: 1.08rem; color: var(--ink-soft); margin-bottom: 0.4em; }
.feature-meta { font-family: var(--font-ui); font-size: 0.82rem; color: var(--ink-soft); }

.subfeatures { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.subfeature { display: grid; grid-template-columns: 96px 1fr; gap: 0.9rem; align-items: start; }
.subfeature .placeholder-media { width: 96px; height: 72px; border-radius: var(--radius-sm); }
.subfeature .eyebrow { font-size: 0.68rem; margin-bottom: 0.3em; }
.subfeature h3 { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; line-height: 1.15; margin: 0; }
.subfeature:hover h3 { text-decoration: underline; }

/* Sidebar rail (right) */
.rail { display: flex; flex-direction: column; gap: var(--sp-4); }
.picks { display: flex; flex-direction: column; }
.pick {
  display: grid; grid-template-columns: 68px 1fr; gap: 0.8rem; align-items: center;
  padding: 0.75rem 0; border-bottom: 1px solid var(--line);
}
.pick:first-child { padding-top: 0; }
.pick:last-child { border-bottom: none; }
.pick .placeholder-media { width: 68px; height: 60px; border-radius: var(--radius-sm); }
.pick .eyebrow { font-size: 0.64rem; margin-bottom: 0.25em; }
.pick h3 { font-family: var(--font-ui); font-weight: 600; font-size: 0.9rem; line-height: 1.25; margin: 0; }
.pick:hover h3 { color: var(--technology-dark); }

.rail-cta {
  background: var(--ink); color: var(--white);
  border-radius: var(--radius); padding: var(--sp-3);
}
.rail-cta h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.4em; color: var(--white); }
.rail-cta p { font-family: var(--font-ui); font-size: 0.86rem; color: rgba(255,255,255,0.72); margin-bottom: 0.9em; }
.rail-cta .newsletter-form { display: flex; flex-direction: column; gap: 0.5rem; }
.rail-cta input { border: none; padding: 0.7em 0.9em; border-radius: var(--radius-sm); }
.rail-cta button { border: none; background: var(--white); color: var(--ink); font-weight: 700; padding: 0.7em; border-radius: var(--radius-sm); }
.rail-cta button:hover { background: var(--paper-dim); }
.rail-cta .form-note { color: rgba(255,255,255,0.72); }
.rail-cta .form-note.success { color: #8ce6b0; }

/* ---- BROWSE BY SECTION (compact 4-column section front) ---- */
.sectionfront { padding: var(--sp-4) 0; border-top: 1px solid var(--line); }
.sf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.sf-col { display: flex; flex-direction: column; }
.sf-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  border-top: 4px solid var(--line); padding-top: 0.6em; margin-bottom: 0.6em;
}
.sf-head .eyebrow { margin: 0; font-size: 0.82rem; }
.sf-head .sf-more { font-family: var(--font-ui); font-weight: 700; font-size: 0.72rem; color: var(--ink-soft); white-space: nowrap; }
.sf-head .sf-more:hover { text-decoration: underline; }
.sf-col-retail .sf-head { border-top-color: var(--retail); }
.sf-col-entertainment .sf-head { border-top-color: var(--entertainment); }
.sf-col-technology .sf-head { border-top-color: var(--technology); }
.sf-col-sports .sf-head { border-top-color: var(--sports); }

.sf-lead { display: block; margin-bottom: 0.7em; }
.sf-lead .placeholder-media { aspect-ratio: 16/10; border-radius: var(--radius-sm); margin-bottom: 0.5em; }
.sf-lead h3 { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; line-height: 1.12; margin: 0; }
.sf-lead:hover h3 { text-decoration: underline; }

.sf-item { display: block; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.sf-item h4 { font-family: var(--font-ui); font-weight: 600; font-size: 0.9rem; line-height: 1.25; margin: 0; }
.sf-item:hover h4 { color: var(--technology-dark); }

/* Section intro row with a "view all" on the right (reused) */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: var(--sp-3); flex-wrap: wrap;
}
.section-head .section-link { font-family: var(--font-ui); font-weight: 700; font-size: 0.85rem; }
.section-head .section-link:hover { text-decoration: underline; }

/* ---- HOMEPAGE RESPONSIVE ---- */
@media (max-width: 1080px) {
  .lead-grid { grid-template-columns: 220px 1fr; }
  .rail { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
  .sf-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
}
@media (max-width: 720px) {
  .lead-grid { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }
  .subfeatures { grid-template-columns: 1fr; }
  .sf-grid { grid-template-columns: 1fr; }
  .trending-item { grid-template-columns: 24px 1fr 52px; }
}
