/*
Theme Name: Raj Mishra
Theme URI: https://rajkumarmishra.com
Author: Raj Mishra
Description: Personal site theme for Cllr Raj Mishra, Independent councillor for Victoria Ward, Wellingborough Town Council. Built in contact form, connect page, press list styling.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: rajmishra
*/

:root {
  --ink: #0F1B2D; --ink-2: #1B2A42; --coral: #FF5A36; --coral-d: #E04A29; --sun: #FFC53D; --teal: #17B5A6; --teal-d: #0E8C80;
  --cream: #FFF7EA; --paper: #FFFFFF; --mist: #F3F5F8; --line: #E3E7EE; --muted: #5B6578; --text: #1E293B;
  --display: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --max: 1120px; --narrow: 760px; --r: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--body); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--teal-d); }
a:hover { color: var(--coral-d); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1.1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); margin: 0 auto; }
.eyebrow { font-family: var(--display); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--coral); margin-bottom: 10px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; font: 600 1rem var(--display); text-decoration: none; border: 2px solid transparent; transition: transform .12s ease, background .12s ease; cursor: pointer; }
.btn:hover { transform: translateY(-1px); }
.btn-coral { background: var(--coral); color: #fff; } .btn-coral:hover { background: var(--coral-d); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; } .btn-ink:hover { background: var(--ink-2); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; } .btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); } .btn-light:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 42px; height: 42px; border-radius: 12px; background: var(--ink); color: var(--sun); display: grid; place-items: center; font: 700 1.05rem var(--display); letter-spacing: -.02em; }
.brand b { display: block; font: 700 1.05rem/1.1 var(--display); }
.brand small { display: block; white-space: nowrap; font-size: .78rem; color: var(--muted); line-height: 1.2; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a { display: block; white-space: nowrap; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font: 500 .98rem var(--display); }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { background: var(--mist); color: var(--ink); }
.header-cta { white-space: nowrap; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; font: 600 .9rem var(--display); color: var(--ink); }
@media (max-width: 1080px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px 16px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .header-cta { display: none; }
}

/* Hero */
.hero { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; right: -180px; top: -180px; width: 560px; height: 560px; border-radius: 50%; background: var(--coral); opacity: .9; }
.hero::after { content: ""; position: absolute; right: 120px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--sun); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero .eyebrow { color: var(--sun); }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero p.lead { font-size: 1.25rem; color: rgba(255,255,255,.85); max-width: 34rem; margin-bottom: 26px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .portrait { position: relative; justify-self: center; width: min(360px, 80vw); aspect-ratio: 1; }
.hero .portrait-img { width: 100%; height: 100%; border-radius: 50%; border: 10px solid #fff; overflow: hidden; background: var(--cream); box-shadow: 0 30px 60px rgba(0,0,0,.35); display: grid; place-items: center; color: var(--muted); font: 500 .9rem var(--display); text-align: center; }
.hero .portrait-img span { padding: 20px; }
.hero .portrait-img img { width: 100%; height: 100%; object-fit: cover; }
.hero .badge { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); background: var(--sun); color: var(--ink); font: 600 .8rem var(--display); letter-spacing: .08em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; } .hero .portrait { order: -1; width: min(240px, 60vw); margin-bottom: 16px; } .hero::after { width: 140px; height: 140px; right: -40px; top: -40px; } .hero::before { width: 380px; height: 380px; right: -160px; top: -160px; } }

/* Page hero (inner pages) */
.page-hero { background: var(--ink); color: #fff; padding: 56px 0 48px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 360px; height: 360px; border-radius: 50%; background: var(--coral); opacity: .85; }
.page-hero .wrap { position: relative; }
.page-hero h1 { color: #fff; margin: 0; max-width: 18ch; }
.page-hero .eyebrow { color: var(--sun); }
.page-hero p { color: rgba(255,255,255,.8); max-width: 40rem; margin: 14px 0 0; font-size: 1.15rem; }

/* Sections */
.section { padding: 72px 0; }
.section-mist { background: var(--mist); }
.section-cream { background: var(--cream); }
.section-ink { background: var(--ink); color: #fff; }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-head { max-width: 40rem; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section-ink .section-head p { color: rgba(255,255,255,.8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.card h3 { margin-top: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--cream); color: var(--coral); font: 700 1.2rem var(--display); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .stats { grid-template-columns: 1fr; } }
.stat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r); padding: 28px; }
.stat b { display: block; font: 700 2.6rem/1 var(--display); color: var(--sun); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 10px; color: rgba(255,255,255,.85); }
.quote { border-left: 6px solid var(--sun); padding: 6px 0 6px 24px; font: 600 1.35rem/1.35 var(--display); color: var(--ink); margin: 32px 0; }
.quote cite { display: block; font: 400 .95rem var(--body); color: var(--muted); margin-top: 10px; font-style: normal; }
.section-ink .quote { color: #fff; }

/* Content */
.entry-content { max-width: var(--narrow); margin: 0 auto; }
.page-help .entry-content, .page-news .entry-content, .page-mayor .entry-content { max-width: 900px; }
.entry-content > * { max-width: 100%; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote { border-left: 6px solid var(--sun); margin: 1.5em 0; padding: 4px 0 4px 22px; font: 600 1.2rem/1.4 var(--display); color: var(--ink); }
.entry-content blockquote cite { display: block; font: 400 .95rem var(--body); color: var(--muted); margin-top: 8px; font-style: normal; }
.entry-content .wp-block-table table, .entry-content table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.entry-content th, .entry-content td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.entry-content th { font-family: var(--display); font-weight: 600; color: var(--ink); background: var(--mist); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content figure { margin: 1.5em 0; }
.entry-content .wide { max-width: var(--max); }
.entry-content .callout { background: var(--cream); border-radius: var(--r); padding: 24px 28px; margin: 1.6em 0; }
.entry-content .callout p:last-child { margin-bottom: 0; }
.entry-content .callout-ink { background: var(--ink); color: #fff; }
.entry-content .callout-ink h3, .entry-content .callout-ink a { color: var(--sun); }
.entry-content .btn { text-decoration: none; }
.page .site-main, .single .site-main { padding: 0 0 72px; }
.page-body { padding-top: 48px; }

/* Press list */
.press-year { font: 700 1.1rem var(--display); color: var(--coral); letter-spacing: .06em; text-transform: uppercase; margin: 2.2em 0 .8em; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.press { list-style: none; padding: 0; margin: 0; }
.press li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 110px 1fr; gap: 18px; }
.press li .d { font: 600 .85rem var(--display); color: var(--muted); padding-top: 4px; }
.press li a { font: 600 1.05rem/1.3 var(--display); color: var(--ink); text-decoration: none; }
.press li a:hover { color: var(--coral-d); }
.press li .src { display: block; font-size: .9rem; color: var(--muted); margin-top: 4px; }
.press li .q { display: block; margin-top: 8px; font-style: italic; color: var(--text); }
@media (max-width: 600px) { .press li { grid-template-columns: 1fr; gap: 4px; } }

/* Help hub */
.who { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .who { grid-template-columns: 1fr; } }
.who .card { padding: 22px 24px; }
.who .card h3 { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0 0 6px; font-size: 1.1rem; }
.who .card .pill { white-space: nowrap; font: 600 .68rem var(--display); letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: var(--cream); color: var(--coral-d); }
.who .card .pill.town { background: #E6F7F5; color: var(--teal-d); }
.who .card .pill.police { background: #EEF0FF; color: #3B4CCA; }
.who .card p { font-size: .98rem; margin-bottom: 8px; }
.who .card a.rep { font: 600 .95rem var(--display); }

/* Posts */
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .post-list { grid-template-columns: 1fr; } }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.post-card .meta { font: 600 .78rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.post-card h3 { margin: 0; font-size: 1.25rem; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--coral-d); }
.post-card p { color: var(--muted); margin: 0; font-size: 1rem; }
.post-card .more { margin-top: auto; font: 600 .95rem var(--display); color: var(--coral-d); text-decoration: none; }
.single .entry-header { max-width: var(--narrow); margin: 0 auto 32px; }
.single .entry-header .meta { font: 600 .8rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.single .entry-content { font-size: 1.15rem; }
.post-nav { max-width: var(--narrow); margin: 48px auto 0; display: flex; justify-content: space-between; gap: 16px; font: 600 .95rem var(--display); }
.post-nav a { text-decoration: none; color: var(--ink); }

/* Connect page */
.connect { max-width: 520px; margin: 0 auto; display: grid; gap: 14px; }
.connect .cbtn { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .12s ease, box-shadow .12s ease; }
.connect .cbtn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15,27,45,.12); }
.connect .cbtn .ic { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 1.2rem var(--display); }
.connect .cbtn .ic svg { width: 24px; height: 24px; }
.connect .cbtn b { display: block; font: 600 1.1rem var(--display); }
.connect .cbtn small { display: block; color: var(--muted); }
.connect .cbtn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.connect .cbtn.primary b { color: var(--sun); } .connect .cbtn.primary small { color: rgba(255,255,255,.7); }
.ic-wa { background: #25D366; } .ic-fb { background: #1877F2; } .ic-ig { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); } .ic-tt { background: #010101; } .ic-em { background: var(--coral); }

/* Contact form */
.rm-form { display: grid; gap: 16px; max-width: 640px; }
.rm-form label { display: block; font: 600 .95rem var(--display); color: var(--ink); margin-bottom: 6px; }
.rm-form input, .rm-form textarea, .rm-form select { width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; font: 400 1rem var(--body); background: #fff; color: var(--text); }
.rm-form input:focus, .rm-form textarea:focus, .rm-form select:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 4px rgba(23,181,166,.15); }
.rm-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .rm-form .row { grid-template-columns: 1fr; } }
.rm-form .hp { position: absolute; left: -9999px; }
.rm-form .fine { font-size: .9rem; color: var(--muted); }
.rm-notice { padding: 16px 20px; border-radius: 12px; margin-bottom: 20px; font-weight: 600; }
.rm-notice.ok { background: #E6F7F5; color: var(--teal-d); }
.rm-notice.err { background: #FFF0EB; color: var(--coral-d); }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.8); padding: 56px 0 28px; margin-top: 0; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--sun); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand small { color: rgba(255,255,255,.65); }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.14); margin-top: 40px; padding-top: 20px; font-size: .85rem; color: rgba(255,255,255,.6); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.cta-band { background: var(--coral); color: #fff; padding: 56px 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta-band p { margin: 6px 0 0; color: rgba(255,255,255,.9); }
@media (prefers-reduced-motion: reduce) { .btn, .connect .cbtn { transition: none; } html { scroll-behavior: auto; } }

/* Media gallery */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .media-grid { grid-template-columns: repeat(2, 1fr); } }
.media-grid figure { margin: 0; border-radius: 12px; overflow: hidden; background: var(--mist); }
.media-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .25s ease; }
.media-grid a:hover img { transform: scale(1.03); }
.media-grid figcaption { font-size: .85rem; color: var(--muted); padding: 8px 10px; }
.entry-content .wp-block-embed { margin: 1.5em 0; }
