/* ==========================================================================
   Signal — crypto news
   Design tokens
   ========================================================================== */
:root{
  --bg: #0B1220;
  --surface: #121B2E;
  --surface-alt: #182338;
  --border: #253150;
  --text: #E8ECF4;
  --muted: #8993A8;
  --gold: #D4A72C;
  --gold-dim: #8A7326;
  --mint: #4FD1A5;
  --coral: #E85D75;
  --max-w: 1120px;
  --radius: 10px;
}

*,*::before,*::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* subtle grid texture on the page background */
body{
  background-image:
    linear-gradient(rgba(212,167,44,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,167,44,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  background-position: center top;
}

a{ color: inherit; }

h1,h2,h3{
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

.mono{ font-family: "IBM Plex Mono", monospace; }

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

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

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

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,18,32,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}

.logo{
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.logo .dot{
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(79,209,165,0.15);
  flex: none;
}

.logo small{
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

nav.main-nav{
  display: flex;
  gap: 28px;
  align-items: center;
}

nav.main-nav a{
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
nav.main-nav a:hover, nav.main-nav a.active{ color: var(--text); }

/* ---------------------------------------------------------------------- */
/* Ticker tape                                                             */
/* ---------------------------------------------------------------------- */
.ticker{
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.ticker::before, .ticker::after{
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
}
.ticker::before{ left:0; background: linear-gradient(90deg, var(--surface), transparent); }
.ticker::after{ right:0; background: linear-gradient(270deg, var(--surface), transparent); }

.ticker-track{
  display: inline-flex;
  gap: 40px;
  padding: 10px 24px;
  animation: scroll-ticker 32s linear infinite;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}
.ticker:hover .ticker-track{ animation-play-state: paused; }

@keyframes scroll-ticker{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

.tick{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.tick .sym{ color: var(--text); font-weight: 600; }
.tick .up{ color: var(--mint); }
.tick .down{ color: var(--coral); }

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */
.hero{
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow{
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before{
  content: "";
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{ opacity: 1; }
  50%{ opacity: 0.25; }
}

.hero h1{
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  max-width: 20ch;
}

.hero p.lede{
  color: var(--muted);
  max-width: 60ch;
  font-size: 1.05rem;
  margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Feed / block cards                                                      */
/* ---------------------------------------------------------------------- */
.feed-section{ padding: 48px 0 72px; }

.feed-heading{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.feed-heading h2{ font-size: 1.3rem; margin: 0; }
.feed-heading .updated{
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

.feed-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px){ .feed-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px){ .feed-grid{ grid-template-columns: 1fr; } }

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover{ border-color: var(--gold-dim); transform: translateY(-2px); }

.card-block{
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
}

.card h3{
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.card .snippet{
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta{
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.card-meta .source{ color: var(--text); font-weight: 500; }

.feed-note{
  margin-top: 28px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.state-msg{
  grid-column: 1 / -1;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.state-msg a{ color: var(--gold); text-decoration: underline; }

.skeleton{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  height: 168px;
  position: relative;
  overflow: hidden;
}
.skeleton::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.04) 50%, transparent 70%);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer{
  from{ transform: translateX(-100%); }
  to{ transform: translateX(100%); }
}

/* ---------------------------------------------------------------------- */
/* Disclaimer strip                                                        */
/* ---------------------------------------------------------------------- */
.disclaimer{
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.disclaimer p{
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 90ch;
}
.disclaimer strong{ color: var(--text); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
.site-footer{
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.footer-row{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.footer-links{
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-links a{
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
}
.footer-links a:hover{ color: var(--text); }

.footer-copy{
  color: var(--muted);
  font-size: 0.8rem;
  font-family: "IBM Plex Mono", monospace;
}

/* ---------------------------------------------------------------------- */
/* Legal pages                                                             */
/* ---------------------------------------------------------------------- */
.legal{
  padding: 56px 0 80px;
}
.legal .hero-eyebrow{ margin-bottom: 10px; }
.legal h1{ font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 6px; }
.legal .updated{
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 40px;
  display: block;
}
.legal-body{
  max-width: 74ch;
}
.legal-body h2{
  font-size: 1.15rem;
  margin-top: 2.2em;
  padding-top: 0.6em;
  border-top: 1px solid var(--border);
}
.legal-body h2:first-of-type{ border-top: none; padding-top: 0; margin-top: 0; }
.legal-body p, .legal-body li{
  color: var(--muted);
  font-size: 0.96rem;
}
.legal-body strong{ color: var(--text); }
.legal-body a{ color: var(--gold); text-decoration: underline; }
.legal-body ul{ padding-left: 1.2em; }
