/* ============================================================
   Viral News — template v3 (premium news design system)
   BBC / Sky News polish: Archivo headlines, Inter body,
   ink #0f1115 on paper, red #d92323 accent, hairline rules,
   real photography, 8px spacing rhythm, mobile-first.
   ============================================================ */
:root {
  --ink: #0f1115;
  --paper: #ffffff;
  --soft: #f6f6f4;
  --red: #d92323;
  --red-dark: #b31b1b;
  --text: #22262b;
  --muted: #6b7280;
  --line: #e5e7eb;
  --chip-sport: #1663c7;
  --radius: 12px;
  --font-head: "Archivo", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-card: 0 1px 2px rgba(15, 17, 21, .05);
  --shadow-lift: 0 14px 30px rgba(15, 17, 21, .13);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
}
::selection { background: var(--red); color: #fff; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 20px; } }
:focus-visible { outline: 3px solid rgba(217, 35, 35, .55); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); }

/* ---------- Utility bar ---------- */
.util-bar { background: var(--ink); color: #c7ccd2; }
.util-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 44px;
}
.util-date { margin: 0; font-size: 12.5px; font-weight: 500; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.util-fb {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 34px;
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em; padding: 0 15px;
}
.util-fb:hover { background: var(--red-dark); text-decoration: none; }

/* ---------- Masthead ---------- */
.masthead {
  border-top: 3px solid var(--red);
  border-bottom: 2px solid var(--ink);
  text-align: center;
  padding: 24px 0 16px;
}
.wordmark {
  font-family: var(--font-head); font-weight: 900; text-transform: uppercase;
  font-size: clamp(42px, 8.6vw, 72px); line-height: 1; letter-spacing: -.025em;
  color: var(--ink); display: inline-block;
}
.wordmark:hover { text-decoration: none; }
.wm-viral { color: var(--red); }
.wm-news { color: var(--ink); }
.masthead-tag {
  margin: 9px 0 0; font-size: 11.5px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Sticky nav ---------- */
.nav-bar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; }
.nav-mark {
  font-family: var(--font-head); font-weight: 900; text-transform: uppercase;
  font-size: 19px; letter-spacing: -.01em; white-space: nowrap;
  max-width: 0; margin-right: 0; opacity: 0; overflow: hidden;
  transition: max-width .3s ease, opacity .25s ease, margin-right .3s ease;
}
.nav-mark:hover { text-decoration: none; }
body.scrolled .nav-mark { max-width: 190px; opacity: 1; margin-right: 12px; }
.main-nav {
  display: flex; align-items: stretch; gap: 2px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  position: relative; display: flex; align-items: center; min-height: 48px;
  padding: 0 15px; font-family: var(--font-head); font-weight: 700;
  font-size: 13.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}
.main-nav a:hover { text-decoration: none; color: var(--red); }
.main-nav a.active { color: var(--red); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 3px; background: var(--red); border-radius: 2px 2px 0 0;
}

/* ---------- Breaking ticker ---------- */
.ticker { background: var(--ink); color: #fff; overflow: hidden; }
.ticker-inner { display: flex; align-items: stretch; min-height: 44px; }
.ticker-label {
  flex: 0 0 auto; display: flex; align-items: center;
  background: var(--red); color: #fff; border-radius: 4px;
  font-family: var(--font-head); font-weight: 800; font-size: 12px;
  letter-spacing: .13em; text-transform: uppercase;
  padding: 0 11px; margin: 8px 14px 8px 0;
}
.ticker-viewport { flex: 1 1 auto; overflow: hidden; display: flex; align-items: center; }
.ticker-track {
  display: flex; align-items: center; white-space: nowrap;
  animation: vn-ticker 55s linear infinite; will-change: transform;
}
.ticker-set { display: inline-flex; align-items: center; }
.ticker-item {
  color: #fff; font-size: 13.5px; font-weight: 500;
  padding: 10px 4px; min-height: 44px; display: inline-flex; align-items: center;
}
.ticker-item:hover { text-decoration: underline; }
.ticker-sep { color: var(--red); font-size: 12px; padding: 0 10px; }
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track,
.ticker-viewport.paused .ticker-track { animation-play-state: paused; }
@keyframes vn-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Section headings ---------- */
.section-heading { margin: 32px 0 16px; border-bottom: 2px solid var(--ink); padding-bottom: 9px; }
.section-heading a { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading a:hover { text-decoration: none; }
.section-heading a:hover .section-title { color: var(--red); }
.section-title {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-head); font-weight: 800; font-size: 20px;
  text-transform: uppercase; letter-spacing: .03em; color: var(--ink); line-height: 1.15;
}
.section-title::before {
  content: ""; flex: 0 0 auto; width: 9px; height: 21px;
  background: var(--red); border-radius: 2px;
}
.section-more {
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--red);
}
.page-heading {
  margin: 26px 0 18px; border-bottom: 2px solid var(--ink); padding-bottom: 10px;
  font-family: var(--font-head); font-weight: 800; font-size: 30px;
  text-transform: uppercase; letter-spacing: .02em; color: var(--ink);
}
.page-heading .section-title { font-size: 30px; }
.page-heading .section-title::before { height: 27px; }
.empty { color: var(--muted); padding: 24px 0 48px; font-size: 16px; }
.empty a { color: var(--red); font-weight: 600; }

/* ---------- Lead zone: hero + top stories rail ---------- */
.lead-zone { display: grid; grid-template-columns: 1fr; gap: 26px; margin: 22px 0 6px; }
.hero-card {
  position: relative; display: flex; align-items: flex-end;
  min-height: 460px; border-radius: 14px;
  overflow: hidden; background: var(--ink);
  box-shadow: 0 10px 30px rgba(15, 17, 21, .16);
}
.hero-card:hover { text-decoration: none; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .7s cubic-bezier(.2, .6, .2, 1);
}
.hero-card:hover .hero-img { transform: scale(1.03); }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 8, 10, .92) 0%, rgba(7, 8, 10, .62) 46%, rgba(7, 8, 10, .14) 78%, rgba(7, 8, 10, 0) 100%);
}
.hero-body { position: relative; display: block; width: 100%; padding: 20px 20px 22px; color: #fff; }
@media (min-width: 760px) { .hero-card { min-height: 500px; } }
.hero-title {
  display: block; font-family: var(--font-head); font-weight: 800;
  font-size: clamp(26px, 5.4vw, 44px); line-height: 1.08; letter-spacing: -.015em;
  margin: 11px 0 9px; color: #fff;
}
.hero-excerpt {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .88); margin: 0 0 10px; max-width: 640px;
}
.hero-meta {
  display: block; font-size: 12px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: rgba(255, 255, 255, .78);
}
.rail-heading {
  margin: 0 0 6px; font-size: 15px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  display: flex; align-items: center; gap: 10px;
}
.rail-heading::before { content: ""; width: 9px; height: 17px; background: var(--red); border-radius: 2px; }
.rail-list {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 10px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.rail-list::-webkit-scrollbar { display: none; }
.rail-item { flex: 0 0 252px; scroll-snap-align: start; display: block; }
.rail-item:hover { text-decoration: none; }
.rail-img { display: block; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.rail-img img { width: 100%; height: 132px; object-fit: cover; transition: transform .6s cubic-bezier(.2, .6, .2, 1); }
.rail-item:hover .rail-img img { transform: scale(1.05); }
.rail-body { display: block; }
.rail-cat {
  display: block; font-family: var(--font-head); font-size: 11px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: 4px;
}
.rail-title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1.3;
  letter-spacing: -.01em; color: var(--ink); margin-bottom: 5px;
}
.rail-item:hover .rail-title { color: var(--red); }
.rail-time { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
@media (min-width: 960px) {
  .lead-zone { grid-template-columns: minmax(0, 1fr) 336px; gap: 30px; }
  .rail-list { display: block; overflow: visible; padding: 0; }
  .rail-item {
    display: flex; gap: 13px; padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .rail-item:first-child { padding-top: 6px; }
  .rail-item:last-child { border-bottom: 0; }
  .rail-img { flex: 0 0 112px; margin-bottom: 0; border-radius: 8px; }
  .rail-img img { width: 112px; height: 76px; }
  .rail-title { font-size: 15.5px; -webkit-line-clamp: 3; }
}

/* ---------- Trending band (soft panel) ---------- */
.band {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2px 20px 16px;
  margin: 30px 0 6px;
}
@media (min-width: 760px) { .band { padding: 4px 26px 20px; } }
.band .section-heading { margin-top: 20px; }
.trend-list {
  list-style: none; counter-reset: trend;
  margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; column-gap: 36px;
}
.trend-item { counter-increment: trend; border-top: 1px solid var(--line); }
.trend-item:first-child { border-top: 0; }
.trend-item a {
  position: relative; display: block;
  padding: 13px 0 15px 66px; min-height: 44px;
}
.trend-item a:hover { text-decoration: none; }
.trend-item a::before {
  content: counter(trend, decimal-leading-zero);
  position: absolute; left: 0; top: 9px;
  font-family: var(--font-head); font-weight: 900; font-size: 42px;
  line-height: 1; letter-spacing: -.02em; color: var(--red);
}
.trend-title {
  display: block; font-family: var(--font-head); font-weight: 700;
  font-size: 16px; line-height: 1.32; letter-spacing: -.01em; color: var(--ink);
}
.trend-item a:hover .trend-title { color: var(--red); }
.trend-meta {
  display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
@media (min-width: 700px) { .trend-list { grid-template-columns: 1fr 1fr; } .trend-item:nth-child(2) { border-top: 0; } }
@media (min-width: 1080px) { .trend-list { grid-template-columns: 1fr 1fr 1fr; } .trend-item:nth-child(3) { border-top: 0; } }

/* ---------- Cards grid ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; padding-bottom: 6px; }
@media (min-width: 680px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-img { position: relative; display: block; overflow: hidden; }
.card-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s cubic-bezier(.2, .6, .2, 1); }
.card:hover .card-img img { transform: scale(1.045); }
.card-chip { position: absolute; left: 10px; bottom: 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.card-body { padding: 15px 17px 17px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; margin: 0 0 8px; color: var(--ink); }
.card-title a:hover { color: var(--red); text-decoration: none; }
.card-excerpt {
  color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { margin: auto 0 0; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .03em; }

/* ---------- Chips ---------- */
.chip {
  display: inline-block; background: var(--red); color: #fff;
  font-family: var(--font-head); font-size: 11px; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 4px; line-height: 1.3; vertical-align: middle;
}
.chip-sport { background: var(--chip-sport); }
.chip-sm { font-size: 10px; padding: 3px 7px; }

/* ---------- Category feature + rows ---------- */
.feature { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 4px; }
.feature-img { display: block; border-radius: var(--radius); overflow: hidden; }
.feature-img img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; transition: transform .6s cubic-bezier(.2, .6, .2, 1); }
.feature:hover .feature-img img { transform: scale(1.035); }
.feature-title { font-size: clamp(21px, 3.4vw, 28px); font-weight: 800; line-height: 1.14; letter-spacing: -.015em; margin: 10px 0 8px; }
.feature-title a:hover { color: var(--red); text-decoration: none; }
.feature-excerpt {
  color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.feature-meta { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .03em; }
@media (min-width: 760px) {
  .feature { grid-template-columns: 1.12fr 1fr; gap: 28px; align-items: center; }
}
.rows { border-top: 1px solid var(--line); margin-top: 10px; }
.row {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 4px; min-height: 100px;
  border-bottom: 1px solid var(--line);
}
.row:hover { text-decoration: none; background: var(--soft); }
.row-img { flex: 0 0 118px; border-radius: 8px; overflow: hidden; }
.row-img img { width: 118px; height: 80px; object-fit: cover; transition: transform .6s cubic-bezier(.2, .6, .2, 1); }
.row:hover .row-img img { transform: scale(1.05); }
.row-body { display: block; min-width: 0; }
.row-title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-family: var(--font-head); font-size: 15.5px; font-weight: 700; line-height: 1.34;
  letter-spacing: -.01em; color: var(--ink); margin-bottom: 6px;
}
.row:hover .row-title { color: var(--red); }
.row-meta { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
@media (min-width: 640px) {
  .row-img { flex-basis: 152px; }
  .row-img img { width: 152px; height: 100px; }
  .row-title { font-size: 16.5px; }
}

/* ---------- Follow CTA band ---------- */
.cta-band {
  background: var(--red); border-radius: 14px;
  margin: 38px 0 8px; padding: 26px 24px;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 14px 26px;
}
.cta-title { color: #fff; font-size: 23px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.cta-sub { color: rgba(255, 255, 255, .88); font-size: 15px; margin: 5px 0 0; }
.cta-btn {
  display: inline-flex; align-items: center; min-height: 50px;
  background: #fff; color: var(--red-dark); border-radius: 999px;
  font-family: var(--font-head); font-size: 15.5px; font-weight: 800;
  letter-spacing: .01em; padding: 0 26px;
  transition: background .2s ease, color .2s ease;
}
.cta-btn:hover { background: var(--ink); color: #fff; text-decoration: none; }

/* ---------- Article page ---------- */
.story { max-width: 720px; margin: 0 auto; padding-top: 24px; }
.story-kicker { margin: 0 0 14px; }
.story-kicker a.chip { padding: 6px 11px; }
.story-kicker a.chip:hover { text-decoration: none; opacity: .92; }
.story-title {
  font-size: clamp(29px, 6.2vw, 46px); font-weight: 800;
  line-height: 1.08; letter-spacing: -.02em; color: var(--ink); margin: 0 0 13px;
}
.story-excerpt { font-size: 19px; line-height: 1.55; color: #4b5563; margin: 0 0 18px; }
.byline-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 10px 20px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 12px 0; margin: 0 0 22px;
}
.byline {
  margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
}
.byline-desk {
  font-family: var(--font-head); font-weight: 800; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink);
}
.meta-sep { color: #c3c9cf; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-label {
  font-family: var(--font-head); font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em; color: var(--ink); margin-right: 2px;
}
.share-btn {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 17px; border-radius: 999px;
  font-size: 14px; font-weight: 700; color: #fff; background: var(--ink);
}
.share-btn:hover { text-decoration: none; opacity: .9; }
.share-fb { background: #1877f2; }
.share-x { background: #000; }
.share-wa { background: #1faa55; }
.story-figure { margin: 0 0 24px; }
.story-img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--radius); }
.img-caption { font-size: 12px; color: var(--muted); margin-top: 8px; letter-spacing: .01em; }
.story-body p { font-size: 17.5px; line-height: 1.72; margin: 0 0 1.1em; color: var(--text); }
.story-body > p:first-of-type::first-letter {
  font-family: var(--font-head); font-weight: 900; color: var(--red);
  font-size: 57px; line-height: .8; float: left; padding: 7px 12px 0 0;
}
.story-source { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.watch-row { margin: 22px 0; }
.watch-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 14px 20px;
  background: var(--red); color: #fff;
  font-family: var(--font-head); font-size: 16.5px; font-weight: 800; letter-spacing: .01em;
  text-align: center; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(217, 35, 35, .3);
  transition: background .2s ease, transform .2s ease;
}
.watch-btn:hover { text-decoration: none; background: var(--red-dark); transform: translateY(-1px); }
.related { margin-top: 10px; }
.more-latest { max-width: 720px; margin: 0 auto; }

/* ---------- Ad slots (empty placeholders until ad code is added) ---------- */
.ad-slot { margin: 18px 0; min-height: 0; }
.ad-slot:empty { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aeb6bf; margin-top: 46px; }
.foot-top {
  display: grid; grid-template-columns: 1fr; gap: 26px;
  padding: 36px 0 28px;
}
.foot-logo {
  font-family: var(--font-head); font-weight: 900; text-transform: uppercase;
  font-size: 27px; letter-spacing: -.02em; margin: 0 0 12px; color: #fff;
}
.foot-logo .wm-news { color: #fff; }
.foot-about { margin: 0; font-size: 14.5px; line-height: 1.65; max-width: 560px; }
.foot-nav { display: flex; flex-direction: column; align-items: flex-start; }
.foot-nav-title {
  font-family: var(--font-head); font-weight: 800; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .13em; color: #fff; margin: 2px 0 8px;
}
.foot-nav a {
  display: inline-flex; align-items: center; min-height: 38px;
  color: #c9d1d9; font-weight: 600; font-size: 14.5px; padding: 4px 0;
}
.foot-nav a:hover { color: #fff; text-decoration: none; }
.foot-small {
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: #8a939e; font-size: 12.5px; margin: 0; padding: 17px 0 24px;
}
@media (min-width: 820px) {
  .foot-top { grid-template-columns: 1.7fr .55fr .85fr; gap: 40px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .ticker-viewport { overflow-x: auto; }
  .card, .card-img img, .hero-img, .rail-img img, .row-img img, .feature-img img, .watch-btn { transition: none; }
  .card:hover, .watch-btn:hover { transform: none; }
}
