/**
 * Questly landing — below-hero sections.
 * Editorial layout: hairline rules, large type, product UI previews. Minimal cards.
 */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

.qm-root-sections {
    --qi: #0f213e;
    --qink2: #475569;
    --qmute: #8793a6;
    --qo: #f97316;
    --qo-d: #ea580c;
    --qline: #e7e2d9;
    --qbg: #faf8f5;
    font-family: 'Noto Sans Thai', system-ui, sans-serif;
    color: var(--qi);
}

.qm-container { width: 100%; max-width: 72rem; margin: 0 auto; position: relative; }
.qm-pad { padding-left: 1.25rem; padding-right: 1.25rem; }
@media (min-width: 640px) { .qm-pad { padding-left: 2rem; padding-right: 2rem; } }

.qm-section { position: relative; padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 900px) { .qm-section { padding-top: 7.5rem; padding-bottom: 7.5rem; } }

/* ---------- Type ---------- */
.qm-eyebrow {
    display: inline-flex; align-items: center; gap: 0.75rem;
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--qo-d);
}
.qm-eyebrow::before { content: ""; width: 2rem; height: 2px; background: var(--qo); }

.qm-h2 {
    margin: 1rem 0 0; font-weight: 700; color: var(--qi);
    font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.22; letter-spacing: -0.02em;
}
.qm-h2 em { font-style: normal; color: var(--qo-d); }
.qm-lead { margin: 1.1rem 0 0; font-size: 1.04rem; line-height: 1.75; color: var(--qink2); max-width: 36rem; }

.qm-rule { height: 1px; background: var(--qline); transform-origin: left center; }

/* ---------- Buttons / links ---------- */
.qm-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
    padding: 0.8rem 1.6rem; border-radius: 999px; font-size: 0.95rem; font-weight: 700; text-decoration: none;
    overflow: hidden; isolation: isolate; cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, background 0.3s ease;
}
.qm-btn::before {
    content: ""; position: absolute; inset: -40% -60%; z-index: 1; pointer-events: none;
    background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.08) 42%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.08) 58%, transparent 100%);
    transform: translateX(-150%) skewX(-18deg); transition: transform 0.75s ease;
}
.qm-btn:hover { transform: translateY(-2px); }
.qm-btn:hover::before { transform: translateX(190%) skewX(-18deg); }
.qm-btn--primary { background: linear-gradient(135deg, #fb923c, #f97316 55%, #ea580c); color: #fff; box-shadow: 0 12px 26px rgba(234,88,12,0.3); }
.qm-btn--primary:hover { box-shadow: 0 16px 32px rgba(234,88,12,0.42); }
.qm-btn--navy { background: var(--qi); color: #fff; box-shadow: 0 10px 24px rgba(15,33,62,0.2); }
.qm-btn--navy:hover { background: #173058; }
.qm-btn__arrow { width: 1rem; height: 1rem; transition: transform 0.25s ease; }
.qm-btn:hover .qm-btn__arrow { transform: translateX(3px); }

.qm-textlink {
    display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; font-weight: 700; color: var(--qi);
    text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: color 0.2s ease;
}
.qm-textlink:hover { color: var(--qo-d); }

/* ==========================================================================
   Stats — plain numerals separated by hairlines
   ========================================================================== */
.qm-stats { background: #fff; padding: 3.5rem 0 3rem; border-bottom: 1px solid var(--qline); }
.qm-stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .qm-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.qm-stat { padding: 1.25rem 1.25rem 1.25rem 0; position: relative; }
@media (min-width: 900px) { .qm-stat + .qm-stat { padding-left: 2rem; border-left: 1px solid var(--qline); } }
@media (max-width: 899px) { .qm-stat:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid var(--qline); } .qm-stat:nth-child(n+3) { border-top: 1px solid var(--qline); } }
.qm-stat__value {
    margin: 0; font-size: clamp(2.4rem, 5vw, 3.9rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em;
    color: var(--qi); font-variant-numeric: tabular-nums;
}
.qm-stat__value small { font-size: 0.5em; font-weight: 700; color: var(--qo-d); margin-left: 0.1em; }
.qm-stat__label { margin: 0.7rem 0 0; font-size: 0.9rem; color: var(--qmute); font-weight: 500; }

/* Marquee */
.qm-marquee { background: var(--qi); overflow: hidden; padding: 1.05rem 0; }
.qm-marquee__track { display: flex; width: max-content; animation: qmMarquee 38s linear infinite; }
.qm-marquee:hover .qm-marquee__track { animation-play-state: paused; }
.qm-marquee__item {
    display: inline-flex; align-items: center; gap: 2.25rem; padding-right: 2.25rem;
    font-size: 0.95rem; font-weight: 600; color: rgba(255,255,255,0.78); white-space: nowrap;
}
.qm-marquee__item::after { content: ""; width: 0.45rem; height: 0.45rem; background: var(--qo); transform: rotate(45deg); flex-shrink: 0; }
@keyframes qmMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==========================================================================
   Features — alternating editorial rows with product previews
   ========================================================================== */
.qm-features { background: var(--qbg); }
.qm-features__head { max-width: 44rem; }
.qm-rows { margin-top: 4rem; }
.qm-row { padding: 3.5rem 0; position: relative; }
.qm-row:first-child { padding-top: 0; }
.qm-row__grid { display: grid; gap: 2.5rem; align-items: center; margin-top: 3.5rem; }
.qm-row:first-child .qm-row__grid { margin-top: 0; }
@media (min-width: 900px) {
    .qm-row__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 5rem; }
    .qm-row--flip .qm-row__copy { order: 2; }
}
.qm-row__no {
    display: block; font-size: clamp(3.5rem, 8vw, 6rem); font-weight: 700; line-height: 1; letter-spacing: -0.04em;
    color: transparent; -webkit-text-stroke: 1.5px var(--qline);
}
.qm-row__title { margin: 0.5rem 0 0; font-size: clamp(1.5rem, 2.6vw, 2.15rem); font-weight: 700; line-height: 1.3; color: var(--qi); letter-spacing: -0.01em; }
.qm-row__desc { margin: 0.9rem 0 0; font-size: 1rem; line-height: 1.8; color: var(--qink2); max-width: 30rem; }
.qm-ticks { list-style: none; padding: 0; margin: 1.6rem 0 0; max-width: 30rem; }
.qm-ticks li {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; font-size: 0.94rem; font-weight: 500; color: var(--qi);
    border-top: 1px solid var(--qline);
}
.qm-ticks li:last-child { border-bottom: 1px solid var(--qline); }
.qm-ticks svg { width: 1rem; height: 1rem; color: var(--qo-d); flex-shrink: 0; }

/* Product preview frame */
.qm-mock {
    background: #fff; border: 1px solid var(--qline); border-radius: 1rem; overflow: hidden;
    box-shadow: 0 40px 70px -40px rgba(15,33,62,0.35), 0 1px 0 rgba(255,255,255,0.8) inset;
}
.qm-mock__bar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.95rem 1.25rem; border-bottom: 1px solid var(--qline); background: #fcfbf9;
}
.qm-mock__title { font-size: 0.86rem; font-weight: 700; color: var(--qi); }
.qm-mock__meta { font-size: 0.76rem; font-weight: 600; color: var(--qmute); }
.qm-mock__body { padding: 1.25rem; }
.qm-mock__foot {
    display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; padding: 0.9rem 1.25rem; border-top: 1px solid var(--qline); background: #fcfbf9;
    font-size: 0.78rem; font-weight: 600; color: var(--qink2);
}
.qm-mock__foot b { color: var(--qi); font-variant-numeric: tabular-nums; }

/* Attendance preview */
.qm-att { display: grid; row-gap: 0; }
.qm-att__row { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; align-items: center; gap: 0.85rem; padding: 0.6rem 0; border-top: 1px solid #f0ece4; }
.qm-att__row:first-child { border-top: 0; }
.qm-att__no { font-size: 0.74rem; font-weight: 700; color: var(--qmute); font-variant-numeric: tabular-nums; }
.qm-att__name { height: 0.55rem; border-radius: 999px; background: #ece8df; }
.qm-att__chips { display: inline-flex; gap: 0.3rem; }
.qm-chip {
    min-width: 2.15rem; text-align: center; font-size: 0.7rem; font-weight: 700; padding: 0.25rem 0.5rem; border-radius: 999px;
    border: 1px solid var(--qline); color: #b4bcc9; background: #fff; transition: all 0.35s cubic-bezier(0.22,1,0.36,1);
}
.qm-chip.on--present { background: #dcfce7; border-color: #86efac; color: #166534; }
.qm-chip.on--late { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.qm-chip.on--leave { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.qm-chip.on--absent { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }

/* Scores preview */
.qm-chart { display: flex; align-items: flex-end; gap: 0.85rem; height: 12rem; padding: 0 0.25rem; border-bottom: 1px solid var(--qline); position: relative; }
.qm-chart::before { content: ""; position: absolute; left: 0; right: 0; top: 30%; border-top: 1px dashed #d9d3c7; }
.qm-bar { flex: 1; height: var(--h); border-radius: 0.4rem 0.4rem 0 0; background: linear-gradient(180deg, #fb923c, #fdba74); transform-origin: bottom; position: relative; }
.qm-bar--navy { background: linear-gradient(180deg, #1e3a6d, #3b5a94); }
.qm-chart__labels { display: flex; gap: 0.85rem; padding: 0.6rem 0.25rem 0; }
.qm-chart__labels span { flex: 1; text-align: center; font-size: 0.7rem; font-weight: 600; color: var(--qmute); }

/* Report preview */
.qm-report { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 560px) { .qm-report { grid-template-columns: 9.5rem minmax(0, 1fr); } }
.qm-donut { position: relative; width: 9.5rem; height: 9.5rem; margin: 0 auto; }
.qm-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.qm-donut__bg { stroke: #f0ece4; }
.qm-donut__fg { stroke: var(--qo); stroke-linecap: round; }
.qm-donut__txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.qm-donut__txt b { font-size: 1.9rem; font-weight: 700; color: var(--qi); line-height: 1; font-variant-numeric: tabular-nums; }
.qm-donut__txt span { margin-top: 0.3rem; font-size: 0.7rem; font-weight: 600; color: var(--qmute); }
.qm-metric + .qm-metric { margin-top: 1rem; }
.qm-metric__top { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 600; color: var(--qink2); margin-bottom: 0.4rem; }
.qm-metric__top b { color: var(--qi); font-variant-numeric: tabular-nums; }
.qm-metric__track { height: 5px; border-radius: 999px; background: #f0ece4; overflow: hidden; }
.qm-metric__fill { height: 100%; width: var(--w); border-radius: 999px; background: var(--qi); transform-origin: left; }
.qm-metric:nth-child(2) .qm-metric__fill { background: var(--qo); }
.qm-metric:nth-child(3) .qm-metric__fill { background: #3b82f6; }

/* ==========================================================================
   Guide — sticky intro + hairline step list
   ========================================================================== */
.qm-guide { background: #fff; border-top: 1px solid var(--qline); }
.qm-guide__grid { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .qm-guide__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 6rem; } .qm-guide__intro { position: sticky; top: 7rem; align-self: start; } }
.qm-guide__cta { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }

.qm-tl { position: relative; padding-left: 2.25rem; }
.qm-tl__track { position: absolute; left: 0; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--qline); }
.qm-tl__fill { width: 100%; height: 0%; background: var(--qo); }
.qm-step { position: relative; padding: 1.6rem 0; border-top: 1px solid var(--qline); opacity: 0.45; transition: opacity 0.45s ease; }
.qm-step:first-of-type { border-top: 0; padding-top: 0.4rem; }
.qm-step.is-active { opacity: 1; }
.qm-step::before {
    content: ""; position: absolute; left: -2.25rem; top: 2.05rem; width: 0.7rem; height: 0.7rem; margin-left: -0.3rem;
    border-radius: 999px; background: #fff; border: 2px solid #cfc8ba; transition: all 0.35s ease;
}
.qm-step:first-of-type::before { top: 0.85rem; }
.qm-step.is-active::before { background: var(--qo); border-color: var(--qo); box-shadow: 0 0 0 5px rgba(249,115,22,0.16); }
.qm-step__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.qm-step__no { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; color: var(--qo-d); font-variant-numeric: tabular-nums; }
.qm-step__role { font-size: 0.76rem; font-weight: 600; color: var(--qmute); }
.qm-step__title { margin: 0.35rem 0 0; font-size: 1.28rem; font-weight: 700; color: var(--qi); line-height: 1.35; }
.qm-step__desc { margin: 0.5rem 0 0; font-size: 0.95rem; line-height: 1.75; color: var(--qink2); max-width: 34rem; }

.qm-deck { margin-top: 5rem; }
.qm-deck__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.qm-deck__title { margin: 0; font-size: 1rem; font-weight: 700; color: var(--qi); }
.qm-deck__sub { margin: 0.2rem 0 0; font-size: 0.85rem; color: var(--qmute); }
.qm-deck__frame { position: relative; width: 100%; padding-top: 56.25%; border: 1px solid var(--qline); border-radius: 0.9rem; overflow: hidden; background: var(--qbg); }
.qm-deck__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   News — editorial list
   ========================================================================== */
.qm-news { background: var(--qbg); }
.qm-news__head { display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 900px) { .qm-news__head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.qm-news__list { margin-top: 3rem; border-top: 1px solid var(--qi); }
.qm-news__item {
    position: relative; display: grid; gap: 0.5rem 2rem; padding: 1.6rem 0; border-bottom: 1px solid var(--qline);
    transition: padding-left 0.35s cubic-bezier(0.22,1,0.36,1);
}
@media (min-width: 800px) { .qm-news__item { grid-template-columns: 9rem 7rem minmax(0, 1fr); align-items: baseline; } }
.qm-news__item::before {
    content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--qo); transition: width 0.45s cubic-bezier(0.22,1,0.36,1);
}
.qm-news__item:hover { padding-left: 0.75rem; }
.qm-news__item:hover::before { width: 100%; }
.qm-news__date { font-size: 0.84rem; font-weight: 600; color: var(--qmute); font-variant-numeric: tabular-nums; }
.qm-news__badge { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em; }
.qm-news__title { margin: 0; font-size: 1.14rem; font-weight: 700; line-height: 1.45; color: var(--qi); }
.qm-news__excerpt { margin: 0.35rem 0 0; font-size: 0.93rem; line-height: 1.7; color: var(--qink2); }

/* ==========================================================================
   Roles — three open columns
   ========================================================================== */
.qm-roles { background: #fff; border-top: 1px solid var(--qline); }
.qm-roles__grid { display: grid; margin-top: 3.5rem; border-top: 1px solid var(--qi); }
@media (min-width: 900px) { .qm-roles__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.qm-role { padding: 2.25rem 0; border-bottom: 1px solid var(--qline); }
@media (min-width: 900px) {
    .qm-role { padding: 2.5rem 2.25rem 2.5rem 0; border-bottom: 0; }
    .qm-role + .qm-role { padding-left: 2.25rem; border-left: 1px solid var(--qline); }
}
.qm-role__ico { width: 3.25rem; height: 3.25rem; margin-bottom: 1.1rem; }
.qm-role__label { margin: 0; font-size: 1.3rem; font-weight: 700; line-height: 1.35; color: var(--qi); }
.qm-role__desc { margin: 0.6rem 0 0; font-size: 0.95rem; line-height: 1.75; color: var(--qink2); }
.qm-dash { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.qm-dash li { position: relative; padding: 0.6rem 0 0.6rem 1.35rem; border-top: 1px solid #f0ece4; font-size: 0.9rem; color: var(--qi); font-weight: 500; line-height: 1.55; }
.qm-dash li::before { content: ""; position: absolute; left: 0; top: 1.15rem; width: 0.7rem; height: 2px; background: var(--qo); }

/* ==========================================================================
   CTA band
   ========================================================================== */
.qm-cta-section { background: #0f213e; padding: 3.5rem 1.25rem; border-top: 3px solid #f97316; }
@media (min-width: 640px) { .qm-cta-section { padding: 4.5rem 2rem; } }
.qm-cta-row { display: flex; flex-direction: column; gap: 1.75rem; }
@media (min-width: 900px) { .qm-cta-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 3rem; } }
.qm-cta-title { margin: 0; font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 700; line-height: 1.3; color: #fff; letter-spacing: -0.01em; max-width: 34rem; }
.qm-cta-text { margin: 0.65rem 0 0; font-size: 0.98rem; line-height: 1.65; color: rgba(255,255,255,0.68); max-width: 34rem; }
.qm-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; flex-shrink: 0; }
.qm-cta-link { color: #fff; font-size: 0.95rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.4); padding-bottom: 2px; transition: border-color 0.2s ease; }
.qm-cta-link:hover { border-color: #f97316; }

@media (prefers-reduced-motion: reduce) {
    .qm-marquee__track { animation: none; }
}
