/* ==========================================================================
   HomePCRepair.co.uk — Design System
   Modern tech-blue, mobile-first, no build step required.
   ========================================================================== */

:root {
  --blue-900: #0a1f3d;
  --blue-800: #0f2c54;
  --blue-700: #14396b;
  --blue-600: #1a4d8f;
  --blue-500: #2166b8;
  --blue-400: #3b82d6;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --amber-500: #f59e0b;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-100: #eef2f7;
  --ink-050: #f6f8fb;
  --white: #ffffff;
  --danger: #dc2626;
  --success: #16a34a;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Sora", var(--font-sans);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 61, 0.06), 0 1px 3px rgba(15, 31, 61, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 31, 61, 0.08), 0 2px 4px rgba(15, 31, 61, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 31, 61, 0.12), 0 4px 8px rgba(15, 31, 61, 0.06);
  --max-width: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--blue-900); line-height: 1.25; margin: 0 0 0.6em; font-weight: 700; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.4em; }
li { margin-bottom: 0.4em; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--blue-900); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.98rem; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal-500); color: #fff; }
.btn-primary:hover { background: var(--teal-400); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-ghost { background: var(--ink-100); color: var(--blue-800); }
.btn-ghost:hover { background: var(--ink-300); color: var(--blue-900); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--ink-100); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; max-width: var(--max-width); margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--blue-900); }
.logo .logo-mark { width: 36px; height: 36px; border-radius: 9px; background: linear-gradient(135deg, var(--blue-600), var(--teal-500)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.15rem; flex-shrink: 0; }
.logo:hover { text-decoration: none; color: var(--blue-900); }
.logo .logo-domain { color: var(--ink-500); font-weight: 500; font-size: 0.75rem; display: block; }

.main-nav { display: none; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a, .nav-top-btn { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.94rem; color: var(--ink-700); background: none; border: none; cursor: pointer; font-family: var(--font-sans); }
.main-nav > ul > li > a:hover, .nav-top-btn:hover, .nav-top-btn[aria-expanded="true"] { background: var(--ink-050); color: var(--blue-700); text-decoration: none; }
.chev { transition: transform .15s ease; }
.nav-top-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.mega-menu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid var(--ink-100); box-shadow: var(--shadow-lg); border-radius: var(--radius-md); padding: 18px; min-width: 300px; z-index: 50; }
.mega-menu.is-open { display: block; }
.mega-menu a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink-700); font-size: 0.92rem; font-weight: 500; }
.mega-menu a:hover { background: var(--ink-050); color: var(--blue-700); text-decoration: none; }
.mega-menu .mega-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); padding: 6px 10px 2px; font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.search-toggle, .menu-toggle { background: var(--ink-050); border: none; width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--blue-800); }
.search-toggle:hover, .menu-toggle:hover { background: var(--ink-100); }

.search-panel { display: none; border-top: 1px solid var(--ink-100); background: var(--ink-050); }
.search-panel.is-open { display: block; }
.search-panel .container { padding: 16px 20px; }
.search-box { position: relative; max-width: 640px; margin: 0 auto; }
.search-box input { width: 100%; padding: 12px 44px 12px 16px; border-radius: var(--radius-md); border: 1.5px solid var(--ink-300); font-size: 1rem; font-family: var(--font-sans); }
.search-box input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(33,102,184,0.15); }
.search-results { max-width: 640px; margin: 8px auto 0; background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-md); overflow: hidden; }
.search-results:empty { display: none; }
.search-result-item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--ink-100); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item .sr-title { font-weight: 600; color: var(--blue-800); display: block; }
.search-result-item .sr-path { font-size: 0.8rem; color: var(--ink-500); }
.search-no-results { padding: 14px 16px; color: var(--ink-500); font-size: 0.92rem; }

/* Mobile nav drawer */
.mobile-nav { display: block; position: fixed; inset: 0; background: rgba(10,31,61,0.5); z-index: 150; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.mobile-nav.is-open { opacity: 1; pointer-events: auto; }
.mobile-nav-panel { position: absolute; top: 0; right: 0; width: min(340px, 88vw); height: 100%; background: #fff; padding: 18px; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; }
.mobile-nav.is-open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-close { background: var(--ink-050); border: none; width: 38px; height: 38px; border-radius: var(--radius-sm); cursor: pointer; float: right; }
.mobile-nav h3 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); margin: 18px 0 8px; clear: both; }
.mobile-nav details { border-bottom: 1px solid var(--ink-100); }
.mobile-nav summary { padding: 12px 4px; font-weight: 700; color: var(--blue-900); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav details a { display: block; padding: 8px 12px; color: var(--ink-700); font-size: 0.94rem; }
.mobile-nav-panel > a.top-link { display: block; padding: 12px 4px; font-weight: 700; color: var(--blue-900); border-bottom: 1px solid var(--ink-100); }

@media (min-width: 960px) {
  .main-nav { display: block; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { background: radial-gradient(circle at 15% 20%, var(--blue-700), var(--blue-900) 60%); color: #fff; padding: 64px 0 76px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(20,184,166,0.35), transparent 70%); }
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.eyebrow { display: inline-block; background: rgba(255,255,255,0.12); color: var(--teal-400); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 0.45em; }
.hero p.lead { color: rgba(255,255,255,0.86); font-size: 1.15rem; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 44px; position: relative; z-index: 1; }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: #fff; }
.hero-stat span { color: rgba(255,255,255,0.75); font-size: 0.86rem; }

.page-hero { background: linear-gradient(135deg, var(--blue-800), var(--blue-600)); color: #fff; padding: 46px 0 50px; }
.page-hero .emoji { font-size: 2.2rem; }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.page-hero p { color: rgba(255,255,255,0.86); max-width: 68ch; font-size: 1.05rem; margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 14px 0; background: var(--ink-050); border-bottom: 1px solid var(--ink-100); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 0.85rem; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; color: var(--ink-500); }
.breadcrumbs a { color: var(--ink-700); font-weight: 500; }
.breadcrumbs li[aria-current] { color: var(--ink-500); }

/* ---------- Sections / Grids ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--ink-050); }
.section-head { max-width: 680px; margin-bottom: 34px; }
.section-head .kicker { color: var(--teal-500); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.section-head h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-top: 6px; }
.section-head p { color: var(--ink-500); margin-bottom: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.section-card { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); transition: box-shadow .18s ease, transform .18s ease; display: flex; flex-direction: column; height: 100%; }
.section-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; }
.section-card .card-emoji { font-size: 1.8rem; margin-bottom: 10px; }
.section-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.section-card p { color: var(--ink-500); font-size: 0.94rem; margin-bottom: 14px; flex-grow: 1; }
.section-card .card-meta { font-size: 0.8rem; color: var(--teal-500); font-weight: 700; }

.subsection-card { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); }
.subsection-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.subsection-card h3 a { color: var(--blue-900); }
.subsection-card p { color: var(--ink-500); font-size: 0.9rem; margin-bottom: 12px; }
.subsection-card ul { list-style: none; padding: 0; margin: 0; }
.subsection-card li { margin-bottom: 6px; padding-left: 18px; position: relative; font-size: 0.92rem; }
.subsection-card li::before { content: "→"; position: absolute; left: 0; color: var(--teal-500); font-weight: 700; }

.article-card { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .18s ease, transform .18s ease; display: flex; flex-direction: column; }
.article-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; }
.article-card .thumb { height: 8px; background: linear-gradient(90deg, var(--blue-500), var(--teal-500)); }
.article-card .card-body { padding: 22px; }
.article-card .tag { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--blue-600); background: var(--ink-050); padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
.article-card h3 { font-size: 1.08rem; margin-bottom: 8px; color: var(--blue-900); }
.article-card p { color: var(--ink-500); font-size: 0.9rem; margin-bottom: 12px; }
.article-card .card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--ink-500); border-top: 1px solid var(--ink-100); padding-top: 10px; margin-top: auto; }

/* ---------- Article page ---------- */
.article-header { padding: 40px 0 18px; }
.article-header .tag { display: inline-block; font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--white); background: var(--blue-600); padding: 5px 12px; border-radius: 99px; margin-bottom: 14px; }
.article-header h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.article-header .article-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--ink-500); font-size: 0.9rem; margin-top: 14px; }
.article-header .article-meta span { display: flex; align-items: center; gap: 6px; }

.article-layout { display: grid; grid-template-columns: 1fr; gap: 40px; padding-bottom: 60px; }
@media (min-width: 960px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
}

.article-body h2 { font-size: 1.45rem; margin-top: 1.6em; padding-top: 0.2em; scroll-margin-top: 90px; }
.article-body h3 { font-size: 1.15rem; margin-top: 1.3em; scroll-margin-top: 90px; }
.article-body p { color: var(--ink-700); font-size: 1.03rem; }
.article-body ul, .article-body ol { color: var(--ink-700); }
.article-body li { padding-left: 2px; }
.article-body strong { color: var(--ink-900); }
.article-body blockquote { margin: 1.6em 0; padding: 16px 20px; background: #eefcf9; border-left: 4px solid var(--teal-500); border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--blue-900); }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body code { background: var(--ink-100); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.article-body a { text-decoration: underline; text-decoration-color: var(--ink-300); }
.article-body hr { border: none; border-top: 1px solid var(--ink-100); margin: 2em 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.article-body th, .article-body td { border: 1px solid var(--ink-100); padding: 10px 12px; text-align: left; font-size: 0.94rem; }
.article-body th { background: var(--ink-050); }

.sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 20px; }
.toc-box, .side-box { background: var(--ink-050); border: 1px solid var(--ink-100); border-radius: var(--radius-md); padding: 18px; }
.toc-box h4, .side-box h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); margin-bottom: 10px; }
.toc-box ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc-box li { counter-increment: toc; margin-bottom: 8px; font-size: 0.9rem; }
.toc-box a { color: var(--ink-700); }
.toc-box a:hover { color: var(--blue-600); }
.cta-box { background: linear-gradient(135deg, var(--blue-700), var(--blue-900)); color: #fff; border-radius: var(--radius-md); padding: 20px; }
.cta-box h4 { color: #fff; opacity: 0.9; }
.cta-box p { color: rgba(255,255,255,0.85); font-size: 0.9rem; }

.related-section { background: var(--ink-050); padding: 50px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: rgba(255,255,255,0.75); padding: 52px 0 24px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,0.72); font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin-bottom: 10px; }
.footer-about { font-size: 0.9rem; max-width: 34ch; color: rgba(255,255,255,0.65); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.82rem; color: rgba(255,255,255,0.55); }
.footer-bottom a { color: rgba(255,255,255,0.65); }

/* ---------- Contact form ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr; gap: 40px; max-width: 980px; }
@media (min-width: 860px) { .contact-layout { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }
.contact-form-wrap { background: var(--ink-050); border: 1px solid var(--ink-100); border-radius: var(--radius-lg); padding: 28px; }
.contact-form .form-row { margin-bottom: 18px; }
.contact-form label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--blue-900); margin-bottom: 6px; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--ink-300);
  font-family: var(--font-sans); font-size: 0.98rem; background: #fff; color: var(--ink-900);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(33,102,184,0.15); }
.contact-form textarea { resize: vertical; min-height: 120px; }
/* Honeypot: visually hidden but still present in the DOM and reachable by simple bots that
   don't render CSS. Real users never see or interact with it. */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-size: 0.92rem; min-height: 1.2em; }
.form-status.success { color: var(--success); font-weight: 600; }
.form-status.error { color: var(--danger); font-weight: 600; }

/* ---------- Misc pages ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose p { color: var(--ink-700); }

.error-page { text-align: center; padding: 100px 20px; }
.error-page .code { font-family: var(--font-display); font-size: 5rem; color: var(--blue-600); font-weight: 800; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
