Commit Graph

5 Commits

Author SHA1 Message Date
Kunthawat Greethong
96caca4af6 fix(theme+marquee): restore marquee scroll + add light/dark mode toggle
User reported 2 issues after Phase 6.2:
1. 'marquee ควรต้องเลื่อนด้วย' — ROOT CAUSE: v7-5 source CSS included
   override at end of <style> block:
     .fx-marquee-track{animation:none}
     .fx-faq-a::after{display:none}
     .fx-hero::after{display:none}
   These were 'no-op' overrides from the mockup library (which doesn't
   actually animate things in showcase mode). Copied verbatim when I
   extracted fx-system.css in Phase 1.1, killing marquee + 2 other
   animations.
   FIX: replaced with the real animations (marquee 40s, blink-cursor,
   hero noise overlay). All 3 now actually run.

2. 'เราต้องการ light and dark mode ด้วย โดยมีปุ่มเปลี่ยน mode ได้' —
   Implemented full light/dark theme system:
   - Added [data-theme='dark'] block in fx-system.css overriding 11
     CSS tokens (--ink, --paper, --line, --text-dim, + 5 new
     --utility-bg/--nav-bg/--hero-content-bg/etc.)
   - Refactored .fx-utility-bar to use --utility-bg/--fg vars instead
     of hardcoded #0A0A0A (so it inverts correctly in dark mode)
   - Refactored .fx-nav, .fx-hero-content, .fx-hero-side, .fx-faq-item
     to use theme-aware vars
   - Added 13 [data-theme='dark'] overrides for elements needing
     extra contrast tweaks (pricing featured, callout, portfolio name,
     process/service numbers, prose)
   - Added smooth 0.3s transition on theme change (no jarring swap)

3. Theme toggle button (UtilityBar.astro):
   - Replaced text-only indicator with <button id='fx-theme-toggle'>
   - 3 modes cycle: auto (follow OS) → light → dark → auto
   - Persists to localStorage 'moreminimore-theme'
   - Default = 'auto' (follows system preference)
   - Button label changes: '◐ auto' / '☀ light' / '☾ dark'
   - Mode indicator shows user's chosen mode
   - Listens to OS preference change live (when in 'auto' mode)
   - ARIA label + title for accessibility

4. Anti-flash inline script in Base.astro <head>:
   - Runs synchronously before first paint
   - Reads localStorage → applies data-theme
   - If 'auto' or unset, follows prefers-color-scheme
   - Prevents white→dark flash on first load

Build: 22 pages, 0 errors, 2.11s.
CSS: 545/545 braces, 9 keyframes, 13 dark-mode selectors.
2026-06-13 19:41:54 +07:00
Kunthawat Greethong
5393cf611c fix(animations): 8 keyframes + reveal/stagger initial state + button hovers
User reported 2 issues after Phase 6:
1. 'เว็บไม่มี animation เลย' — v7-5 CSS referenced 6+ animations
   (sparkle-float, pulse-glow, float, tag-pulse, type-up,
   blink-cursor, gradient-vertical) but the @keyframes for
   5 of them were NEVER included in the copy. marquee was the
   only one that worked. All other animations silently failed.
2. 'ปุ่มกดไม่ได้' — buttons were styled (cursor:pointer, colors)
   but had no :hover state for visual feedback. User couldn't tell
   they were interactive. .fx-btn:hover, .fx-nav-cta:hover,
   .fx-pricing-cta:hover, .fx-nav-menu a:hover all missing.

Also: .fx-reveal had no initial hidden state (started at opacity:1
with no .revealed class to transition TO) — observer fired but
nothing moved. Same for .fx-stagger.

Fixes (verified by re-parsing CSS):
- Added 7 missing @keyframes: sparkle-float, pulse-glow, float,
  tag-pulse, type-up, blink-cursor, gradient-vertical
- .fx-reveal:not(.revealed) = opacity:0, translateY(40px)
- .fx-stagger:not(.staggered) > * = opacity:0, translateY(20px)
- .fx-stagger.staggered > * = fade in with staggered delays (6 children)
- .fx-btn:hover = lift + coral bg + 4px shadow
- .fx-btn.ghost:hover = lift + yellow bg
- .fx-nav-cta:hover = invert colors + 4px shadow
- .fx-pricing-cta:hover = coral bg + yellow shadow
- .fx-nav-menu a:hover = yellow bg + coral text
- .fx-theme-toggle:hover = yellow bg
- .fx-service-card / .fx-portfolio-card / .fx-pricing-card hover
  = lift + 6px shadow
- .fx-faq-item:hover = slide right + paper bg
- .fx-stat:hover = yellow highlight + lift
- .fx-process-step:hover = lift + coral border

CSS now: 518 braces balanced, 8 keyframes, 0 broken animation refs.

Build: 22 pages, 0 errors, 2.12s.
2026-06-13 19:25:41 +07:00
Kunthawat Greethong
b8ac07996e feat(fx-system): Itim Thai side-bearing fix + prefers-reduced-motion
Phase 6.1: Itim fix — apply letter-spacing: -0.5px + margin-right: -2px
to all <em> in v7-5 sections. Per user memory, Thai display fonts ship
with wide side bearings causing visual gaps after Latin punctuation.
Scope: 20 selectors covering every .fx-* section + .fx-prose (about body).

Phase 6.2: prefers-reduced-motion — kill animations when user prefers.
Disables .fx-marquee-track, .fx-sparkle, .fx-reveal, .fx-stagger animations.
Also hides .fx-hero::after and .fx-faq-a::after decorations.

Phase 6.3: production build verified (22 pages, 0 errors, 1.96s)

Refs: .hermes/plans/2026-06-13_124000-moreminimore-v7-5-migration.md Task 6.1-6.3
2026-06-13 18:02:07 +07:00
Kunthawat Greethong
1f859921cb feat(header): add UtilityBar + Marquee + Navigation from v6-nav
- UtilityBar.astro (v6-utility): phone, clock, date, email from site settings
  Clock updated by fxClock() in src/lib/fx-animations.ts
- Marquee.astro (v6-marquee): log ticker with 4 entries (animated horizontally)
  Content duplicated for seamless loop
- Navigation.astro (v6-nav): REPLACED legacy. Adds 'บริการ' dropdown
  (4 services) + 'บทความ' link per plan round 2. Click-to-toggle on mobile.
- src/data/nav.ts: single source of truth for mainLinks + servicesDropdown
- fx-system.css: +27 lines for dropdown styles + active link underline
  (v6-nav originally had no dropdown — we added per spec)

Refs: .hermes/plans/2026-06-13_124000-moreminimore-v7-5-migration.md Task 2.1-2.4
2026-06-13 17:47:40 +07:00
Kunthawat Greethong
ed03060ff7 feat(fx-system): copy v7-5 design system CSS (485 lines, 12 categories)
Extracted verbatim from Desktop/moreminomore-mockup-v7-5.html lines 10-484.
All .fx-* classes namespaced to avoid collision with global.css.

- Tokens: --brand-yellow #FFD60A, --coral #FF5A3C, --ink #0A0A0A
- Fonts: Kanit + Itim + JetBrains Mono (matches global.css)
- Animations: @keyframes marquee + reveal/stagger JS in src/lib/fx-animations.ts

Refs: .hermes/plans/2026-06-13_124000-moreminimore-v7-5-migration.md Task 1.1
2026-06-13 17:44:10 +07:00