| 1 |
/* ───────────────────────────────────────────────────────────────── |
| 2 |
Split Text — bkst |
| 3 |
───────────────────────────────────────────────────────────────── */ |
| 4 |
|
| 5 |
.bkst-section { |
| 6 |
box-sizing: border-box; |
| 7 |
width: 100%; |
| 8 |
overflow: hidden; |
| 9 |
} |
| 10 |
|
| 11 |
/* ── Text container ────────────────────────────────────────────── */ |
| 12 |
.bkst-text { |
| 13 |
margin: 0; |
| 14 |
padding: 0; |
| 15 |
word-break: break-word; |
| 16 |
overflow: hidden; |
| 17 |
} |
| 18 |
|
| 19 |
/* ── Typography CSS-var rules — ≥0,2,0 for h1-h4 ── */ |
| 20 |
.bkst-section .bkst-text { |
| 21 |
font-family: var(--bkst-tx-font-family, inherit); |
| 22 |
font-size: var(--bkst-tx-font-size-d, var(--bkst-tx-sz, 48px)); |
| 23 |
font-weight: var(--bkst-tx-font-weight, var(--bkst-tx-w, 800)); |
| 24 |
font-style: var(--bkst-tx-font-style, normal); |
| 25 |
text-decoration: var(--bkst-tx-text-decoration, none); |
| 26 |
text-transform: var(--bkst-tx-text-transform, var(--bkst-tx-tt, none)); |
| 27 |
line-height: var(--bkst-tx-line-height-d, var(--bkst-tx-lh, 1.2)); |
| 28 |
letter-spacing: var(--bkst-tx-letter-spacing-d, var(--bkst-tx-ls, normal)); |
| 29 |
word-spacing: var(--bkst-tx-word-spacing-d, normal); |
| 30 |
} |
| 31 |
|
| 32 |
/* ── Typography responsive — tablet ── */ |
| 33 |
@media (max-width: 1024px) { |
| 34 |
.bkst-section .bkst-text { font-size: var(--bkst-tx-font-size-t, var(--bkst-tx-font-size-d, var(--bkst-tx-sz, 48px))); line-height: var(--bkst-tx-line-height-t, var(--bkst-tx-line-height-d, var(--bkst-tx-lh, 1.2))); letter-spacing: var(--bkst-tx-letter-spacing-t, var(--bkst-tx-letter-spacing-d, var(--bkst-tx-ls, normal))); word-spacing: var(--bkst-tx-word-spacing-t, var(--bkst-tx-word-spacing-d, normal)); } |
| 35 |
} |
| 36 |
|
| 37 |
/* ── Typography responsive — mobile ── */ |
| 38 |
@media (max-width: 767px) { |
| 39 |
.bkst-section .bkst-text { font-size: var(--bkst-tx-font-size-m, var(--bkst-tx-font-size-t, var(--bkst-tx-font-size-d, var(--bkst-tx-sz, 48px)))); line-height: var(--bkst-tx-line-height-m, var(--bkst-tx-line-height-t, var(--bkst-tx-line-height-d, var(--bkst-tx-lh, 1.2)))); letter-spacing: var(--bkst-tx-letter-spacing-m, var(--bkst-tx-letter-spacing-t, var(--bkst-tx-letter-spacing-d, var(--bkst-tx-ls, normal)))); word-spacing: var(--bkst-tx-word-spacing-m, var(--bkst-tx-word-spacing-t, var(--bkst-tx-word-spacing-d, normal))); } |
| 40 |
} |
| 41 |
|
| 42 |
/* ── Shared unit styles ────────────────────────────────────────── */ |
| 43 |
.bkst-word, |
| 44 |
.bkst-char, |
| 45 |
.bkst-line { |
| 46 |
display: inline-block; |
| 47 |
will-change: transform, opacity, filter; |
| 48 |
overflow: hidden; |
| 49 |
/* Initial hidden state — overridden to "revealed" state by JS */ |
| 50 |
opacity: 0; |
| 51 |
transform: translateY(1em); |
| 52 |
transition: |
| 53 |
opacity var(--bkst-dur, 600ms) var(--bkst-ease, cubic-bezier(0.22,1,0.36,1)), |
| 54 |
transform var(--bkst-dur, 600ms) var(--bkst-ease, cubic-bezier(0.22,1,0.36,1)), |
| 55 |
filter var(--bkst-dur, 600ms) ease; |
| 56 |
transition-delay: calc(var(--bkst-i, 0) * var(--bkst-stagger, 80ms)); |
| 57 |
} |
| 58 |
|
| 59 |
.bkst-line { display: block; } |
| 60 |
|
| 61 |
/* ── Revealed state ────────────────────────────────────────────── */ |
| 62 |
.bkst-word.bkst-revealed, |
| 63 |
.bkst-char.bkst-revealed, |
| 64 |
.bkst-line.bkst-revealed { |
| 65 |
opacity: 1; |
| 66 |
transform: none; |
| 67 |
filter: none; |
| 68 |
} |
| 69 |
|
| 70 |
/* ── Animation: fade-in ───────────────────────────────── */ |
| 71 |
.bkst-section[data-animation="fade-in"] .bkst-word, |
| 72 |
.bkst-section[data-animation="fade-in"] .bkst-char, |
| 73 |
.bkst-section[data-animation="fade-in"] .bkst-line { |
| 74 |
transform: none; |
| 75 |
} |
| 76 |
|
| 77 |
/* ── Animation: slide-right ───────────────────────────── */ |
| 78 |
.bkst-section[data-animation="slide-right"] .bkst-word, |
| 79 |
.bkst-section[data-animation="slide-right"] .bkst-char, |
| 80 |
.bkst-section[data-animation="slide-right"] .bkst-line { |
| 81 |
transform: translateX(-1em); |
| 82 |
} |
| 83 |
|
| 84 |
/* ── Animation: zoom-in ───────────────────────────────── */ |
| 85 |
.bkst-section[data-animation="zoom-in"] .bkst-word, |
| 86 |
.bkst-section[data-animation="zoom-in"] .bkst-char, |
| 87 |
.bkst-section[data-animation="zoom-in"] .bkst-line { |
| 88 |
transform: scale(0.6); |
| 89 |
transform-origin: center bottom; |
| 90 |
} |
| 91 |
|
| 92 |
/* ── Animation: blur-in ───────────────────────────────── */ |
| 93 |
.bkst-section[data-animation="blur-in"] .bkst-word, |
| 94 |
.bkst-section[data-animation="blur-in"] .bkst-char, |
| 95 |
.bkst-section[data-animation="blur-in"] .bkst-line { |
| 96 |
transform: translateY(0.4em); |
| 97 |
filter: blur(8px); |
| 98 |
} |
| 99 |
|
| 100 |
/* ── Animation: drop-down ─────────────────────────────── */ |
| 101 |
.bkst-section[data-animation="drop-down"] .bkst-word, |
| 102 |
.bkst-section[data-animation="drop-down"] .bkst-char, |
| 103 |
.bkst-section[data-animation="drop-down"] .bkst-line { |
| 104 |
transform: translateY(-1em); |
| 105 |
} |
| 106 |
|
| 107 |
/* ── Highlight words ───────────────────────────────────────────── */ |
| 108 |
.bkst-highlight { |
| 109 |
color: var(--bkst-hl-c, #6c3fb5); |
| 110 |
} |
| 111 |
|
| 112 |
/* ── Non-breaking space ────────────────────────────────────────── */ |
| 113 |
.bkst-space { |
| 114 |
display: inline-block; |
| 115 |
opacity: 1 !important; |
| 116 |
transform: none !important; |
| 117 |
} |
| 118 |
|
| 119 |
/* ── Editor: show text fully revealed (no animation in editor) ─── */ |
| 120 |
.bkst-revealed { |
| 121 |
opacity: 1 !important; |
| 122 |
transform: none !important; |
| 123 |
filter: none !important; |
| 124 |
} |
| 125 |
|
| 126 |
/* ── Reduced motion: show everything immediately ───────────────── */ |
| 127 |
@media (prefers-reduced-motion: reduce) { |
| 128 |
.bkst-word, |
| 129 |
.bkst-char, |
| 130 |
.bkst-line { |
| 131 |
opacity: 1; |
| 132 |
transform: none; |
| 133 |
filter: none; |
| 134 |
transition: none; |
| 135 |
} |
| 136 |
} |
| 137 |
|