Compare commits

...

29 Commits

Author SHA1 Message Date
d6d36b224d Merge pull request 'fix(build): use the real API by default so the CI build works' (#6) from fix/api-default-build into main
Reviewed-on: #6
2026-11-04 12:03:33 +03:00
9ccd21584f fix(build): use the real API by default so the CI build works
The CI server runs a plain `next build` in apps/demo; it never reads vercel.json, so
`app:build` and its API URL were skipped. With no URL the app fell back to the demo data
source, which only works inside the hosted artifact sandbox, and rezina.yaltopia.com
showed "0 courses".

- the API URL is now the default in apps/demo/app/page.tsx; any plain build uses it
- NEXT_PUBLIC_LMS_API still overrides it (e.g. staging); set empty, it keeps demo data
- `demo:build` sets it empty: the artifact sandbox can't reach outside servers
  (artifact check: no network attempts)
- `app:build` is now just the plain build; README updated
2026-11-03 17:35:11 +03:00
1028caf109 Merge pull request 'Connect the student app to the Rezina API' (#5) from api-integration into main
Reviewed-on: #5
2026-11-03 16:57:59 +03:00
26d518b631 Merge branch 'main' into api-integration 2026-11-03 16:57:11 +03:00
ff5772e9cf build: Vercel builds against the real API by default
- new `app:build` script bakes NEXT_PUBLIC_LMS_API=https://api.rezina.yaltopia.com into
  the student app; the URL lives in package.json, so nobody sets it by hand
- vercel.json runs `app:build`, so a deploy of this branch talks to the API with no
  dashboard settings
- `demo:build` (the hosted artifact demo) is unchanged and keeps demo data: its sandbox
  blocks calls to outside servers (artifact check: no network attempts)
- README: Vercel section updated, including how to build the old in-memory demo
2026-11-02 20:53:55 +03:00
d92180542b fix(api): time out and retry when the API server drops connections
About a third of new connections to api.rezina.yaltopia.com never complete (the TCP
connect hangs; requests that do connect answer in ~0.5s). With no timeout, sign-in sat
on a busy button forever.

- every API call gives up after 12s
- calls that are safe to repeat retry twice: reads, the account lookup, password login;
  sending or verifying a code never retries, so nobody gets two texts or burns a code
- the catalog keeps at most 3 requests in flight instead of firing one per course at once
- sign-in shows "Couldn't reach the server. Check your connection and try again."
  (auth.networkError, om/ti drafts) instead of hanging
2026-11-02 19:29:37 +03:00
8ba936baae feat(api): connect the student app to the Rezina API
ApiDataSource maps the Go API onto the existing DataSource, so the screens are unchanged.
Build with NEXT_PUBLIC_LMS_API=https://api.rezina.yaltopia.com to use it; without it the
demo keeps its own data.

Verified against the live API (public, no sign-in):
- catalog and course outlines: courses, chapters, lessons, lesson notes, covers
- FREE lessons (and every lesson of a FREE course) play for anyone; a free course offers
  "Start lesson 1" instead of a disabled buy button

Built from the spec, not yet tested with a real account:
- sign-in: phone code (login or register) and email + password, token refresh, sign-out
- profile, progress summary (owned courses, completed lessons), lesson video URLs
- video heartbeat, notifications (list, read/unread), issue reports, profile updates

Not on the API yet, so left on hold: per-course prices and purchases (buying shows the
"not connected" message), translations, categories, teacher, durations, prerequisites,
chapter quizzes, Google/Apple sign-in.

Screens now hide what a course doesn't have instead of showing it empty: category pill,
teacher line and creator row, "0 min" durations, an empty card footer. Lessons with a
Vimeo link play that video; the sample clip and "mark as watched" stay for lessons
without one.

Mapping checks (packages/data/src/api.check.ts) run in `pnpm test` against saved live
responses.
2026-11-02 14:23:47 +03:00
d1e398eaa0 Merge pull request 'Course experience polish: course page, home, cards, catalog, player' (#4) from ui-ux-course-polish into main 2026-10-30 11:31:54 +03:00
67650698bf feat(player): lesson player polish L1–L7
- L1: focus mode while watching: site links and the marketing footer are hidden
- L2: the video comes first (edge to edge on phones, right under the header); course,
  chapter and lesson title sit under it, the course name doubling as the way back
- L3: the lesson bar's next button reads "Next" so it no longer wraps
- L4: when a lesson ends, "up next" appears over the video with a 5-second countdown
  (play now / cancel / Escape); the card below the video only shows after cancelling
- L5: the notes card only appears for lessons that have notes, not the course blurb
- L6: the "5 / 7" button opens the lesson list as a bottom sheet instead of scrolling
  the page away from the video; picking a lesson closes it
- L7: chapter markers are round like lesson markers
- The sidebar and the sheet share one CourseContents component
- i18n: player.nextShort, playNow, autoNext (om/ti drafts)
2026-10-27 17:42:48 +03:00
fd382359c0 feat(catalog): catalog polish CT1–CT3
- CT1: chip rows scroll without a visible scrollbar; a faded edge hints there's more
  (also applies to the category chips on home)
- CT2: search filters on every keystroke (no 300ms debounce) and gets a search icon,
  a clear button and Escape-to-clear
- CT3: "Taught in" filter next to the result count, listing only languages the visible
  courses are taught in; the empty state offers "Clear filters"
- i18n: catalog.clearSearch, taughtIn, anyLanguage, clearFilters, emptyLanguage (om/ti drafts)
2026-10-27 17:31:26 +03:00
529f35cdf6 feat(cards): course card polish C1–C4
- C1: one quiet "lessons · length" line; "new course" / student count becomes a tag on the photo
- C2: round arrow removed; the whole card is the target and the footer is just the price
- C3: owned cards show the next lesson and its length above the progress bar
- C4: home Featured becomes a swipe rail of tall cards, the next one peeking past the edge

Card styles were spread over five overriding passes; they now live in one block.
2026-10-27 12:43:23 +03:00
7c9c9d97d5 feat(home): continue card polish H1–H3
- H1: the course photo becomes a short header with the title on it and progress along
  its bottom edge; the full-width button sits at the card's bottom, within thumb reach
- H2: the card leads with the next lesson and its length ("Up next · 5. … · 8 min")
- H3: greeting and continue card form one group instead of two sections 64px apart

Replaces the old .continue rules instead of layering overrides on top of them.
2026-10-27 12:34:36 +03:00
a25c02365f feat(course): course page polish P6–P10
- P6: "last updated" moves from the hero to the end of About
- P7: quizzes sit inside their chapter; only chapterless quizzes keep a final group,
  and quiz rows share the lesson row's look
- P8: share becomes a glass button in the hero corner; the owned chip joins the stat pills
- P9: prerequisite shown in the buy card before purchase instead of a banner below it
- P10: lesson rows always number in the title; the circle shows state (play, check, lock, now playing)
2026-10-26 18:09:08 +03:00
a94514eb6b feat(course): course page polish P1–P5
- P1: sticky buy/continue bar hides while the buy card's button is on screen
- P2: price, preview and "lifetime" shown once; button reads "Buy course"
- P3: phones drop the tabs and stack overview, curriculum and about in one scroll
- P4: owners land on the curriculum with the next lesson's chapter open and an
  "Up next" card instead of the sales list
- P5: instructor tab removed; course count moves to the creator row
- i18n: course.about in all locales (om/ti drafts)
2026-10-26 18:09:08 +03:00
754cebeeff Merge pull request 'Polish waitlist material interactions' (#2) from ui-experience-improvements into main
Reviewed-on: #2
2026-10-22 16:02:46 +03:00
42a85447bf feat(waitlist): polish material interactions 2026-10-21 21:07:05 +03:00
4accffddf8 chore(skills): add interface design guidance 2026-10-21 21:07:05 +03:00
ee7e6b5c1b feat: player sidebar and completion states, payment marquee, international phone on sign-in
- Player sidebar: progress ring header, collapsible chapters with done count and length,
  lesson rows with done / now-playing (animated) / number / lock states and a partial-watch bar
- Completion: lesson-complete card with animated check and an Up next button; course-complete
  celebration with confetti and next steps; "Mark as watched (demo)" on placeholder videos only
- Landing payments: greyscale logo marquee that pauses and shows colour on hover; plain list for
  screen readers; static row under reduced motion
- Sign-in: country dial-code picker (Ethiopia first, default from the browser region)
- Light theme: footer powered-by line stays readable on the dark footer frame

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 15:18:57 +03:00
c6dc5d46a8 feat: guided tour, course cards with enrolled counts, abstract steps, grouped payments, SEO, founder link
- After sign-in a 7-step spotlight tour shows students around (replay from the menu); ends on Esc or navigation
- Course cards: edge-to-edge photo, student count (Course.enrolledCount), arrow that inverts on hover
  (fixes white-on-white hover in dark mode)
- Landing: stats removed; How it works uses abstract CSS art; payment card grouped by mobile money,
  bank cards and from abroad; step 2 copy covers local and international payment
- SEO: metadata (title template, description, keywords, canonical, Open Graph, Twitter), per-route titles,
  EducationalOrganization JSON-LD with founder Rezina Brhane and her TikTok, robots.txt, sitemap.xml;
  same tags on the waitlist page
- Footers link the founder's TikTok
- Backend issue drafted: design/issues/enrollment-counts.md
- Smoke test: blocks third-party requests (Vimeo iframe stalled unloads), tolerates a missed load event;
  it caught a hook-order crash on the course page, fixed here

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 15:05:39 +03:00
270d36a237 feat(waitlist): SMS or email signup, motion, portrait reel, contact footer
- Hero toggle: SMS (default, international picker) or Email; step 2 asks only the name
- Apps Script accepts either contact, dedupes on email or phone (checks updated)
- Headline words rise in, sections and course photos reveal on scroll, hero photos drift
- Portrait reel under the hero; courses swipe on phones; Why us as big numbers on hairlines
- Footer: landing-style card with Contact us (Telegram, phone, email), credits, Powered by Yaltopia Tech

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:20:33 +03:00
4a3561bcb5 feat: menu sheet, first-visit language picker, social sign-in, profile progress, history page
- Header keeps logo, links, bell/avatar or Get started; theme, language and feedback move into
  a menu sheet (native dialog) with large numbered links
- First visit asks for a language, prompt shown in all four
- Sign-in: Google / Apple / Telegram / Facebook buttons (simulated, like the phone code)
- One footer on every page (compact variant removed)
- Profile: identity header, stats, per-course progress with Continue and the lesson/quiz list,
  recent activity; /progress now opens the profile
- History page: dated timeline of lessons, purchases and reports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:16:11 +03:00
e8f6a59d04 feat: stats on hairlines, labelled pay strip, photo course header with buy bar, help page redesign
- Stats: three big numbers, no icon tiles
- Payment methods move out of the step card into a strip that names every method and wraps
- Course page: title on the course photo, preview button in the header; on phones a
  price + Buy (or progress + Continue) bar replaces the app tabs
- Help: big heading, three contact cards (Telegram, call, email with copy), FAQ beside the form
- Header: Get started only (Sign in removed)
- Placeholder courses tagged in the seed; cleanup issue drafted in design/issues/

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 14:07:13 +03:00
5699903ea7 Merge branch 'landing-refresh': Sirkul rebrand, landing refresh, mobile-first pass 2026-10-20 12:00:24 +03:00
92cc6a8ddf feat: mobile-first landing pass, lesson bar, dark default, simulated courses
Inspo MCP references: Hyper Effekt / Ferrari (photo hero), Coursera / Babbel (phone rails).
- Hero: headline set on a full-bleed, slowly scrolling reel of portraits
- How it works + payment panels replaced by three photo step cards; pay marks inside step 2
- Phones: category and step cards swipe as rails, stats in one row, header fits 360-390px
- Lesson bar (Previous / n of N / Next lesson) replaces the app tabs inside a course below 1024px;
  app tabs show only when signed in
- Header logo crossfades from wordmark to monogram on scroll
- Language picker is one dropdown (header and footer)
- Dark theme by default; saved choice still wins
- Demo banner removed
- Footer: "Powered by Yaltopia Tech" with a shine sweep
- Seed: three more simulated courses (soft glam, traditional Habesha, building your clientele)
- artifact-check: data: URIs (the favicon) aren't network requests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 12:00:24 +03:00
3f1993028e feat: course detail redesign, photo covers, two-card checkout, photo sign-in
- Course page follows the user's reference: info card (breadcrumb, title, stat pills,
  created-by), segmented Overview / Course content / Instructor tabs with a
  "what you'll learn" checklist, sticky purchase card with preview pill and
  "This course includes" list
- Cover falls back to a category photo, so catalog, home, my courses and checkout
  no longer show grey placeholders
- Checkout uses the same two cards (methods left, summary + pay right)
- Sign-in side panel gets a portrait and the non-language pitch
- Mobile: tabs fit at 390px, checkout lists methods before the pay button

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 11:38:28 +03:00
81e27661e1 feat: Sirkul brand, landing refresh, new footer, international waitlist phone
- Sirkul logo everywhere (header wordmark, phone monogram, favicon, footer); brand name "Sirkul Makeup"
- One font (Plus Jakarta Sans) across app and waitlist; cursive serif removed
- Habesha model photos from Wikimedia Commons (CC BY-SA, credited in footer and waitlist)
- Landing: light/dark theme toggle, live waitlist pill, photo category cards,
  how-it-works + grouped payment panel, photo CTA; less emphasis on languages
- Footer: framed card with starter-kit list (IconPark icons), student-work photo reel, credits
- Waitlist: international country-code picker, live "people waiting" pill fed by a
  doGet signup count in the Apps Script (count only, no personal data)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 11:22:28 +03:00
629403da0b feat(waitlist): save signups to a Google Sheet via Apps Script
Server-side validation, email dedupe under a script lock, formula-injection
guard, honeypot field. The page posts text/plain so no CORS preflight is
needed. tools/waitlist-check.mjs runs the script against stub services.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 01:33:46 +03:00
829469896f Merge branch 'waitlist': launch waitlist page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 01:29:08 +03:00
8ca2a09406 feat: audit phases 2–3 — compact app footer, number font, CTA/chip/motion polish
Finalises the 2026-10-16 audit decisions (Q1–Q3) and withdraws M10
(a Vimeo/file:// screenshot artifact, not a product bug).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:51:59 +03:00
58 changed files with 4741 additions and 756 deletions

View File

@ -0,0 +1,290 @@
---
name: apple-design
description: Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.
---
# Apple Design
## Initial Response
When this skill is first invoked without a specific question, respond only with:
> I'm ready to help you build fluid, Apple-style interfaces on the web, my knowledge comes from Apple's WWDC design talks, translated for the web.
Do not provide any other information until the user asks a question.
How Apple builds interfaces that stop feeling like a computer and start feeling like an extension of you. This knowledge comes from Apple's WWDC design talks — chiefly *Designing Fluid Interfaces* (WWDC 2018) — distilled and translated into the web platform (CSS, Pointer Events, `requestAnimationFrame`, spring libraries like Motion/Framer Motion).
The through-line: **an interface feels alive when motion starts from the current on-screen value, inherits the user's velocity, projects momentum forward, and can be grabbed and reversed at any instant.** Springs are the tool that makes all of this natural, because they are inherently interruptible and velocity-aware.
## The Core Idea
> "When we align the interface to the way we think and move, something magical happens — it stops feeling like a computer and starts feeling like a seamless extension of us."
An interface is fluid when it behaves like the physical world: things respond instantly, move continuously, carry momentum, resist at boundaries, and can be redirected mid-motion. Everything below is a way to get closer to that.
Apple frames design as serving four human needs: **safety/predictability, understanding, achievement, and joy.** Every rule here serves one of them.
## 1. Response — kill latency
The moment lag appears, the feeling of directness "falls off a cliff." Response is the foundation everything else is built on.
- **Respond on pointer-down, not on release.** Highlight a button the instant it's pressed. Waiting for `click`/touch-up to show feedback feels dead.
- **Be vigilant about every latency.** Audit debounces, artificial timers, transition waits, and the ~300ms tap delay. Anything on the input path that isn't essential is a regression.
- **Feedback must be continuous *during* the interaction, not just at the end.** For a drag, slider, or drawer, update the UI 1:1 with the pointer the whole way through — never animate only when the gesture completes.
```css
/* Feedback lives on the press, and it's instant */
.button:active {
transform: scale(0.97);
transition: transform 100ms ease-out;
}
```
## 2. Direct manipulation — 1:1 tracking
> "Touch and content should move together."
When the user drags something, it must stay glued to the finger — and respect the offset from *where they grabbed it*. Snapping to the element's center on grab breaks the illusion immediately.
- Use Pointer Events with `setPointerCapture` so tracking continues even when the pointer leaves the element's bounds.
- Track a short **velocity/position history** (last few `pointermove` events), not just the current point — you'll need velocity at release.
```js
el.addEventListener('pointerdown', (e) => {
el.setPointerCapture(e.pointerId);
const grabOffset = e.clientY - el.getBoundingClientRect().top; // respect where they grabbed
// ...track position + timestamp history for velocity
});
```
## 3. Interruptibility — the single most important principle
> "The thought and the gesture happen in parallel."
Every animation must be interruptible and redirectable at any moment. A user must be able to grab a moving element mid-flight and reverse it without waiting for the animation to finish. A closing modal the user grabs again should follow the finger — not finish closing first, then reopen.
- **Never lock out input during a transition.**
- **Always animate from the *presentation* (current) value, never the target value.** On interrupt, read the element's live on-screen transform and start the new animation from there. Starting from the logical/target value causes a visible jump.
- **Avoid CSS transitions and `@keyframes` for anything gesture-driven** — they can't be smoothly grabbed and reversed mid-flight. Springs animate from the current value by default, which is exactly what interruption needs.
- **When a gesture reverses, blend velocity — don't hard-cut it.** Replacing one animation with another at a reversal creates a velocity discontinuity, a "brick wall." Spring libraries that carry velocity through a re-target avoid it. (This is what iOS's *additive animations* do natively; on the web, choose a spring library that re-targets from the current velocity.)
- **Decompose 2D motion into independent X and Y springs.** A single spring on a 2D distance desyncs when X and Y have different velocities.
## 4. Behavior over animation — use springs
> "Think of animation as a conversation between you and the object, not something prescribed by the interface."
A pre-scripted, fixed-duration animation can't respond to new input. A spring can — new input just changes the target, and the motion stays continuous. Reach for springs for anything a user can touch.
Apple deliberately replaced the physics triplet (mass/stiffness/damping) with two designer-friendly parameters. Think in these:
- **Damping ratio** — controls overshoot. `1.0` = critically damped, no bounce, smooth settle. `< 1.0` = overshoots and oscillates. Lower = bouncier.
- **Response** — how quickly the value reaches the target, in seconds. Lower = snappier. **This is not "duration"** — a spring has no fixed duration; its settle time emerges from the parameters.
**Defaults:**
- Start most UI at **damping `1.0`** (critically damped) — graceful and non-distracting.
- Add bounce (**damping ~`0.8`**) **only when the gesture itself carried momentum** (a flick, a throw, a drag release). Overshoot on a menu that just faded in feels wrong; overshoot on a card you flicked feels right.
**Concrete values Apple ships:**
| Interaction | Damping | Response |
| --- | --- | --- |
| Move / reposition (e.g. PiP) | `1.0` | `0.4` |
| Rotation | `0.8` | `0.4` |
| Drawer / sheet | `0.8` | `0.3` |
**Web mapping (Motion / Framer Motion):** the `bounce` + `duration` spring API maps closely to Apple's damping + response. A safe house style is `damping: 1.0` springs everywhere by default; reserve bounce for momentum-driven, physical interactions.
```js
import { animate } from 'motion';
// Critically damped default (no overshoot)
animate(el, { y: 0 }, { type: 'spring', bounce: 0, duration: 0.4 });
// Momentum interaction — a little bounce, only because a flick preceded it
animate(el, { y: target }, { type: 'spring', bounce: 0.2, duration: 0.4 });
```
## 5. Velocity handoff — the seam between drag and animation
When a gesture ends, the animation must **continue at the finger's exact velocity**, so there's no visible seam between dragging and animating. This is the detail that most separates "fluid" from "fine."
Pass the pointer's release velocity as the spring's initial velocity. Some spring APIs want **relative** velocity — normalize it by the remaining distance to the target:
```
relativeVelocity = gestureVelocity / (targetValue − currentValue)
```
Example: element at `y=50`, target `y=150` (100px to go), finger moving 50px/s → initial spring velocity = `50 / 100 = 0.5`. Framer Motion / Motion take absolute px/s velocity directly (`velocity` option), so you usually hand it the raw value.
## 6. Momentum projection — animate to where the gesture is *going*
> "Take a small input and make a big output."
Don't snap to the nearest boundary from the *release point*. Use velocity to **project the resting position** — exactly like scroll deceleration — then snap to the target nearest that projected point. This is what makes a flick feel like it throws the element.
Apple's exact projection function (from the *Designing Fluid Interfaces* sample code):
```js
// decelerationRate ≈ 0.998 for normal scroll feel; 0.99 for snappier
function project(initialVelocity /* px/s */, decelerationRate = 0.998) {
return (initialVelocity / 1000) * decelerationRate / (1 - decelerationRate);
}
const projectedEndpoint = currentPosition + project(releaseVelocity);
const target = nearestSnapPoint(projectedEndpoint); // choose target from the projection
animateSpringTo(target, { velocity: releaseVelocity }); // then hand off velocity (§5)
```
Note: the physics-textbook `v²/(2·decel)` is *not* what Apple ships — use the exponential-decay form above. This is the standard behavior in good bottom-sheets and carousels (Vaul, Embla).
## 7. Spatial consistency — symmetric paths, anchored origins
> "If something disappears one way, we expect it to emerge from where it came."
- **Enter and exit along the same path.** A panel that slides in from the right must dismiss to the right. In-from-right / out-the-bottom feels disconnected and confusing.
- **Anchor interactions to their source.** A menu, popover, or sheet should originate from the element that triggered it — set `transform-origin` to the trigger, so the spatial relationship between button and content is obvious. (This is the same origin-awareness point as popovers scaling from their trigger, not their center.)
- **Mirror the easing on reversible transitions** so the outbound path matches the return path (use inverse cubic-bézier control points for the two directions).
## 8. Hint in the direction of the gesture
Humans predict a final state from a trajectory. Intermediate motion should telegraph where things are going — Control Center modules "grow up and out toward your finger." Make the in-between frames point at the outcome, not just interpolate blindly to it.
## 9. Rubber-banding — soft boundaries
At an edge, resist progressively instead of stopping hard. A hard stop reads as "frozen"; continuous resistance reads as "responsive, but there's nothing more here." Apply damping that increases the further past the boundary the user drags.
```js
// The further past the bound, the less the element follows — real things slow before they stop
function rubberband(overshoot, dimension, constant = 0.55) {
return (overshoot * dimension * constant) / (dimension + constant * Math.abs(overshoot));
}
```
## 10. Gesture design details (the "feel" checklist)
- **Tap:** highlight on touch-*down* (instant), commit on touch-*up*. Add ~10px of hysteresis/hit padding around the target, and allow cancel-by-dragging-away and back.
- **Drag/swipe:** require a small movement threshold (hysteresis, ~10px) before committing to a direction, then track 1:1.
- **Detect all plausible gestures in parallel from the first move**, then confidently cancel the losers once intent is clear. Avoid recognizers that only report a *final* state (`swipeleft`-type events) — they throw away the continuous tracking you need for feedback.
- **Minimize disambiguation delays.** Double-tap detection unavoidably delays single taps; only pay that cost where double-tap truly exists.
## 11. Frame-level smoothness
Smoothness is about *what's in the frames*, not just the frame rate.
- Keep the per-frame positional change below the perception threshold to avoid strobing.
- For very fast motion, a subtle **motion blur / stretch** encodes speed and reads better than a hard sharp streak.
- `requestAnimationFrame` is the web's display-synced clock (Apple uses `CADisplayLink`). Animate only compositor-friendly properties — `transform` and `opacity` — and hint with `will-change` where motion is imminent.
## 12. Materials & depth — translucency conveys hierarchy
Apple uses translucent materials as a floating functional layer that brings structure without stealing focus. On the web, approximate with `backdrop-filter`.
- **Build nav/toolbars/sheets as translucent layers** (`backdrop-filter: blur()` + a semi-transparent background) with content scrolling underneath — not opaque bars that consume a fixed strip.
- **Material weight encodes hierarchy:** darker/heavier materials separate structural regions (sidebars); lighter materials draw attention to interactive elements (buttons). **Never stack a light translucent surface on another** — legibility collapses.
- **Bigger surfaces should read as thicker:** stronger blur + a deeper shadow than small chips. Consider context-aware shadow — heavier over busy/text content for separation, lighter over plain backgrounds.
- **Dim to focus, separate to keep flow.** A modal task pairs the surface with a dimming scrim and pushes the background back/down. A parallel, non-blocking panel uses translucency and offset *without* a scrim so the flow isn't broken. For stacked sheets, progressively dim and push back each parent layer.
- **Vibrancy keeps text legible over changing backgrounds.** Over blurred/translucent surfaces, don't use flat gray text — use higher-contrast, slightly heavier weight, and a small letter-spacing bump. Put color on a solid layer, not the translucent foreground.
- **Scroll edge effects, not hard dividers.** Instead of a 1px border under a sticky header, fade a small blur/gradient mask where content meets floating chrome — only where floating UI actually overlaps content.
- **Materialize, don't just fade.** For glass/blur surfaces, animate blur radius and scale together on enter/exit, so the surface reads as a real material arriving rather than a plain opacity fade.
```css
.toolbar {
background: rgba(255, 255, 255, 0.6);
backdrop-filter: blur(20px) saturate(180%);
border-top: 1px solid rgba(255, 255, 255, 0.4); /* bright top edge = light catching the material */
}
```
## 13. Multimodal feedback — motion + sound + haptics
Three rules for combining senses (from *Designing Audio-Haptic Experiences*):
1. **Causality** — it must be obvious what caused the feedback. Trigger it on the actual causal event (the toggle flipping, the item snapping home), and match its character to the action's physicality.
2. **Harmony** — the visual, the sound, and the haptic must fire on the **same frame**. Latency between them destroys the illusion. Don't let a CSS transition lag the audio/haptic (Vibration API).
3. **Utility** — add feedback only where it earns its place. Reserve haptics/sound for meaningful moments (success, error, commit, snap). Over-feedback trains users to ignore all of it.
## 14. Reduced motion & accessibility
Reduced motion doesn't mean *no* feedback — it means a gentler, non-vestibular equivalent. Respond to three independent signals and bake them into your components:
- **`prefers-reduced-motion: reduce`** — replace slides/springs/parallax with short opacity **cross-fades or static transitions**. Drop elastic/overshoot. Keep opacity/color changes that aid comprehension.
- **`prefers-reduced-transparency: reduce`** — make translucent surfaces frostier/solid: raise background opacity, drop the blur.
- **`prefers-contrast: more`** — near-solid backgrounds with a defined, contrasting border.
Also: avoid full-viewport moving backgrounds, slow looping oscillations (near 0.2 Hz / one cycle per 5s), and abrupt brightness jumps (ease dark↔light theme changes). Make large moving objects semi-transparent while they travel, and fade big surfaces out during a large reposition and back in once settled.
```css
@media (prefers-reduced-motion: reduce) {
.sheet { transition: opacity 200ms ease; transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
.toolbar { background: white; backdrop-filter: none; }
}
```
## 15. Typography — optical sizing, tracking, leading
Apple designs type to change shape with size; the same discipline applies on the web. (From *The Details of UI Typography*, WWDC 2020.)
- **Tracking (letter-spacing) is size-specific — never one value for all sizes.** Large display text wants *negative* tracking (letters read too far apart as they grow); small text wants slightly *positive* tracking for legibility. A fixed `letter-spacing` is wrong somewhere. Tighten headings, leave body near `0`.
- **Leading (line-height) tracks size inversely.** Tight on large headings, looser on body copy. Increase it for scripts with tall ascenders/descenders; tighten it for dense, information-heavy UI.
- **Build hierarchy from weight + size + leading as a set,** not size alone. Emphasize with weight — it adds presence without taking more space.
- **Respect the user's text-size setting** (Dynamic Type). Scale layout *with* the text — spacing in `rem`/`em`, not fixed px — so a larger font doesn't break the layout.
- **Default to the platform's system font** before a custom face; it already ships optical sizing, tracking tables, and legibility tuning. Override only with a reason.
```css
:root { font: 100%/1.5 system-ui, sans-serif; } /* body: system font, comfortable leading */
.display {
font-size: clamp(2rem, 5vw, 4rem);
line-height: 1.05; /* tight leading for large text */
letter-spacing: -0.02em; /* negative tracking as it grows */
font-optical-sizing: auto;
}
```
## 16. Design foundations — the eight principles
The motion and craft above serve Apple's eight design principles (*Principles of Great Design*, WWDC 2026). Use these as the names you reason with:
1. **Purpose.** Make with intention; decide what *not* to build. Every feature asks for the user's time, attention, and trust — spend that budget only where it pays off.
2. **Agency.** Keep people in control: offer choices, don't force a single path. Back it with forgiveness — easy undo for slips, a confirmation dialog only for genuinely destructive, irreversible actions (use sparingly; overusing it trains people to click through).
3. **Responsibility.** Act in the user's interest. Privacy: ask at the right moment, only for what's needed, transparently. Safety: anticipate misuse and harm — especially with AI (an allergy-aware recipe app must not suggest a harmful ingredient). Add previews, confirmations, disclaimers; cut a feature whose risk outweighs its value.
4. **Familiarity.** Build on what people already know. Use metaphors that are neither too literal nor too abstract (a trash can means delete), and honor their physics. Be consistent: things that look the same must behave the same and live in the same place (close is always top-left on macOS) so people can predict what happens next. Only break a familiar pattern if you can prove it's better — then test it, don't assume.
5. **Flexibility.** Design for different contexts, devices, and the full range of abilities. Adapt to the platform (iPhone = quick touch; desktop = deep workflows with precise pointer control) and to the situation. Design inclusively (age, language, expertise, accessibility). When no single layout fits everyone, let people personalize — rearrange controls, hide what they don't use.
6. **Simplicity — not minimalism.** Strip the unnecessary so the core purpose shines; burying everything in one place looks minimal but isn't simple. Be concise (plain language, no jargon, fewer steps) and clear (use hierarchy — order, spacing, contrast — so the most important thing is the most obvious). Every element earns its place; sometimes *adding* context simplifies (a video scrubber that shows time remaining). Show the common path first, advanced options one level deeper.
7. **Craft.** Uncompromising attention to detail builds trust. Beautiful typography, colors that adapt to light/dark, clear iconography, and responsive animations that give immediate, natural feedback. Nothing is random — every spacing, timing, and alignment value is a deliberate choice you can defend. Jittery scroll, misaligned icons, and layouts that break on rotation read as carelessness. Craft needs iteration and longevity — keep evolving the design as features and hardware change.
8. **Delight.** The result of getting the other seven right, not confetti tacked on top. Decide the emotion you want people to feel (calm, confident, excited) and reinforce it in every decision.
Tactical rules that serve these:
- **Feedback comes in four kinds:** status, completion, warning, error. Confirm meaningful actions, expose ongoing status, warn before problems, validate inline (not on submit).
- **Wayfinding.** Every screen should answer: Where am I? Where can I go? What's there? How do I get out? Never trap the user.
- **Grouping & mapping.** Proximity implies relationship; place a control near what it affects and arrange controls to mirror what they change. If you need a label to explain a control, the mapping is weak.
- **Direct, specific labels beat safe generic ones.** Name nav items for their contents ("Progress", "Library"), not vague umbrellas ("Home"). Specificity creates predictability.
## 17. Process
- **Prototype interactively — an interactive demo is worth "a million static designs."** You discover the interface by building and playing with it; a working prototype also sets a concrete bar that prevents a mediocre final implementation.
- **Design interaction and visuals together.** "You shouldn't be able to tell where one ends and the other begins." Motion is not a layer added after the pixels.
- **Test with real people in real context**, and review motion with fresh eyes — play it in slow motion / frame-by-frame to catch what's invisible at full speed.
## Quick Reference
| Need | Technique | Concrete value |
| --- | --- | --- |
| Default UI spring | Critically damped, no overshoot | `damping 1.0`, `response 0.3–0.4` |
| Momentum / flick spring | Under-damped, slight bounce | `damping ~0.8`, `response 0.3–0.4` |
| Gesture → spring velocity | Hand off release velocity | `gestureVelocity / (target − current)` if normalized |
| Flick landing point | Project momentum | `current + (v/1000)·d/(1−d)`, `d ≈ 0.998` |
| Interrupt cleanly | Start from presentation (live) value | read the on-screen transform |
| Avoid reversal "brick wall" | Carry velocity through re-target | spring that blends velocity |
| Reversible transition | Mirror the easing curve | inverse cubic-bézier |
| Decide reverse vs. commit | Use velocity **sign**, not position | at release |
| 1:1 drag | Pointer Events + capture | respect the grab offset |
| Feedback | On pointer-down, continuous | never only at the end |
| Boundary | Rubber-band, don't hard-stop | progressive resistance |
| Translucent chrome | `backdrop-filter` layer | content scrolls under |
| Type tracking | Size-specific, never fixed | tighten large text (`-0.02em`), body near `0` |
| Reduced motion | Cross-fade, not slide/spring | `@media (prefers-reduced-motion)` |

View File

@ -0,0 +1,187 @@
---
name: make-interfaces-feel-better
description: >-
Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, typography, icons, micro-interactions, enter/exit animations, or any visual detail work. Supports quick and full review modes. Triggers on UI polish, design details, "make it feel better", "feels off", stagger animations, border radius, optical alignment, font smoothing, tabular numbers, image outlines, box shadows, icons, icon stroke weight, icon states, motion restraint.
---
# Details that make interfaces feel better
Great interfaces rarely come from a single thing. It's usually a collection of small details that compound into a great experience. Apply these principles when building or reviewing UI code. Before suggesting or writing a fix, identify the project's existing styling system and express the change in that system: Tailwind in a Tailwind project, plain CSS in a CSS project, or the established CSS-in-JS approach. Never introduce a second styling system just to apply a polish fix.
When reviewing, slow the interface down: replay motion at 10% speed in the browser's Animations panel and walk every state: hover, focus, active, loading, empty. What feels off at 10% speed is what's subtly wrong at full speed.
## Quick Reference
| Category | When to Use |
| --- | --- |
| [Typography](typography.md) | Text wrapping, font smoothing, tabular numbers |
| [Surfaces](surfaces.md) | Border radius, optical alignment, shadows, image outlines, hit areas |
| [Animations](animations.md) | Interruptible animations, enter/exit transitions, icon animations, scale on press, motion restraint |
| [Icons](icons.md) | Icon stroke weight, states via `currentColor`, outline vs fill, sizing, RTL flipping |
| [Performance](performance.md) | Transition specificity, `will-change` usage |
## Core Principles
### 1. Concentric Border Radius
Outer radius = inner radius + padding. Mismatched radii on nested elements is the most common thing that makes interfaces feel off.
### 2. Optical Over Geometric Alignment
When geometric centering looks off, align optically. Buttons with icons, play triangles, and asymmetric icons all need manual adjustment.
### 3. Shadows for Elevation, Borders for Structure
For buttons, cards, and containers whose border exists only to create depth, prefer layered transparent `box-shadow` values. Keep borders that communicate structure or state: dividers, layout separators, and selected or focus states.
### 4. Interruptible Animations
Use CSS transitions for interactive state changes — they can be interrupted mid-animation. Reserve keyframes for staged sequences that run once.
### 5. Split and Stagger Enter Animations
For an infrequent staged entrance where sequence helps communicate hierarchy, break content into semantic chunks and stagger them by ~100ms instead of animating one container. Do not stagger routine, high-frequency interactions.
### 6. Subtle Exit Animations
Use a small fixed `translateY` instead of full height. Exits should be softer than enters. Use `ease-out` for both enter and exit transitions.
### 7. Contextual Icon Animations
Animate icons with `opacity`, `scale`, and `blur` instead of toggling visibility. Use exactly these values: scale from `0.25` to `1`, opacity from `0` to `1`, blur from `4px` to `0px`. If the project has `motion` or `framer-motion` in `package.json`, match that package's import path (or the established nearby imports when both exist) and use `transition: { type: "spring", duration: 0.3, bounce: 0 }` — bounce must always be `0`. If no motion library is installed, keep both icons in the DOM (one absolute-positioned) and cross-fade with CSS transitions using `cubic-bezier(0.2, 0, 0, 1)` — this gives both enter and exit animations without any dependency.
### 8. Font Smoothing
Apply `-webkit-font-smoothing: antialiased` to the root layout on macOS for crisper text.
### 9. Tabular Numbers
Use `font-variant-numeric: tabular-nums` for any dynamically updating numbers to prevent layout shift.
### 10. Text Wrapping
Use `text-wrap: balance` on headings. Use `text-wrap: pretty` for body text to avoid orphans.
### 11. Image Outlines
Add a subtle `1px` outline with low opacity to images for consistent depth. The color must be pure black in light mode (`oklch(0 0 0 / 0.1)`) and pure white in dark mode (`oklch(1 0 0 / 0.1)`), never a near-black like slate, zinc, or any tinted neutral. A tinted outline picks up the surface color underneath it and reads as dirt on the image edge.
### 12. Scale on Press
A subtle `scale(0.96)` on click gives buttons tactile feedback. Always use `0.96`. Never use a value smaller than `0.95` — anything below feels exaggerated. Add a `static` prop to disable it when motion would be distracting.
### 13. Skip Animation on Page Load
Use `initial={false}` on `AnimatePresence` to prevent enter animations on first render. Verify it doesn't break intentional entrance animations.
### 14. Never Use `transition: all`
Always specify exact properties: `transition-property: scale, opacity`. Tailwind's `transition-transform` covers `transform, translate, scale, rotate`.
### 15. Use `will-change` Sparingly
Only for `transform`, `opacity`, `filter` — properties the GPU can composite. Never use `will-change: all`. Only add when you notice first-frame stutter.
### 16. Minimum Hit Area
Interactive elements should prefer a 44×44px hit area for touch or mobile contexts. In dense desktop interfaces, use at least 40×40px. Extend with a pseudo-element if the visible element is smaller. Never let hit areas of two elements overlap.
### 17. Match Icon Stroke to Text Weight
An icon next to text carries the text's optical weight: `1.5px` stroke beside regular (400) text, `2px` beside semibold (600). One stroke weight per icon set; never mix libraries on one surface.
### 18. One SVG, Recolored per State
Icons use `currentColor` and get their states (hover, selected, disabled) from CSS color and opacity, never from separate assets. Outline variant is the default; fill variant marks the active state.
### 19. Motion Restraint
No custom animation on high-frequency interactions: the attention cost repeats on every trigger. Motion is never the only feedback channel; every animated state change also needs a static cue such as color, icon, or label.
## Common Mistakes
| Mistake | Fix |
| --- | --- |
| Same border radius on parent and child | Calculate `outerRadius = innerRadius + padding` |
| Icons look off-center | Adjust optically with padding or fix SVG directly |
| Border used only to fake elevation | Use layered `box-shadow` with transparency; keep structural and state borders |
| Jarring staged entrance or contextual exit | Stagger infrequent entrances and keep context-preserving exits subtle |
| Numbers cause layout shift | Apply `tabular-nums` |
| Heavy text on macOS | Apply `antialiased` to root |
| Animation plays on page load | Add `initial={false}` to `AnimatePresence` |
| `transition: all` on elements | Specify exact properties |
| First-frame animation stutter | Add `will-change: transform` (sparingly) |
| Tiny hit areas on small controls | Extend with a pseudo-element to 44×44px for touch/mobile, or at least 40×40px in dense desktop UI |
| Hairline icon beside bold text | Match the stroke width to the text weight |
| Separate icon assets per state | One `currentColor` SVG, states via CSS |
| Filled icons everywhere | Outline as default, fill only for the active state |
| Entrance animation on every hover or keystroke | Instant feedback or ≤150ms opacity/color transition |
## Review Output Format
Use `full` when no review mode is supplied.
| Mode | Coverage | Finding cap |
| --- | --- | --- |
| `quick` | Primary user path and highest-traffic states; report only `HIGH` and `MEDIUM` issues | 5 |
| `full` | Entire requested scope across typography, surfaces, animations, icons, and performance | 15 |
### Scope and Coverage
State the mode, exact scope, framework, styling conventions, and any review boundary. Show what was actually inspected:
| Category | Evidence inspected | Result |
| --- | --- | --- |
| Typography | Files, components, states, or checks | Findings count, `Clear`, or `Not reviewed` with a reason |
Include all five Quick Reference categories. Never imply an uninspected surface was reviewed.
### Findings
Group findings by principle. Use a markdown table with **Severity**, **Location**, **Before**, **After**, and **Why** columns. Include every change made or proposed, not a subset. Never use separate "Before:" / "After:" lines.
- **Severity**: `HIGH` makes an interaction inaccessible, misleading, unreadable, or repeatedly disruptive; `MEDIUM` creates a noticeable usability or consistency problem; `LOW` is isolated polish and appears only in `full` mode.
- **Location**: cite `path/to/file:line`. If the artifact has no source files, cite the exact screen and component instead.
- **Before / After**: show the current implementation and an actionable replacement.
- **Why**: name the violated principle and explain its user impact.
Consolidate a repeated systemic issue into one row and list every affected location. Omit principles with no findings and never pad the report to reach the cap.
### Example
#### Concentric border radius
| Severity | Location | Before | After | Why |
| --- | --- | --- | --- | --- |
| LOW | `src/Card.tsx:28` | `rounded-xl` on card + `rounded-xl` on inner button (`p-2`) | `rounded-2xl` on card (`8 + 8 = 16`), `rounded-lg` on inner button | Nested corners should be concentric |
| LOW | `src/card.css:11` | `border-radius: 16px` on both nested surfaces | Outer `24px`, inner `16px` with `8px` padding | Equal nested radii make the inner surface look pinched |
#### Tabular numbers
| Severity | Location | Before | After | Why |
| --- | --- | --- | --- | --- |
| MEDIUM | `src/Counter.tsx:17` | `<span>{count}</span>` | `<span className="tabular-nums">{count}</span>` | Proportional digits cause changing values to shift |
| LOW | `src/timer.css:8` | Default numerals on a timer | Add `font-variant-numeric: tabular-nums` to the timer | Equal-width digits keep the timer stable |
#### Scale on press
| Severity | Location | Before | After | Why |
| --- | --- | --- | --- | --- |
| LOW | `src/Button.tsx:19` | `<button className="...">` | Add `active:scale-[0.96] transition-transform` | Press feedback makes the control feel responsive |
| MEDIUM | `src/button.css:24` | `scale(0.9)` on press | Raise to `scale(0.96)` | Anything below `0.95` feels exaggerated |
### Considered but Rejected
Include 1–3 real candidates in `quick` mode and 2–5 in `full` mode:
| Location | Candidate | Rejected because |
| --- | --- | --- |
| `src/Card.tsx:28` | Increase the shadow | Existing depth matches the shared surface token; changing one card would reduce consistency |
Do not invent filler. If the scope contains fewer borderline candidates, include the ones that exist and say so.
### Verification and Verdict
After the findings:
1. **Verification**: list the exact commands or interactions run and their observed results. Walk every relevant state and inspect motion at 10% speed when animation is involved. If a check was not run, label it **Not verified** and state what remains.
2. **Verdict**: `Block` if any `HIGH` finding remains, `Needs changes` if only `MEDIUM` or `LOW` findings remain, and `Approve` only when no actionable findings remain. List every unverified check beside the verdict.
When there are no findings, omit the findings table, state "No actionable interface-polish findings", report verification and rejected candidates, and end with `Approve`.

View File

@ -0,0 +1,3 @@
interface:
display_name: "Make Interfaces Feel Better"
short_description: "Typography, surfaces, motion, icons and UI polish"

View File

@ -0,0 +1,403 @@
# Animations
Interruptible animations, enter/exit transitions, contextual icon animations, and motion restraint.
## Interruptible Animations
Users change intent mid-interaction. If animations aren't interruptible, the interface feels broken.
### CSS Transitions vs. Keyframes
| | CSS Transitions | CSS Keyframe Animations |
| --- | --- | --- |
| **Behavior** | Interpolate toward latest state | Run on a fixed timeline |
| **Interruptible** | Yes — retargets mid-animation | No — restarts from beginning |
| **Use for** | Interactive state changes (hover, toggle, open/close) | Staged sequences that run once (enter animations, loading) |
| **Duration** | Fixed; retargets the value mid-flight, not the timeline | Fixed timeline, restarts from the beginning |
```css
/* Good — interruptible transition for a toggle */
.drawer {
transform: translateX(-100%);
transition: transform 200ms ease-out;
}
.drawer.open {
transform: translateX(0);
}
/* Clicking again mid-animation smoothly reverses — no jank */
```
```css
/* Bad — keyframe animation for interactive element */
.drawer.open {
animation: slideIn 200ms ease-out forwards;
}
/* Closing mid-animation snaps or restarts — feels broken */
```
**Rule:** Always prefer CSS transitions for interactive elements. Reserve keyframes for one-shot sequences.
## Enter Animations: Split and Stagger
Use this pattern for infrequent staged entrances where sequence helps communicate hierarchy, such as the first load of a page hero, success state, or empty state. Break a large container into semantic chunks and animate each individually. Do not stagger routine interactions such as row hovers, keystrokes, or repeated tab changes.
### Step by Step
1. **Split** into logical groups (title, description, buttons)
2. **Stagger** with ~100ms delay between groups
3. **For titles**, consider splitting into individual words with ~80ms stagger
4. **Combine** `opacity`, `blur`, and `translateY` for the enter effect
### Code Example
```tsx
// Motion (Framer Motion) — staggered enter
function PageHeader() {
return (
<motion.div
initial="hidden"
animate="visible"
variants={{
visible: { transition: { staggerChildren: 0.1 } },
}}
>
<motion.h1
variants={{
hidden: { opacity: 0, y: 12, filter: "blur(4px)" },
visible: { opacity: 1, y: 0, filter: "blur(0px)" },
}}
>
Welcome
</motion.h1>
<motion.p
variants={{
hidden: { opacity: 0, y: 12, filter: "blur(4px)" },
visible: { opacity: 1, y: 0, filter: "blur(0px)" },
}}
>
A description of the page.
</motion.p>
<motion.div
variants={{
hidden: { opacity: 0, y: 12, filter: "blur(4px)" },
visible: { opacity: 1, y: 0, filter: "blur(0px)" },
}}
>
<Button>Get started</Button>
</motion.div>
</motion.div>
);
}
```
### CSS-Only Stagger
```css
.stagger-item {
opacity: 0;
transform: translateY(12px);
filter: blur(4px);
animation: fadeInUp 400ms ease-out forwards;
}
.stagger-item:nth-child(1) { animation-delay: 0ms; }
.stagger-item:nth-child(2) { animation-delay: 100ms; }
.stagger-item:nth-child(3) { animation-delay: 200ms; }
@keyframes fadeInUp {
to {
opacity: 1;
transform: translateY(0);
filter: blur(0);
}
}
```
## Exit Animations
Exit animations should be softer and less attention-grabbing than enter animations. The user's focus is moving to the next thing — don't fight for attention.
### Subtle Exit (Recommended)
```tsx
// Small fixed translateY — indicates direction without drama
<motion.div
exit={{
opacity: 0,
y: -12,
filter: "blur(4px)",
transition: { duration: 0.15, ease: "easeOut" },
}}
>
{content}
</motion.div>
```
### Full Exit (When Context Matters)
```tsx
// Slide fully out — use when spatial context is important
// (e.g., a card returning to a list, a drawer closing)
<motion.div
exit={{
opacity: 0,
x: "-100%",
transition: { duration: 0.2, ease: "easeOut" },
}}
>
{content}
</motion.div>
```
### Good vs. Bad
```css
/* Good — subtle exit */
.item-exit {
opacity: 0;
transform: translateY(-12px);
transition: opacity 150ms ease-out, transform 150ms ease-out;
}
/* Bad — dramatic exit that steals focus */
.item-exit {
opacity: 0;
transform: translateY(-100%) scale(0.5);
transition: all 400ms ease-out;
}
/* Sometimes correct — remove immediately when motion adds no context */
.item-exit {
display: none;
}
```
**Key points:**
- Use a small fixed `translateY` (e.g., `-12px`) instead of the full container height
- Keep some directional movement to indicate where the element went
- Exit duration should be shorter than enter duration (150ms vs 300ms)
- Use a subtle exit when it preserves spatial context. Remove immediately when motion adds no information, the interaction repeats frequently, or reduced motion is requested.
## Contextual Icon Animations
When icons appear or disappear contextually (on hover, on state change), animate them with `opacity`, `scale`, and `blur` rather than just toggling visibility.
### Motion Example
This example uses the `motion` package. If the project instead has `framer-motion`, import the same APIs from `"framer-motion"`; never mix an installed package with the other package's import path.
```tsx
import { AnimatePresence, motion } from "motion/react";
function IconButton({ isActive, icon: Icon }) {
return (
<button>
<AnimatePresence mode="popLayout">
<motion.span
key={isActive ? "active" : "inactive"}
initial={{ opacity: 0, scale: 0.25, filter: "blur(4px)" }}
animate={{ opacity: 1, scale: 1, filter: "blur(0px)" }}
exit={{ opacity: 0, scale: 0.25, filter: "blur(4px)" }}
transition={{ type: "spring", duration: 0.3, bounce: 0 }}
>
<Icon />
</motion.span>
</AnimatePresence>
</button>
);
}
```
### CSS Transition Approach (No Motion)
If the project doesn't use Motion (Framer Motion), keep both icons in the DOM and cross-fade them with CSS transitions. Because neither icon unmounts, both enter and exit animate smoothly.
The trick: one icon is absolutely positioned on top of the other. Toggling state cross-fades them — the entering icon scales up from `0.25` while the exiting icon scales down to `0.25`, both with opacity and blur.
```tsx
function IconButton({ isActive, ActiveIcon, InactiveIcon }) {
return (
<button>
<div className="relative">
<div
className={cn(
"absolute inset-0 flex items-center justify-center",
"transition-[opacity,filter,scale] duration-300",
"ease-[cubic-bezier(0.2,0,0,1)]",
isActive
? "scale-100 opacity-100 blur-0"
: "scale-[0.25] opacity-0 blur-[4px]"
)}
>
<ActiveIcon />
</div>
<div
className={cn(
"transition-[opacity,filter,scale] duration-300",
"ease-[cubic-bezier(0.2,0,0,1)]",
isActive
? "scale-[0.25] opacity-0 blur-[4px]"
: "scale-100 opacity-100 blur-0"
)}
>
<InactiveIcon />
</div>
</div>
</button>
);
}
```
The non-absolute icon (InactiveIcon) defines the layout size. The absolute icon (ActiveIcon) overlays it without affecting flow.
### Choosing Between Motion and CSS
| | Motion (Framer Motion) | CSS transitions (both icons in DOM) |
| --- | --- | --- |
| **Enter animation** | Yes | Yes |
| **Exit animation** | Yes (via `AnimatePresence`) | Yes (cross-fade — icon never unmounts) |
| **Spring physics** | Yes | No — use `cubic-bezier(0.2, 0, 0, 1)` as approximation |
| **When to use** | Project already uses `motion` or `framer-motion` | No motion dependency, or keeping bundle small |
**Rule:** Check the project's `package.json`. Import from `"motion/react"` when `motion` is installed, or from `"framer-motion"` when `framer-motion` is installed. If both exist, follow the imports already used by the component or its nearest peers. If neither is present, use the CSS cross-fade pattern — don't add a dependency just for icon transitions.
### When to Animate Icons
| Animate | Don't animate |
| --- | --- |
| Icons that appear on hover (action buttons) | Static navigation icons |
| State change icons (play → pause, like → liked) | Decorative icons |
| Icons in contextual toolbars | Icons that are always visible |
| Loading/success state indicators | Icon labels (text next to icon) |
**Important:** Always use exactly these values for contextual icon animations — do not deviate:
- `scale`: `0.25` → `1` (never use `0.5` or `0.6`)
- `opacity`: `0` → `1`
- `filter`: `"blur(4px)"` → `"blur(0px)"`
- `transition`: `{ type: "spring", duration: 0.3, bounce: 0 }` — **bounce must always be `0`**, never `0.1` or any other value
## Scale on Press
A subtle scale-down on click gives buttons tactile feedback. Always use `scale(0.96)`. Never use a value smaller than `0.95` — anything below feels exaggerated. Use CSS transitions for interruptibility — if the user releases mid-press, it should smoothly return.
Not every button needs this. Add a `static` prop to your button component that disables the scale effect when the motion would be distracting.
### CSS Example
```css
.button {
transition-property: scale;
transition-duration: 150ms;
transition-timing-function: ease-out;
}
.button:active {
scale: 0.96;
}
```
### Tailwind Example
```tsx
<button className="transition-transform duration-150 ease-out active:scale-[0.96]">
Click me
</button>
```
### Motion Example
```tsx
<motion.button whileTap={{ scale: 0.96 }}>
Click me
</motion.button>
```
### Static Prop Pattern
Extract the scale class into a variable and conditionally apply it based on a `static` prop:
```tsx
const tapScale = "active:not-disabled:scale-[0.96]";
function Button({ static: isStatic, className, children, ...props }) {
return (
<button
className={cn(
"transition-transform duration-150 ease-out",
!isStatic && tapScale,
className,
)}
{...props}
>
{children}
</button>
);
}
// Usage
<Button>Click me</Button> {/* scales on press */}
<Button static>Submit</Button> {/* no scale */}
```
## Skip Animation on Page Load
Use `initial={false}` on `AnimatePresence` to prevent enter animations from firing on first render. Elements that are already in their default state shouldn't animate in on page load — only on subsequent state changes.
### When It Works
```tsx
// Good — icon doesn't animate in on mount, only on state change
<AnimatePresence initial={false} mode="popLayout">
<motion.span
key={isActive ? "active" : "inactive"}
initial={{ opacity: 0, scale: 0.25, filter: "blur(4px)" }}
animate={{ opacity: 1, scale: 1, filter: "blur(0px)" }}
exit={{ opacity: 0, scale: 0.25, filter: "blur(4px)" }}
>
<Icon />
</motion.span>
</AnimatePresence>
```
Works well for: icon swaps, toggles, tabs, segmented controls — anything that has a default state on page load.
### When It Breaks
Don't use `initial={false}` when the component relies on its `initial` prop to set up a first-time enter animation, like a staggered page hero or a loading state. In those cases, removing the initial animation skips the entire entrance.
```tsx
// Bad — initial={false} would skip the staggered page enter entirely
<AnimatePresence initial={false}>
<motion.div initial="hidden" animate="visible" variants={...}>
...
</motion.div>
</AnimatePresence>
```
Verify the component still looks right on a full page refresh before applying this.
## Motion Restraint
Motion is a budget, not a garnish:
- **No custom animation on high-frequency interactions.** Repeated interactions get instant feedback or a minimal `opacity` or `background-color` transition at ≤150ms.
- **Motion is never the only feedback channel.** Every animated state change also needs a static cue such as color, icon, or label.
- **Brief and precise beats prominent.** If a shorter, smaller animation communicates the same thing, use it.
- **Honor reduced-motion preferences.** Preserve the static cue and remove unnecessary movement.
```css
/* Good: high-frequency hover gets a minimal transition */
.row:hover {
background-color: var(--surface-hover);
transition: background-color 100ms ease-out;
}
/* Bad: every hover replays a full entrance */
.row:hover .row-icon {
animation: bounceIn 500ms;
}
```

View File

@ -0,0 +1,63 @@
# Icons
Icon weight, states, sizing, and direction: the details that make icons sit naturally in an interface.
## Match Icon Stroke to Text Weight
An icon next to text should carry the same optical weight as the text.
| Adjacent text | Icon stroke width (24px grid) |
| --- | --- |
| Regular (400), 14–16px | `1.5px` |
| Medium/Semibold (500–600) | `2px` |
| Bold (700), or emphasized standalone | `2.5px` |
Use one stroke weight per icon set on a surface. Size inline icons relative to the text's cap height, typically `1em`–`1.25em`.
## One SVG, Recolored per State
Use one SVG drawn with `currentColor`; let CSS drive hover, selected, and disabled states. Strip hardcoded `fill` and `stroke` colors when importing icons.
```html
<svg fill="none" stroke="currentColor" stroke-width="2">…</svg>
```
```css
.icon-button { color: oklch(0.552 0.016 285.938); }
.icon-button:hover { color: oklch(0.21 0.006 285.885); }
.icon-button[aria-pressed="true"] { color: oklch(0.623 0.188 259.815); }
.icon-button:disabled { opacity: 0.4; }
```
## Outline Default, Fill Active
| Variant | Use for |
| --- | --- |
| Outline | Default state: toolbars, list rows, inline with text |
| Fill | Selected or active state: active tab, toggled bookmark, liked heart |
The swap between variants is a contextual icon animation; use the exact cross-fade values in [animations.md](animations.md).
## Design at Render Size
- Test every icon at the smallest size it will render, often `16px`.
- Prefer simplified glyphs for small contexts over scaled-down detailed artwork.
- Use the icon set's native grid sizes (`16`, `20`, `24`) rather than arbitrary fractional scales.
- Use SVG rather than raster assets.
## Icons in RTL
| Flip | Don't flip |
| --- | --- |
| Back/forward arrows, navigation chevrons | Logos and brand marks |
| Text alignment, lists, indent | Checkmarks |
| Directional send glyphs | Clocks, cups, pencils |
| Speaker waves tied to reading direction | Media playback controls |
```css
[dir="rtl"] .icon-directional {
scale: -1 1;
}
```
Analyze composite icons part by part: an overlay may keep its position even when the base glyph flips. Give every icon-only control an accessible name and mark purely decorative icons hidden from assistive technology.

View File

@ -0,0 +1,88 @@
# Performance
Transition specificity and GPU compositing hints.
## Transition Only What Changes
Never use `transition: all` or Tailwind's `transition-all`. Always specify the exact properties that change. Tailwind's bare `transition` maps to a curated default list of colors, opacity, shadow, and transforms, not to `all`; still prefer naming exactly what changes.
### Why
- `transition: all` forces the browser to watch every property for changes
- Causes unexpected transitions on properties you didn't intend to animate (colors, padding, shadows)
- Prevents browser optimizations
### CSS Example
```css
/* Good — only transition what changes */
.button {
transition-property: scale, background-color;
transition-duration: 150ms;
transition-timing-function: ease-out;
}
/* Bad — transition everything */
.button {
transition: all 150ms ease-out;
}
```
### Tailwind
```tsx
// Good — explicit properties
<button className="transition-[scale,background-color] duration-150 ease-out">
// Bad — transition all
<button className="transition-all duration-150 ease-out">
```
### Tailwind `transition-transform` Note
`transition-transform` in Tailwind maps to `transition-property: transform, translate, scale, rotate` — it covers all transform-related properties, not just `transform`. Use this when you're only animating transforms. For multiple non-transform properties, use the bracket syntax: `transition-[scale,opacity,filter]`.
## Use `will-change` Sparingly
`will-change` hints the browser to pre-promote an element to its own GPU compositing layer. Without it, the browser promotes the element only when the animation starts — that one-time layer promotion can cause a micro-stutter on the first frame.
This particularly helps when an element is changing `scale`, `rotation`, or moving around with `transform`. For other properties, it doesn't help much — the browser can't composite them on the GPU anyway.
### Rules
```css
/* Good — specific property that benefits from GPU compositing */
.animated-card {
will-change: transform;
}
/* Good — multiple compositor-friendly properties */
.animated-card {
will-change: transform, opacity;
}
/* Bad — never use will-change: all */
.animated-card {
will-change: all;
}
/* Bad — properties that can't be GPU-composited anyway */
.animated-card {
will-change: background-color, padding;
}
```
### Useful Properties
| Property | GPU-compositable | Worth using `will-change` |
| --- | --- | --- |
| `transform` | Yes | Yes |
| `opacity` | Yes | Yes |
| `filter` (blur, brightness) | Yes | Yes |
| `clip-path` | Newer Chromium only | Rarely; not reliable cross-browser |
| `top`, `left`, `width`, `height` | No | No |
| `background`, `border`, `color` | No | No |
### When to Skip
Modern browsers are already good at optimizing on their own. Only add `will-change` when you notice first-frame stutter — Safari in particular benefits from it. Don't add it preemptively to every animated element; each extra compositing layer costs memory.

View File

@ -0,0 +1,256 @@
# Surfaces
Border radius, optical alignment, shadows, and image outlines.
## Concentric Border Radius
When nesting rounded elements, the outer radius must equal the inner radius plus the padding between them:
```
outerRadius = innerRadius + padding
```
This rule is most useful when nested surfaces are close together. If padding is larger than `24px`, treat the layers as separate surfaces and choose each radius independently instead of forcing strict concentric math.
### Example
```css
/* Good — concentric radii */
.card {
border-radius: 20px; /* 12 + 8 */
padding: 8px;
}
.card-inner {
border-radius: 12px;
}
/* Bad — same radius on both */
.card {
border-radius: 12px;
padding: 8px;
}
.card-inner {
border-radius: 12px;
}
```
### Tailwind Example
```tsx
// Good — outer radius accounts for padding
<div className="rounded-2xl p-2"> {/* 16px radius, 8px padding */}
<div className="rounded-lg"> {/* 8px radius = 16 - 8 ✓ */}
...
</div>
</div>
// Bad — same radius on both
<div className="rounded-xl p-2">
<div className="rounded-xl"> {/* same radius, looks off */}
...
</div>
</div>
```
Mismatched border radii on nested elements is one of the most common things that makes interfaces feel off. Always calculate concentrically.
## Optical Alignment
When geometric centering looks off, align optically instead.
### Buttons with Text + Icon
Use slightly less padding on the icon side to make the button feel balanced. A reliable rule of thumb is:
`icon-side padding = text-side padding - 2px`.
```css
/* Good — less padding on icon side */
.button-with-icon {
padding-left: 16px;
padding-right: 14px; /* icon side = text side - 2px */
}
/* Bad — equal padding looks like icon is pushed too far right */
.button-with-icon {
padding: 0 16px;
}
```
```tsx
// Tailwind
<button className="pl-4 pr-3.5 flex items-center gap-2">
<span>Continue</span>
<ArrowRightIcon />
</button>
```
### Play Button Triangles
Play icons are triangular and their geometric center is not their visual center. Shift slightly right:
```css
/* Good — optically centered */
.play-button svg {
margin-left: 2px; /* shift right to account for triangle shape */
}
/* Bad — geometrically centered but looks off */
.play-button svg {
/* no adjustment */
}
```
### Asymmetric Icons (Stars, Arrows, Carets)
Some icons have uneven visual weight. The best fix is adjusting the SVG directly so no extra margin/padding is needed in the component code.
```tsx
// Best — fix in the SVG itself
// Adjust the viewBox or path to visually center the icon
// Fallback — adjust with margin
<span className="ml-px">
<StarIcon />
</span>
```
## Shadows Instead of Borders
For **buttons, cards, and containers** that use a border for depth or elevation, prefer replacing it with a subtle `box-shadow`. Shadows adapt to any background since they use transparency; solid borders don't. This also helps when using images or multiple colors as backgrounds — solid border colors don't work well on backgrounds other than the ones they were designed for.
**Do not apply this to dividers** (`border-b`, `border-t`, side borders) or any border whose purpose is layout separation rather than element depth. Those should stay as borders.
### Shadow as Border (Light Mode)
The shadow is comprised of three layers. The first acts as a 1px border ring, the second adds subtle lift, and the third provides ambient depth:
```css
:root {
--shadow-border:
0px 0px 0px 1px oklch(0 0 0 / 0.06),
0px 1px 2px -1px oklch(0 0 0 / 0.06),
0px 2px 4px 0px oklch(0 0 0 / 0.04);
--shadow-border-hover:
0px 0px 0px 1px oklch(0 0 0 / 0.08),
0px 1px 2px -1px oklch(0 0 0 / 0.08),
0px 2px 4px 0px oklch(0 0 0 / 0.06);
}
```
### Shadow as Border (Dark Mode)
In dark mode, simplify to a single white ring — layered depth shadows aren't visible on dark backgrounds:
```css
/* Dark mode — adapt to whatever setup the project uses
(prefers-color-scheme, class, data attribute, etc.) */
--shadow-border: 0 0 0 1px oklch(1 0 0 / 0.08);
--shadow-border-hover: 0 0 0 1px oklch(1 0 0 / 0.13);
```
### Usage with Hover Transition
Apply the variable and add `transition-[box-shadow]` for a smooth hover:
```css
.card {
box-shadow: var(--shadow-border);
transition-property: box-shadow;
transition-duration: 150ms;
transition-timing-function: ease-out;
}
.card:hover {
box-shadow: var(--shadow-border-hover);
}
```
### When to Use Shadows vs. Borders
| Use shadows | Use borders |
| --- | --- |
| Cards, containers with depth | Dividers between list items |
| Buttons with bordered styles | Table cell boundaries |
| Elevated elements (dropdowns, modals) | Form input outlines (for accessibility) |
| Elements on varied backgrounds | Hairline separators in dense UI |
| Hover/focus states for lift effect | |
## Image Outlines
Add a subtle `1px` outline with low opacity to images. This creates consistent depth, especially in design systems where other elements use borders or shadows.
### Color rules (non-negotiable)
- **Light mode**: pure black, `oklch(0 0 0 / 0.1)`.
- **Dark mode**: pure white, `oklch(1 0 0 / 0.1)`.
- Never use a near-black or near-white from the project palette (e.g. slate-900, zinc-900, `#0a0a0a`, `#111827`, `#f5f5f7`). Tinted outlines pick up the surrounding surface color and read as dirt on the image edge.
- Never match the outline to the project's accent or ink color. The outline is a neutral separator, not a themed element.
### Light Mode
```css
img {
outline: 1px solid oklch(0 0 0 / 0.1);
outline-offset: -1px; /* inset so it doesn't add to layout */
}
```
### Dark Mode
```css
img {
outline: 1px solid oklch(1 0 0 / 0.1);
outline-offset: -1px;
}
```
### Tailwind with Dark Mode
```tsx
<img
className="outline outline-1 -outline-offset-1 outline-black/10 dark:outline-white/10"
src={src}
alt={alt}
/>
```
Use `outline-black/10` and `outline-white/10` specifically — not `outline-slate-*`, `outline-zinc-*`, `outline-neutral-*`, or any tinted scale.
**Why outline instead of border?** `outline` doesn't affect layout (no added width/height), and `outline-offset: -1px` keeps it inset so images stay their intended size.
## Minimum Hit Area
Interactive elements should prefer a 44×44px hit area for touch or mobile contexts. In dense desktop interfaces, use at least 40×40px. If the visible element is smaller (e.g., a 20×20 checkbox), extend the hit area with a pseudo-element.
### CSS Example
```css
/* Small checkbox with expanded 44px hit area */
.checkbox {
position: relative;
width: 20px;
height: 20px;
}
.checkbox::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 44px;
height: 44px;
}
```
### Tailwind Example
```tsx
<button className="relative size-5 after:absolute after:top-1/2 after:left-1/2 after:size-11 after:-translate-1/2">
<CheckIcon />
</button>
```
### Collision Rule
If the extended hit area overlaps another interactive element, shrink the pseudo-element — but make it as large as possible without colliding. Two interactive elements should never have overlapping hit areas.

View File

@ -0,0 +1,157 @@
# Typography
Typography rendering details that make interfaces feel better.
## Text Wrapping
### text-wrap: balance
Distributes text evenly across lines, preventing orphaned words on headings and short text blocks. **Only works on blocks of 6 lines or fewer** (Chromium) or 10 lines or fewer (Firefox) — the balancing algorithm is computationally expensive, so browsers limit it to short text.
```css
/* Good — even line lengths on short text */
h1, h2, h3 {
text-wrap: balance;
}
```
```css
/* Bad — default wrapping leaves orphans */
h1 {
/* no text-wrap rule → "Read our
blog" instead of balanced lines */
}
```
```css
/* Bad — balance on long paragraphs (silently ignored, wastes intent) */
.article-body p {
text-wrap: balance;
}
```
**Tailwind:** `text-balance`
### text-wrap: pretty
Prevents orphaned words (a single word dangling on the last line) by adjusting line breaks throughout the paragraph. Unlike `balance`, it doesn't try to equalize line lengths — it just ensures the last line isn't embarrassingly short. Works on text of any length with no line-count limit.
This should be your **default for short-to-medium text** — paragraphs, descriptions, captions, list items, card text. For very long text (10+ lines), skip both `pretty` and `balance` — the browser's default wrapping is fine and you avoid unnecessary layout cost.
```css
/* Good — descriptions, captions, short paragraphs */
p, li, figcaption, blockquote {
text-wrap: pretty;
}
```
```tsx
// Tailwind
<p className="text-pretty">
A short paragraph that won't leave an orphan on the last line.
</p>
```
**Tailwind:** `text-pretty`
### When to Use Which
| Scenario | Use |
| --- | --- |
| Headings, titles where even distribution matters | `text-wrap: balance` |
| Short-to-medium text — paragraphs, descriptions, captions, UI text | `text-wrap: pretty` |
| Long text (10+ lines), code blocks, pre-formatted text | Neither — leave default |
## Font Smoothing (macOS)
On macOS, text renders heavier than intended by default. Apply antialiased smoothing to the root layout so all text renders crisper and thinner.
```css
/* CSS */
html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
```
```tsx
// Tailwind — apply to root layout
<html className="antialiased">
```
### Good vs. Bad
```css
/* Good — applied once at the root */
html {
-webkit-font-smoothing: antialiased;
}
/* Bad — applied per-element, inconsistent */
.heading {
-webkit-font-smoothing: antialiased;
}
.body {
/* no smoothing → heavier than heading */
}
```
**Note:** This only affects macOS rendering. Other platforms ignore these properties, so it's safe to apply universally.
## Font Family Scope
This skill does not require a specific font family. Do not introduce a paid or proprietary typeface just to satisfy the polish checklist.
Use the product's existing type system unless the task explicitly asks for a type change. If the design calls for a system-native macOS feel, use the system font stack. If the design calls for a commercial face such as Helvetica Now, treat it as an optional brand decision and keep a practical fallback stack.
```css
/* System-native macOS/iOS feel */
html {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
```
```css
/* Commercial brand face with safe fallbacks */
html {
font-family: "Helvetica Now", "Helvetica Neue", Arial, sans-serif;
}
```
**Rule:** font smoothing, text wrapping, and tabular numbers are rendering details. They do not override the project's chosen font family.
## Tabular Numbers
When numbers update dynamically (counters, prices, timers, table columns), use tabular-nums to make all digits equal width. This prevents layout shift as values change.
```css
/* CSS */
.counter {
font-variant-numeric: tabular-nums;
}
```
```tsx
// Tailwind
<span className="tabular-nums">{count}</span>
```
### When to Use
| Use tabular-nums | Don't use tabular-nums |
| --- | --- |
| Counters and timers | Static display numbers |
| Prices that update | Decorative large numbers |
| Table columns with numbers | Phone numbers, zip codes |
| Animated number transitions | Version numbers (v2.1.0) |
| Scoreboards, dashboards | |
### Caveat
Some fonts (like Inter) change the visual appearance of numerals with this property — specifically, the digit `1` becomes wider and centered. This is expected behavior and usually desirable for alignment, but verify it looks right in your specific font.
```css
/* With Inter font:
Default: 1234 → proportional, "1" is narrow
Tabular: 1234 → all digits equal width, "1" centered */
```

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ dist
.env* .env*
!.env.example !.env.example
.vercel .vercel
.DS_Store

View File

@ -8,7 +8,7 @@ Video courses for makeup artists in Amharic, Afaan Oromoo, Tigrinya and English.
- **Design:** [`design/inspo/README.md`](design/inspo/README.md) (Logosmental reference), [`design/tokens.json`](design/tokens.json), [`design/audit-2026-10-06.md`](design/audit-2026-10-06.md). - **Design:** [`design/inspo/README.md`](design/inspo/README.md) (Logosmental reference), [`design/tokens.json`](design/tokens.json), [`design/audit-2026-10-06.md`](design/audit-2026-10-06.md).
- **Live demo (Phase 0, Claude-hosted):** https://claude.ai/artifact/Rv2YqqccDs9GtAWbzHUCHE. It's private, so ask the owner for access. Payments, SMS and email are simulated. - **Live demo (Phase 0, Claude-hosted):** https://claude.ai/artifact/Rv2YqqccDs9GtAWbzHUCHE. It's private, so ask the owner for access. Payments, SMS and email are simulated.
**Waitlist page:** `apps/demo/public/waitlist/index.html` is a standalone page (name, email, phone) served at `/waitlist/` on Vercel. Set `ENDPOINT` in it before sharing it publicly. Until then, signups stay in the visitor's browser. **Waitlist page:** `apps/demo/public/waitlist/index.html` (name, email, phone) is served at `/waitlist/` on Vercel. Signups go to a Google Sheet through `tools/waitlist-apps-script.gs`, which has the setup steps in its header. Paste the web app URL into `ENDPOINT` in the page before sharing it. While `ENDPOINT` is empty, signups stay in the visitor's browser.
## Layout ## Layout
@ -28,8 +28,9 @@ npx -y pnpm@9 install
npx -y pnpm@9 run demo:build # next build → dist/demo.html → offline network check npx -y pnpm@9 run demo:build # next build → dist/demo.html → offline network check
npx -y pnpm@9 test # domain rules (payments, entitlement, progress, dashboard) npx -y pnpm@9 test # domain rules (payments, entitlement, progress, dashboard)
npx -y pnpm@9 run i18n:check # every locale has every key npx -y pnpm@9 run i18n:check # every locale has every key
node tools/waitlist-check.mjs # waitlist Apps Script: validation, dedupe, formula-injection guard
``` ```
**Vercel (standalone demo):** `vercel.json` builds the static export, then `tools/vercel-build.mjs` injects the runtime mock and the seed. Outside Claude, all data lives in memory in each visitor's browser and resets on reload. Deploy with `npx vercel deploy --prod`. **Builds:** a plain build (`next build`, `app:build`, the CI server, Vercel) talks to the real API, `https://api.rezina.yaltopia.com`, the default in `apps/demo/app/page.tsx`. Point it elsewhere (e.g. staging) with `NEXT_PUBLIC_LMS_API=<url>`. `demo:build` sets it empty and keeps demo data: it feeds the hosted artifact demo, whose sandbox can't reach outside servers. To preview the old in-memory demo, build with `NEXT_PUBLIC_LMS_API= npx -y pnpm@9 --filter demo build && node tools/vercel-build.mjs`. Deploy to Vercel with `npx vercel deploy --prod`.
Phases 1–3 (Fastify API, Postgres, ArifPay, R2 video) haven't started yet. They wait on decisions D1, D2 and D8 in SPEC §17. Phases 1–3 (Fastify API, Postgres, ArifPay, R2 video) haven't started yet. They wait on decisions D1, D2 and D8 in SPEC §17.

View File

@ -2,10 +2,26 @@ import type { ReactNode } from 'react';
import { readFileSync } from 'node:fs'; import { readFileSync } from 'node:fs';
import { join } from 'node:path'; import { join } from 'node:path';
// Placeholder favicon matching the <Logo /> mark in packages/features/src/ui.tsx. import { LOGO_MARK } from '@lms/features/src/brandLogo';
const icon = `data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 34"><rect width="34" height="34" rx="10" fill="#1D3557"/><path d="M7 22c3.5-6 7-6 10 0s6.5 6 10 0" fill="none" stroke="#A8DADC" stroke-width="3" stroke-linecap="round"/><circle cx="23.5" cy="11" r="3.5" fill="#E63946"/></svg>')}`;
export const metadata = { title: 'MakeUp Academy', description: 'Claude-hosted demo of the e-learning platform (SPEC §18).', icons: { icon } }; const SITE = 'https://makeup-lms.vercel.app';
const DESCRIPTION = "Video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks. Pay once with Telebirr, CBE Birr, cards or PayPal, keep the course for life, and learn on your phone in Amharic, English, Afaan Oromoo or Tigrinya.";
export const metadata = {
metadataBase: new URL(SITE),
title: { default: 'Sirkul Makeup — Learn professional makeup from working artists', template: '%s · Sirkul Makeup' },
description: DESCRIPTION,
keywords: ['makeup course', 'makeup class Ethiopia', 'online makeup course', 'bridal makeup', 'Habesha makeup', 'makeup artist training', 'Addis Ababa makeup school', 'የሜካፕ ትምህርት', 'Rezina Brhane', 'Sirkul Makeup'],
authors: [{ name: 'Rezina Brhane', url: 'https://www.tiktok.com/@rezinabrhane' }],
creator: 'Rezina Brhane',
alternates: { canonical: '/' },
icons: { icon: LOGO_MARK },
openGraph: { type: 'website', url: SITE, siteName: 'Sirkul Makeup', title: 'Learn professional makeup from working artists', description: DESCRIPTION, images: [{ url: '/photos/hero.jpg', alt: 'Makeup by Sirkul Makeup School' }], locale: 'en_US', alternateLocale: ['am_ET', 'om_ET', 'ti_ET'] },
twitter: { card: 'summary_large_image', title: 'Sirkul Makeup — makeup courses on your phone', description: DESCRIPTION, images: ['/photos/hero.jpg'] },
robots: { index: true, follow: true },
};
export const viewport = { themeColor: '#0A0A0A' };
// Structured data: the school, its founder (Rezina Brhane) and her TikTok, so search results tie them together.
const ORG = {"@context": "https://schema.org", "@type": "EducationalOrganization", "name": "Sirkul Makeup School/Studio", "alternateName": "Sirkul Makeup", "url": "https://makeup-lms.vercel.app", "logo": "https://makeup-lms.vercel.app/brand/sirkul-logo.png", "image": "https://makeup-lms.vercel.app/photos/hero.jpg", "description": "Video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks. Pay once with Telebirr, CBE Birr, cards or PayPal, keep the course for life, and learn on your phone in Amharic, English, Afaan Oromoo or Tigrinya.", "founder": {"@type": "Person", "name": "Rezina Brhane", "jobTitle": "Founder and head of Sirkul Makeup", "sameAs": ["https://www.tiktok.com/@rezinabrhane"]}, "sameAs": ["https://www.tiktok.com/@rezinabrhane"], "areaServed": "ET", "knowsLanguage": ["am", "en", "om", "ti"], "contactPoint": {"@type": "ContactPoint", "contactType": "customer support", "telephone": "+251911234567", "availableLanguage": ["Amharic", "English", "Afaan Oromoo", "Tigrinya"]}};
// Inlined at build time instead of `import '…css'`: an imported stylesheet is re-requested by React's // Inlined at build time instead of `import '…css'`: an imported stylesheet is re-requested by React's
// stylesheet hoisting at hydration, which the artifact CSP blocks. apps/web and apps/admin import it normally. // stylesheet hoisting at hydration, which the artifact CSP blocks. apps/web and apps/admin import it normally.
@ -13,13 +29,16 @@ const css = readFileSync(join(process.cwd(), '../../packages/features/src/styles
export default function RootLayout({ children }: { children: ReactNode }) { export default function RootLayout({ children }: { children: ReactNode }) {
return ( return (
<html lang="en" data-theme="light"> <html lang="en" data-theme="dark" suppressHydrationWarning>
<head> <head>
{/* next/font emits separate files, so fonts come from Google Fonts (allowed by the artifact CSP, §18.5) */} {/* next/font emits separate files, so fonts come from Google Fonts (allowed by the artifact CSP, §18.5) */}
<link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Plus+Jakarta+Sans:wght@600;700;800&family=Noto+Sans+Ethiopic:wght@400;700&family=Noto+Serif+Ethiopic:wght@500;700&display=swap" /> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Ethiopic:wght@400;700&family=Noto+Serif+Ethiopic:wght@500;700&display=swap" />
<style dangerouslySetInnerHTML={{ __html: css }} /> <style dangerouslySetInnerHTML={{ __html: css }} />
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(ORG) }} />
{/* Saved theme, else dark (the brand default); runs before paint so there's no flash. */}
<script dangerouslySetInnerHTML={{ __html: "try{var t=localStorage.getItem('theme')||'dark';document.documentElement.dataset.theme=t}catch(e){}" }} />
</head> </head>
<body>{children}</body> <body>{children}</body>
</html> </html>

View File

@ -1,8 +1,13 @@
'use client'; 'use client';
import { ClaudeDbDataSource } from '@lms/data'; import { ApiDataSource, ClaudeDbDataSource } from '@lms/data';
import { Platform } from '@lms/features'; import { Platform } from '@lms/features';
const makeDs = () => new ClaudeDbDataSource(); // Any plain build (`next build`, as the CI server runs it) talks to the real API.
// The hosted artifact demo opts out by building with NEXT_PUBLIC_LMS_API set to an empty value (`demo:build`):
// its sandbox can't reach outside servers, so it keeps its own data. Another API (e.g. staging) is a different value.
const DEFAULT_API = 'https://api.rezina.yaltopia.com';
const API = process.env.NEXT_PUBLIC_LMS_API ?? DEFAULT_API;
const makeDs = () => (API ? new ApiDataSource(API) : new ClaudeDbDataSource());
export default function Page() { export default function Page() {
return <Platform dataSource={makeDs} />; return <Platform dataSource={makeDs} />;

View File

@ -3,6 +3,10 @@ export default {
output: 'export', output: 'export',
images: { unoptimized: true }, images: { unoptimized: true },
trailingSlash: false, trailingSlash: false,
// public/waitlist/index.html is a standalone page. Next does not serve a folder index at /waitlist.
async rewrites() {
return [{ source: '/waitlist', destination: '/waitlist/index.html' }];
},
transpilePackages: ['@lms/data', '@lms/features', '@lms/i18n'], transpilePackages: ['@lms/data', '@lms/features', '@lms/i18n'],
webpack: (config, { isServer }) => { webpack: (config, { isServer }) => {
if (!isServer) { if (!isServer) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

View File

@ -0,0 +1,4 @@
User-agent: *
Allow: /
Sitemap: https://makeup-lms.vercel.app/sitemap.xml

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://makeup-lms.vercel.app/</loc><changefreq>weekly</changefreq><priority>1.0</priority></url>
<url><loc>https://makeup-lms.vercel.app/waitlist/</loc><changefreq>weekly</changefreq><priority>0.9</priority></url>
</urlset>

View File

@ -3,288 +3,572 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>MakeUp Academy — Join the waitlist</title> <title>Sirkul Makeup — Join the waitlist</title>
<meta name="description" content="Video makeup courses from working Ethiopian artists, in Amharic, Afaan Oromoo, Tigrinya and English. Join the waitlist to hear the day we open." /> <meta name="description" content="Join the Sirkul Makeup waitlist: video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks, made for your phone." />
<meta name="theme-color" content="#FFF8F6" /> <meta name="theme-color" content="#0A0A0A" />
<link rel="canonical" href="https://makeup-lms.vercel.app/waitlist/" />
<meta name="keywords" content="makeup course, makeup class Ethiopia, online makeup course, bridal makeup, Habesha makeup, Rezina Brhane, Sirkul Makeup, የሜካፕ ትምህርት" />
<meta name="author" content="Rezina Brhane" />
<meta name="robots" content="index, follow" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Sirkul Makeup" />
<meta property="og:url" content="https://makeup-lms.vercel.app/waitlist/" />
<meta property="og:title" content="Your signature look starts here — Sirkul Makeup" />
<meta property="og:description" content="Join the Sirkul Makeup waitlist: video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks, made for your phone." />
<meta property="og:image" content="https://makeup-lms.vercel.app/photos/hero.jpg" />
<meta property="og:image:alt" content="Makeup by Sirkul Makeup School" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Your signature look starts here — Sirkul Makeup" />
<meta name="twitter:description" content="Join the Sirkul Makeup waitlist: video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks, made for your phone." />
<meta name="twitter:image" content="https://makeup-lms.vercel.app/photos/hero.jpg" />
<script type="application/ld+json">{"@context": "https://schema.org", "@type": "EducationalOrganization", "name": "Sirkul Makeup School/Studio", "alternateName": "Sirkul Makeup", "url": "https://makeup-lms.vercel.app", "logo": "https://makeup-lms.vercel.app/brand/sirkul-logo.png", "image": "https://makeup-lms.vercel.app/photos/hero.jpg", "description": "Video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks. Pay once with Telebirr, CBE Birr, cards or PayPal, keep the course for life, and learn on your phone in Amharic, English, Afaan Oromoo or Tigrinya.", "founder": {"@type": "Person", "name": "Rezina Brhane", "jobTitle": "Founder and head of Sirkul Makeup", "sameAs": ["https://www.tiktok.com/@rezinabrhane"]}, "sameAs": ["https://www.tiktok.com/@rezinabrhane"], "areaServed": "ET", "knowsLanguage": ["am", "en", "om", "ti"], "contactPoint": {"@type": "ContactPoint", "contactType": "customer support", "telephone": "+251911234567", "availableLanguage": ["Amharic", "English", "Afaan Oromoo", "Tigrinya"]}}</script>
<link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&family=Noto+Serif+Ethiopic:wght@500;700&display=swap" /> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Ethiopic:wght@400;600&display=swap" />
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Crect width='34' height='34' rx='10' fill='%231D3557'/%3E%3Cpath d='M7 22c3.5-6 7-6 10 0s6.5 6 10 0' fill='none' stroke='%23A8DADC' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='23.5' cy='11' r='3.5' fill='%23E63946'/%3E%3C/svg%3E" /> <link rel="icon" href="/brand/sirkul-mark.png" />
<style> <style>
:root { :root {
--ink: #1D3557; --ink-2: #4A5D78; --ink-3: #7A8799; --bg: #0A0A0A; --raise: #141414; --field: #1A1A1A; --line: #2A2A2A;
--bg: #FFF8F6; --card: #FFFFFF; --line: #F0E2DE; --blush: #FAD7DA; --blush-2: #FDECEC; --nude: #F3E3DA; --ink: #F5F5F5; --ink-2: #C9C9C9; --ink-3: #8A8A8A; --bad: #FFB4AB;
--accent: #E63946; --accent-hover: #CB1928; --ok: #2E7D5B; --ok-soft: #E3F4EA;
--sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
--serif: 'Instrument Serif', Georgia, serif; --eth: 'Noto Sans Ethiopic', var(--sans);
--eth: 'Noto Serif Ethiopic', serif;
--ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--shadow: 0 1px 2px rgba(29, 53, 87, .04), 0 12px 32px rgba(142, 75, 69, .08); color-scheme: dark;
color-scheme: light;
} }
* { box-sizing: border-box; } * { box-sizing: border-box; }
html { scroll-behavior: smooth; } html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(38% 420px at 28% 260px, rgba(250, 215, 218, .8), transparent 70%), radial-gradient(32% 380px at 74% 180px, rgba(168, 218, 220, .45), transparent 70%), var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; } body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; } a { color: inherit; }
button, input { font: inherit; color: inherit; } button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; } :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
/* nav: pills left, waitlist button right (inspo: Hotle) */ /* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; } .nav { position: fixed; z-index: 10; top: 12px; left: clamp(12px, 3vw, 36px); right: clamp(12px, 3vw, 36px); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 10px 8px 14px; border: 1px solid transparent; border-radius: 18px; background: transparent; transform: translateY(0); transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out), box-shadow 300ms var(--ease-out), backdrop-filter 300ms var(--ease-out); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; } .nav.scrolled { background: rgba(20, 20, 20, .72); border-color: rgba(255, 255, 255, .1); box-shadow: 0 16px 40px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .05); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); }
.pills { display: flex; gap: 8px; } .nav::after { content: ''; position: absolute; left: 10%; right: 10%; top: 100%; height: 18px; background: linear-gradient(rgba(10, 10, 10, .24), transparent); opacity: 0; pointer-events: none; transition: opacity 240ms var(--ease-out); }
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; } .nav.scrolled::after { opacity: 1; }
.pill.dark { background: var(--ink); border-color: var(--ink); color: #fff; } .brand { display: inline-flex; align-items: center; text-decoration: none; }
@media (max-width: 720px) { .pills { display: none; } } .brand img { height: 46px; width: auto; filter: invert(1); }
@media (max-width: 420px) { .brand img { height: 36px; } }
.links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.links a { text-decoration: none; color: var(--ink-2); transition: color 160ms; }
.links a:hover { color: #fff; }
.nav .ghost { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: rgba(255, 255, 255, .08); text-decoration: none; font-weight: 600; font-size: 15px; transition: transform 120ms var(--ease-out), background-color 160ms; }
.nav .ghost:hover { background: #262626; }
.nav .ghost:active { transform: scale(.96); }
@media (min-width: 761px) {
.nav { left: 50%; right: auto; width: calc(100% - 72px); transform: translateX(-50%); transition: width 300ms var(--ease-out), background-color 240ms var(--ease-out), border-color 240ms var(--ease-out), box-shadow 300ms var(--ease-out), backdrop-filter 300ms var(--ease-out); }
.nav.scrolled { width: min(calc(100% - 48px), 620px); }
}
@media (max-width: 760px) { .links { display: none; } }
/* hero */ /* ---------- hero: photo cards float around a centered pitch ---------- */
.hero { position: relative; text-align: center; padding: 40px 0 0; } .hero { position: relative; min-height: max(min(100svh, 980px), 760px); display: grid; place-items: center; padding: 120px 16px 96px; overflow: hidden; isolation: isolate; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); } .collage { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--blush); margin-left: 6px; } .card { position: absolute; width: var(--w, 12.5vw); max-width: 250px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #1A1A1A; outline: 1px solid rgba(255, 255, 255, .1); outline-offset: -1px;
h1 { font-size: clamp(42px, 7.6vw, 88px); line-height: 1; letter-spacing: -.035em; font-weight: 600; margin: 22px auto 0; max-width: 13ch; } opacity: 0; filter: blur(8px); animation: portrait-in 680ms var(--ease-out) forwards; animation-delay: var(--d); }
h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--accent); } .card.wide { aspect-ratio: 4 / 5; }
.am { font-family: var(--eth); font-size: clamp(18px, 2.4vw, 22px); color: var(--ink-2); margin: 16px 0 0; } .card img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.lead { max-width: 560px; margin: 14px auto 0; color: var(--ink-2); font-size: clamp(16px, 1.9vw, 18px); } .c1 { left: -1.5%; top: 24%; --d: 120ms; }
.c2 { left: 21%; top: -6%; --d: 0ms; }
.c3 { left: 11%; bottom: -8%; --w: 12vw; --d: 240ms; }
.c4 { right: 15%; top: 30%; --d: 180ms; }
.c5 { right: -1%; top: 11%; --w: 13vw; --d: 60ms; }
.c6 { right: 8%; bottom: -12%; --d: 300ms; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes portrait-in { from { opacity: 0; filter: blur(8px); transform: translateY(22px) scale(.96); } to { opacity: 1; filter: blur(0); transform: none; } }
.collage::after { content: ''; position: absolute; inset: 0; background: radial-gradient(48% 46% at 50% 52%, rgba(10, 10, 10, .9), rgba(10, 10, 10, 0) 100%); }
.art { display: block; width: min(560px, 100%); height: auto; margin: 8px auto -12px; } .pitch { max-width: 680px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.proof { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 6px; border-radius: 999px; border: 1px solid #3A3A3A; background: rgba(10, 10, 10, .6); backdrop-filter: blur(8px); font-size: 15px; font-weight: 500; }
.faces { display: flex; }
.faces > * { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 2px solid var(--bg); margin-left: -9px; filter: grayscale(.45) brightness(.88); }
.faces > :first-child { margin-left: 0; }
.faces > .on { filter: none; z-index: 1; position: relative; }
.faces b { display: grid; place-items: center; background: #fff; color: #0A0A0A; font-size: 12px; font-weight: 800; filter: none; animation: rise 500ms var(--ease-out); }
.live { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; flex: none; box-shadow: 0 0 0 4px rgba(74, 222, 128, .12); }
h1 { font-size: clamp(44px, 6.4vw, 84px); line-height: .98; letter-spacing: -.045em; font-weight: 600; margin: 26px 0 0; text-wrap: balance; }
h1 em, h2 em { font-style: normal; color: var(--ink-3); }
.lead { max-width: 34ch; margin: 14px 0 0; color: var(--ink-2); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; text-wrap: pretty; }
/* form card */ /* ---------- form: email first, then name + phone ---------- */
.join { max-width: 640px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); text-align: left; scroll-margin-top: 24px; } .join { width: min(560px, 100%); margin: 32px 0 0; scroll-margin-top: 120px; }
.fields { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; } .bar { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); transition: border-color 160ms, box-shadow 160ms; }
.fields .full { grid-column: 1 / -1; } .bar:focus-within { border-color: #4A4A4A; box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } .join { padding: 16px; border-radius: 20px; } } .bar input { flex: 1; min-width: 0; border: 0; background: none; padding: 0 16px; min-height: 48px; font-size: 16px; outline: none; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input { min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); font-size: 16px; transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease; }
input::placeholder { color: var(--ink-3); } input::placeholder { color: var(--ink-3); }
input:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(29, 53, 87, .08); } .more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
input[aria-invalid="true"] { border-color: var(--accent); } .more[hidden] { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 150ms ease; } .more input { min-height: 56px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); font-size: 16px; outline: none; }
.btn:hover { background: #142844; } .more input:focus, .tel:focus-within { border-color: #4A4A4A; box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
.tel { display: flex; align-items: center; min-height: 56px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); transition: border-color 160ms, box-shadow 160ms; }
.tel:has([aria-invalid="true"]) { border-color: var(--bad); }
.tel input { flex: 1; min-width: 0; min-height: 0; height: 54px; border: 0 !important; background: none; box-shadow: none !important; padding: 0 20px 0 10px; }
.cc { position: relative; flex: none; display: flex; align-items: center; gap: 6px; height: 40px; margin-left: 8px; padding: 0 10px 0 12px; border-radius: 999px; background: #262626; font-weight: 600; font-size: 15px; }
.cc:hover { background: #2E2E2E; }
.cc:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.cc select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.cc .flag { font-size: 18px; line-height: 1; }
.cc svg { color: var(--ink-3); }
input[aria-invalid="true"] { border-color: var(--bad) !important; }
.bar:has(input[aria-invalid="true"]) { border-color: var(--bad); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: #fff; color: #0A0A0A; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 160ms var(--ease-out), background 160ms; }
.btn:hover { background: #E8E8E8; }
.btn:active { transform: scale(0.97); } .btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: .7; cursor: progress; } .btn[disabled] { opacity: .7; cursor: progress; }
.btn.red { background: var(--accent); } .btn.red:hover { background: var(--accent-hover); } .fine { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }
.fine { margin: 12px 2px 0; font-size: 13px; color: var(--ink-3); text-align: center; } .err { margin: 12px 0 0; font-size: 14px; color: var(--bad); font-weight: 600; }
.err { margin: 10px 2px 0; font-size: 14px; color: var(--accent-hover); font-weight: 600; min-height: 0; }
.err:empty { display: none; } .err:empty { display: none; }
.done { text-align: center; padding: 18px 8px; } .done { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 20px 14px 14px; border-radius: 24px; background: var(--field); border: 1px solid var(--line); transform-origin: center; }
.done .tick { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--ok-soft); color: var(--ok); } .done .tick { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0A0A0A; }
.done h3 { margin: 0; font-size: 24px; letter-spacing: -.02em; } .done h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.done p { margin: 6px 0 0; color: var(--ink-2); } .done p { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.done, .join form { transition: opacity 250ms var(--ease-out), translate 250ms var(--ease-out); }
@starting-style { .done { opacity: 0; translate: 0 8px; } }
/* courses at launch: shade swatches instead of logos (inspo: Hotle "trusted by" row) */ @media (max-width: 1100px) { .c2, .c4 { display: none; } .card { --w: 17vw; } .c1 { top: 12%; } .c6 { right: -2%; } }
.section { padding: 72px 0 0; } @media (max-width: 760px) {
.center { text-align: center; } .hero { min-height: 0; padding: 92px 16px 56px; }
h2 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; margin: 0; } .collage { position: relative; inset: auto; display: flex; justify-content: center; gap: 10px; height: 214px; margin: 0 -16px 20px; z-index: 0; }
.sub { color: var(--ink-2); margin: 10px auto 0; max-width: 520px; } .collage::after { display: none; }
.shades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 28px auto 0; max-width: 880px; padding: 0; list-style: none; } .card { position: relative; inset: auto; width: 98px; flex: none; }
@media (max-width: 760px) { .shades { grid-template-columns: repeat(2, minmax(0, 1fr)); } } .c1 { rotate: -6deg; top: 18px; } .c5 { top: 0; } .c6 { rotate: 6deg; top: 18px; }
.shade { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 12px; } .c3 { display: none; }
.shade .dot { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .12), inset 6px 6px 12px rgba(255, 255, 255, .55); } .hero { display: block; }
.shade strong { font-size: 15px; line-height: 1.3; } .pitch { margin: 0 auto; }
.shade span { font-size: 13px; color: var(--ink-3); } .more { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
.bar { flex-direction: column; border-radius: 24px; }
.bar input { min-height: 48px; }
}
/* why */ /* ---------- sections ---------- */
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; } .block { padding: clamp(72px, 9vw, 120px) 0 0; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -.04em; font-weight: 600; margin: 0; }
.sub { color: var(--ink-2); margin: 14px 0 0; max-width: 40rem; font-size: 17px; }
.looks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 36px 0 0; padding: 0; list-style: none; }
.looks li { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 3 / 4.4; background: #1A1A1A; }
.looks img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform 700ms var(--ease-out); }
.looks li:hover img { transform: scale(1.04); }
.looks div { position: absolute; left: 0; right: 0; bottom: 0; padding: 72px 18px 18px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); display: flex; flex-direction: column; gap: 2px; }
.looks strong { font-size: 17px; letter-spacing: -.01em; }
.looks span { font-size: 14px; color: rgba(255, 255, 255, .75); }
@media (max-width: 980px) { .looks { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .looks { grid-template-columns: 1fr; } .looks li { aspect-ratio: 4 / 5; } }
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } } @media (max-width: 760px) { .why { grid-template-columns: 1fr; } }
.why > div { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; } .why > div { background: var(--raise); border: 1px solid #1F1F1F; border-radius: 20px; padding: 28px; }
.why .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--blush-2); color: var(--accent); } .why .n { font-size: 14px; font-weight: 700; letter-spacing: .06em; line-height: 1; color: var(--ink-3); display: block; margin-bottom: 28px; }
.why h3 { margin: 16px 0 4px; font-size: 18px; letter-spacing: -.01em; } .why h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.why p { margin: 0; color: var(--ink-2); font-size: 15px; } .why p { margin: 0; color: var(--ink-2); font-size: 15px; }
/* faq (native details) */ .faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 64px; }
.faq { max-width: 720px; margin: 0 auto; } @media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }
.faq h2 { margin-bottom: 20px; } details { border-bottom: 1px solid var(--line); }
details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; } details:first-child { border-top: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-weight: 600; } summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 2px; font-weight: 600; font-size: 17px; }
summary::-webkit-details-marker { display: none; } summary::-webkit-details-marker { display: none; }
summary svg { flex: none; transition: transform 200ms var(--ease-out); } summary svg { flex: none; color: var(--ink-3); transition: transform 200ms var(--ease-out); }
details[open] summary svg { transform: rotate(45deg); } details[open] summary svg { transform: rotate(45deg); }
details p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); } details p { margin: 0; padding: 0 2px 22px; color: var(--ink-2); max-width: 52ch; }
/* closing CTA + footer with oversized wordmark (inspo: Hotle footer, Sumo dark hero) */ .cta { position: relative; margin-top: clamp(72px, 9vw, 120px); border-radius: 28px; overflow: hidden; min-height: 420px; display: grid; place-items: center; text-align: center; padding: 48px 24px; isolation: isolate; }
.cta { margin-top: 72px; border-radius: 28px; padding: 40px 24px; background: linear-gradient(135deg, #1D3557, #315A93); color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; position: relative; overflow: hidden; } .cta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; z-index: -2; }
.cta::after { content: ''; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F5AFB5, #E63946 70%); opacity: .5; } .cta::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 50% 50%, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25)), linear-gradient(transparent 40%, rgba(0, 0, 0, .5)); }
@media (max-width: 560px) { .cta::after { width: 160px; height: 160px; right: -70px; top: -70px; } } .cta h2 { font-size: clamp(40px, 6vw, 76px); }
.cta h2 { color: #fff; position: relative; } .cta h2 em { color: #F5AFB5; } .cta h2 em { color: rgba(255, 255, 255, .72); }
.cta .btn { position: relative; } .cta .btn { margin-top: 24px; min-height: 52px; }
footer { margin-top: 64px; border-top: 1px solid var(--line); overflow: hidden; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 0; font-size: 13px; color: var(--ink-3); }
.foot a { text-decoration: none; } .foot a:hover { color: var(--ink); }
.word { font-weight: 800; font-size: clamp(44px, 11.2vw, 200px); line-height: .8; letter-spacing: -.06em; white-space: nowrap; text-align: center; margin: 0 0 -.12em; background: linear-gradient(180deg, var(--ink) 30%, rgba(29, 53, 87, .12)); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
/* first-visit entrance: rare, so it may stagger (emil-design-eng) */ footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 40px 0 32px; font-size: 14px; color: var(--ink-3); }
.rise { animation: rise 600ms var(--ease-out) both; } footer nav { display: flex; gap: 20px; }
.rise:nth-child(2) { animation-delay: 60ms; } .rise:nth-child(3) { animation-delay: 120ms; } .rise:nth-child(4) { animation-delay: 180ms; } .rise:nth-child(5) { animation-delay: 240ms; } .rise:nth-child(6) { animation-delay: 300ms; } footer a { text-decoration: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } } footer a:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
/* ---------- SMS / email toggle: SMS first, since most people here live on their phone ---------- */
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: max-content; gap: 4px; padding: 4px; margin: 0 auto 10px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); }
.seg::before { content: ''; position: absolute; z-index: 0; inset: 4px auto 4px 4px; width: calc(50% - 6px); border-radius: 999px; background: #fff; transform: translateX(0); transition: transform 280ms cubic-bezier(.2, .8, .2, 1); }
.seg[data-channel="email"]::before { transform: translateX(calc(100% + 4px)); }
.seg button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: var(--ink-3); font-weight: 600; font-size: 14px; cursor: pointer; transition: color 180ms var(--ease-out); }
.seg button[aria-selected="true"] { color: #0A0A0A; }
.bar .tel { flex: 1; min-width: 0; min-height: 48px; border: 0; background: none; }
.bar .tel input { height: 48px; }
.bar .cc { margin-left: 2px; }
.bar [hidden] { display: none !important; }
.more { grid-template-columns: 1fr; }
/* ---------- motion: headline words rise, then the rest; sections reveal on scroll ---------- */
h1 .w { display: inline-block; }
.collage { transform: translateY(var(--py, 0px)); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 320ms var(--ease-out), transform 380ms var(--ease-out); transition-delay: var(--rd, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.looks li.reveal img { transform: scale(1.07); transition: transform 480ms var(--ease-out); transition-delay: var(--rd, 0ms); }
.looks li.in img { transform: scale(1); }
.looks li.in:hover img { transform: scale(1.05); transition-duration: 700ms; transition-delay: 0ms; }
.cta img { transform: scale(1.06); transition: transform 620ms var(--ease-out); }
.cta.in img { transform: scale(1); }
/* ---------- portrait reel under the hero ---------- */
.reel { overflow: hidden; padding: 8px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.reel > div { display: grid; grid-template-columns: repeat(10, minmax(120px, 190px)); justify-content: center; gap: 12px; width: 100%; }
.reel > div > :nth-child(n + 11) { display: none; }
.reel img { width: 100%; height: 250px; object-fit: cover; object-position: center 22%; border-radius: 18px; outline: 1px solid rgba(255, 255, 255, .1); outline-offset: -1px; filter: grayscale(.25) brightness(.9); transition: filter 300ms var(--ease-out), transform 300ms var(--ease-out); }
.reel img:nth-child(even) { margin-top: 28px; }
.reel img:hover { filter: none; transform: translateY(-4px); }
@media (max-width: 760px) { .reel > div { grid-template-columns: repeat(5, 120px); } .reel > div > :nth-child(n + 6) { display: none; } .reel img { height: 160px; border-radius: 14px; } .reel img:nth-child(even) { margin-top: 18px; } }
/* courses swipe on phones */
@media (max-width: 520px) { .looks { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; scrollbar-width: none; } .looks::-webkit-scrollbar { display: none; } .looks li { scroll-snap-align: start; } }
/* why us: big numbers on hairlines instead of three boxes */
.why { gap: 0; border-top: 1px solid var(--line); }
.why > div { background: none; border: 0; border-radius: 0; padding: 28px 24px 8px 0; }
.why > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.why .n { font-size: clamp(48px, 6vw, 80px); font-weight: 700; letter-spacing: -.05em; color: var(--ink); margin-bottom: 18px; }
@media (max-width: 760px) { .why > div, .why > div + div { border-left: 0; padding: 24px 0; border-bottom: 1px solid var(--line); } }
/* ---------- footer: landing-page card, contact block, credits, powered-by ---------- */
.foot { padding: clamp(72px, 9vw, 120px) 0 24px; }
.foot-card { display: grid; gap: 32px; padding: clamp(24px, 4vw, 48px); border-radius: 28px; background: var(--raise); border: 1px solid #1F1F1F; }
@media (min-width: 760px) { .foot-card { grid-template-columns: 1.3fr 1fr; align-items: end; } }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.foot-brand img { width: min(100%, 340px); filter: invert(1); }
.foot-brand p { margin: 0; color: var(--ink-2); font-size: 17px; }
.foot-brand .founder { font-size: 15px; color: var(--ink-3); } .founder a { color: var(--ink); text-underline-offset: 3px; }
.foot-contact { display: flex; flex-direction: column; }
.foot-contact h3 { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.foot-contact a { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; transition: padding 240ms var(--ease-out), color 160ms; }
.foot-contact a:hover { padding-left: 6px; }
.foot-contact a span { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #222; color: var(--ink-2); }
.foot-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 24px 4px 0; font-size: 13px; color: var(--ink-3); }
.foot-bar summary { padding: 0; font-size: 13px; font-weight: 500; display: inline; }
.foot-bar details { border: 0; } .foot-bar details p { padding: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.foot-bar a { text-decoration: none; } .foot-bar a:hover { color: var(--ink); }
.powered { text-align: center; font-size: 12px; color: var(--ink-3); margin: 24px 0 0; letter-spacing: .04em; }
.shine { font-weight: 700; text-decoration: none; color: var(--ink-2); }
@media (prefers-reduced-transparency: reduce) {
.nav.scrolled { background: #141414; backdrop-filter: none; -webkit-backdrop-filter: none; }
.proof { background: #141414; backdrop-filter: none; }
}
@media (prefers-contrast: more) { .nav.scrolled { background: #0A0A0A; border-color: #fff; } }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; }
.card, h1 .w, .pitch > *, .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
.looks li img, .cta img, .collage { transform: none !important; }
.shine { color: var(--ink); background: none; }
html { scroll-behavior: auto; }
}
</style> </style>
</head> </head>
<body> <body>
<div class="wrap"> <header class="nav">
<header class="nav"> <a class="brand" href="#top" aria-label="Sirkul Makeup School home"><img src="/brand/sirkul-logo.png" alt="" /></a>
<a class="brand" href="#top" aria-label="MakeUp Academy home"> <nav class="links" aria-label="Sections">
<svg width="34" height="34" viewBox="0 0 34 34" aria-hidden="true"><rect width="34" height="34" rx="10" fill="#1D3557"/><path d="M7 22c3.5-6 7-6 10 0s6.5 6 10 0" fill="none" stroke="#A8DADC" stroke-width="3" stroke-linecap="round"/><circle cx="23.5" cy="11" r="3.5" fill="#E63946"/></svg> <a href="#courses">Courses</a>
MakeUp Academy <a href="#why">Why us</a>
</a> <a href="#faq">FAQ</a>
<nav class="pills" aria-label="Sections">
<a class="pill" href="#courses">Courses</a>
<a class="pill" href="#why">Why us</a>
<a class="pill" href="#faq">FAQ</a>
</nav> </nav>
<a class="pill dark" href="#join" data-focus>Join the waitlist</a> <a class="ghost" href="#join" data-focus>Join waitlist</a>
</header> </header>
<main id="top"> <main>
<section class="hero"> <section class="hero" id="top">
<span class="eyebrow rise"><i></i>Opening soon · 4 languages</span> <div class="collage" aria-hidden="true">
<h1 class="rise">Your <em>signature look</em> starts here.</h1> <figure class="card c1" style="margin:0"><img src="/photos/habesha-bride.jpg" alt="" /></figure>
<p class="am rise" lang="am">በቅርቡ ይከፈታል</p> <figure class="card c2" style="margin:0"><img src="/photos/habesha-harari.jpg" alt="" /></figure>
<p class="lead rise">Video makeup courses from working Ethiopian artists, in Amharic, Afaan Oromoo, Tigrinya and English. Join the list and we'll tell you the day classes open.</p> <figure class="card c3 wide" style="margin:0"><img src="/photos/habesha-trad.jpg" alt="" /></figure>
<figure class="card c4" style="margin:0"><img src="/photos/habesha-eritrean.jpg" alt="" /></figure>
<figure class="card c5" style="margin:0"><img src="/photos/hero.jpg" alt="" /></figure>
<figure class="card c6" style="margin:0"><img src="/photos/habesha-tigray.jpg" alt="" /></figure>
</div>
<!-- Hero object: eyeshadow palette, lipstick and brush (stands in for a product photo) --> <div class="pitch">
<svg class="art rise" viewBox="0 0 560 330" role="img" aria-label="An open eyeshadow palette with a lipstick and a makeup brush"> <span class="proof">
<defs> <span class="faces" id="faces" aria-hidden="true"><img src="/photos/habesha-tigray.jpg" alt="" class="on" /><img src="/photos/habesha-harari.jpg" alt="" /><img src="/photos/habesha-bride.jpg" alt="" /><img src="/photos/hero.jpg" alt="" /></span>
<radialGradient id="shine" cx="35%" cy="30%" r="70%"><stop offset="0" stop-color="#fff" stop-opacity=".6"/><stop offset=".5" stop-color="#fff" stop-opacity="0"/></radialGradient> <span class="live" aria-hidden="true"></span>
<linearGradient id="gold" x1="0" x2="1"><stop offset="0" stop-color="#D9A88F"/><stop offset=".5" stop-color="#F6DCCB"/><stop offset="1" stop-color="#C98B6B"/></linearGradient> <span id="waiting" aria-live="polite">Be one of the first on the list</span>
<filter id="soft" x="-20%" y="-20%" width="140%" height="160%"><feDropShadow dx="0" dy="18" stdDeviation="16" flood-color="#8E4B45" flood-opacity=".18"/></filter> </span>
</defs> <h1><span class="w" style="--i:0">Your</span> <em><span class="w" style="--i:1">signature</span> <span class="w" style="--i:2">look</span></em> <span class="w" style="--i:3">starts</span> <span class="w" style="--i:4">here.</span></h1>
<ellipse cx="280" cy="300" rx="230" ry="16" fill="#8E4B45" opacity=".08"/> <p class="lead">Video makeup courses from working Ethiopian artists. Join the waitlist and we'll tell you the day classes open.</p>
<!-- brush -->
<g transform="rotate(-24 120 200)" filter="url(#soft)">
<rect x="30" y="196" width="100" height="16" rx="8" fill="#1D3557"/>
<rect x="126" y="192" width="40" height="24" rx="4" fill="url(#gold)"/>
<path d="M164 190 C 210 172, 240 186, 250 204 C 240 222, 210 236, 164 218 Z" fill="#F5AFB5"/>
<path d="M200 186 C 226 184, 244 194, 250 204 C 244 214, 226 224, 200 222 Z" fill="#E9B8A7"/>
</g>
<!-- palette -->
<g transform="rotate(-5 280 180)" filter="url(#soft)">
<rect x="115" y="80" width="330" height="182" rx="26" fill="#1D3557"/>
<g id="pans"></g>
</g>
<!-- lipstick -->
<g transform="rotate(10 470 180)" filter="url(#soft)">
<rect x="448" y="168" width="48" height="112" rx="8" fill="#1D3557"/>
<rect x="448" y="144" width="48" height="28" rx="3" fill="url(#gold)"/>
<path d="M455 146 L455 82 Q455 62 472 52 L490 40 L490 146 Z" fill="#E63946"/>
<path d="M478 50 L490 40 L490 146 L482 146 Z" fill="#CB1928"/>
</g>
</svg>
<div class="join rise" id="join"> <div class="join" id="join">
<form id="form" novalidate> <form id="form" novalidate>
<div class="fields"> <label class="sr-only" aria-hidden="true">Company<input id="company" name="company" tabindex="-1" autocomplete="off" /></label>
<label class="full">Full name<input id="name" name="name" autocomplete="name" placeholder="Selam Tesfaye" required maxlength="80" /></label> <div class="seg" id="channelSeg" data-channel="sms" role="radiogroup" aria-label="How should we reach you?">
<label>Email<input id="email" name="email" type="email" autocomplete="email" placeholder="you@example.com" required maxlength="120" /></label> <button type="button" role="radio" aria-selected="true" aria-checked="true" data-ch="sms"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="6" y="2" width="12" height="20" rx="3"/><path d="M11 18h2"/></svg>SMS</button>
<label>Phone<input id="phone" name="phone" type="tel" autocomplete="tel" inputmode="tel" placeholder="+251 9XX XXX XXX" required maxlength="20" /></label> <button type="button" role="radio" aria-selected="false" aria-checked="false" data-ch="email"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18v12H3zM3 7l9 6 9-6"/></svg>Email</button>
<button class="btn red full" id="submit">Get notified </div>
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg> <div class="more" id="more" hidden>
</button> <label class="sr-only" for="name">Full name</label>
<input id="name" name="name" autocomplete="name" placeholder="Full name" required maxlength="80" />
</div>
<div class="bar">
<div class="tel" id="telWrap">
<label class="cc"><span class="sr-only">Country code</span><span class="flag" id="ccFlag" aria-hidden="true"></span><span id="ccDial" aria-hidden="true"></span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg><select id="cc" autocomplete="tel-country-code"></select></label>
<label class="sr-only" for="phone">Phone number</label>
<input id="phone" name="phone" type="tel" autocomplete="tel-national" inputmode="tel" placeholder="911 234 567" maxlength="20" />
</div>
<label class="sr-only" for="email">Email</label>
<input id="email" name="email" type="email" autocomplete="email" placeholder="Enter your email" maxlength="120" hidden />
<button class="btn" id="submit">Join waitlist</button>
</div> </div>
<p class="err" id="err" role="alert"></p> <p class="err" id="err" role="alert"></p>
<p class="fine">One message when we open. We never share your details.</p> <p class="fine" id="fine">One message when we open. We never share your details.</p>
</form> </form>
</div> </div>
</div>
</section> </section>
<section class="section center" id="courses"> <div class="reel" aria-hidden="true"><div><img src="/photos/habesha-tigray.jpg" alt="" loading="lazy" /><img src="/photos/hero.jpg" alt="" loading="lazy" /><img src="/photos/habesha-harari.jpg" alt="" loading="lazy" /><img src="/photos/habesha-eritrean.jpg" alt="" loading="lazy" /><img src="/photos/habesha-bride.jpg" alt="" loading="lazy" /><img src="/photos/habesha-trad.jpg" alt="" loading="lazy" /><img src="/photos/bridal.jpg" alt="" loading="lazy" /><img src="/photos/glam.jpg" alt="" loading="lazy" /><img src="/photos/foundations.jpg" alt="" loading="lazy" /><img src="/photos/clients.jpg" alt="" loading="lazy" /><img src="/photos/habesha-tigray.jpg" alt="" loading="lazy" /><img src="/photos/hero.jpg" alt="" loading="lazy" /><img src="/photos/habesha-harari.jpg" alt="" loading="lazy" /><img src="/photos/habesha-eritrean.jpg" alt="" loading="lazy" /><img src="/photos/habesha-bride.jpg" alt="" loading="lazy" /><img src="/photos/habesha-trad.jpg" alt="" loading="lazy" /><img src="/photos/bridal.jpg" alt="" loading="lazy" /><img src="/photos/glam.jpg" alt="" loading="lazy" /><img src="/photos/foundations.jpg" alt="" loading="lazy" /><img src="/photos/clients.jpg" alt="" loading="lazy" /></div></div>
<h2>Courses at <em>launch</em></h2>
<div class="wrap">
<section class="block" id="courses">
<p class="kicker reveal">At launch</p>
<h2 class="reveal">Four courses, <em>one craft</em></h2>
<p class="sub">Start with the basics, or go straight to the looks clients book you for.</p> <p class="sub">Start with the basics, or go straight to the looks clients book you for.</p>
<ul class="shades"> <ul class="looks">
<li class="shade"><i class="dot" style="background:#E9B8A7"></i><strong>Makeup foundations</strong><span>Skin tone, base and color</span></li> <li class="reveal"><img src="/photos/hero.jpg" alt="" loading="lazy" /><div><strong>Makeup foundations</strong><span>Skin tone, base and color</span></div></li>
<li class="shade"><i class="dot" style="background:#E63946"></i><strong>Bridal &amp; events</strong><span>Looks that last a 14-hour day</span></li> <li class="reveal"><img src="/photos/habesha-harari.jpg" alt="" loading="lazy" /><div><strong>Bridal &amp; events</strong><span>Looks that last a 14-hour day</span></div></li>
<li class="shade"><i class="dot" style="background:#A8DADC"></i><strong>Skin prep &amp; care</strong><span>The canvas before the color</span></li> <li class="reveal"><img src="/photos/habesha-eritrean.jpg" alt="" loading="lazy" /><div><strong>Skin prep &amp; care</strong><span>The canvas before the color</span></div></li>
<li class="shade"><i class="dot" style="background:#8E4B45"></i><strong>Building your clientele</strong><span>Pricing, kit and bookings</span></li> <li class="reveal"><img src="/photos/habesha-trad.jpg" alt="" loading="lazy" /><div><strong>Building your clientele</strong><span>Pricing, kit and bookings</span></div></li>
</ul> </ul>
</section> </section>
<section class="section" id="why"> <section class="block" id="why">
<div class="center"><h2>Learn the craft, <em>your way</em></h2></div> <p class="kicker reveal">Why us</p>
<div class="why"> <h2 class="reveal">Learn the craft, <em>your way</em></h2>
<div><span class="ic"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/></svg></span><h3>In your language</h3><p>Every lesson in Amharic, Afaan Oromoo, Tigrinya or English.</p></div> <div class="why reveal">
<div><span class="ic"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><rect x="3" y="6" width="18" height="13" rx="2"/><path d="M3 10h18M7 15h4"/></svg></span><h3>Pay once, keep it</h3><p>One payment per course with Telebirr or CBE Birr. Yours for life.</p></div> <div><span class="n">01</span><h3>Waitlist goes first</h3><p>Everyone on the list gets in on opening day, before we announce it anywhere else.</p></div>
<div><span class="ic"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><rect x="7" y="2" width="10" height="20" rx="2"/><path d="M11 18h2"/></svg></span><h3>Made for your phone</h3><p>Short video lessons that work on a mobile data plan.</p></div> <div><span class="n">02</span><h3>Pay once, keep it</h3><p>One payment per course with Telebirr or CBE Birr. Yours for life.</p></div>
<div><span class="n">03</span><h3>Made for your phone</h3><p>Short video lessons that work on a mobile data plan.</p></div>
</div> </div>
</section> </section>
<section class="section faq" id="faq"> <section class="block faq" id="faq">
<h2><em>Frequently</em> asked questions</h2> <div><p class="kicker">FAQ</p><h2><em>Good</em> questions</h2></div>
<div>
<details><summary>When will classes open?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>We're finishing the first courses now. Everyone on the waitlist hears first, by SMS or email, on opening day.</p></details> <details><summary>When will classes open?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>We're finishing the first courses now. Everyone on the waitlist hears first, by SMS or email, on opening day.</p></details>
<details><summary>How much will courses cost?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>Each course has one price in birr, shown before you pay. You pay once and keep the course for life. Some lessons are free to preview.</p></details>
<details><summary>How do I pay?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>Telebirr or CBE Birr in Ethiopia. International cards are coming for students abroad.</p></details> <details><summary>How do I pay?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>Telebirr or CBE Birr in Ethiopia. International cards are coming for students abroad.</p></details>
<details><summary>What will you do with my details?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>Only tell you when we open. We don't sell or share them, and you can ask us to delete them at any time.</p></details> <details><summary>What will you do with my details?<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></summary><p>Only tell you when we open. We don't sell or share them, and you can ask us to delete them at any time.</p></details>
</div>
</section> </section>
<section class="cta"> <section class="cta reveal">
<img src="/photos/habesha-bride.jpg" alt="" loading="lazy" />
<div>
<h2>Be first in <em>the chair</em>.</h2> <h2>Be first in <em>the chair</em>.</h2>
<a class="btn red" href="#join" data-focus>Join the waitlist</a> <a class="btn" href="#join" data-focus>Join the waitlist</a>
</div>
</section> </section>
</main>
</div>
<footer>
<div class="wrap foot"><span>© <span id="year"></span> MakeUp Academy</span><a href="#top">Back to top ↑</a></div>
<p class="word" aria-hidden="true">MakeUp Academy</p>
</footer>
<footer class="foot">
<div class="foot-card reveal">
<div class="foot-brand">
<img src="/brand/sirkul-logo.png" alt="Sirkul Makeup School/Studio" />
<p>Learn the craft. Keep it for life.</p>
<p class="founder">Founded by <a href="https://www.tiktok.com/@rezinabrhane" target="_blank" rel="noopener">Rezina Brhane</a></p>
<a class="btn" href="#join" data-focus>Join the waitlist</a>
</div>
<!-- Contact details mirror the app's settings (packages/db/seed/demo-seed.mjs → settings/app). -->
<div class="foot-contact">
<h3>Contact us</h3>
<a href="https://t.me/sirkulmakeup_demo" target="_blank" rel="noopener"><span><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4z"/></svg></span>Message us on Telegram</a>
<a href="tel:+251911234567"><span><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z"/></svg></span>+251 911 234 567</a>
<a href="https://www.tiktok.com/@rezinabrhane" target="_blank" rel="noopener"><span><svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M16.6 5.8A4.3 4.3 0 0 1 15.5 3h-3.1v12.4a2.6 2.6 0 1 1-2.6-2.6c.3 0 .5 0 .8.1V9.7a5.7 5.7 0 1 0 4.9 5.7V9.1a7.3 7.3 0 0 0 4.3 1.4V7.4a4.3 4.3 0 0 1-3.2-1.6z"/></svg></span>@rezinabrhane on TikTok</a>
<a href="mailto:support@sirkul-makeup.example"><span><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18v12H3zM3 7l9 6 9-6"/></svg></span>support@sirkul-makeup.example</a>
</div>
</div>
<div class="foot-bar">
<span>© <span id="year"></span> Sirkul Makeup School/Studio · All rights reserved</span>
<details><summary>Photo credits</summary><p><a href="https://commons.wikimedia.org/wiki/File:Tigray_Bride_(48108302903).jpg" rel="noopener">Rod Waddington</a> (CC BY-SA 2.0), <a href="https://commons.wikimedia.org/wiki/File:Femme_harari_v%C3%AAtue_de_la_tenue_traditionnelle,_orn%C3%A9e_de_bijoux_en_or..jpg" rel="noopener">Imagesdumonde</a> (CC BY-SA 4.0), <a href="https://commons.wikimedia.org/wiki/File:Eritrean_woman.jpg" rel="noopener">T.Voekler</a> (CC BY-SA 3.0), <a href="https://www.pexels.com/" rel="noopener">Pexels</a></p></details>
</div>
<p class="powered">Powered by <a class="shine" href="https://yaltopia.com" target="_blank" rel="noopener">Yaltopia Tech</a></p>
</footer>
</div>
</main>
<script> <script>
// ponytail: no waitlist backend yet. Set ENDPOINT to a URL that accepts a JSON POST // Google Apps Script web app URL (…/exec) from tools/waitlist-apps-script.gs. Each signup becomes a row in the sheet.
// ({ name, email, phone, locale, createdAt }) before sharing this page publicly. // While it's empty, signups are kept only in this browser's localStorage, so don't share the page until it's set.
// Until then, signups are kept only in this browser's localStorage (demo only).
const ENDPOINT = ''; const ENDPOINT = '';
const pans = ['#F3D5C4', '#E9B8A7', '#C98B6B', '#8E4B45', '#FAD7DA', '#F5AFB5', '#E63946', '#A8DADC'];
document.getElementById('pans').innerHTML = pans.map((c, i) => {
const x = 137 + (i % 4) * 74, y = 102 + Math.floor(i / 4) * 74;
return `<rect x="${x}" y="${y}" width="64" height="64" rx="10" fill="#142844"/><circle cx="${x + 32}" cy="${y + 32}" r="26" fill="${c}"/><circle cx="${x + 32}" cy="${y + 32}" r="26" fill="url(#shine)"/>`;
}).join('');
document.getElementById('year').textContent = new Date().getFullYear(); document.getElementById('year').textContent = new Date().getFullYear();
document.querySelectorAll('[data-focus]').forEach((a) => a.addEventListener('click', () => setTimeout(() => document.getElementById('name')?.focus({ preventScroll: true }), 400))); document.querySelectorAll('[data-focus]').forEach((a) => a.addEventListener('click', () => setTimeout(() => document.getElementById(channel === 'sms' ? 'phone' : 'email')?.focus({ preventScroll: true }), 300)));
// The floating material appears only after content starts moving beneath it.
const nav = document.querySelector('.nav');
const updateNav = () => nav.classList.toggle('scrolled', scrollY > 18);
updateNav(); addEventListener('scroll', updateNav, { passive: true });
// Short scroll reveals, plus a subtle user-controlled depth shift in the hero.
const still = matchMedia('(prefers-reduced-motion: reduce)').matches;
const revealEls = document.querySelectorAll('.reveal');
if ('IntersectionObserver' in window && !still) {
document.querySelectorAll('.looks .reveal').forEach((el, k) => el.style.setProperty('--rd', k * 60 + 'ms'));
const io = new IntersectionObserver((es) => es.forEach((e) => { if (e.isIntersecting) { e.target.classList.add('in'); io.unobserve(e.target); } }), { rootMargin: '0px 0px -10% 0px' });
revealEls.forEach((el) => io.observe(el));
const collage = document.querySelector('.collage');
let ticking = false;
addEventListener('scroll', () => { if (ticking) return; ticking = true; requestAnimationFrame(() => { collage.style.setProperty('--py', Math.min(scrollY, 900) * -0.12 + 'px'); ticking = false; }); }, { passive: true });
} else revealEls.forEach((el) => el.classList.add('in'));
const form = document.getElementById('form'), err = document.getElementById('err'), btn = document.getElementById('submit');
const $ = (id) => document.getElementById(id); const $ = (id) => document.getElementById(id);
const form = $('form'), err = $('err'), btn = $('submit'), more = $('more'), channelSeg = $('channelSeg');
// SMS and email share one spatial slot. The outgoing field softens away and the
// incoming field materializes from the same position, so the choice stays mapped.
let channel = 'sms';
let switching = false;
async function morphContact(nextChannel) {
if (nextChannel === channel || switching) return;
switching = true;
const outgoing = $(channel === 'sms' ? 'telWrap' : 'email');
const incoming = $(nextChannel === 'sms' ? 'telWrap' : 'email');
channel = nextChannel; channelSeg.dataset.channel = channel;
if (!still) await outgoing.animate([
{ opacity: 1, transform: 'scale(1)', filter: 'blur(0)' },
{ opacity: 0, transform: 'scale(.97)', filter: 'blur(4px)' },
], { duration: 130, easing: 'cubic-bezier(.4,0,1,1)', fill: 'forwards' }).finished.catch(() => {});
outgoing.hidden = true; incoming.hidden = false;
if (!still) await incoming.animate([
{ opacity: 0, transform: 'scale(.97)', filter: 'blur(4px)' },
{ opacity: 1, transform: 'scale(1)', filter: 'blur(0)' },
], { duration: 240, easing: 'cubic-bezier(.2,.8,.2,1)' }).finished.catch(() => {});
incoming.getAnimations().forEach((a) => a.cancel());
$(channel === 'sms' ? 'phone' : 'email').focus(); switching = false;
}
document.querySelectorAll('.seg button').forEach((b) => b.addEventListener('click', async () => {
const next = b.dataset.ch;
if (switching || next === channel) return;
document.querySelectorAll('.seg button').forEach((x) => { const on = x === b; x.setAttribute('aria-selected', on); x.setAttribute('aria-checked', on); });
err.textContent = ''; ['phone', 'email'].forEach((k) => $(k).removeAttribute('aria-invalid'));
await morphContact(next);
}));
const digits = (p) => p.replace(/[\s()-]/g, ''); const digits = (p) => p.replace(/[\s()-]/g, '');
// Ethiopian numbers may be typed as 09…, 9…, or +2519…; anything else must be international (+ and 8–15 digits). const emailOk = (e) => /^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(e);
// Country picker: ISO code + dial code. Names come from Intl.DisplayNames, flags from the regional-indicator letters.
const DIAL = 'AF93 AL355 DZ213 AS1 AD376 AO244 AI1 AG1 AR54 AM374 AW297 AU61 AT43 AZ994 BS1 BH973 BD880 BB1 BY375 BE32 BZ501 BJ229 BM1 BT975 BO591 BA387 BW267 BR55 BN673 BG359 BF226 BI257 KH855 CM237 CA1 CV238 KY1 CF236 TD235 CL56 CN86 CO57 KM269 CG242 CD243 CR506 CI225 HR385 CU53 CY357 CZ420 DK45 DJ253 DM1 DO1 EC593 EG20 SV503 GQ240 ER291 EE372 SZ268 ET251 FJ679 FI358 FR33 GA241 GM220 GE995 DE49 GH233 GR30 GD1 GU1 GT502 GN224 GW245 GY592 HT509 HN504 HK852 HU36 IS354 IN91 ID62 IR98 IQ964 IE353 IL972 IT39 JM1 JP81 JO962 KZ7 KE254 KI686 XK383 KW965 KG996 LA856 LV371 LB961 LS266 LR231 LY218 LI423 LT370 LU352 MO853 MG261 MW265 MY60 MV960 ML223 MT356 MR222 MU230 MX52 MD373 MC377 MN976 ME382 MA212 MZ258 MM95 NA264 NP977 NL31 NZ64 NI505 NE227 NG234 KP850 MK389 NO47 OM968 PK92 PS970 PA507 PG675 PY595 PE51 PH63 PL48 PT351 PR1 QA974 RO40 RU7 RW250 KN1 LC1 VC1 WS685 SM378 ST239 SA966 SN221 RS381 SC248 SL232 SG65 SK421 SI386 SB677 SO252 ZA27 KR82 SS211 ES34 LK94 SD249 SR597 SE46 CH41 SY963 TW886 TJ992 TZ255 TH66 TL670 TG228 TO676 TT1 TN216 TR90 TM993 UG256 UA380 AE971 GB44 US1 UY598 UZ998 VU678 VE58 VN84 YE967 ZM260 ZW263'
.split(' ').map((x) => [x.slice(0, 2), x.slice(2)]);
const flag = (cc) => String.fromCodePoint(...[...cc].map((c) => 127397 + c.charCodeAt(0)));
let names; try { names = new Intl.DisplayNames([navigator.language || 'en'], { type: 'region' }); } catch { names = { of: (c) => c }; }
const cc = $('cc'), dialOf = Object.fromEntries(DIAL);
[['ET', '251'], ['ER', '291'], ...DIAL.filter(([c]) => c !== 'ET' && c !== 'ER').sort((a, b) => names.of(a[0]).localeCompare(names.of(b[0])))]
.forEach(([c, d]) => cc.add(new Option(`${flag(c)} ${names.of(c)} +${d}`, c)));
const region = (navigator.language || '').split('-')[1]?.toUpperCase();
cc.value = dialOf[region] ? region : 'ET';
function showCC() {
$('ccFlag').textContent = flag(cc.value); $('ccDial').textContent = '+' + dialOf[cc.value];
$('phone').placeholder = cc.value === 'ET' ? '911 234 567' : 'Phone number';
}
cc.addEventListener('change', () => { showCC(); $('phone').focus(); });
showCC();
// Returns E.164 or null. A pasted +number wins over the picker; a leading trunk 0 (0911…) is dropped.
function normPhone(p) { function normPhone(p) {
const d = digits(p); const d = digits(p);
if (/^0[79]\d{8}$/.test(d)) return '+251' + d.slice(1);
if (/^[79]\d{8}$/.test(d)) return '+251' + d;
if (/^\+\d{8,15}$/.test(d)) return d; if (/^\+\d{8,15}$/.test(d)) return d;
return null; if (!/^\d+$/.test(d)) return null;
const n = d.replace(/^0/, ''), dial = dialOf[cc.value];
if (cc.value === 'ET') return /^[79]\d{8}$/.test(n) ? '+251' + n : null;
return n.length >= 4 && dial.length + n.length <= 15 ? '+' + dial + n : null;
} }
// The count of people waiting comes from the sheet (doGet). Portraits stay still;
// the page has one controlled entrance rather than several competing loops.
const faces = () => [...$('faces').querySelectorAll('img')];
let waiting = 0;
// ponytail: below 20 signups a number reads as empty, so the pill keeps its "be one of the first" line until then.
const showWaiting = (joined) => {
if (waiting >= 20) $('waiting').textContent = joined ? `You and ${(waiting - 1).toLocaleString()} others are waiting` : `${waiting.toLocaleString()} people are already waiting`;
else if (joined) $('waiting').textContent = "You're on the list";
};
if (ENDPOINT) fetch(ENDPOINT).then((r) => r.json()).then((d) => { waiting = Number(d.count) || 0; showWaiting(false); }).catch(() => {});
const contactError = () => channel === 'sms'
? (normPhone($('phone').value) ? null : ['phone', cc.value === 'ET' ? 'Please enter a phone number, e.g. 911 234 567.' : 'Please check the phone number for the country you picked.'])
: (emailOk($('email').value.trim()) ? null : ['email', 'Please enter a valid email.']);
function check() { function check() {
const name = $('name').value.trim(), email = $('email').value.trim(), phone = normPhone($('phone').value); const name = $('name').value.trim();
const bad = []; const bad = [];
if (name.length < 2) bad.push(['name', 'Please enter your name.']); if (name.length < 2) bad.push(['name', 'Please enter your name.']);
if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email)) bad.push(['email', 'Please enter a valid email.']); const c = contactError(); if (c) bad.push(c);
if (!phone) bad.push(['phone', 'Please enter a phone number, e.g. 0911 234 567 or +1 202 555 0100.']);
['name', 'email', 'phone'].forEach((k) => $(k).setAttribute('aria-invalid', String(bad.some(([b]) => b === k)))); ['name', 'email', 'phone'].forEach((k) => $(k).setAttribute('aria-invalid', String(bad.some(([b]) => b === k))));
return bad.length ? { error: bad[0] } : { data: { name, email: email.toLowerCase(), phone, locale: navigator.language || 'en', createdAt: new Date().toISOString() } }; const email = channel === 'email' ? $('email').value.trim().toLowerCase() : '', phone = channel === 'sms' ? normPhone($('phone').value) : '';
return bad.length ? { error: bad[0] } : { data: { name, email, phone, channel, locale: navigator.language || 'en', createdAt: new Date().toISOString() } };
} }
form.addEventListener('input', (e) => { if (e.target.getAttribute('aria-invalid') === 'true') check(); }); form.addEventListener('input', (e) => { if (e.target.getAttribute('aria-invalid') === 'true') { if (more.hidden) { const c = contactError(); e.target.setAttribute('aria-invalid', String(!!c && c[0] === e.target.id)); } else check(); } });
async function revealNameStep() {
more.hidden = false; btn.textContent = 'Get notified';
$('fine').textContent = 'Last step: what should we call you?';
if (!still) await Promise.all([
more.animate([
{ opacity: 0, transform: 'translateY(-8px) scale(.98)', filter: 'blur(4px)' },
{ opacity: 1, transform: 'none', filter: 'blur(0)' },
], { duration: 260, easing: 'cubic-bezier(.2,.8,.2,1)' }).finished.catch(() => {}),
btn.animate([{ transform: 'scale(.96)' }, { transform: 'scale(1)' }], { duration: 220, easing: 'cubic-bezier(.2,.8,.2,1)' }).finished.catch(() => {}),
]);
$('name').focus();
}
async function morphToSuccess(first) {
const join = $('join'), startHeight = join.getBoundingClientRect().height;
if (!still) await form.animate([
{ opacity: 1, transform: 'scale(1)', filter: 'blur(0)' },
{ opacity: 0, transform: 'scale(.97)', filter: 'blur(4px)' },
], { duration: 160, easing: 'cubic-bezier(.4,0,1,1)', fill: 'forwards' }).finished.catch(() => {});
join.innerHTML = `<div class="done" role="status"><div class="tick"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7"/></svg></div><div><h3>You're on the list, ${first.replace(/[<>&"]/g, '')}.</h3><p>We'll ${channel === 'sms' ? 'text' : 'email'} you the day classes open.</p></div></div>`;
const done = join.querySelector('.done'), endHeight = join.scrollHeight;
if (still) return;
join.style.height = startHeight + 'px'; join.style.overflow = 'hidden';
await Promise.all([
join.animate([{ height: startHeight + 'px' }, { height: endHeight + 'px' }], { duration: 320, easing: 'cubic-bezier(.2,.8,.2,1)' }).finished.catch(() => {}),
done.animate([
{ opacity: 0, transform: 'scale(.94)', filter: 'blur(4px)' },
{ opacity: 1, transform: 'scale(1)', filter: 'blur(0)' },
], { duration: 320, easing: 'cubic-bezier(.2,.8,.2,1)' }).finished.catch(() => {}),
]);
join.style.height = ''; join.style.overflow = '';
}
form.addEventListener('submit', async (e) => { form.addEventListener('submit', async (e) => {
e.preventDefault(); err.textContent = ''; e.preventDefault(); err.textContent = '';
// Step 1 asks only for the phone or email; step 2 adds the name.
if (more.hidden) {
const c = contactError();
['phone', 'email'].forEach((k) => $(k).setAttribute('aria-invalid', String(!!c && c[0] === k)));
if (c) { err.textContent = c[1]; $(c[0]).focus(); return; }
await revealNameStep(); return;
}
const r = check(); const r = check();
if (r.error) { err.textContent = r.error[1]; $(r.error[0]).focus(); return; } if (r.error) { err.textContent = r.error[1]; $(r.error[0]).focus(); return; }
btn.disabled = true; btn.disabled = true; btn.textContent = 'Joining…';
try { try {
if (ENDPOINT) { if (ENDPOINT) {
const res = await fetch(ENDPOINT, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(r.data) }); // text/plain keeps this a "simple" request: Apps Script can't answer a CORS preflight.
if (!res.ok) throw new Error(res.status); const res = await fetch(ENDPOINT, { method: 'POST', headers: { 'Content-Type': 'text/plain;charset=utf-8' }, body: JSON.stringify({ ...r.data, page: location.href, company: $('company').value }) });
const out = await res.json().catch(() => ({}));
if (!res.ok || !out.ok) throw new Error(out.error || res.status);
} else { } else {
let list = []; try { list = JSON.parse(localStorage.getItem('waitlist') || '[]'); } catch {} let list = []; try { list = JSON.parse(localStorage.getItem('waitlist') || '[]'); } catch {}
if (!list.some((x) => x.email === r.data.email)) list.push(r.data); if (!list.some((x) => (r.data.email && x.email === r.data.email) || (r.data.phone && x.phone === r.data.phone))) list.push(r.data);
try { localStorage.setItem('waitlist', JSON.stringify(list)); } catch {} try { localStorage.setItem('waitlist', JSON.stringify(list)); } catch {}
console.warn('Waitlist ENDPOINT not set: signup saved in this browser only.', r.data); console.warn('Waitlist ENDPOINT not set: signup saved in this browser only.', r.data);
} }
const first = r.data.name.split(' ')[0]; const first = r.data.name.split(' ')[0];
form.parentElement.innerHTML = `<div class="done" role="status"><div class="tick"><svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7"/></svg></div><h3>You're on the list, ${first.replace(/[<>&"]/g, '')}.</h3><p>We'll message you the day classes open.</p></div>`; // The new signup's initial joins the faces in the pill.
const me = document.createElement('b'); me.textContent = first[0].toUpperCase(); $('faces').prepend(me);
waiting += 1; showWaiting(true);
btn.textContent = '✓';
if (!still) await btn.animate([{ transform: 'scale(.96)' }, { transform: 'scale(1.04)' }, { transform: 'scale(1)' }], { duration: 260, easing: 'cubic-bezier(.2,.8,.2,1)' }).finished.catch(() => {});
await morphToSuccess(first);
} catch { } catch {
err.textContent = "Something went wrong. Please try again in a moment."; err.textContent = "Something went wrong. Please try again in a moment.";
btn.disabled = false; btn.disabled = false; btn.textContent = 'Get notified';
} }
}); });
</script> </script>

BIN
design/Sirkul Logo .PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -46,25 +46,25 @@ No page scrolled sideways and no route threw an error, at either width.
| `transition: box-shadow .2s, transform .2s` (default `ease`) | `var(--ease-out)` = `cubic-bezier(0.23, 1, 0.32, 1)` | The built-in easings are too weak | | `transition: box-shadow .2s, transform .2s` (default `ease`) | `var(--ease-out)` = `cubic-bezier(0.23, 1, 0.32, 1)` | The built-in easings are too weak |
| "My courses" row on a phone (M5), progress header (M8), help call button (M6) | The button gets its own line, or the row wraps before the text squeezes | Text never has to fight a button for width | | "My courses" row on a phone (M5), progress header (M8), help call button (M6) | The button gets its own line, or the row wraps before the text squeezes | Text never has to fight a button for width |
### Phase 2: Medium (next; needs a decision, see §3) ### Phase 2: Medium (fixed; decisions in §3)
| Before | After | Why | | Before | After | Why |
| --- | --- | --- | | --- | --- | --- |
| A full marketing footer on every route (M9) | A compact footer (one line: support, language, ©) on app routes. Keep the big one on the landing page | The footer is three times taller than the content on short pages | | A full marketing footer on every route (M9) | A compact footer (one line: support, language, ©) on app routes. Keep the big one on the landing page | The footer is three times taller than the content on short pages |
| A spinner that never stops in the player when there's no video (M10) | A still "Video coming soon" poster with the lesson title. The spinner only shows while a real source loads | A spinner promises progress that will never come | | ~~A spinner that never stops in the player (M10)~~ | **No change.** The player plays the Vimeo sample video added in `1fccdc0`. The spinner only appeared because the screenshot tool loads the page from `file://`, where Vimeo won't load | False finding from the test setup |
| Hero CTAs with different widths on phones (M11) | Both full width and stacked, or side by side at the same height | Equal weight for equal choices | | Hero CTAs with different widths on phones (M11) | Both full width and stacked, or side by side at the same height | Equal weight for equal choices |
| Catalog chips cut at the edge (M13) | `mask-image` fade on the scrolling edge | Shows that the row scrolls | | Catalog chips cut at the edge (M13) | `mask-image` fade on the scrolling edge | Shows that the row scrolls |
| `.bar > i { transition: width .6s }`, `.ring .fg { 1s }` | 300 ms with ease-out | Keep UI motion under 300 ms | | `.bar > i { transition: width .6s }`, `.ring .fg { 1s }` | 300 ms with ease-out | Keep UI motion under 300 ms |
### Phase 3: Low (polish) ### Phase 3: Low (fixed except where noted)
| Before | After | Why | | Before | After | Why |
| --- | --- | --- | | --- | --- | --- |
| "2 h 42 min" wraps (M12) | `white-space: nowrap` on stat values, smaller size on phones | Keeps a number and its unit together | | "2 h 42 min" wraps (M12) | `white-space: nowrap` on stat values, smaller size on phones | Keeps a number and its unit together |
| Feedback is an unlabeled icon on phones (M14) | Move it to the account menu, or add a "Feedback" label | Every icon-only control should be obvious | | Feedback is an unlabeled icon on phones (M14) | **Not changed.** Feedback is a demo-only control and goes away at launch | Every icon-only control should be obvious |
| `.foot-box:hover svg { transition: transform .4s ease }` | 250 ms ease-out | Decorative motion should be short | | `.foot-box:hover svg { transition: transform .4s ease }` | 250 ms ease-out | Decorative motion should be short |
| `<details>` menu opens instantly | Leave it as is | It opens many times a session, so no animation (per the frequency rule) | | `<details>` menu opens instantly | Leave it as is | It opens many times a session, so no animation (per the frequency rule) |
| Slashed zero (M15) | Ask the client. `font-feature-settings` can't switch it off in Atkinson Hyperlegible | It's a legibility feature, but it looks like a code font in prices | | Slashed zero (M15) | Numbers (`.num`, prices, stats) now use Plus Jakarta Sans (Q3) | Body text keeps Atkinson Hyperlegible for legibility |
## 3. `grill-me` grading of the manual notes ## 3. `grill-me` grading of the manual notes
@ -74,19 +74,19 @@ No page scrolled sideways and no route threw an error, at either width.
| M2, M3, M4 | **A** | Screenshot evidence, a clear expected state, one-line fixes. Done | | M2, M3, M4 | **A** | Screenshot evidence, a clear expected state, one-line fixes. Done |
| M5, M6, M7, M8 | **B+** | Concrete, but each is one screen's symptom of a single pattern: text and a button fighting for width. Fixed as a pattern, not four times | | M5, M6, M7, M8 | **B+** | Concrete, but each is one screen's symptom of a single pattern: text and a button fighting for width. Fixed as a pattern, not four times |
| M9 | **B** | Real, but "too big" is a taste call until we agree on what the footer is for. This is a decision, not a bug (Q1) | | M9 | **B** | Real, but "too big" is a taste call until we agree on what the footer is for. This is a decision, not a bug (Q1) |
| M10 | **B** | It only happens in the demo, where lessons have no video. Grade it against production, where Vimeo loads (Q2) | | M10 | **D** | Withdrawn. It came from the test setup (Vimeo won't load in a `file://` screenshot), not the product. Next time, check findings that involve outside content in a real browser |
| M11–M14 | **C+** | Accurate, but low impact, and none says who is hurt by it. Fine as polish | | M11–M14 | **C+** | Accurate, but low impact, and none says who is hurt by it. Fine as polish |
| M15 | **C** | A repeat of the 2026-10-06 note with no new evidence. Close it once the client decides (Q3) | | M15 | **C** | A repeat of the 2026-10-06 note with no new evidence. Close it once the client decides (Q3) |
**Gap the notes missed:** none of them covers *dark mode* or *keyboard-only* use. A third role, the signed-in student whose account was deleted, isn't covered either. Next audit should add them. **Gap the notes missed:** none of them covers *dark mode* or *keyboard-only* use. A third role, the signed-in student whose account was deleted, isn't covered either. Next audit should add them.
### Open questions (the decisions are yours) ### Decisions (finalised 2026-10-16: the recommendations were accepted)
❓ **Q1 - Footer on app screens:** keep the big marketing footer everywhere, or use a compact one on signed-in and app routes (player, checkout, my courses, progress, notifications, profile)? ❓ **Q1 - Footer on app screens:** keep the big marketing footer everywhere, or use a compact one on signed-in and app routes (player, checkout, my courses, progress, notifications, profile)?
➡️ Compact on app routes, big footer on the landing page and catalog only. ✅ **Done.** Compact one-line footer on app routes. The big footer stays on the landing page and catalog.
❓ **Q2 - Player with no video:** show a "Video coming soon" poster, or hide lessons that have no video from students? ❓ **Q2 - Player with no video:** show a "Video coming soon" poster, or hide lessons that have no video from students?
➡️ Show the poster in the demo. In production, lessons without a video shouldn't be publishable. ✅ **No change needed.** The demo already plays a sample video (see M10). In production, a lesson without a video shouldn't be publishable; that check belongs in the admin project.
❓ **Q3 - Slashed zero:** keep Atkinson Hyperlegible for numbers, or use Plus Jakarta Sans (already loaded for headings) for prices and times? ❓ **Q3 - Slashed zero:** keep Atkinson Hyperlegible for numbers, or use Plus Jakarta Sans (already loaded for headings) for prices and times?
➡️ Plus Jakarta Sans for `.num`. Body text stays Atkinson for legibility. ✅ **Done.** Plus Jakarta Sans for numbers. Body text stays Atkinson Hyperlegible.

View File

@ -0,0 +1,14 @@
# Backend: enrolled counts per course, and where each student is
**Labels:** backend, analytics
The course cards now show "N students" from `Course.enrolledCount` (optional field in `packages/data/src/index.ts`). In the demo the seed computes it once from the sample students. Students can't read each other's records, so the real number has to come from the backend.
## Needed
- **Enrolled count per course.** Keep `enrolledCount` on each course doc up to date when an enrollment is created or revoked (purchase, admin grant, free). A counter updated in the same write as the enrollment is enough; recount nightly to self-heal.
- **Where each student is.** For admins: per course, how many students are on each chapter/section right now, and per student their current lesson. Derive from `Student.progress` (latest `updatedAt` per course → that lesson's chapter). Expose as an admin view or a nightly aggregate doc per course, e.g. `courseStats/{courseId} = { enrolled, bySection: { [chapterId]: n }, completed }`.
## Done when
- [ ] A purchase shows up in the course's student count without a redeploy
- [ ] Admins can see, per course, how many students are in each section and who is stuck where
- [ ] Remove the seed-time computation in `packages/db/seed/demo-seed.mjs` (marked `ponytail:`)

View File

@ -0,0 +1,21 @@
# Remove placeholder courses and stand-in photos after backend integration
**Labels:** cleanup, after-integration
The demo seed has placeholder content so the catalog, checkout and player can be clicked through before real courses exist. Remove it once the backend serves real courses.
## Remove
- Placeholder courses in `packages/db/seed/demo-seed.mjs` (block marked `PLACEHOLDER`):
- `soft-glam-evening` (crs-softglam)
- `traditional-habesha-looks` (crs-habesha)
- `building-your-clientele` (crs-clientele)
- The rest of the demo catalog, if production data replaces the seed: `makeup-foundations`, `bridal-makeup`, `skin-prep-and-care`, `crs-business` (draft), `payment-test`.
- Stand-in covers: `CAT_PHOTOS` / `coursePhoto()` in `packages/features/src/ui.tsx` fall back to category photos when a course has no `coverAssetId`. Real covers replace these.
- Placeholder student-work photos in the footer reel (`WORK_PHOTOS`, marked `ponytail:` in `student.tsx`).
- Vimeo placeholder playback for lessons without `videoAssetId` (`VIMEO_PLACEHOLDER` in `ui.tsx`).
## Done when
- [ ] Catalog, home, landing stats and featured rows show only real courses
- [ ] No course page shows a category stand-in photo
- [ ] Every lesson plays its uploaded video
- [ ] `node tools/preview/smoke.mjs` passes against the real data

View File

@ -1,18 +1,18 @@
{ {
"color": { "color": {
"ink": "#1B2340", "ink": "#111111",
"inkMuted": "#5B6275", "inkMuted": "#6B6B6B",
"paper": "#FFFFFF", "paper": "#FFFFFF",
"canvas": "#F5F6F8", "canvas": "#F4F4F4",
"mist": "#EEF1F6", "mist": "#F7F7F7",
"line": "#E3E6EC", "line": "#E4E4E4",
"accent": "#F2B705", "accent": "#111111",
"success": "#2E7D5B", "success": "#111111",
"alert": "#C2362B" "alert": "#000000"
}, },
"font": { "font": {
"latin": "'Atkinson Hyperlegible', system-ui, sans-serif", "latin": "'Plus Jakarta Sans', system-ui, sans-serif",
"ethiopicSans": "'Noto Sans Ethiopic', 'Atkinson Hyperlegible', sans-serif", "ethiopicSans": "'Noto Sans Ethiopic', 'Plus Jakarta Sans', sans-serif",
"ethiopicSerif": "'Noto Serif Ethiopic', serif" "ethiopicSerif": "'Noto Serif Ethiopic', serif"
}, },
"fontSize": { "sm": "14px", "base": "16px", "lg": "20px", "xl": "25px", "2xl": "31px", "3xl": "39px" }, "fontSize": { "sm": "14px", "base": "16px", "lg": "20px", "xl": "25px", "2xl": "31px", "3xl": "39px" },

View File

@ -3,8 +3,9 @@
"private": true, "private": true,
"packageManager": "pnpm@9.15.9", "packageManager": "pnpm@9.15.9",
"scripts": { "scripts": {
"demo:build": "pnpm --filter demo build && node tools/artifact-inline.mjs apps/demo/out dist/demo.html && node tools/artifact-check.mjs dist/demo.html", "app:build": "pnpm --filter demo build",
"test": "node packages/features/src/domain.check.ts", "demo:build": "NEXT_PUBLIC_LMS_API= pnpm --filter demo build && node tools/artifact-inline.mjs apps/demo/out dist/demo.html && node tools/artifact-check.mjs dist/demo.html",
"test": "node packages/features/src/domain.check.ts && node packages/data/src/api.check.ts",
"typecheck": "pnpm -r exec tsc --noEmit", "typecheck": "pnpm -r exec tsc --noEmit",
"i18n:check": "node tools/i18n-check.mjs" "i18n:check": "node tools/i18n-check.mjs"
}, },

View File

@ -2,9 +2,11 @@
"name": "@lms/data", "name": "@lms/data",
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"type": "module",
"main": "src/index.ts", "main": "src/index.ts",
"types": "src/index.ts", "types": "src/index.ts",
"devDependencies": { "devDependencies": {
"@types/react": "^19" "@types/react": "^19",
"@types/node": "^22"
} }
} }

View File

@ -0,0 +1,73 @@
// Runnable check for the API → domain mapping: `pnpm test`. The fixtures are real responses from
// https://api.rezina.yaltopia.com (2026-11-02): GET /catalog/courses and GET /catalog/courses/12.
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { absolute, ids, mapIssue, mapNotification, mapOutline, mapStudent, slugify, type RawOutline } from './api.ts';
const BASE = 'https://api.rezina.yaltopia.com';
const fixture = (f: string) => JSON.parse(readFileSync(new URL(f, import.meta.url), 'utf8')).data;
// ids and urls
assert.equal(ids.course(12), 'c12');
assert.equal(ids.num('ch19'), 19);
assert.equal(ids.num('l38'), 38);
assert.equal(slugify('Everyday English', 12), 'everyday-english-12');
assert.equal(slugify('የሜካፕ መሠረታዊ', 5), 'የሜካፕ-መሠረታዊ-5', 'Ge’ez titles keep their letters');
assert.equal(slugify('!!!', 7), '7');
assert.equal(absolute(BASE, '/static/demo/course-cover.svg'), `${BASE}/static/demo/course-cover.svg`);
assert.equal(absolute(BASE + '/', 'static/x.png'), `${BASE}/static/x.png`);
assert.equal(absolute(BASE, 'https://cdn.example/x.png'), 'https://cdn.example/x.png');
assert.equal(absolute(BASE, ''), null);
// catalog list has what the outline calls need
const catalog = fixture('./fixtures-catalog.json');
assert.ok(catalog.courses.length > 0);
for (const c of catalog.courses) assert.ok(Number.isInteger(c.id) && typeof c.name === 'string');
// outline → Course
const outline: RawOutline = fixture('./fixtures-outline-12.json');
const c = mapOutline(outline, BASE);
assert.equal(c.id, 'c12');
assert.equal(c.slug, 'everyday-english-12');
assert.equal(c.translations.en?.title, 'Everyday English');
assert.equal(c.status, 'PUBLISHED');
assert.equal(c.coverAssetId, `${BASE}/static/demo/course-cover.svg`);
assert.deepEqual(c.prices, {}, 'no per-course price on the API');
assert.equal(c.chapters.length, outline.chapters.length);
assert.equal(c.chapters[0].id, 'ch19');
assert.equal(c.chapters[0].translations.en?.title, 'Meet and greet');
assert.equal(c.chapters.flatMap((ch) => ch.lessons).length, outline.lesson_count, 'every lesson in the outline is mapped');
assert.deepEqual(c.chapters[0].lessons.map((l) => l.sortOrder), [1, 2, 3]);
assert.ok(c.chapters[0].lessons.every((l) => l.isPreview), 'a FREE course plays for anyone');
const premium = mapOutline({ ...outline, access_tier: 'PREMIUM', chapters: [{ ...outline.chapters[0], lessons: outline.chapters[0].lessons.map((l, i) => ({ ...l, access_tier: i ? 'PREMIUM' : 'FREE' })) }] }, BASE);
assert.deepEqual(premium.chapters[0].lessons.map((l) => l.isPreview), [true, false, false], 'in a PREMIUM course only FREE lessons preview');
// issues and notifications
const issue = mapIssue({ id: 4, issue_type: 'video', subject: 'Stops', description: 'd', status: 'in_progress', created_at: 'a', updated_at: 'b' });
assert.deepEqual([issue.id, issue.type, issue.status], ['4', 'VIDEO', 'IN_PROGRESS']);
assert.equal(mapIssue({ id: 5, issue_type: 'weird', subject: '', description: '', status: '???', created_at: '', updated_at: '' }).type, 'OTHER');
const n = mapNotification({ id: 'n1', is_read: true, timestamp: 't', type: 'payment_verified', payload: { headline: 'Paid', message: 'Thanks' }, metadata: { link: '/en/my' } });
assert.deepEqual([n.type, n.title, n.body, n.readAt, n.link], ['PAYMENT_VERIFIED', 'Paid', 'Thanks', 't', '/en/my']);
assert.equal(mapNotification({ id: 'n2', is_read: false, timestamp: 't', type: 'x' }).readAt, null);
// profile + progress summary → Student
const now = '2026-11-02T00:00:00.000Z';
const access = (x: Partial<{ is_accessible: boolean; is_completed: boolean }>) => ({ is_accessible: false, is_completed: false, progress_percent: 0, ...x });
const s = mapStudent(
{ id: 9, first_name: 'Meron', last_name: 'T', phone_number: '+251911000000', preferred_language: 'am', status: 'SUSPENDED', region: 'Adama', country: 'ET' },
{ courses: [
{ id: 12, access: access({ is_accessible: true }), chapters: [{ id: 19, lessons: [{ id: 38, access: access({ is_completed: true }) }, { id: 39, access: access({}) }] }] },
{ id: 13, access: access({ is_accessible: false }), chapters: [] },
] },
[{ id: 1, issue_type: 'payment', subject: 's', description: 'd', status: 'open', created_at: 'a', updated_at: 'b' }],
{ l39: { courseId: 'c12', positionSec: 40, maxPositionSec: 60, updatedAt: now } },
now,
);
assert.deepEqual([s.id, s.name, s.locale, s.status, s.city], ['9', 'Meron T', 'am', 'DEACTIVATED', 'Adama']);
assert.deepEqual(Object.keys(s.enrollments), ['c12'], 'accessible courses count as owned');
assert.equal(s.progress.l38?.completedAt, now, 'server completion becomes a completed lesson');
assert.equal(s.progress.l39?.positionSec, 40, 'this session’s resume point survives a refresh');
assert.equal(s.issues['1']?.type, 'PAYMENT');
assert.equal(mapStudent({ id: 1, preferred_language: 'fr' }, null, [], {}, now).locale, 'en', 'unknown language falls back to English');
console.log('api checks: all passed');

382
packages/data/src/api.ts Normal file
View File

@ -0,0 +1,382 @@
// ApiDataSource: the DataSource over the Rezina Go API. Live spec: <base>/swagger/doc.json.
//
// What is wired, and how sure we are of it:
// verified against the live API public catalog + course outline (GET /catalog/courses, /catalog/courses/{id})
// built from the spec, untested sign-in, profile, progress summary, lesson video URLs, video heartbeat,
// notifications, issue reports (all need a signed-in learner)
// not on the API yet per-course prices/purchases, translations, categories, teacher, lesson
// durations, prerequisites; quizzes are left out until their question shape is known
// Screens never see the API's shapes: everything is mapped onto the domain types in ./index.
import type {
Campaign, Category, Course, DataSource, InboxItem, Issue, IssueStatus, IssueType, LessonProgress, Locale, Settings,
Student, Unsub, UserStatus, Viewer, AuditEntry,
} from './index';
// ---------------------------------------------------------------- API shapes (the subset we read)
type Tier = 'FREE' | 'PREMIUM';
export interface RawCourse { id: number; name: string; description: string; thumbnail: string; access_tier: Tier; chapter_count: number; lesson_count: number; quiz_count: number }
export interface RawLesson { id: number; title: string; description: string; thumbnail: string; access_tier: Tier; video_url?: string; sort_order?: number }
export interface RawChapter { id: number; name: string; description: string; lessons: RawLesson[]; quizzes: { id: number; title: string; question_count: number }[] }
export interface RawOutline extends RawCourse { chapters: RawChapter[] }
interface RawAccess { is_accessible: boolean; is_completed: boolean; progress_percent: number }
interface RawSummary { courses: { id: number; access: RawAccess; chapters: { id: number; lessons: { id: number; access: RawAccess }[] }[] }[] }
interface RawProfile { id: number; first_name?: string; last_name?: string; nick_name?: string; email?: string; phone_number?: string; country?: string; region?: string; preferred_language?: string; status?: string; created_at?: string; updated_at?: string; last_login?: string }
interface RawIssue { id: number; issue_type: string; subject: string; description: string; status: string; created_at: string; updated_at: string }
interface RawNotification { id: string; is_read: boolean; timestamp: string; type: string; payload?: { headline?: string; message?: string }; metadata?: Record<string, unknown> }
interface Tokens { access: string; refresh: string; userId: number }
// ---------------------------------------------------------------- ids and mapping (pure: covered by api.check.ts)
/** Domain ids are strings with a kind prefix, so ids from different API tables can't collide in one record. */
export const ids = {
course: (n: number) => `c${n}`, chapter: (n: number) => `ch${n}`, lesson: (n: number) => `l${n}`, quiz: (n: number) => `q${n}`,
num: (id: string) => Number(id.replace(/^[a-z]+/, '')),
};
/** URL slug: readable name plus the API id, so renaming a course never breaks a shared link (the id wins). */
export function slugify(name: string, id: number): string {
const s = name.toLowerCase().normalize('NFKD').replace(/[^\p{L}\p{N}]+/gu, '-').replace(/^-+|-+$/g, '');
return s ? `${s}-${id}` : String(id);
}
export const absolute = (base: string, url: string | null | undefined) =>
!url ? null : /^https?:\/\//.test(url) ? url : base.replace(/\/+$/, '') + (url.startsWith('/') ? url : `/${url}`);
/** Course outline → domain Course. Text is English-only until the API carries translations. */
export function mapOutline(o: RawOutline, base: string): Course {
return {
id: ids.course(o.id), slug: slugify(o.name, o.id), categoryId: '', instructorName: '', instructionLocale: 'en',
coverAssetId: absolute(base, o.thumbnail), status: 'PUBLISHED', isFeatured: false, isTest: false, sequentialLessons: false,
prerequisiteCourseId: null, publishedAt: null, createdAt: '', updatedAt: '',
translations: { en: { title: o.name, description: o.description } },
prices: {}, // the API sells subscription plans, not courses: no per-course price yet
chapters: o.chapters.map((ch, i) => ({
id: ids.chapter(ch.id), sortOrder: i + 1,
translations: { en: { title: ch.name, summary: ch.description || undefined } },
lessons: ch.lessons.map((l, j) => ({
id: ids.lesson(l.id), sortOrder: l.sort_order ?? j + 1,
// a FREE lesson (or a lesson in a FREE course) plays for anyone, like our preview lessons
isPreview: o.access_tier === 'FREE' || l.access_tier === 'FREE', isPublished: true,
durationSec: 0, // not on the API yet
videoAssetId: l.video_url || null, videoStatus: 'READY' as const,
translations: { en: { title: l.title, description: l.description || undefined } },
})),
})),
assessments: [], // chapter quizzes exist on the API; their question shape isn't mapped yet
};
}
const ISSUE_TYPES: IssueType[] = ['BUG', 'PAYMENT', 'VIDEO', 'ACCOUNT', 'CONTENT', 'OTHER'];
const ISSUE_STATUSES: IssueStatus[] = ['OPEN', 'IN_PROGRESS', 'RESOLVED', 'CLOSED'];
const USER_STATUSES: UserStatus[] = ['PENDING', 'ACTIVE', 'DEACTIVATED'];
const LOCALES: Locale[] = ['am', 'en', 'om', 'ti'];
const upper = (s: string | undefined) => (s ?? '').toUpperCase().replace(/[\s-]+/g, '_');
export function mapIssue(i: RawIssue): Issue {
const type = upper(i.issue_type) as IssueType, status = upper(i.status) as IssueStatus;
return {
id: String(i.id), type: ISSUE_TYPES.includes(type) ? type : 'OTHER', subject: i.subject, description: i.description,
status: ISSUE_STATUSES.includes(status) ? status : 'OPEN', createdAt: i.created_at, updatedAt: i.updated_at,
};
}
export function mapNotification(n: RawNotification): InboxItem {
const link = typeof n.metadata?.link === 'string' ? n.metadata.link : null;
return { id: n.id, type: upper(n.type), title: n.payload?.headline ?? '', body: n.payload?.message ?? '', link, readAt: n.is_read ? n.timestamp : null, createdAt: n.timestamp };
}
/** Profile + progress summary + issues → the domain Student the screens read. */
export function mapStudent(p: RawProfile, summary: RawSummary | null, issues: RawIssue[], local: Record<string, LessonProgress>, now: string): Student {
const name = [p.first_name, p.last_name].filter(Boolean).join(' ') || p.nick_name || p.phone_number || p.email || '';
const status = upper(p.status) === 'SUSPENDED' ? 'DEACTIVATED' : (upper(p.status) as UserStatus);
const locale = (p.preferred_language ?? '').slice(0, 2) as Locale;
const enrollments: Student['enrollments'] = {};
const progress: Record<string, LessonProgress> = { ...local };
for (const c of summary?.courses ?? []) {
const courseId = ids.course(c.id);
if (c.access?.is_accessible) enrollments[courseId] = { courseId, source: 'FREE', createdAt: p.created_at ?? now };
for (const ch of c.chapters ?? []) for (const l of ch.lessons ?? []) {
if (!l.access?.is_completed) continue;
const id = ids.lesson(l.id);
const seen = progress[id];
progress[id] = { positionSec: seen?.positionSec ?? 0, maxPositionSec: seen?.maxPositionSec ?? 0, updatedAt: seen?.updatedAt ?? now, courseId, completedAt: seen?.completedAt ?? now };
}
}
return {
id: String(p.id), name, phone: p.phone_number || undefined, email: p.email || undefined, country: p.country ?? '', city: p.region ?? '',
locale: LOCALES.includes(locale) ? locale : 'en', status: USER_STATUSES.includes(status) ? status : 'ACTIVE',
createdAt: p.created_at ?? now, updatedAt: p.updated_at ?? now, lastActiveAt: p.last_login,
enrollments, orders: {}, progress, issues: Object.fromEntries(issues.map((i) => [String(i.id), mapIssue(i)])), assessments: {}, watchSec: {},
};
}
// ---------------------------------------------------------------- HTTP
export class ApiError extends Error {
readonly status: number; readonly code: string;
constructor(status: number, message: string) {
super(message);
this.status = status;
this.code = status === 0 ? 'network' : status === 401 ? 'unauthenticated' : status === 403 ? 'not_granted' : 'api_error';
}
}
const notConnected = (what: string) => Object.assign(new Error(`${what} isn't connected to the API yet.`), { code: 'not_granted' });
const TOKENS_KEY = 'lms.api.tokens';
const REQUEST_TIMEOUT_MS = 12000;
const REQUEST_RETRIES = 2;
const PARALLEL = 3; // the catalog fans out one call per course/chapter; a smaller burst is gentler on the server
/** Like Promise.all over `items`, with at most `limit` calls in flight. */
async function mapLimit<T, R>(items: T[], limit: number, fn: (x: T) => Promise<R>): Promise<R[]> {
const out: R[] = new Array(items.length); let next = 0;
await Promise.all(Array.from({ length: Math.min(limit, items.length) }, async () => {
while (next < items.length) { const i = next++; out[i] = await fn(items[i]); }
}));
return out;
}
const readTokens = (): Tokens | null => { try { return JSON.parse(localStorage.getItem(TOKENS_KEY) ?? 'null'); } catch { return null; } };
const writeTokens = (t: Tokens | null) => { try { t ? localStorage.setItem(TOKENS_KEY, JSON.stringify(t)) : localStorage.removeItem(TOKENS_KEY); } catch { /* storage blocked: session-only */ } };
// ---------------------------------------------------------------- data source
type Contact = { phone?: string; email?: string; password?: string };
export class ApiDataSource implements DataSource {
readonly kind = 'api' as const;
private tokens: Tokens | null = readTokens();
private refreshing: Promise<boolean> | null = null;
private courseCbs = new Set<(c: Course[]) => void>();
private studentCbs = new Map<(s: Student | null) => void, string>();
private inboxCbs = new Set<(i: InboxItem[]) => void>();
/** Positions reported this session; the API only tells us completion, so resume points live here until reload. */
private localProgress: Record<string, LessonProgress> = {};
readonly base: string;
constructor(base: string) { this.base = base; }
// ---- transport
/**
* One API call. Every attempt gives up after REQUEST_TIMEOUT_MS: the server has been seen dropping new connections
* (they hang instead of failing), and a hung sign-in looks like a broken button. Calls that are safe to repeat
* (reads, the account lookup, password login) retry; ones with side effects (sending a code, verifying it) never do,
* so a learner can't get two texts or burn a code.
*/
private async request<T>(method: string, path: string, body?: unknown, auth = true, retry = method === 'GET'): Promise<T> {
const attempt = () => fetch(`${this.base.replace(/\/+$/, '')}/api/v1${path}`, {
method, headers: { 'content-type': 'application/json', ...(auth && this.tokens ? { authorization: `Bearer ${this.tokens.access}` } : {}) },
body: body === undefined ? undefined : JSON.stringify(body),
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
});
const send = async () => {
for (let i = 0; ; i++) {
try { return await attempt(); }
catch { if (!retry || i >= REQUEST_RETRIES) throw new ApiError(0, "Couldn't reach the server."); }
}
};
let res = await send();
if (res.status === 401 && auth && this.tokens && (await this.refresh())) res = await send();
const json = await res.json().catch(() => null);
// Some endpoints answer `success: false` on a 200, so the HTTP status is what counts.
if (!res.ok) throw new ApiError(res.status, json?.message || json?.error || res.statusText);
return (json && 'data' in json ? json.data : json) as T;
}
private refresh(): Promise<boolean> {
if (!this.tokens) return Promise.resolve(false);
this.refreshing ??= fetch(`${this.base.replace(/\/+$/, '')}/api/v1/auth/refresh`, {
method: 'POST', headers: { 'content-type': 'application/json' },
body: JSON.stringify({ access_token: this.tokens.access, refresh_token: this.tokens.refresh }),
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
}).then(async (r) => {
const j = await r.json().catch(() => null);
if (!r.ok || !j?.data?.access_token) { this.setTokens(null); return false; }
this.setTokens({ access: j.data.access_token, refresh: j.data.refresh_token, userId: j.data.user_id });
return true;
}, () => false).finally(() => { this.refreshing = null; });
return this.refreshing;
}
private setTokens(t: Tokens | null) { this.tokens = t; writeTokens(t); }
// ---- auth (the screens reach this through `ds.auth` when it exists; the demo has none)
/**
* Phone: existing learners get a login code (resend-otp → customer-login with otp_code); new ones get a register
* code (sendRegisterCode → verify-otp). Email: password login; an unknown email registers and confirms by code.
* The exact endpoint pairing is our reading of the spec and still needs confirming with the backend.
*/
readonly auth = {
signedIn: () => !!this.tokens,
/** 'code' when the learner must enter a one-time code next; 'done' when they're signed in already. */
start: async (c: Contact): Promise<'code' | 'done'> => {
const who = c.phone ? { phone_number: c.phone } : { email: c.email };
const exists = await this.request<{ email_exist: boolean; phone_number_exist: boolean }>('POST', '/user/checkPhoneEmailExist', who, false, true);
const known = c.phone ? exists.phone_number_exist : exists.email_exist;
if (c.email && known) { await this.login({ email: c.email, password: c.password }); return 'done'; }
if (c.phone && known) { await this.request('POST', '/user/resend-otp', who, false); return 'code'; }
if (c.phone) await this.request('POST', '/user/sendRegisterCode', who, false);
else await this.request('POST', '/user/register', { email: c.email, password: c.password }, false);
return 'code';
},
verify: async (c: Contact, code: string): Promise<void> => {
const who = c.phone ? { phone_number: c.phone } : { email: c.email };
const exists = await this.request<{ email_exist: boolean; phone_number_exist: boolean }>('POST', '/user/checkPhoneEmailExist', who, false, true);
if (c.phone && exists.phone_number_exist) { await this.login({ phone_number: c.phone, otp_code: code }); return; }
const t = await this.request<{ access_token: string; refresh_token: string; user_id: number }>('POST', '/user/verify-otp', { ...who, otp: code }, false);
this.setTokens({ access: t.access_token, refresh: t.refresh_token, userId: t.user_id });
this.refreshAll();
},
signOut: async () => {
const t = this.tokens;
this.setTokens(null);
if (t) await this.request('POST', '/auth/logout', { refresh_token: t.refresh }, false).catch(() => { /* already gone server-side */ });
this.localProgress = {};
this.refreshAll();
},
};
private async login(body: Record<string, unknown>) {
const t = await this.request<{ access_token: string; refresh_token: string; user_id: number }>('POST', '/auth/customer-login', body, false, !body.otp_code); // a code is single-use: no retry
this.setTokens({ access: t.access_token, refresh: t.refresh_token, userId: t.user_id });
this.refreshAll();
}
// ---- reads
async viewer(): Promise<Viewer> {
const none: Viewer = { id: null, name: '', avatarUrl: '', isOwner: false, canEdit: false };
if (!this.tokens) return none;
try {
const p = await this.request<RawProfile>('GET', '/user/user-profile');
return { id: String(p.id), name: [p.first_name, p.last_name].filter(Boolean).join(' '), avatarUrl: '', isOwner: false, canEdit: true };
} catch { return none; }
}
async names() { return {}; }
private async loadCourses(): Promise<Course[]> {
const page = await this.request<{ courses: RawCourse[]; total_count: number }>('GET', '/catalog/courses?limit=100', undefined, false);
const outlines = await mapLimit(page.courses, PARALLEL, (c) => this.request<RawOutline>('GET', `/catalog/courses/${c.id}`, undefined, false).catch(() => null));
const courses = outlines.filter((o): o is RawOutline => !!o).map((o) => mapOutline(o, this.base));
if (this.tokens) await mapLimit(courses.flatMap((c) => c.chapters), PARALLEL, async (ch) => {
// Signed in: lesson video URLs (and sort order) only come from the authenticated lesson list.
const r = await this.request<{ lessons: RawLesson[] }>('GET', `/chapters/${ids.num(ch.id)}/lessons?limit=200`).catch(() => null);
for (const l of r?.lessons ?? []) {
const m = ch.lessons.find((x) => x.id === ids.lesson(l.id));
if (m) { m.videoAssetId = l.video_url || m.videoAssetId; if (l.sort_order != null) m.sortOrder = l.sort_order; }
}
});
return courses;
}
private async loadStudent(): Promise<Student | null> {
if (!this.tokens) return null;
const [p, summary, issues] = await Promise.all([
this.request<RawProfile>('GET', '/user/user-profile'),
this.request<RawSummary>('GET', '/progress-summary').catch(() => null),
this.request<{ issues: RawIssue[] }>('GET', '/issues/me?limit=100').catch(() => ({ issues: [] })),
]);
return mapStudent(p, summary, issues.issues ?? [], this.localProgress, new Date().toISOString());
}
private async loadInbox(): Promise<InboxItem[]> {
if (!this.tokens) return [];
const r = await this.request<{ notifications: RawNotification[] }>('GET', '/notifications?limit=100');
return (r.notifications ?? []).map(mapNotification);
}
/** Re-runs every watcher, e.g. after sign-in, sign-out or a write the server changes state for. */
refreshAll() {
if (this.courseCbs.size) this.loadCourses().then((c) => this.courseCbs.forEach((cb) => cb(c)), (e) => console.warn('courses', e));
this.refreshStudent();
if (this.inboxCbs.size) this.loadInbox().then((i) => this.inboxCbs.forEach((cb) => cb(i)), () => this.inboxCbs.forEach((cb) => cb([])));
}
private refreshStudent() {
if (!this.studentCbs.size) return;
this.loadStudent().then((s) => this.studentCbs.forEach((_, cb) => cb(s)), (e) => { console.warn('student', e); this.studentCbs.forEach((_, cb) => cb(null)); });
}
watchCourses(cb: (c: Course[]) => void): Unsub {
this.courseCbs.add(cb);
this.loadCourses().then((c) => { if (this.courseCbs.has(cb)) cb(c); }, (e) => { console.warn('courses', e); if (this.courseCbs.has(cb)) cb([]); });
return () => { this.courseCbs.delete(cb); };
}
watchStudent(id: string, cb: (s: Student | null) => void): Unsub {
this.studentCbs.set(cb, id);
this.loadStudent().then((s) => { if (this.studentCbs.has(cb)) cb(s); }, () => { if (this.studentCbs.has(cb)) cb(null); });
return () => { this.studentCbs.delete(cb); };
}
watchInbox(_studentId: string, cb: (i: InboxItem[]) => void): Unsub {
this.inboxCbs.add(cb);
this.loadInbox().then((i) => { if (this.inboxCbs.has(cb)) cb(i); }, () => { if (this.inboxCbs.has(cb)) cb([]); });
return () => { this.inboxCbs.delete(cb); };
}
// Not on the API: categories, app settings (the screens fall back to their defaults) and the admin collections.
watchCategories(cb: (c: Category[]) => void): Unsub { cb([]); return () => {}; }
watchSettings(cb: (s: Settings | null) => void): Unsub { cb(null); return () => {}; }
watchStudents(cb: (s: Student[]) => void): Unsub { cb([]); return () => {}; }
watchCampaigns(cb: (c: Campaign[]) => void): Unsub { cb([]); return () => {}; }
watchAudit(cb: (a: AuditEntry[]) => void): Unsub { cb([]); return () => {}; }
// ---- writes
/** Profile setup after a first sign-in. */
async saveStudent(s: Student) {
const [first_name, ...rest] = s.name.trim().split(/\s+/);
await this.request('PUT', '/user', { first_name, last_name: rest.join(' '), country: s.country, region: s.city, preferred_language: s.locale });
this.refreshStudent();
}
/**
* The screens write partial student records; each key maps to the endpoint that owns it.
* Keys the API has no home for (watch time, notification prefs, last active) stay local.
*/
async patchStudent(_id: string, patch: Record<string, unknown>) {
const jobs: Promise<unknown>[] = [];
if (patch.orders) throw notConnected('Buying a course');
const progress = patch.progress as Record<string, LessonProgress> | undefined;
for (const [lessonId, p] of Object.entries(progress ?? {})) {
this.localProgress[lessonId] = { ...this.localProgress[lessonId], ...p };
jobs.push(this.request('POST', '/videos/engagement/heartbeat', {
content_id: ids.num(lessonId), content_kind: 'lms_lesson', position_sec: Math.floor(p.positionSec),
// durations aren't on the API, so the furthest point reached stands in for the length
duration_sec: Math.max(1, Math.floor(p.maxPositionSec ?? p.positionSec)), ended: !!p.completedAt,
}));
}
for (const i of Object.values((patch.issues ?? {}) as Record<string, Partial<Issue>>)) {
if (!i.subject) continue; // status changes are the support team's, not the learner's
jobs.push(this.request('POST', '/issues', { subject: i.subject, description: i.description ?? '', issue_type: (i.type ?? 'OTHER').toLowerCase() }));
}
const profile: Record<string, unknown> = {};
if (typeof patch.locale === 'string') profile.preferred_language = patch.locale;
if (typeof patch.name === 'string') { const [f, ...r] = patch.name.trim().split(/\s+/); profile.first_name = f; profile.last_name = r.join(' '); }
if (typeof patch.country === 'string') profile.country = patch.country;
if (typeof patch.city === 'string') profile.region = patch.city;
if (Object.keys(profile).length) jobs.push(this.request('PUT', '/user', profile));
await Promise.all(jobs);
this.refreshStudent();
}
async patchInbox(_studentId: string, id: string, patch: Partial<InboxItem>) {
if (patch.readAt !== undefined) await this.request('PATCH', `/notifications/${id}/${patch.readAt ? 'read' : 'unread'}`);
if (this.inboxCbs.size) this.loadInbox().then((i) => this.inboxCbs.forEach((cb) => cb(i)), () => {});
}
/** The server writes its own notifications (payment, issue updates); the client never adds to a learner's inbox. */
async addInbox() {}
async saveCourse() { throw notConnected('Course editing'); }
async deleteCourse() { throw notConnected('Course editing'); }
async saveCategory() { throw notConnected('Categories'); }
async deleteCategory() { throw notConnected('Categories'); }
async saveSettings() { throw notConnected('Settings'); }
async saveCampaign() { throw notConnected('Campaigns'); }
async addAudit() {}
async uploads() { return null; }
assetUrl(id: string) { return absolute(this.base, id) ?? ''; }
async download() { return false; }
async feedback() { return false; }
async feedbackAvailable() { return false; }
}

View File

@ -0,0 +1 @@
{"message":"Course highlights retrieved","data":{"courses":[{"id":2,"name":"Intermediate","description":"Default program for the intermediate level.","thumbnail":"","access_tier":"PREMIUM","chapter_count":2,"lesson_count":0,"quiz_count":0},{"id":1,"name":"Beginner","description":"Default program for the beginner level.","thumbnail":"","access_tier":"PREMIUM","chapter_count":2,"lesson_count":0,"quiz_count":0},{"id":3,"name":"Advanced","description":"Default program for the advanced level.","thumbnail":"","access_tier":"PREMIUM","chapter_count":2,"lesson_count":0,"quiz_count":0},{"id":12,"name":"Everyday English","description":"Build confidence with introductions, daily conversations, and practical vocabulary.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE","chapter_count":2,"lesson_count":6,"quiz_count":2},{"id":13,"name":"Workplace Communication","description":"Communicate clearly in meetings, write effective messages, and present your ideas.","thumbnail":"/static/demo/course-cover.svg","access_tier":"PREMIUM","chapter_count":2,"lesson_count":6,"quiz_count":2},{"id":14,"name":"Digital Skills Essentials","description":"Learn practical habits for working online, organizing information, and collaborating safely.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE","chapter_count":2,"lesson_count":6,"quiz_count":2}],"total_count":6,"limit":50,"offset":0},"success":true,"status_code":200,"metadata":null}

View File

@ -0,0 +1 @@
{"message":"Course outline retrieved","data":{"id":12,"name":"Everyday English","description":"Build confidence with introductions, daily conversations, and practical vocabulary.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE","chapter_count":2,"lesson_count":6,"quiz_count":2,"chapters":[{"id":19,"name":"Meet and greet","description":"Practice the key ideas through short lessons and a chapter review quiz.","lessons":[{"id":38,"title":"Introduce yourself","description":"In this demo lesson, explore how to introduce yourself. Review the examples, try it yourself, and complete the chapter quiz. The video is sample media for testing playback.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE"},{"id":39,"title":"Ask friendly questions","description":"In this demo lesson, explore how to ask friendly questions. Review the examples, try it yourself, and complete the chapter quiz. The video is sample media for testing playback.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE"},{"id":40,"title":"Start a conversation","description":"In this demo lesson, explore how to start a conversation. Review the examples, try it yourself, and complete the chapter quiz. The video is sample media for testing playback.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE"}],"quizzes":[{"id":14,"title":"Meet and greet review","question_count":3}]},{"id":20,"name":"Everyday situations","description":"Practice the key ideas through short lessons and a chapter review quiz.","lessons":[{"id":41,"title":"Order food and drinks","description":"In this demo lesson, explore how to order food and drinks. Review the examples, try it yourself, and complete the chapter quiz. The video is sample media for testing playback.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE"},{"id":42,"title":"Ask for directions","description":"In this demo lesson, explore how to ask for directions. Review the examples, try it yourself, and complete the chapter quiz. The video is sample media for testing playback.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE"},{"id":43,"title":"Make simple plans","description":"In this demo lesson, explore how to make simple plans. Review the examples, try it yourself, and complete the chapter quiz. The video is sample media for testing playback.","thumbnail":"/static/demo/course-cover.svg","access_tier":"FREE"}],"quizzes":[{"id":15,"title":"Everyday situations review","question_count":3}]}]},"success":true,"status_code":200,"metadata":null}

View File

@ -48,6 +48,7 @@ export interface Course {
prerequisiteCourseId?: string | null; publishedAt?: string | null; createdAt: string; updatedAt: string; prerequisiteCourseId?: string | null; publishedAt?: string | null; createdAt: string; updatedAt: string;
translations: Tr<{ title: string; subtitle?: string; description: string; audience?: string; outcomes?: string[] }>; translations: Tr<{ title: string; subtitle?: string; description: string; audience?: string; outcomes?: string[] }>;
prices: Partial<Record<Currency, number>>; // integer minor units prices: Partial<Record<Currency, number>>; // integer minor units
enrolledCount?: number; // backend aggregate: students enrolled (purchase, grant or free)
chapters: Chapter[]; chapters: Chapter[];
assessments?: Assessment[]; assessments?: Assessment[];
} }
@ -108,9 +109,19 @@ export interface Viewer { id: string | null; name: string; avatarUrl: string; is
export type Unsub = () => void; export type Unsub = () => void;
/** Real sign-in, present only on data sources backed by an account system (the API); the demo simulates it. */
export interface AuthApi {
signedIn(): boolean;
/** Starts sign-in or sign-up for a phone, or an email with password: 'code' means a one-time code was sent. */
start(c: { phone?: string; email?: string; password?: string }): Promise<'code' | 'done'>;
verify(c: { phone?: string; email?: string; password?: string }, code: string): Promise<void>;
signOut(): Promise<void>;
}
/** Everything a screen may ask of the backend. */ /** Everything a screen may ask of the backend. */
export interface DataSource { export interface DataSource {
readonly kind: 'claude-db' | 'api'; readonly kind: 'claude-db' | 'api';
readonly auth?: AuthApi;
viewer(): Promise<Viewer>; viewer(): Promise<Viewer>;
/** Display names for stored user ids (never store names). */ /** Display names for stored user ids (never store names). */
names(ids: string[]): Promise<Record<string, string>>; names(ids: string[]): Promise<Record<string, string>>;
@ -226,3 +237,5 @@ export class ClaudeDbDataSource implements DataSource {
} }
export const newId = (prefix = '') => prefix + Date.now().toString(36) + Math.random().toString(36).slice(2, 8); export const newId = (prefix = '') => prefix + Date.now().toString(36) + Math.random().toString(36).slice(2, 8);
export { ApiDataSource, ApiError } from './api';

View File

@ -5,7 +5,7 @@ import fs from 'fs'; import path from 'path';
const out = process.argv[2] || 'dist/seed'; const out = process.argv[2] || 'dist/seed';
const put = (col, id, body) => { fs.mkdirSync(path.join(out, col), { recursive: true }); fs.writeFileSync(path.join(out, col, id + '.json'), JSON.stringify({ ...body, id }, null, 1)); }; const put = (col, id, body) => { fs.mkdirSync(path.join(out, col), { recursive: true }); fs.writeFileSync(path.join(out, col, id + '.json'), JSON.stringify({ ...body, id }, null, 1)); };
put('settings', 'app', { brandName: 'MakeUp Academy', supportPhone: '+251 911 234 567', telegramLink: 'https://t.me/makeupacademy_demo', supportEmail: 'support@makeup-academy.example', sessionLimit: 2, maintenanceBanner: '' }); put('settings', 'app', { brandName: 'Sirkul Makeup', supportPhone: '+251 911 234 567', telegramLink: 'https://t.me/sirkulmakeup_demo', supportEmail: 'support@sirkul-makeup.example', sessionLimit: 2, maintenanceBanner: '' });
const cats = [ const cats = [
['cat-fundamentals', 'fundamentals', { en: 'Makeup fundamentals', am: 'የሜካፕ መሠረታዊ ነገሮች', om: "Bu'uura meekaappii", ti: 'መሰረታዊ ሜካፕ' }], ['cat-fundamentals', 'fundamentals', { en: 'Makeup fundamentals', am: 'የሜካፕ መሠረታዊ ነገሮች', om: "Bu'uura meekaappii", ti: 'መሰረታዊ ሜካፕ' }],
@ -122,6 +122,51 @@ put('courses', 'crs-skin', order({ ...base, slug: 'skin-prep-and-care', category
]), ]),
] })); ] }));
// ---- PLACEHOLDER courses (simulated): remove after backend integration, see design/issues/remove-placeholder-courses.md
put('courses', 'crs-softglam', order({ ...base, slug: 'soft-glam-evening', categoryId: 'cat-fundamentals', instructorName: 'Meron Tesfaye', instructionLocale: 'am', coverTone: 'clay', status: 'PUBLISHED', isFeatured: true, publishedAt: '2026-06-01T08:00:00.000Z', updatedAt: '2026-09-10T08:00:00.000Z', prices: { ETB: 150000 },
translations: {
en: { title: 'Soft glam for evenings', subtitle: 'A camera-ready evening look in under an hour.', audience: 'Artists who know the basics and want a signature evening look.', description: 'Sculpt, smoke and highlight for parties, graduations and photo shoots, with looks built for deep and medium skin.', outcomes: ['Sculpt with warm bronzer instead of grey contour', 'Build a soft smoky eye in three layers', 'Finish skin that glows on camera without flashback'] },
am: { title: 'የምሽት ሶፍት ግላም', subtitle: 'ከአንድ ሰዓት ባነሰ ጊዜ ለካሜራ ዝግጁ የሆነ የምሽት ሜካፕ።', description: 'ለግብዣ፣ ለምረቃና ለፎቶ ቀረጻ ፊትን ማስዋብ፣ የጭስ ዓይንና ብርሃን አሰጣጥ።' },
},
chapters: [
ch('ch-g1', { en: 'Sculpt and glow', am: 'ቅርጽና ብርሃን' }, { en: 'Shape the face with warmth, not shadow.' }, [
L('les-g1', 8, tt('Warm sculpting for deep skin', 'ለጠቆረ ቆዳ ሞቅ ያለ ቅርጽ', 'Bocaa gogaa gurraachaaf', 'ቅርጺ ንጸሊም ቆርበት'), { isPreview: true }),
L('les-g2', 11, tt('Highlight that photographs well', 'በፎቶ የሚያምር ብርሃን', 'Ifa suuraa irratti mul\'atu', 'ኣብ ስእሊ ዝጽቡቕ ብርሃን')),
]),
ch('ch-g2', { en: 'Eyes and lips', am: 'ዓይንና ከንፈር' }, { en: 'One soft smoky eye, three ways.' }, [
L('les-g3', 14, tt('Soft smoky eye in three layers', 'በሦስት ደረጃ የጭስ ዓይን', 'Ija aaraa sadarkaa sadiin', 'ናይ ትኪ ዓይኒ ብሰለስተ ደረጃ')),
L('les-g4', 9, tt('Lips that last the night', 'ሌሊቱን ሙሉ የሚቆይ ከንፈር', 'Hidhii halkan guutuu turu', 'ንምሉእ ለይቲ ዝጸንሕ ከንፈር')),
]),
] }));
put('courses', 'crs-habesha', order({ ...base, slug: 'traditional-habesha-looks', categoryId: 'cat-bridal', instructorName: 'Hanna Bekele', instructionLocale: 'am', coverTone: 'sand', status: 'PUBLISHED', publishedAt: '2026-07-01T08:00:00.000Z', updatedAt: '2026-09-15T08:00:00.000Z', prices: { ETB: 180000 },
translations: {
en: { title: 'Traditional Habesha looks', subtitle: 'Makeup for kemis, holidays and cultural ceremonies.', audience: 'Artists booked for Timket, Meskel, weddings and cultural events.', description: 'Looks that work with netela, gold jewelry and braided hair, from a soft holiday face to a full ceremony look.', outcomes: ['Match makeup to kemis colors and gold', 'Keep the look fresh through an outdoor holiday', 'Work around braids and head jewelry'] },
am: { title: 'ባህላዊ የሀበሻ ሜካፕ', subtitle: 'ለሀበሻ ቀሚስ፣ ለበዓላትና ለባህላዊ ሥነ ሥርዓቶች።', description: 'ከነጠላ፣ ከወርቅ ጌጣጌጥና ከሹሩባ ጋር የሚሄድ ሜካፕ።' },
},
chapters: [
ch('ch-h1', { en: 'Holiday looks', am: 'የበዓል ሜካፕ' }, { en: 'Outdoor light and long days call for a soft, sure base.' }, [
L('les-h1', 10, tt('A soft look for Timket and Meskel', 'ለጥምቀትና ለመስቀል ለስላሳ ሜካፕ', 'Meekaappii Timqataa fi Masqalaaf', 'ሜካፕ ንጥምቀትን መስቀልን'), { isPreview: true }),
L('les-h2', 13, tt('Makeup with gold and netela', 'ከወርቅና ከነጠላ ጋር ሜካፕ', 'Meekaappii warqee fi netelaa wajjin', 'ሜካፕ ምስ ወርቅን ነጠላን')),
]),
ch('ch-h2', { en: 'Ceremony looks', am: 'የሥነ ሥርዓት ሜካፕ' }, { en: 'Full looks that hold up in photos and in person.' }, [
L('les-h3', 16, tt('Full ceremony look, start to finish', 'ሙሉ የሥነ ሥርዓት ሜካፕ', 'Meekaappii sirnaa guutuu', 'ምሉእ ሜካፕ ስነ ስርዓት')),
]),
] }));
put('courses', 'crs-clientele', order({ ...base, slug: 'building-your-clientele', categoryId: 'cat-fundamentals', instructorName: 'Meron Tesfaye', instructionLocale: 'en', coverTone: 'ink', status: 'PUBLISHED', publishedAt: '2026-08-01T08:00:00.000Z', updatedAt: '2026-09-18T08:00:00.000Z', prices: { ETB: 60000 },
translations: {
en: { title: 'Building your clientele', subtitle: 'Pricing, kit and bookings for freelance artists.', audience: 'Artists ready to take paid clients.', description: 'Set your prices, build a kit you can afford, and turn Instagram and Telegram into steady bookings.', outcomes: ['Price a look so it pays', 'Build a starter kit on a budget', 'Get repeat bookings from social media'] },
am: { title: 'ደንበኞችዎን መገንባት', subtitle: 'ለግል ባለሙያዎች ዋጋ፣ ዕቃና ቀጠሮ።', description: 'ዋጋ ማውጣት፣ በአቅም ዕቃ መግዛትና ማኅበራዊ ሚዲያን ወደ ቋሚ ቀጠሮ መቀየር።' },
},
chapters: [
ch('ch-c1', { en: 'Getting booked', am: 'ቀጠሮ ማግኘት' }, { en: 'Your first ten clients come from people who already know you.' }, [
L('les-c1', 7, tt('What to charge in Addis', 'በአዲስ አበባ ምን ያህል ማስከፈል', 'Finfinneetti meeqa kaffalchiisuu', 'ኣብ ኣዲስ ኣበባ ክንደይ ምኽፋል'), { isPreview: true }),
L('les-c2', 9, tt('A starter kit on a budget', 'በአቅም የሚገዛ የመጀመሪያ ኪት', 'Meeshaa jalqabaa baasii xiqqaan', 'መጀመርታ ኪት ብውሑድ ዋጋ')),
L('les-c3', 11, tt('Bookings from Instagram and Telegram', 'ከኢንስታግራምና ከቴሌግራም ቀጠሮ', 'Beellama Instagram fi Telegram irraa', 'ቆጸራ ካብ ኢንስታግራምን ቴሌግራምን')),
]),
] }));
put('courses', 'crs-business', order({ ...base, slug: 'crs-business', categoryId: 'cat-fundamentals', instructorName: 'Meron Tesfaye', instructionLocale: 'am', coverTone: 'sand', status: 'DRAFT', publishedAt: null, updatedAt: '2026-09-20T08:00:00.000Z', prices: {}, put('courses', 'crs-business', order({ ...base, slug: 'crs-business', categoryId: 'cat-fundamentals', instructorName: 'Meron Tesfaye', instructionLocale: 'am', coverTone: 'sand', status: 'DRAFT', publishedAt: null, updatedAt: '2026-09-20T08:00:00.000Z', prices: {},
translations: { en: { title: 'Building a makeup business', description: 'Pricing, bookings and social media for freelance artists.' }, am: { title: 'የሜካፕ ሥራ መገንባት', description: 'ለግል ባለሙያዎች ዋጋ አወጣጥ፣ ቀጠሮና ማኅበራዊ ሚዲያ።' } }, translations: { en: { title: 'Building a makeup business', description: 'Pricing, bookings and social media for freelance artists.' }, am: { title: 'የሜካፕ ሥራ መገንባት', description: 'ለግል ባለሙያዎች ዋጋ አወጣጥ፣ ቀጠሮና ማኅበራዊ ሚዲያ።' } },
chapters: [ch('ch-x1', { en: 'Pricing your work' }, {}, [L('les-x1', 12, { en: { title: 'What to charge in Addis' } }, { isPublished: false, videoStatus: 'NONE' })])] })); chapters: [ch('ch-x1', { en: 'Pricing your work' }, {}, [L('les-x1', 12, { en: { title: 'What to charge in Addis' } }, { isPublished: false, videoStatus: 'NONE' })])] }));
@ -185,4 +230,9 @@ people.forEach(([name, phone, email, country, city, locale, joined], i) => {
if (i === 0) s.issues['iss-s1'] = { id: 'iss-s1', type: 'ACCOUNT', subject: 'Change my phone number', description: 'I have a new Safaricom number.', status: 'RESOLVED', resolutionNote: 'Updated on your profile.', createdAt: t('2026-03-02', 9), updatedAt: t('2026-03-03', 9) }; if (i === 0) s.issues['iss-s1'] = { id: 'iss-s1', type: 'ACCOUNT', subject: 'Change my phone number', description: 'I have a new Safaricom number.', status: 'RESOLVED', resolutionNote: 'Updated on your profile.', createdAt: t('2026-03-02', 9), updatedAt: t('2026-03-03', 9) };
put('students', id, s); put('students', id, s);
}); });
// Enrolled count per course, from the students above. ponytail: computed once at seed time; the backend
// keeps this aggregate live (see design/issues/enrollment-counts.md), students can't read each other's docs.
const enrolled = {};
for (const f of fs.readdirSync(path.join(out, 'students'))) for (const k of Object.keys(JSON.parse(fs.readFileSync(path.join(out, 'students', f), 'utf8')).enrollments ?? {})) enrolled[k] = (enrolled[k] ?? 0) + 1;
for (const f of fs.readdirSync(path.join(out, 'courses'))) { const file = path.join(out, 'courses', f), c = JSON.parse(fs.readFileSync(file, 'utf8')); fs.writeFileSync(file, JSON.stringify({ ...c, enrolledCount: enrolled[c.id] ?? 0 }, null, 1)); }
console.log('seed written to', out); console.log('seed written to', out);

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@ import type { Category, Course, DataSource, InboxItem, Locale, Settings, Student
import { LOCALES, newId } from '@lms/data'; import { LOCALES, newId } from '@lms/data';
import { messages } from '@lms/i18n'; import { messages } from '@lms/i18n';
export const DEFAULT_SETTINGS: Settings = { brandName: 'MakeUp Academy', supportPhone: '+251 911 000 000', telegramLink: 'https://t.me/', supportEmail: 'support@example.com', sessionLimit: 2, maintenanceBanner: '' }; export const DEFAULT_SETTINGS: Settings = { brandName: 'Sirkul Makeup', supportPhone: '+251 911 000 000', telegramLink: 'https://t.me/', supportEmail: 'support@example.com', sessionLimit: 2, maintenanceBanner: '' };
const store = { const store = {
get(k: string) { try { return localStorage.getItem('lms.' + k); } catch { return null; } }, get(k: string) { try { return localStorage.getItem('lms.' + k); } catch { return null; } },
@ -33,6 +33,8 @@ interface Ctx {
/** Serialized writes: the db wants one write at a time per document. */ /** Serialized writes: the db wants one write at a time per document. */
write(fn: () => Promise<void>, okMsg?: string): Promise<boolean>; write(fn: () => Promise<void>, okMsg?: string): Promise<boolean>;
signIn(): void; signOut(): void; signIn(): void; signOut(): void;
/** Re-reads who is signed in, after a real (API) sign-in. */
reloadViewer(): Promise<void>;
notify(studentId: string, item: Omit<InboxItem, 'id' | 'createdAt'>): Promise<void>; notify(studentId: string, item: Omit<InboxItem, 'id' | 'createdAt'>): Promise<void>;
msg(loc: Locale, key: string, vars?: Record<string, string | number>): string; msg(loc: Locale, key: string, vars?: Record<string, string | number>): string;
} }
@ -140,7 +142,9 @@ export function AppProvider({ ds, children }: { ds: DataSource; children: ReactN
me: me && !me.deletedAt && !signedOut ? me : null, account: me, meLoaded, signedIn: !!me && !me.deletedAt && !signedOut, inbox, me: me && !me.deletedAt && !signedOut ? me : null, account: me, meLoaded, signedIn: !!me && !me.deletedAt && !signedOut, inbox,
locale, setLocale, route, nav, toast, write, locale, setLocale, route, nav, toast, write,
signIn: () => { store.set('signedOut', null); setSignedOut(false); }, signIn: () => { store.set('signedOut', null); setSignedOut(false); },
signOut: () => { store.set('signedOut', '1'); setSignedOut(true); }, // With a real account system, signing out also ends the server session and forgets the user.
signOut: () => { store.set('signedOut', '1'); setSignedOut(true); if (ds.auth) ds.auth.signOut().then(() => ds.viewer()).then(setViewer, () => {}); },
reloadViewer: async () => { setViewer(await ds.viewer()); },
notify, msg, notify, msg,
}; };

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +1,42 @@
/* Layout: student = quiet single column with Ge'ez titles given room. /* Layout: student = quiet single column with Ge'ez titles given room.
Tokens mirror design/tokens.json (§11.3). Components never use raw colors. */ Tokens mirror design/tokens.json (§11.3). Components never use raw colors. */
:root { :root {
--ink: #1D3557; --ink-2: #37627D; --ink-3: #4F7590; --ink: #111111; --ink-2: #3A3A3A; --ink-3: #6B6B6B;
--paper: #FFFFFF; --canvas: #F1FAEE; --mist: #EDF8F8; --line: #D7E5EE; --paper: #FFFFFF; --canvas: #F4F4F4; --mist: #F7F7F7; --line: #E4E4E4;
--accent: #E63946; --accent-ink: #FFFFFF; --accent-soft: #FAD7DA; --accent-hover: #CB1928; --accent: #111111; --accent-ink: #FFFFFF; --accent-soft: #EFEFEF; --accent-hover: #000000;
--brand-2: #457B9D; --brand-2-soft: #DCF0F1; --brand-3: #A8DADC; --brand-2: #222222; --brand-2-soft: #F0F0F0; --brand-3: #D0D0D0;
--success: #2E7D5B; --success-soft: #E3F4EA; --alert: #CB1928; --alert-soft: #FAD7DA; --warn-soft: #FDF1D8; --success: #111111; --success-soft: #EFEFEF; --alert: #000000; --alert-soft: #E6E6E6; --warn-soft: #F3F3F3;
--info-soft: #DCF0F1; --on-ink: #FFFFFF; --info-soft: #F0F0F0; --on-ink: #FFFFFF;
--tone-rose: #FAD7DA; --tone-clay: #F1FAEE; --tone-plum: #D7E5EE; --tone-sand: #DCF0F1; --tone-sage: #CAE9EA; --tone-ink: #C4D4EB; --tone-rose: #E8E8E8; --tone-clay: #F5F5F5; --tone-plum: #D4D4D4; --tone-sand: #EEEEEE; --tone-sage: #DEDEDE; --tone-ink: #C8C8C8;
--f-latin: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif; --f-latin: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
--f-eth: 'Noto Sans Ethiopic', 'Atkinson Hyperlegible', system-ui, sans-serif; --f-eth: 'Noto Sans Ethiopic', 'Plus Jakarta Sans', system-ui, sans-serif;
--f-serif: 'Noto Serif Ethiopic', 'Noto Sans Ethiopic', Georgia, serif; --f-serif: 'Noto Serif Ethiopic', 'Noto Sans Ethiopic', Georgia, serif;
--fs-sm: 14px; --fs-base: 16px; --fs-lg: 20px; --fs-xl: 25px; --fs-2xl: 31px; --fs-3xl: 39px; --fs-sm: 14px; --fs-base: 16px; --fs-lg: 20px; --fs-xl: 25px; --fs-2xl: 31px; --fs-3xl: 39px;
--r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
--shadow: 0 1px 2px rgba(29, 53, 87, .06), 0 1px 1px rgba(29, 53, 87, .03); --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 1px rgba(0, 0, 0, .03);
--shadow-pop: 0 12px 32px rgba(29, 53, 87, .16); --shadow-pop: 0 12px 32px rgba(0, 0, 0, .16);
color-scheme: light; color-scheme: light;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { :root:not([data-theme="light"]) {
--ink: #EDF8F8; --ink-2: #B9E2E3; --ink-3: #88B1CB; --ink: #F5F5F5; --ink-2: #C8C8C8; --ink-3: #9A9A9A;
--paper: #0C1623; --canvas: #060B12; --mist: #122035; --line: #1B313E; --paper: #0A0A0A; --canvas: #000000; --mist: #161616; --line: #2A2A2A;
--accent: #EB5F6B; --accent-ink: #FFFFFF; --accent-soft: #3A1418; --accent-hover: #F08790; --accent: #F5F5F5; --accent-ink: #0A0A0A; --accent-soft: #2A2A2A; --accent-hover: #FFFFFF;
--brand-2: #6097B9; --brand-2-soft: #163637; --brand-3: #70C3C6; --brand-2: #E0E0E0; --brand-2-soft: #1C1C1C; --brand-3: #3A3A3A;
--success: #5CC08F; --success-soft: #173328; --alert: #F08790; --alert-soft: #3A1418; --warn-soft: #3A321A; --success: #F5F5F5; --success-soft: #1A1A1A; --alert: #FFFFFF; --alert-soft: #2A2A2A; --warn-soft: #1F1F1F;
--info-soft: #163637; --on-ink: #0C1623; --info-soft: #1C1C1C; --on-ink: #0A0A0A;
--tone-rose: #3A1418; --tone-clay: #1A2E1E; --tone-plum: #1B313E; --tone-sand: #163637; --tone-sage: #1F4446; --tone-ink: #172B46; --tone-rose: #2A2A2A; --tone-clay: #1A1A1A; --tone-plum: #333333; --tone-sand: #242424; --tone-sage: #3A3A3A; --tone-ink: #444444;
color-scheme: dark; color-scheme: dark;
} }
} }
:root[data-theme="dark"] { :root[data-theme="dark"] {
--ink: #EDF8F8; --ink-2: #B9E2E3; --ink-3: #88B1CB; --ink: #F5F5F5; --ink-2: #C8C8C8; --ink-3: #9A9A9A;
--paper: #0C1623; --canvas: #060B12; --mist: #122035; --line: #1B313E; --paper: #0A0A0A; --canvas: #000000; --mist: #161616; --line: #2A2A2A;
--accent: #EB5F6B; --accent-ink: #FFFFFF; --accent-soft: #3A1418; --accent-hover: #F08790; --accent: #F5F5F5; --accent-ink: #0A0A0A; --accent-soft: #2A2A2A; --accent-hover: #FFFFFF;
--brand-2: #6097B9; --brand-2-soft: #163637; --brand-3: #70C3C6; --brand-2: #E0E0E0; --brand-2-soft: #1C1C1C; --brand-3: #3A3A3A;
--success: #5CC08F; --success-soft: #173328; --alert: #F08790; --alert-soft: #3A1418; --warn-soft: #3A321A; --success: #F5F5F5; --success-soft: #1A1A1A; --alert: #FFFFFF; --alert-soft: #2A2A2A; --warn-soft: #1F1F1F;
--info-soft: #163637; --on-ink: #0C1623; --info-soft: #1C1C1C; --on-ink: #0A0A0A;
--tone-rose: #3A1418; --tone-clay: #1A2E1E; --tone-plum: #1B313E; --tone-sand: #163637; --tone-sage: #1F4446; --tone-ink: #172B46; --tone-rose: #2A2A2A; --tone-clay: #1A1A1A; --tone-plum: #333333; --tone-sand: #242424; --tone-sage: #3A3A3A; --tone-ink: #444444;
color-scheme: dark; color-scheme: dark;
} }
@ -112,7 +112,6 @@ textarea.input { min-height: 110px; resize: vertical; }
.modal { background: var(--paper); border-radius: var(--r-lg); padding: 24px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; gap: 16px; } .modal { background: var(--paper); border-radius: var(--r-lg); padding: 24px; width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; gap: 16px; }
.feedback-btn { white-space: nowrap; } .feedback-btn { white-space: nowrap; }
@media (max-width: 700px) { .feedback-btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .feedback-btn { padding: 0; width: 36px; } } @media (max-width: 700px) { .feedback-btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .feedback-btn { padding: 0; width: 36px; } }
.demo-strip { background: var(--ink); color: var(--on-ink) !important; color: var(--ink); font-size: 12px; text-align: center; padding: 4px 16px; }
/* ---------- student shell ---------- */ /* ---------- student shell ---------- */
.s-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); } .s-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
@ -168,14 +167,44 @@ textarea.input { min-height: 110px; resize: vertical; }
.tone-sand { background: var(--tone-sand); } .tone-sage { background: var(--tone-sage); } .tone-ink { background: var(--tone-ink); } .tone-sand { background: var(--tone-sand); } .tone-sage { background: var(--tone-sage); } .tone-ink { background: var(--tone-ink); }
.grid-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .grid-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-cards > * { max-width: 440px; } .grid-cards > * { max-width: 440px; }
.ccard { display: flex; flex-direction: column; gap: 10px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; min-width: 0; } /* home: greeting + continue card (H1–H3). The card is a dark photo surface in both themes. */
.ccard h3 { font-size: var(--fs-lg); } .home-top { display: flex; flex-direction: column; gap: 16px; }
.ccard:hover h3 { text-decoration: underline; text-underline-offset: 4px; } .continue { display: grid; grid-template-columns: 1fr; border-radius: 22px; overflow: hidden; background: #111; color: #F5F5F5; }
.ccard .meta { font-size: var(--fs-sm); color: var(--ink-3); } .continue-media { position: relative; isolation: isolate; aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 16px 18px 22px; }
.continue { display: grid; gap: 20px; grid-template-columns: 1fr; padding: 20px; border-radius: var(--r-lg); background: var(--ink); color: var(--on-ink); } .continue-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; z-index: -2; }
.continue .bar { background: rgba(255, 255, 255, .18); } .continue-media::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 10, 10, 0) 30%, rgba(10, 10, 10, .82)); }
@media (min-width: 720px) { .continue { grid-template-columns: 260px 1fr; align-items: center; } } .continue-kicker, .continue-next > span:first-child { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(245, 245, 245, .75); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; } .continue-media h2 { font-size: var(--fs-xl); line-height: 1.15; letter-spacing: -.02em; color: #fff; }
.continue-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.continue-bar > i { display: block; height: 100%; background: #fff; }
.continue-body { display: flex; flex-direction: column; gap: 16px; padding: 16px 18px 18px; }
.continue-next { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.continue-next strong { font-size: var(--fs-lg); line-height: 1.3; }
.continue-next > .num { font-size: var(--fs-sm); color: #A3A3A3; }
.continue-body .btn { width: 100%; border-radius: 999px; }
.continue .btn-accent { background: #F5F5F5; color: #0A0A0A; }
@media (min-width: 720px) {
.continue { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.continue-media { aspect-ratio: auto; min-height: 260px; padding: 20px 24px 26px; }
.continue-body { justify-content: center; padding: 24px 28px; }
.continue-body .btn { align-self: flex-start; width: auto; }
}
/* CT1: chip rows scroll without a visible scrollbar; the faded edge says there's more */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.chips::-webkit-scrollbar { display: none; }
@media (max-width: 599px) { .chips { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 32px), transparent); } }
/* CT2: search with an icon and a clear button (the browser's own cancel glyph is hidden so there's only one) */
.search { position: relative; display: block; }
.search > svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.search .input { min-height: 48px; padding-inline: 42px 46px; border-radius: 14px; }
.search .input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-clear { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .search-clear:hover { color: var(--ink); background: var(--mist); } }
/* CT3: result count with the "taught in" filter beside it */
.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.catalog-lang { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-3); }
.catalog-lang select { min-height: 40px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
@media (pointer: coarse) { .catalog-lang select { font-size: 16px; } } /* iOS zooms into anything smaller */
.chip { flex: none; border: 1px solid var(--line); background: var(--paper); padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; font-weight: 700; color: var(--ink-2); } .chip { flex: none; border: 1px solid var(--line); background: var(--paper); padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; font-weight: 700; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); } .chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
@ -200,12 +229,18 @@ textarea.input { min-height: 110px; resize: vertical; }
/* player */ /* player */
.p-wrap { display: grid; gap: 20px; } .p-wrap { display: grid; gap: 20px; }
/* lesson bar replaces the app tabs inside a course on phones/tablets */
.l-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); }
.l-bar button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: var(--r-pill); padding: 0 14px; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.l-bar .l-next { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.l-bar button:disabled { opacity: .4; cursor: default; }
@media (min-width: 1024px) { .l-bar { display: none; } }
@media (min-width: 1024px) { .p-wrap { grid-template-columns: 340px 1fr; align-items: start; } .p-side { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; } .p-side-order { order: -1; } } @media (min-width: 1024px) { .p-wrap { grid-template-columns: 340px 1fr; align-items: start; } .p-side { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; } .p-side-order { order: -1; } }
.screen { position: relative; background: #0C1623; color: #fff; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; } .screen { position: relative; background: #111; color: #fff; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; }
.screen video { width: 100%; height: 100%; object-fit: contain; background: #000; } .screen video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.screen .sim { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; padding: 24px; text-align: center; background: radial-gradient(circle at 30% 20%, #29495E, #0C1623 70%); } .screen .sim { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; padding: 24px; text-align: center; background: radial-gradient(circle at 30% 20%, #3A3A3A, #111 70%); }
.screen .sim h2 { font-family: var(--f-serif); font-size: clamp(22px, 4vw, 36px); color: #fff; } .screen .sim h2 { font-family: var(--f-serif); font-size: clamp(22px, 4vw, 36px); color: #fff; }
.screen .sim .muted { color: #B9BFCE; } .screen .sim .muted { color: #C8C8C8; }
.wm { position: absolute; font-size: 12px; color: rgba(255, 255, 255, .28); pointer-events: none; user-select: none; animation: wm 40s linear infinite alternate; font-variant-numeric: tabular-nums; } .wm { position: absolute; font-size: 12px; color: rgba(255, 255, 255, .28); pointer-events: none; user-select: none; animation: wm 40s linear infinite alternate; font-variant-numeric: tabular-nums; }
@keyframes wm { 0% { left: 6%; top: 10%; } 33% { left: 60%; top: 30%; } 66% { left: 20%; top: 70%; } 100% { left: 70%; top: 80%; } } @keyframes wm { 0% { left: 6%; top: 10%; } 33% { left: 60%; top: 30%; } 66% { left: 20%; top: 70%; } 100% { left: 70%; top: 80%; } }
.controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); } .controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
@ -256,11 +291,6 @@ table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
/* compact course rows on phones (§11.2: catalog cards are compact; the Continue card stays wide) */ /* compact course rows on phones (§11.2: catalog cards are compact; the Continue card stays wide) */
@media (max-width: 599px) { @media (max-width: 599px) {
.grid-cards { grid-template-columns: 1fr; gap: 14px; } .grid-cards { grid-template-columns: 1fr; gap: 14px; }
.ccard { display: grid; grid-template-columns: 104px 1fr; gap: 2px 14px; align-items: start; }
.ccard .cover { grid-row: 1 / span 4; aspect-ratio: 1; padding: 8px; }
.ccard .cover .ttl { font-size: 13px; -webkit-line-clamp: 4; }
.ccard .cover .pill { display: none; }
.ccard h3 { font-size: var(--fs-base); }
} }
/* audit fixes: no sideways scroll at 360–400px */ /* audit fixes: no sideways scroll at 360–400px */
@media (max-width: 600px) { .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .stat { min-width: 0; } .stat .lbl { flex-wrap: wrap; letter-spacing: .03em; } .stat .lbl span { overflow-wrap: anywhere; } } @media (max-width: 600px) { .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .stat { min-width: 0; } .stat .lbl { flex-wrap: wrap; letter-spacing: .03em; } .stat .lbl span { overflow-wrap: anywhere; } }
@ -268,16 +298,15 @@ table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.cover .ttl { margin-top: auto; } .cover .ttl { margin-top: auto; }
.hero-card .cover { aspect-ratio: 16 / 10; } .hero-card .cover { aspect-ratio: 16 / 10; }
.hero-card .cover .ttl { font-size: clamp(24px, 3.2vw, 36px); } .hero-card .cover .ttl { font-size: clamp(24px, 3.2vw, 36px); }
.ccard .cover { aspect-ratio: 16 / 9; }
/* touch targets: 40px minimum everywhere, 44px on touch screens */ /* touch targets: 40px minimum everywhere, 44px on touch screens */
.btn-sm { min-height: 40px; } .btn-sm { min-height: 40px; }
@media (pointer: coarse) { .btn-sm, .controls button, .controls select { min-height: 44px; min-width: 44px; } .lesson-row { min-height: 56px; } } @media (pointer: coarse) { .btn-sm, .controls button, .controls select { min-height: 44px; min-width: 44px; } .lesson-row { min-height: 56px; } }
.pay-logo { gap: 10px; } .pay-logo { gap: 10px; }
/* ================= v3: cleaner shell, landing, course page, sign-in (inspo: e-Learning landing, OnlineLMS, Slothui course) ================= */ /* ================= v3: cleaner shell, landing, course page, sign-in (inspo: e-Learning landing, OnlineLMS, Slothui course) ================= */
:root { --f-head: 'Plus Jakarta Sans', var(--f-latin); --shadow-soft: 0 1px 2px rgba(29, 53, 87, .04), 0 8px 24px rgba(29, 53, 87, .07); --hero-a: #F1FAEE; --hero-b: #DCF0F1; } :root { --f-head: 'Plus Jakarta Sans', var(--f-latin); --shadow-soft: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .07); --hero-a: #FFFFFF; --hero-b: #F2F2F2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow-soft: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); --hero-a: #0C1623; --hero-b: #163637; } } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow-soft: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); --hero-a: #0A0A0A; --hero-b: #1A1A1A; } }
:root[data-theme="dark"] { --shadow-soft: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); --hero-a: #0C1623; --hero-b: #163637; } :root[data-theme="dark"] { --shadow-soft: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); --hero-a: #0A0A0A; --hero-b: #1A1A1A; }
h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .brand { font-family: var(--f-head); letter-spacing: -.01em; } h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .brand { font-family: var(--f-head); letter-spacing: -.01em; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: var(--fs-base); } .btn-lg { min-height: 50px; padding: 0 24px; font-size: var(--fs-base); }
.stack-lg { display: flex; flex-direction: column; gap: 24px; } .stack-lg { display: flex; flex-direction: column; gap: 24px; }
@ -310,10 +339,13 @@ h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .b
@media (max-width: 600px) { .lang-pick { padding: 0 4px 0 10px; } .lang-pick select { max-width: 76px; } } @media (max-width: 600px) { .lang-pick { padding: 0 4px 0 10px; } .lang-pick select { max-width: 76px; } }
/* landing */ /* landing */
.s-main { max-width: 1200px; padding-left: 20px; padding-right: 20px; gap: 64px; } .s-main { max-width: 1200px; padding-left: 24px; padding-right: 24px; gap: 64px; }
.l-hero { margin: -24px calc(50% - 50vw) 0; padding: 48px max(20px, calc(50vw - 580px)) 72px; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); } .l-hero { margin: -24px calc(50% - 50vw) 0; padding: 48px max(24px, calc(50vw - 580px)) 72px; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); }
.l-hero-in { display: grid; gap: 40px; align-items: center; } .l-hero-in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .l-hero-in { grid-template-columns: 1.05fr 1fr; } } @media (min-width: 900px) {
.l-hero-in { grid-template-columns: 1.05fr 1fr; }
.l-hero-in:not(:has(.hero-art, .hero-still)) { grid-template-columns: minmax(0, 40rem); }
}
.l-hero h1 { font-size: clamp(34px, 5.6vw, 58px); line-height: 1.12; max-width: 15ch; } .l-hero h1 { font-size: clamp(34px, 5.6vw, 58px); line-height: 1.12; max-width: 15ch; }
.l-hero h1:lang(am), .l-hero h1:lang(ti) { line-height: 1.35; } .l-hero h1:lang(am), .l-hero h1:lang(ti) { line-height: 1.35; }
.l-hero .lead { font-size: var(--fs-lg); color: var(--ink-2); max-width: 46ch; } .l-hero .lead { font-size: var(--fs-lg); color: var(--ink-2); max-width: 46ch; }
@ -324,7 +356,7 @@ h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .b
.hero-frame { position: relative; display: block; width: 100%; border: 0; padding: 10px; background: var(--paper); border-radius: 24px; box-shadow: var(--shadow-pop); cursor: pointer; transform: rotate(1.5deg); } .hero-frame { position: relative; display: block; width: 100%; border: 0; padding: 10px; background: var(--paper); border-radius: 24px; box-shadow: var(--shadow-pop); cursor: pointer; transform: rotate(1.5deg); }
.hero-frame .cover { aspect-ratio: 4 / 3; border-radius: 16px; padding: 28px; } .hero-frame .cover { aspect-ratio: 4 / 3; border-radius: 16px; padding: 28px; }
.hero-frame .cover .ttl { font-size: clamp(26px, 3.4vw, 40px); } .hero-frame .cover .ttl { font-size: clamp(26px, 3.4vw, 40px); }
.play-big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 68px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #1D3557; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding-left: 4px; transition: transform .2s; } .play-big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 68px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #111; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding-left: 4px; transition: transform .2s; }
.hero-frame:hover .play-big, .c-screen:hover .play-big { transform: translate(-50%, -50%) scale(1.08); } .hero-frame:hover .play-big, .c-screen:hover .play-big { transform: translate(-50%, -50%) scale(1.08); }
.float { position: absolute; background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; } .float { position: absolute; background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.float-a { left: 0; bottom: 0; align-items: flex-start; } .float-a strong { font-size: var(--fs-xl); line-height: 1; } .float-a span { font-size: 12px; color: var(--ink-3); } .float-a { left: 0; bottom: 0; align-items: flex-start; } .float-a strong { font-size: var(--fs-xl); line-height: 1; } .float-a span { font-size: 12px; color: var(--ink-3); }
@ -355,22 +387,6 @@ h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .b
.cta-band { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; padding: 36px; border-radius: 24px; background: var(--ink); color: var(--on-ink); } .cta-band { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; padding: 36px; border-radius: 24px; background: var(--ink); color: var(--on-ink); }
.cta-band h2 { font-size: var(--fs-xl); } .cta-band p { opacity: .8; } .cta-band h2 { font-size: var(--fs-xl); } .cta-band p { opacity: .8; }
/* course cards */
.ccard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; gap: 0; transition: box-shadow .2s, transform .2s; }
.ccard:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); border-color: transparent; }
.ccard:hover h3 { text-decoration: none; }
.ccard-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 8px 6px; min-width: 0; }
.ccard .meta { display: flex; gap: 14px; flex-wrap: wrap; }
.ccard .meta > span { display: inline-flex; align-items: center; gap: 5px; }
.ccard-by { font-size: var(--fs-sm); color: var(--ink-2); }
.ccard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
.ccard-cta { font-size: var(--fs-sm); font-weight: 700; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); }
.ccard:hover .ccard-cta { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
@media (max-width: 599px) {
.ccard { padding: 8px; grid-template-columns: 96px 1fr; gap: 0 12px; }
.ccard .cover { grid-row: auto; }
.ccard-body { padding: 2px 0; gap: 4px; } .ccard-by { display: none; } .ccard-foot { padding-top: 8px; } .ccard-cta { display: none; }
}
/* course page */ /* course page */
.c-page { display: flex; flex-direction: column; gap: 20px; } .c-page { display: flex; flex-direction: column; gap: 20px; }
@ -420,7 +436,7 @@ h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .b
/* sign-in */ /* sign-in */
.auth { display: grid; width: 100%; max-width: 980px; margin: 0 auto; border-radius: 24px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-soft); } .auth { display: grid; width: 100%; max-width: 980px; margin: 0 auto; border-radius: 24px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-soft); }
@media (min-width: 860px) { .auth { grid-template-columns: 1fr 1.1fr; min-height: 560px; } } @media (min-width: 860px) { .auth { grid-template-columns: 1fr 1.1fr; min-height: 560px; } }
.auth-side { background: linear-gradient(160deg, #1D3557, #29495E 70%, #457B9D); color: #fff; padding: 40px; display: flex; flex-direction: column; gap: 16px; justify-content: flex-end; } .auth-side { background: #111; color: #fff; padding: 40px; display: flex; flex-direction: column; gap: 16px; justify-content: flex-end; }
.auth-side .logo { margin-bottom: auto; } .auth-side .logo { margin-bottom: auto; }
.auth-side h2 { font-size: var(--fs-2xl); color: #fff; } .auth-side p { opacity: .8; } .auth-side h2 { font-size: var(--fs-2xl); color: #fff; } .auth-side p { opacity: .8; }
.auth-side .facts { color: rgba(255, 255, 255, .85); flex-direction: column; } .auth-side .facts svg { color: var(--brand-3); } .auth-side .facts { color: rgba(255, 255, 255, .85); flex-direction: column; } .auth-side .facts svg { color: var(--brand-3); }
@ -435,7 +451,7 @@ h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .b
@media (max-width: 899px) { .l-hero { padding-bottom: 32px; } .statbar { margin-top: -8px; } } @media (max-width: 899px) { .l-hero { padding-bottom: 32px; } .statbar { margin-top: -8px; } }
/* ================= v4: Summer Ocean Breeze palette (white base; navy text, red for calls to action, blues for UI state) ================= */ /* ================= v4: black and white (white base, black type and actions) ================= */
.btn-accent:hover { background: var(--accent-hover); filter: none; } .btn-accent:hover { background: var(--accent-hover); filter: none; }
.logo { display: inline-grid; flex: none; } .logo { display: inline-grid; flex: none; }
.logo svg { display: block; } .logo svg { display: block; }
@ -456,13 +472,10 @@ h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .b
.how-panel { background: var(--canvas); border: 1px solid color-mix(in srgb, var(--brand-3) 40%, transparent); } .how-panel { background: var(--canvas); border: 1px solid color-mix(in srgb, var(--brand-3) 40%, transparent); }
.steps li::before { background: var(--accent); color: #fff; } .steps li::before { background: var(--accent); color: #fff; }
.pay-logo { background: var(--paper); } .pay-logo { background: var(--paper); }
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, #1D3557, #29495E 60%, #457B9D); color: #fff; } .cta-band { position: relative; overflow: hidden; background: #111; color: #fff; }
.cta-band::after { content: ''; position: absolute; right: -60px; bottom: -120px; width: 280px; height: 280px; border-radius: 50%; background: #A8DADC; opacity: .18; pointer-events: none; } .cta-band::after { content: ''; position: absolute; right: -60px; bottom: -120px; width: 280px; height: 280px; border-radius: 50%; background: #fff; opacity: .12; pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; } .cta-band > * { position: relative; z-index: 1; }
.continue { background: linear-gradient(120deg, #1D3557, #29495E); color: #fff; }
.continue .bar > i { background: #A8DADC; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); } .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.ccard:hover .ccard-cta { background: var(--accent); border-color: var(--accent); color: #fff; }
.pay-mark { width: 48px; height: 28px; flex: none; display: grid; place-items: center; } .pay-mark { width: 48px; height: 28px; flex: none; display: grid; place-items: center; }
.pay-mark img { width: 48px; height: 28px; object-fit: contain; } .pay-mark img { width: 48px; height: 28px; object-fit: contain; }
.pay-logo { padding: 8px 14px 8px 10px; } .pay-logo { padding: 8px 14px 8px 10px; }
@ -481,10 +494,6 @@ h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .b
.foot-people { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 16px 48px; } .foot-people { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 16px 48px; }
.foot-people strong { display: block; color: var(--ink); } .foot-people strong { display: block; color: var(--ink); }
.foot-people span { font-size: var(--fs-sm); color: var(--ink-3); } .foot-people span { font-size: var(--fs-sm); color: var(--ink-3); }
.foot-box { width: 100%; max-width: 340px; justify-self: end; }
.foot-box svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(29, 53, 87, .18)); transition: transform .4s ease; }
.foot-box:hover svg { transform: rotate(-1.5deg) translateY(-4px); }
@media (max-width: 859px) { .foot-box { max-width: 260px; justify-self: start; } }
.foot-cols { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-cols { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .foot-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } } @media (min-width: 760px) { .foot-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.foot-cols h3 { font-family: var(--f-latin); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; } .foot-cols h3 { font-family: var(--f-latin); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
@ -529,24 +538,716 @@ fieldset[disabled] .quiz-opt { cursor: default; }
.btn:active, .icon-btn:active, .seg button:active, .quiz-opt:active { transform: scale(0.97); } .btn:active, .icon-btn:active, .seg button:active, .quiz-opt:active { transform: scale(0.97); }
.ccard:active, .cat-card:active { transform: scale(0.99); } .ccard:active, .cat-card:active { transform: scale(0.99); }
/* lift-on-hover only where a real pointer can hover; touch screens kept the lift stuck after a tap */ /* lift-on-hover only where a real pointer can hover; touch screens kept the lift stuck after a tap */
@media (hover: none) { .ccard:hover, .cat-card:hover { transform: none; box-shadow: none; } .foot-box:hover svg { transform: none; } } @media (hover: none) { .ccard:hover, .cat-card:hover { transform: none; box-shadow: none; } }
.ch > summary svg { transition: transform 200ms var(--ease-out); } .ch > summary svg { transition: transform 200ms var(--ease-out); }
/* toast slides up from where it sits instead of popping in */ /* toast slides up from where it sits instead of popping in */
.toast { transition: opacity 200ms var(--ease-out), translate 200ms var(--ease-out); } .toast { transition: opacity 200ms var(--ease-out), translate 200ms var(--ease-out); }
@starting-style { .toast { opacity: 0; translate: 0 8px; } } @starting-style { .toast { opacity: 0; translate: 0 8px; } }
/* course page: play button in the corner so it never covers the Ge'ez title */ /* play button in the corner so it never covers the Ge'ez title (landing hero and course page) */
.c-screen .play-big { left: auto; top: auto; right: 20px; bottom: 20px; transform: none; width: 56px; height: 56px; transition: transform 160ms var(--ease-out); } .hero-frame .play-big, .c-screen .play-big { left: auto; top: auto; right: 20px; bottom: 20px; transform: none; width: 56px; height: 56px; transition: transform 160ms var(--ease-out); }
.c-screen:hover .play-big { transform: scale(1.06); } .hero-frame:hover .play-big, .c-screen:hover .play-big { transform: scale(1.06); }
.c-screen .cover .ttl { max-width: calc(100% - 72px); } .hero-frame .cover .ttl, .c-screen .cover .ttl { max-width: calc(100% - 72px); }
/* small thumbnails (my courses, checkout): two short lines instead of a clipped third */ /* small thumbnails (my courses, checkout): two short lines instead of a clipped third */
.thumb .cover { padding: 10px; } .thumb .cover { padding: 10px; }
.thumb .cover .ttl { font-size: 15px; line-height: 1.3; -webkit-line-clamp: 2; } .thumb .cover .ttl { font-size: 15px; line-height: 1.3; -webkit-line-clamp: 2; }
/* phone course rows: square thumbnail that shows the title instead of an empty swatch */ /* phone course rows: square thumbnail that shows the title instead of an empty swatch */
@media (max-width: 599px) { @media (max-width: 599px) {
.ccard .cover { aspect-ratio: 1; padding: 8px; }
.ccard .cover .ttl { font-size: 13px; line-height: 1.3; -webkit-line-clamp: 3; max-width: 100%; }
.my-row .btn { flex: 1 1 100%; } .my-row .btn { flex: 1 1 100%; }
} }
.prog-head .grow { flex: 1 1 160px; } .prog-head .grow { flex: 1 1 160px; }
/* help: the phone button wraps instead of pushing "Copy" off the card */ /* help: the phone button wraps instead of pushing "Copy" off the card */
.row > .btn.grow { flex: 1 1 260px; } .row > .btn.grow { flex: 1 1 260px; }
/* ================= v6: audit 2026-10-16 phases 2–3 ================= */
/* Q1: compact footer on app screens */
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-left: auto; }
.foot-langs button { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); }
.foot-langs button[aria-current="true"] { color: var(--ink); font-weight: 700; }
/* Q3: numbers in the heading face (Atkinson Hyperlegible slashes its zero) */
.num, .statbar strong, .price { font-family: var(--f-head); font-feature-settings: 'tnum'; }
/* equal-weight hero CTAs on phones */
@media (max-width: 599px) { .hero-ctas > .btn { flex: 1 1 100%; } }
/* chips that scroll fade at the edge so the row reads as scrollable */
@media (max-width: 899px) { .chips { mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 24px; } }
/* UI motion under 300 ms */
.bar > i { transition: width 300ms var(--ease-out); }
.ring .fg { transition: stroke-dashoffset 300ms var(--ease-out); }
/* landing: one rhythm, a real palette in the hero, payment as cards */
.landing { display: flex; flex-direction: column; gap: clamp(72px, 8vw, 104px); }
.hero-still { max-width: 440px; width: 100%; justify-self: end; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 18px 40px rgba(0, 0, 0, .16); }
.hero-still img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.how-panel { display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
.how-panel .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .how-panel .steps { grid-template-columns: 1fr; } .hero-still { justify-self: center; } }
.pay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .pay-grid { grid-template-columns: 1fr; } }
.l-hero:has(.hero-still) + .statbar { margin-top: -28px; }
.pay-tile { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.pay-tile > span { display: flex; flex-direction: column; min-width: 0; }
.pay-tile strong { font-size: 14px; }
.pay-tile .pay-mark, .pay-opt .pay-mark { width: 52px; height: 32px; }
.pay-tile .pay-mark img, .pay-opt .pay-mark img { width: 52px; height: 32px; }
.pay-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 0; margin: 0; padding: 0; }
@media (max-width: 520px) { .pay-pick { grid-template-columns: 1fr; } }
.pay-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); cursor: pointer; }
.pay-opt input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pay-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pay-opt:has(input:checked)::after { content: ''; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); }
.pay-opt:has(input:checked)::before { content: ''; position: absolute; z-index: 1; top: 16px; right: 18.5px; width: 4px; height: 8px; border: solid var(--paper); border-width: 0 2px 2px 0; rotate: 45deg; }
.pay-opt:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.pay-opt-copy { display: flex; flex-direction: column; min-width: 0; }
.pay-opt-copy span { font-size: 13px; color: var(--ink-3); font-weight: 500; }
/* keep a number and its unit together */
.statbar strong { white-space: nowrap; }
@media (max-width: 599px) { .statbar strong { font-size: var(--fs-lg); } }
/* ---------- landing hero, 2026-10-20 (inspo: Hyper Effekt, Ferrari): headline set straight onto a moving reel of portraits ---------- */
.l-hero { --ink: #F5F5F5; --ink-2: #D6D6D6; --ink-3: #9A9A9A; --paper: #141414; --mist: #1C1C1C; --line: #3A3A3A; --accent: #FFFFFF; --accent-ink: #0A0A0A; --brand-2: #FFFFFF;
position: relative; overflow: hidden; isolation: isolate; color: var(--ink); background: #0A0A0A; margin: -12px calc(50% - 50vw + 12px) 0; border-radius: 28px;
min-height: min(88svh, 820px); display: flex; align-items: flex-end; padding: 0 clamp(20px, 5vw, 64px) clamp(28px, 5vw, 64px); }
.l-hero::before, .l-hero::after { display: none; }
.reel { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.reel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, .55), rgba(10, 10, 10, .05) 30%, rgba(10, 10, 10, .35) 55%, #0A0A0A 96%), linear-gradient(90deg, rgba(10, 10, 10, .7), transparent 60%); }
.reel-track { display: flex; gap: 12px; height: 100%; width: max-content; padding: 12px 0; animation: reel 60s linear infinite; }
.reel-track img { height: 100%; aspect-ratio: 3 / 4.4; object-fit: cover; object-position: center 22%; border-radius: 18px; flex: none; }
.reel-track img:nth-child(odd) { margin-top: 48px; height: calc(100% - 48px); }
.l-hero .hero-copy { align-items: flex-start; text-align: left; max-width: 720px; gap: 18px; }
.l-hero .live-pill { align-self: flex-start; }
.l-hero h1 { font-size: clamp(44px, 7.2vw, 96px); line-height: .96; letter-spacing: -.05em; max-width: 12ch; text-wrap: balance; }
.l-hero h1:lang(am), .l-hero h1:lang(ti) { line-height: 1.25; letter-spacing: 0; }
.l-hero .lead { max-width: 40ch; text-wrap: pretty; color: var(--ink-2); }
.l-hero .btn-ghost { background: rgba(10, 10, 10, .45); backdrop-filter: blur(8px); }
.l-hero .btn-ghost:hover { background: #1C1C1C; }
.l-hero .play-dot { background: #fff; color: #0A0A0A; }
.l-hero + .statbar { margin-top: 16px; }
@media (max-width: 760px) {
.l-hero { margin-top: -8px; border-radius: 22px; min-height: 86svh; padding: 0 18px 24px; }
.reel-track { animation-duration: 40s; gap: 8px; }
.reel-track img { border-radius: 14px; }
.reel-track img:nth-child(odd) { margin-top: 28px; height: calc(100% - 28px); }
.reel::after { background: linear-gradient(180deg, rgba(10, 10, 10, .5), transparent 22%, rgba(10, 10, 10, .55) 48%, #0A0A0A 82%); }
}
@media (prefers-reduced-motion: reduce) { .reel-track { animation: none; } }
/* ---------- landing 2026-10-20: one font, Habesha photos, live language pill, photo categories, payment stage, both themes ---------- */
:root[data-theme="dark"] .l-hero { box-shadow: inset 0 0 0 1px #1F1F1F; }
.live-pill { align-self: center; text-decoration: none; transition: border-color 160ms, background 160ms; display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 6px; border-radius: var(--r-pill); border: 1px solid #3A3A3A; background: rgba(10, 10, 10, .6); backdrop-filter: blur(8px); font-size: var(--fs-sm); font-weight: 600; color: #F5F5F5; min-width: 0; }
.live-pill .faces { display: flex; }
.live-pill .faces img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 2px solid #0A0A0A; margin-left: -9px; filter: grayscale(.7) brightness(.8); transition: filter 400ms var(--ease-out), transform 400ms var(--ease-out); }
.live-pill .faces img:first-child { margin-left: 0; }
.live-pill .faces img.on { filter: none; transform: translateY(-3px) scale(1.12); z-index: 1; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: live 2s infinite; flex: none; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.live-pill:hover { border-color: #5A5A5A; background: rgba(26, 26, 26, .8); }
.live-pill > svg { color: #8A8A8A; margin-left: -4px; }
@media (min-width: 760px) { .l-hero + .statbar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.look-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
@media (max-width: 560px) { .look-grid { grid-template-columns: 1fr 1fr; } }
.look { position: relative; display: block; aspect-ratio: 3 / 4.2; border: 0; padding: 0; border-radius: 20px; overflow: hidden; background: var(--mist); cursor: pointer; text-align: left; color: #fff; isolation: isolate; }
.look img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; z-index: -1; transition: transform 700ms var(--ease-out); }
.look::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .78)); }
.look:hover img { transform: scale(1.05); }
.look-copy { position: absolute; left: 18px; right: 56px; bottom: 18px; display: flex; flex-direction: column; gap: 2px; }
.look-copy strong { font-size: var(--fs-lg); line-height: 1.2; }
.look-copy span { font-size: var(--fs-sm); color: rgba(255, 255, 255, .78); }
.look-go { position: absolute; right: 14px; bottom: 16px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #0A0A0A; transition: transform 200ms var(--ease-out); }
.look:hover .look-go { transform: translateX(3px); }
@media (max-width: 520px) { .look { aspect-ratio: 4 / 5; } .look-copy strong { font-size: var(--fs-base); } }
/* steps: three photo cards; payment marks live inside step 2 instead of a whole panel */
.steps3 { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; counter-reset: s; }
.step { counter-increment: s; position: relative; isolation: isolate; overflow: hidden; border-radius: 22px; min-height: 360px; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; color: #fff; background: #141414; }
.step > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; z-index: -2; transition: transform 700ms var(--ease-out); }
.step::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 30%, rgba(0, 0, 0, .85)); }
.step:hover > img { transform: scale(1.04); }
.step::before { content: '0' counter(s); position: absolute; top: 16px; left: 18px; font-family: var(--f-head); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: var(--r-pill); background: rgba(10, 10, 10, .55); backdrop-filter: blur(6px); }
.step strong { font-size: clamp(20px, 2vw, 24px); line-height: 1.15; letter-spacing: -.02em; }
.step-pay { display: flex; flex-wrap: wrap; gap: 6px; }
.step-pay .pay-mark { width: 44px; height: 28px; border-radius: 7px; background: #fff; padding: 3px 5px; }
.step-pay .pay-mark img { width: 100%; height: 100%; }
@media (max-width: 760px) {
.steps3 { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; scrollbar-width: none; }
.steps3::-webkit-scrollbar { display: none; }
.step { scroll-snap-align: start; min-height: 320px; }
}
.cta-photo { position: relative; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: flex-end; min-height: 340px; padding: clamp(28px, 4vw, 48px); border-radius: 28px; overflow: hidden; color: #fff; isolation: isolate; }
.cta-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; z-index: -2; }
.cta-photo::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .2) 70%), linear-gradient(transparent 40%, rgba(0, 0, 0, .5)); }
.cta-photo h2 { font-size: clamp(30px, 4.4vw, 52px); letter-spacing: -.04em; line-height: 1.05; max-width: 14ch; }
.cta-photo p { color: rgba(255, 255, 255, .82); max-width: 40ch; }
.cta-photo .btn-accent { background: #fff; color: #0A0A0A; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } .live-pill .faces img { transition: none; } }
/* Sirkul logo: black ink PNG, flipped to white on dark grounds */
.logo img { display: block; width: auto; max-width: none; }
:root[data-theme="dark"] .logo img, .auth-side .logo img { filter: invert(1); }
.brand .logo img { max-height: 44px; }
.foot-word .logo img { max-width: min(100%, 360px); height: auto !important; }
/* header: full wordmark at the top of the page, crossfades to the "Sm" monogram once scrolled (.s-top.scrolled) */
.brand { display: grid !important; place-items: center start; }
.brand > .logo { grid-area: 1 / 1; display: inline-grid !important; max-width: none; overflow: visible; transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out); transform-origin: left center; }
.brand > .logo + .logo { opacity: 0; transform: scale(.85); pointer-events: none; }
.brand > .logo + .logo img { height: 40px !important; max-height: none; }
.s-top.scrolled .brand > .logo:first-child { opacity: 0; transform: scale(.9) translateY(-4px); }
.s-top.scrolled .brand > .logo + .logo { opacity: 1; transform: none; }
@media (max-width: 600px) { .brand > .logo:first-child img { height: 34px !important; } }
@media (prefers-reduced-motion: reduce) { .brand > .logo { transition: none; } }
/* ---------- footer 2026-10-20 (inspo: Little Amps Coffee): framed card, starter-kit card in place of a player, student-work reel ---------- */
.foot-full { --frame: #0A0A0A; background: var(--frame); border: 0; margin-top: 64px; padding: 16px 16px 0; color: var(--ink); }
:root[data-theme="dark"] .foot-full { --frame: #000; }
.foot-card { max-width: 1400px; margin: 0 auto; background: var(--paper); border-radius: 24px; padding: clamp(24px, 4vw, 48px); display: grid; gap: 40px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(320px, 1.1fr); }
:root[data-theme="dark"] .foot-card { background: #141414; }
@media (max-width: 1100px) { .foot-card { grid-template-columns: 1fr 1fr; } .kit-card { grid-column: 1 / -1; } }
@media (max-width: 700px) { .foot-card { grid-template-columns: 1fr; } }
.foot-brand { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.foot-full .foot-word { display: flex; align-items: flex-end; gap: 10px; }
.foot-full .foot-word .logo { width: 280px; max-width: calc(100% - 66px); }
.foot-full .foot-word .logo img { width: 100%; height: auto !important; }
.foot-icon { flex: none; }
.foot-icon { color: var(--ink); transform: rotate(-8deg); margin-bottom: 6px; }
.foot-full .foot-tag { margin: 0; color: var(--ink-2); font-weight: 600; }
.foot-contact { margin-top: auto; padding-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: var(--fs-sm); }
.foot-contact a, .foot-contact span { color: var(--ink-2); text-decoration: none; }
.foot-contact a:hover { color: var(--ink); }
.foot-chip { display: inline-block; margin-bottom: 8px; padding: 3px 8px; border-radius: 4px; background: var(--ink); color: var(--paper) !important; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.foot-full .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.foot-full .foot-cols > div:last-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 16px; align-items: baseline; }
.foot-full .foot-cols > div:last-child h3 { width: 100%; }
.foot-full .foot-cols button, .foot-full .foot-cols a { color: var(--ink-2); font-size: var(--fs-base); }
.foot-full .foot-cols button:hover, .foot-full .foot-cols a:hover { color: var(--ink); }
.kit-card { background: #1E1E1E; color: #F5F5F5; border-radius: 18px; overflow: hidden; align-self: start; }
:root[data-theme="dark"] .kit-card { background: #1C1C1C; box-shadow: inset 0 0 0 1px #2A2A2A; }
.kit-top { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; padding: 18px 18px 20px; background: #2A2A2A; }
.kit-cover { display: grid; grid-template-columns: 1fr 1fr; width: 120px; height: 120px; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.kit-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.kit-head { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; padding-right: 28px; }
.kit-head h3 { font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.03em; line-height: 1.1; }
.kit-head p { color: #B5B5B5; font-size: var(--fs-sm); }
.kit-badge { position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #111; }
.kit-tag { position: absolute; left: 18px; bottom: -11px; padding: 2px 8px; border-radius: 4px; background: #111; font-size: 11px; font-weight: 700; z-index: 1; }
.kit-go { position: absolute; right: 18px; bottom: -24px; z-index: 1; width: 52px; height: 52px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #fff; color: #111; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); transition: transform 160ms var(--ease-out); }
.kit-go:hover { transform: scale(1.06); } .kit-go:active { transform: scale(.96); }
.kit-list { list-style: none; margin: 0; padding: 18px 18px 8px; }
.kit-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 0; }
.kit-list li + li { border-top: 1px solid #2C2C2C; }
.kit-list svg { color: #CFCFCF; }
.kit-n { color: #8A8A8A; font-size: var(--fs-sm); }
.kit-item { display: flex; flex-direction: column; min-width: 0; }
.kit-item strong { font-size: var(--fs-base); font-weight: 600; }
.kit-item span { font-size: 13px; color: #9A9A9A; }
@media (max-width: 420px) { .kit-top { grid-template-columns: 88px minmax(0, 1fr); } .kit-cover { width: 88px; height: 88px; } }
.foot-strip { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 20px 0; }
.foot-bubble { flex: none; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 22px; border-radius: 999px; background: #fff; color: #111; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.foot-bubble strong { font-size: 13px; }
.foot-bubble span { color: #555; letter-spacing: .04em; text-transform: none; font-size: 12px; }
.foot-bubble::after { content: ''; position: absolute; left: 22px; bottom: -6px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); border-radius: 2px; }
.foot-reel { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.foot-reel > div { display: flex; gap: 12px; width: max-content; animation: reel 60s linear infinite; }
.foot-reel:hover > div { animation-play-state: paused; }
.foot-reel img { width: 120px; height: 120px; flex: none; object-fit: cover; object-position: center 25%; border-radius: 10px; }
@keyframes reel { to { transform: translateX(calc(-50% - 6px)); } }
@media (max-width: 600px) { .foot-strip { flex-direction: column; align-items: stretch; } .foot-bubble { align-self: flex-start; } .foot-reel img { width: 96px; height: 96px; } }
.foot-bar { max-width: 1400px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 14px 0 calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #1F1F1F; color: #9A9A9A; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 899px) { .foot-bar { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
.foot-credits summary { cursor: pointer; list-style: none; } .foot-credits summary::-webkit-details-marker { display: none; }
.foot-credits summary:hover { color: #fff; }
.foot-credits p { margin-top: 8px; max-width: 70ch; text-transform: none; letter-spacing: 0; line-height: 1.5; }
.foot-credits a { color: #C9C9C9; }
@media (prefers-reduced-motion: reduce) { .foot-reel > div { animation: none; } }
@media (max-width: 480px) {
.live-pill { font-size: 13px; padding-right: 12px; white-space: nowrap; }
.live-pill .faces img:nth-child(n+3) { display: none; }
.look-go { display: none; }
.look-copy { right: 14px; left: 14px; bottom: 14px; }
}
/* ---------- course detail 2026-10-20 (user reference): info card + segmented tabs left, sticky purchase card right ---------- */
.cd { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "head side" "body side"; align-items: start; }
@media (max-width: 1023px) { .cd { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "side" "body"; } }
.cd-head, .cd-buy, .cd-body { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; }
:root[data-theme="dark"] .cd-head, :root[data-theme="dark"] .cd-buy, :root[data-theme="dark"] .cd-body { background: #111; }
.cd-head { grid-area: head; padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 28px) 0; display: flex; flex-direction: column; gap: 16px; }
.cd-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cd .crumbs { gap: 8px; font-size: 13px; }
.cd .crumbs button { padding: 0; font-weight: 500; }
.cd .crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; background: var(--mist); font-size: 12px; font-weight: 700; }
.cd-head h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.03em; max-width: 22ch; }
.cd-head h1:lang(am), .cd-head h1:lang(ti) { line-height: 1.35; letter-spacing: 0; }
.cd-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.cd-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--fs-sm); color: var(--ink-2); }
.cd-pill svg { color: var(--ink-3); } .cd-pill strong { color: var(--ink); }
.cd-lead { color: var(--ink-2); max-width: 70ch; }
.cd-by { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px calc(-1 * clamp(20px, 3vw, 28px)) 0; padding: 16px clamp(20px, 3vw, 28px); border-top: 1px solid var(--line); }
.cd-by-txt { display: flex; flex-direction: column; line-height: 1.3; }
.cd-by-txt em { font-size: 12px; color: var(--ink-3); }
.cd-updated { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.cd-side { grid-area: side; position: sticky; top: 84px; }
@media (max-width: 1023px) { .cd-side { position: static; } }
.cd-buy { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.cd-preview { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; border: 0; padding: 0; border-radius: 16px; overflow: hidden; background: var(--mist); cursor: pointer; }
.cd-preview[disabled] { cursor: default; }
.cd-preview img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform 600ms var(--ease-out); }
.cd-preview:hover img { transform: scale(1.03); }
.cd-preview-pill { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px; background: rgba(20, 20, 20, .55); backdrop-filter: blur(10px); color: #fff; font-size: 13px; font-weight: 600; }
.cd-preview-pill i { width: 1px; height: 14px; background: rgba(255, 255, 255, .4); }
.cd-price { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 4px 4px 0; }
.cd-price .num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.cd-price > span:last-child { font-weight: 700; font-size: var(--fs-sm); color: var(--ink-2); }
.cd-cta { display: flex; gap: 10px; }
.cd-cta .btn { flex: 1; border-radius: 999px; min-height: 54px; }
.cd-buy .btn-ghost.btn-block { border-radius: 999px; }
.cd-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); padding: 0 4px; }
.cd-includes { padding: 6px 4px 4px; display: flex; flex-direction: column; gap: 10px; }
.cd-includes h2 { font-size: var(--fs-base); }
.cd-includes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cd-includes li { display: flex; align-items: center; gap: 12px; color: var(--ink-2); }
.cd-includes li svg { color: var(--ink-3); flex: none; }
.cd-body { grid-area: body; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cd-body > .banner { margin: 8px 8px 0; }
.cd-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--mist); }
.cd-tabs button { border: 0; background: none; padding: 12px 10px; border-radius: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background 160ms, color 160ms, box-shadow 160ms; }
.cd-tabs button:hover { color: var(--ink); }
.cd-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .06); }
:root[data-theme="dark"] .cd-tabs button[aria-selected="true"] { background: #262626; }
.cd-pane { padding: 20px clamp(12px, 2vw, 20px) 20px; display: flex; flex-direction: column; gap: 16px; }
.cd-pane h2 { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xl); letter-spacing: -.02em; }
.cd-learn { list-style: none; margin: 0; padding: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; background: var(--mist); border-radius: 16px; }
@media (max-width: 640px) { .cd-learn { grid-template-columns: 1fr; } }
.cd-learn li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.cd-learn li svg { flex: none; margin-top: 3px; color: var(--ink); }
.cd-content { padding-top: 12px; gap: 0; }
.cd-content > p { padding: 0 4px 10px; }
.cd-content .ch { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 8px; }
.cd-content .ch:last-child { border-bottom: 1px solid var(--line); }
/* covers: a category photo until courses have uploaded art */
.cover.has-img { background: var(--mist); }
.cover.has-img img { object-position: center 25%; }
.cover.has-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .18), transparent 40%); pointer-events: none; }
.cover .pill { z-index: 1; }
/* checkout: same two cards as the course page */
.co { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "head side"; align-items: start; }
@media (max-width: 1023px) { .co { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "side"; } }
.co-main { padding-bottom: clamp(20px, 3vw, 28px); }
.co-main h1 { font-size: clamp(26px, 3vw, 34px); }
.co-title { font-size: var(--fs-lg); line-height: 1.25; }
.co-total { padding-top: 12px; border-top: 1px solid var(--line); }
.co-total strong { font-size: 26px; font-weight: 800; }
.co .cd-preview { aspect-ratio: 16 / 9; cursor: default; }
/* sign-in: a portrait behind the side panel */
.auth-side { position: relative; overflow: hidden; isolation: isolate; }
.auth-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; z-index: -2; }
.auth-side::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .15) 30%, rgba(0, 0, 0, .85) 72%); }
@media (max-width: 480px) {
.cd-tabs button { padding: 10px 4px; font-size: 14px; }
.cd-pane h2 { font-size: var(--fs-lg); }
.co .cd-preview { display: none; }
}
/* ---------- mobile-first pass 2026-10-20 (inspo: Coursera / Babbel phone rails) ---------- */
@media (max-width: 560px) {
/* categories: a swipeable rail instead of a 2-up grid that orphans the third card */
.look-grid { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; scrollbar-width: none; }
.look-grid::-webkit-scrollbar { display: none; }
.look { scroll-snap-align: start; }
/* stats: one row of three, icon over number */
.l-hero + .statbar { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; }
.statbar > div { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 10px; }
.statbar .stat-ic { width: 36px; height: 36px; border-radius: 10px; }
}
/* "Powered by Yaltopia Tech": a light band sweeps across the name every few seconds */
.powered { text-align: center; font-size: 12px; color: var(--ink-3); padding: 18px 16px 4px; letter-spacing: .04em; }
.shine { font-weight: 700; text-decoration: none; color: transparent; background: linear-gradient(110deg, var(--ink-2) 40%, #fff 50%, var(--ink-2) 60%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: shine 3.2s linear infinite; }
:root:not([data-theme="dark"]) .shine { background-image: linear-gradient(110deg, var(--ink) 40%, #B9B9B9 50%, var(--ink) 60%); }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .shine { animation: none; color: var(--ink); background: none; } }
/* ---------- 2026-10-20 pass 3: stats, pay strip, course hero, help ---------- */
/* stats: three big numbers on hairlines, no tiles */
.l-hero + .statbar { background: none; box-shadow: none; border-radius: 0; padding: 0; margin-top: 8px; border-block: 1px solid var(--line); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.statbar > div { flex-direction: column; align-items: flex-start; gap: 4px; padding: clamp(18px, 3vw, 32px) clamp(12px, 3vw, 32px); }
.statbar > div + div { border-left: 1px solid var(--line); }
.statbar strong { font-size: clamp(30px, 5vw, 64px) !important; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.statbar span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
/* pay strip: every method named, nothing clipped, wraps instead of scrolling */
.pay-strip { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; }
.pay-strip h3 { font-size: var(--fs-base); }
.pay-strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pay-strip li { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 14px; background: var(--mist); font-weight: 600; font-size: var(--fs-sm); min-width: 0; }
.pay-strip .pay-mark { flex: none; width: 48px; height: 32px; border-radius: 8px; background: #fff; padding: 4px 6px; }
.pay-strip .pay-mark img { width: 100%; height: 100%; }
@media (max-width: 420px) { .pay-strip ul { grid-template-columns: 1fr 1fr; } }
/* course: the title sits on the course photo (same move as the landing hero) */
.cd-head { position: relative; overflow: hidden; isolation: isolate; border: 0; background: #0A0A0A; min-height: clamp(380px, 52vh, 480px); justify-content: flex-end; color: #F5F5F5;
--ink: #F5F5F5; --ink-2: #D6D6D6; --ink-3: #A3A3A3; --line: rgba(255, 255, 255, .16); --mist: rgba(255, 255, 255, .1); }
.cd-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; z-index: -2; }
.cd-head::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 10, 10, .55), rgba(10, 10, 10, .1) 30%, rgba(10, 10, 10, .75) 62%, #0A0A0A); }
.cd-head .cd-top { margin-bottom: auto; }
.cd-head .cd-pill { background: rgba(10, 10, 10, .45); backdrop-filter: blur(8px); }
.cd-hero-play { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 18px 6px 6px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(10, 10, 10, .45); backdrop-filter: blur(8px); color: #fff; font-weight: 700; cursor: pointer; }
.cd-hero-play .play-dot { background: #fff; color: #0A0A0A; }
.cd-hero-play:hover { background: rgba(30, 30, 30, .7); }
/* phones/tablets: a buy (or continue) bar replaces the app tabs */
.cd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--line); }
.cd-bar-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.cd-bar-txt strong { font-size: var(--fs-lg); }
.cd-bar-txt span { font-size: 12px; color: var(--ink-3); }
.cd-bar .btn { border-radius: 999px; min-height: 48px; padding-inline: 22px; }
@media (min-width: 1024px) { .cd-bar { display: none; } }
/* ---------- course page polish 2026-10-26 (P1–P5) ---------- */
/* P1: the bar repeats the buy card's button, so it steps aside while that button is on screen */
.cd-bar { transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out); }
.cd-bar[data-hidden="true"] { transform: translateY(100%); opacity: 0; pointer-events: none; }
/* P2: price once, with its terms underneath */
.cd-price { flex-direction: column; align-items: flex-start; gap: 2px; }
.cd-price > span:last-child { font-weight: 600; color: var(--ink-3); }
/* P4: owners see the next lesson instead of the sales list */
.cd-next { margin: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--mist); }
.cd-next > span:first-child { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cd-next > .num { font-size: var(--fs-sm); color: var(--ink-3); }
/* P5: what the instructor tab said, in the creator row */
.cd-by-n { font-size: 12px; color: var(--ink-3); }
/* P3: desktop keeps tabs (one section at a time); phones drop them and stack every section in one scroll */
.cd-pane-h { margin-bottom: 4px; }
@media (min-width: 1024px) { .cd-pane[data-active="false"], .cd-pane-h { display: none; } }
@media (max-width: 1023px) {
.cd-tabs { display: none; }
.cd-body { gap: 0; }
.cd-body.is-owner > .cd-content { order: -1; } /* P4: owners land on the curriculum */
}
/* P8: share is a quiet glass button in the hero corner, matching the preview pill */
.cd-top { flex-wrap: nowrap; align-items: flex-start; }
.cd-top > .crumbs { flex: 1; min-width: 0; }
.cd-top > .row { margin-left: auto; flex-wrap: nowrap; }
.cd-share { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(10, 10, 10, .45); backdrop-filter: blur(8px); color: #fff; cursor: pointer; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.cd-share:active { transform: scale(.96); }
.cd-head .cd-pill-own { background: rgba(245, 245, 245, .92); border-color: transparent; color: #0A0A0A; }
.cd-head .cd-pill-own svg, .cd-head .cd-pill-own strong { color: #0A0A0A; }
@media (hover: hover) and (pointer: fine) { .cd-share:hover { background: rgba(30, 30, 30, .7); } }
/* P9: the prerequisite, said where the buying decision happens */
.cd-prereq { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--mist); font-size: var(--fs-sm); color: var(--ink-2); }
.cd-prereq > svg { flex: none; margin-top: 3px; color: var(--ink-3); }
.cd-prereq .link { font-weight: 700; }
/* P6: "last updated" closes the About section */
.cd-pane .cd-updated { margin: 0; }
/* P7: quiz rows inside chapters reuse the lesson row; their result is a tag, not a block line */
.lesson-row .lr-tag.quiz-ok, .lesson-row .lr-tag.quiz-todo { display: inline-block; font-weight: 600; }
/* help: big ask, three contact doors, FAQ beside the report form */
.help { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }
.help-hero { display: flex; flex-direction: column; gap: 10px; padding-top: clamp(8px, 3vw, 32px); }
.help-hero h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -.045em; line-height: 1; }
.help-hero .lead { color: var(--ink-2); max-width: 48ch; font-size: var(--fs-lg); }
.help-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.help-contact li { position: relative; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); transition: border-color 160ms, transform 160ms var(--ease-out); }
.help-contact li:hover { border-color: var(--ink-3); }
.help-contact a { display: flex; flex-direction: column; gap: 4px; padding: 20px; min-height: 150px; color: inherit; text-decoration: none; border-radius: inherit; }
.help-contact a strong { margin-top: auto; font-size: var(--fs-lg); }
.help-contact a span:last-child { color: var(--ink-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.hc-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--mist); margin-bottom: 16px; }
.help-contact li > :not(a) { position: absolute; top: 16px; right: 16px; }
.help-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .help-grid { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.help-faq h2 { font-size: var(--fs-xl); margin-bottom: 4px; }
.help-faq details { padding: 18px 0; }
.help-faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: var(--fs-lg); }
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary svg { flex: none; color: var(--ink-3); transition: transform 200ms var(--ease-out); }
.help-faq details[open] summary svg { transform: rotate(45deg); }
@media (max-width: 760px) { .cd-head { min-height: 560px; } .cd-hero-img { height: 62%; object-position: center 20%; } .cd-head::after { background: linear-gradient(180deg, rgba(10, 10, 10, .5), transparent 25%, rgba(10, 10, 10, .2) 42%, #0A0A0A 62%); } }
/* ---------- menu sheet 2026-10-20: quiet header, preferences behind the menu button ---------- */
.s-actions { gap: 6px; }
.sheet { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.sheet::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet-in 320ms var(--ease-out); }
.sheet[open]::backdrop { animation: fade-in 320ms ease; }
@keyframes sheet-in { from { transform: translateX(32px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
.sheet-in { height: 100%; display: flex; flex-direction: column; gap: 28px; padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; }
.sheet-nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.sheet-nav button { display: flex; align-items: baseline; gap: 16px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink-2); font-family: var(--f-head); font-size: clamp(28px, 8vw, 36px); font-weight: 600; letter-spacing: -.035em; text-align: left; cursor: pointer; transition: color 160ms, padding 240ms var(--ease-out); }
.sheet-nav button .num { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--ink-3); width: 24px; flex: none; }
.sheet-nav button:hover, .sheet-nav button[aria-current="page"] { color: var(--ink); padding-left: 6px; }
.sheet-nav button[aria-current="page"]::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); align-self: center; margin-left: auto; }
.sheet-prefs { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.sheet-row:has(.feedback-btn:empty), .sheet-row:not(:has(button, select)) { display: none; }
.sheet-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--ink-3); }
.sheet-foot a { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .sheet[open], .sheet[open]::backdrop { animation: none; } }
/* ---------- profile + history (mobile first) ---------- */
.pf { display: flex; flex-direction: column; gap: 28px; }
.pf-hero { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 24px; background: linear-gradient(135deg, var(--mist), transparent 70%); border: 1px solid var(--line); }
.pf-avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--f-head); font-size: 22px; font-weight: 700; letter-spacing: -.02em; box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--line); }
.pf-id { min-width: 0; }
.pf-id h1, .pf-head h1 { font-size: clamp(26px, 5vw, 44px); letter-spacing: -.04em; line-height: 1.05; }
.pf-id p { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 4px; }
.pf-head { display: flex; flex-direction: column; gap: 6px; }
.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--line); }
.pf-stats > div { padding: 16px 12px; display: flex; flex-direction: column-reverse; gap: 4px; min-width: 0; }
.pf-stats > div + div { border-left: 1px solid var(--line); }
.pf-stats dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.pf-stats dd { margin: 0; font-size: clamp(24px, 5vw, 44px); font-weight: 700; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }
.pf-sec { display: flex; flex-direction: column; gap: 14px; }
.pf-sec h2, .pf-h { font-size: var(--fs-xl); letter-spacing: -.02em; }
.pf-courses { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .pf-courses { grid-template-columns: 1fr 1fr; } }
.pf-course { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "img main" "btn btn" "more more"; gap: 12px 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.pf-course > img { grid-area: img; width: 72px; height: 88px; object-fit: cover; object-position: center 20%; border-radius: 14px; }
.pf-c-main { grid-area: main; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pf-course > .btn { grid-area: btn; border-radius: 999px; min-height: 44px; }
.pf-more { grid-area: more; border-top: 1px solid var(--line); padding-top: 4px; }
.pf-more summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); cursor: pointer; }
.pf-more summary::-webkit-details-marker { display: none; }
.pf-more summary svg { transition: transform 200ms var(--ease-out); }
.pf-more[open] summary svg { transform: rotate(180deg); }
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-day { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 18px 0 6px; }
.tl li:first-child .tl-day { padding-top: 0; }
.tl-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; cursor: pointer; min-height: 56px; }
.tl-row:disabled { cursor: default; }
.tl-row > svg { color: var(--ink-3); flex: none; }
.tl-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--mist); color: var(--ink-2); }
.tl-check { background: var(--ink); color: var(--paper); }
.tl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); line-height: 1.4; }
/* ---------- social sign-in ---------- */
.social { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.social-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; transition: background 160ms, border-color 160ms; }
.social-btn:hover { background: var(--mist); border-color: var(--ink-3); }
.social-btn svg { flex: none; }
/* first-visit language picker */
.lang-welcome { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 28px; background: var(--paper); color: var(--ink); overflow: hidden; }
.lang-welcome[open] { display: grid; grid-template-columns: 1fr; animation: sheet-in 360ms var(--ease-out); }
.lang-welcome::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(8px); }
.lang-welcome > img { width: 100%; height: 160px; object-fit: cover; object-position: center 22%; }
.lw-body { display: flex; flex-direction: column; gap: 20px; padding: 20px 20px 24px; }
.lw-body h2 { font-size: clamp(28px, 6vw, 40px); letter-spacing: -.04em; line-height: 1.05; }
.lw-body p { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--ink-3); font-size: var(--fs-sm); }
.lw-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.lw-list button { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-size: var(--fs-lg); font-weight: 600; cursor: pointer; transition: padding 240ms var(--ease-out); }
.lw-list button:hover, .lw-list button:focus-visible { padding-left: 10px; }
.lw-list button[aria-current="true"] svg { color: var(--ink); } .lw-list button svg { color: var(--ink-3); }
@media (min-width: 700px) { .lang-welcome[open] { grid-template-columns: 1fr 1.2fr; } .lang-welcome > img { height: 100%; min-height: 460px; } .lw-body { padding: 32px; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .lang-welcome[open] { animation: none; } }
/* ---------- guided tour ---------- */
.tour { position: fixed; inset: 0; z-index: 60; }
.tour-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); animation: fade-in 240ms ease; }
.tour-ring { position: fixed; border-radius: 18px; box-shadow: 0 0 0 2px #fff, 0 0 0 9999px rgba(0, 0, 0, .7); transition: top 420ms var(--ease-out), left 420ms var(--ease-out), width 420ms var(--ease-out), height 420ms var(--ease-out); pointer-events: none; }
.tour-card { position: fixed; left: 16px; right: 16px; margin: 0 auto; max-width: 380px; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 22px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); animation: sheet-in 320ms var(--ease-out); }
.tour-card.at-bottom { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.tour-card.at-top { top: 76px; }
.tour-card.at-center { top: 50%; transform: translateY(-50%); }
.tour-card h2 { font-size: var(--fs-xl); letter-spacing: -.03em; line-height: 1.1; }
.tour-card p { color: var(--ink-2); }
.tour-dots { display: flex; gap: 6px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width 300ms var(--ease-out), background 300ms; }
.tour-dots i.on { width: 20px; background: var(--ink); }
.tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tour-actions .btn { border-radius: 999px; min-height: 44px; padding-inline: 18px; }
@media (min-width: 900px) { .tour-card.at-bottom { bottom: 32px; } }
@media (prefers-reduced-motion: reduce) { .tour-ring, .tour-card, .tour-dim { transition: none; animation: none; } }
/* ---------- course card (C1–C4, 2026-10-27): the one place card styles live ----------
Photo on top with the category and a "new course" / students tag on it; one quiet info line; the footer is the
price, or progress plus the next lesson once owned. Phones show a compact row unless the card is .ccard-tall. */
.ccard { display: flex; flex-direction: column; min-width: 0; padding: 0; text-align: start; cursor: pointer; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.ccard .cover { aspect-ratio: 16 / 9; border-radius: 0; overflow: hidden; }
.ccard .cover img { transition: transform 700ms var(--ease-out); }
.ccard-tag { position: absolute; z-index: 1; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(10, 10, 10, .62); backdrop-filter: blur(8px); color: #F5F5F5; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ccard-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; min-width: 0; flex: 1; }
.ccard h3 { font-size: var(--fs-lg); line-height: 1.25; letter-spacing: -.02em; }
.ccard .meta { font-size: var(--fs-sm); color: var(--ink-3); }
.ccard-by { font-size: var(--fs-sm); color: var(--ink-2); }
.ccard-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.ccard-foot > strong { font-size: var(--fs-lg); }
.ccard-next { font-size: var(--fs-sm); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard-next b { color: var(--ink); font-weight: 700; }
.ccard-prog { display: flex; align-items: center; gap: 10px; }
@media (hover: hover) and (pointer: fine) {
.ccard:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); border-color: transparent; }
.ccard:hover .cover img { transform: scale(1.05); }
}
/* phones: compact row (square thumbnail beside the text), except tall cards in a rail */
@media (max-width: 599px) {
.ccard:not(.ccard-tall) { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0 12px; align-items: start; padding: 8px; border-radius: 18px; }
.ccard:not(.ccard-tall) .cover { aspect-ratio: 1; border-radius: 12px; padding: 8px; }
.ccard:not(.ccard-tall) .cover .pill { display: none; }
.ccard:not(.ccard-tall) .ccard-tag { left: 6px; right: 6px; bottom: 6px; padding: 2px 6px; font-size: 11px; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.ccard:not(.ccard-tall) .ccard-body { padding: 2px 0; gap: 4px; }
.ccard:not(.ccard-tall) h3 { font-size: var(--fs-base); }
.ccard:not(.ccard-tall) .ccard-by { display: none; }
.ccard:not(.ccard-tall) .ccard-foot { padding-top: 8px; gap: 6px; }
}
/* C4: home Featured is a swipe rail of tall cards; the next card peeks past the edge */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (max-width: 599px) { .rail { grid-auto-columns: 78%; gap: 12px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; } }
/* ---------- how it works: abstract art instead of portraits ---------- */
.step { background: var(--paper); border: 1px solid var(--line); color: var(--ink); justify-content: flex-end; min-height: 300px; }
.step::after { display: none; }
.step::before { background: var(--mist); backdrop-filter: none; color: var(--ink-2); }
.step-art { position: absolute; inset: 0 0 38% 0; display: grid; place-items: center; z-index: -1; overflow: hidden; }
.step-glyph { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); position: relative; z-index: 1; transition: transform 500ms var(--ease-out); }
.step:hover .step-glyph { transform: scale(1.08); }
.step-1 .step-art { background: repeating-radial-gradient(circle at 50% 55%, transparent 0 22px, var(--line) 22px 23px); }
.step-1 .step-art::after { content: ''; position: absolute; width: 140px; height: 140px; border-radius: 50%; border: 1px solid var(--ink-3); animation: ring 3s var(--ease-out) infinite; }
@keyframes ring { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.step-2 .step-art::before, .step-2 .step-art::after { content: ''; position: absolute; width: 150px; height: 96px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--mist), transparent); }
.step-2 .step-art::before { transform: translate(-28px, -14px) rotate(-10deg); }
.step-2 .step-art::after { transform: translate(26px, 12px) rotate(8deg); }
.step-3 .step-art { background: conic-gradient(from 200deg at 50% 55%, transparent 0 25%, var(--mist) 25% 75%, transparent 75%); }
.step-3 .step-art::after { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 2px dashed var(--line); animation: spin 18s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .step-art::after { animation: none !important; } }
/* payment card: grouped so it's clear we take local and international */
.pay-groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pay-group { display: flex; flex-direction: column; gap: 10px; }
.pay-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.pay-strip ul { grid-template-columns: 1fr 1fr; }
.pay-strip .cd-note { padding: 0; }
.foot-founder { color: var(--ink-3); font-size: var(--fs-sm); margin-top: -8px; } .foot-founder a { color: var(--ink); text-underline-offset: 3px; }
/* ---------- lesson rows + player sidebar 2026-10-20 ---------- */
.lesson-row { position: relative; gap: 12px; padding: 10px 12px; border: 0; border-radius: 14px; min-height: 60px; }
.lesson-row + .lesson-row { margin-top: 2px; }
.lesson-row:hover { background: var(--mist); }
.lesson-row.is-current { background: var(--mist); box-shadow: inset 3px 0 0 var(--ink); }
.lesson-row > svg { color: var(--ink-3); flex: none; }
.lr-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.is-done .lr-ic { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.is-current .lr-ic { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.is-locked { opacity: .6; }
.lr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lr-title { font-weight: 600; line-height: 1.35; }
.is-current .lr-title { font-weight: 700; }
.lr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.lr-tag { padding: 1px 8px; border-radius: 999px; background: var(--mist); color: var(--ink-2); font-weight: 600; font-size: 11px; }
.is-current .lr-tag { background: var(--paper); }
.lr-seen { display: block; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 4px; }
.lr-seen i { display: block; height: 100%; background: var(--ink-2); border-radius: inherit; }
.lr-now { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 3px; background: currentColor; border-radius: 1px; animation: eq 900ms ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -300ms; } .eq i:nth-child(3) { animation-delay: -600ms; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
.p-side { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.ps-head { display: flex; align-items: center; gap: 14px; padding: 12px 10px 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ps-head-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ps-head-txt strong { font-size: var(--fs-base); line-height: 1.3; }
.ps-kicker { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.ps-ch summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 14px; cursor: pointer; }
.ps-ch summary::-webkit-details-marker { display: none; }
.ps-ch summary:hover { background: var(--mist); }
.ps-ch summary > svg { flex: none; color: var(--ink-3); transition: transform 200ms var(--ease-out); }
.ps-ch[open] summary > svg { transform: rotate(180deg); }
.ps-ch-n { flex: none; width: 28px; height: 28px; border-radius: 50%; /* L7: same round marker as lesson rows */ display: grid; place-items: center; background: var(--mist); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.ps-ch.is-done .ps-ch-n { background: var(--ink); color: var(--paper); }
.ps-ch-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ps-ch-list { padding: 2px 0 8px 18px; margin-left: 13px; border-left: 1px solid var(--line); }
.ps-ch-list .lesson-row { padding-left: 10px; }
/* ---------- completion ---------- */
.ld-check { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); animation: pop 520ms var(--ease-out); }
.ld-check svg { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 520ms 240ms var(--ease-out) forwards; }
.ld-check.big { width: 72px; height: 72px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lesson-done { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--mist), transparent 70%); animation: sheet-in 420ms var(--ease-out); }
.ld-txt { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 2px; }
.ld-next { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px 8px 18px; border-radius: 999px; border: 0; background: var(--ink); color: var(--paper); text-align: left; cursor: pointer; max-width: 100%; transition: transform 200ms var(--ease-out); }
.ld-next:hover { transform: translateX(2px); }
.ld-next > span { display: flex; flex-direction: column; min-width: 0; font-weight: 700; line-height: 1.25; }
.ld-next small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .65; font-weight: 600; }
@media (max-width: 600px) { .ld-next { width: 100%; justify-content: space-between; } }
.course-done { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 32px 20px; border-radius: 24px; border: 1px solid var(--line); background: radial-gradient(120% 90% at 50% 0%, var(--mist), transparent 70%); animation: sheet-in 480ms var(--ease-out); }
.course-done h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.04em; }
.course-done p { color: var(--ink-2); max-width: 44ch; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -10px; left: calc(var(--k) * 5.5% + 2%); width: 7px; height: 12px; border-radius: 2px; background: var(--ink); opacity: 0; animation: fall 2.4s calc(var(--k) * 70ms) var(--ease-out) forwards; }
.confetti i:nth-child(3n) { background: var(--ink-3); width: 6px; height: 6px; border-radius: 50%; }
.confetti i:nth-child(4n) { background: #D9A441; }
@keyframes fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(260px) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .eq i, .ld-check, .ld-check svg, .confetti i, .lesson-done, .course-done { animation: none !important; } .ld-check svg { stroke-dashoffset: 0; } .confetti { display: none; } }
/* sign-in country picker */
.dial-pick { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 999px; background: var(--mist); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; }
.dial-pick select { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.dial-pick:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
/* payment marquee: classy greyscale strip, colour on hover */
.pay-marquee { overflow: hidden; margin-inline: -20px; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.pay-marquee > div { display: flex; gap: 10px; width: max-content; animation: reel 40s linear infinite; }
.pay-marquee:hover > div { animation-play-state: paused; }
.pay-item { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); transition: border-color 300ms, transform 300ms var(--ease-out), background 300ms; }
.pay-item .pay-mark { flex: none; width: 52px; height: 34px; border-radius: 9px; background: #fff; padding: 4px 6px; filter: grayscale(1) contrast(.9); opacity: .7; transition: filter 400ms var(--ease-out), opacity 400ms; }
.pay-item .pay-mark img { width: 100%; height: 100%; }
.pay-item > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.pay-item strong { font-size: var(--fs-sm); }
.pay-item small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pay-item:hover { border-color: var(--ink-3); transform: translateY(-2px); background: var(--mist); }
.pay-item:hover .pay-mark { filter: none; opacity: 1; }
@media (hover: none) { .pay-item .pay-mark { filter: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pay-marquee { mask-image: none; -webkit-mask-image: none; margin-inline: 0; } .pay-marquee > div { animation: none; flex-wrap: wrap; width: auto; } .pay-marquee .pay-item:nth-child(n + 7) { display: none; } }
/* the full footer is always on its dark frame, so its powered-by line keeps light text in both themes */
.foot-full .powered { color: #8A8A8A; }
.foot-full .shine, :root:not([data-theme="dark"]) .foot-full .shine { background-image: linear-gradient(110deg, #C9C9C9 40%, #fff 50%, #C9C9C9 60%); }
/* ---------- lesson player polish (L1–L6, 2026-10-27) ---------- */
/* L1: focus mode while watching: the logo and account stay, the site links and footer go */
.s-focus .s-nav { display: none; }
/* L2: the video comes first (edge to edge on phones, right under the header); course, chapter and title sit under it */
.p-head { display: flex; flex-direction: column; gap: 6px; }
.p-head h1 { font-size: var(--fs-xl); line-height: 1.2; letter-spacing: -.02em; }
.p-crumb { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: var(--fs-sm); color: var(--ink-3); }
.p-crumb button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0; border: 0; background: none; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.p-crumb > span::before { content: '·'; margin-inline-end: 8px; }
@media (hover: hover) and (pointer: fine) { .p-crumb button:hover { color: var(--ink); } }
@media (max-width: 599px) { .s-focus .s-main { padding-top: 0; } .s-focus .screen { margin-inline: calc(50% - 50vw); width: 100vw; max-width: 100vw; border-radius: 0; } /* full bleed whatever the page padding is */ }
/* L4: "up next" over the finished video; the ring empties over the countdown (linear: it's a timer) */
.p-upnext { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: clamp(16px, 4vw, 32px); background: rgba(10, 10, 10, .84); backdrop-filter: blur(6px); color: #F5F5F5; animation: upnext-in 240ms var(--ease-out); }
.p-upnext-k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(245, 245, 245, .7); }
.p-upnext strong { font-size: clamp(18px, 3vw, 24px); line-height: 1.25; max-width: 32ch; }
.p-upnext-n { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: rgba(245, 245, 245, .75); }
.p-upnext-n svg { rotate: -90deg; }
.p-upnext-n circle { fill: none; stroke: #F5F5F5; stroke-width: 2.5; stroke-dasharray: 63; animation: upnext-count 5s linear forwards; }
.p-upnext-go { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.p-upnext .btn-accent { background: #F5F5F5; color: #0A0A0A; }
.p-upnext .btn-quiet { color: #F5F5F5; }
@keyframes upnext-in { from { opacity: 0; } }
@keyframes upnext-count { to { stroke-dashoffset: 63; } }
/* L6: lesson list as a bottom sheet (phones and tablets; the sidebar covers desktop) */
.lsheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 80dvh; padding: 0; border: 0; border-radius: 22px 22px 0 0; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-pop); }
.lsheet::backdrop { background: rgba(0, 0, 0, .5); }
.lsheet[open] { animation: lsheet-up 300ms cubic-bezier(0.32, 0.72, 0, 1); }
.lsheet[open]::backdrop { animation: fade-in 300ms ease; }
@keyframes lsheet-up { from { transform: translateY(100%); } }
.lsheet-in { max-height: 80dvh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
.lsheet-top { position: sticky; top: 0; z-index: 1; display: flex; justify-content: center; align-items: center; min-height: 48px; background: var(--paper); }
.lsheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.lsheet-top .icon-btn { position: absolute; inset-inline-end: 0; }
@media (min-width: 640px) { .lsheet { max-width: 560px; margin-inline: auto; } }

View File

@ -3,6 +3,7 @@ import { useEffect, useRef, useState, type ReactNode } from 'react';
import type { Course, Locale } from '@lms/data'; import type { Course, Locale } from '@lms/data';
import { useApp } from './store'; import { useApp } from './store';
import { tr } from './domain'; import { tr } from './domain';
import { LOGO_MARK, LOGO_WORDMARK } from './brandLogo';
const PATHS: Record<string, string> = { const PATHS: Record<string, string> = {
home: 'M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z', home: 'M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z',
@ -32,6 +33,7 @@ const PATHS: Record<string, string> = {
menu: 'M4 6h16M4 12h16M4 18h16', menu: 'M4 6h16M4 12h16M4 18h16',
upload: 'M12 16V4M7 9l5-5 5 5M4 20h16', upload: 'M12 16V4M7 9l5-5 5 5M4 20h16',
plus: 'M12 5v14M5 12h14', plus: 'M12 5v14M5 12h14',
mail: 'M3 6h18v12H3zM3 7l9 6 9-6',
up: 'M6 15l6-6 6 6', up: 'M6 15l6-6 6 6',
down: 'M6 9l6 6 6-6', down: 'M6 9l6 6 6-6',
download: 'M12 4v12M7 11l5 5 5-5M4 20h16', download: 'M12 4v12M7 11l5 5 5-5M4 20h16',
@ -49,6 +51,8 @@ const PATHS: Record<string, string> = {
logout: 'M15 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4M10 17l5-5-5-5M15 12H3', logout: 'M15 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4M10 17l5-5-5-5M15 12H3',
sparkle: 'M12 3l2 6 6 2-6 2-2 6-2-6-6-2 6-2z', sparkle: 'M12 3l2 6 6 2-6 2-2 6-2-6-6-2 6-2z',
brush: 'M14 4l6 6-8 8-6-6zM6 12l-3 7 7-3', brush: 'M14 4l6 6-8 8-6-6zM6 12l-3 7 7-3',
moon: 'M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5z',
sun: 'M12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4',
}; };
export function Icon({ name, size = 20, label }: { name: keyof typeof PATHS | string; size?: number; label?: string }) { export function Icon({ name, size = 20, label }: { name: keyof typeof PATHS | string; size?: number; label?: string }) {
@ -59,75 +63,44 @@ export function Icon({ name, size = 20, label }: { name: keyof typeof PATHS | st
); );
} }
// Placeholder brand mark until the real logo arrives: navy tile, frosted-blue wave, punch-red dot. // Sirkul logo: the full wordmark, or just the "Sm" monogram where space is tight. Height drives the size.
export function Logo({ size = 34 }: { size?: number }) { export function Logo({ size = 34, mark = false }: { size?: number; mark?: boolean }) {
return ( return <span className="logo" aria-hidden><img src={mark ? LOGO_MARK : LOGO_WORDMARK} alt="" style={{ height: mark ? size : size * 1.25 }} /></span>;
<span className="logo" aria-hidden>
<svg width={size} height={size} viewBox="0 0 34 34">
<rect width="34" height="34" rx="10" fill="#1D3557" />
<path d="M7 22c3.5-6 7-6 10 0s6.5 6 10 0" fill="none" stroke="#A8DADC" strokeWidth="3" strokeLinecap="round" />
<circle cx="23.5" cy="11" r="3.5" fill="#E63946" />
</svg>
</span>
);
} }
// Stand-in lesson video until real uploads exist: Blender's openly licensed "Big Buck Bunny" on Vimeo.
export const VIMEO_ORIGIN = 'https://player.vimeo.com'; export const VIMEO_ORIGIN = 'https://player.vimeo.com';
export const VIMEO_PLACEHOLDER = `${VIMEO_ORIGIN}/video/1084537?dnt=1&title=0&byline=0&portrait=0`; export const VIMEO_PLACEHOLDER = `${VIMEO_ORIGIN}/video/1084537?dnt=1&title=0&byline=0&portrait=0`;
// Footer art: an eyeshadow palette. Twelve pans in brand and skin shades; a white brush and compact mirror sit // Makeup icons from IconPark Outline (ByteDance, Apache-2.0), via iconify.design. 48-unit grid, 4-unit stroke.
// under the case's grid lines so the shapes break across tiles (the reference's cut-paper look). const KIT: Record<string, ReactNode> = {
const PANS = ['#E63946', '#F5AFB5', '#A8DADC', '#E9B8A7', '#457B9D', '#F1FAEE', '#C98B6B', '#FAD7DA', '#315A93', '#8E4B45', '#70C3C6', '#CB1928']; brush: <><path d="m16.1 25.829l22.627-19.8s2.12-2.12 4.242 0c2.121 2.122 0 4.243 0 4.243L23.17 32.9z" /><path strokeLinecap="round" d="m22.464 20.879l5.657 5.657" /><path d="m5.493 30.778l10.607-4.95l7.07 7.072l-4.95 10.606s-4.95.707-9.192-3.535c-4.243-4.243-3.536-9.193-3.536-9.193Z" /><path strokeLinecap="round" d="m6.908 36.435l4.95-2.121m.707 7.778l1.415-2.828" /><path d="m18.93 23.354l2.828-2.475l2.828-2.475m6.01 6.01l-2.475 2.828l-2.475 2.829" /></>,
export function MakeupBox() { foundation: <path strokeLinecap="round" d="M13 19a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v19s0 6-6 6h-8c-6 0-6-6-6-6zm5-7h10v5H18zm0 0V9c0-3 3-5 6-5h11s-7 2-7 6v2" />,
const W = 92, H = 92, G = 6, P = 14; // tile size, gap, case padding lipstick: <path strokeLinecap="round" d="M29 24h12v20H29zM7 24h14v20H7zm3-12.545V24h8V4c-6.5 0-8 5.636-8 7.454M7 32h14" />,
return ( brow: <><path d="M24 40c9.941 0 18-10 18-10s-8.059-10-18-10S6 30 6 30s8.059 10 18 10Z" /><path d="M24 34a4 4 0 1 0 0-8a4 4 0 0 0 0 8Zm4-28c-7 0-18 3.5-21 6s-1 7 1 6s15.2-5.8 20-7s11.667.833 14 2c-2.333-2-7-7-14-7Z" /></>,
<div className="foot-box" aria-hidden> mirror: <><circle cx="24" cy="17" r="13" /><path strokeLinecap="round" d="M42 17c0 9.941-8.059 18-18 18S6 26.941 6 17m36 0h-4m-28 0H6m24 27H18m6 0v-8" /></>,
<svg viewBox={`0 0 ${P * 2 + W * 3 + G * 2} ${P * 2 + H * 4 + G * 3}`} role="presentation"> };
<defs> export function KitIcon({ name, size = 24 }: { name: keyof typeof KIT | string; size?: number }) {
<radialGradient id="pan-shine" cx="35%" cy="30%" r="70%"><stop offset="0" stopColor="#fff" stopOpacity=".55" /><stop offset=".45" stopColor="#fff" stopOpacity="0" /></radialGradient> return <svg width={size} height={size} viewBox="0 0 48 48" fill="none" stroke="currentColor" strokeWidth="4" strokeLinejoin="round" aria-hidden>{KIT[name]}</svg>;
</defs>
<rect width="100%" height="100%" rx="22" fill="#1D3557" />
{PANS.map((c, i) => {
const x = P + (i % 3) * (W + G), y = P + Math.floor(i / 3) * (H + G);
return (
<g key={i}>
<rect x={x} y={y} width={W} height={H} rx="6" fill={c} />
<circle cx={x + W / 2} cy={y + H / 2} r={W * 0.34} fill={c} stroke="rgba(0,0,0,.12)" strokeWidth="2" />
<circle cx={x + W / 2} cy={y + H / 2} r={W * 0.34} fill="url(#pan-shine)" />
</g>
);
})}
<g fill="#fff">
<g transform="rotate(-40 160 220)">
<rect x="10" y="206" width="180" height="28" rx="14" />
<rect x="184" y="198" width="44" height="44" rx="6" />
<path d="M226 192 C 290 176, 340 200, 352 220 C 340 240, 290 264, 226 248 Z" />
</g>
<circle cx="262" cy="64" r="44" fill="none" stroke="#fff" strokeWidth="12" />
<path d="M40 404 a40 40 0 0 1 80 0 Z" />
</g>
<g fill="#1D3557">
{[1, 2].map((k) => <rect key={'v' + k} x={P + k * W + (k - 1) * G} y={0} width={G} height="100%" />)}
{[1, 2, 3].map((k) => <rect key={'h' + k} x={0} y={P + k * H + (k - 1) * G} width="100%" height={G} />)}
</g>
</svg>
</div>
);
} }
const TONES = ['rose', 'clay', 'plum', 'sand', 'sage', 'ink']; const TONES = ['rose', 'clay', 'plum', 'sand', 'sage', 'ink'];
// Stand-in photos (apps/demo/public/photos) until courses get uploaded covers: one per category, in category order.
export const CAT_PHOTOS = ['habesha-harari.jpg', 'hero.jpg', 'habesha-trad.jpg', 'habesha-eritrean.jpg'];
export function coursePhoto(course: Course, categoryIds: string[]) {
return `/photos/${CAT_PHOTOS[Math.max(0, categoryIds.indexOf(course.categoryId)) % CAT_PHOTOS.length]}`;
}
export function Cover({ course, locale, badge }: { course: Course; locale: Locale; badge?: ReactNode }) { export function Cover({ course, locale, badge }: { course: Course; locale: Locale; badge?: ReactNode }) {
const { ds } = useApp(); const { ds, categories } = useApp();
// No image → the title itself, set in Ge'ez serif, is the cover (§11.2: the script is the visual identity). // No image → the title itself, set in Ge'ez serif, is the cover (§11.2: the script is the visual identity).
// Shows the title in the other script from the page's language, so the cover adds a second language instead of repeating the card title. // Shows the title in the other script from the page's language, so the cover adds a second language instead of repeating the card title.
const other = locale === 'am' || locale === 'ti' ? 'en' : 'am'; const other = locale === 'am' || locale === 'ti' ? 'en' : 'am';
const title = course.translations[other]?.title ?? tr(course.translations, locale)?.title ?? ''; const title = course.translations[other]?.title ?? tr(course.translations, locale)?.title ?? '';
const tone = course.coverTone && TONES.includes(course.coverTone) ? course.coverTone : 'ink'; const tone = course.coverTone && TONES.includes(course.coverTone) ? course.coverTone : 'ink';
return ( return (
<div className={`cover tone-${tone} ${course.coverAssetId ? 'has-img' : ''}`}> <div className={`cover tone-${tone} has-img`}>
{course.coverAssetId && <img src={ds.assetUrl(course.coverAssetId)} alt="" />} <img src={course.coverAssetId ? ds.assetUrl(course.coverAssetId) : coursePhoto(course, categories.map((k) => k.id))} alt="" loading="lazy" />
{badge} {badge}
<span className="ttl" lang={other} aria-hidden>{title}</span> <span className="ttl" lang={other} aria-hidden>{title}</span>
</div> </div>

View File

@ -11,9 +11,11 @@
"demoBanner": "ማሳያ — ክፍያ፣ ኤስኤምኤስ እና ኢሜይል የማስመሰያ ናቸው።", "demoBanner": "ማሳያ — ክፍያ፣ ኤስኤምኤስ እና ኢሜይል የማስመሰያ ናቸው።",
"language": "ቋንቋ", "language": "ቋንቋ",
"saveFailed": "ማስቀመጥ አልተቻለም። ግንኙነትዎን አረጋግጠው እንደገና ይሞክሩ።", "saveFailed": "ማስቀመጥ አልተቻለም። ግንኙነትዎን አረጋግጠው እንደገና ይሞክሩ።",
"readOnly": "መመልከት ይችላሉ፣ ነገር ግን ይህ መለያ በማሳያው ላይ ለውጥ ማስቀመጥ አይችልም።" "readOnly": "መመልከት ይችላሉ፣ ነገር ግን ይህ መለያ በማሳያው ላይ ለውጥ ማስቀመጥ አይችልም።",
"theme": "ጨለማ ገጽታ"
}, },
"nav": { "nav": {
"history": "ታሪክ",
"home": "መነሻ", "home": "መነሻ",
"courses": "ኮርሶች", "courses": "ኮርሶች",
"myCourses": "የእኔ ኮርሶች", "myCourses": "የእኔ ኮርሶች",
@ -24,17 +26,18 @@
"signOut": "ውጣ", "signOut": "ውጣ",
"getStarted": "ይጀምሩ", "getStarted": "ይጀምሩ",
"account": "መለያ", "account": "መለያ",
"progress": "የእኔ እድገት" "progress": "የእኔ እድገት",
"menu": "ማውጫ"
}, },
"landing": { "landing": {
"title": "ሙያዊ ሜካፕን በራስዎ ቋንቋ ይማሩ", "title": "ከሥራ ላይ ካሉ ባለሙያዎች ሙያዊ ሜካፕ ይማሩ",
"lead": "በሥራ ላይ ካሉ ባለሙያዎች የቪዲዮ ኮርሶች። አንድ ጊዜ ይክፈሉ፣ ኮርሱ ለዘላለም የእርስዎ ነው፣ በስልክዎ ይመልከቱ።", "lead": "በሥራ ላይ ካሉ ባለሙያዎች የቪዲዮ ኮርሶች። አንድ ጊዜ ይክፈሉ፣ ኮርሱ ለዘላለም የእርስዎ ነው፣ በስልክዎ ይመልከቱ።",
"browse": "ኮርሶችን ይመልከቱ", "browse": "ኮርሶችን ይመልከቱ",
"start": "መለያ ይፍጠሩ", "start": "መለያ ይፍጠሩ",
"featured": "ተመራጭ ኮርሶች", "featured": "ተመራጭ ኮርሶች",
"howTitle": "እንዴት ይሠራል", "howTitle": "እንዴት ይሠራል",
"how1": "ነጻ የሙከራ ትምህርቶችን ይመልከቱ", "how1": "ነጻ የሙከራ ትምህርቶችን ይመልከቱ",
"how2": "በቴሌብር ወይም በሲቢኢ ብር ይክፈሉ", "how2": "በአገር ውስጥም ሆነ በውጭ በፈለጉት መንገድ ይክፈሉ",
"how3": "ኮርሱ ወዲያውኑ ይከፈታል፣ ለዘላለም", "how3": "ኮርሱ ወዲያውኑ ይከፈታል፣ ለዘላለም",
"payTitle": "በለመዱት መንገድ ይክፈሉ", "payTitle": "በለመዱት መንገድ ይክፈሉ",
"fact1": "አማርኛ፣ አፋን ኦሮሞ፣ ትግርኛና እንግሊዝኛ", "fact1": "አማርኛ፣ አፋን ኦሮሞ፣ ትግርኛና እንግሊዝኛ",
@ -53,9 +56,17 @@
"viewAll": "ሁሉንም ኮርሶች ይመልከቱ", "viewAll": "ሁሉንም ኮርሶች ይመልከቱ",
"featuredLead": "ከባለሙያ የሜካፕ አርቲስቶች የተመረጡ ኮርሶች።", "featuredLead": "ከባለሙያ የሜካፕ አርቲስቶች የተመረጡ ኮርሶች።",
"ctaTitle": "በነጻ የቅድመ እይታ ትምህርት ይጀምሩ", "ctaTitle": "በነጻ የቅድመ እይታ ትምህርት ይጀምሩ",
"ctaBody": "ቅድመ እይታ ለማየት መለያ አያስፈልግም። ሲዘጋጁ ብቻ ይክፈሉ።" "ctaBody": "ቅድመ እይታ ለማየት መለያ አያስፈልግም። ሲዘጋጁ ብቻ ይክፈሉ።",
"payLead": "ለእያንዳንዱ ኮርስ አንድ ጊዜ ይክፈሉ። ወርሃዊ ክፍያ የለም።",
"payLocal": "የሞባይል ገንዘብ",
"payCards": "የባንክ ካርዶች",
"payAbroad": "ከውጭ ሀገር",
"payNote": "በአሪፍፔይ ደህንነቱ በተጠበቀ መንገድ ይክፈሉ። ክፍያው እንደተጠናቀቀ ኮርሱ ይከፈታል።",
"waitPill": "በቅርቡ ይከፈታል · የተጠባባቂ ዝርዝሩን ይቀላቀሉ"
}, },
"auth": { "auth": {
"socialLabel": "በሌላ መለያ ይግቡ",
"continueWith": "በ{name} ይቀጥሉ",
"phoneTitle": "በስልክዎ ይግቡ", "phoneTitle": "በስልክዎ ይግቡ",
"phoneLabel": "ስልክ ቁጥር", "phoneLabel": "ስልክ ቁጥር",
"sendCode": "ኮድ ላክ", "sendCode": "ኮድ ላክ",
@ -75,6 +86,7 @@
"resend": "አዲስ ኮድ ላክ", "resend": "አዲስ ኮድ ላክ",
"resendIn": "በ{s} ሰከንድ ውስጥ አዲስ ኮድ መላክ ይችላሉ", "resendIn": "በ{s} ሰከንድ ውስጥ አዲስ ኮድ መላክ ይችላሉ",
"wrongCode": "ኮዱ ትክክል አይደለም። {n} ሙከራ ቀርቷል።", "wrongCode": "ኮዱ ትክክል አይደለም። {n} ሙከራ ቀርቷል።",
"networkError": "ከአገልጋዩ ጋር መገናኘት አልተቻለም። ግንኙነትዎን ያረጋግጡና እንደገና ይሞክሩ።",
"locked": "ብዙ የተሳሳቱ ሙከራዎች። አዲስ ኮድ ይላኩ።", "locked": "ብዙ የተሳሳቱ ሙከራዎች። አዲስ ኮድ ይላኩ።",
"noIdentity": "የተማሪ መለያ ለመፍጠር ወደ Claude ገብተው ይህን ማሳያ ይክፈቱ።", "noIdentity": "የተማሪ መለያ ለመፍጠር ወደ Claude ገብተው ይህን ማሳያ ይክፈቱ።",
"welcome": "እንኳን ደህና መጡ", "welcome": "እንኳን ደህና መጡ",
@ -82,7 +94,8 @@
"continueAs": "እንደ {name} ይቀጥሉ", "continueAs": "እንደ {name} ይቀጥሉ",
"or": "ወይም", "or": "ወይም",
"sideTitle": "ከባለሙያ አርቲስቶች ሜካፕ ይማሩ", "sideTitle": "ከባለሙያ አርቲስቶች ሜካፕ ይማሩ",
"sideBody": "የቪዲዮ ትምህርቶች በአማርኛ፣ በአፋን ኦሮሞ፣ በትግርኛና በእንግሊዝኛ። አንድ ጊዜ ይክፈሉ፣ ኮርሱን ለዘላለም ያቆዩ።" "sideBody": "የቪዲዮ ትምህርቶች በአማርኛ፣ በአፋን ኦሮሞ፣ በትግርኛና በእንግሊዝኛ። አንድ ጊዜ ይክፈሉ፣ ኮርሱን ለዘላለም ያቆዩ።",
"countryCode": "የአገር ኮድ"
}, },
"setup": { "setup": {
"title": "ስለ እርስዎ ይንገሩን", "title": "ስለ እርስዎ ይንገሩን",
@ -112,9 +125,15 @@
"all": "ሁሉም", "all": "ሁሉም",
"count": "{n} ኮርሶች", "count": "{n} ኮርሶች",
"empty": "ከ«{q}» ጋር የሚዛመድ ኮርስ የለም። አጠር ያለ ቃል ይሞክሩ።", "empty": "ከ«{q}» ጋር የሚዛመድ ኮርስ የለም። አጠር ያለ ቃል ይሞክሩ።",
"emptyCategory": "በዚህ ምድብ እስካሁን ኮርስ የለም።" "emptyCategory": "በዚህ ምድብ እስካሁን ኮርስ የለም።",
"clearSearch": "ፍለጋውን አጽዳ",
"taughtIn": "የማስተማሪያ ቋንቋ",
"anyLanguage": "ማንኛውም ቋንቋ",
"clearFilters": "ማጣሪያዎችን አጽዳ",
"emptyLanguage": "በዚህ ቋንቋ እስካሁን ኮርስ የለም።"
}, },
"course": { "course": {
"buyShort": "ኮርሱን ይግዙ",
"by": "ከ{name} ጋር", "by": "ከ{name} ጋር",
"lessons": "{n} ትምህርቶች", "lessons": "{n} ትምህርቶች",
"taughtIn": "የማስተማሪያ ቋንቋ፦ {lang}", "taughtIn": "የማስተማሪያ ቋንቋ፦ {lang}",
@ -138,6 +157,7 @@
"watchAgain": "እንደገና ይመልከቱ", "watchAgain": "እንደገና ይመልከቱ",
"tabOverview": "አጠቃላይ እይታ", "tabOverview": "አጠቃላይ እይታ",
"tabInstructor": "አሠልጣኝ", "tabInstructor": "አሠልጣኝ",
"about": "ስለ ኮርሱ",
"summary": "ማጠቃለያ", "summary": "ማጠቃለያ",
"duration": "ጠቅላላ ርዝመት", "duration": "ጠቅላላ ርዝመት",
"language": "ቋንቋ", "language": "ቋንቋ",
@ -148,8 +168,14 @@
"lifetime": "ለዘላለም", "lifetime": "ለዘላለም",
"share": "አጋራ", "share": "አጋራ",
"linkCopied": "ሊንኩ ተቀድቷል", "linkCopied": "ሊንኩ ተቀድቷል",
"teaches": "በMakeUp Academy {n, plural, one {# ኮርስ} other {# ኮርሶች}}", "teaches": "በSirkul Makeup {n, plural, one {# ኮርስ} other {# ኮርሶች}}",
"viewDetails": "ዝርዝር ይመልከቱ" "viewDetails": "ዝርዝር ይመልከቱ",
"includes": "ይህ ኮርስ የሚያካትተው",
"previewLessons": "{n, plural, one {# ነጻ የቅድመ እይታ ትምህርት} other {# ነጻ የቅድመ እይታ ትምህርቶች}}",
"createdBy": "ያዘጋጀው",
"lifetimeAccess": "የዕድሜ ልክ መዳረሻ",
"enrolled": "{n} ተማሪዎች",
"newCourse": "አዲስ ኮርስ"
}, },
"checkout": { "checkout": {
"title": "የመክፈያ መንገድ ይምረጡ", "title": "የመክፈያ መንገድ ይምረጡ",
@ -175,6 +201,7 @@
"alreadyOwned": "ይህ ኮርስ አስቀድሞ የእርስዎ ነው።" "alreadyOwned": "ይህ ኮርስ አስቀድሞ የእርስዎ ነው።"
}, },
"player": { "player": {
"prev": "ቀዳሚ",
"back": "ወደ ኮርሱ ይመለሱ", "back": "ወደ ኮርሱ ይመለሱ",
"notes": "የትምህርቱ ማስታወሻ", "notes": "የትምህርቱ ማስታወሻ",
"next": "ቀጣይ ትምህርት", "next": "ቀጣይ ትምህርት",
@ -194,7 +221,17 @@
"fwd10": "10 ሰከንድ ወደ ፊት", "fwd10": "10 ሰከንድ ወደ ፊት",
"fullscreen": "ሙሉ ማያ", "fullscreen": "ሙሉ ማያ",
"contents": "ይዘት", "contents": "ይዘት",
"progress": "ከ{total} ትምህርቶች {done} ተጠናቀዋል" "progress": "ከ{total} ትምህርቶች {done} ተጠናቀዋል",
"nowPlaying": "አሁን እየታየ",
"upNext": "ቀጣይ",
"nextShort": "ቀጣይ",
"playNow": "አሁን አጫውት",
"autoNext": "በ{n} ሰከንድ ይጀምራል",
"courseProgress": "ኮርሱ {pct}% ተጠናቋል",
"courseDoneT": "ኮርሱ ተጠናቋል",
"courseDone": "{course}ን ጨርሰዋል። ለዘላለም የእርስዎ ነው፤ በፈለጉ ጊዜ ወደ ማንኛውም ትምህርት ይመለሱ።",
"seeProgress": "እድገቴን ይመልከቱ",
"markWatched": "እንደታየ ምልክት አድርግ (ማሳያ)"
}, },
"my": { "my": {
"title": "የእኔ ኮርሶች", "title": "የእኔ ኮርሶች",
@ -211,6 +248,8 @@
"open": "ክፈት" "open": "ክፈት"
}, },
"help": { "help": {
"email": "ኢሜይል ይላኩልን",
"lead": "ፈጣን መልሶች፣ በቴሌግራም እውነተኛ ሰው፣ ወይም የምንከታተለው ሪፖርት።",
"title": "እገዛ", "title": "እገዛ",
"faq": "በብዛት የሚጠየቁ ጥያቄዎች", "faq": "በብዛት የሚጠየቁ ጥያቄዎች",
"q1": "እንዴት እከፍላለሁ?", "q1": "እንዴት እከፍላለሁ?",
@ -237,6 +276,12 @@
"required": "ርዕሱንና የተፈጠረውን ይሙሉ።" "required": "ርዕሱንና የተፈጠረውን ይሙሉ።"
}, },
"profile": { "profile": {
"lessonsList": "ትምህርቶችና ፈተናዎች",
"account": "የመለያ ቅንብሮች",
"statTime": "የታየ ጊዜ",
"statLessons": "የተጠናቀቁ ትምህርቶች",
"statCourses": "ኮርሶች",
"since": "ከ{date} ጀምሮ አባል",
"title": "መገለጫ", "title": "መገለጫ",
"details": "የእርስዎ መረጃ", "details": "የእርስዎ መረጃ",
"phone": "ስልክ", "phone": "ስልክ",
@ -320,10 +365,59 @@
"wellDone": "በጣም ጥሩ — አልፈዋል።" "wellDone": "በጣም ጥሩ — አልፈዋል።"
}, },
"footer": { "footer": {
"poweredBy": "በ<name></name> የተሠራ",
"tagline": "ሙያውን ይማሩ። ለዘላለም ያቆዩት።", "tagline": "ሙያውን ይማሩ። ለዘላለም ያቆዩት።",
"instructors": "አሠልጣኝ", "instructors": "አሠልጣኝ",
"learn": "ትምህርት", "learn": "ትምህርት",
"support": "እገዛ", "support": "እገዛ",
"rights": "መብቱ በሕግ የተጠበቀ ነው" "rights": "መብቱ በሕግ የተጠበቀ ነው",
"contact": "ያግኙን",
"waitlist": "የተጠባባቂ ዝርዝሩን ይቀላቀሉ",
"kitTitle": "የመጀመሪያ ኪት",
"kitSub": "በመጀመሪያ ኮርስዎ የሚጠቀሙባቸው",
"kitCount": "{n} እቃዎች",
"kit1": "ፋውንዴሽንና ኮንሲለር",
"kit1Note": "መሠረት",
"kit2": "ብሩሾችና ስፖንጆች",
"kit2Note": "መሣሪያዎች",
"kit3": "የቅንድብ እርሳስና ጄል",
"kit3Note": "ቅንድብ",
"kit4": "ሊፕስቲክና ላይነር",
"kit4Note": "ከንፈር",
"workTitle": "የተማሪዎች ሥራ",
"workSub": "በሲርኩል ተማሪዎች የተሠሩ",
"credits": "የፎቶ ምንጮች",
"founder": "መሥራች፦ <name></name>",
"tiktok": "@rezinabrhane በቲክቶክ"
},
"history": {
"title": "ታሪክ",
"lead": "ያዩት፣ የጨረሱትና የገዙት ሁሉ።",
"done": "“{lesson}” ጨርሰዋል · {course}",
"watched": "“{lesson}” አይተዋል · {course}",
"paid": "{course} ገዝተዋል",
"report": "ሪፖርት ልከዋል፦ {subject}",
"empty": "እስካሁን ምንም የለም። ትምህርት ሲጀምሩ እዚህ ይታያል።",
"seeAll": "ሁሉንም ይመልከቱ"
},
"tour": {
"welcomeT": "እንኳን ደህና መጡ፣ {name}",
"welcome": "ሁሉም ነገር የት እንዳለ ፈጣን ጉብኝት። 30 ሰከንድ ያህል ይወስዳል።",
"continueT": "ካቆሙበት ይቀጥሉ",
"continue": "የመጨረሻው ትምህርትዎ እዚህ ይጠብቅዎታል። አንድ ጊዜ ሲነኩት ካቆሙበት ይቀጥላል።",
"coursesT": "ኮርሶችን ያስሱ",
"courses": "እያንዳንዱ ኮርስ ነጻ የቅድመ እይታ ትምህርቶች አሉት፤ ከመግዛትዎ በፊት ይሞክሩ።",
"myT": "የእርስዎ ኮርሶች",
"my": "የገዙት ሁሉ እዚህ አለ፤ ለዘላለም የእርስዎ ነው።",
"profileT": "እድገትና ታሪክ",
"profile": "መገለጫዎ በእያንዳንዱ ኮርስ ምን ያህል እንደደረሱና ያዩትን ሁሉ ያሳያል።",
"menuT": "ቋንቋና ገጽታ",
"menu": "ቋንቋ፣ ብርሃን ወይም ጨለማ ገጽታ ይቀይሩ ወይም አስተያየት ይላኩ።",
"helpT": "እርዳታ ይፈልጋሉ?",
"help": "በቴሌግራም ይጻፉልን፣ ይደውሉ ወይም ችግር ያሳውቁ። እውነተኛ ሰው ይመልሳል።",
"next": "ቀጣይ",
"skip": "ጉብኝቱን ዝለል",
"done": "መማር ይጀምሩ",
"again": "አስጎብኙኝ"
} }
} }

View File

@ -11,9 +11,11 @@
"demoBanner": "Demo — payments, SMS and email are simulated.", "demoBanner": "Demo — payments, SMS and email are simulated.",
"language": "Language", "language": "Language",
"saveFailed": "Couldn't save. Check your connection and try again.", "saveFailed": "Couldn't save. Check your connection and try again.",
"readOnly": "You can look around, but this account can't save changes in the demo." "readOnly": "You can look around, but this account can't save changes in the demo.",
"theme": "Dark mode"
}, },
"nav": { "nav": {
"history": "History",
"home": "Home", "home": "Home",
"courses": "Courses", "courses": "Courses",
"myCourses": "My courses", "myCourses": "My courses",
@ -24,17 +26,18 @@
"signOut": "Sign out", "signOut": "Sign out",
"getStarted": "Get started", "getStarted": "Get started",
"account": "Account", "account": "Account",
"progress": "My progress" "progress": "My progress",
"menu": "Menu"
}, },
"landing": { "landing": {
"title": "Learn professional makeup, in your language", "title": "Learn professional makeup from working artists",
"lead": "Video courses from working artists. Pay once, keep the course for life, and watch on your phone.", "lead": "Video courses from working artists. Pay once, keep the course for life, and watch on your phone.",
"browse": "Browse courses", "browse": "Browse courses",
"start": "Create your account", "start": "Create your account",
"featured": "Featured courses", "featured": "Featured courses",
"howTitle": "How it works", "howTitle": "How it works",
"how1": "Watch the free preview lessons", "how1": "Watch the free preview lessons",
"how2": "Pay with Telebirr or CBE Birr", "how2": "Pay your way, at home or abroad",
"how3": "The course unlocks right away, for life", "how3": "The course unlocks right away, for life",
"payTitle": "Pay the way you already do", "payTitle": "Pay the way you already do",
"fact1": "Amharic, Afaan Oromoo, Tigrinya and English", "fact1": "Amharic, Afaan Oromoo, Tigrinya and English",
@ -53,9 +56,17 @@
"viewAll": "View all courses", "viewAll": "View all courses",
"featuredLead": "Hand-picked courses from working makeup artists.", "featuredLead": "Hand-picked courses from working makeup artists.",
"ctaTitle": "Start with a free preview lesson", "ctaTitle": "Start with a free preview lesson",
"ctaBody": "No account needed to watch a preview. Pay only when you are ready." "ctaBody": "No account needed to watch a preview. Pay only when you are ready.",
"payLead": "One payment per course. No subscription.",
"payLocal": "Mobile money",
"payCards": "Bank cards",
"payAbroad": "From abroad",
"payNote": "Secure checkout through ArifPay. The course unlocks the moment payment clears.",
"waitPill": "Opening soon · Join the waitlist"
}, },
"auth": { "auth": {
"socialLabel": "Sign in with another account",
"continueWith": "Continue with {name}",
"phoneTitle": "Sign in with your phone", "phoneTitle": "Sign in with your phone",
"phoneLabel": "Phone number", "phoneLabel": "Phone number",
"sendCode": "Send code", "sendCode": "Send code",
@ -75,6 +86,7 @@
"resend": "Send a new code", "resend": "Send a new code",
"resendIn": "Send a new code in {s} s", "resendIn": "Send a new code in {s} s",
"wrongCode": "That code is wrong. {n, plural, one {# try} other {# tries}} left.", "wrongCode": "That code is wrong. {n, plural, one {# try} other {# tries}} left.",
"networkError": "Couldn't reach the server. Check your connection and try again.",
"locked": "Too many wrong tries. Send a new code.", "locked": "Too many wrong tries. Send a new code.",
"noIdentity": "Open this demo while signed in to Claude to create a student account.", "noIdentity": "Open this demo while signed in to Claude to create a student account.",
"welcome": "Welcome back", "welcome": "Welcome back",
@ -82,7 +94,8 @@
"continueAs": "Continue as {name}", "continueAs": "Continue as {name}",
"or": "or", "or": "or",
"sideTitle": "Learn makeup from working artists", "sideTitle": "Learn makeup from working artists",
"sideBody": "Video lessons in Amharic, Afaan Oromoo, Tigrinya and English. Pay once and keep the course for life." "sideBody": "Video lessons in Amharic, Afaan Oromoo, Tigrinya and English. Pay once and keep the course for life.",
"countryCode": "Country code"
}, },
"setup": { "setup": {
"title": "Tell us about you", "title": "Tell us about you",
@ -112,9 +125,15 @@
"all": "All", "all": "All",
"count": "{n, plural, one {# course} other {# courses}}", "count": "{n, plural, one {# course} other {# courses}}",
"empty": "No courses match “{q}”. Try a shorter word.", "empty": "No courses match “{q}”. Try a shorter word.",
"emptyCategory": "No courses in this category yet." "emptyCategory": "No courses in this category yet.",
"clearSearch": "Clear search",
"taughtIn": "Taught in",
"anyLanguage": "Any language",
"clearFilters": "Clear filters",
"emptyLanguage": "No courses in this language here yet."
}, },
"course": { "course": {
"buyShort": "Buy course",
"by": "With {name}", "by": "With {name}",
"lessons": "{n, plural, one {# lesson} other {# lessons}}", "lessons": "{n, plural, one {# lesson} other {# lessons}}",
"taughtIn": "Taught in {lang}", "taughtIn": "Taught in {lang}",
@ -138,6 +157,7 @@
"watchAgain": "Watch again", "watchAgain": "Watch again",
"tabOverview": "Overview", "tabOverview": "Overview",
"tabInstructor": "Instructor", "tabInstructor": "Instructor",
"about": "About this course",
"summary": "Summary", "summary": "Summary",
"duration": "Total duration", "duration": "Total duration",
"language": "Language", "language": "Language",
@ -148,8 +168,14 @@
"lifetime": "Lifetime", "lifetime": "Lifetime",
"share": "Share", "share": "Share",
"linkCopied": "Link copied", "linkCopied": "Link copied",
"teaches": "{n, plural, one {# course} other {# courses}} on MakeUp Academy", "teaches": "{n, plural, one {# course} other {# courses}} on Sirkul Makeup",
"viewDetails": "View details" "viewDetails": "View details",
"includes": "This course includes",
"previewLessons": "{n, plural, one {# free preview lesson} other {# free preview lessons}}",
"createdBy": "Created by",
"lifetimeAccess": "Lifetime access",
"enrolled": "{n, plural, one {# student} other {# students}}",
"newCourse": "New course"
}, },
"checkout": { "checkout": {
"title": "Choose how to pay", "title": "Choose how to pay",
@ -175,6 +201,7 @@
"alreadyOwned": "You already own this course." "alreadyOwned": "You already own this course."
}, },
"player": { "player": {
"prev": "Previous",
"back": "Back to course", "back": "Back to course",
"notes": "Lesson notes", "notes": "Lesson notes",
"next": "Next lesson", "next": "Next lesson",
@ -194,7 +221,17 @@
"fwd10": "Forward 10 seconds", "fwd10": "Forward 10 seconds",
"fullscreen": "Full screen", "fullscreen": "Full screen",
"contents": "Contents", "contents": "Contents",
"progress": "{done} of {total} lessons completed" "progress": "{done} of {total} lessons completed",
"nowPlaying": "Now playing",
"upNext": "Up next",
"nextShort": "Next",
"playNow": "Play now",
"autoNext": "Starting in {n}",
"courseProgress": "Course {pct}% complete",
"courseDoneT": "Course complete",
"courseDone": "You finished {course}. It stays yours for life, so come back to any lesson whenever you need it.",
"seeProgress": "See my progress",
"markWatched": "Mark as watched (demo)"
}, },
"my": { "my": {
"title": "My courses", "title": "My courses",
@ -211,6 +248,8 @@
"open": "Open" "open": "Open"
}, },
"help": { "help": {
"email": "Email us",
"lead": "Quick answers, a real person on Telegram, or a report we follow up on.",
"title": "Help", "title": "Help",
"faq": "Common questions", "faq": "Common questions",
"q1": "How do I pay?", "q1": "How do I pay?",
@ -237,6 +276,12 @@
"required": "Fill in the subject and what happened." "required": "Fill in the subject and what happened."
}, },
"profile": { "profile": {
"lessonsList": "Lessons and quizzes",
"account": "Account settings",
"statTime": "Watch time",
"statLessons": "Lessons finished",
"statCourses": "Courses",
"since": "Member since {date}",
"title": "Profile", "title": "Profile",
"details": "Your details", "details": "Your details",
"phone": "Phone", "phone": "Phone",
@ -320,10 +365,59 @@
"wellDone": "Well done — you passed." "wellDone": "Well done — you passed."
}, },
"footer": { "footer": {
"poweredBy": "Powered by <name></name>",
"tagline": "Learn the craft. Keep it for life.", "tagline": "Learn the craft. Keep it for life.",
"instructors": "Instructor", "instructors": "Instructor",
"learn": "Learn", "learn": "Learn",
"support": "Support", "support": "Support",
"rights": "All rights reserved" "rights": "All rights reserved",
"contact": "Get in touch",
"waitlist": "Join the waitlist",
"kitTitle": "Starter kit",
"kitSub": "What you’ll use in your first course",
"kitCount": "{n} items",
"kit1": "Foundation & concealer",
"kit1Note": "Base",
"kit2": "Brushes & sponges",
"kit2Note": "Tools",
"kit3": "Brow pencil & gel",
"kit3Note": "Brows",
"kit4": "Lipstick & liner",
"kit4Note": "Lips",
"workTitle": "Student work",
"workSub": "Looks by Sirkul students",
"credits": "Photo credits",
"founder": "Founded by <name></name>",
"tiktok": "@rezinabrhane on TikTok"
},
"history": {
"title": "History",
"lead": "Everything you've watched, finished and bought.",
"done": "Finished “{lesson}” · {course}",
"watched": "Watched “{lesson}” · {course}",
"paid": "Bought {course}",
"report": "Sent a report: {subject}",
"empty": "Nothing yet. Start a lesson and it shows up here.",
"seeAll": "See all"
},
"tour": {
"welcomeT": "Welcome, {name}",
"welcome": "A quick look at where everything lives. It takes about 30 seconds.",
"continueT": "Pick up where you left off",
"continue": "Your last lesson waits here. One tap and the video picks up where you stopped.",
"coursesT": "Browse courses",
"courses": "Every course has free preview lessons, so you can try before you buy.",
"myT": "Your courses",
"my": "Everything you bought lives here, yours for life.",
"profileT": "Progress and history",
"profile": "Your profile shows how far you are in each course and everything you have watched.",
"menuT": "Language and theme",
"menu": "Switch language, light or dark mode, or send us feedback from the menu.",
"helpT": "Need a hand?",
"help": "Message us on Telegram, call, or report a problem. A real person answers.",
"next": "Next",
"skip": "Skip tour",
"done": "Start learning",
"again": "Show me around"
} }
} }

View File

@ -11,9 +11,11 @@
"demoBanner": "Agarsiisa — kaffaltiin, SMS fi imeeliin fakkeessa.", "demoBanner": "Agarsiisa — kaffaltiin, SMS fi imeeliin fakkeessa.",
"language": "Afaan", "language": "Afaan",
"saveFailed": "Olkaa'uun hin danda'amne. Walqunnamtii kee mirkaneessiitii irra deebi'ii yaali.", "saveFailed": "Olkaa'uun hin danda'amne. Walqunnamtii kee mirkaneessiitii irra deebi'ii yaali.",
"readOnly": "Ilaaluu dandeessa, garuu herregni kun agarsiisa keessatti jijjiirama olkaa'uu hin danda'u." "readOnly": "Ilaaluu dandeessa, garuu herregni kun agarsiisa keessatti jijjiirama olkaa'uu hin danda'u.",
"theme": "Haala dukkanaa"
}, },
"nav": { "nav": {
"history": "Seenaa",
"home": "Mana", "home": "Mana",
"courses": "Koorsiiwwan", "courses": "Koorsiiwwan",
"myCourses": "Koorsiiwwan koo", "myCourses": "Koorsiiwwan koo",
@ -24,17 +26,18 @@
"signOut": "Ba'i", "signOut": "Ba'i",
"getStarted": "Get started", "getStarted": "Get started",
"account": "Account", "account": "Account",
"progress": "My progress" "progress": "My progress",
"menu": "Baafata"
}, },
"landing": { "landing": {
"title": "Meekaappii ogummaa afaan keetiin baradhu", "title": "Ogeeyyii hojii irra jiran irraa meekaappii ogummaa baradhu",
"lead": "Koorsiiwwan viidiyoo ogeeyyii hojii irra jiran irraa. Al tokko kaffali, koorsiin bara baraan kan kee ta'a, bilbila keetiin ilaali.", "lead": "Koorsiiwwan viidiyoo ogeeyyii hojii irra jiran irraa. Al tokko kaffali, koorsiin bara baraan kan kee ta'a, bilbila keetiin ilaali.",
"browse": "Koorsiiwwan ilaali", "browse": "Koorsiiwwan ilaali",
"start": "Herrega uumi", "start": "Herrega uumi",
"featured": "Koorsiiwwan filatamoo", "featured": "Koorsiiwwan filatamoo",
"howTitle": "Akkamitti hojjeta", "howTitle": "Akkamitti hojjeta",
"how1": "Barnoota yaalii bilisaa ilaali", "how1": "Barnoota yaalii bilisaa ilaali",
"how2": "Telebirr ykn CBE Birr'n kaffali", "how2": "Biyya keessaa ykn alaa karaa barbaadde kaffali",
"how3": "Koorsiin battalumatti, bara baraan siif bana", "how3": "Koorsiin battalumatti, bara baraan siif bana",
"payTitle": "Karaa duraan beekteen kaffali", "payTitle": "Karaa duraan beekteen kaffali",
"fact1": "Amaariffa, Afaan Oromoo, Tigrinyaa fi Ingiliffa", "fact1": "Amaariffa, Afaan Oromoo, Tigrinyaa fi Ingiliffa",
@ -53,9 +56,17 @@
"viewAll": "View all courses", "viewAll": "View all courses",
"featuredLead": "Hand-picked courses from working makeup artists.", "featuredLead": "Hand-picked courses from working makeup artists.",
"ctaTitle": "Start with a free preview lesson", "ctaTitle": "Start with a free preview lesson",
"ctaBody": "No account needed to watch a preview. Pay only when you are ready." "ctaBody": "No account needed to watch a preview. Pay only when you are ready.",
"payLead": "Koorsii tokkoof yeroo tokko kaffali. Kaffaltii jiaa hin jiru.",
"payLocal": "Maallaqa mobaayilaa",
"payCards": "Kaardii baankii",
"payAbroad": "Biyya alaa irraa",
"payNote": "ArifPay keessaan nageenyaan kaffali. Kaffaltiin akkuma xumurameen koorsiin ni banama.",
"waitPill": "Dhiyootti banama · Tarree eegdotaatti makami"
}, },
"auth": { "auth": {
"socialLabel": "Herrega biraatiin seeni",
"continueWith": "{name}n itti fufi",
"phoneTitle": "Bilbila keetiin seeni", "phoneTitle": "Bilbila keetiin seeni",
"phoneLabel": "Lakkoofsa bilbilaa", "phoneLabel": "Lakkoofsa bilbilaa",
"sendCode": "Koodii ergi", "sendCode": "Koodii ergi",
@ -75,6 +86,7 @@
"resend": "Koodii haaraa ergi", "resend": "Koodii haaraa ergi",
"resendIn": "Sekondii {s} booda koodii haaraa erguu dandeessa", "resendIn": "Sekondii {s} booda koodii haaraa erguu dandeessa",
"wrongCode": "Koodiin sun dogoggora. Yaaliin {n} hafeera.", "wrongCode": "Koodiin sun dogoggora. Yaaliin {n} hafeera.",
"networkError": "Sarvarii qaqqabuu hin dandeenye. Walqunnamtii kee mirkaneessiitii irra deebi'ii yaali.",
"locked": "Yaaliin dogoggoraa baay'ateera. Koodii haaraa ergi.", "locked": "Yaaliin dogoggoraa baay'ateera. Koodii haaraa ergi.",
"noIdentity": "Herrega barataa uumuuf Claude'tti seenii agarsiisa kana bani.", "noIdentity": "Herrega barataa uumuuf Claude'tti seenii agarsiisa kana bani.",
"welcome": "Welcome back", "welcome": "Welcome back",
@ -82,7 +94,8 @@
"continueAs": "Continue as {name}", "continueAs": "Continue as {name}",
"or": "or", "or": "or",
"sideTitle": "Learn makeup from working artists", "sideTitle": "Learn makeup from working artists",
"sideBody": "Video lessons in Amharic, Afaan Oromoo, Tigrinya and English. Pay once and keep the course for life." "sideBody": "Video lessons in Amharic, Afaan Oromoo, Tigrinya and English. Pay once and keep the course for life.",
"countryCode": "Koodii biyyaa"
}, },
"setup": { "setup": {
"title": "Waa'ee kee nutti himi", "title": "Waa'ee kee nutti himi",
@ -112,9 +125,15 @@
"all": "Hunda", "all": "Hunda",
"count": "Koorsii {n}", "count": "Koorsii {n}",
"empty": "Koorsiin “{q}” wajjin walsimu hin jiru. Jecha gabaabaa yaali.", "empty": "Koorsiin “{q}” wajjin walsimu hin jiru. Jecha gabaabaa yaali.",
"emptyCategory": "Ramaddii kana keessa ammatti koorsiin hin jiru." "emptyCategory": "Ramaddii kana keessa ammatti koorsiin hin jiru.",
"clearSearch": "Barbaacha haqi",
"taughtIn": "Afaan barsiisaa",
"anyLanguage": "Afaan kamiyyuu",
"clearFilters": "Calaltuu haqi",
"emptyLanguage": "Afaan kanaan koorsiin ammaaf hin jiru."
}, },
"course": { "course": {
"buyShort": "Koorsii bitadhu",
"by": "{name} wajjin", "by": "{name} wajjin",
"lessons": "Barnoota {n}", "lessons": "Barnoota {n}",
"taughtIn": "Afaan barsiisaa: {lang}", "taughtIn": "Afaan barsiisaa: {lang}",
@ -138,6 +157,7 @@
"watchAgain": "Irra deebi'ii ilaali", "watchAgain": "Irra deebi'ii ilaali",
"tabOverview": "Overview", "tabOverview": "Overview",
"tabInstructor": "Instructor", "tabInstructor": "Instructor",
"about": "Waa'ee koorsii kanaa",
"summary": "Summary", "summary": "Summary",
"duration": "Total duration", "duration": "Total duration",
"language": "Language", "language": "Language",
@ -148,8 +168,14 @@
"lifetime": "Lifetime", "lifetime": "Lifetime",
"share": "Share", "share": "Share",
"linkCopied": "Link copied", "linkCopied": "Link copied",
"teaches": "{n, plural, one {# course} other {# courses}} on MakeUp Academy", "teaches": "{n, plural, one {# course} other {# courses}} on Sirkul Makeup",
"viewDetails": "View details" "viewDetails": "View details",
"includes": "Koorsiin kun kan of keessaa qabu",
"previewLessons": "{n, plural, one {Barnoota bilisaa # ilaaluu} other {Barnoota bilisaa # ilaaluu}}",
"createdBy": "Kan qopheesse",
"lifetimeAccess": "Dhaqqabummaa umurii guutuu",
"enrolled": "barattoota {n}",
"newCourse": "Koorsii haaraa"
}, },
"checkout": { "checkout": {
"title": "Akkaataa kaffaltii filadhu", "title": "Akkaataa kaffaltii filadhu",
@ -175,6 +201,7 @@
"alreadyOwned": "Koorsiin kun duraanuu kan keeti." "alreadyOwned": "Koorsiin kun duraanuu kan keeti."
}, },
"player": { "player": {
"prev": "Kan duraa",
"back": "Gara koorsiitti deebi'i", "back": "Gara koorsiitti deebi'i",
"notes": "Yaadannoo barnootaa", "notes": "Yaadannoo barnootaa",
"next": "Barnoota itti aanu", "next": "Barnoota itti aanu",
@ -194,7 +221,17 @@
"fwd10": "Sekondii 10 fuulduratti", "fwd10": "Sekondii 10 fuulduratti",
"fullscreen": "Guutuu iskiriinii", "fullscreen": "Guutuu iskiriinii",
"contents": "Qabiyyee", "contents": "Qabiyyee",
"progress": "Barnoota {total} keessaa {done} xumurameera" "progress": "Barnoota {total} keessaa {done} xumurameera",
"nowPlaying": "Amma taphachaa jira",
"upNext": "Kan itti aanu",
"nextShort": "Itti aanu",
"playNow": "Amma taphachiisi",
"autoNext": "Sekondii {n} keessatti jalqaba",
"courseProgress": "Koorsiin {pct}% xumurameera",
"courseDoneT": "Koorsiin xumurameera",
"courseDone": "{course} xumurteetta. Bara baraan kan kee ta'a; yeroo barbaadde barnoota kamittuu deebi'i.",
"seeProgress": "Guddina koo ilaali",
"markWatched": "Akka ilaalameetti mallatteessi (agarsiisa)"
}, },
"my": { "my": {
"title": "Koorsiiwwan koo", "title": "Koorsiiwwan koo",
@ -211,6 +248,8 @@
"open": "Bani" "open": "Bani"
}, },
"help": { "help": {
"email": "Imeelii nuuf ergaa",
"lead": "Deebii saffisaa, nama dhugaa Telegram irratti, ykn gabaasa nuti hordofnu.",
"title": "Gargaarsa", "title": "Gargaarsa",
"faq": "Gaaffilee baay'inaan gaafataman", "faq": "Gaaffilee baay'inaan gaafataman",
"q1": "Akkamittan kaffala?", "q1": "Akkamittan kaffala?",
@ -237,6 +276,12 @@
"required": "Mata-duree fi waan uumame guuti." "required": "Mata-duree fi waan uumame guuti."
}, },
"profile": { "profile": {
"lessonsList": "Barnootaa fi qormaata",
"account": "Qindaa'ina herregaa",
"statTime": "Yeroo ilaalame",
"statLessons": "Barnoota xumuraman",
"statCourses": "Koorsiiwwan",
"since": "Miseensa {date} irraa",
"title": "Piroofaayilii", "title": "Piroofaayilii",
"details": "Odeeffannoo kee", "details": "Odeeffannoo kee",
"phone": "Bilbila", "phone": "Bilbila",
@ -320,10 +365,59 @@
"wellDone": "Baay'ee gaarii — darbiteetta." "wellDone": "Baay'ee gaarii — darbiteetta."
}, },
"footer": { "footer": {
"poweredBy": "<name></name>n kan hojjetame",
"tagline": "Ogummaa baradhu. Bara baraan qabadhu.", "tagline": "Ogummaa baradhu. Bara baraan qabadhu.",
"instructors": "Leenjisaa", "instructors": "Leenjisaa",
"learn": "Barnoota", "learn": "Barnoota",
"support": "Deeggarsa", "support": "Deeggarsa",
"rights": "Mirgi seeraan eegameera" "rights": "Mirgi seeraan eegameera",
"contact": "Nu qunnamaa",
"waitlist": "Tarree eegdotaatti makami",
"kitTitle": "Meeshaa jalqabaa",
"kitSub": "Koorsii kee jalqabaa irratti kan itti fayyadamtu",
"kitCount": "Meeshaalee {n}",
"kit1": "Foundation fi concealer",
"kit1Note": "Bu’uura",
"kit2": "Burushii fi sponjii",
"kit2Note": "Meeshaalee",
"kit3": "Qalama fi jeelii mataa ijaa",
"kit3Note": "Mataa ijaa",
"kit4": "Lipstick fi liner",
"kit4Note": "Afaan",
"workTitle": "Hojii barattootaa",
"workSub": "Kan barattoota Sirkul",
"credits": "Madda suuraalee",
"founder": "Hundeessituu: <name></name>",
"tiktok": "@rezinabrhane TikTok irratti"
},
"history": {
"title": "Seenaa",
"lead": "Waan ilaalte, xumurte fi bitte hunda.",
"done": "“{lesson}” xumurte · {course}",
"watched": "“{lesson}” ilaalte · {course}",
"paid": "{course} bitte",
"report": "Gabaasa ergite: {subject}",
"empty": "Ammaaf homaa hin jiru. Barnoota jalqabi, asitti mul'ata.",
"seeAll": "Hunda ilaali"
},
"tour": {
"welcomeT": "Baga nagaan dhufte, {name}",
"welcome": "Wanti hundi eessa akka jiru ilaalcha gabaabaa. Sekondii 30 qofa.",
"continueT": "Bakka dhaabde irraa itti fufi",
"continue": "Barnoonni kee dhumaa asitti si eeggata. Tuqaa tokkoon bakka dhaabde irraa itti fufa.",
"coursesT": "Koorsiiwwan ilaali",
"courses": "Koorsiin hundi barnoota bilisaa qaba; osoo hin bitatin yaali.",
"myT": "Koorsiiwwan kee",
"my": "Wanti bitte hundi asitti argama, bara baraan kan kee.",
"profileT": "Guddinaa fi seenaa",
"profile": "Piroofaayiliin kee koorsii tokkoon tokkoon keessatti hammam akka geesse fi waan ilaalte hunda agarsiisa.",
"menuT": "Afaanii fi bifa",
"menu": "Afaan, bifa ifaa ykn dukkanaa jijjiiri, ykn yaada nuuf ergi.",
"helpT": "Gargaarsa barbaaddaa?",
"help": "Telegram irratti nuuf barreessi, bilbili ykn rakkoo gabaasi. Namni dhugaa deebisa.",
"next": "Itti aanu",
"skip": "Daawwannaa irra darbi",
"done": "Barachuu jalqabi",
"again": "Naa agarsiisi"
} }
} }

View File

@ -11,9 +11,11 @@
"demoBanner": "መርኣያ — ክፍሊት፣ ኤስኤምኤስን ኢመይልን ናይ ምምሳል እዮም።", "demoBanner": "መርኣያ — ክፍሊት፣ ኤስኤምኤስን ኢመይልን ናይ ምምሳል እዮም።",
"language": "ቋንቋ", "language": "ቋንቋ",
"saveFailed": "ክዕቀብ ኣይከኣለን። ርክብካ ኣረጋግጽካ እንደገና ፈትን።", "saveFailed": "ክዕቀብ ኣይከኣለን። ርክብካ ኣረጋግጽካ እንደገና ፈትን።",
"readOnly": "ክትርኢ ትኽእል ኢኻ፣ እዚ ሕሳብ ግን ኣብ መርኣያ ለውጢ ክዕቅብ ኣይክእልን።" "readOnly": "ክትርኢ ትኽእል ኢኻ፣ እዚ ሕሳብ ግን ኣብ መርኣያ ለውጢ ክዕቅብ ኣይክእልን።",
"theme": "ጸልማት ገጽ"
}, },
"nav": { "nav": {
"history": "ታሪኽ",
"home": "መበገሲ", "home": "መበገሲ",
"courses": "ኮርሳት", "courses": "ኮርሳት",
"myCourses": "ናተይ ኮርሳት", "myCourses": "ናተይ ኮርሳት",
@ -24,17 +26,18 @@
"signOut": "ውጻእ", "signOut": "ውጻእ",
"getStarted": "Get started", "getStarted": "Get started",
"account": "Account", "account": "Account",
"progress": "My progress" "progress": "My progress",
"menu": "መውጽኢ"
}, },
"landing": { "landing": {
"title": "ሞያዊ ሜካፕ ብቋንቋኻ ተማሃር", "title": "ካብ ኣብ ስራሕ ዘለዉ ሞያውያን ሞያዊ ሜካፕ ተማሃር",
"lead": "ካብ ኣብ ስራሕ ዘለዉ ክኢላታት ናይ ቪድዮ ኮርሳት። ሓንሳብ ክፈል፣ ኮርሱ ንዘለኣለም ናትካ እዩ፣ ብተሌፎንካ ርአ።", "lead": "ካብ ኣብ ስራሕ ዘለዉ ክኢላታት ናይ ቪድዮ ኮርሳት። ሓንሳብ ክፈል፣ ኮርሱ ንዘለኣለም ናትካ እዩ፣ ብተሌፎንካ ርአ።",
"browse": "ኮርሳት ርአ", "browse": "ኮርሳት ርአ",
"start": "ሕሳብ ፍጠር", "start": "ሕሳብ ፍጠር",
"featured": "ፍሉያት ኮርሳት", "featured": "ፍሉያት ኮርሳት",
"howTitle": "ከመይ ይሰርሕ", "howTitle": "ከመይ ይሰርሕ",
"how1": "ናጻ ናይ ፈተነ ትምህርትታት ርአ", "how1": "ናጻ ናይ ፈተነ ትምህርትታት ርአ",
"how2": "ብቴሌብር ወይ ሲቢኢ ብር ክፈል", "how2": "ኣብ ውሽጢ ዓዲ ይኹን ወጻኢ ብዝደለኽዮ ክፈሊ",
"how3": "ኮርሱ ብቕጽበት ይኽፈት፣ ንዘለኣለም", "how3": "ኮርሱ ብቕጽበት ይኽፈት፣ ንዘለኣለም",
"payTitle": "ብዝለመድካዮ መንገዲ ክፈል", "payTitle": "ብዝለመድካዮ መንገዲ ክፈል",
"fact1": "ኣምሓርኛ፣ ኦሮምኛ፣ ትግርኛን እንግሊዝኛን", "fact1": "ኣምሓርኛ፣ ኦሮምኛ፣ ትግርኛን እንግሊዝኛን",
@ -53,9 +56,17 @@
"viewAll": "View all courses", "viewAll": "View all courses",
"featuredLead": "Hand-picked courses from working makeup artists.", "featuredLead": "Hand-picked courses from working makeup artists.",
"ctaTitle": "Start with a free preview lesson", "ctaTitle": "Start with a free preview lesson",
"ctaBody": "No account needed to watch a preview. Pay only when you are ready." "ctaBody": "No account needed to watch a preview. Pay only when you are ready.",
"payLead": "ንነፍሲ ወከፍ ኮርስ ሓንሳብ ክፈል። ወርሓዊ ክፍሊት የለን።",
"payLocal": "ናይ ሞባይል ገንዘብ",
"payCards": "ናይ ባንኪ ካርድታት",
"payAbroad": "ካብ ወጻኢ",
"payNote": "ብኣሪፍፔይ ብውሑስ መንገዲ ክፈል። ክፍሊት ምስ ተወድአ ኮርሱ ይኽፈት።",
"waitPill": "ቀልጢፉ ይኽፈት · ናብ ዝርዝር ተጸበይቲ ተጸንበር"
}, },
"auth": { "auth": {
"socialLabel": "ብካልእ ሕሳብ እቶ",
"continueWith": "ብ{name} ቀጽል",
"phoneTitle": "ብተሌፎንካ እቶ", "phoneTitle": "ብተሌፎንካ እቶ",
"phoneLabel": "ቁጽሪ ተሌፎን", "phoneLabel": "ቁጽሪ ተሌፎን",
"sendCode": "ኮድ ስደድ", "sendCode": "ኮድ ስደድ",
@ -75,6 +86,7 @@
"resend": "ሓድሽ ኮድ ስደድ", "resend": "ሓድሽ ኮድ ስደድ",
"resendIn": "ድሕሪ {s} ካልኢት ሓድሽ ኮድ ክትሰድድ ትኽእል", "resendIn": "ድሕሪ {s} ካልኢት ሓድሽ ኮድ ክትሰድድ ትኽእል",
"wrongCode": "እቲ ኮድ ጌጋ እዩ። {n} ፈተነ ተሪፉ።", "wrongCode": "እቲ ኮድ ጌጋ እዩ። {n} ፈተነ ተሪፉ።",
"networkError": "ምስ ሰርቨር ክራኸብ ኣይተኻእለን። ርክብካ ኣረጋግጽን እንደገና ፈትንን።",
"locked": "ብዙሕ ጌጋ ፈተነታት። ሓድሽ ኮድ ስደድ።", "locked": "ብዙሕ ጌጋ ፈተነታት። ሓድሽ ኮድ ስደድ።",
"noIdentity": "ናይ ተማሃራይ ሕሳብ ንምፍጣር ናብ Claude ኣቲኻ እዚ መርኣያ ክፈቶ።", "noIdentity": "ናይ ተማሃራይ ሕሳብ ንምፍጣር ናብ Claude ኣቲኻ እዚ መርኣያ ክፈቶ።",
"welcome": "Welcome back", "welcome": "Welcome back",
@ -82,7 +94,8 @@
"continueAs": "Continue as {name}", "continueAs": "Continue as {name}",
"or": "or", "or": "or",
"sideTitle": "Learn makeup from working artists", "sideTitle": "Learn makeup from working artists",
"sideBody": "Video lessons in Amharic, Afaan Oromoo, Tigrinya and English. Pay once and keep the course for life." "sideBody": "Video lessons in Amharic, Afaan Oromoo, Tigrinya and English. Pay once and keep the course for life.",
"countryCode": "ኮድ ሃገር"
}, },
"setup": { "setup": {
"title": "ብዛዕባኻ ንገረና", "title": "ብዛዕባኻ ንገረና",
@ -112,9 +125,15 @@
"all": "ኩሉ", "all": "ኩሉ",
"count": "{n} ኮርሳት", "count": "{n} ኮርሳት",
"empty": "ምስ «{q}» ዝሰማማዕ ኮርስ የለን። ሓጺር ቃል ፈትን።", "empty": "ምስ «{q}» ዝሰማማዕ ኮርስ የለን። ሓጺር ቃል ፈትን።",
"emptyCategory": "ኣብዚ ምድብ ክሳብ ሕጂ ኮርስ የለን።" "emptyCategory": "ኣብዚ ምድብ ክሳብ ሕጂ ኮርስ የለን።",
"clearSearch": "ምድላይ ኣጽሪ",
"taughtIn": "ቋንቋ ምምሃር",
"anyLanguage": "ዝኾነ ቋንቋ",
"clearFilters": "መጻረዪታት ኣጽሪ",
"emptyLanguage": "ብዚ ቋንቋ ክሳብ ሕጂ ኮርስ የለን።"
}, },
"course": { "course": {
"buyShort": "ኮርስ ግዝእ",
"by": "ምስ {name}", "by": "ምስ {name}",
"lessons": "{n} ትምህርትታት", "lessons": "{n} ትምህርትታት",
"taughtIn": "ቋንቋ ምምሃር፦ {lang}", "taughtIn": "ቋንቋ ምምሃር፦ {lang}",
@ -138,6 +157,7 @@
"watchAgain": "እንደገና ርአ", "watchAgain": "እንደገና ርአ",
"tabOverview": "Overview", "tabOverview": "Overview",
"tabInstructor": "Instructor", "tabInstructor": "Instructor",
"about": "ብዛዕባ እዚ ኮርስ",
"summary": "Summary", "summary": "Summary",
"duration": "Total duration", "duration": "Total duration",
"language": "Language", "language": "Language",
@ -148,8 +168,14 @@
"lifetime": "Lifetime", "lifetime": "Lifetime",
"share": "Share", "share": "Share",
"linkCopied": "Link copied", "linkCopied": "Link copied",
"teaches": "{n, plural, one {# course} other {# courses}} on MakeUp Academy", "teaches": "{n, plural, one {# course} other {# courses}} on Sirkul Makeup",
"viewDetails": "View details" "viewDetails": "View details",
"includes": "እዚ ኮርስ ዝሓዞ",
"previewLessons": "{n, plural, one {# ነጻ ቅድመ ርእይቶ ትምህርቲ} other {# ነጻ ቅድመ ርእይቶ ትምህርትታት}}",
"createdBy": "ዘዳለዎ",
"lifetimeAccess": "ንዘለኣለም ምርካብ",
"enrolled": "{n} ተማሃሮ",
"newCourse": "ሓድሽ ኮርስ"
}, },
"checkout": { "checkout": {
"title": "መንገዲ ክፍሊት ምረጽ", "title": "መንገዲ ክፍሊት ምረጽ",
@ -175,6 +201,7 @@
"alreadyOwned": "እዚ ኮርስ ድሮ ናትካ እዩ።" "alreadyOwned": "እዚ ኮርስ ድሮ ናትካ እዩ።"
}, },
"player": { "player": {
"prev": "ዝሓለፈ",
"back": "ናብ ኮርስ ተመለስ", "back": "ናብ ኮርስ ተመለስ",
"notes": "መዘኻኸሪ ትምህርቲ", "notes": "መዘኻኸሪ ትምህርቲ",
"next": "ዝቕጽል ትምህርቲ", "next": "ዝቕጽል ትምህርቲ",
@ -194,7 +221,17 @@
"fwd10": "10 ካልኢት ንቕድሚት", "fwd10": "10 ካልኢት ንቕድሚት",
"fullscreen": "ምሉእ ስክሪን", "fullscreen": "ምሉእ ስክሪን",
"contents": "ትሕዝቶ", "contents": "ትሕዝቶ",
"progress": "ካብ {total} ትምህርትታት {done} ተወዲኦም" "progress": "ካብ {total} ትምህርትታት {done} ተወዲኦም",
"nowPlaying": "ሕጂ ይርአ ኣሎ",
"upNext": "ቀጻሊ",
"nextShort": "ቀጻሊ",
"playNow": "ሕጂ ኣጻውት",
"autoNext": "ኣብ {n} ካልኢት ይጅምር",
"courseProgress": "ኮርስ {pct}% ተወዲኡ",
"courseDoneT": "ኮርስ ተወዲኡ",
"courseDone": "{course} ወዲእኪ። ንሓዋሩ ናትኪ እዩ፣ ኣብ ዝደለኽዮ ግዜ ናብ ዝኾነ ትምህርቲ ተመለሲ።",
"seeProgress": "ምዕባለይ ርአ",
"markWatched": "ከም ዝተራእየ ምልክት ግበር (ማርኣያ)"
}, },
"my": { "my": {
"title": "ናተይ ኮርሳት", "title": "ናተይ ኮርሳት",
@ -211,6 +248,8 @@
"open": "ክፈት" "open": "ክፈት"
}, },
"help": { "help": {
"email": "ኢመይል ስደዱልና",
"lead": "ቅልጡፍ መልስታት፣ ብቴሌግራም ሓቀኛ ሰብ፣ ወይ እንከታተሎ ጸብጻብ።",
"title": "ሓገዝ", "title": "ሓገዝ",
"faq": "ብተደጋጋሚ ዝሕተቱ ሕቶታት", "faq": "ብተደጋጋሚ ዝሕተቱ ሕቶታት",
"q1": "ብኸመይ እኸፍል?", "q1": "ብኸመይ እኸፍል?",
@ -237,6 +276,12 @@
"required": "ኣርእስትን ዘጋጠመን ምላእ።" "required": "ኣርእስትን ዘጋጠመን ምላእ።"
}, },
"profile": { "profile": {
"lessonsList": "ትምህርትታትን ፈተናታትን",
"account": "ምድላው ሕሳብ",
"statTime": "ዝተራእየ ግዜ",
"statLessons": "ዝተወድኡ ትምህርትታት",
"statCourses": "ኮርሳት",
"since": "ካብ {date} ኣባል",
"title": "ፕሮፋይል", "title": "ፕሮፋይል",
"details": "ሓበሬታኻ", "details": "ሓበሬታኻ",
"phone": "ተሌፎን", "phone": "ተሌፎን",
@ -320,10 +365,59 @@
"wellDone": "ጽቡቕ — ሓሊፍካ።" "wellDone": "ጽቡቕ — ሓሊፍካ።"
}, },
"footer": { "footer": {
"poweredBy": "ብ<name></name> ዝተሰርሐ",
"tagline": "ሞያ ተማሃር። ንሓዋሩ ሓዞ።", "tagline": "ሞያ ተማሃር። ንሓዋሩ ሓዞ።",
"instructors": "መምህር", "instructors": "መምህር",
"learn": "ትምህርቲ", "learn": "ትምህርቲ",
"support": "ሓገዝ", "support": "ሓገዝ",
"rights": "መሰል ብሕጊ ዝተሓለወ እዩ" "rights": "መሰል ብሕጊ ዝተሓለወ እዩ",
"contact": "ርኸቡና",
"waitlist": "ናብ ዝርዝር ተጸበይቲ ተጸንበር",
"kitTitle": "መጀመርታ ኪት",
"kitSub": "ኣብ ቀዳማይ ኮርስካ እትጥቀመሉ",
"kitCount": "{n} ኣቑሑ",
"kit1": "ፋውንዴሽንን ኮንሲለርን",
"kit1Note": "መሰረት",
"kit2": "ብሩሻትን ስፖንጅን",
"kit2Note": "መሳርሒታት",
"kit3": "ናይ ቅንድቢ ርሳስን ጄልን",
"kit3Note": "ቅንድቢ",
"kit4": "ሊፕስቲክን ላይነርን",
"kit4Note": "ከናፍር",
"workTitle": "ስራሕ ተምሃሮ",
"workSub": "ብተምሃሮ ሲርኩል ዝተሰርሑ",
"credits": "ምንጪ ስእልታት",
"founder": "መስራቲት፦ <name></name>",
"tiktok": "@rezinabrhane ኣብ ቲክቶክ"
},
"history": {
"title": "ታሪኽ",
"lead": "ዝረኣኻዮ፣ ዝወዳእካዮን ዝገዛእካዮን ኩሉ።",
"done": "“{lesson}” ወዲእካ · {course}",
"watched": "“{lesson}” ርኢኻ · {course}",
"paid": "{course} ገዚእካ",
"report": "ጸብጻብ ሰዲድካ፦ {subject}",
"empty": "ገና የለን። ትምህርቲ ጀምር፣ ኣብዚ ክርአ እዩ።",
"seeAll": "ኩሉ ርአ"
},
"tour": {
"welcomeT": "እንቋዕ ብደሓን መጻእኪ፣ {name}",
"welcome": "ኩሉ ነገር ኣበይ ከም ዘሎ ሓጺር ምርኣይ። 30 ሰከንድ ጥራይ።",
"continueT": "ካብ ዘቋረጽክዮ ቀጽሊ",
"continue": "ናይ መወዳእታ ትምህርትኺ ኣብዚ ይጽበየኪ። ሓንሳብ ምስ ጠወቕኪ ካብ ዘቋረጽክዮ ይቕጽል።",
"coursesT": "ኮርሳት ድለዪ",
"courses": "ነፍሲ ወከፍ ኮርስ ነጻ ትምህርትታት ኣለዎ፤ ቅድሚ ምግዛእኪ ፈትኒ።",
"myT": "ኮርሳትኪ",
"my": "ዝገዛእክዮ ኩሉ ኣብዚ ኣሎ፣ ንሓዋሩ ናትኪ።",
"profileT": "ምዕባለን ታሪኽን",
"profile": "ፕሮፋይልኪ ኣብ ነፍሲ ወከፍ ኮርስ ክሳብ ክንደይ ከም ዝበጻሕክን ዝረኣኽዮ ኩሉን የርኢ።",
"menuT": "ቋንቋን ገጽታን",
"menu": "ቋንቋ፣ ብሩህ ወይ ጸልማት ገጽታ ቀይሪ፣ ወይ ርእይቶ ስደዲ።",
"helpT": "ሓገዝ ትደልዪ?",
"help": "ብቴሌግራም ጽሓፍልና፣ ደውሊ ወይ ጸገም ሓብሪ። ሓቀኛ ሰብ ይምልስ።",
"next": "ቀጻሊ",
"skip": "ዑደት ሕለፍ",
"done": "ምምሃር ጀምሪ",
"again": "ኣርእዩኒ"
} }
} }

View File

@ -54,6 +54,9 @@ importers:
packages/data: packages/data:
devDependencies: devDependencies:
'@types/node':
specifier: ^22
version: 22.20.5
'@types/react': '@types/react':
specifier: ^19 specifier: ^19
version: 19.3.0 version: 19.3.0

View File

@ -1,6 +1,12 @@
{ {
"version": 1, "version": 1,
"skills": { "skills": {
"apple-design": {
"source": "emilkowalski/skills",
"sourceType": "github",
"skillPath": "skills/apple-design/SKILL.md",
"computedHash": "0190417d092a0df447b000154e39733ea6d97efad6d3bec8a6ce3845aeb88914"
},
"emil-design-eng": { "emil-design-eng": {
"source": "emilkowalski/skill", "source": "emilkowalski/skill",
"sourceType": "github", "sourceType": "github",
@ -12,6 +18,12 @@
"sourceType": "github", "sourceType": "github",
"skillPath": "skills/productivity/grill-me/SKILL.md", "skillPath": "skills/productivity/grill-me/SKILL.md",
"computedHash": "9cdbb4b8f7a3aeaef82e6230c9e823500d4a8a1214c726cf342cf9829d34fc7d" "computedHash": "9cdbb4b8f7a3aeaef82e6230c9e823500d4a8a1214c726cf342cf9829d34fc7d"
},
"make-interfaces-feel-better": {
"source": "jakubkrehel/make-interfaces-feel-better",
"sourceType": "github",
"skillPath": "skills/make-interfaces-feel-better/SKILL.md",
"computedHash": "c8b15b529e088a318b2d3c17f0a97e15a7b1ce9ddab8bbdf9209e6ab7315cbde"
} }
} }
} }

View File

@ -26,8 +26,9 @@ const w = dom.window;
await new Promise((r) => setTimeout(r, 2000)); await new Promise((r) => setTimeout(r, 2000));
for (const route of ['#/am', '#/am/courses', '#/en/help']) { w.location.hash = route; await new Promise((r) => setTimeout(r, 300)); } for (const route of ['#/am', '#/am/courses', '#/en/help']) { w.location.hash = route; await new Promise((r) => setTimeout(r, 300)); }
// React can re-insert hoisted <link>/<script> tags at hydration; jsdom doesn't fetch them, so scan the DOM too. // React can re-insert hoisted <link>/<script> tags at hydration; jsdom doesn't fetch them, so scan the DOM too.
for (const el of w.document.querySelectorAll('link[href],script[src]')) network.push(`${el.tagName.toLowerCase()} ${el.getAttribute('href') ?? el.getAttribute('src')}`); for (const el of w.document.querySelectorAll('link[href]:not([rel=canonical]):not([rel=author]):not([rel=alternate]),script[src]')) // canonical/author/alternate are metadata, never fetched
const allowed = (u) => /^link https:\/\/fonts\.(googleapis|gstatic)\.com/.test(u) || /cdnjs\.cloudflare\.com|cdn\.jsdelivr\.net\/npm|fonts\.googleapis\.com|fonts\.gstatic\.com/.test(u); network.push(`${el.tagName.toLowerCase()} ${el.getAttribute('href') ?? el.getAttribute('src')}`);
const allowed = (u) => /^(link|script) data:/.test(u) || /^link https:\/\/fonts\.(googleapis|gstatic)\.com/.test(u) || /cdnjs\.cloudflare\.com|cdn\.jsdelivr\.net\/npm|fonts\.googleapis\.com|fonts\.gstatic\.com/.test(u);
const bad = network.filter((n) => !allowed(n)); const bad = network.filter((n) => !allowed(n));
console.log({ networkAttempts: bad, errors }); console.log({ networkAttempts: bad, errors });
process.exit(bad.length || errors.length ? 1 : 0); process.exit(bad.length || errors.length ? 1 : 0);

View File

@ -14,13 +14,19 @@ const b = await puppeteer.launch({ executablePath: '/Applications/Google Chrome.
const problems = []; let clicks = 0; const problems = []; let clicks = 0;
async function open(p, hash, signedOut) { async function open(p, hash, signedOut) {
await p.goto('about:blank'); await p.goto('about:blank');
await p.goto('file://' + file + hash, { waitUntil: 'domcontentloaded' }); await new Promise((r) => setTimeout(r, 500)); // The app rewrites the hash while booting, and Puppeteer sometimes misses that load's lifecycle event and
// waits forever. If the document did load, carry on; if it didn't, fail as before.
await p.goto('file://' + file + hash, { waitUntil: 'domcontentloaded', timeout: 15000 })
.catch(async (e) => { if ((await p.evaluate(() => document.readyState).catch(() => '')) === 'loading' || !(await p.evaluate(() => !!document.body).catch(() => false))) throw e; }); await new Promise((r) => setTimeout(r, 500));
} }
async function worker(list) { async function worker(list) {
const p = await b.newPage(); await p.setViewport({ width: 1280, height: 900 }); const p = await b.newPage(); await p.setViewport({ width: 1280, height: 900 });
let errs = []; p.on('pageerror', (e) => errs.push(e.message)); let errs = []; p.on('pageerror', (e) => errs.push(e.message));
// Offline run: block third-party requests (the Vimeo placeholder iframe can stall unloading the player page).
await p.setRequestInterception(true); p.on('request', (r) => (/^(file|data|about|blob):/.test(r.url()) || /fonts\.(googleapis|gstatic)\.com/.test(r.url()) ? r.continue() : r.abort()));
await p.evaluateOnNewDocument((s) => { window.__SEED__ = s; }, seed); await p.evaluateOnNewDocument((s) => { window.__SEED__ = s; }, seed);
await p.evaluateOnNewDocument(mock); await p.evaluateOnNewDocument(mock);
await p.evaluateOnNewDocument(() => { try { localStorage.setItem('lms.langChosen', '1'); localStorage.setItem('lms.tourDone', '1'); } catch {} });
for (const [hash, signedOut] of list) { for (const [hash, signedOut] of list) {
await p.evaluateOnNewDocument((so) => { try { so ? localStorage.setItem('lms.signedOut', '1') : localStorage.removeItem('lms.signedOut'); } catch {} }, !!signedOut); await p.evaluateOnNewDocument((so) => { try { so ? localStorage.setItem('lms.signedOut', '1') : localStorage.removeItem('lms.signedOut'); } catch {} }, !!signedOut);
await open(p, hash, signedOut); await open(p, hash, signedOut);

View File

@ -0,0 +1,67 @@
/**
* Waitlist receiver for apps/demo/public/waitlist/index.html → one row per signup in a Google Sheet.
*
* Setup (once, in the Google account that should own the list):
* 1. Create a Google Sheet, e.g. "Sirkul Makeup waitlist".
* 2. Extensions → Apps Script. Replace Code.gs with this file and save.
* 3. Deploy → New deployment → type "Web app". Execute as: Me. Who has access: Anyone.
* 4. Authorize, then copy the Web app URL (ends in /exec).
* 5. Paste it into ENDPOINT (the page POSTs signups and GETs the count) in apps/demo/public/waitlist/index.html, then commit and deploy.
* After editing this script, use Deploy → Manage deployments → Edit → New version (the URL stays the same).
*/
const SHEET_NAME = 'Signups';
const HEADER = ['Signed up (UTC)', 'Name', 'Email', 'Phone', 'Language', 'Page'];
function doPost(e) {
let data;
try { data = JSON.parse((e && e.postData && e.postData.contents) || '{}'); } catch (_) { return reply({ ok: false, error: 'bad_json' }); }
if (data.company) return reply({ ok: true }); // honeypot filled → bot; pretend success
const row = clean(data);
if (row.error) return reply({ ok: false, error: row.error });
const lock = LockService.getScriptLock();
lock.waitLock(10000);
try {
const sheet = getSheet();
const last = sheet.getLastRow();
// Email (col C) and phone (col D) either may be blank; a match on either one is the same person.
const seen = last > 1 ? sheet.getRange(2, 3, last - 1, 2).getValues().some((r) => (row.email && String(r[0]).toLowerCase() === row.email) || (row.phone && String(r[1]).replace(/^'/, '') === row.phone)) : false;
if (!seen) {
sheet.appendRow([new Date().toISOString(), safe(row.name), safe(row.email), row.phone ? "'" + row.phone : '', safe(row.locale), safe(row.page)]);
}
} finally { lock.releaseLock(); }
return reply({ ok: true });
}
/** Public signup count for the page's "people waiting" pill. Only the number leaves the sheet. */
function doGet() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(SHEET_NAME);
return reply({ ok: true, count: sheet ? Math.max(0, sheet.getLastRow() - 1) : 0 });
}
/** Server-side check: the page validates too, but anyone can POST here. */
function clean(d) {
const name = String(d.name || '').trim().slice(0, 80);
const email = String(d.email || '').trim().toLowerCase().slice(0, 120);
const phone = String(d.phone || '').replace(/[\s()-]/g, '');
// People sign up by SMS or by email: a name plus at least one valid contact.
if (name.length < 2) return { error: 'name' };
if (email && !/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email)) return { error: 'email' };
if (phone && !/^\+\d{8,15}$/.test(phone)) return { error: 'phone' };
if (!email && !phone) return { error: 'contact' };
return { name, email, phone, locale: String(d.locale || '').slice(0, 20), page: String(d.page || '').slice(0, 200) };
}
/** Cells starting with = + - @ would run as formulas when someone opens the sheet. */
function safe(v) { return /^[=+\-@]/.test(v) ? "'" + v : v; }
function getSheet() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
let sheet = ss.getSheetByName(SHEET_NAME);
if (!sheet) { sheet = ss.insertSheet(SHEET_NAME); sheet.appendRow(HEADER); sheet.setFrozenRows(1); }
return sheet;
}
function reply(obj) {
return ContentService.createTextOutput(JSON.stringify(obj)).setMimeType(ContentService.MimeType.JSON);
}

32
tools/waitlist-check.mjs Normal file
View File

@ -0,0 +1,32 @@
// Runs tools/waitlist-apps-script.gs against stub Google services. Usage: node tools/waitlist-check.mjs
import fs from 'fs'; import vm from 'vm'; import assert from 'assert';
const rows = [];
const sheet = { appendRow: (r) => rows.push(r), getLastRow: () => rows.length, setFrozenRows() {},
getRange: (r, c, n, w = 1) => ({ getValues: () => rows.slice(r - 1, r - 1 + n).map((row) => row.slice(c - 1, c - 1 + w)) }) };
const ctx = {
SpreadsheetApp: { getActiveSpreadsheet: () => ({ getSheetByName: () => (rows.length ? sheet : null), insertSheet: () => sheet }) },
LockService: { getScriptLock: () => ({ waitLock() {}, releaseLock() {} }) },
ContentService: { MimeType: { JSON: 'json' }, createTextOutput: (t) => ({ setMimeType: () => JSON.parse(t) }) },
};
vm.runInNewContext(fs.readFileSync(new URL('./waitlist-apps-script.gs', import.meta.url), 'utf8') + '\nthis.doPost = doPost; this.doGet = doGet;', ctx);
const post = (d) => ctx.doPost({ postData: { contents: JSON.stringify(d) } });
const ok = { name: 'Selam Tesfaye', email: 'Selam@Example.com', phone: '+251911234567', locale: 'en' };
assert.deepEqual(post(ok), { ok: true });
assert.equal(rows.length, 2, 'header + one signup');
assert.equal(rows[1][2], 'selam@example.com'); assert.equal(rows[1][3], "'+251911234567", 'phone kept as text');
assert.deepEqual(post({ ...ok, email: 'selam@example.com' }), { ok: true }); assert.equal(rows.length, 2, 'duplicate email skipped');
assert.deepEqual(post({ ...ok, email: 'x@y.co', phone: '0911' }), { ok: false, error: 'phone' });
assert.deepEqual(post({ ...ok, email: 'nope' }), { ok: false, error: 'email' });
assert.deepEqual(post({ ...ok, name: ' ' }), { ok: false, error: 'name' });
post({ ...ok, email: 'f@y.co', phone: '+251911000222', name: '=HYPERLINK("x")' }); assert.equal(rows.at(-1)[1], '\'=HYPERLINK("x")', 'formula neutralised');
const n = rows.length; assert.deepEqual(post({ ...ok, email: 'bot@y.co', company: 'spam' }), { ok: true }); assert.equal(rows.length, n, 'honeypot dropped');
assert.deepEqual(ctx.doPost({ postData: { contents: '{bad' } }), { ok: false, error: 'bad_json' });
assert.deepEqual(ctx.doGet(), { ok: true, count: rows.length - 1 }, 'count excludes the header');
console.log('waitlist checks: all passed');
// SMS or email: either contact alone is enough, neither is an error, and a repeat phone is skipped.
assert.deepEqual(post({ name: 'Hana T', phone: '+251922000111' }), { ok: true });
const m = rows.length; post({ name: 'Hana T', phone: '+251 922 000 111' }); assert.equal(rows.length, m, 'duplicate phone skipped');
assert.deepEqual(post({ name: 'Mimi K', email: 'mimi@example.com' }), { ok: true });
assert.deepEqual(post({ name: 'No Contact' }), { ok: false, error: 'contact' });
console.log('waitlist sms/email checks: ok');

View File

@ -1,6 +1,12 @@
{ {
"installCommand": "npx -y pnpm@9 install --frozen-lockfile", "installCommand": "npx -y pnpm@9 install --frozen-lockfile",
"buildCommand": "npx -y pnpm@9 --filter demo build && node tools/vercel-build.mjs", "buildCommand": "npx -y pnpm@9 run app:build",
"outputDirectory": "apps/demo/out", "outputDirectory": "apps/demo/out",
"framework": null "framework": null,
"rewrites": [
{
"source": "/waitlist",
"destination": "/waitlist/index.html"
}
]
} }