/*
Theme Name: Lorem Energy Park
Theme URI: https://loremenergypark.example
Author: EDF Power Solutions UK
Description: Custom theme for a new EDF energy project consultation website. Design informed by springwellsolarfarm.co.uk with EDF brand colours (orange #fe5716, navy #10367a), Cabin/Roboto typography, pill buttons and a community-consultation page structure.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: lorem-energy-park
*/

/* ================= Design tokens ================= */
:root {
  --orange: #fe5716;          /* EDF brand orange (sampled from logo) */
  --orange-dark: #d84a0b;     /* hover / text-safe orange */
  --navy: #10367a;            /* EDF brand navy (sampled from logo) */
  --navy-deep: #0a2456;
  --navy-ink: #071a40;
  --green: #1fbf8f;           /* clean-energy accent */
  --stone: #f6f4f0;           /* warm section background */
  --white: #ffffff;
  --text: #1d2433;
  --text-muted: #5b6472;
  --gradient-brand: linear-gradient(120deg, var(--orange), var(--green));
  --font-heading: 'Cabin', 'Trebuchet MS', sans-serif;
  --font-body: 'Roboto', 'Helvetica Neue', sans-serif;
  --radius-pill: 200px;
  --radius-card: 20px;
  --shadow-card: 0 14px 40px rgba(16, 54, 122, .10);
  --shadow-card-hover: 0 22px 54px rgba(16, 54, 122, .16);
  --container: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.78;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--navy); line-height: 1.18; }
h1 { font-size: clamp(40px, 5.2vw, 64px); font-weight: 700; }
h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; }
h3 { font-size: clamp(21px, 2.2vw, 26px); font-weight: 600; }
p  { margin-bottom: 1.2em; }
img { max-width: 100%; height: auto; display: block; }
a  { color: var(--orange-dark); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

/* ================= Buttons ================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: 16px;
  padding: 15px 34px; border-radius: var(--radius-pill);
  text-decoration: none; transition: all .25s ease; border: 2px solid transparent; cursor: pointer;
}
.btn-solid { background: var(--orange); color: var(--white); }
.btn-solid:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(254, 87, 22, .35); }
.btn-ghost { border-color: rgba(255,255,255,.6); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.12); transform: translateY(-2px); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(16,54,122,.35); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--orange-dark); text-decoration: none;
  border-bottom: 2px solid transparent; transition: gap .2s ease, border-color .2s ease;
}
.text-link:hover { gap: 14px; border-color: var(--orange-dark); }

/* ================= Header ================= */
header.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
  padding: 22px 0;
}
header.site-header.scrolled { background: var(--white); box-shadow: 0 4px 24px rgba(7, 26, 64, .10); padding: 12px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.logo img { height: 46px; width: auto; transition: opacity .3s ease; }
.logo .logo-colour { display: none; }
header.scrolled .logo-white { display: none; }
header.scrolled .logo-colour { display: block; }
.logo-divider { width: 1px; height: 34px; background: rgba(255,255,255,.4); }
header.scrolled .logo-divider { background: rgba(16,54,122,.25); }
.logo-name { font-family: var(--font-heading); font-weight: 700; font-size: 19px; color: var(--white); line-height: 1.15; }
.logo-name span { display: block; font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
header.scrolled .logo-name { color: var(--navy); }

nav.desktop > ul { display: flex; align-items: center; gap: 34px; list-style: none; }
nav.desktop a {
  font-size: 15.5px; font-weight: 700; color: var(--white); text-decoration: none;
  padding: 6px 0; position: relative; display: inline-block;
}
nav.desktop > ul > li > a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 3px;
  border-radius: 2px; background: var(--gradient-brand); transition: width .25s ease;
}
nav.desktop > ul > li > a:hover::after,
nav.desktop > ul > li.current-menu-item > a::after,
nav.desktop > ul > li.current_page_item > a::after { width: 100%; }
header.scrolled nav.desktop a { color: var(--navy); }
nav.desktop .nav-cta > a { background: var(--orange); color: var(--white) !important; padding: 11px 26px; border-radius: var(--radius-pill); }
nav.desktop .nav-cta > a:hover { background: var(--orange-dark); }
nav.desktop .nav-cta > a::after { display: none; }

/* dropdown (WordPress .sub-menu) */
nav.desktop li { position: relative; }
nav.desktop li .sub-menu {
  position: absolute; top: calc(100% + 14px); left: -18px; min-width: 230px;
  background: var(--white); border-radius: 14px; box-shadow: 0 18px 50px rgba(7,26,64,.18);
  padding: 10px; list-style: none; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .22s ease;
}
nav.desktop li:hover > .sub-menu,
nav.desktop li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
nav.desktop .sub-menu li a { display: block; color: var(--navy) !important; padding: 10px 14px; border-radius: 9px; font-size: 15px; }
nav.desktop .sub-menu li a:hover { background: var(--stone); color: var(--orange-dark) !important; }

/* mobile */
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; z-index: 120; padding: 8px; }
.menu-toggle span { display: block; width: 26px; height: 3px; border-radius: 2px; background: var(--white); margin: 5px 0; transition: all .3s ease; }
header.scrolled .menu-toggle span { background: var(--navy); }
.mobile-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); z-index: 110;
  background: var(--navy-ink); padding: 110px 40px 40px; overflow-y: auto;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.22,.9,.3,1);
}
.mobile-panel.open { transform: translateX(0); }
.mobile-panel ul { list-style: none; }
.mobile-panel a { display: block; color: var(--white); text-decoration: none; font-family: var(--font-heading); font-size: 22px; font-weight: 600; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.mobile-panel a:hover { color: var(--orange); }
.mobile-panel .sub-menu a { font-size: 16px; font-family: var(--font-body); opacity: .8; padding-left: 18px; }
body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); background: var(--white); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background: var(--white); }

/* ================= Hero (front page) ================= */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  background: radial-gradient(1200px 700px at 78% 110%, rgba(254,87,22,.32), transparent 60%),
              radial-gradient(900px 600px at -10% -20%, rgba(31,191,143,.18), transparent 55%),
              linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 55%, var(--navy-ink) 100%);
  overflow: hidden; color: var(--white); padding: 140px 0 120px;
}
.hero::before { /* solar-panel grid texture */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(210deg, transparent 30%, #000 85%);
  -webkit-mask-image: linear-gradient(210deg, transparent 30%, #000 85%);
}
.hero > .container { width: 100%; }
.hero-inner { position: relative; max-width: 760px; }
.hero h1 { color: var(--white); margin-bottom: 26px; }
.hero h1 em { font-style: normal; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(18px, 1.6vw, 21px); max-width: 640px; color: rgba(255,255,255,.85); margin-bottom: 40px; }
.hero-ctas { display: flex; gap: 18px; flex-wrap: wrap; }
.hero-hills { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; pointer-events: none; }
.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.75); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue::after { content: ""; width: 1px; height: 40px; background: linear-gradient(rgba(255,255,255,.8), transparent); animation: drip 1.8s ease infinite; }
@keyframes drip { 0% { transform: scaleY(.2); transform-origin: top; } 60% { transform: scaleY(1); } 100% { opacity: 0; } }

/* ================= Page hero (inner pages) ================= */
.page-hero {
  position: relative; color: var(--white); padding: 190px 0 90px;
  background: radial-gradient(900px 500px at 85% 120%, rgba(254,87,22,.30), transparent 60%),
              linear-gradient(150deg, var(--navy) 0%, var(--navy-deep) 60%, var(--navy-ink) 100%);
}
.page-hero h1 { color: var(--white); max-width: 820px; }
.page-hero .meta { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.page-hero .meta .tag { background: rgba(255,255,255,.94); color: var(--navy); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border-radius: var(--radius-pill); }
.page-hero .meta time { font-size: 15px; color: rgba(255,255,255,.75); }

/* ================= Stats band ================= */
.stats { background: var(--white); position: relative; z-index: 5; }
.stats-inner {
  margin-top: -76px; background: var(--white); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 72px clamp(24px, 4vw, 60px) 52px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px;
}
.stat { border-left: 3px solid transparent; border-image: linear-gradient(var(--orange), var(--green)) 1; padding-left: 20px; }
.stat .num { font-family: var(--font-heading); font-weight: 700; font-size: clamp(30px, 3vw, 42px); color: var(--navy); line-height: 1.1; }
.stat .num sup { font-size: .5em; color: var(--orange); }
.stat .label { font-size: 15px; color: var(--text-muted); margin-top: 6px; }
.footnote { font-size: 13px; color: var(--text-muted); padding: 18px 4px 0; }

/* ================= Sections ================= */
section.block { padding: 110px 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.section-stone { background: var(--stone); }

/* timeline */
.timeline { list-style: none; margin-top: 46px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.timeline li { position: relative; padding: 26px 22px 0 0; }
.timeline li::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 2px;
  background: #dfe3ec;
}
.timeline li.done::before { background: var(--gradient-brand); }
.timeline li.now::before { background: var(--orange); }
.timeline li::after {
  content: ""; position: absolute; top: -5px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: #dfe3ec; border: 3px solid var(--white);
}
.timeline li.done::after { background: var(--green); }
.timeline li.now::after { background: var(--orange); box-shadow: 0 0 0 6px rgba(254,87,22,.18); }
.timeline .phase { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.timeline li.now .phase { color: var(--orange-dark); }
.timeline h3 { margin: 6px 0 8px; font-size: 19px; }
.timeline p { font-size: 15px; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* news cards */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 54px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.card {
  background: var(--white); border-radius: var(--radius-card); overflow: hidden;
  box-shadow: var(--shadow-card); text-decoration: none; display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }
.card-media { aspect-ratio: 16/9; position: relative; overflow: hidden; background: linear-gradient(140deg, var(--navy), var(--green)); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.grad-2 { background: linear-gradient(140deg, var(--orange), var(--navy)); }
.card-media.grad-3 { background: linear-gradient(140deg, var(--green), var(--navy-deep)); }
.card-media .tag {
  position: absolute; top: 16px; left: 16px; background: rgba(255,255,255,.94); color: var(--navy);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 14px; border-radius: var(--radius-pill); z-index: 2;
}
.card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-date { font-size: 13.5px; color: var(--text-muted); }
.card h3 { font-size: 21px; transition: color .2s ease; }
.card:hover h3 { color: var(--orange-dark); }
.card p { font-size: 15.5px; color: var(--text-muted); line-height: 1.65; margin: 0; flex: 1; }
.card .text-link { font-size: 15px; margin-top: 6px; }

/* benefit tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.tile { background: var(--white); border-radius: var(--radius-card); padding: 40px 34px; box-shadow: var(--shadow-card); transition: transform .3s ease; }
.tile:hover { transform: translateY(-6px); }
.tile .chip {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: var(--gradient-brand); color: var(--white); margin-bottom: 22px;
}
.tile h3 { margin-bottom: 10px; }
.tile p { font-size: 15.5px; color: var(--text-muted); margin: 0; line-height: 1.7; }

/* partners */
.partners { text-align: center; }
.partner-logos { display: flex; justify-content: center; align-items: center; gap: clamp(40px, 7vw, 90px); margin-top: 50px; flex-wrap: wrap; }
.partner-logos img { height: 74px; width: auto; }
.partner-placeholder {
  font-family: var(--font-heading); font-weight: 700; font-size: 26px; color: #b8bfcc;
  border: 2px dashed #d5dae4; border-radius: 14px; padding: 16px 34px;
}

/* CTA band */
.cta-band {
  background: radial-gradient(900px 500px at 85% 120%, rgba(254,87,22,.35), transparent 60%),
              linear-gradient(140deg, var(--navy), var(--navy-ink));
  border-radius: var(--radius-card); color: var(--white);
  padding: clamp(50px, 6vw, 80px); display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 40px; align-items: center; overflow: hidden; position: relative;
}
.cta-band h2 { color: var(--white); margin-bottom: 14px; }
.cta-band p { color: rgba(255,255,255,.82); margin: 0; }
.cta-band .actions { display: flex; gap: 16px; justify-content: flex-end; flex-wrap: wrap; }

/* ================= Article / page content ================= */
.content-area { padding: 80px 0 110px; }
.entry-content { max-width: 780px; }
.entry-content h2, .entry-content h3 { margin: 1.6em 0 .6em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em 1.4em; }
.entry-content li { margin-bottom: .4em; }
.entry-content img { border-radius: var(--radius-card); margin: 1.5em 0; }
.entry-content blockquote {
  border-left: 4px solid; border-image: linear-gradient(var(--orange), var(--green)) 1;
  padding: .4em 0 .4em 1.4em; margin: 1.6em 0; color: var(--navy);
  font-family: var(--font-heading); font-size: 22px; line-height: 1.5;
}
.entry-content a { color: var(--orange-dark); }
.entry-content .wp-block-button__link { border-radius: var(--radius-pill); background: var(--orange); }
.back-link { margin-bottom: 34px; display: inline-flex; }

/* document library */
.doc-group { margin-bottom: 56px; max-width: 900px; }
.doc-group h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.doc-count {
  font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--white);
  background: var(--orange); border-radius: var(--radius-pill); padding: 3px 12px; line-height: 1.5;
}
.doc-list { list-style: none; }
.doc-row {
  display: flex; align-items: center; gap: 18px; padding: 18px 22px;
  background: var(--white); border-radius: 14px; box-shadow: var(--shadow-card);
  margin-bottom: 14px; transition: transform .2s ease, box-shadow .2s ease;
}
.doc-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.doc-icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--gradient-brand); color: var(--white);
}
.doc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.doc-title { font-family: var(--font-heading); font-weight: 600; font-size: 17.5px; color: var(--navy); overflow-wrap: anywhere; }
.doc-meta { font-size: 13.5px; color: var(--text-muted); }
.doc-download { padding: 10px 24px; font-size: 14.5px; flex: 0 0 auto; }
@media (max-width: 600px) {
  .doc-row { flex-wrap: wrap; }
  .doc-download { margin-left: 64px; }
}

/* archive grid + pagination */
.archive-grid { padding: 80px 0 40px; }
.pagination-wrap { padding: 20px 0 110px; }
.pagination-wrap .nav-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pagination-wrap .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 46px; padding: 0 16px; border-radius: var(--radius-pill);
  background: var(--stone); color: var(--navy); font-weight: 700; text-decoration: none;
  transition: all .2s ease;
}
.pagination-wrap .page-numbers.current, .pagination-wrap .page-numbers:hover { background: var(--orange); color: var(--white); }

/* ================= Footer ================= */
footer.site-footer { background: var(--navy-ink); color: rgba(255,255,255,.82); margin-top: 110px; }
.footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 50px; padding: 80px 0 60px; }
.footer-main img { height: 52px; width: auto; margin-bottom: 22px; }
.footer-main p { font-size: 15px; line-height: 1.7; margin: 0; }
.footer-main h4 { color: var(--orange); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 20px; }
.footer-main ul { list-style: none; }
.footer-main li { margin-bottom: 11px; }
.footer-main a { color: rgba(255,255,255,.82); text-decoration: none; font-size: 15.5px; background-image: linear-gradient(var(--white), var(--white)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .25s ease; padding-bottom: 2px; }
.footer-main a:hover { color: var(--white); background-size: 100% 1px; }
.copyright { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; }
.copyright .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.5); }
.copyright a { color: rgba(255,255,255,.5); text-decoration: none; margin-left: 22px; }
.copyright a:first-child { margin-left: 0; }
.copyright a:hover { color: var(--white); }

/* ================= Reveal animations ================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue::after { animation: none; }
}

/* ================= WP essentials ================= */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.alignwide { max-width: 1180px; }
.alignfull { max-width: none; width: 100%; }

/* ================= Responsive ================= */
@media (max-width: 1024px) {
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .cards, .tiles, .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline { row-gap: 44px; }
}
@media (max-width: 860px) {
  nav.desktop { display: none; }
  .menu-toggle { display: block; }
  .split, .cta-band, .footer-main { grid-template-columns: 1fr; }
  .cta-band .actions { justify-content: flex-start; }
  .section-head { flex-direction: column; align-items: flex-start; }
  section.block { padding: 80px 0; }
}
@media (max-width: 600px) {
  .cards, .tiles, .timeline { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr; gap: 22px; }
  .logo-name span { display: none; }
  .logo img { height: 38px; }
}
