/* =====================================================================
 * Social Media page — css/social-media.css
 *
 * Loaded only on page-social-media.php (add-ons/utils/social-media-styles.php),
 * so selectors are scoped under body.page and it's safe to set page-level bits
 * like smooth scrolling. Builds on the theme's .page-hero (css/pages.css).
 *
 * Signature: the social links are tactile, brand-colored "tap tiles" — big,
 * glossy, pressable — because this is a QR-scan landing and the visitor is on a
 * phone. Colors come per-button from --sm-brand / --sm-ink (set in PHP from
 * petland_social_meta()), so one rule paints every platform, gradients included.
 *
 * Sections:
 *   1. Page-level (smooth scroll, anchor offsets)
 *   2. Hero (celebratory) + floating orb cluster
 *   3. Follow section (intro, jump chips)
 *   4. Location card
 *   5. Social tap-tile buttons (the signature)
 *   6. Supporting store info (phone / address / hours / map)
 *   7. Closing note
 *   8. Motion + reduced-motion
 * =================================================================== */

/* ---------------------------------------------------------------------
 * 1. Page-level
 * ------------------------------------------------------------------- */
body.page .sm-follow,
body.page .sm-loc {
	scroll-margin-top: 90px; /* clear the sticky header when jumping */
}

/* ---------------------------------------------------------------------
 * 2. Hero
 * ------------------------------------------------------------------- */
body.page .sm-hero {
	padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

body.page .sm-hero__grid {
	display: grid;
	gap: 1.5rem;
}

body.page .sm-hero .page-hero__title {
	font-size: clamp(2rem, 5vw, 3.15rem) !important;
	line-height: 1.06;
	margin: 0 0 0.75rem !important;
}

body.page .sm-hero .page-hero__lede {
	max-width: 34rem;
}

body.page .sm-hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.4rem;
}

body.page .sm-hero__cta .btn {
	border-radius: 999px;
}

body.page .sm-hero__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.15rem;
	list-style: none;
	margin: 1.35rem 0 0;
	padding: 0;
}

body.page .sm-hero__pills li {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #4b5563;
}

body.page .sm-hero__pills .bi {
	color: #F26322;
	font-size: 0.85rem;
}

/* Floating orb cluster — desktop delight only; hidden on phones so the real
   follow buttons stay high on the page for QR scanners. */
body.page .sm-hero__visual {
	display: none;
	position: relative;
}

body.page .sm-hero__visual::before {
	content: "";
	position: absolute;
	inset: -10% 5%;
	background: radial-gradient(closest-side, rgba(242, 99, 34, 0.16), rgba(242, 99, 34, 0) 70%);
	z-index: 0;
}

body.page .sm-hero__orbs {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.9rem;
	max-width: 340px;
	margin-inline: auto;
}

body.page .sm-orb {
	display: grid;
	place-items: center;
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: var(--sm-brand, #F26322);
	color: var(--sm-ink, #fff);
	font-size: 2rem;
	box-shadow: 0 12px 26px rgba(17, 17, 17, 0.16);
}

/* Organic scatter via margins (transform is reserved for the float animation) */
body.page .sm-orb:nth-child(2) { margin-top: 1.5rem; width: 66px; height: 66px; font-size: 1.7rem; }
body.page .sm-orb:nth-child(3) { margin-top: -0.6rem; width: 86px; height: 86px; font-size: 2.2rem; }
body.page .sm-orb:nth-child(4) { margin-top: 1.1rem; width: 72px; height: 72px; font-size: 1.85rem; }
body.page .sm-orb:nth-child(5) { margin-top: -0.4rem; }
body.page .sm-orb:nth-child(6) { margin-top: 1.3rem; width: 64px; height: 64px; font-size: 1.6rem; }

@media (min-width: 992px) {
	body.page .sm-hero__grid--split {
		grid-template-columns: 1.1fr 0.9fr;
		align-items: center;
		gap: 2rem;
	}

	body.page .sm-hero__visual {
		display: block;
	}
}

/* ---------------------------------------------------------------------
 * 3. Follow section
 * ------------------------------------------------------------------- */
body.page .sm-follow {
	padding: clamp(1.5rem, 4vw, 3rem) 0;
}

body.page .sm-follow__head {
	max-width: 680px;
	margin: 0 auto clamp(1.5rem, 3vw, 2rem);
	text-align: center;
}

body.page .sm-follow__title {
	font-size: clamp(1.6rem, 3.5vw, 2.25rem) !important;
	font-weight: 800 !important;
	letter-spacing: -0.02em;
	color: #111 !important;
	margin: 0 0 0.6rem !important;
}

body.page .sm-follow__intro {
	color: #4b5563;
	font-size: 1.05rem;
	line-height: 1.6;
	margin: 0 auto;
	max-width: 620px;
}

body.page .sm-follow__hint {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0.9rem 0 0;
	color: #F26322;
	font-weight: 700;
	font-size: 0.92rem;
}

body.page .sm-follow__empty {
	max-width: 520px;
	margin: 0 auto;
	text-align: center;
	color: #6b7280;
	background: #fff;
	border: 1px dashed #e7d8cd;
	border-radius: 16px;
	padding: 2rem 1.5rem;
	font-weight: 600;
}

body.page .sm-follow__empty .bi {
	color: #F26322;
}

/* Jump chips (multi-location) */
body.page .sm-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 0 1.75rem;
}

body.page .sm-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.95rem;
	background: #fff;
	border: 1px solid #eadfd7;
	border-radius: 999px;
	color: #111;
	text-decoration: none;
	font-weight: 700;
	font-size: 0.9rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

body.page .sm-chip .bi {
	color: #F26322;
}

body.page .sm-chip:hover {
	color: #d14d16;
	border-color: rgba(242, 99, 34, 0.5);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(242, 99, 34, 0.14);
}

/* Location list */
body.page .sm-locs {
	display: grid;
	gap: 1.25rem;
}

/* ---------------------------------------------------------------------
 * 4. Location card
 * ------------------------------------------------------------------- */
body.page .sm-loc {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 20px;
	padding: clamp(1.15rem, 2.5vw, 1.65rem);
	box-shadow: 0 6px 22px rgba(17, 17, 17, 0.06);
}

body.page .sm-loc--solo {
	max-width: 680px;
	margin-inline: auto;
}

body.page .sm-loc__head {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding-bottom: 1rem;
	margin-bottom: 1.15rem;
	border-bottom: 1px solid #f3eee9;
}

body.page .sm-loc__pin {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 13px;
	background: linear-gradient(135deg, var(--brand-fill) 0%, #b34700 100%);
	color: #fff;
	font-size: 1.3rem;
	box-shadow: 0 6px 14px rgba(242, 99, 34, 0.28);
}

body.page .sm-loc__name {
	font-size: clamp(1.15rem, 2.4vw, 1.4rem) !important;
	font-weight: 800 !important;
	letter-spacing: -0.01em;
	color: #111 !important;
	margin: 0 !important;
	line-height: 1.2;
}

body.page .sm-loc__where {
	margin: 0.15rem 0 0;
	color: #6b7280;
	font-size: 0.9rem;
}

body.page .sm-loc__grid {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 992px) {
	body.page .sm-loc:not(.sm-loc--solo) .sm-loc__grid {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
}

/* ---------------------------------------------------------------------
 * 5. Social tap-tile buttons — THE signature element
 * ------------------------------------------------------------------- */
body.page .sm-social-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

body.page .sm-social-btn {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	gap: 0.8rem;
	width: 100%;
	min-height: 56px;
	padding: 0.8rem 1rem;
	border-radius: 15px;
	background: var(--sm-brand, #F26322);
	color: var(--sm-ink, #fff) !important;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 1.02rem;
	line-height: 1.2;
	box-shadow: 0 2px 6px rgba(17, 17, 17, 0.09);
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

/* Glossy top highlight → the tactile "app tile" feel */
body.page .sm-social-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 45%);
	pointer-events: none;
}

body.page .sm-social-btn__icon {
	position: relative;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.22);
	font-size: 1.35rem;
}

body.page .sm-social-btn__label {
	position: relative;
	flex: 1;
	text-align: left;
}

body.page .sm-social-btn__chev {
	position: relative;
	font-size: 1rem;
	opacity: 0.85;
	transition: transform 0.18s ease;
}

body.page .sm-social-btn:hover {
	color: var(--sm-ink, #fff) !important;
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(17, 17, 17, 0.18);
	filter: brightness(1.05);
}

body.page .sm-social-btn:hover .sm-social-btn__chev {
	transform: translateX(3px);
}

body.page .sm-social-btn:active {
	transform: translateY(0) scale(0.99);
	box-shadow: 0 2px 5px rgba(17, 17, 17, 0.12);
}

body.page .sm-social-btn:focus-visible {
	outline: 3px solid rgba(17, 17, 17, 0.55);
	outline-offset: 3px;
}

body.page .sm-loc__nosocial {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	text-align: center;
	color: #6b7280;
	background: #faf6f2;
	border: 1px dashed #e7d8cd;
	border-radius: 14px;
	padding: 1.5rem 1.25rem;
	font-weight: 600;
	margin: 0;
}

body.page .sm-loc__nosocial .bi {
	color: #F26322;
}

/* ---------------------------------------------------------------------
 * 6. Supporting store info
 * ------------------------------------------------------------------- */
body.page .sm-loc__info {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

body.page .sm-loc__meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

body.page .sm-loc__link {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.6rem;
	color: #374151 !important;
	text-decoration: none !important;
	font-size: 0.95rem;
	line-height: 1.45;
}

body.page .sm-loc__link .bi {
	color: #F26322;
	margin-top: 0.1rem;
	flex: 0 0 auto;
}

body.page .sm-loc__link:hover {
	color: #111 !important;
}

body.page .sm-loc__line2 {
	display: block;
	color: #6b7280;
}

body.page .sm-loc__directions {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	margin-top: 0.2rem;
	color: #F26322;
	font-weight: 700;
	font-size: 0.85rem;
}

body.page .sm-loc__link:hover .sm-loc__directions {
	color: #d14d16;
}

body.page .sm-loc__hours {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	color: #6b7280;
	font-size: 0.9rem;
}

body.page .sm-loc__hours > .bi {
	color: #F26322;
	margin-top: 0.1rem;
	flex: 0 0 auto;
}

body.page .sm-loc__hours-title {
	display: block;
	font-weight: 700;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #111;
	margin-bottom: 0.15rem;
}

body.page .sm-loc__hours-body {
	line-height: 1.5;
}

body.page .sm-loc__map {
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid #eee;
	background: #f3f4f6;
}

/* ---------------------------------------------------------------------
 * 7. Closing note
 * ------------------------------------------------------------------- */
body.page .sm-closer {
	padding: clamp(1rem, 3vw, 2rem) 0 clamp(2rem, 5vw, 3.5rem);
}

body.page .sm-closer__panel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	background: linear-gradient(135deg, #fff7f3 0%, #ffffff 100%);
	border: 1px solid rgba(242, 99, 34, 0.2);
	border-radius: 20px;
	padding: clamp(1.35rem, 3vw, 2.1rem);
	box-shadow: 0 4px 16px rgba(242, 99, 34, 0.06);
}

body.page .sm-closer__copy {
	flex: 1 1 320px;
	min-width: 0;
}

body.page .sm-closer__title {
	font-size: clamp(1.3rem, 2.6vw, 1.7rem) !important;
	font-weight: 800 !important;
	letter-spacing: -0.01em;
	color: #111 !important;
	margin: 0 0 0.35rem !important;
}

body.page .sm-closer__text {
	color: #4b5563;
	font-size: 1.02rem;
	line-height: 1.55;
	margin: 0;
}

body.page .sm-closer__btn {
	flex: 0 0 auto;
	border-radius: 999px;
}

/* ---------------------------------------------------------------------
 * 8. Motion — opt-in only, never blocks content if it fails
 * ------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}

	body.page .sm-social-btn {
		opacity: 0;
		animation: sm-rise 0.5s ease forwards;
		animation-delay: calc(var(--i, 0) * 60ms);
	}

	body.page .sm-orb {
		animation: sm-float 5s ease-in-out infinite;
		animation-delay: calc(var(--i, 0) * -0.6s);
	}

	@keyframes sm-rise {
		from { opacity: 0; transform: translateY(12px); }
		to   { opacity: 1; transform: none; }
	}

	@keyframes sm-float {
		0%, 100% { transform: translateY(0); }
		50%      { transform: translateY(-10px); }
	}
}
