/* DeFi360 site styles. Two themes share one set of variables. */

:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #12151a;
  --text: #e8e6df;
  --text-soft: #b9bdc2;
  --text-muted: #9aa0a6;
  --line: #2a2f36;
  --line-strong: #5b626b;
  --accent: #f2b33d;        /* accent used as text or icon colour */
  --accent-fill: #f2b33d;   /* accent used as a button background */
  --on-accent: #0b0d10;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-pixel: "Silkscreen", "IBM Plex Mono", monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f8;
  --surface: #ffffff;
  --text: #111417;
  --text-soft: #3b424a;
  --text-muted: #4b535c;
  --line: #c9ced4;
  --line-strong: #6b737c;
  --accent: #7a4f00;
  --accent-fill: #f2b33d;
  --on-accent: #111417;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.pixel { font-family: var(--font-pixel); }

/* Header */

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 20px;
  letter-spacing: 1px;
}

.brand svg .ring { fill: var(--text); }
.brand svg .dot { fill: var(--accent); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.site-nav a { padding: 12px 0; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  cursor: pointer;
}

.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { fill: currentColor; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Hero */

.hero { display: flex; flex-direction: column; gap: 24px; }

.eyebrow {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--accent);
}

h1 {
  margin: 0;
  max-width: 16ch;
  font-weight: 600;
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.12;
  letter-spacing: -1px;
}

.lede { margin: 0; max-width: 58ch; color: var(--text-soft); font-size: 18px; }

.signup {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 280px; max-width: 420px; }
.field label { font-size: 13px; color: var(--text-soft); }

.field input {
  height: 48px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font: inherit;
}

.field input::placeholder { color: var(--text-muted); }

.button {
  height: 48px;
  padding: 0 24px;
  background: var(--accent-fill);
  color: var(--on-accent);
  border: 0;
  border-radius: 0;
  font-family: var(--font-pixel);
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
}

.button:hover { filter: brightness(1.08); }

.fineprint { margin: 0; font-size: 13px; color: var(--text-muted); }

/* Sections */

.section { display: flex; flex-direction: column; gap: 20px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-title {
  margin: 0;
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.covers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cover { background: var(--bg); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.cover .num { font-family: var(--font-pixel); font-size: 12px; color: var(--accent); }
.cover h3 { margin: 0; font-size: 18px; font-weight: 600; }
.cover p { margin: 0; font-size: 14px; color: var(--text-soft); }

.headlines { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.headlines li { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.headlines .num { font-family: var(--font-pixel); font-size: 13px; color: var(--accent); padding-top: 3px; }

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

/* Issue pages */

.issue { max-width: 720px; display: flex; flex-direction: column; gap: 40px; }
.issue h1 { max-width: none; font-size: clamp(30px, 4.4vw, 44px); }
.issue h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.3; }
.issue p { margin: 0 0 12px; color: var(--text-soft); }
.issue p strong { color: var(--text); }
.issue .source { font-size: 13px; color: var(--text-muted); }

.table-scroll { overflow-x: auto; margin-bottom: 12px; }
.issue table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.issue th, .issue td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.issue th { font-family: var(--font-pixel); font-weight: 400; font-size: 12px; letter-spacing: 1px; color: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) {
  body { transition: background-color 0.15s, color 0.15s; }
}
