/* =====================================================================================
   OneNation — landing page (resources/views/home/index.blade.php + home/sections/*).
   Built only from the tokens in onenation.css; logical properties everywhere (RTL); light + dark.
   ===================================================================================== */

.hm-title { letter-spacing: -.03em; font-weight: 800; }
html[lang="ar"] .hm-title { letter-spacing: 0; }
.hm-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--on-green); box-shadow: 0 0 0 0 rgba(21, 128, 61, .45); animation: hm-pulse 2.2s infinite; vertical-align: middle; }
@keyframes hm-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.hm-avatar-fallback { display: inline-grid; place-items: center; background: var(--on-brand-soft); color: var(--on-brand-strong); }
.hm-avatar-fallback [data-lucide], .hm-avatar-fallback svg { width: 55%; height: 55%; }

/* ---------- 1. hero ------------------------------------------------------------------ */
.hm-hero { padding-bottom: 3rem; }
.hm-hero-visual { position: relative; min-width: 0; }
.hm-orbit-fallback { min-height: 420px; }
@media (max-width: 767.98px) { .hm-orbit-fallback { display: none; } }
.hm-hero-ctas .btn { white-space: nowrap; }
@media (max-width: 575.98px) { .hm-hero-ctas .btn { flex: 1 1 100%; justify-content: center; white-space: normal; } }

.hm-strip { display: flex; align-items: center; gap: 1.5rem; padding: 1rem 1.5rem; flex-wrap: wrap; }
.hm-strip-live { display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--on-brand-strong); white-space: nowrap; }
html[lang="ar"] .hm-strip-live { letter-spacing: 0; }
.hm-strip-items { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; flex: 1; margin: 0; }
.hm-strip-item { display: flex; flex-direction: column-reverse; padding-inline-start: 1rem; border-inline-start: 1px solid var(--on-border); }
.hm-strip-item dd { margin: 0; font-family: var(--on-font-display); font-weight: 800; font-size: 1.45rem; color: var(--on-ink); line-height: 1.1; }
.hm-strip-item dt { font-size: .78rem; font-weight: 600; color: var(--on-muted); display: inline-flex; align-items: center; gap: .35rem; }
.hm-strip-item dt [data-lucide], .hm-strip-item dt svg { color: var(--on-brand); }
@media (max-width: 991.98px) {
    .hm-strip-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .hm-strip { flex-direction: column; align-items: stretch; gap: .85rem; }
    .hm-strip-item { padding-inline-start: .75rem; }
}
@media (max-width: 575.98px) {
    .hm-strip { padding: 1rem; }
    .hm-strip-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 2. smart routing --------------------------------------------------------- */
.hm-router-wrap { padding: 0 0 1rem; }
.hm-router { display: flex; align-items: center; gap: 1rem 1.5rem; padding: .85rem 1rem .85rem 1.25rem; flex-wrap: wrap; position: relative; }
.hm-router-text { flex: 1 1 240px; }
.hm-router-options { display: flex; gap: .5rem; flex-wrap: wrap; }
.hm-router-option {
    display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border-radius: 99px; font-weight: 600; font-size: .88rem;
    border: 1px solid var(--on-border-strong); color: var(--on-text); background: var(--on-surface); transition: all .2s var(--on-ease);
}
.hm-router-option:hover { border-color: var(--on-brand); color: var(--on-ink); }
.hm-router-option.is-active { background: var(--on-brand-soft); border-color: var(--on-brand); color: var(--on-brand-strong); }
.hm-router-option:focus-visible { outline: none; box-shadow: var(--on-ring); }
@media (max-width: 767.98px) {
    .hm-router { padding-inline-end: 3rem; }
    .hm-router-close { position: absolute; top: .6rem; inset-inline-end: .6rem; }
}
.hm-router-wrap[hidden] { display: none !important; }

/* ---------- 3. why ------------------------------------------------------------------- */
.hm-why-card { padding: 1.6rem; display: flex; flex-direction: column; gap: .9rem; }
.hm-why-card h3 { font-size: 1.1rem; margin: .2rem 0 0; }
.hm-why-card p { margin: 0; font-size: .92rem; }
.hm-why-label { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
html[lang="ar"] .hm-why-label { letter-spacing: 0; }
.hm-why-problem .hm-why-label { color: var(--on-faint); }
.hm-why-problem p { color: var(--on-muted); }
.hm-why-solution { margin-top: auto; padding: .85rem 1rem; border-radius: var(--on-radius); background: var(--on-brand-soft); }
.hm-why-solution .hm-why-label { color: var(--on-brand-strong); }
.hm-why-solution p { color: var(--on-ink); font-weight: 500; }

/* ---------- 4. how it works ---------------------------------------------------------- */
.hm-tabs { display: flex; }
.hm-tabs .nav-link { font-size: .92rem; padding: .55rem 1.1rem; }
.hm-tabs .nav-link:focus-visible { outline: none; box-shadow: var(--on-ring); }
/* the chosen role's tab comes first */
.hm-landing[data-role="translator"] .hm-tabs [data-role-tab="translator"],
.hm-landing[data-role="reader"] .hm-tabs [data-role-tab="reader"] { order: -1; }
#how ol { padding: 0; }

.hm-journey { padding: 1.75rem 1.5rem 1.5rem; }
.hm-journey-title { font-size: 1rem; text-align: center; margin: 0 0 1.5rem; color: var(--on-ink); }
.hm-journey-track { display: grid; grid-template-columns: minmax(0, 1fr) minmax(40px, .5fr) minmax(0, 1fr) minmax(40px, .5fr) minmax(0, 1fr); align-items: start; gap: .5rem; }
.hm-journey-node { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .45rem; min-width: 0; }
.hm-journey-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--on-surface); border: 1px solid var(--on-border); box-shadow: var(--on-shadow-md); color: var(--on-brand-strong); }
.hm-journey-node.is-mid .hm-journey-icon { background: var(--on-gradient); color: #fff; border-color: transparent; }
.hm-journey-name { font-weight: 700; font-size: .88rem; color: var(--on-ink); }
.hm-journey-text { font-size: .82rem; color: var(--on-muted); background: var(--on-surface-2); border: 1px solid var(--on-border); border-radius: 10px; padding: .35rem .65rem; max-width: 100%; }
.hm-journey-chips { display: inline-flex; align-items: center; gap: .25rem; color: var(--on-faint); }
.hm-journey-chips .on-lang { height: 19px; min-width: 26px; font-size: .6rem; }
.hm-journey-link { position: relative; height: 2px; background: repeating-linear-gradient(90deg, var(--on-border-strong) 0 6px, transparent 6px 12px); margin-top: 27px; }
.hm-journey-doc {
    position: absolute; top: 50%; inset-inline-start: 0; width: 30px; height: 30px; margin-top: -15px; border-radius: 9px; display: grid; place-items: center;
    background: var(--on-brand-soft); color: var(--on-brand-strong); border: 1px solid var(--on-border);
    animation: hm-travel 4.5s var(--on-ease) infinite;
}
.hm-journey-doc [data-lucide], .hm-journey-doc svg { width: 15px; height: 15px; }
.hm-journey-link.two .hm-journey-doc { animation-delay: 2.25s; background: var(--on-blue-soft); color: var(--on-blue); }
@keyframes hm-travel {
    0% { inset-inline-start: 0; opacity: 0; transform: scale(.8); }
    15% { opacity: 1; transform: scale(1); }
    50% { inset-inline-start: calc(100% - 30px); opacity: 1; }
    65%, 100% { inset-inline-start: calc(100% - 30px); opacity: 0; }
}
@media (max-width: 767.98px) {
    .hm-journey-track { grid-template-columns: 1fr; gap: .25rem; }
    .hm-journey-link { width: 2px; height: 40px; margin: .25rem auto; background: repeating-linear-gradient(180deg, var(--on-border-strong) 0 6px, transparent 6px 12px); }
    .hm-journey-doc { display: none; }
}

/* ---------- 5. live feed + product mock ---------------------------------------------- */
.hm-head-start { max-width: 640px; }
.hm-head-start h2 { letter-spacing: -.03em; }
html[lang="ar"] .hm-head-start h2 { letter-spacing: 0; }
.hm-article { display: flex; flex-direction: column; overflow: hidden; }
.hm-article-cover { display: block; aspect-ratio: 16 / 9; background: var(--on-gradient-soft); overflow: hidden; }
.hm-article-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--on-ease); }
.hm-article:hover .hm-article-cover img { transform: scale(1.04); }
.hm-article-cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--on-brand); }
.hm-article-cover-fallback [data-lucide], .hm-article-cover-fallback svg { width: 40px; height: 40px; opacity: .6; }
.hm-article-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.hm-article-langs { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
.hm-article-langs .on-lang { height: 20px; min-width: 28px; font-size: .62rem; }
.hm-article-langs .on-lang:first-child { background: var(--on-brand-soft); color: var(--on-brand-strong); border-color: transparent; }
.hm-article h3 a { color: var(--on-ink); }
.hm-article h3 a:hover { color: var(--on-brand-strong); }
.hm-article-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--on-border); font-size: .8rem; color: var(--on-muted); }
.hm-article-writer { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; }
.hm-article-counts { display: inline-flex; gap: .7rem; flex-shrink: 0; }
.hm-article-counts > span { display: inline-flex; align-items: center; gap: .25rem; }
.hm-article-counts [data-lucide], .hm-article-counts svg { width: 14px; height: 14px; }
.hm-article-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .85rem; font-weight: 600; font-size: .85rem; color: var(--on-brand-strong); }

.hm-mock { border-radius: var(--on-radius-lg); border: 1px solid var(--on-border); background: var(--on-surface); box-shadow: var(--on-shadow-lg); overflow: hidden; }
.hm-mock-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; background: var(--on-surface-2); border-bottom: 1px solid var(--on-border); }
.hm-mock-bar > span:not(.hm-mock-url) { width: 10px; height: 10px; border-radius: 50%; background: var(--on-border-strong); }
.hm-mock-url { margin-inline-start: .75rem; flex: 1; max-width: 260px; font-size: .72rem; color: var(--on-faint); background: var(--on-surface); border: 1px solid var(--on-border); border-radius: 8px; padding: .2rem .6rem; direction: ltr; text-align: start; }
.hm-mock-page { padding: 1.4rem 1.5rem 1.5rem; position: relative; }
.hm-mock-switch { display: inline-flex; gap: .3rem; padding: .25rem; border-radius: 10px; background: var(--on-surface-2); border: 1px solid var(--on-border); margin-bottom: 1rem; }
.hm-mock-switch .on-lang { background: transparent; border-color: transparent; }
.hm-mock-switch .on-lang.is-active { background: var(--on-brand-strong); color: #fff; box-shadow: var(--on-shadow-sm); }
.hm-mock-cover { height: 110px; border-radius: var(--on-radius); background: var(--on-gradient); opacity: .85; margin-bottom: 1rem; }
.hm-mock-title { font-family: var(--on-font-display); font-weight: 800; font-size: 1.2rem; color: var(--on-ink); margin-bottom: .6rem; line-height: 1.3; }
html[lang="ar"] .hm-mock-title { font-family: var(--on-font-arabic); }
.hm-mock-meta { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--on-muted); margin-bottom: .5rem; }
.hm-mock-meta strong { color: var(--on-ink); }
.hm-mock-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--on-gradient); flex-shrink: 0; }
.hm-mock-avatar.b { background: linear-gradient(135deg, var(--on-violet), var(--on-blue)); }
.hm-mock-credit { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; color: var(--on-blue); background: var(--on-blue-soft); border-radius: 99px; padding: .2rem .6rem; margin-bottom: .85rem; }
.hm-mock-text { font-size: .9rem; color: var(--on-text); margin-bottom: .8rem; }
.hm-mock-comment { display: flex; gap: .6rem; padding: .75rem .85rem; border-radius: var(--on-radius); background: var(--on-surface-2); font-size: .8rem; color: var(--on-text); }
.hm-mock-comment strong { color: var(--on-ink); font-size: .78rem; }

/* ---------- 6. comparison ------------------------------------------------------------ */
.hm-compare { overflow-x: auto; padding: .5rem; }
.hm-compare table { min-width: 560px; --bs-table-bg: transparent; }
.hm-compare th, .hm-compare td { padding: 1rem 1.1rem; vertical-align: middle; border-color: var(--on-border); }
.hm-compare thead th { font-size: .8rem; font-weight: 700; color: var(--on-muted); text-transform: uppercase; letter-spacing: .06em; border-bottom-width: 1px; }
html[lang="ar"] .hm-compare thead th { letter-spacing: 0; }
.hm-compare tbody tr:last-child > * { border-bottom: 0; }
.hm-compare-aspect { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--on-ink); }
.hm-compare-aspect [data-lucide], .hm-compare-aspect svg { color: var(--on-brand); }
.hm-compare td.hm-compare-old { color: var(--on-muted); }
.hm-compare td.hm-compare-new { color: var(--on-ink); font-weight: 600; }
.hm-compare .hm-compare-new { background: var(--on-brand-soft); }
.hm-compare thead .hm-compare-new { border-start-start-radius: var(--on-radius); border-start-end-radius: var(--on-radius); }
.hm-compare tbody tr:last-child .hm-compare-new { border-end-start-radius: var(--on-radius); border-end-end-radius: var(--on-radius); }
.hm-compare-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-inline-end: .55rem; vertical-align: -5px; }
.hm-compare-mark [data-lucide], .hm-compare-mark svg { width: 13px; height: 13px; }
.hm-compare-mark.no { background: var(--on-red-soft); color: var(--on-red); }
.hm-compare-mark.yes { background: var(--on-brand-strong); color: #fff; }

@media (max-width: 767.98px) {
    .hm-compare { overflow: visible; padding: .25rem; }
    .hm-compare table { min-width: 0; }
    .hm-compare thead { display: none; }
    .hm-compare tr, .hm-compare th, .hm-compare td { display: block; width: 100%; }
    .hm-compare tbody tr { padding: .9rem .75rem; border-bottom: 1px solid var(--on-border); }
    .hm-compare tbody tr:last-child { border-bottom: 0; }
    .hm-compare th, .hm-compare td { padding: .3rem 0; border: 0; }
    .hm-compare td::before { content: attr(data-label); display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--on-faint); margin-bottom: .15rem; }
    html[lang="ar"] .hm-compare td::before { letter-spacing: 0; }
    .hm-compare td.hm-compare-new { padding: .5rem .7rem; border-radius: var(--on-radius-sm); margin-top: .35rem; }
    .hm-compare tbody tr:last-child .hm-compare-new { border-radius: var(--on-radius-sm); }
}

/* ---------- 7. roles ----------------------------------------------------------------- */
.hm-mini-role { display: flex; gap: 1rem; align-items: flex-start; padding: 1.4rem 1.5rem; height: 100%; color: inherit; }
.hm-mini-role-title { display: block; font-weight: 700; color: var(--on-ink); font-size: 1.05rem; margin-bottom: .25rem; }
.hm-mini-role-text { display: block; color: var(--on-muted); font-size: .9rem; margin-bottom: .6rem; }
.hm-mini-role-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--on-brand-strong); font-weight: 600; font-size: .88rem; }
.hm-mini-role:focus-visible { outline: none; box-shadow: var(--on-ring); }

/* ---------- 8. featured translators -------------------------------------------------- */
.hm-translator { padding: 1.4rem; display: flex; flex-direction: column; }
.hm-translator .min-w-0 { min-width: 0; }
.hm-pairs { display: grid; gap: .35rem; }
.hm-pairs li { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 600; color: var(--on-ink); }
.hm-pairs li [data-lucide], .hm-pairs li svg { color: var(--on-brand); }
.hm-translator-counts { display: flex; gap: 1.25rem; margin-top: auto; padding-top: .85rem; border-top: 1px solid var(--on-border); font-size: .82rem; color: var(--on-muted); }
.hm-translator-counts strong { color: var(--on-ink); font-family: var(--on-font-display); font-size: 1.05rem; }

/* ---------- 9. stories --------------------------------------------------------------- */
.hm-story { padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.hm-story-quote { margin: 0; position: relative; }
.hm-story-quote > [data-lucide], .hm-story-quote > svg { width: 28px; height: 28px; color: var(--on-brand); opacity: .55; margin-bottom: .4rem; }
html[dir="rtl"] .hm-story-quote > svg { transform: scaleX(-1); }
.hm-story-quote p { margin: 0; color: var(--on-ink); font-size: 1rem; line-height: 1.6; }
.hm-story-who { display: flex; align-items: center; gap: .75rem; margin-top: auto; }
.hm-story-who .on-icon-tile { width: 42px; height: 42px; border-radius: 50%; font-weight: 800; }

/* ---------- 10. numbers -------------------------------------------------------------- */
.hm-numbers { padding: clamp(1.75rem, 1rem + 3vw, 3rem); }
.hm-numbers dd { font-variant-numeric: tabular-nums; }

/* ---------- 13. video ---------------------------------------------------------------- */
.hm-video { position: relative; max-width: 960px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: var(--on-radius-xl); overflow: hidden; background: var(--on-gradient); box-shadow: var(--on-shadow-lg); }
.hm-video-el { width: 100%; height: 100%; display: block; object-fit: cover; background: transparent; }
.hm-video-play { position: absolute; inset: 0; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; color: #fff; background: rgba(7, 24, 32, .28); transition: background .3s var(--on-ease); cursor: pointer; }
.hm-video-play:hover { background: rgba(7, 24, 32, .4); }
.hm-video-play:focus-visible { outline: none; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .7); }
.hm-video-play-icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .95); color: var(--on-brand-strong); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .45); transition: transform .3s var(--on-ease); }
.hm-video-play:hover .hm-video-play-icon { transform: scale(1.06); }
.hm-video-play-icon [data-lucide], .hm-video-play-icon svg { width: 34px; height: 34px; margin-inline-start: 4px; fill: currentColor; }
.hm-video-play-text { font-weight: 700; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.hm-video.is-playing .hm-video-play { display: none; }
.hm-video:not(.is-playing) .hm-video-el:not([poster]) { opacity: 0; }

/* ---------- 14. app ------------------------------------------------------------------ */
.hm-app { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem 1.75rem; flex-wrap: wrap; background: var(--on-gradient-soft); }
.hm-store { display: inline-flex; align-items: center; gap: .6rem; padding: .55rem 1.1rem; border-radius: 12px; background: var(--on-ink); color: var(--on-surface); font-weight: 700; line-height: 1.1; }
.hm-store:hover { color: var(--on-surface); opacity: .92; }
.hm-store small { display: block; font-size: .65rem; font-weight: 500; opacity: .8; }

/* ---------- 15. CTA ------------------------------------------------------------------ */
.hm-cta-ghost { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.hm-cta-ghost:hover { background: rgba(255, 255, 255, .26); color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .hm-dot, .hm-journey-doc { animation: none; }
    .hm-journey-doc { inset-inline-start: calc(50% - 15px); }
    .hm-article-cover img, .hm-video-play-icon { transition: none; }
}

/* never let decorative overflow widen the page on phones */
.hm-landing { overflow-x: clip; }
