/*
  Page styles for the static posts in public/blog/: header, post head, cover,
  calls to action, footer. The post's own text is styled by post-body.css.

  They are plain HTML files served as they are, so Tailwind never sees them.
  The values here are the app's tokens (tailwind.config.js, index.css) written
  out by hand; seo.test.ts fails if a colour here leaves the palette.

  vercel.json caches every .css path as immutable for a year, so a changed copy
  of this file only reaches returning readers under a new URL. Bump the ?v= on
  the three <link> tags whenever you edit it.
*/

:root {
  --surface-0: #070A10;
  --surface-1: #0A0E15;
  --surface-2: #0F141D;
  --surface-3: #141A25;
  --surface-4: #1A2130;
  --border: #1C2331;
  --border-light: #283143;
  --border-strong: #354052;
  --text-primary: #F1F4F8;
  --text-secondary: #A7B0BF;
  --text-tertiary: #6E7889;
  --primary: #1EE3A0;
  --primary-200: #97F5D0;
  --primary-300: #6CF2C2;
  --primary-400: #40EAB0;
  --font-sans: Geist, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Barlow Condensed', 'Arial Narrow', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-1);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid rgba(30,227,160,0.7); outline-offset: 2px; }
::selection { background: rgba(30,227,160,0.28); color: #fff; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 20px; }
.measure { max-width: 44rem; margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 60;
  padding: 8px 12px; border-radius: 8px;
  background: var(--primary); color: #03150E; font-weight: 600;
}
.skip:focus { top: 12px; }

.label {
  font-family: var(--font-mono);
  font-size: 11px; line-height: 16px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary);
}

/* ── Buttons, as .btn-primary / .btn-outline in index.css ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; line-height: 1; white-space: nowrap;
  transition: background-color .15s ease-out, border-color .15s ease-out, box-shadow .15s ease-out;
}
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn-primary {
  background: var(--primary); color: #03150E; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.4);
}
.btn-primary:hover {
  background: var(--primary-400);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 0 0 1px rgba(30,227,160,0.4), 0 8px 24px -8px rgba(30,227,160,0.6);
}
.btn-outline { border: 1px solid var(--border-light); color: var(--text-primary); }
.btn-outline:hover { background: rgba(255,255,255,0.04); border-color: var(--border-strong); }

/* ── Site header, as pages/InfoPage/Header.tsx ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(7,10,16,0.82);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; letter-spacing: -0.025em; }
.brand img { width: 28px; height: 28px; }
.site-nav { display: none; gap: 4px; margin-left: 40px; margin-right: auto; }
.site-nav a { padding: 6px 12px; border-radius: 8px; font-size: 14px; color: var(--text-secondary); transition: color .15s; }
.site-nav a:hover { color: var(--text-primary); }
.header-actions { display: flex; gap: 8px; }
@media (min-width: 768px) { .site-nav { display: flex; } }

/* ── Post header ── */
.post-head { padding-top: 56px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
.post-meta .sep { color: var(--border-strong); }
/* Scoreboard type, as .display in index.css. */
.post-title, .post-cta h2 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; }
.post-title {
  margin: 16px 0 0;
  font-size: clamp(38px, 6.4vw, 58px); line-height: 0.95; letter-spacing: -0.005em;
  text-wrap: balance;
}
.post-dek {
  margin: 18px 0 0;
  font-size: 19px; line-height: 1.5; color: var(--text-secondary);
  text-wrap: pretty;
}
.byline { margin: 20px 0 0; font-size: 14px; color: var(--text-tertiary); }
.byline strong { color: var(--text-secondary); font-weight: 500; }

.post-cover { margin: 40px auto 48px; max-width: 56rem; padding: 0 20px; }
.post-cover img {
  width: 100%; aspect-ratio: 1200 / 630; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface-2);
}

/* ── After the post ── */
.post-cta {
  margin-top: 56px; padding: 28px;
  border: 1px solid rgba(30,227,160,0.2); border-radius: 14px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(30,227,160,0.14) 0%, rgba(30,227,160,0) 55%),
    var(--surface-3);
}
.post-cta h2 { margin: 0; font-size: 30px; line-height: 1; }
.post-cta p { margin: 10px 0 20px; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.post-cta .actions { display: flex; flex-wrap: wrap; gap: 8px; }

.more { margin-top: 56px; }
.more-list { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.more-list a {
  display: block; padding: 18px 20px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-3);
  transition: background-color .2s ease-out, border-color .2s ease-out;
}
.more-list a:hover { background: var(--surface-4); border-color: var(--border-light); }
.more-list .title { display: block; margin-top: 6px; font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
@media (min-width: 640px) { .more-list { grid-template-columns: 1fr 1fr; } }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.share .label { margin-right: 4px; }

/* ── Site footer ── */
.site-footer { margin-top: 88px; padding: 40px 0 48px; border-top: 1px solid var(--border); background: var(--surface-0); }
.site-footer .notice { margin: 0; max-width: 44rem; font-size: 12px; line-height: 1.6; color: var(--text-tertiary); }
.site-footer .notice a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }
.site-footer .notice a:hover { color: var(--primary-300); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.footer-links a { color: var(--text-secondary); transition: color .15s; }
.footer-links a:hover { color: var(--text-primary); }

@media (min-width: 640px) {
  .wrap, .measure, .post-cover { padding-left: 32px; padding-right: 32px; }
  .post-head { padding-top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
