/*
Theme Name: CharKing 2026
Description: Lightweight Bootstrap 5 rebuild of the CharKing one-page site for Topco Associates. Replaces the 2015 CharKing theme and Visual Composer; keeps Gravity Forms.
Version: 1.0.2
Requires at least: 6.4
Tested up to: 7.1
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: charking
*/

/* ---------- Tokens ---------- */

:root {
	--ck-red: #d62227;
	--ck-red-dark: #9c0a23;
	--ck-black: #1a1a1a;
	--ck-white: #fff;
	--ck-font-display: "Slabo 27px", Georgia, serif;
	--ck-font-body: "Oswald", "Helvetica Neue", Arial, sans-serif;
	--ck-nav-h: 72px;

	--bs-body-font-family: var(--ck-font-body);
	--bs-body-font-weight: 300;
	--bs-link-color-rgb: 214, 34, 39;
	--bs-link-hover-color-rgb: 156, 10, 35;
}

@media (max-width: 767.98px) {
	:root {
		--ck-nav-h: 60px;
	}
}

html {
	scroll-padding-top: var(--ck-nav-h);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	padding-top: var(--ck-nav-h);
	overflow-x: hidden;
	color: var(--ck-black);
}

sup {
	font-size: 0.5em;
	top: -0.9em;
}

.ck-skip-link {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 2000;
	padding: 0.5rem 1rem;
	background: var(--ck-white);
	color: var(--ck-black);
}

/* ---------- Navigation ---------- */

.ck-navbar {
	min-height: var(--ck-nav-h);
	background: var(--ck-white);
	transition: box-shadow 0.2s ease;
}

.ck-navbar.is-scrolled {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Sit below the WordPress admin bar for signed-in editors. */
.admin-bar .ck-navbar {
	top: 32px;
}

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

@media (max-width: 600px) {
	.admin-bar .ck-navbar {
		top: 0;
	}
}

.ck-brand {
	padding: 0;
}

.ck-brand__logo {
	display: block;
	width: auto;
	height: 48px;
}

.ck-navbar .nav-link {
	font-family: var(--ck-font-display);
	font-size: 1.375rem;
	color: var(--ck-black);
	padding-inline: 0.75rem;
}

.ck-navbar .nav-link:hover,
.ck-navbar .nav-link:focus-visible {
	color: var(--ck-red);
}

.ck-navbar .navbar-toggler {
	border: 0;
}

.ck-navbar .navbar-toggler:focus {
	box-shadow: 0 0 0 0.2rem rgba(214, 34, 39, 0.4);
}

@media (max-width: 767.98px) {
	.ck-brand__logo {
		height: 36px;
	}

	.ck-navbar .navbar-nav {
		padding-block: 0.5rem 1rem;
		text-align: center;
	}
}

/* ---------- Shared section styles ---------- */

.ck-section {
	position: relative;
	padding-block: clamp(3rem, 7vw, 5rem);
	color: var(--ck-white);
	text-align: center;
}

.ck-section--red {
	background: var(--ck-red);
}

.ck-section--dark {
	background: var(--ck-black);
}

.ck-heading {
	margin-bottom: 1.25rem;
	font-family: var(--ck-font-display);
	font-size: clamp(2.5rem, 6vw, 5rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -1px;
}

/* ---------- Hero ---------- */

.ck-hero {
	position: relative;
	height: min(85vh, 66vw);
	min-height: 360px;
	overflow: hidden;
	background: var(--ck-black);
}

.ck-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* The title starts halfway down the photo, below the people's faces. */
.ck-hero__copy {
	position: absolute;
	inset: 50% 0 auto;
	display: flex;
	justify-content: center;
	padding: 0 1rem;
}

.ck-hero__heading {
	margin: 0;
	padding: 0.75rem 1.25rem;
	max-width: 46rem;
	background: rgba(0, 0, 0, 0.8);
	color: var(--ck-white);
	font-family: var(--ck-font-display);
	font-size: clamp(2.25rem, 6vw, 4rem);
	font-weight: 400;
	line-height: 1.1;
	text-align: center;
	text-transform: uppercase;
}

/* ---------- Our Story ---------- */

.ck-story__body {
	margin: 0;
	font-size: clamp(1.25rem, 2.4vw, 1.75rem);
	line-height: 1.6;
	letter-spacing: 0.5px;
}

/* ---------- Photo bands ---------- */

.ck-band {
	position: relative;
	z-index: 1;
	height: clamp(260px, 38vw, 550px);
	background-color: var(--ck-black);
	background-image: var(--ck-bg-sm);
	background-position: center;
	background-size: cover;
}

@media (min-width: 992px) {
	.ck-band {
		background-image: var(--ck-bg);
	}
}

@media (min-width: 992px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
	.ck-band {
		background-attachment: fixed;
	}
}

/* ---------- Products ---------- */

.ck-product {
	z-index: 2;
}

.ck-product__varieties {
	margin: 0;
	font-size: clamp(1.25rem, 2.4vw, 1.75rem);
	line-height: 1.5;
}

.ck-product__pack {
	margin-top: 2rem;
}

.ck-product__pack img {
	max-height: 280px;
	width: auto;
}

@media (min-width: 768px) {
	.ck-product__pack {
		align-self: flex-end;
		margin-top: 0;
	}

	/* Packaging hangs over the photo band below, as on the original site. */
	.ck-product__pack img {
		position: relative;
		max-height: 380px;
		margin-bottom: -9rem;
	}

	.ck-product--image-start .ck-product__pack {
		order: -1;
	}

	.ck-product--image-start .ck-product__copy {
		margin-left: 0;
	}
}

/* ---------- Contact ---------- */

.ck-contact {
	text-align: left;
}

/* Container padding matches the wider column gutter so the row can't overflow. */
.ck-contact .container-xl {
	--bs-gutter-x: 3rem;
}

@media (min-width: 768px) {
	.ck-contact {
		padding-top: 9rem;
	}
}

.ck-contact__heading {
	margin-bottom: 1.5rem;
	font-family: var(--ck-font-display);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 700;
	line-height: 1.15;
}

.ck-contact__address {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.7;
}

.ck-contact__address a {
	color: var(--ck-white);
}

.ck-contact__address a:hover {
	color: var(--ck-white);
	text-decoration: none;
}

@media (max-width: 991.98px) {
	.ck-contact__heading,
	.ck-contact__address {
		text-align: center;
	}
}

.ck-form-fallback {
	font-size: 1.25rem;
}

.ck-form-fallback a {
	color: var(--ck-white);
}

/* ---------- Gravity Forms (legacy markup) on red ---------- */

.ck-contact .gform_wrapper {
	margin: 0;
	max-width: none;
	color: var(--ck-white);
}

.ck-contact .gform_wrapper ul.gform_fields {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ck-contact .gform_wrapper li.gfield {
	margin: 0 0 1.1rem;
	padding: 0;
	max-width: none;
	background: none;
	border: 0;
}

.ck-contact .gform_wrapper .gform_validation_container {
	display: none !important;
}

.ck-contact .gform_wrapper .gfield_label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--ck-white);
	font-size: 1.05rem;
	font-weight: 400;
	letter-spacing: 0.02em;
}

.ck-contact .gform_wrapper .gfield_required {
	color: var(--ck-white);
	margin-left: 0.15rem;
}

.ck-contact .gform_wrapper input:not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.ck-contact .gform_wrapper textarea,
.ck-contact .gform_wrapper select {
	width: 100% !important;
	padding: 0.6rem 0.75rem;
	border: 0;
	border-radius: 0.375rem;
	background: var(--ck-white);
	color: #212529;
	font-family: var(--ck-font-body);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
}

.ck-contact .gform_wrapper textarea {
	height: 9rem;
	min-height: 6rem;
}

.ck-contact .gform_wrapper input:focus,
.ck-contact .gform_wrapper textarea:focus,
.ck-contact .gform_wrapper select:focus {
	outline: 0;
	box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.55);
}

.ck-contact .gform_wrapper .gfield_html {
	color: var(--ck-white);
	font-size: 0.95rem;
}

.ck-contact .gform_wrapper .gform_footer {
	margin: 0.5rem 0 0;
	padding: 0;
}

.ck-contact .gform_wrapper .gform_button {
	padding: 0.75rem 2.75rem;
	border: 0;
	border-radius: 0.375rem;
	background: var(--ck-black);
	color: var(--ck-white);
	font-family: var(--ck-font-body);
	font-size: 1.1rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.ck-contact .gform_wrapper .gform_button:hover,
.ck-contact .gform_wrapper .gform_button:focus-visible {
	background: #000;
}

.ck-contact .gform_wrapper .gform_button:focus-visible {
	outline: 3px solid var(--ck-white);
	outline-offset: 2px;
}

/* Validation messages stay readable on the red background. */
.ck-contact .gform_wrapper .gform_validation_errors,
.ck-contact .gform_wrapper div.validation_error {
	margin-bottom: 1.25rem;
	padding: 0.85rem 1rem;
	border: 0;
	border-radius: 0.375rem;
	background: var(--ck-white);
	box-shadow: none;
}

.ck-contact .gform_wrapper .gform_validation_errors > h2,
.ck-contact .gform_wrapper div.validation_error {
	margin: 0;
	color: var(--ck-red-dark);
	font-family: var(--ck-font-body);
	font-size: 1rem;
	font-weight: 400;
}

.ck-contact .gform_wrapper li.gfield.gfield_error {
	background: none;
	border: 0;
}

.ck-contact .gform_wrapper li.gfield_error input:not([type="hidden"]),
.ck-contact .gform_wrapper li.gfield_error textarea {
	box-shadow: 0 0 0 3px var(--ck-black);
}

.ck-contact .gform_wrapper .validation_message {
	margin-top: 0.35rem;
	padding: 0;
	background: none;
	border: 0;
	color: var(--ck-white);
	font-size: 0.95rem;
	font-weight: 400;
}

.ck-contact .gform_confirmation_message {
	font-size: 1.35rem;
	color: var(--ck-white);
}

/* "What is this?" help built from the form's saved tooltip text. */
.ck-field-help {
	margin-top: 0.4rem;
}

.ck-field-help summary {
	display: inline-block;
	color: var(--ck-white);
	font-size: 0.9rem;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.ck-field-help summary::-webkit-details-marker {
	display: none;
}

.ck-field-help summary::before {
	content: "?";
	display: inline-grid;
	place-items: center;
	width: 1.15rem;
	height: 1.15rem;
	margin-right: 0.4rem;
	border-radius: 50%;
	background: var(--ck-white);
	color: var(--ck-red);
	font-size: 0.75rem;
	font-weight: 400;
	text-decoration: none;
	vertical-align: 0.1em;
}

.ck-field-help__body {
	margin-top: 0.5rem;
	padding: 0.85rem 1rem;
	border-radius: 0.375rem;
	background: var(--ck-white);
	color: #212529;
	font-size: 0.95rem;
	font-weight: 400;
}

.ck-field-help__body::after {
	content: "";
	display: block;
	clear: both;
}

.ck-field-help__body img {
	max-width: 100%;
	height: auto;
	margin-top: 0.5rem;
}

.ck-field-help__body .alignleft {
	float: none;
	margin: 0;
}

/* ---------- Legal footer ---------- */

.ck-legal {
	padding-block: 1rem 1.5rem;
	background: var(--ck-white);
	text-align: center;
	font-size: 0.8rem;
	letter-spacing: 0.02em;
}

.ck-legal__copy {
	margin-bottom: 0.35rem;
}

.ck-legal__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem 1.25rem;
	margin: 0;
}

.ck-legal__links a {
	color: var(--ck-red);
	text-decoration: none;
}

.ck-legal__links a:hover {
	text-decoration: underline;
}

/* ---------- Other pages ---------- */

.ck-page {
	padding-block: 4rem;
	min-height: 50vh;
}

.ck-page__title {
	font-family: var(--ck-font-display);
	font-size: clamp(2rem, 5vw, 3.5rem);
	color: var(--ck-black);
	margin-bottom: 1.5rem;
}

.ck-btn {
	background: var(--ck-red);
	color: var(--ck-white);
	border: 0;
}

.ck-btn:hover,
.ck-btn:focus-visible {
	background: var(--ck-red-dark);
	color: var(--ck-white);
}

/* WordPress core alignment classes. */
.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}
