/*
 * Casetti: site-wide look on the theme's tokens (variables.css). Loaded on every page after the theme's base CSS and
 * shop.css (inc/site/setup.php). Shared components used by the site's parts: .c-container, .c-head (eyebrow, display
 * title, lead, "all" link), .c-btn. Parts with their own stylesheet: assets/css/site/<part>.css (MAP.md).
 */

/* Base type: Roboto text, Poppins headings (as the live Astra settings). */
body {
	color: var(--myco-color-muted);
	font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--myco-color-primary);
	font-family: var(--casetti-font-heading);
	font-weight: 600;
}

h1 { font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1.3; }
h2 { font-size: clamp(1.875rem, 3vw, 2.5rem); line-height: 1.3; }
h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.3; }
h4 { font-size: 1.5rem; line-height: 1.2; }
h5 { font-size: 1rem; line-height: 1.2; }
h6 { font-size: 0.75rem; line-height: 1.25; }

a { color: var(--casetti-ink); }
a:hover { color: var(--myco-color-accent); }

:focus-visible {
	outline: 2px solid var(--casetti-gold);
	outline-offset: 2px;
}

/* Container of the site's own sections (1240px including its gutters, as the live site's sections; the theme's
 * .myco-container stays 1200px). */
.c-container {
	width: 100%;
	max-width: var(--casetti-container-home);
	margin-inline: auto;
	padding-inline: var(--casetti-gutter);
}

/* Section heading: eyebrow, display title (second line in italic gold), lead text, "all" link on the right. */
.c-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 48px;
}

.c-eyebrow {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 18px;
	color: var(--casetti-gold);
	font: 500 11px/1.4 var(--myco-font-sans);
	letter-spacing: 0.32em;
	text-transform: uppercase;
}

.c-eyebrow::before {
	content: "";
	flex: 0 0 40px;
	height: 1px;
	background: currentColor;
}

.c-title {
	margin: 0;
	color: var(--casetti-ink-strong);
	font-family: var(--casetti-font-display);
	font-size: clamp(36px, 4.4vw, 58px);
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.01em;
}

.c-title em {
	display: block;
	color: var(--casetti-gold);
	font-style: italic;
}

.c-lead {
	max-width: 460px;
	margin: 16px 0 0;
	color: var(--casetti-muted);
	font-size: 15px;
	line-height: 1.6;
}

.c-all {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
	padding-bottom: 6px;
	border-bottom: 1px solid currentColor;
	color: var(--casetti-ink);
	font: 500 12px/1 var(--myco-font-sans);
	letter-spacing: 0.22em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

.c-all svg {
	width: 15px;
	height: 15px;
	transition: transform var(--myco-transition);
}

.c-all:hover {
	color: var(--casetti-gold);
}

.c-all:hover svg {
	transform: translateX(3px);
}

/* Dark sections invert the heading. */
.c-dark .c-title { color: #fff; }
.c-dark .c-title em,
.c-dark .c-eyebrow { color: var(--casetti-gold-on-dark); }
.c-dark .c-lead { color: var(--casetti-on-dark-muted); }
.c-dark .c-all { color: #fff; }

@media (max-width: 767px) {
	.c-head {
		flex-direction: column;
		align-items: flex-start;
		margin-bottom: 28px;
	}
}

/* Buttons of the site's own parts (WooCommerce's and the theme's .myco-button keep layout.css). */
.c-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 46px;
	padding: 14px 26px;
	border: 1px solid var(--casetti-ink);
	background: var(--casetti-ink);
	color: #fff;
	font: 500 12px/1 var(--myco-font-sans);
	letter-spacing: 0.2em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background var(--myco-transition), color var(--myco-transition), border-color var(--myco-transition);
}

.c-btn:hover { background: #000; color: #fff; }
.c-btn svg { width: 15px; height: 15px; }
.c-btn--outline { background: transparent; color: var(--casetti-ink); }
.c-btn--outline:hover { background: var(--casetti-ink); color: #fff; }
.c-btn--light { border-color: #fff; background: #fff; color: var(--casetti-ink); }
.c-btn--light:hover { background: transparent; color: #fff; }
.c-btn--gold { border-color: var(--myco-color-accent); background: var(--myco-color-accent); color: var(--casetti-ink); }
.c-btn--gold:hover { border-color: var(--casetti-gold-hover); background: var(--casetti-gold-hover); color: var(--casetti-ink); }

/* An image slot of a fixed ratio with a warm placeholder until the image paints. */
.c-media {
	position: relative;
	overflow: hidden;
	background: var(--casetti-placeholder);
}

.c-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
	.c-all svg { transition: none; }
}
