@hagicode/hagilight-core 0.1.0-dev.148.1.e0c630e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/Analytics51LA.astro +17 -0
  2. package/Copyright.astro +9 -0
  3. package/Footer.astro +208 -0
  4. package/FooterAvatarPicker.astro +9 -0
  5. package/FooterBrand.astro +339 -0
  6. package/GoogleAnalytics.astro +30 -0
  7. package/PostHog.astro +11 -0
  8. package/PromotoBanner.astro +582 -0
  9. package/README.md +485 -0
  10. package/RootTransit.astro +599 -0
  11. package/assets/footer/avatar.avif +0 -0
  12. package/assets/footer/avatar.webp +0 -0
  13. package/assets/footer/manifest.json +237 -0
  14. package/data/comparison-articles/de-DE/claude-vs-hagicode.json +294 -0
  15. package/data/comparison-articles/de-DE/codebuddy-vs-hagicode.json +266 -0
  16. package/data/comparison-articles/de-DE/codex-vs-hagicode.json +266 -0
  17. package/data/comparison-articles/de-DE/copilot-vs-hagicode.json +266 -0
  18. package/data/comparison-articles/de-DE/deepagents-vs-hagicode.json +266 -0
  19. package/data/comparison-articles/de-DE/gemini-vs-hagicode.json +266 -0
  20. package/data/comparison-articles/de-DE/hermes-vs-hagicode.json +266 -0
  21. package/data/comparison-articles/de-DE/kimi-vs-hagicode.json +266 -0
  22. package/data/comparison-articles/de-DE/kiro-vs-hagicode.json +266 -0
  23. package/data/comparison-articles/de-DE/opencode-vs-hagicode.json +266 -0
  24. package/data/comparison-articles/de-DE/pi-vs-hagicode.json +282 -0
  25. package/data/comparison-articles/de-DE/qoder-vs-hagicode.json +266 -0
  26. package/data/comparison-articles/de-DE/reasonix-vs-hagicode.json +281 -0
  27. package/data/comparison-articles/en-US/claude-vs-hagicode.json +346 -0
  28. package/data/comparison-articles/en-US/codebuddy-vs-hagicode.json +322 -0
  29. package/data/comparison-articles/en-US/codex-vs-hagicode.json +321 -0
  30. package/data/comparison-articles/en-US/copilot-vs-hagicode.json +320 -0
  31. package/data/comparison-articles/en-US/deepagents-vs-hagicode.json +323 -0
  32. package/data/comparison-articles/en-US/dsh-vs-hagicode.json +323 -0
  33. package/data/comparison-articles/en-US/gemini-vs-hagicode.json +320 -0
  34. package/data/comparison-articles/en-US/hermes-vs-hagicode.json +323 -0
  35. package/data/comparison-articles/en-US/junie-vs-hagicode.json +323 -0
  36. package/data/comparison-articles/en-US/kimi-vs-hagicode.json +319 -0
  37. package/data/comparison-articles/en-US/kiro-vs-hagicode.json +319 -0
  38. package/data/comparison-articles/en-US/omp-vs-hagicode.json +345 -0
  39. package/data/comparison-articles/en-US/opencode-vs-hagicode.json +333 -0
  40. package/data/comparison-articles/en-US/pi-vs-hagicode.json +345 -0
  41. package/data/comparison-articles/en-US/qoder-vs-hagicode.json +323 -0
  42. package/data/comparison-articles/en-US/reasonix-vs-hagicode.json +344 -0
  43. package/data/comparison-articles/es-ES/claude-vs-hagicode.json +294 -0
  44. package/data/comparison-articles/es-ES/codebuddy-vs-hagicode.json +266 -0
  45. package/data/comparison-articles/es-ES/codex-vs-hagicode.json +266 -0
  46. package/data/comparison-articles/es-ES/copilot-vs-hagicode.json +266 -0
  47. package/data/comparison-articles/es-ES/deepagents-vs-hagicode.json +266 -0
  48. package/data/comparison-articles/es-ES/gemini-vs-hagicode.json +266 -0
  49. package/data/comparison-articles/es-ES/hermes-vs-hagicode.json +266 -0
  50. package/data/comparison-articles/es-ES/kimi-vs-hagicode.json +266 -0
  51. package/data/comparison-articles/es-ES/kiro-vs-hagicode.json +266 -0
  52. package/data/comparison-articles/es-ES/opencode-vs-hagicode.json +266 -0
  53. package/data/comparison-articles/es-ES/pi-vs-hagicode.json +281 -0
  54. package/data/comparison-articles/es-ES/qoder-vs-hagicode.json +266 -0
  55. package/data/comparison-articles/es-ES/reasonix-vs-hagicode.json +281 -0
  56. package/data/comparison-articles/fr-FR/claude-vs-hagicode.json +294 -0
  57. package/data/comparison-articles/fr-FR/codebuddy-vs-hagicode.json +266 -0
  58. package/data/comparison-articles/fr-FR/codex-vs-hagicode.json +266 -0
  59. package/data/comparison-articles/fr-FR/copilot-vs-hagicode.json +266 -0
  60. package/data/comparison-articles/fr-FR/deepagents-vs-hagicode.json +266 -0
  61. package/data/comparison-articles/fr-FR/gemini-vs-hagicode.json +266 -0
  62. package/data/comparison-articles/fr-FR/hermes-vs-hagicode.json +266 -0
  63. package/data/comparison-articles/fr-FR/kimi-vs-hagicode.json +266 -0
  64. package/data/comparison-articles/fr-FR/kiro-vs-hagicode.json +266 -0
  65. package/data/comparison-articles/fr-FR/opencode-vs-hagicode.json +266 -0
  66. package/data/comparison-articles/fr-FR/pi-vs-hagicode.json +281 -0
  67. package/data/comparison-articles/fr-FR/qoder-vs-hagicode.json +266 -0
  68. package/data/comparison-articles/fr-FR/reasonix-vs-hagicode.json +281 -0
  69. package/data/comparison-articles/ja-JP/claude-vs-hagicode.json +294 -0
  70. package/data/comparison-articles/ja-JP/codebuddy-vs-hagicode.json +266 -0
  71. package/data/comparison-articles/ja-JP/codex-vs-hagicode.json +266 -0
  72. package/data/comparison-articles/ja-JP/copilot-vs-hagicode.json +266 -0
  73. package/data/comparison-articles/ja-JP/deepagents-vs-hagicode.json +266 -0
  74. package/data/comparison-articles/ja-JP/gemini-vs-hagicode.json +266 -0
  75. package/data/comparison-articles/ja-JP/hermes-vs-hagicode.json +266 -0
  76. package/data/comparison-articles/ja-JP/kimi-vs-hagicode.json +266 -0
  77. package/data/comparison-articles/ja-JP/kiro-vs-hagicode.json +266 -0
  78. package/data/comparison-articles/ja-JP/opencode-vs-hagicode.json +266 -0
  79. package/data/comparison-articles/ja-JP/pi-vs-hagicode.json +281 -0
  80. package/data/comparison-articles/ja-JP/qoder-vs-hagicode.json +266 -0
  81. package/data/comparison-articles/ja-JP/reasonix-vs-hagicode.json +281 -0
  82. package/data/comparison-articles/ko-KR/claude-vs-hagicode.json +294 -0
  83. package/data/comparison-articles/ko-KR/codebuddy-vs-hagicode.json +266 -0
  84. package/data/comparison-articles/ko-KR/codex-vs-hagicode.json +266 -0
  85. package/data/comparison-articles/ko-KR/copilot-vs-hagicode.json +266 -0
  86. package/data/comparison-articles/ko-KR/deepagents-vs-hagicode.json +266 -0
  87. package/data/comparison-articles/ko-KR/gemini-vs-hagicode.json +266 -0
  88. package/data/comparison-articles/ko-KR/hermes-vs-hagicode.json +266 -0
  89. package/data/comparison-articles/ko-KR/kimi-vs-hagicode.json +266 -0
  90. package/data/comparison-articles/ko-KR/kiro-vs-hagicode.json +266 -0
  91. package/data/comparison-articles/ko-KR/opencode-vs-hagicode.json +266 -0
  92. package/data/comparison-articles/ko-KR/pi-vs-hagicode.json +281 -0
  93. package/data/comparison-articles/ko-KR/qoder-vs-hagicode.json +266 -0
  94. package/data/comparison-articles/ko-KR/reasonix-vs-hagicode.json +281 -0
  95. package/data/comparison-articles/pt-BR/claude-vs-hagicode.json +294 -0
  96. package/data/comparison-articles/pt-BR/codebuddy-vs-hagicode.json +266 -0
  97. package/data/comparison-articles/pt-BR/codex-vs-hagicode.json +266 -0
  98. package/data/comparison-articles/pt-BR/copilot-vs-hagicode.json +266 -0
  99. package/data/comparison-articles/pt-BR/deepagents-vs-hagicode.json +266 -0
  100. package/data/comparison-articles/pt-BR/gemini-vs-hagicode.json +266 -0
  101. package/data/comparison-articles/pt-BR/hermes-vs-hagicode.json +266 -0
  102. package/data/comparison-articles/pt-BR/kimi-vs-hagicode.json +266 -0
  103. package/data/comparison-articles/pt-BR/kiro-vs-hagicode.json +266 -0
  104. package/data/comparison-articles/pt-BR/opencode-vs-hagicode.json +266 -0
  105. package/data/comparison-articles/pt-BR/pi-vs-hagicode.json +281 -0
  106. package/data/comparison-articles/pt-BR/qoder-vs-hagicode.json +266 -0
  107. package/data/comparison-articles/pt-BR/reasonix-vs-hagicode.json +281 -0
  108. package/data/comparison-articles/ru-RU/claude-vs-hagicode.json +294 -0
  109. package/data/comparison-articles/ru-RU/codebuddy-vs-hagicode.json +266 -0
  110. package/data/comparison-articles/ru-RU/codex-vs-hagicode.json +266 -0
  111. package/data/comparison-articles/ru-RU/copilot-vs-hagicode.json +266 -0
  112. package/data/comparison-articles/ru-RU/deepagents-vs-hagicode.json +266 -0
  113. package/data/comparison-articles/ru-RU/gemini-vs-hagicode.json +266 -0
  114. package/data/comparison-articles/ru-RU/hermes-vs-hagicode.json +266 -0
  115. package/data/comparison-articles/ru-RU/kimi-vs-hagicode.json +266 -0
  116. package/data/comparison-articles/ru-RU/kiro-vs-hagicode.json +266 -0
  117. package/data/comparison-articles/ru-RU/opencode-vs-hagicode.json +266 -0
  118. package/data/comparison-articles/ru-RU/pi-vs-hagicode.json +281 -0
  119. package/data/comparison-articles/ru-RU/qoder-vs-hagicode.json +323 -0
  120. package/data/comparison-articles/ru-RU/reasonix-vs-hagicode.json +281 -0
  121. package/data/comparison-articles/zh-CN/claude-vs-hagicode.json +346 -0
  122. package/data/comparison-articles/zh-CN/codebuddy-vs-hagicode.json +322 -0
  123. package/data/comparison-articles/zh-CN/codex-vs-hagicode.json +321 -0
  124. package/data/comparison-articles/zh-CN/copilot-vs-hagicode.json +320 -0
  125. package/data/comparison-articles/zh-CN/deepagents-vs-hagicode.json +323 -0
  126. package/data/comparison-articles/zh-CN/dsh-vs-hagicode.json +323 -0
  127. package/data/comparison-articles/zh-CN/gemini-vs-hagicode.json +320 -0
  128. package/data/comparison-articles/zh-CN/hermes-vs-hagicode.json +323 -0
  129. package/data/comparison-articles/zh-CN/junie-vs-hagicode.json +323 -0
  130. package/data/comparison-articles/zh-CN/kimi-vs-hagicode.json +319 -0
  131. package/data/comparison-articles/zh-CN/kiro-vs-hagicode.json +319 -0
  132. package/data/comparison-articles/zh-CN/omp-vs-hagicode.json +345 -0
  133. package/data/comparison-articles/zh-CN/opencode-vs-hagicode.json +333 -0
  134. package/data/comparison-articles/zh-CN/pi-vs-hagicode.json +345 -0
  135. package/data/comparison-articles/zh-CN/qoder-vs-hagicode.json +323 -0
  136. package/data/comparison-articles/zh-CN/reasonix-vs-hagicode.json +344 -0
  137. package/data/comparison-articles/zh-Hant/claude-vs-hagicode.json +294 -0
  138. package/data/comparison-articles/zh-Hant/codebuddy-vs-hagicode.json +266 -0
  139. package/data/comparison-articles/zh-Hant/codex-vs-hagicode.json +266 -0
  140. package/data/comparison-articles/zh-Hant/copilot-vs-hagicode.json +266 -0
  141. package/data/comparison-articles/zh-Hant/deepagents-vs-hagicode.json +266 -0
  142. package/data/comparison-articles/zh-Hant/gemini-vs-hagicode.json +266 -0
  143. package/data/comparison-articles/zh-Hant/hermes-vs-hagicode.json +266 -0
  144. package/data/comparison-articles/zh-Hant/kimi-vs-hagicode.json +266 -0
  145. package/data/comparison-articles/zh-Hant/kiro-vs-hagicode.json +266 -0
  146. package/data/comparison-articles/zh-Hant/opencode-vs-hagicode.json +266 -0
  147. package/data/comparison-articles/zh-Hant/pi-vs-hagicode.json +281 -0
  148. package/data/comparison-articles/zh-Hant/qoder-vs-hagicode.json +266 -0
  149. package/data/comparison-articles/zh-Hant/reasonix-vs-hagicode.json +281 -0
  150. package/dist/analytics-events.d.ts +49 -0
  151. package/dist/analytics-events.js +113 -0
  152. package/dist/build-info-resolver.d.ts +8 -0
  153. package/dist/build-info-resolver.js +29 -0
  154. package/dist/build-info.d.ts +19 -0
  155. package/dist/build-info.js +60 -0
  156. package/dist/comparison-articles-source.d.ts +13 -0
  157. package/dist/comparison-articles-source.js +58 -0
  158. package/dist/comparison-articles.d.ts +127 -0
  159. package/dist/comparison-articles.js +260 -0
  160. package/dist/content-images.d.ts +126 -0
  161. package/dist/content-images.js +490 -0
  162. package/dist/favicon.d.ts +21 -0
  163. package/dist/favicon.js +27 -0
  164. package/dist/footer-avatar.d.ts +39 -0
  165. package/dist/footer-avatar.js +42 -0
  166. package/dist/footer-brand.d.ts +29 -0
  167. package/dist/footer-brand.js +86 -0
  168. package/dist/head.d.ts +7 -0
  169. package/dist/head.js +1 -0
  170. package/dist/link-policy.d.ts +33 -0
  171. package/dist/link-policy.js +93 -0
  172. package/dist/links.d.ts +70 -0
  173. package/dist/links.js +425 -0
  174. package/dist/posthog.d.ts +6 -0
  175. package/dist/posthog.js +17 -0
  176. package/dist/promotions.d.ts +50 -0
  177. package/dist/promotions.js +243 -0
  178. package/dist/promoto-banner.d.ts +14 -0
  179. package/dist/promoto-banner.js +499 -0
  180. package/dist/random-image.d.ts +69 -0
  181. package/dist/random-image.js +133 -0
  182. package/dist/related-sites.json +378 -0
  183. package/dist/root-transit.d.ts +12 -0
  184. package/dist/root-transit.js +221 -0
  185. package/dist/rss-footer-context.d.ts +6 -0
  186. package/dist/rss-footer-context.js +54 -0
  187. package/dist/rss-ownership.d.ts +26 -0
  188. package/dist/rss-ownership.js +63 -0
  189. package/dist/rss.d.ts +34 -0
  190. package/dist/rss.js +145 -0
  191. package/dist/seo-schema.d.ts +12 -0
  192. package/dist/seo-schema.js +20 -0
  193. package/dist/seo.d.ts +78 -0
  194. package/dist/seo.js +270 -0
  195. package/dist/site-metadata-ownership.d.ts +40 -0
  196. package/dist/site-metadata-ownership.js +72 -0
  197. package/dist/site-metadata-writer.d.ts +25 -0
  198. package/dist/site-metadata-writer.js +55 -0
  199. package/dist/site-metadata.d.ts +113 -0
  200. package/dist/site-metadata.js +256 -0
  201. package/dist/splash-images.d.ts +75 -0
  202. package/dist/splash-images.js +186 -0
  203. package/favicon.ico +0 -0
  204. package/logo.png +0 -0
  205. package/package.json +172 -0
@@ -0,0 +1,582 @@
1
+ ---
2
+ import type { PromotionCard } from './dist/promotions.js';
3
+
4
+ interface Props {
5
+ fallback?: PromotionCard;
6
+ locale?: string;
7
+ /** Identifies the hosting site in campaign tags; omitted leaves destinations untagged. */
8
+ siteId?: string;
9
+ }
10
+
11
+ const { fallback, locale = Astro.currentLocale ?? 'en', siteId } = Astro.props;
12
+ ---
13
+
14
+ <hagilight-promoto-banner
15
+ class="hagilight-promoto"
16
+ data-locale={locale}
17
+ data-site-id={siteId?.trim() || undefined}
18
+ data-fallback={fallback ? JSON.stringify(fallback) : undefined}
19
+ hidden
20
+ >
21
+ <section class="hagilight-promoto__shell" data-promoto-shell hidden aria-label="Featured promotion">
22
+ <div class="hagilight-promoto__viewport">
23
+ <div class="hagilight-promoto__track" data-promoto-track></div>
24
+ </div>
25
+ <nav class="hagilight-promoto__controls" data-promoto-controls aria-label="Promotion controls" hidden>
26
+ <button type="button" class="hagilight-promoto__control" data-promoto-previous aria-label="Previous promotion">
27
+ <svg class="hagilight-promoto__icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M15 6l-6 6 6 6" /></svg>
28
+ </button>
29
+ <span class="hagilight-promoto__count" data-promoto-count aria-label="Promotion progress"></span>
30
+ <button type="button" class="hagilight-promoto__control" data-promoto-next aria-label="Next promotion">
31
+ <svg class="hagilight-promoto__icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M9 6l6 6-6 6" /></svg>
32
+ </button>
33
+ <button
34
+ type="button"
35
+ class="hagilight-promoto__control"
36
+ data-promoto-pause
37
+ aria-pressed="false"
38
+ aria-label="Pause automatic promotion rotation"
39
+ >
40
+ <svg class="hagilight-promoto__icon hagilight-promoto__icon--pause" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M9 6v12M15 6v12" /></svg>
41
+ <svg class="hagilight-promoto__icon hagilight-promoto__icon--play" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M8 5.5v13l11-6.5z" /></svg>
42
+ </button>
43
+ </nav>
44
+ <button
45
+ type="button"
46
+ class="hagilight-promoto__dismiss"
47
+ data-promoto-dismiss
48
+ aria-label="Dismiss promotion"
49
+ >
50
+ <svg class="hagilight-promoto__icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M6.5 6.5l11 11M17.5 6.5l-11 11" /></svg>
51
+ </button>
52
+ <span class="hagilight-promoto__progress" data-promoto-progress aria-hidden="true"></span>
53
+ <span class="hagilight-promoto__status" data-promoto-status aria-live="polite"></span>
54
+ </section>
55
+ </hagilight-promoto-banner>
56
+
57
+ <script>
58
+ import { definePromotoBannerElement } from './dist/promoto-banner.js';
59
+
60
+ definePromotoBannerElement();
61
+ </script>
62
+
63
+ <style is:global>
64
+ /*
65
+ * Layout model: the card is content on top, one action row on the bottom.
66
+ * The call to action sits bottom-left; pager and pause share that row at the
67
+ * bottom-right, so controls never take a column or a row of their own. Dismiss
68
+ * is a small corner mark. Wide: media beside the copy. Portrait phones: a small
69
+ * thumbnail beside the title only. Short landscape viewports: no thumbnail and a
70
+ * one-line description, so the card stays a thin strip.
71
+ */
72
+ .hagilight-promoto {
73
+ display: block;
74
+ --promoto-control-size: 1.75rem;
75
+ --promoto-cta-height: 2.25rem;
76
+ --promoto-pad: 0.875rem;
77
+ --promoto-pager-width: calc(3 * var(--promoto-control-size) + 2.25rem + 0.375rem);
78
+ /* Muted copy follows the card's own text color when a theme maps no gray ramp, so a dark card never inherits a light-mode gray. */
79
+ --promoto-muted: var(--sl-color-gray-2, color-mix(in srgb, var(--sl-color-text, #1f2937) 72%, transparent));
80
+ /* Hover and emphasis: Starlight's text-high where defined, else its white/black pole, else a dark gray. */
81
+ --promoto-strong: var(--sl-color-text-high, var(--sl-color-white, #111827));
82
+ /* Call to action: Starlight's primary-button pairing (accent-toned text token on the inverse pole) keeps contrast on bright dark-mode accents. */
83
+ --promoto-cta-bg: var(--sl-color-text-accent, var(--sl-color-accent, #2563eb));
84
+ --promoto-cta-bg-hover: color-mix(in srgb, var(--promoto-cta-bg) 82%, var(--promoto-strong));
85
+ --promoto-cta-fg: var(--sl-color-black, #fff);
86
+ /* Motion: a damped spring where linear() exists, a long ease-out elsewhere. */
87
+ --promoto-ease: cubic-bezier(0.22, 1, 0.36, 1);
88
+ --promoto-rotation: 8000ms;
89
+ --promoto-shift: 1rem;
90
+ }
91
+
92
+ @supports (transition-timing-function: linear(0, 1)) {
93
+ .hagilight-promoto {
94
+ --promoto-ease: linear(0, 0.066, 0.22, 0.409, 0.597, 0.761, 0.89, 0.983, 1.042, 1.073, 1.083, 1.079, 1.067, 1.052, 1.036, 1.022, 1.011, 1.002, 0.997, 0.994, 0.993, 0.993, 1);
95
+ }
96
+ }
97
+
98
+ .hagilight-promoto[data-dir='prev'] {
99
+ --promoto-shift: -1rem;
100
+ }
101
+
102
+ .hagilight-promoto[hidden],
103
+ .hagilight-promoto__shell[hidden],
104
+ .hagilight-promoto__controls[hidden] {
105
+ display: none !important;
106
+ }
107
+
108
+ .hagilight-promoto__shell {
109
+ position: fixed;
110
+ z-index: 40;
111
+ /* Centered in the content area: a theme narrows it by setting these two insets on :root. */
112
+ inset-inline-start: var(--hagilight-promoto-inset-start, 0px);
113
+ inset-inline-end: var(--hagilight-promoto-inset-end, 0px);
114
+ bottom: max(1rem, env(safe-area-inset-bottom));
115
+ width: min(42rem, calc(100% - var(--hagilight-promoto-inset-start, 0px) - var(--hagilight-promoto-inset-end, 0px) - 1rem - 2 * max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px))));
116
+ margin-inline: auto;
117
+ overflow: hidden;
118
+ border: 1px solid color-mix(in srgb, var(--sl-color-accent, #2563eb) 24%, var(--sl-color-gray-5, #cbd5e1));
119
+ border-radius: 1rem;
120
+ background: color-mix(in srgb, var(--sl-color-bg, #fff) 96%, var(--sl-color-accent-low, #dbeafe) 4%);
121
+ box-shadow: 0 12px 32px color-mix(in srgb, var(--sl-color-black, #000) 14%, transparent);
122
+ color: var(--sl-color-text, #1f2937);
123
+ opacity: 1;
124
+ visibility: visible;
125
+ transform: none;
126
+ transition: opacity 0.24s ease, transform 0.62s var(--promoto-ease), visibility 0s linear;
127
+ }
128
+
129
+ /* Rises into place on first render and whenever it returns from the footer or the page top. */
130
+ .hagilight-promoto[data-state='ready'] .hagilight-promoto__shell {
131
+ animation: hagilight-promoto-rise 0.62s var(--promoto-ease) backwards;
132
+ }
133
+
134
+ @keyframes hagilight-promoto-rise {
135
+ from { opacity: 0; transform: translateY(1.25rem) scale(0.97); }
136
+ to { opacity: 1; transform: none; }
137
+ }
138
+
139
+ .hagilight-promoto[data-state='footer-hidden'] .hagilight-promoto__shell,
140
+ .hagilight-promoto[data-state='top-hidden'] .hagilight-promoto__shell {
141
+ opacity: 0;
142
+ visibility: hidden;
143
+ pointer-events: none;
144
+ transform: translateY(1.25rem) scale(0.97);
145
+ /* Leaving is quick and does not bounce. */
146
+ transition: opacity 0.2s ease, transform 0.24s ease-in, visibility 0s linear 0.24s;
147
+ }
148
+
149
+ /* Time until the next card, drawn along the bottom edge; hovering the card or tabbing into it holds it (a mouse click that leaves focus on a button does not). */
150
+ .hagilight-promoto__progress {
151
+ position: absolute;
152
+ inset-block-end: 0;
153
+ inset-inline: 0;
154
+ block-size: 2px;
155
+ background: var(--sl-color-text-accent, var(--sl-color-accent, #2563eb));
156
+ opacity: 0;
157
+ pointer-events: none;
158
+ transform: scaleX(0);
159
+ transform-origin: left center;
160
+ }
161
+
162
+ .hagilight-promoto__progress:dir(rtl) {
163
+ transform-origin: right center;
164
+ }
165
+
166
+ .hagilight-promoto[data-rotating] .hagilight-promoto__progress {
167
+ opacity: 0.55;
168
+ animation-duration: var(--promoto-rotation);
169
+ animation-timing-function: linear;
170
+ animation-fill-mode: forwards;
171
+ }
172
+
173
+ /* Two names for one keyframe set: flipping between them restarts the fill without a forced reflow. */
174
+ .hagilight-promoto[data-rotating][data-tick='0'] .hagilight-promoto__progress {
175
+ animation-name: hagilight-promoto-fill-a;
176
+ }
177
+
178
+ .hagilight-promoto[data-rotating][data-tick='1'] .hagilight-promoto__progress {
179
+ animation-name: hagilight-promoto-fill-b;
180
+ }
181
+
182
+ .hagilight-promoto[data-paused] .hagilight-promoto__progress,
183
+ .hagilight-promoto__shell:hover .hagilight-promoto__progress,
184
+ .hagilight-promoto__shell:has(:focus-visible) .hagilight-promoto__progress {
185
+ animation-play-state: paused;
186
+ }
187
+
188
+ @keyframes hagilight-promoto-fill-a {
189
+ from { transform: scaleX(0); }
190
+ to { transform: scaleX(1); }
191
+ }
192
+
193
+ @keyframes hagilight-promoto-fill-b {
194
+ from { transform: scaleX(0); }
195
+ to { transform: scaleX(1); }
196
+ }
197
+
198
+ .hagilight-promoto__viewport {
199
+ overflow: hidden;
200
+ }
201
+
202
+ .hagilight-promoto__track {
203
+ display: flex;
204
+ align-items: stretch;
205
+ width: 100%;
206
+ transition: transform 0.5s var(--promoto-ease);
207
+ }
208
+
209
+ /*
210
+ * Content settles after the track: the card being left fades out at once, the card
211
+ * arriving lands copy, then media, then the action, each a beat behind the last.
212
+ * Pushes toward the direction of travel (--promoto-shift flips for Previous).
213
+ */
214
+ .hagilight-promoto__slide > * {
215
+ transition: opacity 0.32s ease, transform 0.55s var(--promoto-ease);
216
+ }
217
+
218
+ .hagilight-promoto__slide[aria-hidden='true'] > * {
219
+ opacity: 0;
220
+ transform: translateX(var(--promoto-shift));
221
+ transition-duration: 0.18s, 0.18s;
222
+ }
223
+
224
+ .hagilight-promoto__slide[aria-hidden='false'] > .hagilight-promoto__copy {
225
+ transition-delay: 0.08s;
226
+ }
227
+
228
+ .hagilight-promoto__slide[aria-hidden='false'] > .hagilight-promoto__cta {
229
+ transition-delay: 0.14s;
230
+ }
231
+
232
+ /* Slide: media beside copy and cta, so a tall image never opens a gap above the cta. The pager overlays the end of the cta row. */
233
+ .hagilight-promoto__slide {
234
+ display: grid;
235
+ grid-template-columns: auto minmax(0, 1fr);
236
+ grid-template-areas:
237
+ 'media copy'
238
+ 'media cta';
239
+ align-items: start;
240
+ column-gap: 1rem;
241
+ row-gap: 0.75rem;
242
+ width: 100%;
243
+ min-width: 100%;
244
+ padding: var(--promoto-pad);
245
+ }
246
+
247
+ .hagilight-promoto__slide:not([data-has-image='true']) {
248
+ grid-template-columns: minmax(0, 1fr);
249
+ grid-template-areas:
250
+ 'copy'
251
+ 'cta';
252
+ padding-inline-start: 1.25rem;
253
+ }
254
+
255
+ .hagilight-promoto__slide[aria-hidden='true'] {
256
+ pointer-events: none;
257
+ }
258
+
259
+ .hagilight-promoto__copy {
260
+ grid-area: copy;
261
+ display: grid;
262
+ gap: 0.25rem;
263
+ min-width: 0;
264
+ }
265
+
266
+ .hagilight-promoto__title,
267
+ .hagilight-promoto__description {
268
+ display: -webkit-box;
269
+ overflow: hidden;
270
+ margin: 0;
271
+ -webkit-box-orient: vertical;
272
+ -webkit-line-clamp: 2;
273
+ }
274
+
275
+ .hagilight-promoto__title {
276
+ padding-inline-end: 2rem;
277
+ color: var(--sl-color-text-high, var(--sl-color-gray-1, #111827));
278
+ font-size: var(--sl-text-base, 1rem);
279
+ font-weight: 700;
280
+ line-height: 1.3;
281
+ text-wrap: balance;
282
+ }
283
+
284
+ .hagilight-promoto__description {
285
+ color: var(--promoto-muted);
286
+ font-size: var(--sl-text-sm, 0.875rem);
287
+ font-weight: 400;
288
+ line-height: 1.4;
289
+ }
290
+
291
+ .hagilight-promoto__media {
292
+ grid-area: media;
293
+ display: inline-flex;
294
+ align-items: center;
295
+ justify-content: center;
296
+ width: 4.5rem;
297
+ min-width: 4.5rem;
298
+ aspect-ratio: 1;
299
+ overflow: hidden;
300
+ border: 1px solid color-mix(in srgb, var(--sl-color-accent-high, #1d4ed8) 18%, var(--sl-color-gray-5, #cbd5e1));
301
+ border-radius: 0.75rem;
302
+ background: color-mix(in srgb, var(--sl-color-bg-sidebar, #f8fafc) 82%, transparent);
303
+ }
304
+
305
+ .hagilight-promoto__image {
306
+ display: block;
307
+ width: 100%;
308
+ height: 100%;
309
+ object-fit: cover;
310
+ }
311
+
312
+ .hagilight-promoto__media picture {
313
+ display: contents;
314
+ }
315
+
316
+ .hagilight-promoto__cta {
317
+ grid-area: cta;
318
+ display: inline-flex;
319
+ align-items: center;
320
+ justify-content: center;
321
+ justify-self: start;
322
+ max-width: min(100%, 16rem);
323
+ min-height: var(--promoto-cta-height);
324
+ padding: 0.4rem 1rem;
325
+ border: 1px solid color-mix(in srgb, var(--sl-color-accent-high, #1d4ed8) 30%, transparent);
326
+ border-radius: 999px;
327
+ background: var(--promoto-cta-bg);
328
+ color: var(--promoto-cta-fg);
329
+ font-size: var(--sl-text-sm, 0.875rem);
330
+ font-weight: 600;
331
+ line-height: 1.2;
332
+ text-align: center;
333
+ text-decoration: none;
334
+ }
335
+
336
+ .hagilight-promoto[data-multiple] .hagilight-promoto__cta {
337
+ max-width: min(16rem, calc(100% - var(--promoto-pager-width)));
338
+ }
339
+
340
+ .hagilight-promoto__cta:hover,
341
+ .hagilight-promoto__cta:focus-visible {
342
+ background: var(--promoto-cta-bg-hover);
343
+ }
344
+
345
+ /* Pager + pause: bottom-right, on the same row as the call to action. */
346
+ .hagilight-promoto__controls {
347
+ position: absolute;
348
+ inset-block-end: var(--promoto-pad);
349
+ inset-inline-end: 0.5rem;
350
+ display: flex;
351
+ align-items: center;
352
+ height: var(--promoto-cta-height);
353
+ gap: 0.125rem;
354
+ }
355
+
356
+ .hagilight-promoto__dismiss,
357
+ .hagilight-promoto__control {
358
+ position: relative;
359
+ display: inline-grid;
360
+ place-items: center;
361
+ flex: none;
362
+ width: var(--promoto-control-size);
363
+ height: var(--promoto-control-size);
364
+ padding: 0;
365
+ border: 0;
366
+ border-radius: 999px;
367
+ background: transparent;
368
+ color: var(--promoto-muted);
369
+ cursor: pointer;
370
+ transition: background-color 0.15s ease, color 0.15s ease;
371
+ }
372
+
373
+ /* Keep the tap target larger than the visible mark. */
374
+ .hagilight-promoto__dismiss::before,
375
+ .hagilight-promoto__control::before {
376
+ content: '';
377
+ position: absolute;
378
+ inset-block: -0.375rem;
379
+ inset-inline: 0;
380
+ }
381
+
382
+ /* Dismiss: a small corner mark, out of the content flow. */
383
+ .hagilight-promoto__dismiss {
384
+ position: absolute;
385
+ inset-block-start: 0.375rem;
386
+ inset-inline-end: 0.375rem;
387
+ }
388
+
389
+ .hagilight-promoto__dismiss::before {
390
+ inset-inline: -0.25rem;
391
+ }
392
+
393
+ .hagilight-promoto__icon {
394
+ width: 1rem;
395
+ height: 1rem;
396
+ fill: none;
397
+ stroke: currentColor;
398
+ stroke-width: 2;
399
+ stroke-linecap: round;
400
+ stroke-linejoin: round;
401
+ pointer-events: none;
402
+ }
403
+
404
+ .hagilight-promoto__icon--play {
405
+ display: none;
406
+ fill: currentColor;
407
+ }
408
+
409
+ .hagilight-promoto__control[aria-pressed='true'] .hagilight-promoto__icon--pause {
410
+ display: none;
411
+ }
412
+
413
+ .hagilight-promoto__control[aria-pressed='true'] .hagilight-promoto__icon--play {
414
+ display: block;
415
+ }
416
+
417
+ .hagilight-promoto__count {
418
+ min-width: 2.25rem;
419
+ color: var(--promoto-muted);
420
+ font-size: var(--sl-text-xs, 0.75rem);
421
+ font-variant-numeric: tabular-nums;
422
+ line-height: 1;
423
+ text-align: center;
424
+ white-space: nowrap;
425
+ }
426
+
427
+ .hagilight-promoto__control:disabled {
428
+ cursor: default;
429
+ opacity: 0.45;
430
+ }
431
+
432
+ .hagilight-promoto__status {
433
+ position: absolute;
434
+ width: 1px;
435
+ height: 1px;
436
+ overflow: hidden;
437
+ clip: rect(0, 0, 0, 0);
438
+ white-space: nowrap;
439
+ }
440
+
441
+ @media (hover: hover) {
442
+ .hagilight-promoto__dismiss:hover,
443
+ .hagilight-promoto__control:hover:not(:disabled) {
444
+ background: color-mix(in srgb, var(--sl-color-accent, #2563eb) 12%, transparent);
445
+ color: var(--promoto-strong);
446
+ }
447
+ }
448
+
449
+ .hagilight-promoto__dismiss:focus-visible,
450
+ .hagilight-promoto__control:focus-visible,
451
+ .hagilight-promoto__cta:focus-visible {
452
+ outline: 2px solid var(--sl-color-accent-high, #1d4ed8);
453
+ outline-offset: 2px;
454
+ }
455
+
456
+ /* Touch: bigger marks, still compact. */
457
+ @media (pointer: coarse) {
458
+ .hagilight-promoto {
459
+ --promoto-control-size: 2rem;
460
+ }
461
+ }
462
+
463
+ /* Portrait phones: thumbnail beside the title only; the description and the action row use the full width. */
464
+ @media (max-width: 36rem) and (min-height: 30rem) {
465
+ .hagilight-promoto {
466
+ --promoto-control-size: 2rem;
467
+ --promoto-pad: 0.75rem;
468
+ }
469
+
470
+ .hagilight-promoto__shell {
471
+ bottom: calc(env(safe-area-inset-bottom) + 0.5rem);
472
+ width: min(calc(100vw - 1rem - 2 * max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px))), 28rem);
473
+ border-radius: 0.875rem;
474
+ }
475
+
476
+ .hagilight-promoto__slide[data-has-image] {
477
+ grid-template-columns: minmax(0, 1fr);
478
+ grid-template-areas: 'title' 'desc' 'cta';
479
+ gap: 0.375rem;
480
+ padding: var(--promoto-pad);
481
+ }
482
+
483
+ .hagilight-promoto__slide[data-has-image='true'] {
484
+ grid-template-columns: 3rem minmax(0, 1fr);
485
+ grid-template-areas: 'media title' 'desc desc' 'cta cta';
486
+ column-gap: 0.625rem;
487
+ }
488
+
489
+ /* Flatten copy so the thumbnail sits beside the title only. */
490
+ .hagilight-promoto__copy {
491
+ display: contents;
492
+ }
493
+
494
+ .hagilight-promoto__title {
495
+ grid-area: title;
496
+ align-self: center;
497
+ font-size: 0.95rem;
498
+ }
499
+
500
+ .hagilight-promoto__description {
501
+ grid-area: desc;
502
+ font-size: 0.85rem;
503
+ line-height: 1.35;
504
+ }
505
+
506
+ .hagilight-promoto__media {
507
+ width: 3rem;
508
+ min-width: 3rem;
509
+ border-radius: 0.625rem;
510
+ }
511
+
512
+ .hagilight-promoto__cta {
513
+ margin-block-start: 0.25rem;
514
+ padding-inline: 0.875rem;
515
+ }
516
+ }
517
+
518
+ @media (max-width: 22.5rem) and (min-height: 30rem) {
519
+ .hagilight-promoto {
520
+ --promoto-pager-width: 6rem;
521
+ }
522
+
523
+ .hagilight-promoto__count {
524
+ display: none;
525
+ }
526
+
527
+ .hagilight-promoto__cta {
528
+ padding-inline: 0.625rem;
529
+ }
530
+ }
531
+
532
+ /* Short landscape viewports: thin strip, no thumbnail, one-line description. */
533
+ @media (max-height: 30rem) {
534
+ .hagilight-promoto {
535
+ --promoto-cta-height: 2rem;
536
+ --promoto-pad: 0.5rem;
537
+ }
538
+
539
+ .hagilight-promoto__shell {
540
+ bottom: max(0.5rem, env(safe-area-inset-bottom));
541
+ }
542
+
543
+ .hagilight-promoto__media {
544
+ display: none;
545
+ }
546
+
547
+ .hagilight-promoto__slide[data-has-image] {
548
+ grid-template-columns: minmax(0, 1fr);
549
+ grid-template-areas: 'copy' 'cta';
550
+ row-gap: 0.375rem;
551
+ padding: 0.5rem 0.75rem 0.5rem 1rem;
552
+ }
553
+
554
+ .hagilight-promoto__description {
555
+ -webkit-line-clamp: 1;
556
+ }
557
+
558
+ .hagilight-promoto__dismiss {
559
+ inset-block-start: 0.25rem;
560
+ inset-inline-end: 0.25rem;
561
+ }
562
+ }
563
+
564
+ @media (prefers-reduced-motion: reduce) {
565
+ .hagilight-promoto__shell,
566
+ .hagilight-promoto__track,
567
+ .hagilight-promoto__slide > *,
568
+ .hagilight-promoto__dismiss,
569
+ .hagilight-promoto__control {
570
+ transition: none;
571
+ }
572
+
573
+ .hagilight-promoto__shell {
574
+ transform: none !important;
575
+ animation: none !important;
576
+ }
577
+
578
+ .hagilight-promoto__progress {
579
+ display: none;
580
+ }
581
+ }
582
+ </style>