/*
Theme Name: JR Locksmith
Theme URI: https://jrlocksmithservices.com/
Author: JR Locksmith LLC
Description: Lightweight companion theme for the JR Locksmith Core plugin. Full-width pages, the JR Locksmith header and footer, and matching styles for blog posts, search results and the 404 page. Activate JR Locksmith Core first.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jr-locksmith-theme
*/

:root {
	--jr-navy: #1B2A4A;
	--jr-navy-2: #233862;
	--jr-navy-deep: #111C32;
	--jr-gold: #F2B10A;
	--jr-gold-hi: #FFC632;
	--jr-gold-ink: #8A6200;
	--jr-gold-wash: #FFF5DA;
	--jr-ink: #17233B;
	--jr-muted: #566176;
	--jr-line: #DDE2EA;
	--jr-mist: #F3F5F9;
	--jr-font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body { margin: 0; background: #fff; color: var(--jr-ink); font-family: var(--jr-font); font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--jr-navy); }
a:hover { color: var(--jr-navy-2); }
:focus-visible { outline: 3px solid var(--jr-gold); outline-offset: 3px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed !important; top: .75rem; left: .75rem; z-index: 99999; width: auto; height: auto; clip: auto; padding: .7rem 1rem; background: var(--jr-navy); color: #fff; border-radius: 8px; }

.jrt-site { display: flex; flex-direction: column; min-height: 100vh; }
.jrt-main { flex: 1; }
.jrt-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.jrt-designed { padding-top: clamp(1rem, 2.5vw, 1.75rem); }
.jrt-designed > :last-child { margin-bottom: 0; }

/* ---- Page header band ---- */
.jrt-pagehead { position: relative; overflow: hidden; margin-bottom: clamp(2rem, 5vw, 3.5rem); padding: clamp(2.5rem, 6vw, 4.25rem) 0 clamp(2.25rem, 5vw, 3.5rem); background: var(--jr-navy); color: #fff; }
.jrt-pagehead::after { content: ""; position: absolute; right: -6rem; top: -6rem; width: 22rem; height: 22rem; border-radius: 50%; border: 40px solid rgba(242,177,10,.08); pointer-events: none; }
.jrt-pagehead__title { max-width: 22ch; margin: 0; font-stretch: 112%; font-weight: 800; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.05; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.jrt-pagehead__title::after { content: ""; display: block; width: 3.5rem; height: 5px; margin-top: 1rem; border-radius: 3px; background: var(--jr-gold); }
.jrt-pagehead__sub { max-width: 60ch; margin: 1rem 0 0; color: #D3DAE6; font-size: 1.1rem; }
.jrt-crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0 0 1.1rem; padding: 0; font-size: .875rem; color: #AEB9CC; }
.jrt-crumbs li + li::before { content: "/"; margin-right: .35rem; color: #6D7C97; }
.jrt-crumbs a { color: #DCE3EE; text-decoration: none; }
.jrt-crumbs a:hover { color: #fff; text-decoration: underline; }
.jrt-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .95rem; }
.jrt-meta a { color: var(--jr-gold); text-decoration: none; font-weight: 600; }

/* ---- Articles and readable text ---- */
.jrt-article { max-width: 46rem; margin: 0 auto clamp(2.5rem, 6vw, 4rem); }
.jrt-article__image { margin: 0 0 2rem; border-radius: 18px; overflow: hidden; }
.jrt-article__image img { display: block; width: 100%; }
.jrt-prose { font-size: 1.1rem; line-height: 1.75; }
.jrt-prose > :first-child { margin-top: 0; }
.jrt-prose h2, .jrt-prose h3, .jrt-prose h4 { color: var(--jr-navy); font-stretch: 108%; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; margin: 2.4rem 0 .9rem; }
.jrt-prose h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.95rem); }
.jrt-prose h3 { font-size: 1.35rem; }
.jrt-prose h4 { font-size: 1.15rem; }
.jrt-prose p, .jrt-prose ul, .jrt-prose ol { margin: 0 0 1.25rem; }
.jrt-prose ul, .jrt-prose ol { padding-left: 1.4rem; }
.jrt-prose li { margin-bottom: .45rem; }
.jrt-prose li::marker { color: var(--jr-gold-ink); font-weight: 700; }
.jrt-prose a { color: var(--jr-navy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--jr-gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.jrt-prose a:hover { background: var(--jr-gold-wash); }
.jrt-prose blockquote { margin: 2rem 0; padding: .25rem 0 .25rem 1.4rem; border-left: 4px solid var(--jr-gold); color: var(--jr-navy); font-size: 1.2rem; font-weight: 600; }
.jrt-prose blockquote cite { display: block; margin-top: .5rem; font-size: .95rem; font-weight: 400; font-style: normal; color: var(--jr-muted); }
.jrt-prose hr { border: 0; height: 1px; background: var(--jr-line); margin: 2.5rem 0; }
.jrt-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 1rem; }
.jrt-prose th, .jrt-prose td { padding: .65rem .8rem; border-bottom: 1px solid var(--jr-line); text-align: left; }
.jrt-prose th { color: var(--jr-navy); }
.jrt-prose code { padding: .1rem .35rem; border-radius: 4px; background: var(--jr-mist); font-size: .92em; }
.jrt-prose pre { overflow-x: auto; padding: 1rem 1.25rem; border-radius: 10px; background: var(--jr-navy-deep); color: #E6EBF3; }
.jrt-prose pre code { padding: 0; background: none; }
.jrt-prose figure { margin: 2rem 0; }
.jrt-prose img { border-radius: 12px; }
.jrt-prose figcaption, .wp-caption-text { margin-top: .6rem; font-size: .9rem; color: var(--jr-muted); text-align: center; }
.jrt-prose .alignwide { width: min(1100px, 100vw - 2rem); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.jrt-prose .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.jrt-prose .wp-block-button__link { display: inline-block; padding: .85rem 1.35rem; border-radius: 10px; background: var(--jr-gold); color: var(--jr-navy); font-weight: 700; text-decoration: none; }
.jrt-prose .wp-block-button__link:hover { background: var(--jr-gold-hi); }
.jrt-home-extra { max-width: 70ch; margin: clamp(2.5rem, 5vw, 4rem) 0; }
.jrt-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 0; }
.jrt-tags a { padding: .3rem .8rem; border: 1px solid var(--jr-line); border-radius: 999px; font-size: .9rem; text-decoration: none; }
.jrt-tags a:hover { border-color: var(--jr-gold); background: var(--jr-gold-wash); }
.jrt-pagelinks { margin: 1.5rem 0; font-weight: 600; }

/* Post navigation */
.jrt-postnav { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--jr-line); }
.jrt-postnav .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.jrt-postnav .nav-next { text-align: right; grid-column: 2; }
.jrt-postnav a { display: block; text-decoration: none; }
.jrt-postnav__k { display: block; font-size: .85rem; color: var(--jr-muted); }
.jrt-postnav__t { display: block; font-weight: 700; color: var(--jr-navy); line-height: 1.3; }
.jrt-postnav a:hover .jrt-postnav__t { text-decoration: underline; text-decoration-color: var(--jr-gold); }

/* ---- Post grid ---- */
.jrt-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); margin-bottom: 2.5rem; }
@media (max-width: 960px) { .jrt-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .jrt-posts { grid-template-columns: 1fr; } }
.jrt-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--jr-line); border-radius: 16px; background: #fff; transition: box-shadow .2s, transform .2s; }
.jrt-card:hover { box-shadow: 0 22px 40px -24px rgba(17,28,50,.45); transform: translateY(-2px); }
.jrt-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--jr-mist); }
.jrt-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.jrt-card:hover .jrt-card__media img { transform: scale(1.04); }
.jrt-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.35rem 1.4rem; }
.jrt-card__meta { margin: 0 0 .4rem; font-size: .85rem; color: var(--jr-muted); }
.jrt-card__title { margin: 0 0 .5rem; font-stretch: 106%; font-weight: 800; font-size: 1.22rem; line-height: 1.25; }
.jrt-card__title a { color: var(--jr-navy); text-decoration: none; }
.jrt-card__title a::after { content: ""; position: absolute; inset: 0; }
.jrt-card__excerpt { margin: 0 0 1rem; color: var(--jr-muted); font-size: .98rem; line-height: 1.55; }
.jrt-card__more { margin-top: auto; font-weight: 700; font-size: .95rem; color: var(--jr-navy); text-decoration: underline; text-decoration-color: var(--jr-gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.jrt-card:has(a:focus-visible) { outline: 3px solid var(--jr-gold); outline-offset: 3px; }

/* Pagination */
.jrt-pagination { margin: 0 0 clamp(2.5rem, 6vw, 4rem); }
.jrt-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.jrt-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 2.75rem; height: 2.75rem; padding: 0 .9rem; border: 1px solid var(--jr-line); border-radius: 10px; color: var(--jr-navy); font-weight: 700; text-decoration: none; }
.jrt-pagination .page-numbers:hover { border-color: var(--jr-gold); background: var(--jr-gold-wash); }
.jrt-pagination .page-numbers.current { background: var(--jr-navy); border-color: var(--jr-navy); color: #fff; }
.jrt-pagination .dots { border: 0; }

/* ---- Search form, buttons ---- */
.jrt-search { display: flex; gap: .5rem; max-width: 32rem; }
.jrt-search input { flex: 1; min-width: 0; padding: .85rem 1rem; border: 1px solid #BFC7D4; border-radius: 10px; font: inherit; color: var(--jr-ink); background: #fff; }
.jrt-search input:focus { outline: none; border-color: var(--jr-navy); box-shadow: 0 0 0 3px rgba(242,177,10,.45); }
.jrt-search button, .jrt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.2rem; padding: .8rem 1.35rem; border: 2px solid transparent; border-radius: 10px; background: var(--jr-navy); color: #fff; font: 700 1rem/1.1 var(--jr-font); text-decoration: none; cursor: pointer; }
.jrt-search button:hover, .jrt-btn--navy:hover { background: var(--jr-navy-2); color: #fff; }
.jrt-btn--line { background: transparent; border-color: var(--jr-navy); color: var(--jr-navy); }
.jrt-btn--line:hover { background: var(--jr-mist); color: var(--jr-navy); }

/* ---- Empty state and 404 ---- */
.jrt-empty, .jrt-404 { max-width: 40rem; margin: 0 0 clamp(2.5rem, 6vw, 4rem); }
.jrt-empty h2 { margin: 0 0 .5rem; color: var(--jr-navy); font-stretch: 108%; }
.jrt-empty p { margin: 0 0 1.25rem; color: var(--jr-muted); }
.jrt-404__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }

/* ---- Comments ---- */
.jrt-comments { max-width: 46rem; margin: 0 auto clamp(2.5rem, 6vw, 4rem); }
.jrt-comments__title, .comment-reply-title { color: var(--jr-navy); font-stretch: 108%; font-weight: 800; }
.jrt-comments__list { list-style: none; padding: 0; }
.jrt-comments__list .comment-body { padding: 1.1rem 0; border-bottom: 1px solid var(--jr-line); }
.jrt-comments__list .avatar { float: left; margin-right: .8rem; border-radius: 50%; }
.comment-form label { display: block; font-weight: 600; margin-bottom: .3rem; color: var(--jr-navy); }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; padding: .8rem .95rem; border: 1px solid #BFC7D4; border-radius: 10px; font: inherit; }

/* ---- Fallback header and footer (only when the plugin is inactive) ---- */
.jrt-header { border-bottom: 1px solid var(--jr-line); }
.jrt-header__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 5rem; }
.jrt-brand { color: var(--jr-navy); font-weight: 800; font-size: 1.3rem; text-decoration: none; }
.jrt-brand__img { display: block; height: 3.4rem; width: auto; }
.jrt-header__nav ul { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.jrt-header__nav a { color: var(--jr-navy); font-weight: 600; text-decoration: none; }
.jrt-footer { margin-top: 3rem; padding: 2rem 0; background: var(--jr-navy-deep); color: #C5CEDF; }

/* With the theme in charge, the plugin footer needs no top gap after the designed pages' last section. */
.jrt-main + .jrl-footer, .jrt-site > .jrl-footer { margin-top: clamp(2rem, 5vw, 3.5rem); }

@media print {
	.jrt-pagehead { background: none; color: #000; padding: 0 0 1rem; }
	.jrt-pagehead__title { color: #000; }
}
