/*
Theme Name: Skiffbits
Theme URI: https://skiffbits.com.au
Description: Child theme of Kadence for Skiffbits.com.au. Hardware and fittings for 16ft skiffs, 13ft skiffs, Flying 11s and Manly Juniors.
Author: Skiffbits
Author URI: https://skiffbits.com.au
Template: kadence
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: skiffbits
Tags: e-commerce, custom-colors, custom-menu, block-styles
*/

/* ==========================================================================
   1. Design tokens
   Palette is taken from the gear itself: sailcloth, anodised alloy, and the
   fluoro accents that turn up on trapeze elastic and modern spinnaker cloth.
   ========================================================================== */

:root {
	/* Core palette */
	--sb-cloth:      #EFEEEA; /* sailcloth — page background */
	--sb-cloth-warm: #E6E4DE; /* sailcloth, shaded — alternating sections */
	--sb-ink:        #22272B; /* cool charcoal — headings and body text */
	--sb-ink-soft:   #4A5157; /* secondary text */
	--sb-alloy:      #8D949B; /* anodised alloy — meta, disabled */
	--sb-slate:      #2E4756; /* painted hull — dark surfaces, footer */
	--sb-slate-deep: #22353F; /* slate, shaded */
	--sb-flare:      #FF2D6F; /* fluoro accent — the one loud thing */
	--sb-flare-deep: #D91355; /* accent, pressed state */
	--sb-white:      #FFFFFF;
	--sb-line:       #D8D6D0; /* hairline borders */
	--sb-line-dark:  rgba(255, 255, 255, 0.16);

	/* Type */
	--sb-font-head: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--sb-font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	/* Scale — a fourth, loosened at the display end */
	--sb-text-xs:   0.75rem;
	--sb-text-sm:   0.875rem;
	--sb-text-base: 1rem;
	--sb-text-md:   1.125rem;
	--sb-text-lg:   1.375rem;
	--sb-text-xl:   1.75rem;
	--sb-text-2xl:  2.25rem;
	--sb-text-3xl:  3rem;

	/* Machined, not rounded */
	--sb-radius:    2px;
	--sb-radius-lg: 3px;

	/* Rhythm */
	--sb-space-1: 0.25rem;
	--sb-space-2: 0.5rem;
	--sb-space-3: 0.75rem;
	--sb-space-4: 1rem;
	--sb-space-6: 1.5rem;
	--sb-space-8: 2rem;
	--sb-space-12: 3rem;
	--sb-space-16: 4rem;
}

/* --------------------------------------------------------------------------
   2. Map onto Kadence's global palette
   Kadence renders most of its own chrome from these variables, so overriding
   them here carries the palette into elements this stylesheet never touches.
   -------------------------------------------------------------------------- */

:root,
body {
	--global-palette1: var(--sb-flare);
	--global-palette2: var(--sb-slate);
	--global-palette3: var(--sb-ink);
	--global-palette4: var(--sb-ink-soft);
	--global-palette5: var(--sb-alloy);
	--global-palette6: var(--sb-line);
	--global-palette7: var(--sb-cloth-warm);
	--global-palette8: var(--sb-cloth);
	--global-palette9: var(--sb-white);

	--global-palette-highlight: var(--sb-flare);
	--global-palette-highlight-alt: var(--sb-flare-deep);
	--global-palette-highlight-alt2: var(--sb-white);

	--global-palette-btn: var(--sb-white);
	--global-palette-btn-hover: var(--sb-white);
	--global-palette-btn-bg: var(--sb-ink);
	--global-palette-btn-bg-hover: var(--sb-flare);

	--global-body-font-family: var(--sb-font-body);
	--global-heading-font-family: var(--sb-font-head);
	--global-primary-nav-font-family: var(--sb-font-head);

	--global-content-width: 1180px;
	--global-content-narrow-width: 720px;
}

/* --------------------------------------------------------------------------
   3. Base typography
   -------------------------------------------------------------------------- */

body {
	font-family: var(--sb-font-body);
	font-size: var(--sb-text-base);
	line-height: 1.65;
	color: var(--sb-ink);
	background-color: var(--sb-cloth);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.wp-block-heading {
	font-family: var(--sb-font-head);
	color: var(--sb-ink);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
	text-wrap: balance;
}

h1, .entry-title { font-size: var(--sb-text-3xl); }
h2 { font-size: var(--sb-text-2xl); }
h3 { font-size: var(--sb-text-xl); }
h4 { font-size: var(--sb-text-lg); }
h5 { font-size: var(--sb-text-md); }
h6 { font-size: var(--sb-text-base); font-weight: 600; }

@media (max-width: 767px) {
	h1, .entry-title { font-size: 2rem; }
	h2 { font-size: 1.625rem; }
	h3 { font-size: 1.3125rem; }
}

/* Keep prose readable — under 80 characters */
.entry-content > p,
.entry-content > ul,
.entry-content > ol {
	max-width: 68ch;
}

.entry-content > p + h2,
.entry-content > ul + h2,
.entry-content > ol + h2 {
	margin-top: var(--sb-space-12);
}

.entry-content > h2 + p,
.entry-content > h3 + p {
	margin-top: var(--sb-space-3);
}

a {
	color: var(--sb-ink);
	text-decoration-color: var(--sb-alloy);
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
	color: var(--sb-flare);
	text-decoration-color: var(--sb-flare);
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.button:focus-visible {
	outline: 2px solid var(--sb-flare);
	outline-offset: 2px;
	border-radius: var(--sb-radius);
}

/* --------------------------------------------------------------------------
   4. Boat-class chips
   The signature element. Every product says which boats it fits, because
   that is the one thing a customer in a boat shed needs to know.
   -------------------------------------------------------------------------- */

.sb-fits {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--sb-space-2);
	margin: var(--sb-space-4) 0;
	padding: 0;
	list-style: none;
}

.sb-fits__label {
	font-family: var(--sb-font-head);
	font-size: var(--sb-text-xs);
	font-weight: 600;
	color: var(--sb-alloy);
	letter-spacing: 0.01em;
	margin-right: var(--sb-space-1);
}

.sb-fits__chip {
	display: inline-flex;
	align-items: center;
	font-family: var(--sb-font-head);
	font-size: var(--sb-text-xs);
	font-weight: 600;
	line-height: 1;
	padding: 0.4375rem 0.625rem;
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	background: var(--sb-white);
	color: var(--sb-ink);
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.sb-fits__chip:hover,
.sb-fits__chip:focus-visible {
	border-color: var(--sb-flare);
	color: var(--sb-flare);
	background: var(--sb-white);
	text-decoration: none;
}

/* Universal-fit parts read as neutral rather than class-specific */
.sb-fits__chip--universal {
	border-style: dashed;
	color: var(--sb-ink-soft);
}

/* Chips inside a product card sit tighter and quieter */
.sb-product-card .sb-fits,
ul.products li.product .sb-fits {
	margin: var(--sb-space-2) 0 0;
	gap: var(--sb-space-1);
}

.sb-product-card .sb-fits__chip,
ul.products li.product .sb-fits__chip {
	font-size: 0.6875rem;
	padding: 0.25rem 0.4375rem;
	background: transparent;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.wp-block-button__link,
.button,
button,
input[type="submit"],
.kb-button {
	font-family: var(--sb-font-head);
	font-weight: 600;
	font-size: var(--sb-text-sm);
	letter-spacing: 0.005em;
	border-radius: var(--sb-radius);
	padding: 0.8125rem 1.5rem;
	border: 1px solid transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wp-block-button__link:hover,
.button:hover,
input[type="submit"]:hover {
	background-color: var(--sb-flare);
	border-color: var(--sb-flare);
	color: var(--sb-white);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-color: var(--sb-ink);
	color: var(--sb-ink);
	background: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: var(--sb-flare);
	background: var(--sb-flare);
	color: var(--sb-white);
}

/* --------------------------------------------------------------------------
   6. Forms
   -------------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
	font-family: var(--sb-font-body);
	font-size: var(--sb-text-base);
	color: var(--sb-ink);
	background: var(--sb-white);
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	padding: 0.6875rem 0.875rem;
	transition: border-color 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--sb-ink);
}

::placeholder {
	color: var(--sb-alloy);
	opacity: 1;
}

/* --------------------------------------------------------------------------
   7. Header and navigation
   -------------------------------------------------------------------------- */

.site-header-wrap {
	border-bottom: 1px solid var(--sb-line);
	background: var(--sb-cloth);
}

.site-branding .site-title,
.site-title a {
	font-family: var(--sb-font-head);
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--sb-ink);
	text-decoration: none;
}

.header-navigation .header-menu-container > ul > li > a,
.main-navigation a {
	font-family: var(--sb-font-head);
	font-weight: 500;
	font-size: var(--sb-text-sm);
	letter-spacing: 0.005em;
}

/* Underline that draws itself from the left on hover */
.header-navigation .header-menu-container > ul > li > a {
	position: relative;
}

.header-navigation .header-menu-container > ul > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: 0.375rem;
	height: 2px;
	background: var(--sb-flare);
	transition: right 0.2s ease;
}

.header-navigation .header-menu-container > ul > li > a:hover::after,
.header-navigation .header-menu-container > ul > li.current-menu-item > a::after {
	right: 0;
}

@media (prefers-reduced-motion: reduce) {
	.header-navigation .header-menu-container > ul > li > a::after {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */

.site-footer,
.site-footer-wrap,
.site-bottom-footer-wrap {
	background-color: var(--sb-slate);
	color: var(--sb-cloth);
}

.site-footer a,
.site-footer .widget a {
	color: var(--sb-cloth);
	text-decoration-color: rgba(239, 238, 234, 0.4);
}

.site-footer a:hover {
	color: var(--sb-white);
	text-decoration-color: var(--sb-flare);
}

.site-footer h1, .site-footer h2, .site-footer h3,
.site-footer h4, .site-footer h5, .site-footer h6,
.site-footer .widget-title {
	color: var(--sb-white);
}

.site-footer-row {
	border-top: 1px solid var(--sb-line-dark);
}

/* --------------------------------------------------------------------------
   9. Content blocks
   -------------------------------------------------------------------------- */

hr,
.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--sb-line);
	margin: var(--sb-space-12) 0;
}

blockquote,
.wp-block-quote {
	border-left: 2px solid var(--sb-flare);
	padding-left: var(--sb-space-6);
	margin-left: 0;
	font-style: normal;
	color: var(--sb-ink-soft);
}

table {
	border-collapse: collapse;
	width: 100%;
	font-size: var(--sb-text-sm);
}

table th {
	font-family: var(--sb-font-head);
	font-weight: 600;
	text-align: left;
	border-bottom: 1px solid var(--sb-ink);
	padding: var(--sb-space-3);
}

table td {
	border-bottom: 1px solid var(--sb-line);
	padding: var(--sb-space-3);
}

/* Legal and policy pages read as documents, not marketing */
.page-template-default .entry-content h2 {
	font-size: var(--sb-text-lg);
	margin-top: var(--sb-space-12);
	padding-bottom: var(--sb-space-2);
	border-bottom: 1px solid var(--sb-line);
}

img {
	max-width: 100%;
	height: auto;
}

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

/* ==========================================================================
   10. Homepage
   ========================================================================== */

.sb-hero {
	align-items: flex-end;
}

.sb-hero .wp-block-cover__inner-container {
	max-width: 1180px;
	margin: 0 auto;
	width: 100%;
	padding-bottom: var(--sb-space-12);
}

.sb-hero__title {
	font-size: clamp(2.25rem, 5.5vw, 4rem);
	max-width: 16ch;
	margin: 0 0 var(--sb-space-4);
	letter-spacing: -0.03em;
	line-height: 1.05;
}

.sb-hero__lede {
	font-size: var(--sb-text-md);
	max-width: 52ch;
	margin: 0 0 var(--sb-space-8);
	line-height: 1.55;
}

.sb-hero__cta .wp-block-button__link {
	background: var(--sb-flare);
	border-color: var(--sb-flare);
	color: var(--sb-white);
	padding: 0.9375rem 2rem;
	font-size: var(--sb-text-base);
}

.sb-hero__cta .wp-block-button__link:hover {
	background: var(--sb-white);
	border-color: var(--sb-white);
	color: var(--sb-ink);
}

/* Sections ---------------------------------------------------------------- */

.sb-section {
	padding: var(--sb-space-16) 0 0;
}

.sb-section__title {
	font-size: var(--sb-text-xl);
	margin: 0 0 var(--sb-space-6);
	padding-bottom: var(--sb-space-3);
	border-bottom: 1px solid var(--sb-line);
}

/* Boat-class tiles -------------------------------------------------------- */

.sb-classgrid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--sb-space-4);
}

.sb-classgrid__tile {
	display: flex;
	flex-direction: column;
	gap: var(--sb-space-2);
	padding: var(--sb-space-6);
	background: var(--sb-white);
	border: 1px solid var(--sb-line);
	border-left: 3px solid var(--sb-ink);
	border-radius: var(--sb-radius);
	text-decoration: none;
	transition: border-left-color 0.15s ease, transform 0.15s ease;
}

.sb-classgrid__tile:hover,
.sb-classgrid__tile:focus-visible {
	border-left-color: var(--sb-flare);
	text-decoration: none;
}

.sb-classgrid__name {
	font-family: var(--sb-font-head);
	font-size: var(--sb-text-md);
	font-weight: 700;
	color: var(--sb-ink);
	letter-spacing: -0.01em;
}

.sb-classgrid__note {
	font-size: var(--sb-text-sm);
	color: var(--sb-ink-soft);
	line-height: 1.4;
}

@media (max-width: 900px) {
	.sb-classgrid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.sb-classgrid { grid-template-columns: 1fr; }
}

/* Category list ----------------------------------------------------------- */

.sb-catgrid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sb-space-2);
}

.sb-catgrid__item {
	font-family: var(--sb-font-head);
	font-size: var(--sb-text-sm);
	font-weight: 500;
	color: var(--sb-ink);
	padding: var(--sb-space-3) var(--sb-space-4);
	background: var(--sb-white);
	border: 1px solid var(--sb-line);
	border-radius: var(--sb-radius);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.sb-catgrid__item:hover,
.sb-catgrid__item:focus-visible {
	border-color: var(--sb-flare);
	color: var(--sb-flare);
	text-decoration: none;
}

/* Closing band ------------------------------------------------------------ */

.sb-band {
	background: var(--sb-slate);
	color: var(--sb-cloth);
	margin-top: var(--sb-space-16);
	padding: var(--sb-space-16) var(--sb-space-6);
}

.sb-band__inner {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--sb-space-12);
	max-width: 1180px;
	margin: 0 auto;
}

.sb-band__item h3 {
	font-size: var(--sb-text-md);
	color: var(--sb-white);
	margin: 0 0 var(--sb-space-3);
	padding-bottom: var(--sb-space-3);
	border-bottom: 1px solid var(--sb-line-dark);
}

.sb-band__item p {
	margin: 0;
	font-size: var(--sb-text-sm);
	line-height: 1.6;
	color: #C7D2D9;
}

@media (max-width: 860px) {
	.sb-band__inner {
		grid-template-columns: 1fr;
		gap: var(--sb-space-8);
	}
	.sb-band { padding: var(--sb-space-12) var(--sb-space-4); }
}

/* Trim Kadence's title band elsewhere ------------------------------------- */

.entry-hero.product-archive-hero-section .entry-hero-container-inner,
.entry-hero.page-hero-section .entry-hero-container-inner {
	min-height: 0;
	padding-top: var(--sb-space-12);
	padding-bottom: var(--sb-space-8);
}

.entry-hero .entry-title {
	font-size: var(--sb-text-2xl);
	margin: 0;
}
