/*
 * Styles for the pages authored in this repo: the home page and the two
 * module landing pages. The Inside Trader and Macro routes keep their own
 * stylesheets untouched — they only receive /ritchai-nav.css on top.
 *
 * Tokens, dark theme and type scale come straight from the approved
 * ritchai-homepage.html design.
 */

:root {
  --bg: #0A0D10;
  --bg-elev: #11161B;
  --surface: #151B21;
  --surface-2: #1A2128;
  --border: #232C34;
  --border-soft: #1C242B;
  --text: #E8EEF2;
  --muted: #8A97A3;
  --dim: #5C6873;
  --green: #34E29A;
  --green-dim: #1F7A56;
  --gold: #E9B949;
  --red: #F0616D;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .75);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The faint grid wash behind the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(52, 226, 154, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 226, 154, .025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

header.hero { padding: 78px 0 52px; text-align: center; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  margin-bottom: 26px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.4s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 226, 154, .5); }
  70%  { box-shadow: 0 0 0 7px rgba(52, 226, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 226, 154, 0); }
}

h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -.03em;
}

h1 .accent { color: var(--green); }

.hero-date {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--dim);
  margin-top: 20px;
}

/* ── Section heading ─────────────────────────────────────────────────────── */

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.sec-head h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -.01em;
}

.sec-head .eyebrow { color: var(--green); }

/* ── Module tiles ────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding-bottom: 80px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .22s cubic-bezier(.2, .7, .2, 1), border-color .22s, box-shadow .22s;
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-4px);
  border-color: var(--green-dim);
  box-shadow: var(--shadow);
}

.tile:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.tile:hover .tile-foot, .tile:focus-visible .tile-foot { color: var(--green); gap: 12px; }
.tile:hover .glyph, .tile:focus-visible .glyph { color: var(--green); border-color: var(--green-dim); }

.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.tile-head .id {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--dim);
}

.tile-head .cadence {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--muted);
  white-space: nowrap;
}

.tile-head .cadence .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.4s infinite;
  flex-shrink: 0;
}

.tile-body {
  padding: 26px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.glyph {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  color: var(--muted);
  margin-bottom: 18px;
  transition: color .22s, border-color .22s;
}

.glyph svg { width: 28px; height: 28px; display: block; }

.tile h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -.015em;
  margin-bottom: 8px;
}

.tile p {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 42ch;
}

.tile-foot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--text);
  padding: 0 22px 22px;
  transition: color .2s, gap .2s;
}

.tile-foot svg { width: 14px; height: 14px; }

/* ── Landing pages (earnings / nieuwsmail) ───────────────────────────────── */

.page { padding: 64px 0 80px; flex: 1; }

.page .back {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  transition: color .18s;
}

.page .back:hover { color: var(--green); }
.page .back svg { width: 14px; height: 14px; }

.page h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 14px;
}

.page .lede {
  color: var(--muted);
  font-size: 16px;
  max-width: 62ch;
  margin-bottom: 34px;
}

.info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 28px;
  max-width: 720px;
}

.info h2 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 16px;
}

.info dl { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 12px 24px; }

.info dt {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  padding-top: 3px;
}

.info dd { color: var(--text); font-size: 14.5px; }
.info dd .sub { color: var(--muted); font-size: 13px; display: block; margin-top: 2px; }

.note {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 2px solid var(--green-dim);
  background: var(--bg-elev);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 720px;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border-soft);
  padding: 34px 0;
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.foot .muted {
  color: var(--dim);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
}

.foot .links { display: flex; gap: 20px; flex-wrap: wrap; }

.foot .links a {
  color: var(--muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  transition: color .18s;
}

.foot .links a:hover { color: var(--green); }

@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .grid { grid-template-columns: 1fr; }
  header.hero { padding: 54px 0 40px; }
  .tile { min-height: 0; }
  .info { padding: 22px 20px; }
  .info dl { grid-template-columns: 1fr; gap: 4px 0; }
  .info dd { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
