/* =====================================================================
   Company Restoration UK — Premium theme (2026 redesign)
   Design tokens: cream #E0ECF0 · teal #023A51/#023A51 · gold #f5b716 · red #ec302a
   Fonts: Plus Jakarta Sans throughout (matches the original site typography)
   Used by: index.php, blog.php, blog-post.php (new-design pages only).
   ===================================================================== */

:root {
  /* Brand palette */
  --cream: #ffffff;      /* page base (white) */
  --paper: #ffffff;      /* cards */
  --teal: #023A51;       /* primary navy — headings, nav, dark sections */
  --teal-deep: #023A51;  /* darkest sections */
  --ink: #023A51;        /* headings / card titles */
  --muted: #59667D;      /* secondary text */
  --muted-2: #59667D;    /* muted labels */
  --gold: #F5B716;       /* hover / accent */
  --gold-deep: #C08A06;  /* small labels on light */
  --red: #EC302A;        /* CTA / highlights */
  --red-hover: #F5B716;  /* link/CTA hover = gold */
  --light: #E0ECF0;      /* light section bg */
  --alt: #E8EBEF;        /* alternate section / card bg */
  --line: #DBE4EA;       /* borders */
  --line-2: #DBE4EA;
  --body: #000000;       /* paragraph/body text */

  /* ---- Legacy-variable overrides ----
     style.css/custom.css (loaded before this file on non-marketing pages) use
     these dark-theme variables. Re-pointing them to light values flips every
     legacy page (cart, checkout, order, calculators, legal) to the light
     brand scheme without touching their markup. */
  --primary-color: #EC302A;
  --primary-hover: #F5B716;
  --dark-bg: #ffffff;
  --dark-surface: #E8EBEF;
  --text-primary: #023A51;
  --text-secondary: #59667D;
  --glass-bg: #ffffff;
  --glass-border: #DBE4EA;
  --glass-blur: blur(0px);
}

/* Remove the old dark-blue page backdrop everywhere (theme.css loads last). */
html { background: #ffffff; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 { line-height: 1.08; font-weight: 600; }
.serif { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 600; letter-spacing: -.02em; }
.mono  { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-hover); }
img { max-width: 100%; }
::selection { background: var(--gold); color: var(--teal); }

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
}

/* Keyframes */
@keyframes crk-ring { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes crk-marq { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes crk-bob  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Homepage responsive helpers (data-attribute hooks used by inline markup) */
@media (max-width: 1120px) {
  [data-mainnav]    { display: none !important; }
  [data-burger]     { display: inline-flex !important; }
  [data-headerphone]{ display: none !important; }
  [data-hero-grid]  { grid-template-columns: 1fr !important; gap: 44px !important; }
  [data-orbit]      { display: none !important; }
}
@media (max-width: 1040px) {
  [data-stats-grid] { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  [data-split-2]    { grid-template-columns: 1fr !important; }
  [data-split-3]    { grid-template-columns: 1fr 1fr !important; }
  [data-split-4]    { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}
@media (max-width: 760px) {
  [data-split-3], [data-split-4] { grid-template-columns: 1fr !important; }
  [data-h1] { font-size: 42px !important; }
  [data-sec-h2] { font-size: 30px !important; }
  [data-contact-grid] { grid-template-columns: 1fr !important; }
  [data-contact-sticky] { position: static !important; }
  [data-footer-grid] { grid-template-columns: 1fr 1fr !important; gap: 34px !important; }
}
@media (max-width: 900px) {
  [data-ann-tag] { display: none !important; }
}
@media (max-width: 680px) {
  [data-ann-email] { display: none !important; }
}
@media (max-width: 560px) {
  [data-stats-grid] { grid-template-columns: minmax(0,1fr) !important; }
  [data-footer-grid] { grid-template-columns: 1fr !important; }
  [data-hero-form] { padding: 24px !important; }
  [data-sec] { padding-left: 20px !important; padding-right: 20px !important; }
}

/* =====================================================================
   Shared page shell (blog + single post + legal-style banners)
   ===================================================================== */
.crk-container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 560px) { .crk-container { padding: 0 20px; } }

/* Sub-page hero band (blog list / post / category) */
.page-hero {
  position: relative;
  background: var(--teal-deep);
  padding: 74px 32px 66px;
  overflow: hidden;
  border-bottom: 1px solid rgba(245,183,22,.18);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 84% 16%, rgba(245,183,22,.16), transparent 46%);
  pointer-events: none;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 25% 40%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 25% 40%, #000, transparent 72%);
  pointer-events: none;
}
.page-hero-inner { position: relative; max-width: 1180px; margin: 0 auto; }
.page-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.page-hero .eyebrow span { width: 26px; height: 1px; background: var(--gold); }
.page-hero h1 {
  font-size: 50px; color: #fff; font-weight: 500; line-height: 1.04; max-width: 780px;
}
.page-hero h1 em { font-style: italic; color: var(--gold); }
.page-hero p { color: rgba(255,255,255,.74); font-size: 17px; line-height: 1.6; max-width: 620px; margin-top: 16px; }
.page-hero .crumbs { margin-top: 20px; font-size: 13px; color: rgba(255,255,255,.6); }
.page-hero .crumbs a { color: rgba(255,255,255,.85); }
.page-hero .crumbs a:hover { color: var(--gold); }
@media (max-width: 640px) { .page-hero h1 { font-size: 34px; } .page-hero { padding: 54px 20px 46px; } }

.crk-page-container { max-width: 1180px; margin: 0 auto; padding: 64px 32px 84px; }
@media (max-width: 560px) { .crk-page-container { padding: 44px 20px 60px; } }

/* =====================================================================
   Blog listing
   ===================================================================== */
.blog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px; flex-wrap: wrap; margin-bottom: 40px;
}
.blog-filter-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.blog-filter-pill {
  display: inline-flex; align-items: center;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  padding: 9px 17px; border-radius: 30px;
  background: var(--paper); border: 1px solid var(--line);
  transition: all .2s ease;
}
.blog-filter-pill:hover { border-color: #DBE4EA; color: var(--teal); }
.blog-filter-pill.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }
.blog-search-form { display: flex; align-items: center; gap: 0; }
.blog-search-form input {
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-right: none;
  border-radius: 10px 0 0 10px; padding: 12px 16px; width: 230px; outline: none;
}
.blog-search-form input:focus { border-color: var(--gold); }
.blog-search-form button {
  font-family: inherit; cursor: pointer; border: 1px solid var(--teal);
  background: var(--teal); color: #fff; padding: 12px 16px;
  border-radius: 0 10px 10px 0; font-size: 14px;
}
.blog-search-form button:hover { background: var(--red); border-color: var(--red); }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 26px 50px rgba(2,18,24,.1); border-color: #DBE4EA; }
.blog-card > a { display: block; overflow: hidden; }
.blog-card-img { width: 100%; height: 210px; object-fit: cover; display: block; transition: transform .5s ease; }
.blog-card:hover .blog-card-img { transform: scale(1.05); }
.blog-card-img-fallback {
  display: flex; align-items: center; justify-content: center;
  height: 210px; background: linear-gradient(135deg, #023A51, #023A51); color: var(--gold); font-size: 42px;
}
.blog-card-body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex-grow: 1; }
.blog-card-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted-2); margin-bottom: 13px;
}
.blog-card-meta i { color: var(--gold-deep); margin-right: 5px; }
.blog-card-cat {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 500; color: var(--red); background: rgba(236,48,42,.08);
  padding: 4px 10px; border-radius: 20px;
}
.blog-card-cat:hover { color: #fff; background: var(--red); }
.blog-card-title { font-size: 20px; line-height: 1.28; margin-bottom: 12px; font-weight: 700; }
.blog-card-title a { color: var(--ink); }
.blog-card-title a:hover { color: var(--red); }
.blog-card-excerpt { font-size: 14.5px; color: var(--muted); line-height: 1.62; margin-bottom: 22px; flex-grow: 1; }
.blog-read-more {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 700; color: var(--red);
}
.blog-read-more i { transition: transform .2s ease; font-size: 12px; }
.blog-read-more:hover i { transform: translateX(4px); }

.blog-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.blog-empty p { margin-bottom: 14px; font-size: 16px; }

/* Pagination */
.blog-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 56px; }
.blog-pagination a, .blog-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: 11px;
  font-size: 14.5px; font-weight: 700; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
}
.blog-pagination a:hover { border-color: var(--teal); color: var(--teal); }
.blog-pagination .is-current { background: var(--teal); border-color: var(--teal); color: #fff; }

/* =====================================================================
   Single post
   ===================================================================== */
.post-shell { max-width: 800px; margin: 0 auto; padding: 60px 32px 20px; }
@media (max-width: 560px) { .post-shell { padding: 40px 20px 12px; } }

.post-meta-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: var(--muted-2); margin-bottom: 26px;
}
.post-meta-row i { color: var(--gold-deep); margin-right: 6px; }
.post-featured-img {
  width: 100%; max-height: 460px; object-fit: cover;
  border-radius: 20px; margin-bottom: 40px; box-shadow: 0 26px 52px rgba(2,18,24,.14);
}
.post-tag-chip {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: 11px; letter-spacing: .04em;
  font-weight: 500; color: var(--teal); background: rgba(2,58,81,.06);
  padding: 5px 12px; border-radius: 20px;
}
.post-tag-chip:hover { background: var(--teal); color: #fff; }

/* Prose */
.post-content { font-size: 17.5px; line-height: 1.78; color: #111111; }
.post-content > * + * { margin-top: 1.35em; }
.post-content h2 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 600; font-size: 30px; color: var(--teal); line-height: 1.18; margin-top: 1.9em; }
.post-content h3 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 600; font-size: 23px; color: var(--teal); margin-top: 1.6em; }
.post-content h4 { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 1.4em; }
.post-content p { color: #111111; }
.post-content a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content li { margin-top: .5em; }
.post-content li::marker { color: var(--gold-deep); }
.post-content blockquote {
  border-left: 4px solid var(--gold); background: var(--paper);
  padding: 20px 26px; border-radius: 0 12px 12px 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-style: italic; font-size: 20px; color: var(--teal);
}
.post-content img { border-radius: 14px; }
.post-content hr { border: none; border-top: 1px solid var(--line); margin: 2.2em 0; }
.post-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: #E8EBEF; padding: 2px 6px; border-radius: 6px; }
.post-content pre { background: var(--teal-deep); color: #e8eef0; padding: 20px; border-radius: 12px; overflow-x: auto; }
.post-content pre code { background: none; color: inherit; padding: 0; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.post-content th { background: var(--paper); font-weight: 700; }

.post-share {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  margin-top: 40px; padding: 20px 24px; background: var(--light); border-radius: 14px;
}
.post-share-label { font-size: 14.5px; font-weight: 700; color: var(--teal); }
.post-share-links { display: flex; gap: 10px; }
.post-share-links a {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--teal); border: 1px solid var(--line); font-size: 15px;
  transition: all .2s ease;
}
.post-share-links a:hover { background: var(--red); color: #fff; border-color: var(--red); transform: translateY(-3px); }

.post-tags-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.post-tags-row > span { color: var(--muted-2); font-size: 14px; }

.post-cta-box {
  margin-top: 44px; background: var(--teal-deep); border-radius: 20px; padding: 42px 40px;
  text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 26px 52px rgba(2,18,24,.24);
}
.post-cta-box::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(245,183,22,.16), transparent 46%);
}
.post-cta-box h3 { position: relative; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 500; font-size: 27px; color: #fff; margin-bottom: 12px; }
.post-cta-box p { position: relative; color: rgba(255,255,255,.78); font-size: 16px; line-height: 1.6; max-width: 520px; margin: 0 auto 26px; }
.btn-card {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  background: var(--red); color: #fff; padding: 15px 30px; border-radius: 11px; font-weight: 700; font-size: 15.5px;
  box-shadow: 0 12px 30px rgba(236,48,42,.34);
}
.btn-card:hover { background: var(--gold); color: var(--teal); }

.related-posts { max-width: 1180px; margin: 0 auto; padding: 20px 32px 84px; }
.related-posts > h2 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 500; font-size: 30px; color: var(--teal); margin-bottom: 30px; text-align: center; }
@media (max-width: 560px) { .related-posts { padding: 20px 20px 60px; } }

/* =====================================================================
   Original-header integration (new-design pages only, .crk-theme)
   The legacy .site-header is transparent-over-dark; on the cream layout
   it needs a solid, in-flow bar so nav stays readable on every section.
   ===================================================================== */
.crk-theme .site-header {
  position: sticky;
  top: 0;
  padding: 15px 4%;
  background: rgba(4, 38, 47, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 183, 22, .18);
  box-shadow: 0 6px 24px rgba(2, 18, 24, .22);
}
.crk-theme .nav-menu li a { color: rgba(255,255,255,.82); }
.crk-theme .nav-menu li a:hover,
.crk-theme .nav-menu li a.active { color: var(--gold); text-shadow: none; }
.crk-theme .phone-pill-btn { color: #fff; }
/* keep content clear of any anchor jumps landing under the sticky bar */
.crk-theme section[id] { scroll-margin-top: 90px; }

/* =====================================================================
   Author card (single post)
   ===================================================================== */
.post-author {
  display: flex; align-items: flex-start; gap: 22px;
  margin-top: 46px; padding: 30px 30px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
}
.post-author-photo {
  flex: none; width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover; border: 3px solid #fff; box-shadow: 0 6px 18px rgba(2,18,24,.12);
}
.post-author-avatar {
  flex: none; width: 84px; height: 84px; border-radius: 50%;
  background: var(--teal); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; letter-spacing: .02em;
}
.post-author-title { font-size: 20px; font-weight: 700; color: var(--teal); margin-bottom: 10px; }
.post-author-title span { color: var(--muted); }
.post-author-body p { font-size: 15.5px; color: var(--muted); line-height: 1.7; }
@media (max-width: 560px) { .post-author { flex-direction: column; gap: 14px; } }

/* =====================================================================
   Comments (single post)
   ===================================================================== */
.post-comments { margin-top: 50px; }
.comments-title { font-size: 24px; font-weight: 700; color: var(--teal); margin-bottom: 24px; }
.comment-flash {
  padding: 14px 18px; border-radius: 12px; font-size: 14.5px; font-weight: 600; margin-bottom: 26px;
}
.comment-flash-success { background: rgba(37,160,90,.1); color: #1c7a44; border: 1px solid rgba(37,160,90,.3); }
.comment-flash-error   { background: rgba(236,48,42,.08); color: #c02620; border: 1px solid rgba(236,48,42,.25); }

.comment-list { list-style: none; display: flex; flex-direction: column; gap: 18px; margin-bottom: 44px; }
.comment-item { display: flex; gap: 16px; padding: 22px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.comment-avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--teal); color: var(--gold); font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 7px; }
.comment-name { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.comment-name a { color: var(--ink); }
.comment-name a:hover { color: var(--red); }
.comment-date { font-size: 12.5px; color: var(--muted-2); }
.comment-body p { font-size: 15px; color: #111111; line-height: 1.68; }

/* Comment form */
.comment-form-wrap { margin-top: 8px; }
.comment-form textarea,
.comment-form input {
  font-family: inherit; width: 100%; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  font-size: 16px; color: var(--ink); outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.comment-form textarea { resize: vertical; margin-bottom: 18px; min-height: 150px; }
.comment-form textarea::placeholder,
.comment-form input::placeholder { color: var(--muted-2); }
.comment-form textarea:focus,
.comment-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,183,22,.16); }
.comment-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
@media (max-width: 640px) { .comment-fields { grid-template-columns: 1fr; } }
.comment-save { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); margin-bottom: 22px; }
.comment-save input { width: auto; }
.btn-comment {
  font-family: inherit; cursor: pointer; border: none;
  background: var(--red); color: #fff; font-weight: 700; font-size: 16px;
  padding: 16px 40px; border-radius: 40px; box-shadow: 0 12px 30px rgba(236,48,42,.3);
  transition: background .2s ease;
}
.btn-comment:hover { background: var(--teal); }

/* =====================================================================
   Legacy pages (cart, checkout, order, calculators, legal) — light theme
   The legacy CSS is var-driven (remapped above); these rules fix the
   image hero overlay and page spacing so everything is clearly visible.
   ===================================================================== */
.legal-hero-banner {
  position: relative;
  background-color: #023A51;
  background-position: center;
  background-size: cover;
  border-bottom: 4px solid var(--red);
}
.legal-hero-banner::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,58,81,.86) 0%, rgba(2,42,58,.82) 100%);
  pointer-events: none;
}
.legal-hero-banner > * { position: relative; z-index: 1; }
.legal-hero-banner h1 { color: #fff; }
.legal-badge { color: #F5B716 !important; }
.legal-meta-timeline { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }

/* Light content base for legacy shells */
.legal-document-viewport { background: #fff; color: #111; }
.container { max-width: 1200px; margin: 0 auto; padding: 52px 32px 84px; }
