/* ============================================================
   SPOCKSPOCK — BRAND DESIGN SYSTEM
   Intelligence-grade editorial aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=IBM+Plex+Mono:wght@300;400;500;600&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

/* ── CSS VARIABLES ── */
:root {
  /* Core Palette */
  --ink:        #0a0a0c;
  --ink-deep:   #050507;
  --paper:      #f0ece4;
  --paper-dim:  #d8d2c6;
  --white:      #ffffff;

  /* Accent Colors */
  --crimson:    #c0392b;
  --crimson-dim:#8b1a14;
  --crimson-glow: rgba(192, 57, 43, 0.15);
  --signal:     #00b894;   /* teal — for "verified" / live indicators */
  --amber:      #e17055;   /* for warnings / unverified */
  --classified: #2d3436;   /* dark gray panels */

  /* Text */
  --text-primary:   #f0ece4;
  --text-secondary: #b8afa6;
  --text-muted:     #7a7370;
  --text-link:      #c0392b;

  /* Borders & Dividers */
  --border:        rgba(240, 236, 228, 0.08);
  --border-bright: rgba(240, 236, 228, 0.20);
  --border-red:    rgba(192, 57, 43, 0.40);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Libre Baskerville', Georgia, serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* Spacing Scale */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Layout */
  --max-width:      1200px;
  --content-width:  760px;
  --gutter:         clamp(20px, 5vw, 60px);

  /* Effects */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:   0 24px 64px rgba(0,0,0,0.6);
  --shadow-red:  0 0 40px rgba(192,57,43,0.2);
  --grain-opacity: 0.035;

  /* Transitions */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --duration:  320ms;
}

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--ink);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  pointer-events: none;
  z-index: 9999;
}

/* ── TYPOGRAPHY ── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}

a:hover { color: var(--crimson); text-decoration: underline; }

strong { color: var(--text-primary); font-weight: 700; }

em { font-style: italic; color: var(--paper-dim); }

/* Mono / label style */
.mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── LAYOUT UTILITIES ── */

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

.content-width {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section {
  padding: var(--space-3xl) 0;
}

.section--tight {
  padding: var(--space-2xl) 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

.divider--bright {
  border-color: var(--border-bright);
}

/* ── NAVIGATION ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--duration);
}

.nav--scrolled {
  border-color: var(--border-bright);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  background: var(--ink);
  border: 1.5px solid var(--crimson);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  padding: 4px 5px;
  overflow: hidden;
}

/* Redacted lines inside logo mark */
.nav__logo-mark::before {
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  background: var(--crimson);
  border-radius: 1px;
}

.nav__logo-mark::after {
  content: '';
  display: block;
  width: 70%;
  height: 2px;
  background: rgba(240,236,228,0.25);
  border-radius: 1px;
  align-self: flex-start;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration);
}

.nav__link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.nav__link--active {
  color: var(--text-primary);
}

.nav__auth {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* ── BUTTONS ── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--duration) var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  background: var(--crimson);
  color: var(--white);
  padding: 12px 24px;
}

.btn--primary:hover {
  background: #d44235;
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(192,57,43,0.35);
}

.btn--outline {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 22px;
  border: 1px solid var(--border-bright);
}

.btn--outline:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 8px 0;
}

.btn--ghost:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* ── TAGS / BADGES ── */

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  gap: 5px;
}

.tag--classified {
  background: rgba(192,57,43,0.12);
  color: var(--crimson);
  border: 1px solid rgba(192,57,43,0.25);
}

.tag--verified {
  background: rgba(0,184,148,0.1);
  color: var(--signal);
  border: 1px solid rgba(0,184,148,0.2);
}

.tag--unverified {
  background: rgba(225,112,85,0.1);
  color: var(--amber);
  border: 1px solid rgba(225,112,85,0.2);
}

.tag--series {
  background: rgba(240,236,228,0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.tag__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* ── REPORT CARDS ── */

.card {
  background: rgba(240,236,228,0.03);
  border: 1px solid var(--border);
  transition: all var(--duration) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--crimson);
  opacity: 0;
  transition: opacity var(--duration);
}

.card:hover {
  background: rgba(240,236,228,0.05);
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  opacity: 1;
}

.card__body {
  padding: var(--space-xl);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.card__number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.card__title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.card__excerpt {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* ── HERO ── */

.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: var(--space-2xl);
  padding-top: calc(64px + var(--space-2xl));
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(192,57,43,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(0,184,148,0.04) 0%, transparent 50%),
    linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 100%);
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240,236,228,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,236,228,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.hero__eyebrow-line {
  width: 40px;
  height: 1px;
  background: var(--crimson);
}

.hero__headline {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xl);
  max-width: 900px;
}

.hero__headline em {
  font-style: italic;
  color: var(--crimson);
}

.hero__sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ── TICKER ── */

.ticker {
  background: var(--crimson);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
}

.ticker__track {
  display: flex;
  gap: 0;
  animation: tickerScroll 30s linear infinite;
  width: max-content;
}

.ticker__item {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  padding: 0 var(--space-xl);
}

.ticker__sep {
  color: rgba(255,255,255,0.4);
  padding: 0;
}

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

/* ── SECTION HEADERS ── */

.section-header {
  margin-bottom: var(--space-2xl);
}

.section-header__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.section-header__title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin-bottom: var(--space-sm);
}

.section-header__sub {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
}

/* ── GRID SYSTEMS ── */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

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

@media (max-width: 600px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .hero__headline { font-size: 2.6rem; }
}

/* ── LIVE INDICATOR ── */

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  display: inline-block;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ── REDACTED EFFECT ── */

.redacted {
  background: var(--text-muted);
  color: transparent;
  border-radius: 2px;
  user-select: none;
  display: inline-block;
}

/* ── FOOTER ── */

.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer__brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-md);
}

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration);
}

.footer__links a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; gap: var(--space-sm); }
}

/* ── ANIMATIONS ── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-up {
  animation: fadeUp 0.7s var(--ease-out) both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* ── USER AVATAR ── */

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-bright);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--duration);
}

.avatar:hover { border-color: var(--crimson); }

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar--placeholder {
  background: var(--classified);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ── MODAL (Auth) ── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,7,0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #111114;
  border: 1px solid var(--border-bright);
  padding: var(--space-2xl);
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  transition: transform var(--duration) var(--ease-out);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal__title {
  font-size: 1.6rem;
  margin-bottom: var(--space-sm);
}

.modal__sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.modal__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: var(--space-sm);
  transition: color var(--duration);
}

.modal__close:hover { color: var(--text-primary); }

/* ── GOOGLE SIGN IN ── */

.btn--google {
  width: 100%;
  background: var(--white);
  color: #1a1a1a;
  padding: 14px 24px;
  justify-content: center;
  font-size: 0.8rem;
  gap: var(--space-sm);
  border-radius: 2px;
}

.btn--google:hover {
  background: #f5f5f5;
  color: #1a1a1a;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
