/*
Theme Name: Jack's Series
Description: Lightweight one-page theme for jacksseries.com. Hard-coded front page, no page builder, minimal JavaScript.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
Author: Peter
Text Domain: jacks-series
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ---------- Fonts (self-hosted, Latin subset) ---------- */
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }

/* ---------- Tokens (approximate, sampled from the mockup) ---------- */
:root {
	--ink: #0c1a4d;
	--navy: #0a1d56;
	--btn-navy: #04347e;
	--orange: #fc4813;
	--footer: #04113b;
	--red: #e63b2e;
	--bg: #f7f7f7;
	--band: #f6f3ee;
	--card: #f8f8f8;
	--line: #e6e9f0;
	--serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: min(1180px, calc(100% - 2 * clamp(1rem, 6vw, 5rem))); margin-inline: auto; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: .5rem; left: .5rem; z-index: 100; width: auto; height: auto; margin: 0; padding: .75rem 1rem; clip: auto; background: #fff; color: var(--btn-navy); font-weight: 600; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--btn-navy); outline-offset: 2px; box-shadow: 0 0 0 6px #ffbf47; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; background: #fcfcfc; border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: .4rem 6vw .4rem 3.5vw; }
.site-logo img { width: 84px; height: 84px; mix-blend-mode: multiply; }

.btn-email { display: inline-flex; align-items: center; gap: .6rem; padding: .85rem 1.4rem; border: 1px solid #cdd6e6; border-radius: 8px; background: #fff; color: var(--navy); font-weight: 600; font-size: 1rem; text-decoration: none; }
.btn-email svg { width: 1.4rem; height: 1.4rem; }

.nav-toggle, .site-menu { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; aspect-ratio: 2766 / 1536; background: #7fb6e4; overflow: hidden; }
.hero picture, .hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

.hero__actions { position: absolute; left: 56%; top: 38%; width: 30%; height: 25%; display: flex; flex-direction: column; justify-content: space-between; }
.btn { flex: 0 0 46%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: .4em; padding-inline: 7%; border-radius: 999px; color: #fff; font-weight: 600; font-size: clamp(.95rem, 2.4vw, 2.4rem); line-height: 1.1; text-decoration: none; box-shadow: 0 .2em .5em rgba(4, 17, 59, .28); transition: filter .15s ease; }
.btn:hover { filter: brightness(1.08); }
.btn--shop { background: var(--orange); }
.btn--contact { background: var(--btn-navy); }
.btn__icon { width: 1.35em; height: 1.35em; }
.btn__icon circle { fill: currentColor; stroke: none; }
.btn__label { text-align: center; }
.btn__chev { width: 1em; height: 1em; }

/* ---------- Story + cards ---------- */
.intro { padding: clamp(1.75rem, 3.5vw, 3rem) 0 1.25rem; }
.intro__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr); gap: clamp(2rem, 4.5vw, 4rem); align-items: center; }

.story { text-align: center; }
.story h2 { font: 400 clamp(2rem, 3.2vw, 2.9rem)/1.15 var(--serif); color: var(--navy); }
.story__tag { margin-top: .4rem; font-weight: 600; font-size: 1.2rem; color: var(--navy); }
.divider { display: flex; align-items: center; justify-content: center; gap: .6rem; width: min(220px, 60%); margin: .55rem auto 1.1rem; color: var(--btn-navy); }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: var(--red); }
.divider svg { fill: currentColor; stroke: none; flex: none; }
.story p:not(.story__tag) { margin-bottom: .55rem; font-size: .9rem; line-height: 1.75; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 1.5vw, 1.25rem); }
.card { padding: 1.5rem .4rem 1.4rem; background: var(--card); border: 1px solid #e9e9ee; border-radius: 10px; text-align: center; }
.card img { width: 84px; margin: 0 auto .6rem; }
.card h3 { font: 400 clamp(1rem, 1.35vw, 1.25rem)/1.25 var(--serif); color: var(--navy); margin-bottom: .5rem; }
.card p { font-size: .95rem; line-height: 1.9; }

.contact { margin-top: 1.5rem; padding: 0 1rem; text-align: center; font-size: .85rem; line-height: 1.8; }
.contact a { text-decoration: none; }
.contact__dot { margin: 0 1.1rem; }
.contact__group .contact__dot:first-of-type { margin: 0 .9rem; }
.contact__group:last-child .contact__dot { margin: 0 .9rem; }

/* ---------- Comic strip ---------- */
.comic { --comic-img: clamp(300px, 32vw, 520px); position: relative; display: flex; align-items: center; min-height: calc(var(--comic-img) * 234 / 366); margin-top: 1.5rem; background: #cbeefd; overflow: hidden; }
.comic .wrap { width: 100%; margin: 0; padding: 0 clamp(1rem, 6vw, 5rem) 0 calc(var(--comic-img) + 3rem); }
.comic__grid { display: block; }
.comic__art { position: absolute; left: 0; bottom: 0; width: var(--comic-img); line-height: 0; }
.comic__art img { display: block; width: 100%; height: auto; }
.comic__text { max-width: 640px; margin-inline: auto; padding-block: clamp(1.75rem, 3vw, 2.75rem); }
.comic h2 { font: 700 clamp(1.7rem, 2.6vw, 2.2rem)/1.2 var(--serif); color: var(--navy); }
.comic__tag { margin: .35rem 0 .9rem; font-weight: 600; font-size: 1.2rem; color: var(--navy); }
.comic__text p:not(.comic__tag) { max-width: 52ch; margin-bottom: 1.25rem; font-size: 1rem; line-height: 1.65; }
.comic__btn { display: inline-flex; align-items: center; gap: .7rem; padding: .85rem 1.3rem; border-radius: 8px; background: #0a66c2; color: #fff; font-weight: 600; font-size: 1rem; line-height: 1.25; text-decoration: none; }
.comic__btn:hover { background: #084f97; }
.comic__btn svg { flex: none; width: 1.5rem; height: 1.5rem; stroke: none; }

/* ---------- Countries ---------- */
.countries { padding: 2rem 0 2.5rem; background: var(--band); text-align: center; scroll-margin-top: 1rem; }
.countries h2 { font: 400 clamp(1.5rem, 2.4vw, 1.95rem)/1.25 var(--serif); color: var(--navy); }
.countries__sub { margin: .35rem 0 1.25rem; font-size: .9rem; }
.countries__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem 1.4rem; }
.country { display: flex; flex-direction: column; align-items: center; gap: .45rem; width: 136px; padding: .75rem .5rem .6rem; background: #fff; border: 1px solid #ece8e1; border-radius: 8px; color: var(--navy); font-weight: 600; font-size: 1rem; text-decoration: none; }
.country:hover { border-color: var(--btn-navy); }
.country img { width: 84px; }

/* ---------- Disclaimer ---------- */
.disclaimer { padding: 2rem 0 2.25rem; text-align: center; }
.disclaimer h2 { margin-bottom: .75rem; font: 400 clamp(1.25rem, 2vw, 1.6rem)/1.3 var(--serif); color: var(--navy); }
.disclaimer p { max-width: 62ch; margin: 0 auto .6rem; font-size: 1rem; line-height: 1.65; }

/* ---------- Footer ---------- */
.site-footer { padding: 1.6rem 1rem; background: var(--footer); color: #fff; text-align: center; line-height: 1.9; }
.site-footer a { color: #fff; }

/* ---------- Contact popup ---------- */
.contact-dialog { width: min(520px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 1.5rem 4rem rgba(4, 17, 59, .35); overflow: auto; }
.contact-dialog::backdrop { background: rgba(4, 17, 59, .6); }
.contact-dialog__inner { position: relative; padding: 1.75rem 1.5rem 1.75rem; }
.contact-dialog h2 { margin-bottom: 1rem; padding-right: 2.5rem; font: 400 1.75rem/1.2 var(--serif); color: var(--navy); }
.contact-dialog__x { position: absolute; top: .75rem; right: .75rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; background: none; border: 0; border-radius: 50%; color: var(--navy); cursor: pointer; }
.contact-dialog__x svg { width: 1.4rem; height: 1.4rem; }

.contact-form .field { margin-bottom: 1rem; }
.contact-form label { display: block; margin-bottom: .3rem; font-weight: 600; font-size: .95rem; color: var(--navy); }
.contact-form input, .contact-form textarea { width: 100%; padding: .7rem .8rem; border: 1px solid #8f9bb8; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 1rem; }
.contact-form textarea { resize: vertical; min-height: 7rem; }
.contact-form__submit, .contact-form__done { padding: .8rem 1.6rem; border: 0; border-radius: 999px; background: var(--btn-navy); color: #fff; font: 600 1rem var(--sans); cursor: pointer; }
.contact-form__submit:disabled { opacity: .6; cursor: wait; }
.contact-form__status { min-height: 1.5rem; margin-top: .9rem; font-size: .95rem; color: #1b6b3a; }
.contact-form__status.is-error { color: #b3261e; }
.contact-form__done { display: none; margin-top: .5rem; }
.contact-form.is-sent .field, .contact-form.is-sent .contact-form__submit { display: none; }
.contact-form.is-sent .contact-form__done { display: inline-block; }
/* Honeypot: off-screen, not display:none, so bots still see it. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Fallback template ---------- */
.fallback { padding: 2.5rem 0 3rem; }
.fallback h1 { font: 400 2rem/1.2 var(--serif); color: var(--navy); margin-bottom: 1rem; }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.site-header__inner { padding: .3rem 1rem; }
	.site-logo img { width: 68px; height: 68px; }
	.btn-email { display: none; }

	.nav-toggle { display: block; padding: .9rem .6rem; background: none; border: 0; cursor: pointer; color: var(--navy); }
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 28px; height: 3px; border-radius: 2px; background: currentColor; }
	.nav-toggle__bars { position: relative; }
	.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle__bars::before { top: -8px; }
	.nav-toggle__bars::after { top: 8px; }

	.site-menu { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 .75rem 1.25rem rgba(4, 17, 59, .12); }
	.site-menu.is-open { display: block; }
	.site-menu__list a { display: block; padding: 1rem 1.25rem; border-top: 1px solid var(--line); color: var(--navy); font-weight: 600; text-decoration: none; }

	.hero { aspect-ratio: 800 / 877; }
	.hero__actions { left: 40%; top: 18.5%; width: 57%; height: 28%; }
	.btn { flex-basis: 44%; padding-inline: 6%; font-size: clamp(.95rem, 4.6vw, 1.5rem); }

	.intro { padding-top: 1.5rem; }
	.intro__grid { grid-template-columns: 1fr; gap: 1.25rem; }
	.story h2 { font-size: 1.9rem; }
	.story__tag { font-size: 1rem; }
	.story p:not(.story__tag) { font-size: .85rem; line-height: 1.55; margin-bottom: .1rem; }

	.cards { grid-template-columns: 1fr; gap: .5rem; }
	.card { display: grid; grid-template-columns: 62px 1fr; column-gap: 1rem; align-items: center; padding: .75rem 1rem; text-align: left; }
	.card img { grid-row: 1 / 3; width: 56px; margin: 0; }
	.card h3 { margin-bottom: .1rem; font-size: 1.05rem; }
	.card p { font-size: .8rem; line-height: 1.45; }

	.contact { font-size: .75rem; }
	.contact__group { display: block; }
	.contact__dot--mid { display: none; }
	
	.comic { display: block; min-height: 0; margin-top: 1rem; padding-top: 1.5rem; }
	.comic .wrap { width: 100%; padding: 0; }
	.comic__art { position: static; width: min(100%, 440px); margin-top: 1.25rem; }
	.comic__text { max-width: none; padding: 0 1rem; text-align: center; }
	.comic__text p:not(.comic__tag) { margin-inline: auto; font-size: .9rem; }
	.comic__tag { font-size: 1.05rem; }
	.comic__btn { width: 100%; justify-content: center; text-align: left; font-size: .95rem; }

	.countries { padding: 1.5rem 0 1.75rem; }
	.countries .wrap { width: calc(100% - 2rem); }
	.countries__list { gap: .6rem; }
	.countries__list li { width: calc((100% - 1.2rem) / 3); }
	.country { width: 100%; padding: .6rem .25rem .5rem; font-size: .8rem; }
	.country img { width: 58px; }

	.disclaimer h2 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; }
	.disclaimer p { font-size: .8rem; }
	.site-footer { font-size: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn { transition: none; }
}
