/* ==========================================================================
   TYM News — Design Tokens
   Palette: near-black stage, signal red, cool steel gray, warm white
   Type: Barlow Condensed (broadcast display) + Source Serif 4 italic (voice)
         + Inter (body/UI) + JetBrains Mono (labels/data)
   Signature: the "pulse" — a hairline rule with a red tick, echoing the
   waveform mark in the logo. It appears as a section divider everywhere.
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-raised: #131315;
  --bg-card: #16161a;
  --hairline: #3a1417;
  --hairline-bright: #d81f2a;
  --white: #f4f4f2;
  --gray: #9a9ea6;
  --gray-dim: #5c5f66;
  --red: #d81f2a;
  --red-dim: #7a1218;
  --focus: #ff5a63;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-voice: "Source Serif 4", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --container: 1180px;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

[lang="hi"] {
  font-family: "Noto Sans Devanagari", var(--font-body);
}

/* ---------- Signature element: the Pulse divider ---------- */
.pulse {
  position: relative;
  height: 1px;
  background: var(--hairline);
  margin: 0;
}
.pulse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 22px;
  background: var(--red);
  transform: translate(-50%, -50%);
}
.pulse--tick-left::after { left: 64px; }

/* Waveform bars, echoes the logo mark */
.waveform {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
}
.waveform span {
  width: 2px;
  background: var(--gray);
  border-radius: 1px;
}
.waveform span:nth-child(1) { height: 8px; }
.waveform span:nth-child(2) { height: 16px; }
.waveform span:nth-child(3) { height: 22px; background: var(--red); }
.waveform span:nth-child(4) { height: 16px; }
.waveform span:nth-child(5) { height: 8px; }

.waveform--live span {
  animation: pulseBar 1.1s ease-in-out infinite;
}
.waveform--live span:nth-child(1) { animation-delay: 0s; }
.waveform--live span:nth-child(2) { animation-delay: 0.12s; }
.waveform--live span:nth-child(3) { animation-delay: 0.24s; }
.waveform--live span:nth-child(4) { animation-delay: 0.36s; }
.waveform--live span:nth-child(5) { animation-delay: 0.48s; }
@keyframes pulseBar {
  0%, 100% { transform: scaleY(0.6); opacity: 0.7; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Type scale ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.voice {
  font-family: var(--font-voice);
  font-style: italic;
  font-weight: 400;
  color: var(--gray);
  text-transform: none;
  letter-spacing: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--gray);
}
.eyebrow--red { color: var(--red); }

p { margin: 0 0 1em; color: #d7d7d5; }
.lede { font-size: 1.15rem; color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.02em;
}
.brand .news { color: var(--red); font-size: 0.95rem; letter-spacing: 0.18em; margin-left: 2px; align-self: flex-end; margin-bottom: 4px;}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--white);
  border-color: var(--red);
}
.lang-toggle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--hairline);
  color: var(--gray);
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.lang-toggle:hover { border-color: var(--red); color: var(--white); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .main-nav { position: fixed; inset: 76px 0 0 0; background: var(--bg); flex-direction: column; justify-content: flex-start; padding: 32px 24px; gap: 24px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
  .main-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
  .nav-toggle span { width: 22px; height: 2px; background: var(--white); display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 72px;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}
.hero__wave {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: end;
  position: relative;
}
.hero h1 { margin-bottom: 0.3em; }
.hero .voice { font-size: clamp(1.1rem, 2vw, 1.5rem); margin-bottom: 1.2em; display: block; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--red); border-color: var(--red); color: var(--bg); font-weight: 700; }
.btn--primary:hover { background: #ef2c37; }
.btn--ghost { color: var(--white); }
.btn--ghost:hover { border-color: var(--red); }

.hero__panel {
  border-left: 1px solid var(--hairline);
  padding-left: 32px;
}
.hero__panel .eyebrow { display: block; margin-bottom: 14px; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head a { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); white-space: nowrap; }
.section-head a:hover { text-decoration: underline; }

/* ---------- Story cards ---------- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.story-grid--featured { grid-template-columns: 1.4fr 1fr 1fr; }
.story-card {
  background: var(--bg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease;
}
.story-card:hover { background: var(--bg-raised); }
.story-card__media {
  aspect-ratio: 16/10;
  background: var(--bg-card);
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}
.story-card__media img { width: 100%; height: 100%; object-fit: cover; }
.story-card .eyebrow { margin-bottom: 10px; }
.story-card h3 { margin-bottom: 10px; }
.story-card p { font-size: 0.92rem; color: var(--gray); margin-bottom: 14px; }
.story-card__meta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--gray-dim);
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .story-grid, .story-grid--featured { grid-template-columns: 1fr; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__panel { border-left: none; padding-left: 0; border-top: 1px solid var(--hairline); padding-top: 24px; }
}

/* ---------- Categories ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.cat-card {
  background: var(--bg);
  padding: 28px 24px;
  transition: background 0.2s ease;
}
.cat-card:hover { background: var(--bg-raised); }
.cat-card .eyebrow { color: var(--red-dim); }
.cat-card h3 { margin: 8px 0 0; font-size: 1.1rem; }

/* ---------- Watch / video ---------- */
.watch {
  background: var(--bg-raised);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.watch__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.video-frame {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--hairline);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 900px) { .watch__grid { grid-template-columns: 1fr; } }

/* ---------- Mission ---------- */
.mission {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.mission blockquote {
  margin: 0;
  font-family: var(--font-voice);
  font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.35;
  color: var(--white);
  border-left: 2px solid var(--red);
  padding-left: 24px;
}
@media (max-width: 900px) { .mission { grid-template-columns: 1fr; } }

/* ---------- Article page ---------- */
.article-head { padding: 56px 0 32px; border-bottom: 1px solid var(--hairline); }
.article-head .eyebrow { margin-bottom: 18px; }
.article-meta { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.76rem; color: var(--gray); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 18px; }
.article-body { max-width: 760px; margin: 0 auto; padding: 48px 24px; font-size: 1.08rem; }
.article-body img { margin: 28px 0; }
.article-body h2 { text-transform: none; font-family: var(--font-voice); font-style: italic; font-weight: 400; font-size: 1.6rem; color: var(--white); margin-top: 1.6em; }
.article-body p { color: #dedede; }
.article-body a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.article-cover { aspect-ratio: 21/9; background: var(--bg-card); overflow: hidden; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 56px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 { font-size: 0.85rem; color: var(--gray); letter-spacing: 0.1em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--gray); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--gray-dim); letter-spacing: 0.04em; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); margin-bottom: 8px; }
.form-field input, .form-field textarea {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  color: var(--white);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: var(--radius);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--red); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--red);
  color: var(--bg);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.empty-state { padding: 60px 0; text-align: center; color: var(--gray); }

/* ---------- Videos coming soon ---------- */
.coming-soon-frame {
  position: relative;
  aspect-ratio: 16/9;
  max-width: 900px;
  margin: 0 auto 32px;
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.coming-soon-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
  pointer-events: none;
}
.coming-soon-frame::after {
  content: "";
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(transparent 40%, rgba(216,31,42,0.06) 50%, transparent 60%);
  animation: csScanline 5s linear infinite;
  pointer-events: none;
}
@keyframes csScanline {
  0% { top: -100%; }
  100% { top: 100%; }
}
.cs-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(216,31,42,0.13) 0%, transparent 70%);
  border-radius: 50%;
  animation: csGlowPulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes csGlowPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.35); opacity: 1; }
}
.coming-soon-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
}
.cs-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--red-dim);
  padding: 5px 14px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.cs-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  animation: csBlink 1.2s ease-in-out infinite;
}
@keyframes csBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}
.cs-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 3.4rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.05;
  margin: 0 0 14px;
}
.cs-sub {
  font-family: var(--font-voice);
  font-style: italic;
  font-size: clamp(0.88rem, 1.4vw, 1.05rem);
  color: var(--gray);
  margin: 0 auto 28px;
  max-width: 40ch;
}
.cs-bracket {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 2;
}
.cs-bracket--tl { top: 14px; left: 14px; border-top: 2px solid var(--red); border-left: 2px solid var(--red); }
.cs-bracket--tr { top: 14px; right: 14px; border-top: 2px solid var(--red); border-right: 2px solid var(--red); }
.cs-bracket--bl { bottom: 14px; left: 14px; border-bottom: 2px solid var(--red); border-left: 2px solid var(--red); }
.cs-bracket--br { bottom: 14px; right: 14px; border-bottom: 2px solid var(--red); border-right: 2px solid var(--red); }
.cs-infobar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10,10,10,0.8);
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 18px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-dim);
}
.cs-infobar__status { color: var(--red); animation: csBlink 2s ease-in-out infinite; }
.coming-soon-frame--inline { max-width: 100%; margin: 0; }

/* ---------- Breaking news ticker ---------- */
.ticker {
  display: flex;
  align-items: stretch;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.ticker__label {
  flex-shrink: 0;
  background: var(--red);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 16px;
  display: flex;
  align-items: center;
}
.ticker__track {
  overflow: hidden;
  flex: 1;
  position: relative;
}
.ticker__content {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  padding: 10px 24px;
  width: max-content;
  animation: tickerScroll 28s linear infinite;
}
.ticker__content a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--gray);
  letter-spacing: 0.02em;
}
.ticker__content a:hover { color: var(--white); }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__content { animation: none; overflow-x: auto; }
}

/* ---------- Live search box ---------- */
.search-box { margin-top: 28px; max-width: 420px; }
.search-box input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  color: var(--white);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: var(--radius);
}
.search-box input::placeholder { color: var(--gray-dim); }
.search-box input:focus { outline: none; border-color: var(--red); }
