/*
Theme Name: Rainbow Rocket
Theme URI: https://english.rbrocket.com/
Author: Rainbow Rocket
Description: An editable block theme for a playful English school website.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: my-theme
*/

:root {
	--rr-shadow-soft: 0 18px 50px rgba(21, 76, 125, 0.12);
	--rr-shadow-card: 0 14px 32px rgba(19, 70, 116, 0.1);
	--rr-radius-large: 2rem;
	--rr-radius-medium: 1.35rem;
}

* {
	box-sizing: border-box;
}

html {
	min-width: 320px;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	text-wrap: pretty;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	text-underline-offset: 0.18em;
}

.wp-site-blocks {
	overflow: clip;
}

.wp-site-blocks > :where(header, main, footer),
.home .wp-block-post-content > :where(.rr-hero, .rr-section) {
	margin-block-start: 0;
}

.rr-section {
	position: relative;
	padding: clamp(3rem, 5vw, 4.75rem) 1.25rem;
}

.rr-section[id] {
	scroll-margin-top: 5rem;
}

.rr-section-title {
	margin: 0;
	font-size: clamp(1.8rem, 3.4vw, 3rem);
	letter-spacing: -0.035em;
}

.rr-section-lead {
	max-width: 44rem;
	margin: 0.65rem auto 0;
	color: #42516a;
	font-size: clamp(0.95rem, 1.25vw, 1.08rem);
	line-height: 1.65;
}

.rr-eyebrow {
	margin: 0 0 0.4rem;
	color: var(--wp--preset--color--pink);
	font-size: 0.82rem;
	font-weight: 900;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

/* Header */
.rr-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid rgba(70, 170, 221, 0.2);
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 8px 24px rgba(12, 59, 115, 0.05);
	backdrop-filter: blur(16px);
}

.admin-bar .rr-site-header {
	top: 32px;
}

.rr-header-inner {
	min-height: 4.1rem;
	padding: 0.45rem 1.25rem;
}

.rr-mini-brand {
	gap: 0.65rem;
}

.rr-mini-brand__mark {
	display: grid;
	width: 2.35rem;
	height: 2.35rem;
	margin: 0;
	place-items: center;
	border: 3px solid #fff;
	border-radius: 50%;
	background: linear-gradient(135deg, #22a8f5, #7c63c8 58%, #ff3d73);
	box-shadow: 0 5px 14px rgba(12, 75, 147, 0.2);
	font-size: 1.12rem;
}

.rr-mini-brand .wp-block-site-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.95rem;
	font-weight: 900;
	letter-spacing: -0.02em;
	line-height: 1.05;
	text-transform: uppercase;
}

.rr-primary-nav {
	font-size: 0.84rem;
}

.rr-primary-nav a {
	text-decoration: none;
}

.rr-header-button .wp-block-button__link {
	padding: 0.55rem 1rem;
	box-shadow: 0 8px 20px rgba(255, 61, 115, 0.22);
	font-size: 0.86rem;
}

/* Hero */
.rr-hero {
	position: relative;
	display: flex;
	min-height: 660px;
	padding: clamp(1.5rem, 3vw, 2.5rem) 1.25rem 2rem;
	overflow: hidden;
	flex-direction: column;
	justify-content: center;
	background:
		radial-gradient(circle at 78% 14%, rgba(255, 255, 255, 0.95) 0 5%, transparent 17%),
		radial-gradient(circle at 15% 2%, rgba(255, 255, 255, 0.85) 0 6%, transparent 23%),
		linear-gradient(180deg, #55c9f4 0%, #c9f2ff 44%, #ffffff 88%);
	isolation: isolate;
}

.rr-hero::before {
	position: absolute;
	inset: 0;
	z-index: -2;
	background-image:
		radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
		radial-gradient(circle, rgba(255, 225, 95, 0.95) 0 2px, transparent 4px),
		radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px);
	background-position: 3% 8%, 34% 5%, 62% 10%;
	background-size: 91px 83px, 139px 117px, 67px 72px;
	content: "";
	opacity: 0.7;
}

.rr-hero__visual {
	position: absolute;
	inset: 0 0 0 auto;
	z-index: -1;
	width: min(92%, 1500px);
	height: 100%;
	margin: 0;
}

.rr-hero__visual img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: bottom right;
}

.rr-hero__content {
	position: relative;
	z-index: 2;
	width: min(100%, 1180px);
	margin-inline: auto;
}

.rr-hero__copy {
	width: min(56%, 640px);
	margin: 0;
}

.rr-logo-image {
	width: clamp(8.5rem, 12vw, 11rem);
	margin: 0 0 0.7rem;
	filter: drop-shadow(0 10px 18px rgba(11, 47, 131, 0.18));
}

.rr-hero__title {
	margin: 0 0 0.6rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2.75rem, 5vw, 4.8rem);
	font-weight: 900;
	letter-spacing: -0.07em;
	line-height: 0.98;
	white-space: nowrap;
	-webkit-text-stroke: 0.06em #fff;
	paint-order: stroke fill;
	filter: drop-shadow(0 5px 0 rgba(255, 255, 255, 0.65));
}

.rr-word-play {
	color: #ff3d73;
}

.rr-word-learn {
	color: #149bea;
}

.rr-word-smile {
	color: #ff9300;
}

.rr-dot-purple {
	color: #7c2fa0;
}

.rr-dot-orange {
	color: #ff9300;
}

.rr-hero__lead {
	margin: 0 0 0.85rem;
	color: #0b2f83;
	font-size: clamp(1.1rem, 1.65vw, 1.5rem);
	font-weight: 900;
	line-height: 1.45;
	text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8);
}

.rr-feature-grid {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.55rem;
	margin: 0;
}

.rr-feature-grid > .wp-block-column {
	margin: 0;
}

.rr-feature-card {
	height: 100%;
	min-height: 9.75rem;
	padding: 0.75rem 0.55rem;
	border: 2px solid rgba(255, 255, 255, 0.94);
	border-radius: 1.45rem;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 12px 28px rgba(25, 102, 152, 0.12), inset 0 0 0 2px var(--rr-card-color, #d7ecf6);
	backdrop-filter: blur(12px);
}

.rr-feature-card--song {
	--rr-card-color: #ffc5d7;
}

.rr-feature-card--book {
	--rr-card-color: #cfe8bc;
}

.rr-feature-card--craft {
	--rr-card-color: #ffd9bf;
}

.rr-feature-card--talk {
	--rr-card-color: #c7e7fa;
}

.rr-feature-card__icon {
	min-height: 2.35rem;
	margin: 0 0 0.25rem;
	font-size: clamp(1.7rem, 2.3vw, 2.15rem);
	line-height: 1;
}

.rr-feature-card h3 {
	margin: 0;
	font-size: clamp(0.88rem, 1.25vw, 1.08rem);
	line-height: 1.35;
}

.rr-feature-card--song h3 {
	color: #c91f67;
}

.rr-feature-card--book h3 {
	color: #15803d;
}

.rr-feature-card--craft h3 {
	color: #e76300;
}

.rr-feature-card--talk h3 {
	color: #1745ad;
}

.rr-feature-card__text {
	margin: 0.35rem 0 0;
	font-size: clamp(0.72rem, 1vw, 0.84rem);
	font-weight: 700;
	line-height: 1.4;
}

.rr-hero__actions {
	margin-top: 0.85rem;
}

.rr-hero__actions .wp-block-button__link {
	box-shadow: 0 12px 26px rgba(255, 61, 115, 0.24);
}

/* About */
.rr-about {
	background:
		radial-gradient(circle at 9% 18%, rgba(34, 168, 245, 0.08) 0 7rem, transparent 7.1rem),
		radial-gradient(circle at 92% 78%, rgba(255, 212, 59, 0.15) 0 10rem, transparent 10.1rem),
		#fff;
}

.rr-about-grid {
	margin-top: clamp(1.75rem, 3vw, 2.5rem);
	gap: 1rem;
}

.rr-about-card {
	height: 100%;
	padding: clamp(1.2rem, 2vw, 1.6rem);
	border: 1px solid #dceef7;
	border-radius: var(--rr-radius-medium);
	background: #fff;
	box-shadow: var(--rr-shadow-card);
}

.rr-about-card h3 {
	margin: 0;
	font-size: 1.15rem;
}

.rr-about-card p:last-child {
	margin-bottom: 0;
	color: #536078;
	font-size: 0.94rem;
	line-height: 1.6;
}

/* Programs */
.rr-programs {
	background: linear-gradient(180deg, #eefaff 0%, #fff 100%);
}

.rr-program-grid {
	margin-top: clamp(1.75rem, 3vw, 2.5rem);
	gap: 1rem;
}

.rr-program-card {
	position: relative;
	height: 100%;
	padding: clamp(1.25rem, 2vw, 1.7rem);
	overflow: hidden;
	border: 3px solid #fff;
	border-radius: 1.5rem;
	box-shadow: var(--rr-shadow-card);
}

.rr-program-card--preschool {
	background: #fff1f5;
}

.rr-program-card--elementary {
	background: #ecf8ff;
}

.rr-program-card--event {
	background: #fff7dd;
}

.rr-program-card__tag {
	display: inline-block;
	margin: 0 0 0.65rem;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	color: #fff;
	background: #ff3d73;
	font-size: 0.78rem;
	font-weight: 900;
}

.rr-program-card--elementary .rr-program-card__tag {
	background: #149bea;
}

.rr-program-card--event .rr-program-card__tag {
	color: #7b4e00;
	background: #ffd43b;
}

.rr-program-card h3 {
	position: relative;
	z-index: 1;
	margin: 0;
	font-size: clamp(1.2rem, 1.7vw, 1.5rem);
}

.rr-program-card p:last-child {
	position: relative;
	z-index: 1;
	margin-bottom: 0;
	color: #4b5870;
	font-size: 0.94rem;
	line-height: 1.6;
}

/* Events */
.rr-events {
	background: #fff;
}

.rr-events-query {
	margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.rr-events-query .wp-block-post-template {
	gap: 1.25rem;
}

.rr-event-card {
	height: 100%;
	padding: 0 0 1.2rem;
	overflow: hidden;
	border: 1px solid #d9edf7;
	border-radius: var(--rr-radius-medium);
	background: #fff;
	box-shadow: var(--rr-shadow-card);
}

.rr-event-card .wp-block-post-featured-image {
	margin: 0;
}

.rr-event-card .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.rr-event-card__body {
	padding: 1rem 1rem 0;
}

.rr-event-date {
	margin: 0 0 0.55rem;
	color: #e9346a;
	font-size: 0.82rem;
	font-weight: 900;
	letter-spacing: 0.04em;
}

.rr-event-card .wp-block-post-title {
	margin: 0;
	font-size: 1.35rem;
}

.rr-event-card .wp-block-post-excerpt {
	color: #536078;
	font-size: 0.92rem;
}

.rr-event-card .wp-block-read-more {
	font-weight: 900;
	text-decoration: none;
}

.rr-events-empty {
	padding: 1.3rem;
	border: 2px dashed #b8e3f8;
	border-radius: var(--rr-radius-medium);
	color: #526178;
	background: #f4fbff;
	text-align: center;
}

/* Trial CTA */
.rr-trial {
	padding-top: clamp(2.5rem, 4vw, 3.5rem);
	padding-bottom: clamp(2.5rem, 4vw, 3.5rem);
	background:
		radial-gradient(circle at 8% 28%, rgba(255, 255, 255, 0.23) 0 6rem, transparent 6.1rem),
		radial-gradient(circle at 92% 70%, rgba(255, 255, 255, 0.18) 0 9rem, transparent 9.1rem),
		linear-gradient(135deg, #0c8fe0, #4961d0 55%, #8b4cc1);
}

.rr-trial-card {
	padding: clamp(1.75rem, 3vw, 2.75rem);
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-radius: 1.75rem;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	box-shadow: 0 22px 55px rgba(9, 43, 107, 0.25);
	backdrop-filter: blur(8px);
}

.rr-trial-card > :where(:not(:first-child)) {
	margin-block-start: 0.85rem;
}

.rr-trial-card h2,
.rr-trial-card p {
	color: #fff;
}

.rr-trial-card h2 {
	margin: 0;
	font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.rr-trial-card .wp-block-button__link {
	color: #0b2f83;
	background: #fff;
	box-shadow: 0 12px 25px rgba(4, 30, 82, 0.2);
}

/* Footer and standard templates */
.rr-site-footer {
	padding: 1.75rem 1.25rem;
	color: #dcecff;
	background: #082662;
}

.rr-site-footer a,
.rr-site-footer .wp-block-site-title {
	color: #fff;
}

.rr-footer-brand {
	font-weight: 900;
}

.rr-footer-copy {
	font-size: 0.82rem;
	opacity: 0.78;
}

.rr-template-main {
	min-height: 62vh;
	padding: clamp(3rem, 7vw, 6rem) 1.25rem;
}

.rr-template-main .wp-block-post-title,
.rr-template-main .wp-block-query-title {
	font-size: clamp(2rem, 5vw, 4rem);
}

.rr-post-list {
	gap: 2rem;
}

.rr-post-list > li {
	padding-bottom: 2rem;
	border-bottom: 1px solid #dcebf3;
}

/* Editor */
.editor-styles-wrapper .rr-site-header {
	position: relative;
	top: auto;
}

.editor-styles-wrapper .rr-hero {
	min-height: 640px;
}

.editor-styles-wrapper .rr-hero__visual {
	pointer-events: none;
}

/* Responsive */
@media (max-width: 1100px) {
	.rr-hero__copy {
		width: 64%;
	}

	.rr-feature-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rr-feature-card {
		min-height: 8.8rem;
	}

	.rr-hero__visual {
		width: 96%;
		opacity: 0.88;
	}
}

@media (max-width: 840px) {
	.rr-primary-nav {
		order: 3;
	}

	.rr-header-button {
		display: none;
	}

	.rr-hero {
		min-height: 0;
		padding-top: 1.5rem;
	}

	.rr-hero__content {
		order: 1;
	}

	.rr-hero__copy {
		width: 100%;
		text-align: center;
	}

	.rr-logo-image {
		margin-inline: auto;
	}

	.rr-hero__visual {
		position: relative;
		inset: auto;
		order: 2;
		width: calc(100% + 2.5rem);
		height: min(58vw, 27rem);
		margin: 0.5rem -1.25rem -0.5rem;
		opacity: 1;
		overflow: hidden;
	}

	.rr-hero__visual img {
		width: 150%;
		max-width: none;
		margin-left: -50%;
		object-position: right bottom;
	}

	.rr-hero__actions {
		justify-content: center;
	}

	.rr-about-grid,
	.rr-program-grid {
		flex-wrap: wrap !important;
	}

	.rr-about-grid > .wp-block-column,
	.rr-program-grid > .wp-block-column {
		flex-basis: calc(50% - 0.75rem) !important;
	}
}

@media (max-width: 600px) {
	.admin-bar .rr-site-header {
		top: 0;
	}

	.rr-header-inner {
		min-height: 3.7rem;
	}

	.rr-mini-brand .wp-block-site-title {
		font-size: 0.9rem;
	}

	.rr-mini-brand__mark {
		width: 2.35rem;
		height: 2.35rem;
		font-size: 1.1rem;
	}

	.rr-logo-image {
		width: 8.5rem;
	}

	.rr-hero__title {
		font-size: clamp(2.4rem, 12.2vw, 4rem);
		white-space: normal;
	}

	.rr-feature-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rr-feature-card {
		min-height: 8.6rem;
		padding-inline: 0.55rem;
	}

	.rr-hero__actions {
		flex-direction: column;
	}

	.rr-hero__actions .wp-block-button {
		width: 100%;
	}

	.rr-hero__actions .wp-block-button__link {
		width: 100%;
	}

	.rr-about-grid > .wp-block-column,
	.rr-program-grid > .wp-block-column {
		flex-basis: 100% !important;
	}

	.rr-site-footer .wp-block-group {
		justify-content: center;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
