/**
 * Weddicious brand layer for Blocksy.
 *
 * Sits on top of Blocksy and its Customizer output. Doubled `:root:root`
 * and `body` prefixes intentionally out-rank Blocksy's own variable
 * declarations so the brand holds even before the Customizer is configured.
 * Brand components (.wd-*) are in components.css.
 */

/* ------------------------------------------------------------------ *
 * 1. Tokens
 * ------------------------------------------------------------------ */
:root {
	--wd-ivory: #F7F3EC;
	--wd-linen: #EFE7DA;
	--wd-paper: #FFFDF9;
	--wd-espresso: #2B211C;
	--wd-body2: #4A3D35;
	--wd-taupe: #6B5B50;
	--wd-bronze: #9F6241;
	--wd-bronze-deep: #7A4A30;
	--wd-blush: #E8CFC4;
	--wd-sage: #A9B39A;
	--wd-sage-deep: #3F5A34;
	--wd-rule: #DCD1C1;
	--wd-rule-soft: #E4DACB;

	--wd-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--wd-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--wd-script: 'Allura', cursive;

	--wd-radius: 4px;
	--wd-radius-btn: 2px;
	--wd-tracking: 0.22em;
}

/* ------------------------------------------------------------------ *
 * 2. Blocksy variable overrides
 *    Palette slots follow Blocksy's convention:
 *    1 accent/links · 2 hover · 3 text · 4 headings · 5 borders
 *    6 soft background · 7 site background · 8 surfaces
 * ------------------------------------------------------------------ */
:root:root {
	--theme-palette-color-1: var(--wd-bronze-deep);
	--theme-palette-color-2: var(--wd-espresso);
	--theme-palette-color-3: var(--wd-espresso);
	--theme-palette-color-4: var(--wd-espresso);
	--theme-palette-color-5: var(--wd-rule);
	--theme-palette-color-6: var(--wd-linen);
	--theme-palette-color-7: var(--wd-ivory);
	--theme-palette-color-8: var(--wd-paper);

	--theme-text-color: var(--wd-espresso);
	--theme-headings-color: var(--wd-espresso);
	--theme-link-initial-color: var(--wd-bronze-deep);
	--theme-link-hover-color: var(--wd-espresso);
	--theme-border-color: var(--wd-rule);
	--theme-selection-text-color: var(--wd-paper);
	--theme-selection-background-color: var(--wd-bronze-deep);

	--theme-button-background-initial-color: var(--wd-espresso);
	--theme-button-background-hover-color: var(--wd-bronze-deep);
	--theme-button-text-initial-color: var(--wd-ivory);
	--theme-button-text-hover-color: var(--wd-paper);
	--theme-button-border-radius: var(--wd-radius-btn);

	--theme-font-family: var(--wd-sans);
	--theme-font-size: 17px;
	--theme-line-height: 1.7;
}

/* ------------------------------------------------------------------ *
 * 3. Base
 * ------------------------------------------------------------------ */
body.weddicious {
	background-color: var(--wd-ivory);
	color: var(--wd-espresso);
	font-family: var(--wd-sans);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.weddicious ::selection {
	background: var(--wd-bronze-deep);
	color: var(--wd-paper);
}

body.weddicious :focus-visible {
	outline: 2px solid var(--wd-bronze-deep);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ *
 * 4. Headings — editorial serif
 * ------------------------------------------------------------------ */
body.weddicious h1,
body.weddicious h2,
body.weddicious h3,
body.weddicious h4,
body.weddicious .entry-title,
body.weddicious .page-title {
	--theme-font-family: var(--wd-display);
	--theme-font-weight: 500;
	font-family: var(--wd-display);
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wd-espresso);
}

body.weddicious h1,
body.weddicious .page-title {
	--theme-font-size: clamp(2.5rem, 6vw, 4rem);
	--theme-line-height: 1.05;
	font-size: clamp(2.5rem, 6vw, 4rem);
	line-height: 1.05;
}

body.weddicious h2 {
	--theme-font-size: clamp(2rem, 4.5vw, 2.75rem);
	--theme-line-height: 1.1;
	font-size: clamp(2rem, 4.5vw, 2.75rem);
	line-height: 1.1;
}

body.weddicious h3 {
	--theme-font-size: clamp(1.5rem, 3vw, 1.75rem);
	--theme-line-height: 1.2;
	font-size: clamp(1.5rem, 3vw, 1.75rem);
	line-height: 1.2;
}

body.weddicious h4 {
	--theme-font-size: 1.375rem;
	font-size: 1.375rem;
	line-height: 1.25;
}

/* Small headings become tracked labels. */
body.weddicious h5,
body.weddicious h6 {
	--theme-font-family: var(--wd-sans);
	font-family: var(--wd-sans);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: var(--wd-tracking);
	text-transform: uppercase;
	color: var(--wd-bronze-deep);
}

/* ------------------------------------------------------------------ *
 * 5. Header & navigation
 * ------------------------------------------------------------------ */
/* Non-Blocksy fallback only. Blocksy sizes its logo (.site-logo-container img)
   from the Customizer's Logo Max Height — never override that here. */
body.weddicious .custom-logo {
	max-width: 100%;
	height: auto;
}

/* ------------------------------------------------------------------ *
 * 5b. Menu
 * ------------------------------------------------------------------ */
body.weddicious .ct-header .menu > li > a,
body.weddicious .ct-header .ct-menu-link {
	font-family: var(--wd-sans);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

body.weddicious .ct-header .site-title,
body.weddicious .ct-header .site-title a {
	font-family: var(--wd-script);
	font-weight: 400;
	font-size: clamp(2.5rem, 5vw, 3.5rem);
	letter-spacing: 0;
	text-transform: none;
	line-height: 1;
}

body.weddicious .ct-header .site-description {
	font-family: var(--wd-sans);
	font-size: 0.6875rem;
	letter-spacing: 0.42em;
	text-transform: uppercase;
	color: var(--wd-bronze-deep);
}

/* ------------------------------------------------------------------ *
 * 6. Archive cards
 * ------------------------------------------------------------------ */
body.weddicious .entries .entry-card {
	box-shadow: none;
}

body.weddicious .entries[data-cards="boxed"] .entry-card {
	background: var(--wd-paper);
	border: 1px solid var(--wd-rule-soft);
	border-radius: var(--wd-radius);
}

body.weddicious .entry-card .ct-media-container,
body.weddicious .entry-card .ct-media-container img {
	border-radius: var(--wd-radius);
}

body.weddicious .entry-card .entry-title {
	font-size: clamp(1.375rem, 2.4vw, 1.625rem);
	line-height: 1.2;
}

body.weddicious .entry-card .entry-title a {
	color: var(--wd-espresso);
	text-decoration: none;
}

body.weddicious .entry-card .entry-title a:hover {
	color: var(--wd-bronze-deep);
}

/* Category labels and post meta */
body.weddicious .entry-meta {
	font-family: var(--wd-sans);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	color: var(--wd-taupe);
}

body.weddicious .entry-meta .meta-categories a,
body.weddicious .entry-meta [data-type="pill"] a,
body.weddicious .entry-meta [data-type="simple"] .meta-categories a {
	font-weight: 600;
	letter-spacing: var(--wd-tracking);
	text-transform: uppercase;
	color: var(--wd-bronze-deep);
	background: transparent;
	padding: 0;
}

body.weddicious .entry-excerpt {
	color: var(--wd-body2);
}

/* ------------------------------------------------------------------ *
 * 7. Single post content
 * ------------------------------------------------------------------ */
body.weddicious .entry-content {
	font-size: 1.0625rem;
	line-height: 1.7;
}

body.weddicious .entry-content a:not(.wp-block-button__link):not(.wp-element-button):not(.wd-home *):not(.wd-cover *) {
	color: var(--wd-bronze-deep);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

body.weddicious .entry-content a:not(.wp-block-button__link):not(.wp-element-button):not(.wd-home *):not(.wd-cover *):hover {
	color: var(--wd-espresso);
}

body.weddicious .entry-content img,
body.weddicious .entry-content .wp-block-image img {
	border-radius: var(--wd-radius);
}

body.weddicious .entry-content figcaption,
body.weddicious .wp-element-caption {
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--wd-taupe);
	text-align: left;
}

body.weddicious .entry-content blockquote:not(.wd-pullquote),
body.weddicious .entry-content .wp-block-quote {
	border: 0;
	border-left: 1px solid var(--wd-bronze);
	padding: 0 0 0 1.5rem;
	margin-inline: 0;
	font-family: var(--wd-display);
	font-style: italic;
	font-size: clamp(1.375rem, 2.6vw, 1.75rem);
	line-height: 1.35;
	color: var(--wd-espresso);
}

body.weddicious .entry-content .wp-block-pullquote {
	border-top: 1px solid var(--wd-espresso);
	border-bottom: 1px solid var(--wd-espresso);
	padding: 2.5rem 0;
}

body.weddicious .entry-content .wp-block-pullquote blockquote p {
	font-family: var(--wd-display);
	font-style: italic;
	font-size: clamp(1.625rem, 3.4vw, 2rem);
	line-height: 1.3;
}

body.weddicious .entry-content hr,
body.weddicious .entry-content .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--wd-rule);
	opacity: 1;
}

/* ------------------------------------------------------------------ *
 * 8. Buttons & forms
 * ------------------------------------------------------------------ */
body.weddicious .wp-block-button__link,
body.weddicious .wp-element-button,
body.weddicious .ct-button,
body.weddicious button[type="submit"],
body.weddicious input[type="submit"] {
	min-height: 44px;
	padding: 0.875rem 1.75rem;
	border-radius: var(--wd-radius-btn);
	font-family: var(--wd-sans);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	box-shadow: none;
}

body.weddicious .is-style-outline > .wp-block-button__link,
body.weddicious .wp-block-button.is-style-outline .wp-element-button {
	background: transparent;
	color: var(--wd-espresso);
	border: 1px solid var(--wd-espresso);
}

body.weddicious .is-style-outline > .wp-block-button__link:hover {
	background: var(--wd-espresso);
	color: var(--wd-ivory);
}

body.weddicious input[type="text"],
body.weddicious input[type="email"],
body.weddicious input[type="url"],
body.weddicious input[type="tel"],
body.weddicious input[type="search"],
body.weddicious input[type="number"],
body.weddicious select,
body.weddicious textarea {
	background: var(--wd-paper);
	border: 1px solid var(--wd-rule);
	border-radius: var(--wd-radius-btn);
	color: var(--wd-espresso);
	font-family: var(--wd-sans);
}

body.weddicious input:focus,
body.weddicious select:focus,
body.weddicious textarea:focus {
	border-color: var(--wd-bronze-deep);
	outline: 2px solid var(--wd-bronze-deep);
	outline-offset: 1px;
}

/* Contact Form 7 */
body.weddicious .wpcf7 label {
	font-size: 0.875rem;
	font-weight: 500;
}

body.weddicious .wpcf7-not-valid-tip {
	color: #8A2E1F;
	font-size: 0.875rem;
}

/* ------------------------------------------------------------------ *
 * 9. Footer
 * ------------------------------------------------------------------ */
body.weddicious .ct-footer {
	font-size: 0.9375rem;
}

body.weddicious .ct-footer .widget-title,
body.weddicious .ct-footer h2,
body.weddicious .ct-footer h3 {
	font-family: var(--wd-sans);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: var(--wd-tracking);
	text-transform: uppercase;
}

/* ------------------------------------------------------------------ *
 * 10. Motion preferences
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	body.weddicious * {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* ------------------------------------------------------------------ *
 * 11. Blog archives (category pages)
 * ------------------------------------------------------------------ */

/* Intro under the title */
body.weddicious .hero-section .wd-archive-intro p {
	max-width: 60ch;
	margin: 0.75rem auto 0;
	font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
	line-height: 1.6;
	color: var(--wd-body2);
}

/* Topic tabs */
.wd-topic-nav {
	margin-top: 1.75rem;
}

.wd-topic-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.wd-topic-nav li {
	margin: 0;
}

body.weddicious .wd-topic-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1.125rem;
	border: 1px solid var(--wd-rule);
	border-radius: 999px;
	background: var(--wd-paper);
	color: var(--wd-espresso);
	font-family: var(--wd-sans);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.weddicious .wd-topic-nav a:hover {
	border-color: var(--wd-espresso);
}

body.weddicious .wd-topic-nav a[aria-current="page"] {
	background: var(--wd-espresso);
	border-color: var(--wd-espresso);
	color: var(--wd-ivory);
}

/* Blocksy hides the archive description on phones; keep the tabs visible
   there (as a sideways-scrolling row) and hide only the intro text. */
@media (max-width: 689.98px) {
	body.weddicious .hero-section .ct-hidden-sm:has(.wd-topic-nav) {
		display: block !important;
	}
	body.weddicious .hero-section .wd-archive-intro {
		display: none;
	}
	.wd-topic-nav {
		margin: 1.25rem -1rem 0;
	}
	.wd-topic-nav ul {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		padding: 0 1rem 0.25rem;
		scrollbar-width: none;
	}
	.wd-topic-nav ul::-webkit-scrollbar {
		display: none;
	}
}

/* Cards */
body.weddicious .entries .entry-card .ct-media-container {
	overflow: hidden;
}

body.weddicious .entries .entry-card .ct-media-container img {
	transition: transform 0.4s ease, opacity 0.2s ease;
}

body.weddicious .entries .entry-card:hover .ct-media-container img {
	transform: scale(1.03);
}

body.weddicious .entries .entry-card .entry-excerpt {
	font-size: 0.9375rem;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Lead story in Blocksy's Enhanced Grid */
body.weddicious .entries[data-layout="enhanced-grid"] > .entry-card:first-child .entry-title {
	font-size: clamp(1.75rem, 3.2vw, 2.5rem);
	line-height: 1.1;
}

body.weddicious .entries[data-layout="enhanced-grid"] > .entry-card:first-child .entry-excerpt {
	font-size: 1.0625rem;
	-webkit-line-clamp: 4;
}

/* Pagination */
body.weddicious .ct-pagination {
	--theme-border-color: var(--wd-rule);
}

body.weddicious .ct-pagination .page-numbers {
	min-width: 44px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	font-family: var(--wd-sans);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wd-espresso);
	text-decoration: none;
}

body.weddicious .ct-pagination .page-numbers.current {
	background: var(--wd-espresso);
	color: var(--wd-ivory);
}

body.weddicious .ct-pagination a.page-numbers:hover {
	background: var(--wd-linen);
}

body.weddicious .ct-pagination .next,
body.weddicious .ct-pagination .prev {
	padding: 0 1.25rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-size: 0.75rem;
	font-weight: 600;
}
