/* =====================================================================
   THE HOMEPAGE HEADLINE — five designs (10 Nov 2026, owner: "I liked 3, 4, 5, 6 and 10 — let the user choose one")
   ---------------------------------------------------------------------
   The <h1> in includes/home_classic.php keeps the real sentence (for Google and screen readers).
   assets/home-headline.js (printed inline right after the <h1>) reads the choice saved on this device
   (localStorage "hh" = 3 | 4 | 5 | 6 | 10, chosen on Dashboard › Make it yours) and builds a "dressed" copy
   in <span class="hh-fx">. Classes on the <h1>: hh-on + hh-3 … hh-10.
     3  = words rise one by one, the last word is gold with a small turning planet
     4  = typewriter (like the Writing test)
     5  = one giant word in the tall number font
     6  = pills in the four skill colours
     10 = a teacher's red pen circles the key word + a handwritten note
   Works in all 10 languages (it only needs the {g}…{/g} word and the | line marks of "hero.h1").
   Weak phones (html.lk-lite) and "reduce motion": the finished picture, no movement.
   ===================================================================== */
#hero-section h1.hc-h1.hh-on { animation: none; position: relative; }
/* the real sentence: still there for screen readers and search engines, not painted */
#hero-section h1.hc-h1.hh-on > .hl-t { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.hh-fx { display: block; }
.hh-note { display: none; }
.hh-b { display: none; }

/* ── 3 · WORDS RISE + PLANET ───────────────────────────────────────── */
.hh-3 .hh-fx .w { display: inline-block; }
.hh-3 .hh-fx .w.z { color: var(--gold-num, #8a5b00); white-space: nowrap; }
.hh-3 .pl { display: inline-block; width: .62em; height: .62em; margin-inline-start: .14em; border-radius: 50%; vertical-align: -.02em; position: relative;
  background: radial-gradient(circle at 32% 30%, #b6a2ff, #7c5ce6 55%, #4c2fb8); box-shadow: 0 0 0 .07em #f0b429 inset; }
.hh-3 .pl::after { content: ""; position: absolute; left: -22%; top: 40%; width: 144%; height: 18%; border-radius: 50%; border: .05em solid #f0b429; transform: rotate(-20deg); }

/* ── 4 · TYPEWRITER ────────────────────────────────────────────────── */
.hh-4 .hh-fx { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Roboto Mono", "Liberation Mono", monospace; font-weight: 800; letter-spacing: -.04em; font-size: .76em; line-height: 1.22; }
html[lang="hi"] .hh-4 .hh-fx, html[lang="bn"] .hh-4 .hh-fx, html[lang="ur"] .hh-4 .hh-fx, html[lang="fa"] .hh-4 .hh-fx { font-family: inherit; letter-spacing: 0; font-size: .9em; line-height: 1.35; }
.hh-4 .wd { display: inline-block; white-space: nowrap; }
.hh-4 .u { visibility: hidden; }
.hh-4 .u.v { visibility: visible; }
.hh-4 .k { padding: 0 .16em; border-radius: .14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hh-4 .k.v { background: var(--gold-fill, #f0b429); color: #1a1400; }
.hh-4 .car { display: inline-block; width: 0; height: 1em; border-inline-start: .12em solid var(--brand, #6d4ee0); margin-inline-end: -.12em; vertical-align: -.14em; }

/* ── 5 · ONE GIANT WORD ────────────────────────────────────────────── */
.hh-5 .hh-fx { font-size: clamp(15px, 1.9vw, 20px); font-weight: 800; letter-spacing: .03em; line-height: 1.3; text-transform: uppercase; color: var(--body, #45436a); }
.hh-5 .sm { display: block; position: relative; z-index: 1; }
html[lang="vi"] .hh-5 .big { padding-top: .3em; }
/* padding = room for accents above (Ố, Ə) and tails below (Ş, Ç): the gold fill is only painted inside the box */
.hh-5 .big { display: block; width: max-content; max-width: none; white-space: nowrap; margin: -.02em 0 -.2em; padding: .16em 0 .38em; font: 400 clamp(84px, 13vw, 132px)/.92 var(--num-font, Anton, Impact, sans-serif); letter-spacing: .01em;
  color: var(--gold-fill, #f0b429); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hh-5 .big { color: transparent; -webkit-text-stroke: 2px #c98f0a; background: linear-gradient(0deg, var(--gold-fill, #f0b429) 50%, transparent 50%) 0 100% / 100% 200% no-repeat; -webkit-background-clip: text; background-clip: text; }
}
/* Cyrillic: the tall font has no Russian letters — the heaviest site font instead */
html[lang="ru"] .hh-5 .big, html[lang="tg"] .hh-5 .big { font-family: Inter, system-ui, "Segoe UI", sans-serif; font-weight: 800; letter-spacing: -.03em; line-height: 1; -webkit-text-stroke: 0; padding: .1em 0 .2em; margin: 0 0 -.06em; }
/* joined and stacked scripts: no outline (it would cut through the letters), more room above and below */
html[lang="hi"] .hh-5 .big, html[lang="bn"] .hh-5 .big, html[lang="ur"] .hh-5 .big, html[lang="fa"] .hh-5 .big {
  font-family: inherit; font-weight: 800; letter-spacing: 0; line-height: 1.45; -webkit-text-stroke: 0; color: var(--gold-fill, #f0b429); background: none; font-size: clamp(64px, 10vw, 104px); }

/* ── 6 · FOUR SKILL COLOURS ────────────────────────────────────────── */
.hh-6 .hh-fx { display: flex; flex-wrap: wrap; gap: .24em .2em; font-size: .72em; line-height: 1.05; }
.hh-6 .p { padding: .26em .42em .3em; border-radius: .42em; color: #fff; background: var(--c); box-shadow: 0 .14em 0 var(--d); }
.hh-6 .p.l { --c: #0a8ec2; --d: #06678e; } .hh-6 .p.r { --c: #7c5ce6; --d: #4c2fb8; } .hh-6 .p.w { --c: #db2777; --d: #9d174d; } .hh-6 .p.s { --c: #c96a04; --d: #8a4b00; }
.hh-6 .p.k { --c: #f0b429; --d: #c98f0a; color: #1a1400; }
html[lang="hi"] .hh-6 .hh-fx, html[lang="bn"] .hh-6 .hh-fx, html[lang="ur"] .hh-6 .hh-fx, html[lang="fa"] .hh-6 .hh-fx { line-height: 1.4; }

/* ── 10 · THE TEACHER'S PEN ────────────────────────────────────────── */
.hh-10 .c { position: relative; white-space: nowrap; padding: 0 .16em; display: inline-block; }
.hh-10 .c svg { position: absolute; left: -11%; top: -30%; width: 122%; height: 164%; overflow: visible; pointer-events: none; }
.hh-10 .c path { fill: none; stroke: #e11d48; stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 0; }
h1.hh-10 + .hh-note { display: inline-block; margin: 12px 0 0; font: 700 clamp(22px, 3vw, 29px)/1 Caveat, "Segoe Script", "Bradley Hand", cursive; color: #e11d48; transform: rotate(-3deg); transform-origin: 0 50%; }
html[dir="rtl"] h1.hh-10 + .hh-note { transform: rotate(3deg); transform-origin: 100% 50%; }
html[lang="vi"] h1.hh-10 + .hh-note, html[lang="hi"] h1.hh-10 + .hh-note, html[lang="bn"] h1.hh-10 + .hh-note, html[lang="ur"] h1.hh-10 + .hh-note, html[lang="fa"] h1.hh-10 + .hh-note { font-family: "Segoe Script", "Bradley Hand", cursive; font-size: clamp(18px, 2.4vw, 23px); line-height: 1.4; }
html.dark .hh-10 .c path { stroke: #fb7185; }
html.dark h1.hh-10 + .hh-note { color: #fb7185; }

/* ── MOTION (never on weak phones, never with "reduce motion") ──────── */
@media (prefers-reduced-motion: no-preference) {
  html:not(.lk-lite):not(.lk-rm) .hh-3 .hh-fx .w { opacity: 0; transform: translateY(.7em) rotate(4deg); animation: hh3 .6s cubic-bezier(.2,1.2,.3,1) forwards; animation-delay: calc(var(--i) * 90ms); }
  html:not(.lk-lite):not(.lk-rm) .hh-3 .pl { animation: hh3s 6s linear infinite; }
  html:not(.lk-lite):not(.lk-rm) .hh-4 .car { animation: hh4c .8s steps(1) infinite; }
  html:not(.lk-lite):not(.lk-rm) .hh-5 .sm { animation: hh-up .5s cubic-bezier(.2,.8,.2,1) backwards; }
  html:not(.lk-lite):not(.lk-rm) .hh-5 .sm + .big ~ .sm { animation-delay: .9s; }
  html:not(.lk-lite):not(.lk-rm) .hh-5 .big { animation: hh5 1.3s cubic-bezier(.5,0,.2,1) .25s backwards; }
  html:not(.lk-lite):not(.lk-rm) .hh-6 .p { animation: hh6 .5s cubic-bezier(.3,1.7,.5,1) backwards; animation-delay: calc(var(--i) * 110ms); }
  html:not(.lk-lite):not(.lk-rm) .hh-10 .hh-fx { animation: hh-up .6s cubic-bezier(.2,.8,.2,1) backwards; }
  html:not(.lk-lite):not(.lk-rm) .hh-10 .c path { animation: hh10 1s cubic-bezier(.6,0,.2,1) .5s backwards; }
  html:not(.lk-lite):not(.lk-rm) h1.hh-10 + .hh-note { animation: hh10n .6s ease 1.4s backwards; }
  html.lk-hidden .hh-3 .pl, html.lk-hidden .hh-4 .car { animation-play-state: paused; }
}
@keyframes hh3 { to { opacity: 1; transform: none; } }
@keyframes hh3s { to { transform: rotate(360deg); } }
@keyframes hh4c { 50% { opacity: 0; } }
@keyframes hh5 { from { background-position: 0 0; -webkit-text-stroke-color: var(--ink, #12102e); opacity: .9; } }
@keyframes hh6 { from { transform: scale(0) rotate(-8deg); } }
@keyframes hh-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes hh10 { from { stroke-dashoffset: 100; } }
@keyframes hh10n { from { opacity: 0; } }
/* joined scripts in design 5: the giant word simply fades up (there is no fill to animate) */
@media (prefers-reduced-motion: no-preference) {
  html[lang="hi"]:not(.lk-lite):not(.lk-rm) .hh-5 .big, html[lang="bn"]:not(.lk-lite):not(.lk-rm) .hh-5 .big, html[lang="ur"]:not(.lk-lite):not(.lk-rm) .hh-5 .big, html[lang="fa"]:not(.lk-lite):not(.lk-rm) .hh-5 .big { animation: hh-up .7s cubic-bezier(.2,.8,.2,1) .25s backwards; }
}

/* phones */
@media (max-width: 560px) {
  .hh-5 .big { font-size: clamp(72px, 24vw, 104px); }
  .hh-6 .hh-fx { font-size: .8em; }
}
