/*
Theme Name: ThemeCycle Kadence
Theme URI: https://themecycle.com/
Description: ThemeCycle child theme for Kadence. Kadence settings are set in code (inc/settings.php); this file holds the fonts, the review components (tables, callouts, cards, screenshots), the home page sections and the footer.
Author: PPC Optimizer Pro LLC
Template: kadence
Version: 2.0.0
Requires at least: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: themecycle-kadence
*/

/* ---------- Fonts (SIL OFL, self-hosted: no outside requests) ---------- */
@font-face {
	font-family: "Manrope";
	src: url("assets/fonts/Manrope-VariableFont_wght.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Literata";
	src: url("assets/fonts/Literata72pt-SemiBold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Literata";
	src: url("assets/fonts/Literata72pt-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--tc-teal: var(--global-palette1);
	--tc-deep: var(--global-palette2);
	--tc-ink: var(--global-palette3);
	--tc-muted: var(--global-palette5);
	--tc-line: var(--global-palette7);
	--tc-mint: var(--global-palette8);
	--tc-amber: var(--global-palette10);
	--tc-radius: 10px;
	--tc-shadow: 0 4px 18px rgba(15, 27, 45, 0.06);
}

/* ---------- Base ---------- */

/* In classic themes WordPress wraps every group's content in .wp-block-group__inner-container. Our own boxes (grids,
   cards, callouts) are laid out on their direct children, so that wrapper must not get in the way. */
.wp-block-group[class*="tc-"] > .wp-block-group__inner-container {
	display: contents;
}

.entry-content a,
.tc-trust a,
.entry-author-description a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.entry-content h2 {
	margin-top: 2.6rem;
}

.entry-content h3 {
	margin-top: 2rem;
}

/* ---------- Header ---------- */
#masthead .site-main-header-wrap {
	border-bottom: 1px solid var(--tc-line);
}

/* Logo mark: a two-tone ring (the "cycle") drawn in CSS, no image request */
.site-branding .site-title::before {
	content: "";
	display: inline-block;
	width: 0.82em;
	height: 0.82em;
	margin-right: 0.45em;
	vertical-align: -0.08em;
	border-radius: 50%;
	border: 0.19em solid var(--tc-teal);
	border-right-color: var(--tc-amber);
	box-sizing: border-box;
}

.site-branding a.brand {
	text-decoration: none;
}

.header-navigation .menu > .menu-item > a {
	text-decoration: none;
}

/* Mobile menu drawer in brand ink */
#mobile-drawer .drawer-inner {
	background: var(--tc-ink);
}

/* Mobile menu button: at least a 44px touch target */
.menu-toggle-open {
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
}

.header-navigation .menu > .current-menu-item > a,
.header-navigation .menu > .current-menu-ancestor > a {
	box-shadow: inset 0 -2px 0 var(--tc-teal);
}

/* ---------- Post header ---------- */
.kadence-breadcrumbs {
	font-size: 0.9rem;
	color: var(--tc-muted);
	margin-bottom: 0.9rem;
}

.kadence-breadcrumbs a {
	color: var(--tc-muted);
	text-decoration: none;
}

.kadence-breadcrumbs a:hover {
	color: var(--tc-teal);
	text-decoration: underline;
}

/* The current page's title is left out of the trail, so drop the separator that would point at it */
.kadence-breadcrumb-container .bc-delimiter:last-child {
	display: none;
}

/* Cards in the Reviews archive and under "More hands-on reviews" */
.loop-entry .entry-title {
	font-size: 1.3rem;
	line-height: 1.3;
}

.loop-entry .post-thumbnail img {
	object-position: left top;
}

.loop-entry {
	border: 1px solid var(--tc-line);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: none;
}

/* Pages: less air between the title band and the text */
.page:not(.home) .content-area {
	margin-top: 2.2rem;
}

.entry-taxonomies .category-style-pill a {
	background: var(--tc-mint);
	color: var(--tc-deep);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
}

.entry-taxonomies .category-style-pill a:hover {
	background: var(--tc-teal);
	color: #fff;
}

.single-content-wrap .entry-header .entry-title,
.entry-hero .entry-title {
	letter-spacing: -0.01em;
}

.entry-meta {
	font-size: 0.95rem;
	color: var(--tc-muted);
}

.entry-meta .author-avatar img,
.entry-author-avatar img {
	border-radius: 50%;
}

/* Trust line under the byline */
.tc-trust {
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--tc-muted);
	border-left: 3px solid var(--tc-amber);
	padding: 0.15rem 0 0.15rem 0.8rem;
	margin: 1rem 0 0;
}

.tc-trust-test {
	color: var(--global-palette4);
	font-weight: 600;
}

/* Featured image under the title */
.post-thumbnail img,
.article-post-thumbnail img {
	border: 1px solid var(--tc-line);
	border-radius: var(--tc-radius);
	box-shadow: var(--tc-shadow);
}

/* ---------- Page title band (guides, About, Privacy) ---------- */
.entry-hero.page-hero-section .entry-header {
	min-height: 0;
	padding-top: 2.6rem;
	padding-bottom: 2.4rem;
}

.entry-hero.page-hero-section .entry-header .kadence-breadcrumbs {
	margin-bottom: 0.6rem;
}

.entry-hero .entry-title {
	margin-bottom: 0;
}

/* ---------- Text helpers ---------- */
.tc-meta {
	color: var(--tc-muted);
	font-size: 0.92rem;
}

.tc-eyebrow {
	color: var(--tc-teal);
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 0.6rem;
}

.tc-lead {
	font-size: clamp(1.12rem, 1.02rem + 0.4vw, 1.3rem);
	color: var(--tc-muted);
	line-height: 1.6;
}

/* "Watch out for" / "Best for" lines in reviews */
p.tc-watch,
p.tc-best {
	padding-left: 0.9rem;
	border-left: 3px solid var(--tc-amber);
}

p.tc-best {
	border-left-color: var(--tc-teal);
}

/* ---------- Comparison tables ---------- */
.entry-content .wp-block-table {
	overflow-x: auto;
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}

.entry-content .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
	line-height: 1.5;
}

.entry-content .wp-block-table thead {
	border-bottom: 0;
}

.entry-content .wp-block-table thead th {
	background: var(--tc-teal);
	color: #fff;
	font-weight: 700;
	text-align: left;
	padding: 0.75rem 0.9rem;
	border: 0;
	white-space: nowrap;
}

.entry-content .wp-block-table td {
	padding: 0.7rem 0.9rem;
	border: 0;
	border-bottom: 1px solid var(--tc-line);
	vertical-align: top;
}

.entry-content .wp-block-table tbody tr:nth-child(even) {
	background: var(--tc-mint);
}

.entry-content .wp-block-table td:first-child {
	font-weight: 700;
	white-space: nowrap;
}

/* Phones: let the label column wrap and give every column room; the table scrolls sideways inside its box */
@media (max-width: 767px) {
	.entry-content .wp-block-table td:first-child {
		white-space: normal;
	}

	.entry-content .wp-block-table th,
	.entry-content .wp-block-table td {
		min-width: 8.5rem;
	}
}

/* ---------- Boxes (group block styles registered in functions.php) ---------- */
.is-style-tc-callout,
.is-style-tc-note {
	background: var(--tc-mint);
	border-left: 4px solid var(--tc-teal);
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	margin-top: 1.75rem;
	margin-bottom: 1.75rem;
}

.is-style-tc-note {
	background: #FFF8E8;
	border-left-color: var(--tc-amber);
}

.is-style-tc-callout > :first-child,
.is-style-tc-note > :first-child,
.is-style-tc-callout > .wp-block-group__inner-container > :first-child,
.is-style-tc-note > .wp-block-group__inner-container > :first-child {
	margin-top: 0;
}

.is-style-tc-callout > :last-child,
.is-style-tc-note > :last-child,
.is-style-tc-callout > .wp-block-group__inner-container > :last-child,
.is-style-tc-note > .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}

.tc-box-title {
	font-family: var(--global-body-font-family);
	font-size: 0.85rem !important;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tc-deep);
	margin-bottom: 0.5rem;
}

.is-style-tc-callout ul,
.is-style-tc-callout ol {
	margin-bottom: 0;
	padding-left: 1.2rem;
}

.is-style-tc-callout li + li {
	margin-top: 0.3rem;
}

/* Table of contents */
.tc-toc ol {
	columns: 2 16rem;
	column-gap: 2rem;
	font-size: 0.98rem;
}

.tc-toc a {
	text-decoration: none;
}

.tc-toc a:hover {
	text-decoration: underline;
}

/* ---------- Cards ---------- */
.is-style-tc-card {
	position: relative;
	height: 100%;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid var(--tc-line);
	border-radius: 12px;
	padding: 1.5rem 1.5rem 1.6rem;
	transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.is-style-tc-card:hover {
	border-color: var(--tc-teal);
	box-shadow: 0 8px 28px rgba(15, 27, 45, 0.08);
	transform: translateY(-2px);
}

.is-style-tc-card h3 {
	margin-top: 0.4rem;
	font-size: 1.3rem;
}

.is-style-tc-card h3 a {
	color: var(--tc-ink);
	text-decoration: none;
}

/* Whole card clickable via the heading link, without nesting links */
.is-style-tc-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 12px;
}

.is-style-tc-card p {
	color: var(--tc-muted);
	font-size: 1rem;
	line-height: 1.6;
}

.tc-tag {
	display: inline-block;
	background: var(--tc-mint);
	color: var(--tc-deep);
	font-size: 0.78rem !important;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	margin: 0;
}

/* ---------- Screenshots in reviews ---------- */
.tc-shot img {
	border: 1px solid var(--tc-line);
	border-radius: var(--tc-radius);
	box-shadow: var(--tc-shadow);
}

.tc-shot figcaption {
	color: var(--tc-muted);
	font-size: 0.9rem;
	text-align: center;
	margin-top: 0.6rem;
}

/* ---------- Author box and related reviews ---------- */
.entry-author {
	margin-top: 3rem;
}

.entry-author-style-normal {
	background: var(--tc-mint);
	border-radius: 12px;
	padding: 1.5rem 1.6rem;
	border: 0;
}

.entry-author-name {
	font-family: var(--global-heading-font-family);
	font-size: 1.2rem;
}

.entry-author-description {
	color: var(--global-palette4);
	font-size: 1rem;
}

.entry-related {
	background: var(--tc-mint);
}

.entry-related-title {
	font-size: 1.6rem;
}

/* ---------- Home page sections (pages/build.py home()) ---------- */
.home .entry-content > .tc-band {
	margin: 0;
}

.tc-band {
	padding: 4rem 0;
}

.tc-wrap {
	max-width: var(--global-content-width);
	margin: 0 auto;
	padding: 0 var(--global-content-edge-padding, 1.5rem);
	box-sizing: border-box;
}

.tc-wrap > *,
.tc-wrap > .wp-block-group__inner-container > * {
	margin-top: 0;
}

.tc-hero {
	background: linear-gradient(180deg, var(--tc-mint) 0%, #fff 100%);
	padding: 4.5rem 0 3.5rem;
}

.tc-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 3.5rem;
	align-items: center;
}

.tc-hero h1 {
	font-size: clamp(2rem, 1.45rem + 1.9vw, 2.85rem);
	line-height: 1.1;
	letter-spacing: -0.015em;
	margin: 0 0 1.1rem;
}

.tc-hero .tc-lead {
	margin-bottom: 1.6rem;
}

.tc-hero .wp-block-buttons {
	gap: 0.75rem;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border: 2px solid var(--tc-teal);
	color: var(--tc-teal);
	background: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--tc-teal);
	color: #fff;
}

ul.tc-checks {
	list-style: none;
	padding: 0;
	margin: 1.6rem 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.4rem;
	font-size: 0.95rem;
	color: var(--global-palette4);
}

ul.tc-checks li::before {
	content: "✓";
	color: var(--tc-teal);
	font-weight: 800;
	margin-right: 0.4rem;
}

/* Two screenshots, the second overlapping the first */
.tc-hero-shots {
	position: relative;
	padding-bottom: 2.2rem;
}

.tc-hero-shots figure {
	margin: 0;
}

.tc-hero-shots img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--tc-line);
	border-radius: 12px;
}

.tc-shot-back {
	width: 88%;
	margin-left: auto !important;
}

.tc-shot-back img {
	box-shadow: 0 10px 30px rgba(15, 27, 45, 0.12);
}

.tc-shot-front {
	width: 82%;
	margin-top: -22% !important;
	position: relative;
}

.tc-shot-front img {
	box-shadow: 0 22px 55px rgba(15, 27, 45, 0.22);
}

.tc-hero-caption {
	position: absolute;
	right: 0;
	bottom: 0;
	margin: 0;
	font-size: 0.85rem;
	color: var(--tc-muted);
}

.tc-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin-bottom: 1.6rem;
}

.tc-section-head h2 {
	margin: 0;
}

.tc-section-head p {
	margin: 0;
}

.tc-more a {
	font-weight: 700;
	text-decoration: none;
}

.tc-more a:hover {
	text-decoration: underline;
}

.tc-section-sub {
	color: var(--tc-muted);
	flex-basis: 100%;
}

.tc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
	gap: 1.5rem;
}

.tc-grid > *,
.tc-grid > .wp-block-group__inner-container > * {
	margin: 0;
}

/* Review cards: picture on top, whole card clickable through the title link */
.tc-review-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--tc-line);
	border-radius: 14px;
	overflow: hidden;
	transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}

.tc-review-card:hover {
	border-color: var(--tc-teal);
	box-shadow: 0 10px 30px rgba(15, 27, 45, 0.1);
	transform: translateY(-2px);
}

.tc-review-card .tc-card-img {
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-bottom: 1px solid var(--tc-line);
}

.tc-review-card .tc-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top left;
}

.tc-review-card :is(.tc-tag, h3, p) {
	margin-left: 1.4rem;
	margin-right: 1.4rem;
}

.tc-review-card .tc-tag {
	align-self: flex-start;
	margin-top: 1.2rem;
}

.tc-review-card h3 {
	font-size: 1.35rem;
	margin: 0.6rem 1.4rem 0.4rem;
}

.tc-review-card h3 a {
	color: var(--tc-ink);
	text-decoration: none;
}

.tc-review-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.tc-review-card p {
	color: var(--tc-muted);
	font-size: 1rem;
	line-height: 1.6;
	margin-top: 0;
}

.tc-card-meta {
	margin-top: auto !important;
	padding: 0.9rem 0 1.2rem;
	font-size: 0.85rem !important;
	border-top: 1px solid var(--tc-line);
}

.tc-start {
	padding-top: 1rem;
}

/* How we test */
.tc-method {
	background: var(--tc-mint);
}

.tc-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 2rem;
	counter-reset: step;
}

.tc-step :is(h3, p) {
	margin-top: 0;
}

.tc-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	background: var(--tc-teal);
	color: #fff;
	font-weight: 800;
	margin-bottom: 0.9rem;
}

.tc-step h3 {
	font-size: 1.25rem;
	margin-bottom: 0.4rem;
}

.tc-step p:not(.tc-step-num) {
	color: var(--global-palette4);
	font-size: 1rem;
}

/* Who's behind */
.tc-who-grid {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 1.5rem;
	align-items: start;
	max-width: 52rem;
}

.tc-who-avatar {
	margin: 0;
}

.tc-who-avatar img {
	display: block;
	border-radius: 50%;
}

.tc-who-text h2 {
	font-size: 1.6rem;
	margin: 0 0 0.5rem;
}

.tc-who-text p {
	margin: 0;
}

.tc-oldshop {
	padding-top: 0;
}

.tc-oldshop .is-style-tc-note {
	margin: 0;
	font-size: 0.98rem;
}

@media (max-width: 900px) {
	.tc-hero-grid {
		grid-template-columns: 1fr;
		gap: 2.2rem;
	}

	.tc-band {
		padding: 3rem 0;
	}

	.tc-hero {
		padding: 2.8rem 0 2.5rem;
	}
}

/* ---------- Footer ---------- */
.tc-footer {
	background: var(--tc-ink);
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.98rem;
	padding: 3.5rem 0 2.2rem;
	margin-top: 0;
}

.tc-footer-cols {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 2.5rem;
}

.tc-footer a {
	color: #fff;
	text-decoration: none;
}

.tc-footer a:hover {
	text-decoration: underline;
}

.tc-footer-brand {
	font-family: var(--global-heading-font-family);
	font-size: 1.45rem;
	font-weight: 700;
	margin: 0 0 0.6rem;
}

.tc-footer-about p:last-child {
	max-width: 30rem;
}

.tc-footer h2 {
	font-family: var(--global-body-font-family);
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
	margin: 0 0 0.9rem;
}

.tc-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tc-footer li + li {
	margin-top: 0.45rem;
}

.tc-footer-legal {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	margin: 2.5rem 0 0;
	padding-top: 1.4rem;
	font-size: 0.88rem;
	color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 767px) {
	.tc-footer-cols {
		grid-template-columns: 1fr;
		gap: 1.8rem;
	}
}

/* ---------- Focus and motion ---------- */
:where(a, button, input, .wp-block-button__link):focus-visible {
	outline: 3px solid var(--tc-amber);
	outline-offset: 2px;
	border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.is-style-tc-card {
		transition: none;
	}

	.is-style-tc-card:hover,
	.tc-review-card:hover {
		transform: none;
	}

	.tc-review-card {
		transition: none;
	}
}
