/* styles/main.css — Kaldi Watch Core Styles */
:root {
  --espresso: #3B1F0A;
  --gold: #D4A017;
  --off-white: #FAF7F2;
  --pure-white: #FFFFFF;
  --grey-text: #555555;
  --level-3: #D32F2F; /* Subpoena Red */
  --level-2: #F57C00; /* Investigation Orange */
  --level-1: #1976D2; /* Inquiry Blue */
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--off-white);
  color: var(--espresso);
  line-height: 1.6;
  padding: 0;
}

header {
  background-color: var(--espresso);
  border-bottom: 2px solid var(--gold);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--off-white);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

header h1 .header-goat {
  font-size: 1.2rem;
  line-height: 1;
}

header h1 .header-gold {
  color: var(--gold);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  color: var(--off-white);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.75;
  transition: opacity 0.15s;
}

.header-nav a:hover {
  opacity: 1;
}

.header-nav a.header-nav--cta {
  color: var(--gold);
  font-weight: 700;
  opacity: 1;
}

/* ── Identity Strip ─────────────────────────────────────── */
.identity-strip {
    background-color: #EFEBE4;
    padding: 12px 0;
    text-align: center;
    border-bottom: 1px solid rgba(59, 31, 10, 0.1);
}

.identity-strip p {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--espresso);
    margin: 0;
    opacity: 0.8;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ── Status Badges ──────────────────────────────────────── */
.status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.status-live {
  background: var(--level-3);
  color: white;
  animation: pulse 1.5s ease-in-out infinite;
}

.status-dormant {
  background: var(--level-2);
  color: white;
}

.status-closed {
  background: var(--grey-text);
  color: white;
}

/* 3-Column Grid */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Feed & Cards */
.card {
  background: var(--pure-white);
  border: 1px solid rgba(59, 31, 10, 0.1);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
}

.level-3::before { background-color: var(--level-3); }
.level-2::before { background-color: var(--level-2); }
.level-1::before { background-color: var(--level-1); }

.level-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 10px;
}

.badge-3 { color: var(--level-3); border: 1px solid var(--level-3); }
.badge-2 { color: var(--level-2); border: 1px solid var(--level-2); }
.badge-1 { color: var(--level-1); border: 1px solid var(--level-1); }

h2.story-title {
  font-family: "Georgia", serif;
  font-size: 1.6rem;
  margin-bottom: 8px;
  line-height: 1.2;
}

.meta {
  font-size: 0.8rem;
  color: var(--grey-text);
  margin-bottom: 15px;
  font-family: monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-timestamp {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--grey-text);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.card-summary {
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Goat Score Visual */
.goat-score-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: #fcfcfc;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}

.goat-score-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--espresso);
    margin-bottom: 5px;
    display: block;
}

.goat-emoji-scale {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.level-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.day-counter {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* CTA Button */
.cta-btn {
  display: block;
  text-align: center;
  background: var(--espresso);
  color: var(--pure-white);
  padding: 14px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  transition: all 0.2s;
}

.cta-btn:hover {
  background: var(--gold);
  color: var(--espresso);
  transform: translateY(-2px);
}

/* ── Authority Footer ───────────────────────────────────── */
footer {
  background-color: var(--espresso);
  color: var(--off-white);
  padding: 80px 20px 40px;
  margin-top: 80px;
  text-align: left;
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 40px;
}

.footer-section h4 {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.footer-section p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.8;
}

.footer-bottom {
  max-width: 1100px;
  margin: 30px auto 0;
  font-size: 0.75rem;
  opacity: 0.5;
  text-align: center;
}

/* ── Take Action Block ──────────────────────────────────── */
.take-action {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fff8ee;
  border: 2px solid var(--gold);
  border-radius: 8px;
}

.take-action__title {
  font-family: "Georgia", serif;
  font-size: 1.3rem;
  color: var(--espresso);
  margin-bottom: 1.25rem;
}

.take-action__why,
.take-action__what,
.take-action__script {
  margin-bottom: 1.25rem;
}

.take-action__why h4,
.take-action__what h4,
.take-action__script h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--espresso);
  margin-bottom: 0.5rem;
}

.take-action__why p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

.take-action__what ol {
  padding-left: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #333;
}

.take-action__script-label {
  font-weight: 400;
  font-size: 0.75rem;
  color: #888;
  text-transform: none;
  letter-spacing: 0;
}

.take-action__quote {
  margin: 0;
  padding: 1rem 1.25rem;
  background: var(--off-white);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #444;
}

.take-action__buttons {
  margin-top: 1.25rem;
}

/* ── Press Context Block ────────────────────────────────── */
.press-context {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: #FAF7F2;
  border-left: 3px solid #D4A017;
  border-radius: 0 6px 6px 0;
}

.press-context__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.press-context__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #3B1F0A;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.press-context__label {
  font-size: 0.7rem;
  color: #888;
  font-style: italic;
  margin-left: auto;
}

.press-context__list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.press-context__item {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  line-height: 1.4;
}

.press-context__source-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.press-context__source-badge--wire     { background: #e8f4e8; color: #2a6e2a; }
.press-context__source-badge--investigative { background: #e8eef8; color: #1a3a6e; }
.press-context__source-badge--trade    { background: #f8f0e8; color: #7a4a0a; }
.press-context__source-badge--political { background: #f5f5f5; color: #555; }

.press-context__source-name {
  font-weight: 600;
  color: #3B1F0A;
}

.press-context__date {
  color: #888;
}

.press-context__excerpt {
  color: #444;
  flex: 1 1 100%;
  padding-left: 0.5rem;
  border-left: 2px solid #e0d5c8;
  font-style: italic;
}

.press-context__link {
  color: #D4A017;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  margin-left: auto;
}

.press-context__link:hover {
  text-decoration: underline;
}

.press-context__disclaimer {
  font-size: 0.68rem;
  color: #aaa;
  margin: 0;
  font-style: italic;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .site-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Rail Styling ───────────────────────────────────────── */
.rail-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--espresso);
  margin-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 5px;
}

.rail-item {
  font-size: 0.8rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.urgent {
  color: var(--level-3);
  font-weight: 700;
}

.pulse-rail, .context-rail {
  padding: 10px;
}

@media (max-width: 1000px) {
  .pulse-rail, .context-rail { display: none; }
}

/* ── Timeline ───────────────────────────────────────────── */
.story-timeline {
  margin-top: 2rem;
}

.timeline {
  border-left: 2px solid var(--espresso);
  padding-left: 20px;
  margin: 15px 0;
}

.timeline-item {
  position: relative;
  margin-bottom: 25px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 5px;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
}

.timeline-date {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--grey-text);
  text-transform: uppercase;
}

.timeline-title {
  font-weight: bold;
  font-size: 1rem;
  margin: 2px 0;
}

.timeline-item p {
  font-size: 0.9rem;
  color: #444;
}

/* ── Source Documentation ───────────────────────────────── */
.source-documentation {
  margin-top: 2rem;
  padding: 15px;
  background: #fdfdfd;
  border: 1px solid #eee;
  border-radius: 8px;
}

.source-documentation h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.source-documentation p {
  font-size: 0.85rem;
  margin-bottom: 10px;
  color: #666;
}

.source-links-list {
  list-style: none;
  padding: 0;
}

.source-links-list li {
  margin-bottom: 5px;
}

.source-link {
  font-family: monospace;
  font-weight: bold;
  color: var(--level-1);
  text-decoration: none;
  font-size: 0.9rem;
}

.source-link:hover {
  text-decoration: underline;
}

/* ── Goat Score Tooltips ────────────────────────────────── */
.has-tooltip {
  position: relative;
  cursor: help;
}

.goat-tooltip {
  visibility: hidden;
  width: 240px;
  background-color: var(--espresso);
  color: var(--off-white);
  text-align: left;
  border-radius: 6px;
  padding: 12px;
  position: absolute;
  z-index: 1000;
  bottom: 125%; /* Position above */
  left: 50%;
  margin-left: -120px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateY(10px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem;
  line-height: 1.4;
  border: 1px solid var(--gold);
}

.goat-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--gold) transparent transparent transparent;
}

.has-tooltip:hover .goat-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .goat-tooltip {
    width: 200px;
    margin-left: -100px;
    left: 20%;
  }
}

/* ── Watch the Action ───────────────────────────────────── */
.watch-the-action {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fdfdfd;
  border: 1px solid #eee;
  border-radius: 8px;
}

.watch-the-action__title {
  font-size: 1rem;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.watch-the-action__lead-in {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  font-style: italic;
  border-left: 3px solid var(--gold);
  padding-left: 15px;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
