/**
 * components.css — buttons, cards, forms and other reusable pieces.
 */

/* ---------------------------------------------------------------- Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 1.0625rem 2.25rem;
	border: 1px solid transparent;
	border-radius: var(--radius-pill);
	font-family: var(--font-body);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
	transform: translateY(-1px);
}

/* ---- Button motion: lift, soft glow and a light sweep on hover ---- */
@media (prefers-reduced-motion: no-preference) {
	:is(a, button).btn {
		position: relative;
		overflow: hidden;
		transition:
			background-color 0.35s ease,
			color 0.35s ease,
			border-color 0.35s ease,
			box-shadow 0.35s ease,
			scale 0.4s cubic-bezier(0.34, 1.7, 0.5, 1),
			transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
	}

	:is(a, button).btn::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
		transform: translateX(-130%);
		pointer-events: none;
	}

	:is(a, button).btn:hover,
	:is(a, button).btn:focus-visible {
		transform: translateY(-3px);
		box-shadow: 0 12px 24px -10px rgba(201, 169, 110, 0.75);
	}

	:is(a, button).btn:hover::after,
	:is(a, button).btn:focus-visible::after {
		transform: translateX(130%);
		transition: transform 0.8s ease;
	}

	/* Hover: a quick squeeze that springs back. */
	:is(a, button).btn:hover {
		animation: drdeepti-squish 0.6s cubic-bezier(0.3, 1.3, 0.5, 1) 1;
	}

	/* Press: shrinks while held, then bounces back on release. */
	:is(a, button).btn:active {
		animation: none;
		scale: 0.94;
		transform: translateY(-1px);
		box-shadow: 0 6px 14px -8px rgba(201, 169, 110, 0.7);
		transition-duration: 0.12s;
	}

	/* Arrow icons inside buttons and text links nudge forward. */
	:is(a, button).btn svg,
	.guide-card__link svg,
	.service-card__link svg,
	.service-feature__link svg {
		transition: transform 0.3s ease;
	}

	:is(a, button).btn:hover svg,
	.guide-card__link:hover svg,
	.service-card__link:hover svg,
	.service-feature__link:hover svg {
		transform: translateX(4px);
	}

	/* The hero call-to-action: soft gold waves that ripple outward. */
	.btn--glow {
		animation: drdeepti-wave 2.6s ease-out infinite;
	}

	/* On hover the glow gives way to the squeeze above. */
	.btn--glow:hover,
	.btn--glow:focus-visible {
		animation-play-state: paused;
	}
}

@keyframes drdeepti-squish {
	0% {
		scale: 1;
	}
	30% {
		scale: 0.9;
	}
	65% {
		scale: 1.05;
	}
	100% {
		scale: 1;
	}
}

@keyframes drdeepti-wave {
	0% {
		box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.55), 0 0 0 0 rgba(201, 169, 110, 0.35);
	}
	70% {
		box-shadow: 0 0 0 16px rgba(201, 169, 110, 0), 0 0 0 30px rgba(201, 169, 110, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(201, 169, 110, 0), 0 0 0 0 rgba(201, 169, 110, 0);
	}
}

.btn:active {
	transform: translateY(0);
}

.btn--primary {
	background: var(--gold);
	border-color: var(--gold);
	color: #1f1b17;
}

.btn--primary:hover {
	background: color-mix(in srgb, var(--gold) 86%, #000);
	border-color: color-mix(in srgb, var(--gold) 86%, #000);
}

.btn--outline {
	background: transparent;
	border-color: var(--gold);
	color: var(--gold);
}

.btn--outline:hover {
	background: var(--gold);
	color: #1f1b17;
}

.btn--ghost {
	background: transparent;
	border-color: rgba(28, 33, 18, 0.25);
	color: var(--ink);
}

.btn--ghost:hover {
	border-color: var(--ink);
}

.btn--block {
	width: 100%;
}

/* A button helper rendered as a <span> has no link, so it must not look
   clickable. */
span.btn {
	cursor: default;
}

span.btn:hover {
	transform: none;
}

/* ------------------------------------------------------------ Section head */

.section-head {
	max-width: 46rem;
	margin: 0 auto var(--space-xl);
	text-align: center;
}

.section-head .eyebrow {
	display: inline-block;
	position: relative;
	margin-bottom: var(--space-md);
	padding-bottom: 0.65rem;
}

/* The short gold rule under the eyebrow in the design. */
.section-head .eyebrow::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 72%;
	height: 1px;
	transform: translateX(-50%);
	background: var(--gold);
}

.section-head--light .eyebrow {
	color: var(--gold);
}

.section-head--light .section-title {
	color: var(--white);
}

/* ------------------------------------------------------------------ Icons */

.icon {
	flex: 0 0 auto;
}

.icon--custom {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.icon-bubble,
.service-card__icon,
.service-feature__icon,
.feature__icon,
.contact-row__icon {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: var(--radius-pill);
	background: color-mix(in srgb, var(--gold) 16%, transparent);
	color: var(--gold);
	flex: 0 0 auto;
}

/* ------------------------------------------------------------------ Forms */

.field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0 0 1.6rem;
}

.field__label {
	font-family: var(--font-body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gold);
	margin-bottom: 0.15rem;
	white-space: nowrap;
}

.field__input {
	width: 100%;
	padding: 0.65rem 0;
	border: 0;
	border-bottom: 1px solid rgba(28, 33, 18, 0.15);
	border-radius: 0;
	background: transparent;
	font-family: var(--font-body);
	font-size: 0.9375rem;
	color: var(--ink);
	transition: border-color 0.2s ease;
}

.field__input::placeholder {
	color: #A8A49F;
	opacity: 1;
}

.field__input:focus {
	border-bottom-color: var(--gold);
	outline: none;
}

.field__input:focus-visible {
	outline: none;
	border-bottom-color: var(--gold);
}

.field__input--area {
	resize: vertical;
	min-height: 80px;
	padding: 0.65rem 0;
}

.field--select {
	position: relative;
}

.field--select .field__input {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 2rem;
	cursor: pointer;
}

/* The clean chevron arrow on the right */
.field--select::after {
	content: "";
	position: absolute;
	right: 0.35rem;
	bottom: 1.15rem;
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--ink);
	border-bottom: 2px solid var(--ink);
	transform: rotate(45deg);
	pointer-events: none;
}

.search-form {
	display: flex;
	gap: var(--space-xs);
	max-width: 32rem;
}

.search-form__input {
	flex: 1 1 auto;
	padding: 0.8rem 1.1rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	font: inherit;
	background: var(--white);
}

.search-form__submit {
	padding-inline: 1.5rem;
}

/* ------------------------------------------------------------- Post cards */

.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--space-lg);
	margin-bottom: var(--space-xl);
}

.post-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.post-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-card);
}

.post-card__image {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.post-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: var(--space-md);
}

.post-card__date {
	margin: 0;
	font-size: var(--step--1);
	color: var(--ink-soft);
}

.post-card__title {
	margin: 0;
	font-size: var(--step-1);
}

.post-card__title a {
	text-decoration: none;
}

.post-card__excerpt {
	margin: 0;
	font-size: var(--step--1);
	color: var(--ink-soft);
}

.post-card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	color: var(--gold);
	text-decoration: none;
}

.post-card__more:hover .icon {
	transform: translateX(3px);
}

.post-card__more .icon {
	transition: transform 0.2s ease;
}

/* ------------------------------------------------------- Entries & widgets */

.entry__thumb {
	margin: 0 0 var(--space-lg);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.entry__meta {
	display: flex;
	gap: 0.6rem;
	margin: 0;
	font-size: var(--step--1);
	color: var(--ink-soft);
}

.entry__content > * + * {
	margin-top: var(--space-md);
}

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

.entry__tags {
	margin-top: var(--space-lg);
	padding-top: var(--space-md);
	border-top: 1px solid var(--line);
	font-size: var(--step--1);
}

.widget {
	margin-bottom: var(--space-lg);
	padding: var(--space-md);
	background: var(--sand);
	border-radius: var(--radius-md);
}

.widget__title {
	margin: 0 0 var(--space-sm);
	font-size: var(--step-1);
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.5rem;
}

/* -------------------------------------------------- Breadcrumbs & paging */

.breadcrumbs {
	margin-bottom: var(--space-md);
	font-size: var(--step--1);
	color: var(--ink-soft);
}

.breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.breadcrumbs__item + .breadcrumbs__item::before {
	content: "/";
	margin-right: 0.5rem;
	color: var(--gold);
}

.pagination__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
	justify-content: center;
}

.pagination__item .page-numbers {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding-inline: 0.75rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	text-decoration: none;
	font-size: var(--step--1);
}

.pagination__item .page-numbers.current,
.pagination__item .page-numbers:hover {
	background: var(--gold);
	border-color: var(--gold);
	color: #1f1b17;
}

/* ------------------------------------------------------- Comments & 404 */

.comments {
	margin-top: var(--space-2xl);
	padding-top: var(--space-lg);
	border-top: 1px solid var(--line);
}

.comments__list {
	margin: 0 0 var(--space-lg);
	padding: 0;
	list-style: none;
}

.comments__list ol {
	list-style: none;
	padding-left: var(--space-md);
}

.comments__list .comment-body {
	padding: var(--space-md) 0;
	border-bottom: 1px solid var(--line);
}

.comment-form .comment-form-comment textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
	width: 100%;
	max-width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	font: inherit;
}

.no-results,
.error-404 {
	text-align: center;
	display: grid;
	gap: var(--space-md);
	justify-items: center;
}

.error-404__text {
	max-width: 44ch;
	color: var(--ink-soft);
}
