| 1 |
/* ── Animated Text Block ─────────────────────────────────────────────────── */ |
| 2 |
.bkbg-at-wrapper { |
| 3 |
padding-top: var(--bkbg-at-pad-top, 0); |
| 4 |
padding-bottom: var(--bkbg-at-pad-bottom, 0); |
| 5 |
text-align: var(--bkbg-at-text-align, left); |
| 6 |
} |
| 7 |
|
| 8 |
.bkbg-at-wrapper.bkbg-at-align-center { margin-left: auto; margin-right: auto; } |
| 9 |
|
| 10 |
.bkbg-at-heading { |
| 11 |
margin: 0; |
| 12 |
font-family: var(--bkbg-at-heading-font-family, inherit); |
| 13 |
font-size: var(--bkbg-at-heading-font-size-d, var(--bkbg-at-heading-font-size, var(--bkbg-at-font-size, 48px))); |
| 14 |
font-weight: var(--bkbg-at-heading-font-weight, var(--bkbg-at-font-weight, 700)); |
| 15 |
font-style: var(--bkbg-at-heading-font-style, normal); |
| 16 |
text-transform: var(--bkbg-at-heading-text-transform, none); |
| 17 |
text-decoration: var(--bkbg-at-heading-text-decoration, none); |
| 18 |
line-height: var(--bkbg-at-heading-line-height-d, var(--bkbg-at-heading-line-height, var(--bkbg-at-line-height, 1.2))); |
| 19 |
letter-spacing: var(--bkbg-at-heading-letter-spacing-d, var(--bkbg-at-heading-letter-spacing, var(--bkbg-at-letter-spacing, 0))); |
| 20 |
word-spacing: var(--bkbg-at-heading-word-spacing-d, var(--bkbg-at-heading-word-spacing, normal)); |
| 21 |
color: var(--bkbg-at-static-color, #0f172a); |
| 22 |
max-width: var(--bkbg-at-max-width, none); |
| 23 |
} |
| 24 |
|
| 25 |
.bkbg-at-wrapper.bkbg-at-align-center .bkbg-at-heading { margin-left: auto; margin-right: auto; } |
| 26 |
|
| 27 |
/* ── Static text ─────────────────────────────────────────────────────────── */ |
| 28 |
.bkbg-at-static { color: inherit; } |
| 29 |
|
| 30 |
/* ── Animated word wrapper ───────────────────────────────────────────────── */ |
| 31 |
.bkbg-at-animated-word { |
| 32 |
display: inline-block; |
| 33 |
position: relative; |
| 34 |
color: var(--bkbg-at-animated-color, #2563eb); |
| 35 |
white-space: pre; |
| 36 |
} |
| 37 |
|
| 38 |
.bkbg-at-word-text { |
| 39 |
display: inline; |
| 40 |
background: var(--bkbg-at-highlight-bg, transparent); |
| 41 |
padding: 0 var(--bkbg-at-highlight-pad, 0); |
| 42 |
border-radius: var(--bkbg-at-highlight-radius, 0); |
| 43 |
} |
| 44 |
|
| 45 |
/* ── Cursor ──────────────────────────────────────────────────────────────── */ |
| 46 |
.bkbg-at-cursor { |
| 47 |
display: inline-block; |
| 48 |
color: var(--bkbg-at-cursor-color, #2563eb); |
| 49 |
font-weight: 100; |
| 50 |
animation: bkbg-at-blink var(--bkbg-at-cursor-blink, 530ms) step-end infinite; |
| 51 |
margin-left: 1px; |
| 52 |
} |
| 53 |
|
| 54 |
@keyframes bkbg-at-blink { |
| 55 |
0%, 100% { opacity: 1; } |
| 56 |
50% { opacity: 0; } |
| 57 |
} |
| 58 |
|
| 59 |
/* ── Fade effect ─────────────────────────────────────────────────────────── */ |
| 60 |
@keyframes bkbg-at-fade-in { |
| 61 |
from { opacity: 0; } |
| 62 |
to { opacity: 1; } |
| 63 |
} |
| 64 |
@keyframes bkbg-at-fade-out { |
| 65 |
from { opacity: 1; } |
| 66 |
to { opacity: 0; } |
| 67 |
} |
| 68 |
|
| 69 |
.bkbg-at-effect-fade.is-entering { animation: bkbg-at-fade-in 0.35s ease-out forwards; } |
| 70 |
.bkbg-at-effect-fade.is-leaving { animation: bkbg-at-fade-out 0.35s ease-in forwards; } |
| 71 |
|
| 72 |
/* ── Slide Up effect ─────────────────────────────────────────────────────── */ |
| 73 |
@keyframes bkbg-at-slide-up-in { |
| 74 |
from { opacity: 0; transform: translateY(60%); } |
| 75 |
to { opacity: 1; transform: translateY(0); } |
| 76 |
} |
| 77 |
@keyframes bkbg-at-slide-up-out { |
| 78 |
from { opacity: 1; transform: translateY(0); } |
| 79 |
to { opacity: 0; transform: translateY(-60%); } |
| 80 |
} |
| 81 |
|
| 82 |
.bkbg-at-effect-slide-up { overflow: hidden; vertical-align: bottom; } |
| 83 |
.bkbg-at-effect-slide-up .bkbg-at-word-text { display: inline-block; } |
| 84 |
.bkbg-at-effect-slide-up.is-entering .bkbg-at-word-text { animation: bkbg-at-slide-up-in 0.38s cubic-bezier(0.22,1,0.36,1) forwards; } |
| 85 |
.bkbg-at-effect-slide-up.is-leaving .bkbg-at-word-text { animation: bkbg-at-slide-up-out 0.28s ease-in forwards; } |
| 86 |
|
| 87 |
/* ── Slide Down effect ───────────────────────────────────────────────────── */ |
| 88 |
@keyframes bkbg-at-slide-down-in { |
| 89 |
from { opacity: 0; transform: translateY(-60%); } |
| 90 |
to { opacity: 1; transform: translateY(0); } |
| 91 |
} |
| 92 |
@keyframes bkbg-at-slide-down-out { |
| 93 |
from { opacity: 1; transform: translateY(0); } |
| 94 |
to { opacity: 0; transform: translateY(60%); } |
| 95 |
} |
| 96 |
|
| 97 |
.bkbg-at-effect-slide-down { overflow: hidden; vertical-align: bottom; } |
| 98 |
.bkbg-at-effect-slide-down .bkbg-at-word-text { display: inline-block; } |
| 99 |
.bkbg-at-effect-slide-down.is-entering .bkbg-at-word-text { animation: bkbg-at-slide-down-in 0.38s cubic-bezier(0.22,1,0.36,1) forwards; } |
| 100 |
.bkbg-at-effect-slide-down.is-leaving .bkbg-at-word-text { animation: bkbg-at-slide-down-out 0.28s ease-in forwards; } |
| 101 |
|
| 102 |
/* ── Flip effect ─────────────────────────────────────────────────────────── */ |
| 103 |
@keyframes bkbg-at-flip-in { |
| 104 |
from { opacity: 0; transform: rotateX(-90deg); } |
| 105 |
to { opacity: 1; transform: rotateX(0deg); } |
| 106 |
} |
| 107 |
@keyframes bkbg-at-flip-out { |
| 108 |
from { opacity: 1; transform: rotateX(0deg); } |
| 109 |
to { opacity: 0; transform: rotateX(90deg); } |
| 110 |
} |
| 111 |
|
| 112 |
.bkbg-at-effect-flip { perspective: 400px; vertical-align: bottom; } |
| 113 |
.bkbg-at-effect-flip .bkbg-at-word-text { display: inline-block; } |
| 114 |
.bkbg-at-effect-flip.is-entering .bkbg-at-word-text { animation: bkbg-at-flip-in 0.4s cubic-bezier(0.22,1,0.36,1) forwards; } |
| 115 |
.bkbg-at-effect-flip.is-leaving .bkbg-at-word-text { animation: bkbg-at-flip-out 0.3s ease-in forwards; } |
| 116 |
|
| 117 |
/* ── Zoom effect ─────────────────────────────────────────────────────────── */ |
| 118 |
@keyframes bkbg-at-zoom-in { |
| 119 |
from { opacity: 0; transform: scale(0.6); } |
| 120 |
to { opacity: 1; transform: scale(1); } |
| 121 |
} |
| 122 |
@keyframes bkbg-at-zoom-out { |
| 123 |
from { opacity: 1; transform: scale(1); } |
| 124 |
to { opacity: 0; transform: scale(1.4); } |
| 125 |
} |
| 126 |
|
| 127 |
.bkbg-at-effect-zoom .bkbg-at-word-text { display: inline-block; } |
| 128 |
.bkbg-at-effect-zoom.is-entering .bkbg-at-word-text { animation: bkbg-at-zoom-in 0.38s cubic-bezier(0.34,1.56,0.64,1) forwards; } |
| 129 |
.bkbg-at-effect-zoom.is-leaving .bkbg-at-word-text { animation: bkbg-at-zoom-out 0.25s ease-in forwards; } |
| 130 |
|
| 131 |
/* ── Blur effect ─────────────────────────────────────────────────────────── */ |
| 132 |
@keyframes bkbg-at-blur-in { |
| 133 |
from { opacity: 0; filter: blur(10px); } |
| 134 |
to { opacity: 1; filter: blur(0); } |
| 135 |
} |
| 136 |
@keyframes bkbg-at-blur-out { |
| 137 |
from { opacity: 1; filter: blur(0); } |
| 138 |
to { opacity: 0; filter: blur(10px); } |
| 139 |
} |
| 140 |
|
| 141 |
.bkbg-at-effect-blur .bkbg-at-word-text { display: inline-block; } |
| 142 |
.bkbg-at-effect-blur.is-entering .bkbg-at-word-text { animation: bkbg-at-blur-in 0.4s ease-out forwards; } |
| 143 |
.bkbg-at-effect-blur.is-leaving .bkbg-at-word-text { animation: bkbg-at-blur-out 0.3s ease-in forwards; } |
| 144 |
|
| 145 |
/* ── Responsive typography ────────────────────────────────────────────────── */ |
| 146 |
@media (max-width: 1024px) { |
| 147 |
.bkbg-at-heading { |
| 148 |
font-size: var(--bkbg-at-heading-font-size-t, var(--bkbg-at-heading-font-size-d, var(--bkbg-at-heading-font-size, var(--bkbg-at-font-size, 48px)))); |
| 149 |
line-height: var(--bkbg-at-heading-line-height-t, var(--bkbg-at-heading-line-height-d, var(--bkbg-at-heading-line-height, var(--bkbg-at-line-height, 1.2)))); |
| 150 |
letter-spacing: var(--bkbg-at-heading-letter-spacing-t, var(--bkbg-at-heading-letter-spacing-d, var(--bkbg-at-heading-letter-spacing, var(--bkbg-at-letter-spacing, 0)))); |
| 151 |
word-spacing: var(--bkbg-at-heading-word-spacing-t, var(--bkbg-at-heading-word-spacing-d, var(--bkbg-at-heading-word-spacing, normal))); |
| 152 |
} |
| 153 |
} |
| 154 |
@media (max-width: 767px) { |
| 155 |
.bkbg-at-heading { |
| 156 |
font-size: var(--bkbg-at-heading-font-size-m, var(--bkbg-at-heading-font-size-t, var(--bkbg-at-heading-font-size-d, var(--bkbg-at-heading-font-size, var(--bkbg-at-font-size, 48px))))); |
| 157 |
line-height: var(--bkbg-at-heading-line-height-m, var(--bkbg-at-heading-line-height-t, var(--bkbg-at-heading-line-height-d, var(--bkbg-at-heading-line-height, var(--bkbg-at-line-height, 1.2))))); |
| 158 |
letter-spacing: var(--bkbg-at-heading-letter-spacing-m, var(--bkbg-at-heading-letter-spacing-t, var(--bkbg-at-heading-letter-spacing-d, var(--bkbg-at-heading-letter-spacing, var(--bkbg-at-letter-spacing, 0))))); |
| 159 |
word-spacing: var(--bkbg-at-heading-word-spacing-m, var(--bkbg-at-heading-word-spacing-t, var(--bkbg-at-heading-word-spacing-d, var(--bkbg-at-heading-word-spacing, normal)))); |
| 160 |
} |
| 161 |
} |
| 162 |
|
| 163 |
/* ── Reduced Motion ──────────────────────────────────────────────────────── */ |
| 164 |
@media (prefers-reduced-motion: reduce) { |
| 165 |
.bkbg-at-cursor { animation: none !important; } |
| 166 |
.bkbg-at-word-text { animation: none !important; } |
| 167 |
.bkbg-at-effect-fade.is-leaving, |
| 168 |
.bkbg-at-effect-slide-up.is-leaving .bkbg-at-word-text, |
| 169 |
.bkbg-at-effect-slide-down.is-leaving .bkbg-at-word-text, |
| 170 |
.bkbg-at-effect-flip.is-leaving .bkbg-at-word-text, |
| 171 |
.bkbg-at-effect-zoom.is-leaving .bkbg-at-word-text, |
| 172 |
.bkbg-at-effect-blur.is-leaving .bkbg-at-word-text { opacity: 0 !important; } |
| 173 |
} |
| 174 |
|