Files
home/Projects/docs.pivoine.art/components/icons/PivoineDocsIcon.css

792 lines
17 KiB
CSS

/* ================================================
Pivoine Docs Icon - Enhanced Peony Blossom
================================================ */
.pivoine-docs-icon-wrapper {
position: relative;
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 1rem;
cursor: pointer;
transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
transform-style: preserve-3d;
}
.pivoine-docs-icon-wrapper:not(.is-interactive) {
cursor: default;
}
.pivoine-docs-icon {
width: 100%;
height: 100%;
display: block;
filter: drop-shadow(0 8px 32px rgba(236, 72, 153, 0.2));
transition: filter 0.6s ease;
}
/* ================================================
NORMAL STATE - Gentle Breathing Animation
================================================ */
/* Background glow pulse */
.bg-glow {
animation: bg-breathe 6s ease-in-out infinite;
}
/* Base state: Petals in semi-closed bud position */
.outer-petal {
transform-origin: 128px 128px;
transform: scale(0.3) translateX(8px);
opacity: 0.5;
transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
animation: petal-breathe 6s ease-in-out infinite;
}
.middle-petal {
transform-origin: 128px 128px;
transform: scale(0.4) translateX(6px);
opacity: 0.6;
transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s;
animation: petal-breathe 6s ease-in-out infinite 0.3s;
}
.inner-petal {
transform-origin: 128px 128px;
transform: scale(0.5) translateX(4px);
opacity: 0.7;
transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.16s;
animation: petal-breathe 6s ease-in-out infinite 0.6s;
}
/* Non-interactive version shows a beautiful semi-open bloom */
.pivoine-docs-icon-wrapper:not(.is-interactive) .outer-petal {
transform: scale(0.75) translateX(20px);
opacity: 0.75;
animation: petal-float 8s ease-in-out infinite;
}
.pivoine-docs-icon-wrapper:not(.is-interactive) .middle-petal {
transform: scale(0.8) translateX(14px);
opacity: 0.85;
animation: petal-float 8s ease-in-out infinite 0.5s;
}
.pivoine-docs-icon-wrapper:not(.is-interactive) .inner-petal {
transform: scale(0.85) translateX(8px);
opacity: 0.92;
animation: petal-float 8s ease-in-out infinite 1s;
}
/* Center breathes gently */
.center-circle-outer {
animation: center-breathe 5s ease-in-out infinite;
transform-origin: center;
}
.center-circle-inner {
animation: center-breathe-inner 5s ease-in-out infinite 0.3s;
transform-origin: center;
}
/* Stamens rotate gently */
.center-stamens {
animation: stamens-rotate 20s linear infinite;
transform-origin: 128px 128px;
}
.stamen {
animation: stamen-pulse 3s ease-in-out infinite;
}
.stamen-0 { animation-delay: 0s; }
.stamen-1 { animation-delay: 0.2s; }
.stamen-2 { animation-delay: 0.4s; }
.stamen-3 { animation-delay: 0.6s; }
.stamen-4 { animation-delay: 0.8s; }
.stamen-5 { animation-delay: 1s; }
.stamen-6 { animation-delay: 1.2s; }
.stamen-7 { animation-delay: 1.4s; }
/* Sparkles twinkle */
.sparkle {
animation: sparkle-twinkle 3s ease-in-out infinite;
transform-origin: center;
}
.sparkle-1 { animation-delay: 0s; }
.sparkle-2 { animation-delay: 0.4s; }
.sparkle-3 { animation-delay: 0.8s; }
.sparkle-4 { animation-delay: 1.2s; }
.sparkle-5 { animation-delay: 1.6s; }
.sparkle-6 { animation-delay: 2s; }
.sparkle-7 { animation-delay: 2.4s; }
.sparkle-8 { animation-delay: 2.8s; }
/* Pages subtle floating */
.page {
transform-origin: center;
animation: page-float 4s ease-in-out infinite;
}
.page-1 { animation-delay: 0s; }
.page-2 { animation-delay: 0.3s; }
.page-3 { animation-delay: 0.6s; }
/* Text lines subtle shimmer */
.text-line {
animation: text-shimmer 4s ease-in-out infinite;
}
.line-1 { animation-delay: 0s; }
.line-2 { animation-delay: 0.3s; }
.line-3 { animation-delay: 0.6s; }
.line-4 { animation-delay: 0.9s; }
.line-5 { animation-delay: 1.2s; }
/* Bloom particles hidden in normal state */
.bloom-particle {
opacity: 0;
transition: opacity 0.3s ease;
}
/* ================================================
HOVER STATE - Beautiful Full Bloom
================================================ */
.pivoine-docs-icon-wrapper.is-interactive.is-hovered {
transform: scale(1.1) translateY(-8px);
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .pivoine-docs-icon {
filter: drop-shadow(0 16px 48px rgba(236, 72, 153, 0.4))
drop-shadow(0 8px 24px rgba(168, 85, 247, 0.3));
}
/* Petals bloom outward beautifully */
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .outer-petal {
transform: scale(0.55) translateX(38px);
opacity: 0.9;
filter: url(#intense-glow);
animation: petal-bloom-hover 2s ease-in-out infinite;
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .middle-petal {
transform: scale(0.525) translateX(26px);
opacity: 0.92;
filter: url(#petal-glow);
animation: petal-bloom-hover 2s ease-in-out infinite 0.2s;
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .inner-petal {
transform: scale(0.5) translateX(16px);
opacity: 0.95;
filter: url(#petal-glow);
animation: petal-bloom-hover 2s ease-in-out infinite 0.4s;
}
/* Center grows with intense glow */
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .center-circle-outer {
animation: center-bloom-glow 1.5s ease-in-out infinite;
filter: url(#intense-glow);
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .center-circle-inner {
animation: center-bloom-inner 1.5s ease-in-out infinite;
}
/* Stamens dance */
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .stamen {
animation: stamen-dance 0.8s ease-in-out infinite;
}
/* Sparkles burst with energy */
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .sparkle {
animation: sparkle-burst 1s ease-out infinite;
}
/* Bloom particles fly around! */
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .bloom-particle {
opacity: 0.7;
animation: bloom-particle-fly 3s ease-in-out infinite;
}
/* Background glows intensely */
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .bg-glow {
animation: bg-bloom-glow 2s ease-in-out infinite;
}
/* Pages fan out */
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .page {
animation: page-fan-out 0.8s ease-out forwards;
}
/* ================================================
CLICK STATE - Smooth Closing Animation
================================================ */
.pivoine-docs-icon-wrapper.is-clicked {
animation: icon-press 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pivoine-docs-icon-wrapper.is-clicked .pivoine-docs-icon {
animation: icon-pulse 1.2s ease-out;
filter: drop-shadow(0 20px 60px rgba(236, 72, 153, 0.6))
drop-shadow(0 10px 30px rgba(168, 85, 247, 0.4));
}
/* Petals close inward smoothly */
.pivoine-docs-icon-wrapper.is-clicked .outer-petal {
animation: petal-close-outer 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.pivoine-docs-icon-wrapper.is-clicked .middle-petal {
animation: petal-close-middle 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.05s;
}
.pivoine-docs-icon-wrapper.is-clicked .inner-petal {
animation: petal-close-inner 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.1s;
}
/* Center contracts */
.pivoine-docs-icon-wrapper.is-clicked .center-circle-outer {
animation: center-close 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.pivoine-docs-icon-wrapper.is-clicked .center-circle-inner {
animation: center-close-inner 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.1s;
}
/* Sparkles implode */
.pivoine-docs-icon-wrapper.is-clicked .sparkle {
animation: sparkle-implode 1.2s ease-out;
}
/* Bloom particles burst then fade */
.pivoine-docs-icon-wrapper.is-clicked .bloom-particle {
animation: bloom-particle-burst 1.2s ease-out;
}
/* ================================================
KEYFRAME ANIMATIONS
================================================ */
/* Normal State Animations */
@keyframes bg-breathe {
0%, 100% {
opacity: 0.06;
transform: scale(1);
}
50% {
opacity: 0.12;
transform: scale(1.02);
}
}
@keyframes petal-breathe {
0%, 100% {
transform: scale(0.3) translateX(8px);
}
50% {
transform: scale(0.35) translateX(10px);
}
}
@keyframes petal-float {
0%, 100% {
transform: scale(0.75) translateX(20px) translateY(0);
}
50% {
transform: scale(0.77) translateX(21px) translateY(-2px);
}
}
@keyframes center-breathe {
0%, 100% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.08);
opacity: 0.95;
}
}
@keyframes center-breathe-inner {
0%, 100% {
transform: scale(1);
opacity: 0.9;
}
50% {
transform: scale(1.12);
opacity: 0.95;
}
}
@keyframes stamens-rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes stamen-pulse {
0%, 100% {
transform: scale(1);
opacity: 0.8;
}
50% {
transform: scale(1.3);
opacity: 1;
}
}
@keyframes sparkle-twinkle {
0%, 100% {
transform: scale(0.8);
opacity: 0.4;
}
50% {
transform: scale(1.2);
opacity: 1;
}
}
@keyframes page-float {
0%, 100% {
transform: translateY(0) rotate(0deg);
}
50% {
transform: translateY(-2px) rotate(0.5deg);
}
}
@keyframes text-shimmer {
0%, 100% {
opacity: 0.7;
}
50% {
opacity: 0.9;
}
}
/* Hover State Animations */
@keyframes petal-bloom-hover {
0%, 100% {
transform: scale(0.55) translateX(38px) rotate(0deg);
}
50% {
transform: scale(0.56) translateX(40px) rotate(1deg);
}
}
@keyframes center-bloom-glow {
0%, 100% {
transform: scale(1.3);
opacity: 1;
}
50% {
transform: scale(1.5);
opacity: 0.95;
}
}
@keyframes center-bloom-inner {
0%, 100% {
transform: scale(1.4);
opacity: 1;
}
50% {
transform: scale(1.6);
opacity: 0.95;
}
}
@keyframes stamen-dance {
0%, 100% {
transform: scale(1) translateY(0);
}
50% {
transform: scale(1.5) translateY(-2px);
}
}
@keyframes sparkle-burst {
0% {
transform: scale(1);
opacity: 0.8;
}
50% {
transform: scale(2.5);
opacity: 1;
}
100% {
transform: scale(1);
opacity: 0.8;
}
}
@keyframes bloom-particle-fly {
0% {
transform: translate(0, 0) scale(0.5);
opacity: 0;
}
20% {
opacity: 0.7;
}
50% {
transform:
translate(
calc(cos(var(--particle-angle)) * var(--particle-distance)),
calc(sin(var(--particle-angle)) * var(--particle-distance))
)
scale(1);
opacity: 0.8;
}
80% {
opacity: 0.5;
}
100% {
transform:
translate(
calc(cos(var(--particle-angle)) * var(--particle-distance) * 1.5),
calc(sin(var(--particle-angle)) * var(--particle-distance) * 1.5)
)
scale(0.3);
opacity: 0;
}
}
@keyframes bg-bloom-glow {
0%, 100% {
opacity: 0.15;
transform: scale(1.05);
}
50% {
opacity: 0.25;
transform: scale(1.1);
}
}
@keyframes page-fan-out {
0% {
transform: translateY(0) rotate(0deg);
}
100% {
transform: translateY(-3px) rotate(2deg);
}
}
/* Click State Animations */
@keyframes icon-press {
0% {
transform: scale(1.1) translateY(-8px);
}
20% {
transform: scale(0.95) translateY(-4px);
}
40% {
transform: scale(1.05) translateY(-6px);
}
60% {
transform: scale(0.98) translateY(-5px);
}
100% {
transform: scale(1) translateY(0);
}
}
@keyframes icon-pulse {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
}
@keyframes petal-close-outer {
0% {
transform: scale(1.1) translateX(38px);
opacity: 0.9;
}
50% {
transform: scale(0.2) translateX(5px);
opacity: 0.4;
}
100% {
transform: scale(0.3) translateX(8px);
opacity: 0.5;
}
}
@keyframes petal-close-middle {
0% {
transform: scale(1.05) translateX(26px);
opacity: 0.92;
}
50% {
transform: scale(0.25) translateX(4px);
opacity: 0.5;
}
100% {
transform: scale(0.4) translateX(6px);
opacity: 0.6;
}
}
@keyframes petal-close-inner {
0% {
transform: scale(1) translateX(16px);
opacity: 0.95;
}
50% {
transform: scale(0.35) translateX(3px);
opacity: 0.6;
}
100% {
transform: scale(0.5) translateX(4px);
opacity: 0.7;
}
}
@keyframes center-close {
0% {
transform: scale(1.3);
opacity: 1;
}
50% {
transform: scale(0.8);
opacity: 0.9;
}
100% {
transform: scale(1);
opacity: 1;
}
}
@keyframes center-close-inner {
0% {
transform: scale(1.4);
opacity: 1;
}
50% {
transform: scale(0.7);
opacity: 0.85;
}
100% {
transform: scale(1);
opacity: 0.9;
}
}
@keyframes sparkle-implode {
0% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(3);
opacity: 0.3;
}
100% {
transform: scale(0.8);
opacity: 0.4;
}
}
@keyframes bloom-particle-burst {
0% {
transform: translate(0, 0) scale(0.7);
opacity: 0.7;
}
30% {
transform:
translate(
calc(cos(var(--particle-angle)) * var(--particle-distance) * 2),
calc(sin(var(--particle-angle)) * var(--particle-distance) * 2)
)
scale(1.5);
opacity: 1;
}
100% {
transform:
translate(
calc(cos(var(--particle-angle)) * var(--particle-distance) * 0.3),
calc(sin(var(--particle-angle)) * var(--particle-distance) * 0.3)
)
scale(0.1);
opacity: 0;
}
}
/* ================================================
LABEL STYLING
================================================ */
.icon-label {
margin-top: 0.5rem;
}
.label-text {
font-size: 1.25rem;
font-weight: 700;
background: linear-gradient(135deg, #ec4899, #a855f7, #c084fc);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: label-shimmer 4s ease-in-out infinite;
}
@keyframes label-shimmer {
0%, 100% {
filter: brightness(1);
}
50% {
filter: brightness(1.4);
}
}
/* ================================================
RESPONSIVE ADJUSTMENTS
================================================ */
@media (max-width: 768px) {
.pivoine-docs-icon-wrapper.is-interactive.is-hovered {
transform: scale(1.08) translateY(-6px);
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .outer-petal {
transform: scale(1.05) translateX(32px);
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .middle-petal {
transform: scale(1) translateX(22px);
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .inner-petal {
transform: scale(0.95) translateX(14px);
}
}
/* ================================================
REDUCED MOTION SUPPORT
================================================ */
@media (prefers-reduced-motion: reduce) {
.pivoine-docs-icon-wrapper,
.pivoine-docs-icon,
.petal,
.sparkle,
.bloom-particle,
.center-circle-outer,
.center-circle-inner,
.center-stamens,
.stamen,
.page,
.text-line,
.label-text,
.bg-glow {
animation: none !important;
transition: opacity 0.3s ease, transform 0.3s ease !important;
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered {
transform: scale(1.05);
}
/* Show petals in beautiful semi-open state */
.outer-petal {
transform: scale(0.85) translateX(22px);
opacity: 0.8;
}
.middle-petal {
transform: scale(0.9) translateX(16px);
opacity: 0.88;
}
.inner-petal {
transform: scale(0.92) translateX(10px);
opacity: 0.92;
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .outer-petal {
transform: scale(0.95) translateX(28px);
opacity: 0.88;
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .middle-petal {
transform: scale(0.98) translateX(20px);
opacity: 0.92;
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .inner-petal {
transform: scale(1) translateX(14px);
opacity: 0.95;
}
.bloom-particle {
display: none;
}
}
/* ================================================
TOUCH DEVICE OPTIMIZATION
================================================ */
@media (hover: none) and (pointer: coarse) {
.pivoine-docs-icon-wrapper.is-interactive:active {
transform: scale(0.98);
}
/* Show semi-open bloom by default on touch devices */
.pivoine-docs-icon-wrapper.is-interactive .outer-petal {
transform: scale(0.6) translateX(16px);
opacity: 0.7;
}
.pivoine-docs-icon-wrapper.is-interactive .middle-petal {
transform: scale(0.7) translateX(12px);
opacity: 0.8;
}
.pivoine-docs-icon-wrapper.is-interactive .inner-petal {
transform: scale(0.75) translateX(8px);
opacity: 0.88;
}
/* Enhance bloom on hover state for touch */
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .outer-petal {
transform: scale(0.95) translateX(32px);
opacity: 0.85;
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .middle-petal {
transform: scale(0.95) translateX(22px);
opacity: 0.9;
}
.pivoine-docs-icon-wrapper.is-interactive.is-hovered .inner-petal {
transform: scale(0.95) translateX(14px);
opacity: 0.95;
}
}
/* ================================================
HIGH PERFORMANCE MODE
================================================ */
@media (prefers-reduced-data: reduce) {
.bloom-particle,
.sparkle {
display: none;
}
.pivoine-docs-icon {
filter: none !important;
}
}