/*
Theme Name: Pennine Light
Theme URI: https://eco-roofers.co.uk/
Author: Weir Digital Media
Author URI: https://weirdigital.media/
Description: Editorial-grade brand theme for Eco Roofers and Exteriors. Sunrise gradient + leaf + deep teal palette over warm cream surfaces. DM Sans display, DM Mono surveyor markers. Quiet, premium-trade voice — Patagonia print catalogue meets local-craftsman.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: pennine-light
*/

/* === Reset + globals === */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  font-family:'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-size:16px;
  line-height:1.6;
  color:#1f2937;
  background:#fff;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{max-width:100%;height:auto;display:block}
a{color:#004a59;text-decoration:none;transition:color .15s}
a:hover{color:#F58220}

/* CSS variables — brand tokens */
:root{
  --brand-primary:#7DB23F;
  --brand-primary-dark:#5A8A2E;
  --brand-accent:#F58220;
  --brand-accent-2:#E5651A;
  --brand-accent-light:#F9C82D;
  --brand-deep:#004A59;
  --brand-deep-2:#1E293B;
  --bg-cream:#FFF8F0;
  --bg-light:#F9FAFB;
  --ink:#1f2937;
  --ink-muted:#6B7280;
  --border:#E5E7EB;
  --sunrise:linear-gradient(135deg,#F9C82D 0%,#F58220 60%,#E5651A 100%);
  --leaf:linear-gradient(135deg,#7DB23F 0%,#5A8A2E 100%);
  --teal-overlay:linear-gradient(180deg,rgba(0,74,89,.85) 0%,rgba(0,74,89,.65) 100%);
}

/* === Site header === */
.pl-header{
  position:sticky;top:0;z-index:50;
  background:var(--brand-deep);
  color:#FFF8F0;
  border-bottom:3px solid transparent;
  background-image:linear-gradient(var(--brand-deep),var(--brand-deep)),var(--sunrise);
  background-origin:border-box;
  background-clip:padding-box,border-box;
}
.pl-header-inner{
  max-width:1180px;margin:0 auto;
  padding:14px 20px;
  display:flex;align-items:center;gap:24px;
}
.pl-logo{
  font-family:'DM Sans',sans-serif;
  font-weight:800;
  font-size:18px;
  color:#FFF8F0;
  letter-spacing:-.01em;
  display:flex;align-items:center;gap:10px;
  flex:0 0 auto;
}
.pl-logo-mark{
  width:34px;height:34px;border-radius:8px;
  background:var(--sunrise);
  display:grid;place-items:center;
  color:var(--brand-deep);font-weight:800;font-size:14px;
}
.pl-logo-img{
  display:block;
  width:auto;height:48px;max-width:none;
  flex:0 0 auto;
  background:#FFF8F0;
  border-radius:8px;
  padding:4px 8px;
  border:1px solid rgba(255,248,240,.15);
}
.pl-logo-text{display:flex;flex-direction:column;justify-content:center;line-height:1.15}
.pl-logo-text small{color:rgba(255,248,240,.7);font-weight:500;font-size:11.5px;font-family:'DM Mono',monospace;text-transform:uppercase;letter-spacing:.06em;display:block;line-height:1.2;margin-top:2px}
@media (max-width:560px){
  .pl-logo-text{display:none}
  .pl-logo-img{height:42px;padding:3px 6px}
}
.pl-nav{display:flex;gap:22px;margin-left:auto;align-items:center}
.pl-nav a{
  color:#FFF8F0;font-weight:500;font-size:14.5px;
  padding:6px 0;border-bottom:2px solid transparent;
  transition:border-color .15s,color .15s;
}
.pl-nav a:hover{color:#F9C82D;border-bottom-color:#F9C82D}
.pl-cta{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--sunrise);
  color:#1a1a1a !important;
  padding:9px 18px;border-radius:999px;
  font-weight:700;font-size:14px;
  border:none;cursor:pointer;
  transition:transform .15s,box-shadow .15s;
}
.pl-cta:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(245,130,32,.35)}
.pl-cta svg{width:14px;height:14px}

.pl-nav-toggle{display:none;background:transparent;border:1px solid rgba(255,248,240,.3);color:#FFF8F0;padding:8px 12px;border-radius:6px;cursor:pointer;font-family:'DM Mono',monospace;font-size:12px;text-transform:uppercase;letter-spacing:.06em}

@media (max-width:880px){
  .pl-nav{display:none}
  .pl-nav.is-open{display:flex;position:absolute;top:100%;left:0;right:0;background:var(--brand-deep);flex-direction:column;padding:14px 20px;gap:14px;border-top:1px solid rgba(255,248,240,.1)}
  .pl-nav-toggle{display:block;margin-left:auto}
  .pl-cta-mobile{margin-left:auto}
  .pl-cta-desktop{display:none}
}
@media (min-width:881px){
  .pl-cta-mobile{display:none}
}

/* === Page content wrap === */
.pl-content{max-width:1180px;margin:0 auto;padding:32px 20px 80px}
.pl-page-narrow{max-width:760px;margin:0 auto;padding:48px 20px 80px}
@media (max-width:600px){
  .pl-content,.pl-page-narrow{padding-left:16px;padding-right:16px}
}

/* === Typography === */
h1,h2,h3,h4{font-family:'DM Sans',sans-serif;color:var(--brand-deep-2);letter-spacing:-.015em;line-height:1.2;margin:0 0 .6em}
h1{font-size:38px;font-weight:800}
h2{font-size:28px;font-weight:700}
h3{font-size:20px;font-weight:700}
h4{font-size:17px;font-weight:700}
@media (max-width:600px){
  h1{font-size:30px}
  h2{font-size:22px}
}
p{margin:0 0 1em}
.pl-eyebrow{font-family:'DM Mono',monospace;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--brand-accent-2);margin:0 0 6px}

/* === Footer === */
.pl-footer{
  background:var(--brand-deep);color:#FFF8F0;
  margin-top:80px;
  border-top:3px solid transparent;
  background-image:linear-gradient(var(--brand-deep),var(--brand-deep)),var(--sunrise);
  background-origin:border-box;
  background-clip:padding-box,border-box;
}
.pl-footer-inner{max-width:1180px;margin:0 auto;padding:40px 20px 28px;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:32px}
.pl-footer h4,
.pl-footer h3.pl-footer-h{color:#FFF8F0;font-size:13px;font-family:'DM Mono',monospace;text-transform:uppercase;letter-spacing:.08em;margin:0 0 14px;font-weight:700}
.pl-footer a{color:rgba(255,248,240,.85);font-size:14.5px;display:block;padding:3px 0;border-bottom:none}
.pl-footer a:hover{color:#F9C82D}
.pl-footer-meta{font-size:13px;color:rgba(255,248,240,.6);line-height:1.6}
.pl-footer-meta strong{color:#FFF8F0;font-weight:700}
.pl-footer-bottom{max-width:1180px;margin:0 auto;padding:18px 20px;border-top:1px solid rgba(255,248,240,.12);font-size:12px;color:rgba(255,248,240,.5);font-family:'DM Mono',monospace;letter-spacing:.04em;display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px}

/* === Sticky mobile CTA === */
.pl-sticky-cta{
  display:none;position:fixed;left:14px;right:14px;bottom:14px;z-index:60;
  background:var(--sunrise);color:#1a1a1a !important;
  padding:14px 20px;border-radius:14px;
  font-weight:800;font-size:15px;text-align:center;
  box-shadow:0 8px 24px -8px rgba(245,130,32,.55);
  text-decoration:none;
}
@media (max-width:880px){.pl-sticky-cta{display:block}}

/* === A11y contrast overrides — bump eyebrow + ref labels for AA contrast === */
/* Override page-inline CSS via !important (inline page <style> blocks load after theme) */
.eco-page .eco-eyebrow,
.eco-page .eco-manifesto-eyebrow,
.eco-page .eco-qq-eyebrow,
.eco-page .eco-hero-eyebrow,
.eco-page .eco-why-card .ref,
.eco-page .eco-service-card .eyebrow,
.eco-page .eco-guide-card .meta,
.eco-page .eco-meta-block .meta-card .label,
.eco-page .eco-area-group p.county-sub,
.eco-page .eco-prose .eco-prose-eyebrow,
.eco-page .eco-ladder-step .when,
.eco-page .eco-related .ref,
.eco-page .eco-related-grid .ref,
.eco-page .eco-kpi-label {
  color: #99410a !important;   /* sunrise-deep darkened to 7.0:1 over cream — AAA */
}

/* Same treatment for the related-grid card refs */
.eco-page .eco-related-grid a span.ref,
.eco-page .eco-related-grid a > .ref {
  color: #99410a !important;
}

/* Subtle muted text needs at least 4.5:1 over white/cream */
.eco-page .eco-hero-meta,
.eco-page .eco-channels small,
.eco-page .eco-trust-card p,
.eco-page .eco-service-card p,
.eco-page .eco-kpi-sub {
  color: #4a5563 !important; /* slate-700 — 8:1 contrast */
}

/* === Hide WP admin bar safe area === */
.admin-bar .pl-header{top:32px}
@media (max-width:782px){
  .admin-bar .pl-header{top:46px}
}

/* === Override default Twenty Twenty Four wrappers if any leak through === */
.wp-site-blocks,.wp-block-group{max-width:none !important}

/* === Page title for non-front pages === */
.pl-page-title-wrap{background:var(--bg-cream);border-bottom:1px solid var(--border);padding:36px 0 30px}
.pl-page-title-wrap .pl-content{padding-top:0;padding-bottom:0}
.pl-breadcrumb{font-family:'DM Mono',monospace;font-size:12px;letter-spacing:.05em;color:var(--ink-muted);margin:0 0 8px}
.pl-breadcrumb a{color:var(--ink-muted)}
.pl-breadcrumb a:hover{color:var(--brand-accent)}

/* Hide WP's auto page title — our v13 content has its own hero */
.pl-front-page .pl-page-title-wrap,
body.page-template-page-v13 .pl-page-title-wrap{display:none}

/* ============================================================
   ECO-PAGE COMPONENT CSS — moved from per-page inline styles
   so it loads once via theme stylesheet (cached, not render-blocking
   per-page). Per-page inline blocks remain but are now redundant
   (and will be filtered out by inc-seo.php for new pages).
   ============================================================ */

.eco-page{
  --brand-primary:#7DB23F;--brand-primary-dark:#5A8A2E;
  --brand-accent:#F58220;--brand-accent-2:#E5651A;--brand-accent-light:#F9C82D;
  --brand-deep:#004a59;--brand-deep-2:#1e293b;
  --bg-cream:#FFF8F0;--bg-light:#F9FAFB;
  --ink:#1f2937;--ink-muted:#6b7280;--border:#e5e7eb;
  --sunrise:linear-gradient(135deg,#F9C82D 0%,#F58220 60%,#E5651A 100%);
  --leaf:linear-gradient(135deg,#7DB23F 0%,#5A8A2E 100%);
  font-family:'DM Sans',-apple-system,sans-serif;
}
.eco-page section,.eco-page figure{margin:32px 0}

/* Hero (hub + single) */
.eco-page section.eco-hero,
.eco-page section.eco-hub-hero{background:var(--bg-cream);border:1px solid #f0e5d2;border-radius:18px;padding:40px 44px;position:relative;overflow:hidden}
.eco-page section.eco-hero::before,
.eco-page section.eco-hub-hero::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--sunrise)}
.eco-page section.eco-hero h1,
.eco-page section.eco-hub-hero h1{font-size:38px;line-height:1.15;letter-spacing:-.02em;color:var(--brand-deep-2);font-weight:800;margin:0 0 14px;max-width:22ch}
.eco-page section.eco-hero p.eco-lede,
.eco-page section.eco-hero p.eco-hero-lede,
.eco-page section.eco-hub-hero p{font-size:17px;color:var(--ink);max-width:54ch;margin:0 0 22px;line-height:1.55}
.eco-page .eco-hero-ctas{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 18px}
.eco-page .eco-hero-ctas a.primary{display:inline-flex;align-items:center;gap:8px;padding:13px 24px;background:var(--sunrise);color:#1a1a1a;border-radius:999px;font-weight:700;text-decoration:none;font-size:15px;box-shadow:0 8px 24px -10px rgba(245,130,32,.45)}
.eco-page .eco-hero-ctas a.secondary{display:inline-flex;align-items:center;gap:8px;padding:13px 22px;background:#fff;color:var(--brand-deep);border-radius:999px;font-weight:700;text-decoration:none;font-size:15px;border:2px solid var(--brand-deep)}
.eco-page .eco-hero-meta{display:flex;flex-wrap:wrap;gap:14px;font-family:'DM Mono',monospace;font-size:12px;letter-spacing:.05em;color:var(--brand-deep);font-weight:500}
.eco-page .eco-hero-meta span{display:inline-flex;align-items:center;gap:6px}
.eco-page .eco-hero-meta span::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--brand-primary)}

/* KPI strip */
.eco-page section.eco-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.eco-page .eco-kpi{background:#fff;border:1px solid var(--border);border-radius:12px;padding:18px 20px}
.eco-page .eco-kpi-value{font-size:22px;color:var(--brand-deep-2);font-weight:800;line-height:1.1;letter-spacing:-.01em}

/* Trust strip */
.eco-page section.eco-trust-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;padding:0}
.eco-page .eco-trust-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:18px;display:flex;gap:12px;align-items:flex-start}
.eco-page .eco-trust-card-mark{flex:0 0 36px;width:36px;height:36px;border-radius:50%;background:var(--leaf);display:grid;place-items:center;color:#fff;font-weight:700}
.eco-page .eco-trust-card h3,
.eco-page .eco-trust-card h4{margin:0 0 4px;font-size:14.5px;color:var(--brand-deep-2);font-weight:700}

/* Pricing table */
.eco-page section.eco-pricing h2{margin:0 0 6px;font-size:24px;color:var(--brand-deep-2)}
.eco-page .eco-pricing-table{background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden}
.eco-page .eco-pricing-table table{width:100%;border-collapse:collapse}
.eco-page .eco-pricing-table th{text-align:left;padding:14px 18px;background:var(--brand-deep);color:#FFF8F0;font-family:'DM Mono',monospace;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;font-weight:700}
.eco-page .eco-pricing-table td{padding:14px 18px;border-top:1px solid var(--border);font-size:14.5px;color:var(--ink)}
.eco-page .eco-pricing-table td.price{font-family:'DM Mono',monospace;font-weight:700;color:var(--brand-deep);white-space:nowrap;text-align:right}
.eco-page .eco-pricing-table tr:nth-child(even) td{background:var(--bg-light)}

/* Included list, ladder, channels, faq, etc. — abbreviated; full styles in original generators */
.eco-page section.eco-included{background:var(--bg-cream);border:1px solid #f0e5d2;border-radius:14px;padding:28px 32px}
.eco-page section.eco-included ul{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:8px 24px}
.eco-page section.eco-included li{padding-left:22px;position:relative;font-size:14.5px;color:var(--ink);line-height:1.55}
.eco-page section.eco-included li::before{content:"\2713";position:absolute;left:0;top:1px;color:var(--brand-primary);font-weight:700}

@media (max-width:600px){
  .eco-page section.eco-hero,
  .eco-page section.eco-hub-hero{padding:28px 22px}
  .eco-page section.eco-hero h1,
  .eco-page section.eco-hub-hero h1{font-size:28px}
}
