/* =========================================================================
   The St. Johns County Conservatives layer over Patriot

   tokens.css and patriot.css are the design system, copied as they are.
   This file adds what the system leaves to the site: the inside pages,
   text an editor writes, the pictures and videos in it, the sign-up form,
   and the meeting pages. Every value is a Patriot token. Class names start
   with sj- here, or x- where the page text itself carries the class.
   ========================================================================= */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, video { max-width: 100%; }
a { color: var(--navy); }

.sj-skip { position: absolute; left: -9999px; top: 0; z-index: var(--z-dialog); padding: var(--space-3) var(--space-5); background: var(--white); color: var(--ink-black); font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.sj-skip:focus { left: var(--space-4); top: var(--space-4); }

.sj-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Wordmark: the full name, or the short one on a phone -------------- */
.pt-wordmark .sj-wm-short { display: none; }
@media (max-width: 560px) {
	.pt-wordmark .sj-wm-long { display: none; }
	.pt-wordmark .sj-wm-short { display: inline; }
}

/* ---- Menu panel: a page in a parent's group sits indented under it ------ */
.pt-menu li.sj-sub a { padding: 10px 0 10px 38px; font-size: 18px; }
.pt-menu a[target="_blank"]::after { content: " \2197"; font-size: 0.7em; color: var(--ink-quiet); }

/* ---- Home: who we are -------------------------------------------------- */
.sj-who .pt-split { align-items: start; }
.sj-who .pt-figure { max-width: 420px; margin: 150px auto 0; }
.sj-who-quote { margin: var(--space-8) 0 0; padding: 0; border: 0; }
.sj-who-quote p { margin: 0; font-style: italic; font-size: 17px; line-height: 1.6; color: var(--ink-soft); }
.sj-who-quote footer { margin-top: var(--space-2); font-size: 14px; color: var(--ink-quiet); }
.sj-onward { margin: var(--space-8) 0 0; }
@media (max-width: 760px) { .sj-who .pt-figure { margin-top: var(--space-12); } }

/* ---- Home: the issues band ---------------------------------------------
   The three blocks come from the `home` page, which the editor maintains as
   three plain divs. These rules dress them as Patriot's blocks and give
   each one its drawing. */
.sj-band-head { text-align: center; margin-bottom: var(--space-20); }
.sj-band-head .pt-lede { margin-left: auto; margin-right: auto; }
.sj-issues .x-issues { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-6); }
.sj-issues .x-issue { padding: 44px 36px 40px; border: 1px solid var(--line-dark-block); color: var(--white); }
.sj-issues .x-issue::before { content: ""; display: block; width: 64px; height: 64px; background: var(--white); -webkit-mask: var(--sj-icon) center / contain no-repeat; mask: var(--sj-icon) center / contain no-repeat; }
.sj-issues .x-issue:nth-child(3n+1) { --sj-icon: url("../img/branch-judicial.svg"); }
.sj-issues .x-issue:nth-child(3n+2) { --sj-icon: url("../img/branch-executive.svg"); }
.sj-issues .x-issue:nth-child(3n+3) { --sj-icon: url("../img/branch-legislative.svg"); }
.sj-issues .x-issue h2 { margin: var(--space-8) 0 0; font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1.1; color: var(--white); }
.sj-issues .x-issue h2::after { content: ""; display: block; width: 40px; height: 2px; margin: var(--space-5) 0; background: var(--red); }
.sj-issues .x-issue p { margin: 0 0 var(--space-4); font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, 0.88); }
.sj-issues .x-issue p:last-child { margin-bottom: 0; }
.sj-issues .x-issue strong { color: var(--white); font-weight: 700; }
.sj-issues .x-issue a { color: var(--white); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 5px; }
.sj-issues .x-issue a:hover { text-decoration-thickness: 2px; }

/* ---- Home: what we do --------------------------------------------------
   The photo runs to the left edge of the screen, so this section is full
   width with only a right-hand gutter. */
.sj-bleed { padding: clamp(var(--bay-phone), 10vw, var(--bay)) clamp(var(--space-5), 4vw, var(--space-12)); }
.sj-bleed .pt-figure-slab img { aspect-ratio: 4 / 3; object-fit: cover; }
.sj-bleed .pt-caption { padding-left: clamp(var(--space-5), 4vw, var(--space-12)); }
.sj-bleed .pt-steps { margin-top: var(--space-12); }
@media (max-width: 760px) {
	.sj-bleed { padding-left: 0; padding-right: 0; }
	.sj-bleed .pt-split-text { padding: 0 var(--space-5); max-width: none; }
}

/* ---- Home: get involved ------------------------------------------------ */
.sj-involve { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(var(--space-10), 6vw, 96px); align-items: start; margin-top: var(--space-20); }
.sj-involve .pt-signup { max-width: none; }
.sj-cadence { margin: 0; padding: var(--space-7) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 17px; color: var(--ink-soft); }
.sj-cadence strong { display: block; margin-bottom: var(--space-2); font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
.sj-alt { margin: var(--space-5) 0 0; font-size: 15px; color: var(--on-dark-soft); }
@media (max-width: 900px) { .sj-involve { grid-template-columns: minmax(0, 1fr); } }

/* ---- Sign-up form, inside the navy card -------------------------------- */
.pt-signup .sj-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pt-signup .sj-opt { color: var(--on-dark-quiet); font-size: 13px; }
.pt-signup .sj-fine { margin: var(--space-4) 0 0; font-size: 14px; color: var(--on-dark-muted); }
.pt-signup .sj-done { margin: var(--space-6) 0 0; font-size: 17px; color: var(--white); }
.pt-signup .sj-error { margin: var(--space-6) 0 0; padding-left: var(--space-4); border-left: 2px solid var(--red); color: var(--white); }
.pt-signup .pt-btn { width: 100%; margin-top: var(--space-6); }

/* ---- Inside pages: a navy head, then the text on parchment -------------- */
.sj-page-head { position: relative; padding: 0 0 clamp(64px, 7vw, 112px); }
.sj-page-head .pt-hero-header { position: relative; }
.sj-page-head-inner { max-width: var(--shell); margin: 0 auto; padding: clamp(48px, 6vw, 96px) clamp(var(--space-5), 4vw, var(--space-12)) 0; box-sizing: border-box; }
.sj-page-head .pt-band-title { max-width: 16em; }
.sj-crumb { color: inherit; text-decoration: none; }
.sj-crumb:hover { color: var(--white); text-decoration: underline; }
.sj-page-body { padding: clamp(var(--bay-phone), 8vw, 128px) clamp(var(--space-5), 4vw, var(--space-12)); }
.sj-page-body > .sj-prose { margin: 0 auto; }

/* ---- Text an editor writes --------------------------------------------- */
.sj-prose { max-width: 760px; color: var(--ink-soft); font-size: 17px; line-height: 1.65; }
.sj-prose::after { content: ""; display: block; clear: both; }
.sj-prose > :first-child { margin-top: 0; }
.sj-prose p { margin: var(--space-4) 0 0; }
.sj-prose h2 { margin: var(--space-18) 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 3.6vw, 48px); line-height: 1.05; color: var(--navy); text-wrap: balance; }
.sj-prose h2::before { content: ""; display: block; width: 28px; height: 2px; margin-bottom: var(--space-5); background: var(--red); }
.sj-prose h3 { margin: var(--space-10) 0 0; font-family: var(--font-text); font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.sj-prose h4, .sj-prose h5, .sj-prose h6 { margin: var(--space-7) 0 0; font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
.sj-prose h2 + p, .sj-prose h3 + p, .sj-prose h4 + p { margin-top: var(--space-4); }
.sj-prose a { font-weight: 700; color: var(--navy); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 5px; overflow-wrap: anywhere; }
.sj-prose a:hover { text-decoration-thickness: 2px; }
.sj-prose h2 a, .sj-prose h3 a { font-weight: inherit; }
.sj-prose strong { color: var(--ink); }
.sj-prose ul, .sj-prose ol { margin: var(--space-4) 0 0; padding-left: 1.3em; }
.sj-prose li { margin: var(--space-2) 0 0; padding-left: 0.25em; }
.sj-prose ul li::marker { color: var(--red); }
.sj-prose ol li::marker { color: var(--red); font-family: var(--font-display); }
.sj-prose hr { margin: var(--space-12) 0; border: 0; border-top: 1px solid var(--line); }
.sj-prose blockquote { margin: var(--space-10) 0; padding: var(--space-7) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.sj-prose blockquote p { margin: 0; font-style: italic; font-size: clamp(19px, 1.9vw, 24px); line-height: 1.5; color: var(--ink); }
.sj-prose blockquote p + p { margin-top: var(--space-4); font-family: var(--font-label); font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
.sj-prose figure { margin: var(--space-8) 0 0; }
.sj-prose figure img { display: block; width: 100%; height: auto; }
.sj-prose figcaption { margin-top: var(--space-3); font-style: italic; font-size: 14px; line-height: 1.5; color: var(--ink-quiet); }
.sj-prose img { height: auto; }
.sj-prose table { width: 100%; margin: var(--space-6) 0 0; border-collapse: collapse; font-size: 16px; }
.sj-prose th, .sj-prose td { padding: var(--space-3) var(--space-4) var(--space-3) 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.sj-prose th { font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-quiet); }

/* Pictures in a row. */
.sj-prose .x-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); margin: var(--space-8) 0 0; }
.sj-prose .x-gallery figure { margin: 0; }
.sj-prose .x-gallery img { aspect-ratio: 4 / 3; object-fit: cover; box-shadow: var(--shadow-figure); }

/* A picture set beside the text. */
.sj-prose .x-figure-right { float: right; width: min(40%, 300px); margin: var(--space-2) 0 var(--space-6) var(--space-8); }
.sj-prose .x-figure-right img { box-shadow: var(--shadow-figure); }
@media (max-width: 640px) { .sj-prose .x-figure-right { float: none; width: 100%; margin: var(--space-8) 0 0; } }

/* Videos. The player never starts by itself. */
.sj-prose .x-video { margin: var(--space-8) 0 0; }
.sj-prose .x-video video, .sj-prose .x-video img { display: block; width: 100%; height: auto; background: var(--night); box-shadow: var(--shadow-figure); }
.sj-prose .x-video-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-6); margin: var(--space-8) 0 0; }
.sj-prose .x-video-row .x-video { margin: 0; }
.sj-prose .x-video--portrait video, .sj-prose .x-video--portrait img { aspect-ratio: 9 / 16; object-fit: cover; max-height: 70vh; }

/* Two columns of links, and grouped lists of officials. */
.sj-prose .x-home-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); margin: var(--space-8) 0 0; padding: var(--space-7) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sj-prose .x-home-links > div > :first-child { margin-top: 0; }
.sj-prose .x-link-group ul { list-style: none; padding: 0; border-bottom: 1px solid var(--line); }
.sj-prose .x-link-group li { margin: 0; padding: var(--space-3) 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .sj-prose .x-home-links { grid-template-columns: minmax(0, 1fr); } }

/* The contact form, where a page places it. */
.sj-prose .x-contact-form { display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.sj-prose .x-contact-form label { display: block; font-size: 14px; color: var(--ink-muted); }
.sj-prose .x-contact-form input, .sj-prose .x-contact-form textarea { width: 100%; box-sizing: border-box; margin-top: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--white); font: inherit; color: var(--ink); }

/* ---- A list of entries: search results, the content archive ------------ */
.sj-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.sj-list li { padding: var(--space-7) 0; border-top: 1px solid var(--line); }
.sj-list h2 { margin: 0; font-family: var(--font-text); font-weight: 400; font-size: 24px; line-height: 1.25; }
.sj-list h2 a { color: var(--ink); text-decoration: none; }
.sj-list h2 a:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 5px; }
.sj-list p { margin: var(--space-2) 0 0; font-size: 16px; color: var(--ink-muted); }
.sj-search { display: flex; gap: var(--space-3); margin: 0 0 var(--space-10); }
.sj-search input { flex: 1; min-height: 46px; padding: 0 var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--white); font: inherit; color: var(--ink); }

/* ---- Meetings page ---------------------------------------------------- */
.sj-meetings-page { background: var(--night); }
.sj-col-wordmark { margin: -84px 0 72px; }
@media (max-width: 899px) { .sj-col-wordmark { margin-top: -110px; } }
.sj-meetings-head .pt-band-title { margin-top: var(--space-5); }
.sj-meetings-head .pt-lede { color: var(--on-dark-soft); font-size: 18px; }
.sj-meetings-col .pt-month:first-of-type { margin-top: var(--space-12); }
.sj-meetings-col .pt-meeting-open { text-decoration: none; }
.sj-meetings-col a.pt-meeting-open { color: inherit; }
.sj-meetings-empty { margin: var(--space-12) 0 0; padding: var(--space-7) 0; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); color: var(--on-dark-soft); }
.sj-meetings-past { margin-top: var(--space-18); }
.sj-meetings-past .pt-meeting { opacity: 0.82; }
.sj-meetings-col .pt-on-dark .pt-link, .sj-meetings-col .pt-link { color: var(--white); font-weight: 400; }
.sj-meetings-col .pt-eyebrow { color: var(--on-dark-muted); }

/* ---- One meeting, as a page of its own -------------------------------- */
.sj-flyer-page { position: relative; z-index: 1; min-height: 100vh; box-sizing: border-box; padding: 140px var(--space-5) 96px; display: flex; justify-content: center; align-items: flex-start; }
.sj-flyer-page .pt-flyer { max-height: none; overflow: visible; animation: none; }
.sj-flyer-page .pt-flyer-close { text-decoration: none; }

/* What the flyer adds to the system's card: the meeting's own description,
   which can run to several paragraphs, and a link to its printed flyer. */
.pt-flyer-about > :first-child { margin-top: 0; }
.pt-flyer-about p { margin: var(--space-3) 0 0; }
.pt-flyer-about a { color: var(--navy); text-decoration-color: var(--red); text-underline-offset: 4px; }
/* A flyer picture from Soapbox stands in for the set flyer. In the dialog it
   is held to the screen's height so the buttons stay in view. */
.sj-flyer-picture { width: fit-content; max-width: min(640px, 100%); }
.sj-flyer-picture--wide { max-width: min(920px, 100%); }
.sj-flyer-art { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 156px); margin: 0 auto; }
.sj-flyer-page .sj-flyer-art { width: 100%; max-height: none; }
.sj-flyer-picture .pt-flyer-actions { margin: 0; padding: var(--space-5); }
.pt-flyer-actions .pt-btn { text-decoration: none; }

/* ---- Footer additions -------------------------------------------------- */
.pt-footer-base a { color: var(--on-dark-quiet); }
.pt-footer-base > span:first-child a { margin-left: var(--space-3); }

/* The Meetings page's photo is fixed behind everything, so the footer is
   lifted above it. */
.sj-meetings-page ~ .pt-footer { position: relative; z-index: 1; }
.pt-event-title a { color: inherit; text-decoration: none; }
.pt-event-title a:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 5px; }

/* The club's name is long for a footer column: it wraps under its star,
   and the column it sits in is the widest. */
@media (min-width: 900px) { .pt-footer-cols { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); } }
.pt-footer .pt-wordmark { align-items: flex-start; }
.pt-footer .pt-wordmark svg { margin-top: 7px; }
.pt-footer .pt-wordmark span { font-size: 19px; line-height: 1.35; }
.pt-footer-text, .pt-footer ul { overflow-wrap: anywhere; }

/* Patriot sets the hero title no smaller than 72px. "Conservatives" at 72px
   is wider than a phone, which makes the browser zoom the whole page out,
   so on a narrow screen the title scales with the width instead. */
@media (max-width: 520px) { .pt-hero-title { font-size: clamp(44px, 14.5vw, 72px); } }

/* The navy slab steps 40px out to the right of its photo. On a phone the
   photo is already full width, so the slab would push the page sideways. */
.sj-bleed { overflow-x: clip; }

/* A link to a heading on the page lands with room above it, clear of the
   fixed Menu button. */
.sj-prose [id] { scroll-margin-top: 96px; }
