/* ═══════════════════════════════════════════════════════ */
/* THE REDITUS PROJECT — SHARED STYLES                     */
/* TRP Pages + Tool Page Compatibility Layer                */
/* ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* TRP Brand */
  --charcoal: #2C2C2C;
  --charcoal-deep: #1A1A1A;
  --charcoal-surface: #333333;
  --charcoal-elevated: #3A3A3A;
  --gold: #D4A84B;
  --gold-hover: #E0B85E;
  --gold-dim: rgba(212, 168, 75, 0.12);
  --slate: #6B7D8D;
  --green: #27AE60;
  --green-dim: rgba(39, 174, 96, 0.1);
  --silver: #E8E8E8;

  /* Semantic */
  --bg: var(--charcoal-deep);
  --surface: var(--charcoal);
  --surface-2: var(--charcoal-surface);
  --text-1: var(--silver);
  --text-2: #9EA8B0;
  --text-3: #5E666D;
  --border: #383838;

  /* Legacy aliases for React tool pages */
  --navy: var(--charcoal);
  --navy-deep: var(--charcoal-deep);
  --navy-surface: var(--charcoal-surface);
  --blue: var(--slate);
  --blue-light: #8A9BAA;
  --amber: var(--gold);
  --amber-hover: var(--gold-hover);
  --border-solid: var(--border);
  --gray-cool: #F4F6F8;
  --gray-med: #BDC3C7;
  --white: #F5F3ED;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(212, 168, 75, 0.25); }
a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-hover); }
img { max-width: 100%; display: block; }

/* ─── NAV ────────────────────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(26, 26, 26, 0.94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 54px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.nav-logo-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--charcoal);
  border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-weight: 700; font-size: 13px; line-height: 1;
  font-family: 'IBM Plex Mono', monospace;
}
.nav-logo-text {
  color: var(--text-2); font-weight: 600; font-size: 13px;
  letter-spacing: 0.03em;
}
.nav-logo-text .accent { color: var(--gold); }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-link {
  color: var(--text-2); font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 6px; text-decoration: none;
  transition: all 0.2s;
}
.nav-link:hover { color: var(--text-1); background: rgba(212, 168, 75, 0.06); }
.nav-link.active { color: var(--gold); background: rgba(212, 168, 75, 0.08); }

.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 5px; z-index: 110;
}
.hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--text-2); border-radius: 2px; transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* Legacy dropdown support for tool pages */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  color: var(--text-2); font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 6px;
  background: none; border: none; cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif;
  display: flex; align-items: center; gap: 5px; transition: all 0.2s;
}
.nav-dropdown-trigger:hover { color: var(--text-1); }
.nav-dropdown-trigger svg { width: 12px; height: 12px; }
.nav-dropdown-menu { display: none; }
.nav-dropdown-label, .nav-dropdown-item { display: none; }

/* ─── LAYOUT ─────────────────────────────────────────── */

.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 0; }
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ─── TYPOGRAPHY ─────────────────────────────────────── */

.gold, .amber { color: var(--gold); }
.green { color: var(--green); }
.blue { color: var(--slate); }
.mono { font-family: 'IBM Plex Mono', monospace; }
h1, h2, h3 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700; line-height: 1.15; letter-spacing: -0.02em;
}

/* ─── HERO ───────────────────────────────────────────── */

.hero {
  padding: 110px 24px 56px;
  background: radial-gradient(ellipse at 30% 10%, rgba(212,168,75,0.04), transparent 50%), var(--bg);
}
.hero-inner { max-width: 600px; margin: 0 auto; text-align: center; }
.hero-tag {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  border: 1px solid var(--border); color: var(--text-3);
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  letter-spacing: 0.05em; margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(28px, 5vw, 44px); margin-bottom: 18px;
}
.hero-sub {
  font-size: 16px; color: var(--text-2); line-height: 1.7;
  margin-bottom: 36px; max-width: 480px; margin-left: auto; margin-right: auto;
}

/* ─── BUTTONS ────────────────────────────────────────── */

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 6px;
  font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; font-size: 14px;
  text-decoration: none; cursor: pointer; transition: all 0.2s;
  border: none; line-height: 1.3;
}
.btn-gold, .btn-amber { background: var(--gold); color: var(--charcoal-deep); }
.btn-gold:hover, .btn-amber:hover { background: var(--gold-hover); color: var(--charcoal-deep); }
.btn-outline { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--gold); color: var(--text-1); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* ─── CATEGORY BLOCK ─────────────────────────────────── */

.category-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 36px 32px; transition: border-color 0.3s;
}
.category-block:hover { border-color: #4A4A4A; }
.category-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 12px; display: block;
}
.category-title {
  font-size: 22px; font-weight: 700; margin-bottom: 10px; line-height: 1.2;
}
.category-desc {
  font-size: 15px; color: var(--text-2); line-height: 1.7;
  margin-bottom: 24px; max-width: 520px;
}

/* ─── TOOL CARDS ─────────────────────────────────────── */

.tools-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tool-item {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px; text-decoration: none; color: inherit;
  transition: all 0.25s; display: flex; flex-direction: column;
}
.tool-item:hover { border-color: var(--gold); transform: translateY(-1px); }
.tool-tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  font-weight: 600; letter-spacing: 0.06em; margin-bottom: 8px;
  display: inline-block; padding: 2px 8px; border-radius: 3px; width: fit-content;
}
.tool-tag.free { background: var(--green-dim); color: var(--green); }
.tool-tag.paid, .tool-tag.product { background: var(--gold-dim); color: var(--gold); }
.tool-name { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.tool-desc { font-size: 13px; color: var(--text-2); line-height: 1.5; flex: 1; }
.tool-arrow {
  margin-top: 12px; font-size: 13px; color: var(--text-3);
  transition: all 0.2s; align-self: flex-start;
}
.tool-item:hover .tool-arrow { color: var(--gold); transform: translateX(4px); }

/* ─── PRODUCT CARD ───────────────────────────────────── */

.product-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 24px; display: flex; flex-direction: column;
  transition: border-color 0.25s;
}
.product-card:hover { border-color: var(--gold); }
.product-price {
  font-family: 'IBM Plex Mono', monospace; font-size: 20px;
  font-weight: 700; color: var(--gold); margin-bottom: 4px;
}
.product-name { font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.product-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 16px; flex: 1; }

/* ─── STATS BAR ──────────────────────────────────────── */

.stats-bar {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 24px; text-align: center;
}
.stat-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px; font-weight: 700; color: var(--gold);
}
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ─── PAGE HERO ──────────────────────────────────────── */

.page-hero { padding: 96px 24px 40px; }
.page-hero-inner { max-width: 560px; margin: 0 auto; text-align: center; }
.page-hero h1 {
  font-size: clamp(26px, 4vw, 38px); margin-bottom: 14px;
}
.page-hero p {
  font-size: 15px; color: var(--text-2); line-height: 1.7;
  max-width: 460px; margin: 0 auto 24px;
}
.back-link {
  color: var(--text-3); font-size: 13px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 20px; transition: color 0.2s;
}
.back-link:hover { color: var(--text-2); }

/* ─── FOOTER ─────────────────────────────────────────── */

.site-footer {
  padding: 32px 24px; border-top: 1px solid var(--border);
  text-align: center; font-size: 12px; color: var(--text-3); line-height: 1.8;
}
.site-footer a { color: var(--text-3); }
.site-footer a:hover { color: var(--text-2); }
.footer-crisis { margin-top: 6px; font-size: 11px; }

/* ─── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none; position: fixed; top: 54px; left: 0; right: 0;
    background: rgba(26, 26, 26, 0.97); backdrop-filter: blur(16px);
    flex-direction: column; padding: 12px 24px 20px; gap: 2px;
    border-bottom: 1px solid var(--border); z-index: 105;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 14px; font-size: 14px; }
  .tools-row { grid-template-columns: 1fr; }
  .category-block { padding: 26px 22px; }
  .btn { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .nav-logo-text { font-size: 12px; }
}
