/* ==========================================================================
   ontatrades.com — white, editorial, Framer-flavoured. One article, no images.
   ========================================================================== */

:root {
  --base: #ffffff;
  --surface: #fafafa;
  --line: #e8e8ea;
  --line-strong: #d6d6da;
  --ink: #0a0a0b;
  --ink-dim: #52525b;
  --ink-mute: #8a8a93;

  --r: 10px;
  --maxw: 1120px;
  --readw: 680px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Barely-there warmth behind the top of the page — light in the room,
   not a panel. Nothing glassy, nothing that fights the text. */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(10, 10, 11, 0.045), transparent 70%),
    radial-gradient(40% 70% at 88% 6%, rgba(10, 10, 11, 0.025), transparent 72%);
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

p {
  margin: 0 0 1.05em;
}

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

::selection {
  background: var(--ink);
  color: var(--base);
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r);
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* ---------- header ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.header.is-stuck {
  border-bottom-color: var(--line);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
  flex: none;
}

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

.nav a {
  font-size: 0.875rem;
  color: var(--ink-dim);
  transition: color 0.2s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

/* ---------- article ---------- */

.page {
  padding: clamp(48px, 8vw, 88px) 0 clamp(64px, 9vw, 104px);
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
}

.page h1 {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.lead {
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink-dim);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: clamp(32px, 5vw, 48px) 0;
}

.prose h2 {
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
  margin: clamp(38px, 5vw, 54px) 0 14px;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose > p {
  color: var(--ink-dim);
  font-size: 1.0313rem;
  line-height: 1.7;
}

.prose > p.eyebrow {
  color: var(--ink);
}

/* ---------- link cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: clamp(36px, 5vw, 52px) 0;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px -12px rgba(10, 10, 11, 0.18);
}

.card-title {
  font-size: 1.25rem;
}

.card-meta {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-mute);
}

.card-body {
  margin: 14px 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-dim);
}

.arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.arrow svg {
  width: 13px;
  height: 13px;
  flex: none;
  transition: transform 0.25s var(--ease);
}

.card:hover .arrow svg {
  transform: translateX(3px);
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 34px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--ink-dim);
}

.footer-nav a {
  transition: color 0.2s var(--ease);
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--ink-mute);
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  :root {
    --gutter: 20px;
  }

  .nav {
    gap: 18px;
  }

  .nav a {
    font-size: 0.8125rem;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card {
    padding: 22px 20px;
  }
}

@media (max-width: 420px) {
  .page h1 {
    font-size: 2.375rem;
  }
}

/* Only on genuinely narrow screens does the wordmark give way to the mark. */
@media (max-width: 359px) {
  .brand span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
