/*
Theme Name: Market Jack
Theme URI: https://github.com/erichstauffer/marketjack-theme
Author: Erich Stauffer
Author URI: https://www.erichstauffer.com
Description: A block theme for Market Jack, eCommerce consulting services. Implements the Market Jack design system — the folded-ribbon blues, a navy depth gradient, Poppins, and a diagnostic-first marketing site.
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 8.0
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marketjack
Tags: business, one-column, block-patterns, full-site-editing, custom-colors, custom-logo, custom-menu, editor-style, featured-images, translation-ready
*/

/*
 * Tokens, palette, type scale and spacing live in theme.json. This file carries
 * what theme.json cannot express: the design system's component classes
 * (Button, Card, Badge, Eyebrow, SectionHeading), the sticky header, and the
 * few layout details blocks have no vocabulary for.
 *
 * Token names below mirror the design system's own (--mj-*) so this file can be
 * read side by side with tokens/colors.css from the Claude Design project.
 */

:root {
	/* Brand blues — from the folded-ribbon M logo */
	--mj-sky: #4cc3f2;
	--mj-sky-pale: #a5e2f7;
	--mj-blue: #3a86ee;
	--mj-indigo: #5b5bf0;
	--mj-gray: #6b7280;

	--mj-amber: #f0a44c;
	--mj-amber-ink: #7a4a10;

	--mj-navy-900: #0a1220;
	--mj-navy-800: #0c1626;
	--mj-navy-700: #0f1e33;
	--mj-navy-600: #16294a;

	--mj-ink: #12263f;
	--mj-slate: #46586e;
	--mj-muted: #7a8ba0;
	--mj-line: #e4edf4;
	--mj-cloud: #f2f8fc;
	--mj-paper: #ffffff;

	--text-on-dark: #f4f8fc;
	--text-on-dark-muted: #c4d5e3;
	--text-on-dark-dim: #8fb3cc;

	--link: #1e6fd9;
	--link-hover: var(--mj-sky);

	--gradient-dark: linear-gradient(160deg, #0c1626 0%, #0f1e33 55%, #0c1a2e 100%);
	--gradient-ribbon: linear-gradient(135deg, #a5e2f7 0%, #4cc3f2 45%, #3a86ee 75%, #5b5bf0 100%);

	--radius-sm: 7px;
	--radius-md: 10px;
	--radius-lg: 14px;
	--radius-pill: 999px;

	--shadow-card: 0 4px 18px rgba(18, 38, 63, 0.08);
	--shadow-float: 0 20px 50px rgba(0, 0, 0, 0.35);
	--shadow-btn: 0 2px 8px rgba(58, 134, 238, 0.35);

	--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
	--duration-fast: 150ms;
	--duration-base: 250ms;
}

/* ---------------------------------------------------------------- Eyebrow */
/* Uppercase kicker above a heading. Registered as a block style variation for
   paragraph and heading, so it is reachable from the editor. */
.is-style-eyebrow {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	line-height: 1.3;
	color: var(--mj-blue);
	margin-bottom: 0;
}

/* On a dark section the blue is too low-contrast; the design switches to sky. */
.mj-on-dark .is-style-eyebrow,
.has-dark-gradient-background .is-style-eyebrow {
	color: var(--mj-sky);
}

.is-style-eyebrow.has-text-color { color: inherit; }

/* ------------------------------------------------------------------ Badge */
.mj-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	width: fit-content;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	padding: 4px 12px;
	border-radius: var(--radius-pill);
	background: rgba(58, 134, 238, 0.12);
	color: var(--mj-blue);
}

.mj-badge--sky     { background: rgba(76, 195, 242, 0.15); color: #1a7fb0; }
.mj-badge--amber   { background: rgba(240, 164, 76, 0.18); color: var(--mj-amber-ink); }
.mj-badge--neutral { background: var(--mj-cloud); color: var(--mj-slate); }

/* A solid amber pill, used for the result chip on the proof cards. */
.mj-badge--result {
	background: var(--mj-amber);
	color: #1a1105;
	font-size: 13px;
	font-weight: 700;
	padding: 5px 14px;
	white-space: nowrap;
}

/* ------------------------------------------------------------------- Card */
.is-style-card,
.mj-card {
	background: var(--mj-paper);
	border: 1px solid var(--mj-line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	padding: 24px;
	box-sizing: border-box;
}

/* Equal heights only where cards sit side by side in a row.
 *
 * A blanket `height: 100%` breaks stacked cards: inside a `wp-block-column`,
 * which is a stretched flex item with a definite height, the percentage
 * resolves against the whole column, so the first card claims the full height
 * and the second one spills out of it. Scope it to the grids and to columns
 * that are themselves the card. */
.mj-grid-4 > .mj-card,
.wp-block-column.mj-card,
.wp-block-column.mj-card--dark {
	height: 100%;
}

/* The dark variant drops the shadow and uses a translucent fill so the navy
   gradient behind it still reads through. */
.is-style-card-dark,
.mj-card--dark {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--radius-lg);
	box-shadow: none;
	padding: 28px;
	box-sizing: border-box;
}

/* A card group inside a constrained layout picks up the root side padding on
 * top of its own, which reads as a too-wide gutter. The card supplies its own. */
.mj-card.has-global-padding,
.mj-card--dark.has-global-padding {
	padding-left: 24px;
	padding-right: 24px;
}

/* ---------------------------------------------------------------- Buttons */
/* The primary fill comes from theme.json. These are the other three variants. */
.wp-block-button.is-style-secondary > .wp-block-button__link {
	background: transparent;
	color: var(--mj-blue);
	border: 1px solid var(--mj-blue);
	box-shadow: none;
}

/* On dark, the outline switches to sky so it clears the navy. */
.mj-on-dark .wp-block-button.is-style-secondary > .wp-block-button__link {
	color: var(--mj-sky);
	border-color: var(--mj-sky);
}

.wp-block-button.is-style-ghost > .wp-block-button__link {
	background: transparent;
	color: var(--mj-slate);
	border-color: transparent;
	box-shadow: none;
}

.mj-on-dark .wp-block-button.is-style-ghost > .wp-block-button__link {
	color: var(--text-on-dark-muted);
}

.wp-block-button.is-style-accent > .wp-block-button__link {
	background: var(--mj-amber);
	color: #1a1105;
	box-shadow: none;
}

.wp-block-button__link {
	transition: background var(--duration-fast) var(--ease-standard),
		color var(--duration-fast) var(--ease-standard),
		border-color var(--duration-fast) var(--ease-standard);
}

.wp-block-button.is-style-secondary > .wp-block-button__link:hover {
	background: rgba(58, 134, 238, 0.08);
}

.mj-on-dark .wp-block-button.is-style-secondary > .wp-block-button__link:hover {
	background: rgba(76, 195, 242, 0.12);
}

/* Size variants matching the design's sm / md / lg. */
.wp-block-button.is-size-sm > .wp-block-button__link { font-size: 14px; padding: 8px 16px; }
.wp-block-button.is-size-lg > .wp-block-button__link { font-size: 18px; padding: 14px 28px; }

/* --------------------------------------------------------------- Sections */
/* Any section painted with the navy gradient. Sets the text colours its
   children inherit, so patterns don't have to restate them per block. */
.mj-on-dark {
	background: var(--gradient-dark);
	color: var(--text-on-dark);
}

.mj-on-dark :is(h1, h2, h3, h4, h5, h6) { color: var(--text-on-dark); }
.mj-on-dark p { color: var(--text-on-dark-muted); }
.mj-on-dark a:not(.wp-block-button__link) { color: var(--mj-sky); }

/* The ribbon flare in the hero. Decorative, so it is a pseudo-element rather
   than an empty block, and it never intercepts clicks. */
.mj-hero {
	position: relative;
	overflow: hidden;
}

.mj-hero::before {
	content: "";
	position: absolute;
	width: 420px;
	height: 900px;
	top: -260px;
	right: -90px;
	background: var(--gradient-ribbon);
	opacity: 0.12;
	transform: rotate(28deg);
	pointer-events: none;
	z-index: 0;
}

.mj-hero > * { position: relative; z-index: 1; }

/* --------------------------------------------------- Ask / actual problem */
/* The "sound familiar?" cards: what they asked for, a rule, what was really
   wrong. The two labels differ only in colour, which is what carries the
   meaning, so they are separate classes rather than one with a modifier. */
.mj-ask-label,
.mj-real-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	line-height: 1.3;
	margin: 0;
}

.mj-ask-label  { color: var(--mj-muted); }
.mj-real-label { color: var(--mj-amber-ink); }

.mj-ask {
	font-size: 22px;
	font-weight: 700;
	color: var(--mj-ink);
	line-height: 1.25;
	margin: 4px 0 0;
}

.mj-real {
	font-size: 16px;
	line-height: 1.55;
	color: var(--mj-slate);
	margin: 4px 0 0;
}

.mj-rule {
	height: 1px;
	background: var(--mj-line);
	border: 0;
	margin: 12px 0;
}

/* ------------------------------------------------------------ Loop number */
.mj-step-number {
	font-size: 40px;
	font-weight: 800;
	color: var(--mj-sky);
	line-height: 1;
	margin: 0;
}

/* ----------------------------------------------------------- Domain lists */
/* Four columns, each hung under a heavy blue rule rather than boxed in a card.
   The contrast with the carded sections above is deliberate. */
.mj-domain {
	border-top: 3px solid var(--mj-blue);
	padding-top: 20px;
	height: 100%;
}

.mj-domain h3 {
	font-size: 18px;
	font-weight: 700;
	color: var(--mj-ink);
	margin: 0 0 8px;
	line-height: 1.3;
}

.mj-domain p {
	font-size: 15px;
	line-height: 1.55;
	color: var(--mj-slate);
	margin: 0;
}

/* ---------------------------------------------------------------- Pricing */
/* The design system has no pricing component, so this is built from its
   existing parts: the card shell, the display type scale, the blue accent for
   the featured plan, and the amber pill used elsewhere for a standout label. */
.mj-plan {
	display: flex;
	flex-direction: column;
	height: 100%;
	position: relative;
}

.mj-plan-name {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--mj-muted);
	margin: 0 0 6px;
}

.mj-plan-price {
	font-size: 32px;
	font-weight: 800;
	color: var(--mj-ink);
	line-height: 1.1;
	margin: 0;
}

.mj-plan-note {
	font-size: 15px;
	line-height: 1.5;
	color: var(--mj-slate);
	margin: 8px 0 0;
}

.mj-plan-features {
	list-style: none;
	margin: 18px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.mj-plan-features li {
	position: relative;
	padding-left: 26px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--mj-slate);
}

/* A drawn tick rather than a character, so it keeps its weight at any size and
   never falls back to a font that lacks the glyph. */
.mj-plan-features li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 6px;
	width: 11px;
	height: 6px;
	border-left: 2px solid var(--mj-blue);
	border-bottom: 2px solid var(--mj-blue);
	transform: rotate(-45deg);
}

/* The featured plan. Lifted and outlined rather than recoloured, so the three
   plans still read as one set. */
.mj-plan--featured {
	border-color: var(--mj-blue);
	box-shadow: 0 8px 28px rgba(58, 134, 238, 0.18);
}

.mj-plan-flag {
	position: absolute;
	top: -13px;
	left: 24px;
	background: var(--mj-amber);
	color: #1a1105;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: var(--radius-pill);
}

/* ------------------------------------------------------------ Contact steps */
.mj-step {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.mj-step-num {
	width: 30px;
	height: 30px;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--mj-cloud);
	color: var(--mj-blue);
	font-size: 14px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mj-step-title { font-size: 16px; font-weight: 600; color: var(--mj-ink); margin: 0; }
.mj-step-body  { font-size: 15px; line-height: 1.5; color: var(--mj-slate); margin: 0; }

/* ----------------------------------------------------------------- Header */
.mj-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--mj-line);
}

/* The logged-in admin bar is fixed on desktop; without this the sticky header
   slides underneath it. */
.admin-bar .mj-header { top: 32px; }

@media (max-width: 782px) {
	.admin-bar .mj-header { top: 46px; }
}

.mj-header .wp-block-site-logo img {
	height: 54px;
	width: auto;
}

.mj-header .wp-block-navigation {
	font-size: 16px;
	font-weight: 500;
}

.mj-header .wp-block-navigation a { color: var(--mj-slate); text-decoration: none; }
.mj-header .wp-block-navigation a:hover { color: var(--mj-blue); }

/* Mark the page you're on. WordPress adds current-menu-item itself. */
.mj-header .wp-block-navigation .current-menu-item a,
.mj-header .wp-block-navigation .current_page_item a {
	color: var(--mj-blue);
	font-weight: 600;
}

/* ----------------------------------------------------------------- Footer */
.mj-footer {
	background: var(--gradient-dark);
	color: var(--text-on-dark-muted);
}

.mj-footer .wp-block-site-logo img { height: 72px; width: auto; }

.mj-footer a { color: var(--text-on-dark-muted); text-decoration: none; }
.mj-footer a:hover { color: var(--mj-sky); }

.mj-footer-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--text-on-dark-dim);
	margin: 0;
}

.mj-footer-legal {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 13px;
	color: var(--text-on-dark-dim);
}

/* ------------------------------------------------------------- Post cards */
.mj-postcard {
	background: var(--mj-paper);
	border: 1px solid var(--mj-line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	overflow: hidden;
	height: 100%;
}

.mj-postcard img { display: block; width: 100%; height: auto; }

.mj-postcard .wp-block-post-title { letter-spacing: 0; }

/* A linked card title is still a heading. Left as a plain link it takes the
   global link blue, which fights the ink used for every other heading. */
.mj-postcard .wp-block-post-title a {
	color: var(--mj-ink);
	text-decoration: none;
}

.mj-postcard .wp-block-post-title a:hover {
	color: var(--mj-blue);
	text-decoration: underline;
}

.mj-postcard .wp-block-post-terms a {
	font-size: 13px;
	font-weight: 600;
	color: var(--mj-blue);
	text-decoration: none;
}

/* ------------------------------------------------------------- Long form */
/* Article body. The design sets 18px/1.65 for post text, a step up from the
   17px site default, because these columns are narrow and read long. */
.mj-prose p,
.mj-prose li {
	font-size: 18px;
	line-height: 1.65;
	color: var(--mj-slate);
}

.mj-prose h2 { font-size: 28px; margin: 36px 0 16px; }
.mj-prose h3 { font-size: 22px; margin: 28px 0 12px; }

.mj-prose blockquote {
	background: var(--mj-cloud);
	border-radius: var(--radius-lg);
	border: 0;
	padding: 22px 28px;
	margin: 0 0 22px;
	font-size: 20px;
	line-height: 1.5;
	font-weight: 500;
	color: var(--mj-ink);
}

.mj-prose blockquote p { font-size: inherit; line-height: inherit; color: inherit; }

.mj-prose img,
.mj-prose .wp-block-image img { border-radius: var(--radius-lg); }

/* ------------------------------------------------------------------ Stars */
/* `.mj-prose p` is a class-plus-element selector, so it outranks a bare class
   and would repaint these slate. Match its specificity. */
.mj-stars,
.mj-prose p.mj-stars {
	color: var(--mj-amber);
	font-size: 20px;
	letter-spacing: 2px;
	line-height: 1;
	margin: 0 0 8px;
}

/* ------------------------------------------------------------------ Stat */
.mj-stat,
.mj-prose p.mj-stat {
	font-size: 42px;
	font-weight: 800;
	line-height: 1;
	color: var(--mj-blue);
	margin: 0 0 4px;
}

/* ----------------------------------------------------------------- Tables */
/* Wide data tables must scroll inside their own box rather than pushing the
   page sideways. */
.mj-prose .wp-block-table,
.mj-prose figure.wp-block-table {
	overflow-x: auto;
	max-width: 100%;
	margin: 0 0 24px;
}

.mj-prose table {
	border-collapse: collapse;
	font-size: 15px;
	min-width: 100%;
}

.mj-prose th,
.mj-prose td {
	border: 1px solid var(--mj-line);
	padding: 9px 12px;
	text-align: left;
	vertical-align: top;
}

.mj-prose thead th,
.mj-prose tr:first-child td {
	background: var(--mj-cloud);
	font-weight: 600;
	color: var(--mj-ink);
}

/* ------------------------------------------------------------ Pull quote */
.mj-testimonial {
	font-size: 24px;
	line-height: 1.5;
	font-weight: 500;
	color: var(--mj-ink);
	margin: 0;
}

.mj-testimonial-attr {
	font-size: 15px;
	font-weight: 600;
	color: var(--mj-muted);
	margin: 14px 0 0;
}

.mj-on-dark .mj-testimonial { color: var(--text-on-dark); font-size: 17px; }
.mj-on-dark .mj-testimonial-attr { color: var(--text-on-dark-dim); font-size: 14px; }

/* ------------------------------------------------------------------ Forms */
.mj-form label,
.wp-block-search__label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--mj-ink);
	margin-bottom: 6px;
}

.mj-form input[type="text"],
.mj-form input[type="email"],
.mj-form textarea,
.wp-block-search__input {
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 16px;
	color: var(--mj-ink);
	padding: 11px 14px;
	border: 1px solid var(--mj-line);
	border-radius: var(--radius-md);
	background: var(--mj-paper);
	transition: border-color var(--duration-fast) var(--ease-standard);
}

.mj-form input:focus,
.mj-form textarea:focus,
.wp-block-search__input:focus {
	outline: none;
	border-color: var(--mj-blue);
	box-shadow: 0 0 0 3px rgba(58, 134, 238, 0.15);
}

.mj-form textarea { min-height: 130px; resize: vertical; }

/* Contact Form 7 is active on this site and renders its own markup; give it
   the same treatment rather than leaving it browser-default. */
.wpcf7-form p { margin-bottom: 18px; }

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 16px;
	color: var(--mj-ink);
	padding: 11px 14px;
	border: 1px solid var(--mj-line);
	border-radius: var(--radius-md);
}

.wpcf7-form input[type="submit"] {
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: var(--mj-blue);
	border: 0;
	border-radius: var(--radius-md);
	padding: 12px 24px;
	box-shadow: var(--shadow-btn);
	cursor: pointer;
}

/* ------------------------------------------------------------ Accessibility */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 12px 20px;
	background: var(--mj-paper);
	color: var(--mj-ink);
	font-weight: 600;
	border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus { left: 0; outline: 2px solid var(--mj-blue); }

:where(a, button, input, textarea, .wp-block-navigation a):focus-visible {
	outline: 2px solid var(--mj-blue);
	outline-offset: 2px;
}

.mj-on-dark :where(a, button):focus-visible { outline-color: var(--mj-sky); }

/* --------------------------------------------------------------- Responsive */
/* The design is specified at 1280. Below the wide breakpoint the four-column
   grids need to fold; blocks handle their own stacking at 782px, but the
   4-ups are too tight between 782 and 1100. */
@media (max-width: 1100px) {
	.mj-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 781px) {
	.mj-grid-4 { grid-template-columns: 1fr !important; }
	.mj-hero::before { width: 260px; opacity: 0.1; }
	.mj-header .wp-block-site-logo img { height: 42px; }
	.mj-footer .wp-block-site-logo img { height: 56px; }
	.mj-prose h2 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
