/* bigredbox Blog — matches bigredbox.co.uk exactly */

@font-face {
  font-family: 'Nasalization';
  src: url('/assets/nasalization.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

/* Light theme values live in :root so they are ALWAYS available */
:root {
  --red:      #e5321b;
  --red-a10:  rgba(229,50,27,0.10);
  --red-a25:  rgba(229,50,27,0.25);
  --t:        0.18s cubic-bezier(0.4,0,0.2,1);
  --ease:     cubic-bezier(0.16,1,0.3,1);

  /* Light theme — default */
  --bg:       #ffffff;
  --bg-1:     #f7f7f7;
  --bg-2:     #efefef;
  --line:     rgba(0,0,0,0.08);
  --line-mid: rgba(0,0,0,0.14);
  --fg:       #0a0a0a;
  --fg-2:     #555555;
  --fg-3:     #999999;
  --logo-col: #0a0a0a;
  --nav-bg:   rgba(255,255,255,0.88);
}

/* Dark theme overrides */
[data-theme="dark"] {
  --bg:       #0a0a0a;
  --bg-1:     #111111;
  --bg-2:     #1a1a1a;
  --line:     rgba(255,255,255,0.08);
  --line-mid: rgba(255,255,255,0.14);
  --fg:       #ededed;
  --fg-2:     #999999;
  --fg-3:     #555555;
  --logo-col: #ffffff;
  --nav-bg:   rgba(10,10,10,0.85);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t), color var(--t);
}

::selection { background: var(--red); color: #fff; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* ── Logo ── */
.logo {
  font-family: 'Nasalization', monospace;
  font-weight: normal;
  letter-spacing: 0.01em;
  line-height: 1;
  user-select: none;
  display: inline-flex;
  align-items: baseline;
}
.logo-nav  { font-size: 20px; }
.logo .w-big,
.logo .w-box { color: var(--logo-col); }
.logo .w-red { color: #e5321b; }

/* ── Nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background var(--t), border-color var(--t);
}
.nav-inner {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin-right: 8px;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color var(--t), background var(--t);
}
.nav-links a:hover,
.nav-links a.active { color: var(--fg); background: var(--line); }
.nav-right { display: flex; align-items: center; gap: 8px; }

.btn-theme {
  width: 32px; height: 32px; border-radius: 6px;
  border: 1px solid var(--line-mid); background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--fg-2);
  transition: border-color var(--t), color var(--t), background var(--t);
}
.btn-theme:hover { color: var(--fg); background: var(--line); }
.btn-theme svg { width: 14px; height: 14px; }
[data-theme="dark"]  .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: none; }

.btn-cta {
  font-size: 13px; font-weight: 600;
  color: #fff !important; background: var(--red);
  padding: 8px 18px; border-radius: 6px;
  display: inline-block;
  transition: opacity var(--t);
}
.btn-cta:hover { opacity: 0.85; }

/* ── Shared ── */
.lbl {
  display: block;
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: #e5321b; margin-bottom: 14px;
}
.ttl {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 600; color: var(--fg);
  letter-spacing: -0.03em; line-height: 1.12;
}

/* ── Page heading ── */
.page-heading {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}
.page-heading p {
  font-size: 15px; color: var(--fg-2);
  font-weight: 300; margin-top: 14px; max-width: 480px;
}

/* ── Post grid ── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 56px;
}
.post-card {
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  transition: background var(--t);
}
.post-card:hover { background: var(--bg-2); }
.post-card__img-wrap { display: block; aspect-ratio: 16/9; overflow: hidden; }
.post-card__img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.post-card:hover .post-card__img-wrap img { transform: scale(1.03); }
.post-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.post-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--red);
  background: var(--red-a10); padding: 3px 8px; border-radius: 4px;
}
.post-card__title { font-size: 15px; font-weight: 600; color: var(--fg); line-height: 1.4; margin-bottom: 10px; }
.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--red); }
.post-card__excerpt { font-size: 13px; color: var(--fg-2); font-weight: 300; line-height: 1.65; flex: 1; margin-bottom: 16px; }
.post-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; border-top: 1px solid var(--line);
}
.post-card__footer time { font-size: 11px; color: var(--fg-3); }
.read-more { font-size: 12px; font-weight: 600; color: var(--red); }
.empty-state { text-align: center; padding: 80px 0; color: var(--fg-3); }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 0 64px; }
.btn-page {
  font-size: 13px; font-weight: 500; color: var(--fg);
  background: transparent; border: 1px solid var(--line-mid);
  padding: 8px 18px; border-radius: 6px; display: inline-block;
  transition: background var(--t);
}
.btn-page:hover { background: var(--line); }
.pagination span { font-size: 13px; color: var(--fg-3); }

/* ── Single post ── */
.preview-bar {
  background: #fef9c3; border-bottom: 1px solid #fde047;
  color: #713f12; text-align: center; padding: 8px 16px;
  font-size: 13px; font-weight: 500;
}
.preview-bar a { color: var(--red); text-decoration: underline; }

.single-article { max-width: 720px; margin: 0 auto; padding: 64px 0 80px; }
.article-header { margin-bottom: 32px; }
.article-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.article-header h1 {
  font-size: clamp(24px, 4vw, 40px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.15;
  color: var(--fg); margin-bottom: 16px;
}
.article-date { font-size: 12px; color: var(--fg-3); letter-spacing: 0.04em; }
.article-hero { margin-bottom: 40px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.article-hero img { width: 100%; height: auto; display: block; }

.article-body { font-size: 16px; line-height: 1.8; color: var(--fg); font-weight: 300; }
.article-body p { margin-bottom: 1.25rem; }
.article-body h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 2.5rem 0 0.75rem; }
.article-body h3 { font-size: 17px; font-weight: 600; margin: 2rem 0 0.5rem; }
.article-body ul,
.article-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-body li { margin-bottom: 0.4rem; color: var(--fg-2); }
.article-body strong { font-weight: 600; color: var(--fg); }
.article-body a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

.article-footer { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.article-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.article-share span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.article-share div { display: flex; flex-wrap: wrap; gap: 8px; }
.article-share a {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  border: 1px solid var(--line-mid);
  border-radius: 6px;
  padding: 7px 12px;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.article-share a:hover {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}
.article-cta {
  background: var(--bg-1); border: 1px solid var(--line-mid);
  border-radius: 12px; padding: 28px 32px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.article-cta::before {
  content: ''; position: absolute; top: 0; left: 20px; right: 20px;
  height: 1px; background: linear-gradient(90deg, transparent, #e5321b, transparent);
}
.article-cta p { font-size: 14px; color: var(--fg-2); margin-bottom: 16px; font-weight: 300; }
.back-link { font-size: 13px; color: var(--fg-3); transition: color var(--t); display: inline-block; margin-top: 12px; }
.back-link:hover { color: var(--fg); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line); padding: 28px 0;
  transition: border-color var(--t);
}
.foot-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.foot-l { display: flex; align-items: center; gap: 18px; }
.foot-meta { font-size: 12px; color: var(--fg-3); }
.foot-links { display: flex; gap: 16px; list-style: none; }
.foot-links a { font-size: 11px; font-weight: 500; color: var(--fg-3); letter-spacing: 0.04em; transition: color var(--t); }
.foot-links a:hover { color: var(--fg-2); }
.foot-brb { font-size: 11px; color: var(--fg-2); font-weight: 500; }
.foot-brb span { color: #e5321b; }
.logo-foot { font-size: 17px; opacity: 0.5; transition: opacity var(--t); }
.logo-foot:hover { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .site-header { padding: 0 16px; }
  .container { padding: 0 16px; }
  .page-heading { padding: 40px 0 32px; margin-bottom: 32px; }
  .post-grid { grid-template-columns: 1fr; border-radius: 8px; }
  .single-article { padding: 40px 0 60px; }
  .nav-links { display: none; }
  .article-share { align-items: flex-start; flex-direction: column; }
}
