/**
 * Coffee Lab theme — base styles.
 *
 * Elementor owns the page layout, so this file only establishes the reset,
 * typography, the boxed container and the fallback header/footer/blog styles
 * that keep the theme usable before the template kit is imported.
 *
 * Design tokens live in the Coffee Lab Elements plugin (assets/css/tokens.css).
 * The block below repeats them so the theme also works on its own.
 */

:root {
	--cl-black: #0A0A0A;
	--cl-ink: #14140F;
	--cl-white: #FFFFFF;
	--cl-off-white: #F7F7F5;
	--cl-grey-50: #FAFAF8;
	--cl-grey-100: #F2F2EF;
	--cl-grey-200: #E6E6E3;
	--cl-grey-300: #D6D6D1;
	--cl-grey-400: #B5B5AE;
	--cl-grey-500: #8A8A82;
	--cl-grey-600: #5F5F59;
	--cl-grey-700: #3A3A36;

	--cl-bg: var(--cl-white);
	--cl-text: var(--cl-black);
	--cl-text-muted: var(--cl-grey-600);
	--cl-border: var(--cl-grey-200);
	--cl-accent: var(--cl-black);

	--cl-radius-xs: 8px;
	--cl-radius-sm: 12px;
	--cl-radius-md: 18px;
	--cl-radius-lg: 24px;
	--cl-radius-xl: 32px;
	--cl-radius-pill: 999px;

	--cl-ease: cubic-bezier(.22, .61, .36, 1);
	--cl-dur: .32s;

	--cl-container: 1300px;
	--cl-container-wide: 1440px;
	--cl-gutter: 24px;

	--cl-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--cl-font-heading: var(--cl-font);
}

.cl-lang-ka,
.cl-is-georgian {
	--cl-font: "Noto Sans Georgian", "BPG Arial", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--cl-font-heading: var(--cl-font);
}

/* ---------------------------------------------------------------------------
 * Reset
 * ------------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background-color: var(--cl-bg);
	color: var(--cl-text);
	font-family: var(--cl-font);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
video,
svg,
iframe {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--cl-text);
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	font-family: var(--cl-font-heading);
	font-weight: 700;
	line-height: 1.15;
	color: var(--cl-text);
	text-wrap: balance;
}

h1 { font-size: clamp(30px, 4.4vw, 52px); }
h2 { font-size: clamp(25px, 3.4vw, 40px); }
h3 { font-size: clamp(20px, 2.4vw, 28px); }
h4 { font-size: clamp(18px, 2vw, 22px); }

p { margin: 0 0 1.2em; }

/* Georgian Mtavruli — mirrors the plugin rule so headings stay consistent
   even when only the theme is installed. */
.cl-lang-ka .cl-mtavruli,
.cl-is-georgian .cl-mtavruli,
.cl-mtavruli--forced {
	text-transform: uppercase;
	font-feature-settings: "case" 1;
	letter-spacing: -0.005em;
	line-height: inherit;
}

/* ---------------------------------------------------------------------------
 * Layout
 * ------------------------------------------------------------------------ */

.cl-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.cl-main {
	flex: 1 0 auto;
	padding-block: 56px;
}

.cl-main--full {
	padding-block: 0;
}

.cl-container {
	width: 100%;
	max-width: var(--cl-container);
	margin-inline: auto;
	padding-inline: var(--cl-gutter);
}

.cl-container--narrow {
	max-width: 760px;
}

/* Boxed site option. */
.cl-site-boxed {
	background-color: var(--cl-grey-100);
}

.cl-site-boxed .cl-site {
	max-width: var(--cl-container-wide);
	margin-inline: auto;
	background-color: var(--cl-white);
	border-radius: var(--cl-radius-xl);
	overflow: hidden;
}

@media (max-width: 767px) {
	.cl-site-boxed .cl-site {
		border-radius: 0;
	}
}

/* Elementor containers inherit the boxed width. */
.cl-theme .elementor-section.elementor-section-boxed > .elementor-container,
.cl-theme .e-con.e-con-boxed > .e-con-inner {
	max-width: var(--cl-container);
}

/* ---------------------------------------------------------------------------
 * Fallback header & footer (replaced by the Elementor templates)
 * ------------------------------------------------------------------------ */

.cl-fallback-header {
	border-bottom: 1px solid var(--cl-border);
	background-color: var(--cl-white);
}

.cl-fallback-header__inner,
.cl-fallback-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 74px;
	flex-wrap: wrap;
}

.cl-site-title {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.01em;
	text-decoration: none;
}

.cl-fallback-header .custom-logo {
	max-height: 48px;
	width: auto;
}

.cl-fallback-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cl-fallback-menu a {
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	transition: opacity var(--cl-dur) var(--cl-ease);
}

.cl-fallback-menu a:hover {
	opacity: .65;
}

.cl-fallback-footer {
	margin-top: auto;
	padding-block: 28px;
	border-top: 1px solid var(--cl-border);
	background-color: var(--cl-white);
	font-size: 14px;
	color: var(--cl-text-muted);
}

.cl-fallback-footer__inner {
	min-height: 0;
}

.cl-fallback-footer__copy {
	margin: 0;
}

/* ---------------------------------------------------------------------------
 * Blog
 * ------------------------------------------------------------------------ */

.cl-archive-head {
	margin-bottom: 40px;
}

.cl-archive-title {
	margin: 0 0 10px;
}

.cl-archive-desc {
	color: var(--cl-text-muted);
	max-width: 640px;
}

.cl-archive-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

@media (max-width: 1024px) {
	.cl-archive-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.cl-archive-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* The card markup matches the plugin's, so the plugin CSS styles it when
   active. These rules keep it presentable when the plugin is not. */
.cl-archive-grid .cl-post-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--cl-border);
	border-radius: var(--cl-radius-lg);
	background-color: var(--cl-white);
	overflow: hidden;
	transition: transform var(--cl-dur) var(--cl-ease), box-shadow var(--cl-dur) var(--cl-ease);
}

.cl-archive-grid .cl-post-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(10, 10, 10, .08);
}

/* ---------------------------------------------------------------------------
 * Single entry
 * ------------------------------------------------------------------------ */

.cl-entry__head {
	margin-bottom: 28px;
	text-align: center;
}

.cl-entry__title {
	margin: 0 0 14px;
}

.cl-entry__meta {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 14px;
	color: var(--cl-text-muted);
}

.cl-entry__meta a {
	color: inherit;
}

.cl-entry__media {
	margin: 0 0 40px;
	border-radius: var(--cl-radius-lg);
	overflow: hidden;
}

.cl-entry__media img {
	display: block;
	width: 100%;
	height: auto;
}

.cl-entry__content {
	font-size: 17px;
	line-height: 1.75;
}

.cl-entry__content img,
.cl-entry__content figure {
	border-radius: var(--cl-radius-md);
}

.cl-entry__content blockquote {
	margin: 32px 0;
	padding: 22px 26px;
	border-left: 3px solid var(--cl-black);
	border-radius: 0 var(--cl-radius-md) var(--cl-radius-md) 0;
	background-color: var(--cl-off-white);
	font-size: 19px;
	font-style: italic;
}

.cl-entry__content blockquote p:last-child {
	margin-bottom: 0;
}

.cl-entry__content pre,
.cl-entry__content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.cl-entry__content pre {
	padding: 18px;
	border-radius: var(--cl-radius-sm);
	background-color: var(--cl-grey-100);
	overflow-x: auto;
}

.cl-entry__content table {
	width: 100%;
	border-collapse: collapse;
}

.cl-entry__content th,
.cl-entry__content td {
	padding: 10px 12px;
	border: 1px solid var(--cl-border);
	text-align: left;
}

.cl-entry__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--cl-border);
}

.cl-entry__tags a {
	padding: 7px 14px;
	border: 1px solid var(--cl-border);
	border-radius: var(--cl-radius-pill);
	font-size: 13px;
	text-decoration: none;
	transition: background-color var(--cl-dur) var(--cl-ease), color var(--cl-dur) var(--cl-ease);
}

.cl-entry__tags a:hover {
	background-color: var(--cl-black);
	border-color: var(--cl-black);
	color: var(--cl-white);
}

/* ---------------------------------------------------------------------------
 * Pagination, search, 404
 * ------------------------------------------------------------------------ */

.cl-posts-pagination,
.navigation.pagination {
	margin-top: 48px;
}

.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.navigation.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding-inline: 10px;
	border: 1px solid var(--cl-border);
	border-radius: var(--cl-radius-pill);
	font-size: 15px;
	text-decoration: none;
	transition: background-color var(--cl-dur) var(--cl-ease), color var(--cl-dur) var(--cl-ease);
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover {
	background-color: var(--cl-black);
	border-color: var(--cl-black);
	color: var(--cl-white);
}

.cl-searchform {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 460px;
	margin-block: 18px;
	padding: 5px 5px 5px 18px;
	border: 1px solid var(--cl-border);
	border-radius: var(--cl-radius-pill);
}

.cl-searchform__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 15px;
}

.cl-searchform__input:focus {
	outline: none;
}

.cl-404 {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding-block: 80px;
	text-align: center;
}

.cl-404__code {
	margin: 0;
	font-size: clamp(64px, 14vw, 140px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.04em;
	color: var(--cl-grey-200);
}

.cl-404__title {
	margin: 0;
}

.cl-404__text {
	margin: 0;
	max-width: 460px;
	color: var(--cl-text-muted);
}

/* Button used by the theme templates; the plugin styles the rest. */
.cl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 15px 30px;
	border: 1px solid var(--cl-black);
	border-radius: var(--cl-radius-pill);
	background-color: var(--cl-black);
	color: var(--cl-white);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--cl-dur) var(--cl-ease), color var(--cl-dur) var(--cl-ease);
}

.cl-btn:hover {
	background-color: var(--cl-white);
	color: var(--cl-black);
}

.cl-btn--sm {
	padding: 10px 20px;
	font-size: 14px;
}

/* ---------------------------------------------------------------------------
 * Comments & widgets
 * ------------------------------------------------------------------------ */

.comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list li {
	padding: 20px 0;
	border-bottom: 1px solid var(--cl-border);
}

.comment-respond {
	margin-top: 36px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--cl-border);
	border-radius: var(--cl-radius-sm);
	font-family: inherit;
	font-size: 15px;
}

.comment-form textarea:focus,
.comment-form input:focus {
	outline: none;
	border-color: var(--cl-black);
}

.cl-widget {
	margin-bottom: 32px;
}

.cl-widget__title {
	margin: 0 0 14px;
	font-size: 17px;
}

/* ---------------------------------------------------------------------------
 * Accessibility & motion
 * ------------------------------------------------------------------------ */

:focus-visible {
	outline: 2px solid var(--cl-black);
	outline-offset: 2px;
}

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

	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

@media (max-width: 767px) {
	.cl-main {
		padding-block: 36px;
	}

	.cl-entry__content {
		font-size: 16px;
	}

	.cl-fallback-header__inner {
		min-height: 62px;
	}
}

/* Prevent wide Elementor/plugin elements from creating horizontal page drift. */
html,
body {
	max-width: 100%;
	overflow-x: hidden;
}

@supports (overflow: clip) {
	html,
	body {
		overflow-x: clip;
	}
}

@media (max-width: 767px) {
	.elementor-location-header,
	.elementor-location-header .elementor,
	.elementor-location-header .elementor-section,
	.cl-nav,
	.cl-nav__inner {
		max-width: 100%;
	}

	.cl-nav__inner {
		width: 100%;
		padding-inline: 14px;
		gap: 10px;
	}

	.cl-nav__start,
	.cl-nav__end,
	.cl-nav__actions,
	.cl-nav__action,
	.cl-nav__burger {
		flex-shrink: 0;
	}

	.cl-nav__drawer {
		width: min(400px, 100vw);
		max-width: 100vw;
	}

	/* The diagonal arrow falls back to an emoji-style blue icon on iOS. */
	.cl-social-gallery__follow-arrow {
		display: none !important;
	}
}
