/* ==========================================================================
   Adl theme — global styles (header, footer, dark mode, blog templates).
   Section styles live in the adl-core plugin.
   ========================================================================== */

:root {
	--adl-accent: var(--wp--preset--color--accent, #cc9b6a);
	--adl-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Dark mode: swap the palette, everything else follows ---------- */
html[data-theme="dark"] {
	color-scheme: dark;
	--wp--preset--color--base: #1b1918;
	--wp--preset--color--ink: #efe9e3;
	--wp--preset--color--muted: #a8a19d;
	--wp--preset--color--surface: #242120;
	--wp--preset--color--line: #383332;
	--wp--preset--color--dark: #121010;
	--wp--preset--color--darker: #0b0a0a;
	--wp--preset--color--dark-pill: #3a3534;
	--wp--preset--color--accent-soft: #3b3027;
	--wp--preset--color--accent-tint: #2a2421;
}
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; transition: background-color .3s, color .3s; }
img { max-width: 100%; height: auto; }

.adl-hl { color: var(--adl-accent); }

/* ---------- Buttons ---------- */
.wp-element-button, .wp-block-button__link { transition: background-color .25s, color .25s, transform .25s var(--adl-ease); }
.wp-block-button__link:hover { transform: translateY(-2px); }
.wp-block-button.is-style-adl-dark .wp-block-button__link { background: var(--wp--preset--color--dark); }
.wp-block-button.is-style-adl-dark .wp-block-button__link:hover { background: var(--adl-accent); }

/* Fallback header/footer (only when the companion plugin is inactive) */
.adl-fallback { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; padding: 1.2rem 5vw; }
.adl-fallback__menu { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
footer.adl-fallback { background: var(--wp--preset--color--dark); color: #fff; }

/* ---------- Blog / archive ---------- */
.adl-only-home { display: none; }
body.blog .adl-only-home { display: block; }
.adl-archive__title { margin-bottom: var(--wp--preset--spacing--50); }
.adl-post-grid { gap: 2rem !important; }
.adl-post-card {
	border: 1px solid var(--wp--preset--color--line); border-radius: 14px; padding: 1.1rem 1.1rem 1.4rem;
	display: flex; flex-direction: column; background: var(--wp--preset--color--base);
	transition: transform .35s var(--adl-ease), box-shadow .35s;
}
.adl-post-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(50, 44, 44, .08); }
.adl-post-card__img img { border-radius: 999px; filter: grayscale(1); transition: filter .4s; }
.adl-post-card:hover .adl-post-card__img img { filter: none; }
.adl-post-card__title { font-size: 1.15rem !important; margin-top: 1rem; }
.adl-post-card__title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.adl-post-card__excerpt { color: var(--wp--preset--color--muted); font-size: .9rem; flex: 1; }
.adl-post-card__more {
	display: block; text-align: center; text-decoration: none; margin-top: 1rem;
	background: var(--adl-accent); color: #fff !important; border-radius: 999px; padding: .55em 1em; font-weight: 700;
}
.adl-post-card__more:hover { background: var(--wp--preset--color--dark); }

.adl-chips { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .8rem; }
.adl-chips a {
	background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--ink);
	padding: .25em 1em; border-radius: 999px; text-decoration: none;
}
.adl-chips--muted a { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--muted); }
.adl-chips .wp-block-post-terms__separator { display: none; }

.adl-single__cover img { filter: grayscale(.2); }
.adl-single__meta > * { margin: 0; }
.wp-block-query-pagination { margin-top: var(--wp--preset--spacing--60); gap: .5rem; }
.wp-block-query-pagination-numbers .page-numbers {
	display: inline-grid; place-items: center; min-width: 2.4rem; height: 2.4rem; border-radius: 999px;
	text-decoration: none; color: var(--wp--preset--color--ink); background: var(--wp--preset--color--surface);
}
.wp-block-query-pagination-numbers .page-numbers.current { background: var(--adl-accent); color: #fff; }

.adl-search .wp-block-search__input { border-radius: 999px; border: 1px solid var(--wp--preset--color--line); padding: .7em 1.2em; background: var(--wp--preset--color--base); color: inherit; }
.adl-search .wp-block-search__button { border-radius: 999px; }

/* Elementor pages: let sections touch the header/footer */
.adl-elementor-page .wp-block-post-title { display: none; }

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