/**
 * Theme Name: The Website Guy
 * Description: Default child theme for The Website Guy.
 * Author: The Website Guy
 * Template: blocksy
 * Text Domain: twg-child
 */


/* =========================
   THEME VARIABLES
========================= */

:root {
    --twg-accent: var(--theme-palette-color-1);
    --twg-accent-secondary: var(--theme-palette-color-2);

    --twg-text: var(--theme-palette-color-3);
    --twg-text-soft: var(--theme-palette-color-4);

    --twg-border: var(--theme-palette-color-5);

    --twg-bg-soft: var(--theme-palette-color-6);
    --twg-bg-dark: var(--theme-palette-color-7);
    --twg-bg-light: var(--theme-palette-color-8);

    /* Change heart colour here */
    --twg-heart-color: var(--twg-accent);
}


/* =========================
   BUILT BY BAR
========================= */

.twg-built-by {
    width: 100%;
    padding: 14px 20px;

    background: var(--twg-bg-dark);
    color: var(--twg-bg-light);

    text-align: center;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.twg-built-by p {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;

    margin: 0;

    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.twg-built-by a {
    color: var(--theme-palette-color-6);

    font-weight: 700;
    text-decoration: none;

    transition: opacity 0.2s ease, transform 0.2s ease;
}

.twg-built-by a:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}


/* =========================
   FLUTTERING HEART
========================= */

.twg-heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 15px;
    height: 15px;

    color: var(--twg-heart-color);

    transform-origin: center;
    animation: twgHeartFlutter 1.35s infinite ease-in-out;
}

.twg-heart svg {
    display: block;

    width: 100%;
    height: 100%;

    fill: currentColor;
}


/* =========================
   ANIMATIONS
========================= */

@keyframes twgHeartFlutter {
    0% {
        transform: scale(1) rotate(0deg);
    }

    12% {
        transform: scale(1.3) rotate(-5deg);
    }

    24% {
        transform: scale(0.92) rotate(4deg);
    }

    38% {
        transform: scale(1.18) rotate(-3deg);
    }

    52% {
        transform: scale(1) rotate(0deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}


/* =========================
   ACCESSIBILITY
========================= */

@media (prefers-reduced-motion: reduce) {
    .twg-heart {
        animation: none;
    }
}



/* =========================
   SCROLLING TEXT
========================= */

.twg-marquee {
	width: 100vw;
	margin-left: calc(50% - 50vw);

	overflow: hidden;

	background: var(--theme-palette-color-8);
	border-top: 1px solid rgba(0, 0, 0, 0.06);

	padding: 16px 0;
}

.twg-marquee-track {
	display: flex;
	width: max-content;

	animation: twgMarquee 30s linear infinite;
	will-change: transform;
}

.twg-marquee-group {
	display: flex;
	align-items: center;
	flex-shrink: 0;

	gap: 28px;
	padding-right: 28px;
}

.twg-marquee-group span {
	white-space: nowrap;

	font-family: 'Playfair Display', serif;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0.02em;

	color: var(--theme-palette-color-4);
}

.twg-marquee-group span:nth-child(even) {
	color: rgba(0, 0, 0, 0.35);
}

@keyframes twgMarquee {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}
}

@media (max-width: 768px) {
	.twg-marquee {
		padding: 12px 0;
	}

	.twg-marquee-group {
		gap: 22px;
		padding-right: 22px;
	}

	.twg-marquee-group span {
		font-size: 16px;
	}
}

.wp-block-html:has(.twg-marquee) {
	margin: 0 !important;
}

.wp-block-html {
	margin-bottom: 0 !important;
}