/* ════════════════════════════════════════════════════════════════
   LANDING HERO (page1): side by side.
   Left: headline, one line, search, popular topics.
   Right: a product tour that plays the real app for a random topic
   (pace → YouTube videos → one video split into parts → the lesson page →
   Read instead → the question → the certificate). The tour lives in a
   shadow root built by hero.js from <template id="ltwDemoTpl">, so its own
   styles never touch the rest of the site and the site's never touch it.
════════════════════════════════════════════════════════════════ */

.ltw-hero::before {   /* one soft light behind the tour */
    content: ''; position: absolute; right: -8%; top: 8%; width: 62%; height: 84%;
    background: radial-gradient(closest-side, rgba(232,121,249,.30), transparent);
    pointer-events: none;
}
.ltw-hero-inner {
    position: relative; width: 100%;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center;
    max-width: 1320px; margin: 0 auto; padding: 92px 44px 48px;
}

/* ── Left ───────────────────────────────────────────────────── */
.ltw-hero .ltw-hero-title {
    font-family: 'Sora', 'Inter', sans-serif; font-weight: 700;
    font-size: clamp(42px, 4.6vw, 66px); line-height: 1.02; letter-spacing: -0.05em;
    margin: 0; color: #fff; text-shadow: none; text-align: left;
}
.ltw-hero .ltw-hero-sub {
    font-family: 'DM Sans', 'Inter', sans-serif; font-size: 18px; line-height: 1.55;
    color: rgba(255,255,255,.82); margin: 20px 0 30px; max-width: 29em; text-align: left;
    text-wrap: balance;   /* even lines, so the break never strands a word */
}
.ltw-hero .ltw-search { max-width: none; justify-content: flex-start; }
.ltw-search-field { position: relative; flex: 1 1 0; min-width: 0; display: flex; }
.ltw-hero .ltw-search-input { flex: 1 1 0; min-width: 0; height: 56px; padding: 0 24px; }
.ltw-hero .ltw-search-btn { height: 56px; padding: 0 30px; }
.ltw-search.ltw-hinting .ltw-search-input::placeholder { color: transparent; }
.ltw-hint {
    position: absolute; left: 25px; top: 50%; transform: translateY(-50%); z-index: 3;
    font-size: 16px; color: rgba(255,255,255,.72); pointer-events: none; white-space: nowrap;
}
.ltw-hint b { font-weight: 600; color: #fff; }
.ltw-hint-caret { display: inline-block; width: 1.5px; height: 18px; margin-left: 1px; vertical-align: -3px; background: #fff; animation: ltwd-blink 1s steps(1) infinite; }
@keyframes ltwd-blink { 50% { opacity: 0; } }
.ltw-search:not(.ltw-hinting) .ltw-hint { display: none; }

.ltw-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.ltw-popular-label { font-size: 13px; color: rgba(255,255,255,.65); margin-right: 4px; }
.ltw-topic {
    padding: 7px 14px; border-radius: 999px; cursor: pointer;
    font-family: inherit; font-size: 14px; font-weight: 500; color: #fff;
    background: transparent; border: 1px solid rgba(255,255,255,.32);
    transition: background .2s, border-color .2s, transform .2s cubic-bezier(.34,1.56,.64,1);
}
.ltw-topic:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.55); }
.ltw-topic:active { transform: scale(.95); }
.ltw-topic:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ltw-topic.going { background: #fff; color: #4c1d95; border-color: #fff; }
.ltw-hero .ltw-age-notice { text-align: left; margin-top: 22px; font-size: 12px; color: rgba(255,255,255,.6); }

/* ── Right: the tour's box (its insides are in the shadow root) ── */
.ltw-demo { display: block; width: 100%; max-width: 640px; justify-self: end; margin: 0; color: #fff; font-family: 'Inter', sans-serif; }
.ltw-demo:not(.ready) { aspect-ratio: 640 / 484; }   /* hold the space until hero.js fills it */

/* ── Phones and tablets ─────────────────────────────────────── */
@media (max-width: 980px) {
    .ltw-hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 100px 20px 64px; align-content: start; }
    .ltw-hero .ltw-hero-sub { font-size: 16px; margin: 14px 0 24px; }
    .ltw-demo { justify-self: center; }
}
@media (max-width: 768px) {
    /* styles.css stacks the box over the button on phones; keep them side by side */
    .ltw-hero .ltw-search { flex-direction: row; gap: 10px; }
    .ltw-hero .ltw-search-input { flex: 1 1 0; width: auto; height: 52px; min-height: 0; padding: 0 18px; }
    .ltw-hero .ltw-search-btn { flex: 0 0 auto; width: auto; height: 52px; min-height: 0; padding: 0 20px; }
    .ltw-hint { left: 19px; }
    .ltw-demo:not(.ready) { aspect-ratio: 440 / 504; }
}
