/*
Theme Name: iFixMate
Theme URI: https://ifixmate.uk/
Description: Lightweight blog theme matching the iFixMate website.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: ifixmate
*/

@font-face { font-family: 'Inter'; src: url('assets/fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('assets/fonts/Inter-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('assets/fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('assets/fonts/Inter-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('assets/fonts/SpaceGrotesk-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --brand: #5ebf40;
  --brand-dark: #3f8f2a;
  --bg: #000;
  --surface: #111;
  --surface-2: #181818;
  --line: #262626;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --radius: 18px;
  --heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.65 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--heading); font-weight: 700; line-height: 1.15; letter-spacing: -0.5px; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 780px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--brand); color: #000; border-radius: 8px; }
.skip-link:focus { left: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border: 2px solid transparent; border-radius: 999px; font-weight: 700; font-size: 15px; line-height: 1.2; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.btn-primary { background: var(--brand); color: #000; }
.btn-primary:hover { background: #fff; }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { border-color: var(--brand); background: var(--brand); color: #000; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 76px; }
.logo img { width: 160px; height: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 28px; }
.main-nav a { font-size: 15px; font-weight: 600; color: #e5e5e5; transition: color 0.2s ease; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--brand); }
.nav-cta-mobile { display: none; }
.header-cta { padding: 11px 20px; font-size: 14px; }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; margin: 4px 0; background: #fff; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }

@media (max-width: 991px) {
  .header-cta { display: none; }
  .menu-toggle { display: block; }
  .main-nav { position: fixed; inset: 76px 0 auto 0; margin: 0; padding: 12px 20px 24px; background: #0b0b0b; border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all 0.2s ease; }
  .menu-open .main-nav { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 18px; }
  .nav-cta-mobile { display: block; padding-top: 18px; }
  .nav-cta-mobile a.btn { display: flex; width: 100%; border-bottom: 0; color: #000; font-size: 16px; }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* Hero */
.page-hero { padding: 72px 0 40px; background: radial-gradient(60% 120% at 50% 0%, rgba(94, 191, 64, 0.16) 0%, rgba(94, 191, 64, 0) 70%); text-align: center; }
.page-hero h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -1.5px; }
.page-hero .accent { color: var(--brand); }
.eyebrow { margin-bottom: 14px; color: var(--brand); font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.eyebrow a:hover { text-decoration: underline; }
.hero-text { max-width: 620px; margin: 16px auto 0; color: var(--muted); font-size: 18px; }
.cat-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.cat-filter a { padding: 9px 18px; border: 1px solid #333; border-radius: 999px; font-size: 14px; font-weight: 600; color: #e5e5e5; transition: all 0.2s ease; }
.cat-filter a:hover { border-color: var(--brand); }
.cat-filter a[aria-current="page"] { border-color: var(--brand); background: var(--brand); color: #000; }

/* Post cards */
.post-list { padding-top: 24px; padding-bottom: 40px; }
.post-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color 0.25s ease, transform 0.25s ease; }
.post-card:hover { border-color: rgba(94, 191, 64, 0.6); transform: translateY(-3px); }
.post-card-link { display: flex; flex-direction: column; height: 100%; }
.post-card-art { display: grid; place-items: center; height: 150px; background: radial-gradient(90% 120% at 20% 0%, rgba(94, 191, 64, 0.25) 0%, rgba(94, 191, 64, 0) 60%), #0c0c0c; border-bottom: 1px solid var(--line); color: var(--brand); }
.post-card-art svg { width: 56px; height: 56px; }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.chip { padding: 3px 10px; border-radius: 999px; background: rgba(94, 191, 64, 0.14); color: var(--brand); font-weight: 600; }
.post-card-title { margin-top: 14px; font-size: 22px; line-height: 1.25; }
.post-card-excerpt { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.read-more { margin-top: auto; padding-top: 18px; color: var(--brand); font-size: 15px; font-weight: 700; }
@media (min-width: 1080px) {
  .post-card.is-featured { grid-column: 1 / -1; }
  .post-card.is-featured .post-card-link { flex-direction: row; }
  .post-card.is-featured .post-card-art { width: 42%; height: auto; min-height: 300px; border-bottom: 0; border-right: 1px solid var(--line); }
  .post-card.is-featured .post-card-art svg { width: 96px; height: 96px; }
  .post-card.is-featured .post-card-body { padding: 40px; justify-content: center; }
  .post-card.is-featured .post-card-title { font-size: 34px; }
  .post-card.is-featured .post-card-excerpt { font-size: 17px; }
}
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; }
.pagination .page-numbers.current { background: var(--brand); border-color: var(--brand); color: #000; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }
.empty h2 { color: var(--text); margin-bottom: 10px; }
.empty a { color: var(--brand); text-decoration: underline; }

/* Single post */
.single-hero { padding-bottom: 28px; }
.single-hero h1 { font-size: clamp(32px, 5vw, 52px); }
.single-hero .post-meta { justify-content: center; margin-top: 18px; font-size: 14px; }
.single-image { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; }
.prose { color: #e2e2e2; font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; color: #fff; font-size: 28px; }
.prose h3 { margin-top: 1.6em; color: #fff; font-size: 21px; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: #fff; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li { position: relative; padding-left: 28px; }
.prose ul li + li, .prose ol li + li { margin-top: 0.5em; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.prose ol { list-style: decimal; }
.prose ol li::marker { color: var(--brand); font-weight: 700; }
.prose blockquote, .prose .note { margin-left: 0; padding: 18px 22px; border-left: 4px solid var(--brand); border-radius: 0 12px 12px 0; background: var(--surface); color: #e5e5e5; }
.prose .warning { border-left-color: #f59e0b; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.inline-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin: 48px 0 24px; padding: 24px 26px; border: 1px solid rgba(94, 191, 64, 0.45); border-radius: var(--radius); background: rgba(94, 191, 64, 0.07); }
.inline-cta strong { display: block; font-size: 18px; }
.inline-cta span { color: var(--muted); font-size: 15px; }
.related { padding-top: 40px; padding-bottom: 20px; }
.related > h2 { margin-bottom: 22px; font-size: 28px; }
.post-grid.three .post-card-art { height: 120px; }

/* Call to action */
.cta-box { margin: 40px 0 90px; padding: 56px 24px; border: 1px solid rgba(94, 191, 64, 0.35); border-radius: 24px; background: radial-gradient(80% 120% at 50% 0%, rgba(94, 191, 64, 0.2) 0%, rgba(94, 191, 64, 0) 60%), var(--surface); text-align: center; }
.cta-box h2 { font-size: clamp(30px, 4vw, 46px); }
.cta-box p { max-width: 560px; margin: 14px auto 0; color: var(--muted); font-size: 17px; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #050505; }
.footer-grid { display: grid; gap: 36px; padding-top: 64px; padding-bottom: 44px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr 0.8fr; } }
.footer-about img { width: 150px; }
.footer-about p { margin-top: 16px; max-width: 300px; color: var(--muted); font-size: 15px; }
.site-footer h2 { margin-bottom: 16px; font-family: 'Inter', sans-serif; font-size: 16px; letter-spacing: 0; }
.site-footer li { margin-bottom: 10px; color: var(--muted); font-size: 15px; }
.site-footer a:hover { color: var(--brand); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; padding-bottom: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-legal a { text-decoration: underline; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .page-hero { padding: 48px 0 28px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 24px; }
  .post-card-body { padding: 20px; }
  .cta-box { padding: 40px 20px; margin-bottom: 64px; }
  .inline-cta .btn { width: 100%; }
}
