/*
Theme Name: Meraki School of Music
Theme URI: https://merakischoolofmusic.com
Author: Meraki School of Music
Author URI: https://merakischoolofmusic.com
Description: A warm, fully customizable block theme for Meraki School of Music — online 1-on-1 guitar classes for Indian families abroad. Wine & orange brand palette, Nunito + Inter typography, an editable homepage (lives in Pages), and smooth pure-CSS animations. Edit every color, font, and section from the WordPress editor.
Requires at least: 6.1
Tested up to: 6.5
Requires PHP: 7.0
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: meraki-school-of-music
Tags: full-site-editing, education, music, one-column, custom-colors, custom-logo, custom-menu, block-patterns, blog, translation-ready
*/

/* =============================================================
   Meraki School of Music — supplemental front-end styles.
   Colors, fonts, spacing live in theme.json. This file adds the
   polish theme.json can't express. ALL animation here is pure CSS:
   no JavaScript is required and content is ALWAYS visible, so the
   live site can never render blank if a script fails to load.
   ============================================================= */

/* ---------- Safety: never allow a horizontal scrollbar ----------
   Full-width (alignfull) sections are a common cause of a stray
   horizontal scroll on live sites. This guarantees it can't happen. */
html, body {
	max-width: 100%;
	overflow-x: hidden;
}
img, video, iframe { max-width: 100%; height: auto; }

/* ---------- Sticky header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
}

/* ---------- Buttons: subtle hover ---------- */
.wp-block-button__link {
	transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, filter .18s ease;
}
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(74, 23, 48, .18);
	filter: saturate(108%);
}

/* ---------- Cards ---------- */
/* overflow:hidden clips images to the rounded corners; flex column +
   height:100% keeps every card in a row equal height. */
.is-style-meraki-card {
	border-radius: 16px;
	overflow: hidden;
	background: var(--wp--preset--color--white);
	box-shadow: 0 4px 20px rgba(74, 23, 48, .07);
	border-top: 3px solid var(--wp--preset--color--orange);
	display: flex;
	flex-direction: column;
	height: 100%;
	transition: transform .2s ease, box-shadow .2s ease;
}
.is-style-meraki-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 34px rgba(74, 23, 48, .14);
}
.wp-block-column > .is-style-meraki-card { height: 100%; }

/* Course-card media band */
.meraki-card-media {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 120px;
	font-size: 2.6rem;
}

.is-style-meraki-rounded img { border-radius: 16px; }

/* ---------- Feature icons ---------- */
.meraki-ficon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.7rem;
	margin: 0 auto .4rem;
	background: var(--wp--preset--color--peach);
}

/* ---------- Navigation hover ---------- */
.wp-block-navigation .wp-block-navigation-item__content { transition: color .15s ease; }
.wp-block-navigation .wp-block-navigation-item:hover .wp-block-navigation-item__content {
	color: var(--wp--preset--color--orange);
}

/* ---------- Footer links ---------- */
.site-footer a:hover {
	color: var(--wp--preset--color--orange-light) !important;
	text-decoration: underline;
}

/* ---------- Eyebrow label ---------- */
.meraki-eyebrow {
	display: inline-block;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: .78rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--orange);
}

/* =============================================================
   ANIMATIONS — pure CSS, progressive enhancement.
   Content is visible by default. Animation is layered on top and
   NEVER a prerequisite for visibility.
   ============================================================= */

@keyframes meraki-rise {
	from { opacity: 0; transform: translateY(34px); }
	to   { opacity: 1; transform: none; }
}
@keyframes meraki-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {

	/* Hero content eases up on page load (runs once, always ends visible). */
	.meraki-hero .wp-block-cover__inner-container {
		animation: meraki-rise .8s .05s ease both;
	}

	/* Section reveal on scroll — modern browsers only (Chrome/Edge/others
	   that support scroll-driven animations). Where unsupported, the
	   section is simply shown normally. It can never stay hidden. */
	@supports (animation-timeline: view()) {
		.meraki-reveal {
			animation: meraki-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% cover 18%;
		}
	}
}

/* ---------- Testimonial marquee (pure CSS) ----------
   Cards are duplicated in the markup, so translateX(-50%) loops
   seamlessly with no JavaScript. */
.meraki-marquee {
	overflow: hidden;
	position: relative;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	        mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.meraki-marquee-track {
	display: flex;
	flex-wrap: nowrap !important;
	width: max-content;
	animation: meraki-scroll 50s linear infinite;
}
.meraki-marquee:hover .meraki-marquee-track { animation-play-state: paused; }
@keyframes meraki-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}
.meraki-quote {
	width: 340px;
	flex: 0 0 340px;
	white-space: normal;
}

/* ---------- Accessible focus ---------- */
a:focus-visible,
.wp-block-button__link:focus-visible,
.wp-block-navigation-item__content:focus-visible {
	outline: 2px solid var(--wp--preset--color--orange);
	outline-offset: 2px;
}

/* ---------- Respect reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.meraki-marquee-track { animation: none; width: 100%; flex-wrap: wrap !important; justify-content: center; }
	.wp-block-button__link:hover,
	.is-style-meraki-card:hover { transform: none; }
}

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
	.meraki-quote { width: 78vw; flex-basis: 78vw; }
}
