/**
 * Aqua Studio Theme — assets/css/motion.css — v1.1.0 — Job 2026-07-04-egfs-launch wave 2
 * Living Water motion system. Source: clients/egfishstore/creative/motion-spec.md
 * (Kenji, Motion) — production CSS pasted verbatim, integrated by Ali.
 * Enqueued after aqua-studio-tokens in functions.php. Additive only — does
 * not edit or override any rule in style.css or rtl.css.
 *
 * Contents:
 *   0. Hero structural layout (Ali addition — style.css never defined
 *      .aqua-hero/.aqua-hero__media/.aqua-hero__copy box model; these are
 *      the minimum positioning-context rules the motion layers below need
 *      to stack correctly behind the copy. Not part of Kenji's spec verbatim
 *      — flagged here so the boundary between "spec, unchanged" and
 *      "structural prerequisite" stays visible.)
 *   1. Hero water motion (light shafts / particulate drift / caustic shimmer)
 *   2. Micro-interactions (card hover, badge fade-in, CTA ripple, nav chip underline)
 *   3. Coming-soon page motion
 *   Reduced-motion fallbacks are inlined under each block, verbatim from spec.
 */

/* ==========================================================================
   0. Hero structural layout — positioning context for Block 1 below
   ========================================================================== */
.aqua-hero {
	position: relative;
}

.aqua-hero__media {
	position: relative;
	overflow: hidden;
}

.aqua-hero__media-placeholder,
.aqua-hero__image {
	display: block;
	width: 100%;
	height: auto;
}

.aqua-hero__media-placeholder {
	aspect-ratio: 2400 / 900;
	background: var( --color-category-keys-marine, #2E8FB8 );
}

.aqua-hero__copy {
	position: relative;
	z-index: 1;
}

/* ==========================================================================
   1. HERO WATER MOTION — creative/motion-spec.md Block 1 (§1.1–1.5)
   ========================================================================== */
.aqua-hero__motion {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

/* 1.1 Light-shaft sway (24s loop, transform-only) */
.aqua-hero__shafts {
	position: absolute;
	inset: -10% -20%; /* oversized so the sway never exposes an edge */
	background-image:
		linear-gradient(100deg, transparent 8%, rgba(255,255,255,.16) 14%, transparent 22%),
		linear-gradient(96deg, transparent 38%, rgba(255,255,255,.10) 45%, transparent 53%),
		linear-gradient(104deg, transparent 68%, rgba(255,255,255,.13) 75%, transparent 83%);
	transform-origin: 50% 0%;
	will-change: transform;
	animation: aquaShaftSway 26s ease-in-out infinite;
}

@keyframes aquaShaftSway {
	0%   { transform: rotate(-1.1deg) translateX(0); }
	50%  { transform: rotate(1.1deg) translateX(1.5%); }
	100% { transform: rotate(-1.1deg) translateX(0); }
}

/* 1.2 Particulate drift — 3 depth bands (opacity/size mirrors the SVG's 3 particulate <g> bands) */
.aqua-hero__particles {
	position: absolute;
	inset: 0;
}

.aqua-hero__particles span {
	position: absolute;
	border-radius: 50%;
	background: #FFFFFF;
	will-change: transform;
}

/* Depth band 1 — farthest, smallest, slowest, faintest (mirrors SVG opacity .55 band) */
.aqua-hero__particles span:nth-child(-n+4) {
	width: 3px; height: 3px;
	opacity: .35;
	animation: aquaDrift 28s linear infinite;
}
/* Depth band 2 — mid (mirrors SVG opacity .7 band) */
.aqua-hero__particles span:nth-child(n+5):nth-child(-n+8) {
	width: 5px; height: 5px;
	opacity: .55;
	animation: aquaDrift 21s linear infinite;
}
/* Depth band 3 — nearest, largest, fastest, most visible (mirrors SVG opacity .9 band) */
.aqua-hero__particles span:nth-child(n+9) {
	width: 7px; height: 7px;
	opacity: .75;
	animation: aquaDrift 15s linear infinite;
}

/* Stagger start + horizontal position per-particle so the drift doesn't read as a synced grid */
.aqua-hero__particles span:nth-child(3n)   { left: 8%;  animation-delay: -2s; }
.aqua-hero__particles span:nth-child(3n+1) { left: 34%; animation-delay: -9s; }
.aqua-hero__particles span:nth-child(3n+2) { left: 61%; animation-delay: -15s; }
.aqua-hero__particles span:nth-child(5n)   { left: 82%; animation-delay: -6s; }

@keyframes aquaDrift {
	0%   { transform: translateY(110%); }
	100% { transform: translateY(-10%); }
}

/* 1.3 Caustic surface shimmer (opacity breathe, no filter animation) */
.aqua-hero__shimmer {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(circle at 22% 30%, rgba(255,255,255,.5) 0%, transparent 45%),
		radial-gradient(circle at 68% 55%, rgba(255,255,255,.4) 0%, transparent 40%),
		radial-gradient(circle at 45% 78%, rgba(255,255,255,.35) 0%, transparent 42%);
	background-repeat: no-repeat;
	background-size: 140% 140%;
	animation: aquaShimmer 20s ease-in-out infinite;
}

@keyframes aquaShimmer {
	0%, 100% { opacity: .5; background-position: 0% 0%; }
	50%      { opacity: .85; background-position: 3% -2%; }
}

/* 1.5 prefers-reduced-motion — full static fallback */
@media (prefers-reduced-motion: reduce) {
	.aqua-hero__shafts,
	.aqua-hero__particles span,
	.aqua-hero__shimmer {
		animation: none !important;
	}
	/* Freeze each layer at its calmest, most legible frame — not hidden,
	   just static, so the water still reads as built/atmospheric. */
	.aqua-hero__shafts   { transform: rotate(0deg); }
	.aqua-hero__shimmer  { opacity: .6; background-position: 0% 0%; }
}

/* ==========================================================================
   2. MICRO-INTERACTIONS — creative/motion-spec.md Block 2 (§2.1–2.4)
   ========================================================================== */

/* 2.1 Product-card hover lift */
.aqua-card {
	transition: transform .22s ease, box-shadow .22s ease;
}

.aqua-card:hover,
.aqua-card:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(18,62,99,.16);
}

/* 2.2 Badge fade-in on scroll (IntersectionObserver, one-time) */
.aqua-badge {
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .45s ease, transform .45s ease;
}

.aqua-badge.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.aqua-badge { opacity: 1; transform: none; transition: none; }
}

/* 2.3 Add-to-cart button ripple (coral #C6402E family, subtle) */
.aqua-cta {
	position: relative;
	overflow: hidden;
}

.aqua-cta__ripple {
	position: absolute;
	border-radius: 50%;
	background: rgba(255,255,255,.55);
	transform: scale(0);
	opacity: 0;
	pointer-events: none;
	animation: aquaRipple .5s ease-out forwards;
}

@keyframes aquaRipple {
	0%   { transform: scale(0);   opacity: .55; }
	100% { transform: scale(2.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.aqua-cta__ripple { animation: none; display: none; }
}

/* 2.4 Nav category-chip tone-key underline swell */
.aqua-nav-cat-chip {
	position: relative;
	padding-bottom: 4px;
}

.aqua-nav-cat-chip::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 0;
	height: 2px;
	background-color: currentColor; /* inherits the chip's cat-key-* color already set by style.css §7 */
	transform: translateX(-50%);
	transition: width .2s ease;
}

.aqua-nav-cat-chip:hover::after,
.aqua-nav-cat-chip:focus-visible::after,
.aqua-nav-cat-chip[aria-current="page"]::after {
	width: 70%;
}

/* ==========================================================================
   3. COMING-SOON PAGE MOTION — creative/motion-spec.md Block 3 (CSS-only, <=8 elements)
   ========================================================================== */
.aqua-soon {
	position: relative;
	min-height: 100vh;
	overflow: hidden;
	background: linear-gradient(160deg, #DCEEF4 0%, #2E8FB8 55%, #123E63 100%);
	background-size: 180% 180%;
	animation: aquaSoonGradient 24s ease-in-out infinite;
}

@keyframes aquaSoonGradient {
	0%, 100% { background-position: 0% 20%; }
	50%      { background-position: 100% 80%; }
}

.aqua-soon__bubble {
	position: absolute;
	bottom: -10%;
	border-radius: 50%;
	background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.65), rgba(255,255,255,.08) 70%);
	animation: aquaSoonRise linear infinite;
	will-change: transform;
}

@keyframes aquaSoonRise {
	0%   { transform: translateY(0) translateX(0); opacity: 0; }
	8%   { opacity: .8; }
	92%  { opacity: .5; }
	100% { transform: translateY(-115vh) translateX(var(--drift, 20px)); opacity: 0; }
}

.aqua-soon__bubble:nth-child(1) { left: 8%;  width: 18px; height: 18px; animation-duration: 14s; animation-delay: 0s;  --drift: 24px; }
.aqua-soon__bubble:nth-child(2) { left: 22%; width: 10px; height: 10px; animation-duration: 10s; animation-delay: -3s; --drift: -16px; }
.aqua-soon__bubble:nth-child(3) { left: 41%; width: 26px; height: 26px; animation-duration: 18s; animation-delay: -7s; --drift: 30px; }
.aqua-soon__bubble:nth-child(4) { left: 58%; width: 14px; height: 14px; animation-duration: 12s; animation-delay: -2s; --drift: -22px; }
.aqua-soon__bubble:nth-child(5) { left: 74%; width: 22px; height: 22px; animation-duration: 16s; animation-delay: -9s; --drift: 18px; }
.aqua-soon__bubble:nth-child(6) { left: 88%; width: 12px; height: 12px; animation-duration: 11s; animation-delay: -5s; --drift: -14px; }

@media (prefers-reduced-motion: reduce) {
	.aqua-soon { animation: none; background-position: 0% 0%; }
	.aqua-soon__bubble { display: none; }
}

/* Branded content wrapper — Ali addition (coming-soon.php build item, not
   part of Kenji's spec verbatim): centers the logo-seal/wordmark/tagline
   above the bubble layer via normal flow + z-index, per motion-spec.md §3's
   note that branded content "sits inside, above these, via normal flow". */
.aqua-soon__content {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	gap: 18px;
}

.aqua-soon__seal {
	width: clamp(96px, 14vw, 160px);
	height: auto;
}

.aqua-soon__wordmark {
	margin: 0;
	color: #FFFFFF;
	font-family: var( --type-display-font, 'Fraunces', serif );
	font-weight: 600;
	font-size: clamp(22px, 4vw, 34px);
	letter-spacing: .06em;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.aqua-soon__wordmark-ar {
	font-family: 'Lalezar', sans-serif;
	font-size: .82em;
	letter-spacing: 0;
}

.aqua-soon__tagline {
	margin: 0;
	color: rgba(255,255,255,.88);
	font-family: var( --type-body-font, 'Inter', sans-serif );
	font-size: clamp(15px, 2vw, 18px);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.aqua-soon__tagline-ar {
	font-family: 'Tajawal', sans-serif;
}

@media (prefers-reduced-motion: reduce) {
	.aqua-soon-body { background: #123E63; }
}
