/*
 * Language hub (/{base}/{track}) styles. Loaded only by web/home.blade.php, after lx.css.
 * Kept separate from lx.css so changes to the landing page cannot break the hub. Tokens only, see docs/BRAND_COLORS.md.
 */

/* Hero with search */
.lx-hub-hero { min-height: 0; padding-block: clamp(3rem, 6vw, 5rem); }
.lx-flag { display: inline-block; width: 1.1rem; height: .75rem; border-radius: 2px; vertical-align: -1px; margin-right: .35rem; background: linear-gradient(var(--ll-night-900) 0 33%, var(--ll-coral-700) 33% 66%, var(--ll-amber) 66%); }
.lx-search { position: relative; z-index: 20; max-width: 36rem; }
.lx-search-box { display: flex; align-items: center; gap: .5rem; background: var(--color-surface); border: 2px solid var(--color-border-strong); border-radius: var(--radius-pill); padding: .35rem .35rem .35rem 1.15rem; box-shadow: var(--shadow-md); transition: border-color .2s ease, box-shadow .2s ease; }
.lx-search-box:focus-within { border-color: var(--ll-sky); box-shadow: 0 0 0 4px var(--color-focus-ring), var(--shadow-md); }
.lx-search-box > i { color: var(--color-text-secondary); }
.lx-search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1.1rem; padding: .6rem 0; color: var(--color-text-primary); }
.lx-search-box input::placeholder { color: var(--color-text-muted); }
.lx-search-box button { border: 0; border-radius: var(--radius-pill); padding: .75rem 1.4rem; font-weight: var(--fw-bold); background: var(--ll-deep-blue); color: var(--ll-white); }
.lx-search-box button:hover { background: var(--ll-sky-700); }
[data-bs-theme="dark"] .lx-search-box button { background: var(--ll-sky-700) !important; border: 0 !important; color: var(--ll-white) !important; }
.lx-suggest { display: none; position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-height: 320px; overflow: auto; padding: .35rem; }
.lx-suggest.show { display: block; }
.lx-suggest-item { display: flex; gap: .5rem; align-items: baseline; padding: .65rem .85rem; border-radius: var(--radius-md); cursor: pointer; }
.lx-suggest-item:hover, .lx-suggest-item.is-active { background: var(--color-surface-muted); }
.lx-suggest-item strong { color: var(--color-heading); }
.lx-suggest-item span { color: var(--color-text-secondary); font-size: var(--fs-sm); }
.lx-try { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: 1rem; font-size: var(--fs-sm); color: var(--color-text-secondary); font-weight: var(--fw-semibold); }
.lx-try a { text-decoration: none; border-radius: var(--radius-pill); padding: .3rem .8rem; background: var(--color-primary-soft); font-weight: var(--fw-bold); }
.lx-try a span { color: var(--color-heading); }
.lx-try a:hover { background: color-mix(in srgb, var(--ll-sky) 18%, transparent); }
.lx-hub-bot { max-width: 21rem; margin-inline: auto; width: 100%; }
.lx-hub-bot .lx-say { margin: 0 auto 1rem; max-width: 18rem; min-height: 4.9rem; text-align: center; }
.lx-hub-bot .llm { width: 82%; margin-inline: auto; animation: lxFloat 6s ease-in-out infinite; }

/* Sections */
.lx-sec { padding-block: clamp(3.5rem, 6vw, 5rem); }
.lx-sec-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: var(--space-6); }
.lx-sec-head h2 { margin-bottom: .35rem; }
.lx-sec-head .lx-text { margin: 0; }

/* Level path */
.lx-levelpath { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.lx-lvl { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1.15rem; border-radius: var(--radius-xl); background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.lx-lvl:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--ll-sky); }
.lx-lvl-code { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: var(--fw-heavy); color: var(--ll-white); }
.lx-lvl strong { color: var(--color-heading); }
.lx-lvl p { color: var(--color-text-secondary); font-size: var(--fs-sm); margin: 0; line-height: 1.45; }
.lx-lvl-go { margin-top: auto; padding-top: .35rem; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-link); }
.lx-lvl.is-goal { border-color: var(--ll-amber); }
.lx-lvl-tag { position: absolute; top: .8rem; right: .8rem; font-size: .65rem; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--ll-deep-blue); background: var(--ll-amber); border-radius: var(--radius-pill); padding: .15rem .5rem; }

/* Tools */
.lx-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.lx-tool { display: flex; flex-direction: column; padding: 1.4rem; border-radius: var(--radius-xl); background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.lx-alt .lx-tool, .lx-alt .lx-lvl, .lx-alt .lx-convo { background: var(--color-background); }
.lx-tool:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--ll-sky); }
.lx-tool .lx-skill-icon { margin-bottom: 1rem; }
.lx-tool h3 { font-size: var(--fs-h5); font-weight: var(--fw-heavy); color: var(--color-heading); margin-bottom: .35rem; }
.lx-tool p { color: var(--color-text-secondary); margin: 0 0 1rem; }
.lx-tool-meta { margin-top: auto; display: flex; justify-content: space-between; gap: .5rem; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--color-link); }
.lx-tool-meta small { color: var(--color-text-secondary); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }

/* Topics */
.lx-topics.lx-topics--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.lx-topics--wide .lx-topic { flex-direction: row; align-items: center; gap: .85rem; padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.lx-topics--wide .lx-topic-icon { width: 42px; height: 42px; flex: 0 0 auto; }
.lx-topics--wide .lx-topic strong { font-size: 1rem; display: block; }

/* Conversation previews */
.lx-convos { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem; }
.lx-convo { display: flex; flex-direction: column; border-radius: var(--radius-xl); background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.lx-convo:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lx-convo-head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--color-border); }
.lx-convo-head strong { display: block; color: var(--color-heading); }
.lx-convo-head small { color: var(--color-text-secondary); font-weight: var(--fw-semibold); }
.lx-convo-head .lx-chip { margin-left: auto; }
.lx-convo-body { display: grid; gap: .55rem; padding: 1rem 1.15rem; flex: 1; align-content: start; }
.lx-convo-body .lx-msg { max-width: 88%; padding: .55rem .8rem; font-size: var(--fs-sm); box-shadow: none; }
.lx-convo-body .lx-msg--a { background: var(--color-surface-muted); border-color: transparent; }
.lx-convo-foot { padding: .85rem 1.15rem; border-top: 1px solid var(--color-border); font-weight: var(--fw-bold); }

/* B1 teaser */
.lx-strip { display: grid; grid-template-columns: 9rem 1fr auto; gap: 1.5rem 2rem; align-items: center; padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius-2xl); background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-md); }
.lx .lx-strip h2 { font-size: var(--fs-h3); margin-bottom: .35rem; }
.lx-strip p { color: var(--color-text-secondary); margin: 0; }

/* Compact app band */
.lx-app-band { display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem 2rem; align-items: center; padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius-2xl); color: var(--ll-white); background: radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--ll-sky) 35%, transparent), transparent 45%), var(--gradient-primary); }
.lx .lx-app-band h2 { color: inherit; font-size: var(--fs-h3); margin-bottom: .25rem; }
.lx-app-band p { color: var(--color-text-secondary); margin: 0; }
.lx-app-band-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--ll-amber); color: var(--ll-deep-blue); font-size: 1.4rem; }
.lx-app-band .lx-store { background: var(--ll-white); }
.lx-app-band .lx-store span { color: var(--ll-night-900); }
.lx-app-band .lx-store:hover { background: var(--ll-ink-100); }

/* Closing */
.lx-hub-close { text-align: center; padding-block: clamp(3.5rem, 6vw, 5rem); }
.lx-hub-close .lx-hub-bot { max-width: 14rem; margin-bottom: 1rem; }
.lx-hub-close .lx-text { margin-inline: auto; }

@media (max-width: 1199.98px) {
    .lx-levelpath { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .lx-search, .lx-try { margin-inline: auto; justify-content: center; }
    .lx-sec-head { justify-content: center; text-align: center; }
    .lx-topics.lx-topics--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lx-strip { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .lx-strip .llm { max-width: 7rem; }
    .lx-app-band { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 575.98px) {
    .lx-levelpath { grid-template-columns: 1fr 1fr; }
    .lx-topics.lx-topics--wide { grid-template-columns: 1fr; }
    .lx-search-box button span { display: none; }
    .lx-search-box button { padding: .75rem 1rem; }
}
