/* =========================================================================
 * EduFunny Hub — main stylesheet
 * Claymorphism / soft 3D pastel design system.
 *
 * TABLE OF CONTENTS
 *   1.  Design tokens (CSS variables)
 *   2.  Reset & base
 *   3.  Layout helpers (container, section, utilities)
 *   4.  Reusable clay surfaces (.ef-clay, .ef-clay-soft, .ef-clay-inset)
 *   5.  Buttons
 *   6.  Typography helpers (eyebrow, section header)
 *   7.  Header & navigation
 *   8.  Hero
 *   9.  Floating decorative shapes
 *   10. Hub world cards
 *   11. Ecosystem / future-pages preview
 *   12. Trust section & pills
 *   13. Footer
 *   14. Inner pages (world intros, prose, archive)
 *   15. Animations & reveal
 *   16. Responsive (tablet / mobile)
 *   17. Accessibility & reduced motion
 * ====================================================================== */

/* -------------------------------------------------------------------------
 * 1. DESIGN TOKENS
 * ---------------------------------------------------------------------- */
:root {
	/* Pastel palette */
	--ef-cream:        #FBF6EF;
	--ef-cream-2:      #FFFDFA;
	--ef-pink:         #FFD8E4;
	--ef-pink-2:       #FFE9F0;
	--ef-pink-ink:     #C24E7D;
	--ef-blue:         #D4E8FF;
	--ef-blue-2:       #E8F3FF;
	--ef-blue-ink:     #2F73B8;
	--ef-mint:         #CDEFE0;
	--ef-mint-2:       #E2F7EE;
	--ef-mint-ink:     #2E9A77;
	--ef-orange:       #FFE3C7;
	--ef-orange-2:     #FFF0DF;
	--ef-orange-ink:   #C97A38;
	--ef-lavender:     #E6DEFB;
	--ef-lavender-2:   #F0EBFD;
	--ef-lavender-ink: #6E55C7;

	/* Ink / text */
	--ef-ink:        #423C57;  /* body text — strong contrast on cream */
	--ef-ink-strong: #2C273B;  /* headings */
	--ef-ink-soft:   #6A6480;  /* muted, still ≥4.5:1 on cream */

	/* App background gradient */
	--ef-bg:         radial-gradient(1200px 600px at 12% -8%, var(--ef-pink-2) 0%, transparent 55%),
	                 radial-gradient(1000px 620px at 100% 0%, var(--ef-blue-2) 0%, transparent 50%),
	                 radial-gradient(1000px 700px at 50% 120%, var(--ef-mint-2) 0%, transparent 55%),
	                 var(--ef-cream);

	/* Radii */
	--ef-r-xl:  40px;
	--ef-r-lg:  30px;
	--ef-r-md:  22px;
	--ef-r-sm:  16px;
	--ef-pill:  999px;

	/* Clay shadow recipe (raised surface) */
	--ef-shadow:
		18px 18px 40px rgba(149, 132, 117, 0.22),
		-12px -12px 30px rgba(255, 255, 255, 0.92),
		inset 3px 3px 6px rgba(255, 255, 255, 0.75),
		inset -4px -4px 10px rgba(149, 132, 117, 0.12);
	--ef-shadow-soft:
		10px 10px 24px rgba(149, 132, 117, 0.16),
		-7px -7px 18px rgba(255, 255, 255, 0.9),
		inset 2px 2px 4px rgba(255, 255, 255, 0.7),
		inset -2px -2px 6px rgba(149, 132, 117, 0.10);
	--ef-shadow-inset:
		inset 5px 5px 10px rgba(149, 132, 117, 0.20),
		inset -5px -5px 10px rgba(255, 255, 255, 0.95);
	--ef-shadow-hover:
		24px 26px 54px rgba(149, 132, 117, 0.28),
		-14px -14px 34px rgba(255, 255, 255, 0.95),
		inset 3px 3px 6px rgba(255, 255, 255, 0.8),
		inset -4px -4px 10px rgba(149, 132, 117, 0.12);

	/* Typography */
	--ef-font-head: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
	--ef-font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

	/* Spacing rhythm */
	--ef-space-section: clamp(3.5rem, 8vw, 7rem);
	--ef-container:     1180px;

	/* Z-index scale */
	--ef-z-shapes: 1;
	--ef-z-content: 2;
	--ef-z-header: 50;
	--ef-z-overlay: 40;

	/* Motion */
	--ef-ease: cubic-bezier(0.22, 1, 0.36, 1);

	/* Active accent (set per-card/section) */
	--ef-accent:      var(--ef-blue);
	--ef-accent-2:    var(--ef-blue-2);
	--ef-accent-ink:  var(--ef-blue-ink);
}

/* -------------------------------------------------------------------------
 * 2. RESET & BASE
 * ---------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--ef-font-body);
	font-size: 1.0625rem;          /* 17px base, ≥16px on mobile */
	line-height: 1.7;
	color: var(--ef-ink);
	background: var(--ef-bg);
	background-attachment: fixed;
	min-height: 100vh;
	overflow-x: clip;              /* guard against h-scroll WITHOUT breaking position:sticky */
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a { color: var(--ef-lavender-ink); text-decoration: none; }
a:hover { text-decoration: none; }

h1, h2, h3, h4 {
	font-family: var(--ef-font-head);
	color: var(--ef-ink-strong);
	line-height: 1.12;
	margin: 0 0 0.5em;
	font-weight: 700;
	letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }

:focus-visible {
	outline: 3px solid var(--ef-lavender-ink);
	outline-offset: 3px;
	border-radius: 6px;
}

/* -------------------------------------------------------------------------
 * 3. LAYOUT HELPERS
 * ---------------------------------------------------------------------- */
.ef-container {
	width: 100%;
	max-width: var(--ef-container);
	margin-inline: auto;
	padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}
.ef-container--narrow { max-width: 760px; }

.ef-main { display: block; position: relative; z-index: 1; } /* sits above .ef-page-decor */
.ef-section { padding-block: var(--ef-space-section); }

.ef-visually-hidden,
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

.ef-skip-link {
	position: absolute;
	left: 50%;
	top: -100px;
	transform: translateX(-50%);
	background: var(--ef-ink-strong);
	color: #fff;
	padding: 0.7rem 1.2rem;
	border-radius: var(--ef-pill);
	z-index: 999;
	transition: top 0.2s var(--ef-ease);
}
.ef-skip-link:focus { top: 12px; color: #fff; }

/* Inline SVG icon sizing */
.ef-icon { width: 1.5rem; height: 1.5rem; flex: none; }

/* -------------------------------------------------------------------------
 * 4. REUSABLE CLAY SURFACES
 * ---------------------------------------------------------------------- */
.ef-clay {
	background: var(--ef-cream-2);
	border-radius: var(--ef-r-lg);
	box-shadow: var(--ef-shadow);
}
.ef-clay-soft {
	background: var(--ef-cream-2);
	border-radius: var(--ef-r-md);
	box-shadow: var(--ef-shadow-soft);
}
.ef-clay-inset {
	background: var(--ef-accent-2);
	border-radius: var(--ef-r-md);
	box-shadow: var(--ef-shadow-inset);
}

/* -------------------------------------------------------------------------
 * 5. BUTTONS
 * ---------------------------------------------------------------------- */
.ef-btn {
	--btn-bg: var(--ef-cream-2);
	--btn-fg: var(--ef-ink-strong);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: var(--ef-font-head);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1;
	color: var(--btn-fg);
	background: var(--btn-bg);
	border: 0;
	cursor: pointer;
	padding: 0.85rem 1.5rem;
	min-height: 48px;             /* ≥44px touch target */
	border-radius: var(--ef-pill);
	box-shadow: var(--ef-shadow-soft);
	transition: transform 0.22s var(--ef-ease), box-shadow 0.22s var(--ef-ease), background 0.22s var(--ef-ease);
	-webkit-tap-highlight-color: transparent;
}
.ef-btn:hover { transform: translateY(-2px); box-shadow: var(--ef-shadow); color: var(--btn-fg); }
.ef-btn:active { transform: translateY(1px); box-shadow: var(--ef-shadow-inset); }
.ef-btn .ef-icon { width: 1.15rem; height: 1.15rem; transition: transform 0.22s var(--ef-ease); }
.ef-btn:hover .ef-icon { transform: translateX(3px); }

.ef-btn--lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; min-height: 54px; }

/* Primary — warm candy gradient, dark ink for AA contrast */
.ef-btn--primary {
	--btn-bg: linear-gradient(135deg, var(--ef-orange) 0%, var(--ef-pink) 100%);
	--btn-fg: var(--ef-ink-strong);
}
.ef-btn--primary:hover {
	--btn-bg: linear-gradient(135deg, var(--ef-pink) 0%, var(--ef-orange) 100%);
}

/* Ghost — outlined soft */
.ef-btn--ghost {
	--btn-bg: transparent;
	--btn-fg: var(--ef-ink-strong);
	box-shadow: inset 0 0 0 2px rgba(66, 60, 87, 0.16);
}
.ef-btn--ghost:hover {
	--btn-bg: var(--ef-cream-2);
	box-shadow: var(--ef-shadow-soft);
}

/* Accent — inherits the section/card accent */
.ef-btn--accent {
	--btn-bg: var(--ef-accent);
	--btn-fg: var(--ef-accent-ink);
}

/* -------------------------------------------------------------------------
 * 6. TYPOGRAPHY HELPERS
 * ---------------------------------------------------------------------- */
.ef-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--ef-font-head);
	font-weight: 600;
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ef-lavender-ink);
	margin: 0 0 1rem;
}
.ef-eyebrow__dot {
	width: 0.55rem; height: 0.55rem; border-radius: 50%;
	background: var(--ef-pink-ink);
	box-shadow: 0 0 0 4px var(--ef-pink-2);
}

.ef-section-header { max-width: 660px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.ef-section-header--center { margin-inline: auto; text-align: center; }
.ef-section-header--left { text-align: left; }
.ef-section-header__title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.ef-section-header__intro { color: var(--ef-ink-soft); font-size: 1.1rem; margin: 0; }
.ef-section-header--center .ef-eyebrow { justify-content: center; }

/* -------------------------------------------------------------------------
 * 7. HEADER & NAVIGATION
 * ---------------------------------------------------------------------- */
.ef-header {
	position: sticky;
	top: 0;
	z-index: var(--ef-z-header);
	padding: 0.85rem 0;
	transition: padding 0.25s var(--ef-ease);
}
.ef-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.55rem 0.7rem 0.55rem 1.4rem;
	border-radius: var(--ef-pill);
	background: rgba(255, 253, 250, 0.72);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	box-shadow: var(--ef-shadow-soft);
	border: 1px solid rgba(255, 255, 255, 0.7);
}
/* Slightly denser when scrolled (toggled by JS) */
.ef-header.is-scrolled .ef-header__inner {
	background: rgba(255, 253, 250, 0.9);
	box-shadow: var(--ef-shadow);
}

/* Brand */
.ef-brand__link { display: inline-flex; align-items: center; gap: 0.65rem; }
.ef-brand__name {
	font-family: var(--ef-font-head);
	font-weight: 800;
	font-size: 1.35rem;
	color: var(--ef-ink-strong);
	letter-spacing: -0.02em;
}
.ef-brand__mark {
	display: inline-flex;
	gap: 4px;
	padding: 8px;
	border-radius: 14px;
	background: var(--ef-cream-2);
	box-shadow: var(--ef-shadow-inset);
}
.ef-brand__dot { width: 11px; height: 11px; border-radius: 50%; }
.ef-brand__dot--pink { background: var(--ef-pink-ink); }
.ef-brand__dot--blue { background: var(--ef-blue-ink); }
.ef-brand__dot--mint { background: var(--ef-mint-ink); }

/* Nav list */
.ef-nav__list {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}
.ef-nav__link {
	display: inline-block;
	font-family: var(--ef-font-head);
	font-weight: 600;
	font-size: 0.98rem;
	color: var(--ef-ink);
	padding: 0.55rem 0.95rem;
	border-radius: var(--ef-pill);
	transition: background 0.2s var(--ef-ease), color 0.2s var(--ef-ease);
}
.ef-nav__link:hover,
.ef-nav .current-menu-item > .ef-nav__link,
.ef-nav .current_page_item > a {
	background: var(--ef-cream-2);
	color: var(--ef-ink-strong);
	box-shadow: var(--ef-shadow-inset);
}

.ef-header__actions { display: flex; align-items: center; gap: 0.6rem; }
.ef-header__cta { padding: 0.7rem 1.25rem; min-height: 44px; }

/* Burger (hidden on desktop) */
.ef-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 48px; height: 48px;
	border: 0;
	border-radius: 14px;
	background: var(--ef-cream-2);
	box-shadow: var(--ef-shadow-soft);
	cursor: pointer;
	padding: 0 13px;
}
.ef-burger__bar {
	display: block;
	height: 3px;
	width: 100%;
	border-radius: 3px;
	background: var(--ef-ink-strong);
	transition: transform 0.25s var(--ef-ease), opacity 0.2s var(--ef-ease);
}
.ef-burger[aria-expanded="true"] .ef-burger__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.ef-burger[aria-expanded="true"] .ef-burger__bar:nth-child(2) { opacity: 0; }
.ef-burger[aria-expanded="true"] .ef-burger__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* -------------------------------------------------------------------------
 * 8. HERO — full-width banner + subtle 3D scroll reveal (NORMAL FLOW)
 *
 * No sticky, no pinning, no tall stage: the hero is a normal section that
 * scrolls up with the page. As it scrolls, the card eases from a slight 3D
 * tilt/scale/lift into a flat full-width banner — driven by one css var
 * (--ef-hero-progress 0→1) from vanilla JS. No blur on the image.
 * ---------------------------------------------------------------------- */
.ef-hero {
	position: relative;
	z-index: var(--ef-z-content);
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	min-height: auto;            /* normal height — never pinned */
	overflow: hidden;            /* clips the scaled card → no h-scroll */
	/* SAME fixed gradient as <body>, so the navbar area and hero share one
	   continuous pastel background (no horizontal colour band/cut). Because
	   both are background-attachment:fixed, they align pixel-for-pixel. */
	background: var(--ef-bg);
	background-attachment: fixed;
	border: none;
}
/* Bottom fade — hero melts into the section below (kept; overlay only). */
.ef-hero::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 20%;
	background: linear-gradient(to bottom, rgba(251, 246, 239, 0) 0%, var(--ef-cream) 100%);
	z-index: 3;
	pointer-events: none;
}
.ef-hero__stage {
	position: relative;
	width: 100%;
	perspective: 1200px;         /* 3D depth */
	overflow: visible;
}
.ef-hero__card {
	--ef-hero-progress: 0;        /* 0 = slight tilt, 1 = flat banner (JS drives) */
	--ef-hero-rotate: 10deg;
	--ef-hero-scale: 0.02;        /* scale = 1 + (1 - p) * 0.02  → 1.02 at start */
	--ef-hero-translate: 42px;
	width: 100%;
	transform:
		translateY(calc((1 - var(--ef-hero-progress)) * var(--ef-hero-translate)))
		rotateX(calc((1 - var(--ef-hero-progress)) * var(--ef-hero-rotate)))
		scale(calc(1 + (1 - var(--ef-hero-progress)) * var(--ef-hero-scale)));
	transform-origin: center top;
	will-change: transform;
}
.ef-hero__picture {
	display: block;
	width: 100%;
	line-height: 0;
}
.ef-hero__image {
	display: block;
	width: 100%;
	height: auto;                /* natural aspect ratio → full artwork, no crop */
	max-width: none;
	object-fit: contain;
	object-position: center center;
	image-rendering: auto;
	opacity: 1;
	filter: none;                /* keep the artwork crisp */
	border: 0;
}
/* Phones: give the hero real presence (gentle centered crop, not a thin strip). */
@media (max-width: 600px) {
	.ef-hero__image { height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
}
/* Tablet — gentler tilt. */
@media (max-width: 1024px) {
	.ef-hero__card { --ef-hero-rotate: 7deg; --ef-hero-translate: 32px; }
}
/* Mobile — no 3D tilt: a very small scale + translate only. */
@media (max-width: 600px) {
	.ef-hero__stage { perspective: none; }
	.ef-hero__card { --ef-hero-rotate: 0deg; --ef-hero-scale: 0.01; --ef-hero-translate: 24px; }
}
/* Reduced motion — no animation, plain full-width banner. */
@media (prefers-reduced-motion: reduce) {
	.ef-hero__card { transform: none !important; }
}

/* -------------------------------------------------------------------------
 * 9. FLOATING DECORATIVE SHAPES (pure CSS, behind content)
 * ---------------------------------------------------------------------- */
.ef-shapes {
	position: absolute;
	inset: 0;
	z-index: var(--ef-z-shapes);
	pointer-events: none;
	overflow: hidden;
}
.ef-shape {
	position: absolute;
	display: block;
	opacity: 0.9;
	filter: drop-shadow(8px 10px 16px rgba(149, 132, 117, 0.18));
	will-change: transform;
}
.ef-shape--pink     { color: var(--ef-pink);     background: var(--ef-pink); }
.ef-shape--blue     { color: var(--ef-blue);     background: var(--ef-blue); }
.ef-shape--mint     { color: var(--ef-mint);     background: var(--ef-mint); }
.ef-shape--orange   { color: var(--ef-orange);   background: var(--ef-orange); }
.ef-shape--lavender { color: var(--ef-lavender); background: var(--ef-lavender); }

/* Shape forms */
.ef-shape--circle { width: 90px; height: 90px; border-radius: 50%; box-shadow: var(--ef-shadow-soft); }
.ef-shape--blob {
	width: 130px; height: 130px;
	border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
	box-shadow: var(--ef-shadow-soft);
}
.ef-shape--ring {
	width: 80px; height: 80px; border-radius: 50%;
	background: transparent;
	border: 14px solid var(--ef-mint);
	box-shadow: var(--ef-shadow-soft);
}
.ef-shape--pill {
	width: 110px; height: 46px; border-radius: var(--ef-pill);
	box-shadow: var(--ef-shadow-soft);
}
.ef-shape--star, .ef-shape--cloud { background: transparent; }
.ef-shape--star svg  { width: 64px; height: 64px; }
.ef-shape--cloud svg { width: 92px; height: 58px; color: #ffffff; opacity: 0.92; }

/* Hero placement — shapes peek from behind the banner corners.
   (.ef-shapes has overflow:hidden, so negative offsets never cause scroll.) */
.ef-shapes--hero .ef-shape--blob.ef-shape--pink   { top: -26px; left: -24px; }
.ef-shapes--hero .ef-shape--circle.ef-shape--blue { top: -20px; right: -12px; width: 74px; height: 74px; }
.ef-shapes--hero .ef-shape--circle.ef-shape--mint { bottom: -16px; left: 16px; width: 60px; height: 60px; }
.ef-shapes--hero .ef-shape--blob.ef-shape--lavender { bottom: -30px; right: -20px; width: 104px; height: 104px; }
.ef-shapes--hero .ef-shape--star  { top: -16px; right: 22%; }
.ef-shapes--hero .ef-shape--cloud { top: -4px; left: 16%; }
.ef-shapes--hero .ef-shape--ring  { bottom: -6px; right: 28%; }
.ef-shapes--hero .ef-shape--pill  { display: none; } /* removed: overlapped banner center */

/* Soft placement (inner pages) — fewer, calmer */
.ef-shapes--soft .ef-shape--blob.ef-shape--pink     { top: 10%; left: 8%;  width: 90px; height: 90px; }
.ef-shapes--soft .ef-shape--circle.ef-shape--blue   { top: 22%; right: 10%; }
.ef-shapes--soft .ef-shape--circle.ef-shape--mint   { display: none; }
.ef-shapes--soft .ef-shape--blob.ef-shape--lavender { bottom: 12%; right: 14%; width: 80px; height: 80px; }
.ef-shapes--soft .ef-shape--star  { top: 16%; right: 30%; }
.ef-shapes--soft .ef-shape--cloud { display: none; }

/* Gentle float animation, staggered by data-float */
.ef-shape[data-float] { animation: ef-float 7s var(--ef-ease) infinite alternate; }
.ef-shape[data-float="2"] { animation-duration: 9s;  animation-delay: -1.5s; }
.ef-shape[data-float="3"] { animation-duration: 11s; animation-delay: -3s; }

@keyframes ef-float {
	from { transform: translateY(0) rotate(0deg); }
	to   { transform: translateY(-22px) rotate(6deg); }
}

/* -------------------------------------------------------------------------
 * 9b. GLOBAL PAGE BACKGROUND DECORATION
 * Soft pastel stars / circles / blobs / clouds that sit behind ALL content
 * (fixed, full viewport) and echo the hero illustration across the whole
 * site. Kept low-intensity so cards and text stay readable.
 * ---------------------------------------------------------------------- */
.ef-page-decor {
	position: fixed;
	inset: 0;
	z-index: 0;             /* above the body gradient, below content (z-index:1) */
	pointer-events: none;
	overflow: hidden;
}
.ef-page-decor .ef-shape {
	position: absolute;
	opacity: 0.4;           /* subtle — does not compete with content */
	filter: drop-shadow(6px 8px 12px rgba(149, 132, 117, 0.12));
}
.ef-page-decor .ef-shape--circle,
.ef-page-decor .ef-shape--blob { box-shadow: var(--ef-shadow-soft); }

/* Strategic placement around the edges so shapes never sit behind body text. */
.ef-page-decor .ef-shape:nth-child(1) { top: 16vh;  left: -34px; width: 120px; height: 120px; } /* blob pink */
.ef-page-decor .ef-shape:nth-child(2) { top: 9vh;   right: 4vw;  width: 70px;  height: 70px; }   /* circle blue */
.ef-page-decor .ef-shape:nth-child(3) { top: 45vh;  left: 3vw;   width: 52px;  height: 52px; }   /* circle lavender */
.ef-page-decor .ef-shape:nth-child(4) { bottom: 18vh; right: 5vw; width: 64px;  height: 64px; }  /* circle mint */
.ef-page-decor .ef-shape:nth-child(5) { bottom: 8vh;  left: 6vw;  width: 96px;  height: 96px; }  /* blob orange */
.ef-page-decor .ef-shape:nth-child(6) { top: 30vh;  right: 11vw; }                                /* star orange */
.ef-page-decor .ef-shape:nth-child(7) { bottom: 33vh; left: 12vw; }                               /* star pink */
.ef-page-decor .ef-shape:nth-child(8) { top: 62vh;  right: -2vw; }                                /* cloud */
.ef-page-decor .ef-shape:nth-child(6) svg { width: 52px; height: 52px; }
.ef-page-decor .ef-shape:nth-child(7) svg { width: 40px; height: 40px; }

/* Calmer on phones — fewer shapes, lower intensity. */
@media (max-width: 640px) {
	.ef-page-decor .ef-shape { opacity: 0.3; }
	.ef-page-decor .ef-shape:nth-child(5),
	.ef-page-decor .ef-shape:nth-child(8) { display: none; }
	.ef-page-decor .ef-shape:nth-child(1) { width: 86px; height: 86px; }
}

/* -------------------------------------------------------------------------
 * 10. HUB WORLD CARDS
 * ---------------------------------------------------------------------- */
.ef-worlds { padding-block: var(--ef-space-section); }
.ef-worlds__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.25rem, 3vw, 2.1rem);
	align-items: stretch;
}

.ef-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: clamp(1.6rem, 3vw, 2.3rem);
	border-radius: var(--ef-r-xl);
	background:
		linear-gradient(160deg, var(--ef-accent-2) 0%, var(--ef-cream-2) 70%);
	box-shadow: var(--ef-shadow);
	transition: transform 0.3s var(--ef-ease), box-shadow 0.3s var(--ef-ease);
	overflow: hidden;
	isolation: isolate;
}
.ef-card::after { /* soft accent glow blob in the corner */
	content: "";
	position: absolute;
	width: 180px; height: 180px;
	right: -60px; top: -60px;
	border-radius: 50%;
	background: var(--ef-accent);
	opacity: 0.5;
	filter: blur(6px);
	z-index: -1;
}
.ef-card:hover,
.ef-card:focus-within { transform: translateY(-8px); box-shadow: var(--ef-shadow-hover); }

/* Per-accent theming via the shared --ef-accent vars */
.ef-card--pink     { --ef-accent: var(--ef-pink);     --ef-accent-2: var(--ef-pink-2);     --ef-accent-ink: var(--ef-pink-ink); }
.ef-card--blue     { --ef-accent: var(--ef-blue);     --ef-accent-2: var(--ef-blue-2);     --ef-accent-ink: var(--ef-blue-ink); }
.ef-card--mint     { --ef-accent: var(--ef-mint);     --ef-accent-2: var(--ef-mint-2);     --ef-accent-ink: var(--ef-mint-ink); }
.ef-card--orange   { --ef-accent: var(--ef-orange);   --ef-accent-2: var(--ef-orange-2);   --ef-accent-ink: var(--ef-orange-ink); }
.ef-card--lavender { --ef-accent: var(--ef-lavender); --ef-accent-2: var(--ef-lavender-2); --ef-accent-ink: var(--ef-lavender-ink); }

.ef-card--featured { box-shadow: var(--ef-shadow-hover); }
.ef-card--featured::after { opacity: 0.65; width: 220px; height: 220px; }

.ef-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px; height: 72px;
	margin-bottom: 1.3rem;
	color: var(--ef-accent-ink);
	border-radius: 24px;
}
.ef-card__icon .ef-icon { width: 2.1rem; height: 2.1rem; }
.ef-card__eyebrow {
	font-family: var(--ef-font-head);
	font-weight: 600;
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ef-accent-ink);
	margin: 0 0 0.4rem;
}
.ef-card__title { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin-bottom: 0.55rem; }
.ef-card__text { color: var(--ef-ink-soft); margin-bottom: 1.6rem; flex: 1 1 auto; }
.ef-card__cta { align-self: flex-start; position: relative; z-index: var(--ef-z-content); }

/* Whole-card click overlay (mouse only; link sits above the glow) */
.ef-card__overlay-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* -------------------------------------------------------------------------
 * 11. ECOSYSTEM / FUTURE-PAGES PREVIEW
 * ---------------------------------------------------------------------- */
.ef-ecosystem { padding-block: var(--ef-space-section); }
.ef-ecosystem__grid {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1rem, 2.4vw, 1.6rem);
}
.ef-preview {
	--ef-accent: var(--ef-blue); --ef-accent-2: var(--ef-blue-2); --ef-accent-ink: var(--ef-blue-ink);
	border-radius: var(--ef-r-lg);
	border: 2px dashed rgba(106, 100, 128, 0.35); /* fallback for no color-mix */
	border-color: color-mix(in srgb, var(--ef-accent-ink) 35%, transparent);
	background: var(--ef-cream-2);
	transition: transform 0.25s var(--ef-ease), box-shadow 0.25s var(--ef-ease), border-color 0.25s var(--ef-ease);
}
.ef-preview--pink { --ef-accent: var(--ef-pink); --ef-accent-2: var(--ef-pink-2); --ef-accent-ink: var(--ef-pink-ink); }
.ef-preview--blue { --ef-accent: var(--ef-blue); --ef-accent-2: var(--ef-blue-2); --ef-accent-ink: var(--ef-blue-ink); }
.ef-preview--mint { --ef-accent: var(--ef-mint); --ef-accent-2: var(--ef-mint-2); --ef-accent-ink: var(--ef-mint-ink); }
.ef-preview:hover { transform: translateY(-5px); box-shadow: var(--ef-shadow-soft); border-color: transparent; }
.ef-preview__link {
	display: flex; gap: 1rem; align-items: flex-start;
	padding: clamp(1.2rem, 2.4vw, 1.6rem);
	height: 100%;
	color: inherit;
}
.ef-preview__icon {
	flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	width: 54px; height: 54px;
	color: var(--ef-accent-ink);
	border-radius: 18px;
}
.ef-preview__icon .ef-icon { width: 1.6rem; height: 1.6rem; }
.ef-preview__body { display: flex; flex-direction: column; }
.ef-preview__title { font-family: var(--ef-font-head); font-weight: 700; font-size: 1.12rem; color: var(--ef-ink-strong); }
.ef-preview__text { color: var(--ef-ink-soft); font-size: 0.97rem; margin: 0.25rem 0 0.7rem; }
.ef-preview__tag {
	display: inline-flex; align-items: center; gap: 0.35rem;
	font-family: var(--ef-font-head); font-weight: 600; font-size: 0.72rem;
	letter-spacing: 0.05em; text-transform: uppercase;
	color: var(--ef-accent-ink); opacity: 0.6;   /* subtle, not shouty */
	margin-top: auto;
}
.ef-preview__tag .ef-icon { width: 1rem; height: 1rem; transition: transform 0.22s var(--ef-ease); }
.ef-preview:hover .ef-preview__tag .ef-icon { transform: translateX(4px); }

/* -------------------------------------------------------------------------
 * 12. TRUST SECTION & PILLS
 * ---------------------------------------------------------------------- */
.ef-trust { padding-block: 0 var(--ef-space-section); }
.ef-trust__panel {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
	padding: clamp(1.8rem, 4vw, 3.2rem);
	background: linear-gradient(150deg, var(--ef-lavender-2), var(--ef-cream-2) 60%);
}
.ef-trust__title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.ef-trust__text { color: var(--ef-ink-soft); margin: 0; }
.ef-pills { display: flex; flex-direction: column; gap: 0.85rem; }
.ef-pill {
	display: flex; align-items: center; gap: 0.85rem;
	padding: 0.85rem 1.2rem;
	border-radius: var(--ef-pill);
	font-family: var(--ef-font-head); font-weight: 600;
	color: var(--ef-ink-strong);
}
.ef-pill__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; flex: none;
	border-radius: 50%;
	background: var(--ef-cream);
	box-shadow: var(--ef-shadow-inset);
}
.ef-pill:nth-child(1) .ef-pill__icon { color: var(--ef-pink-ink); }
.ef-pill:nth-child(2) .ef-pill__icon { color: var(--ef-blue-ink); }
.ef-pill:nth-child(3) .ef-pill__icon { color: var(--ef-mint-ink); }
.ef-pill__icon .ef-icon { width: 1.3rem; height: 1.3rem; }

/* -------------------------------------------------------------------------
 * 13. FOOTER
 * ---------------------------------------------------------------------- */
.ef-footer { padding-block: clamp(2rem, 5vw, 3rem); position: relative; z-index: 1; }
.ef-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	padding: 1.4rem clamp(1.2rem, 3vw, 2rem);
	border-radius: var(--ef-r-lg);
	background: rgba(255, 253, 250, 0.75);
	box-shadow: var(--ef-shadow-soft);
	border: 1px solid rgba(255,255,255,0.7);
}
.ef-footer__brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.ef-footer__name { font-family: var(--ef-font-head); font-weight: 800; color: var(--ef-ink-strong); }
.ef-footer__list { list-style: none; display: flex; gap: 1.3rem; flex-wrap: wrap; }
.ef-footer__list a { font-family: var(--ef-font-head); font-weight: 600; color: var(--ef-ink); }
.ef-footer__list a:hover { color: var(--ef-lavender-ink); }
.ef-footer__copy { margin: 0; color: var(--ef-ink-soft); font-size: 0.92rem; }
.ef-footer__social { list-style: none; display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 0; padding: 0; }
.ef-footer__social a { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--ef-font-head); font-weight: 600; font-size: 0.92rem; color: var(--ef-ink); }
.ef-footer__social a:hover { color: var(--ef-lavender-ink); }
.ef-footer__social .ef-icon { width: 1.1rem; height: 1.1rem; }

/* Contact page */
.ef-contact__inner { max-width: 760px; margin-inline: auto; }
.ef-contact__head { text-align: center; }
.ef-contact__title { margin: 0.4rem 0 0.8rem; }
.ef-contact__intro { color: var(--ef-ink-soft); font-size: 1.05rem; }
.ef-contact__intro p { margin: 0 0 0.8rem; }
.ef-contact__methods { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ef-contact__method { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.4rem; padding: 1.4rem 1rem; border-radius: var(--ef-r-md); }
.ef-contact__method-icon { display: inline-flex; }
.ef-contact__method-icon .ef-icon { width: 1.8rem; height: 1.8rem; color: var(--ef-accent-ink); }
.ef-contact__method-label { font-family: var(--ef-font-head); font-weight: 700; }
.ef-contact__method-value { font-weight: 600; word-break: break-word; }
.ef-contact__hint { margin-top: 1.6rem; text-align: center; color: var(--ef-ink-soft); font-size: 0.92rem; }

/* -------------------------------------------------------------------------
 * 14. INNER PAGES
 * ---------------------------------------------------------------------- */
.ef-world-intro {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3rem, 8vw, 5.5rem);
	text-align: center;
}
.ef-world-intro--pink { --ef-accent: var(--ef-pink); --ef-accent-2: var(--ef-pink-2); --ef-accent-ink: var(--ef-pink-ink); }
.ef-world-intro--blue { --ef-accent: var(--ef-blue); --ef-accent-2: var(--ef-blue-2); --ef-accent-ink: var(--ef-blue-ink); }
.ef-world-intro--mint { --ef-accent: var(--ef-mint); --ef-accent-2: var(--ef-mint-2); --ef-accent-ink: var(--ef-mint-ink); }
.ef-world-intro__inner { position: relative; z-index: var(--ef-z-content); max-width: 720px; margin-inline: auto; }
.ef-world-intro__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 84px; height: 84px; margin-bottom: 1.3rem;
	color: var(--ef-accent-ink); border-radius: 26px;
}
.ef-world-intro__icon .ef-icon { width: 2.4rem; height: 2.4rem; }
.ef-world-intro__title { font-size: clamp(2rem, 5vw, 3.2rem); }
.ef-world-intro__text { color: var(--ef-ink-soft); font-size: 1.12rem; margin-bottom: 2rem; }
.ef-world-intro__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; }

.ef-prose {
	padding: clamp(1.5rem, 4vw, 2.6rem);
	color: var(--ef-ink);
}
.ef-prose :where(h2, h3) { margin-top: 1.6em; }
.ef-prose a { color: var(--ef-lavender-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Blog/archive */
.ef-archive__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: clamp(1.2rem, 3vw, 2rem);
	margin-top: 2rem;
}
.ef-post-card { overflow: hidden; }
.ef-post-card__media img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.ef-post-card__body { padding: 1.4rem; }
.ef-post-card__title { font-size: 1.3rem; margin-bottom: 0.3rem; }
.ef-post-card__meta { color: var(--ef-ink-soft); font-size: 0.88rem; margin-bottom: 0.6rem; }
.ef-pagination { margin-top: 2.5rem; text-align: center; }
.ef-pagination .page-numbers {
	display: inline-block; padding: 0.5rem 0.9rem; margin: 0 0.2rem;
	border-radius: var(--ef-pill); background: var(--ef-cream-2);
	box-shadow: var(--ef-shadow-soft); color: var(--ef-ink-strong);
	font-family: var(--ef-font-head); font-weight: 600;
}
.ef-pagination .page-numbers.current { background: var(--ef-lavender); color: var(--ef-lavender-ink); }

/* -------------------------------------------------------------------------
 * 15. ANIMATIONS & SCROLL REVEAL
 * ---------------------------------------------------------------------- */
.ef-reveal {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.6s var(--ef-ease), transform 0.6s var(--ef-ease);
}
.ef-reveal.is-visible { opacity: 1; transform: none; }
/* Stagger children inside grids */
.ef-worlds__grid .ef-reveal:nth-child(2) { transition-delay: 0.08s; }
.ef-worlds__grid .ef-reveal:nth-child(3) { transition-delay: 0.16s; }
.ef-ecosystem__grid .ef-reveal:nth-child(2) { transition-delay: 0.08s; }
.ef-ecosystem__grid .ef-reveal:nth-child(3) { transition-delay: 0.16s; }

/* Subtle premium polish — gentle icon float + soft button glow.
   Transform/box-shadow only (no layout shift); the global
   prefers-reduced-motion guard below disables the float automatically. */
@keyframes ef-icon-float { to { transform: translateY(-5px); } }
.ef-card__icon,
.ef-kids-blogcard__media,
.ef-kids-pill__icon { animation: ef-icon-float 3.4s var(--ef-ease) infinite alternate; }
.ef-worlds__grid > :nth-child(2) .ef-card__icon,
.ef-kids-services__grid > :nth-child(2) .ef-card__icon,
.ef-kids-blog__grid > :nth-child(2) .ef-kids-blogcard__media { animation-delay: 0.5s; }
.ef-worlds__grid > :nth-child(3) .ef-card__icon,
.ef-kids-services__grid > :nth-child(3) .ef-card__icon,
.ef-kids-blog__grid > :nth-child(3) .ef-kids-blogcard__media { animation-delay: 1s; }
.ef-kids-services__grid > :nth-child(4) .ef-card__icon,
.ef-kids-blog__grid > :nth-child(4) .ef-kids-blogcard__media { animation-delay: 1.5s; }

.ef-btn--primary:hover { box-shadow: var(--ef-shadow), 0 10px 28px rgba(255, 179, 107, 0.35); }
.ef-btn--accent:hover  { box-shadow: var(--ef-shadow), 0 10px 26px var(--ef-accent); }

/* Reusable animation aliases — drop these on any future page element.
   They reuse the existing reveal/lift/float/glow behaviour (no duplication). */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ef-ease), transform 0.6s var(--ef-ease); }
.animate-on-scroll.is-visible { opacity: 1; transform: none; }
.hover-lift { transition: transform 0.25s var(--ef-ease), box-shadow 0.25s var(--ef-ease); }
.hover-lift:hover { transform: translateY(-6px); box-shadow: var(--ef-shadow-hover); }
.soft-float { animation: ef-icon-float 3.4s var(--ef-ease) infinite alternate; }
.button-glow:hover { box-shadow: var(--ef-shadow), 0 10px 28px rgba(255, 179, 107, 0.35); }
@media (prefers-reduced-motion: reduce) { .animate-on-scroll { opacity: 1; transform: none; } }

/* -------------------------------------------------------------------------
 * 16. RESPONSIVE
 * ---------------------------------------------------------------------- */

/* Tablet: cards become 2 + 1 (last spans full width) */
@media (max-width: 1024px) {
	.ef-worlds__grid { grid-template-columns: repeat(2, 1fr); }
	.ef-worlds__grid > .ef-card:last-child { grid-column: 1 / -1; }
	.ef-ecosystem__grid { grid-template-columns: 1fr; }
	.ef-trust__panel { grid-template-columns: 1fr; }
	.ef-pills { flex-direction: row; flex-wrap: wrap; }
}

/* Mobile nav threshold */
@media (max-width: 860px) {
	.ef-burger { display: flex; }
	.ef-header__cta { display: none; }   /* CTA moves into the open menu */

	.ef-nav {
		position: absolute;
		top: calc(100% + 10px);
		left: clamp(1.1rem, 4vw, 2.5rem);
		right: clamp(1.1rem, 4vw, 2.5rem);
		background: rgba(255, 253, 250, 0.97);
		-webkit-backdrop-filter: blur(16px);
		backdrop-filter: blur(16px);
		border-radius: var(--ef-r-lg);
		box-shadow: var(--ef-shadow);
		border: 1px solid rgba(255,255,255,0.7);
		padding: 0.8rem;
		transform-origin: top center;
		opacity: 0;
		transform: translateY(-10px) scale(0.98);
		visibility: hidden;
		transition: opacity 0.22s var(--ef-ease), transform 0.22s var(--ef-ease), visibility 0.22s;
	}
	.ef-nav.is-open { opacity: 1; transform: none; visibility: visible; }
	.ef-nav__list { flex-direction: column; align-items: stretch; gap: 0.2rem; }
	.ef-nav__link { display: block; padding: 0.85rem 1rem; font-size: 1.05rem; }
}

/* Phones: stack cards, tighten hero */
@media (max-width: 640px) {
	.ef-worlds__grid { grid-template-columns: 1fr; }
	.ef-worlds__grid > .ef-card:last-child { grid-column: auto; }
	.ef-pills { flex-direction: column; }
	.ef-hero__actions .ef-btn,
	.ef-world-intro__actions .ef-btn { flex: 1 1 100%; }
	.ef-footer__inner { flex-direction: column; text-align: center; }
	/* Calm the decorative shapes a touch on small screens */
	.ef-shape--cloud, .ef-shape--pill, .ef-shape--ring { display: none; }
	.ef-shape--blob { width: 90px; height: 90px; }
}

/* -------------------------------------------------------------------------
 * 17. ACCESSIBILITY — reduced motion
 * ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
	.ef-reveal { opacity: 1; transform: none; }
	.ef-shape[data-float] { animation: none; }
}
