/* ============================================================================
   download.css — หน้าดาวน์โหลด "สาธารณะ" (สไตล์เดียวกับ landing_page/news)
   ★ 12 ก.ย. 2569: เขียนใหม่หมด · เดิมเป็นชุด member (download.css+download-ix+download-polish · มีแดงเก่า) ทิ้งแล้ว
   ใช้โทเคน css/landing-page.css (--ix-*) · Cinzel หัวเรื่อง + Prompt เนื้อหา · ธีมสว่างเดียว · ทุกสไตล์ scope ใต้ .download-page
   ============================================================================ */

.download-page {
    color: var(--ix-ink);           /* landing-page.css ตั้ง body{color:#fff} → ต้อง reset ที่หน้านี้ */
    font-family: 'Prompt', system-ui, sans-serif;
    background: #F2F7FD;
    min-height: 60vh;
    padding-bottom: 72px;
}
.download-page .wrap { max-width: 1080px; }
.download-page *, .download-page *::before, .download-page *::after { box-sizing: border-box; }

/* ── HERO ── */
.dl-hero {
    position: relative;
    background:
        radial-gradient(120% 140% at 85% -10%, rgba(59,130,246,.13), transparent 55%),
        linear-gradient(180deg, #EAF2FC 0%, #F2F7FD 100%);
    border-bottom: 1px solid var(--ix-line);
    overflow: hidden;
}
.dl-hero::after {   /* เส้นแสงจาง ๆ ด้านล่าง ให้ hero มีมิติ (offset+blur จริง ไม่ใช่ halo) */
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(29,78,216,.35), transparent);
}
.dl-hero-inner {
    text-align: center;
    padding: clamp(48px, 8vw, 88px) 0 clamp(40px, 6vw, 64px);
}
.dl-hero-title {
    font-family: 'Cinzel', 'Prompt', serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 4.6vw, 3.4rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--ix-navy, #0A1430);
    margin: 0;
    text-wrap: balance;
}
.dl-hero-sub {
    margin: 16px auto 0;
    max-width: 60ch;
    font-size: clamp(.95rem, 1.4vw, 1.08rem);
    line-height: 1.65;
    color: var(--ix-ink-2);
}
.dl-hero-cta {
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
    margin-top: 30px;
}

/* ── ปุ่ม ── */
.dl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 12px 24px; border-radius: 10px;
    font: 600 .92rem/1 'Prompt', sans-serif; letter-spacing: .01em;
    text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
    color: #fff;
    background: linear-gradient(180deg, var(--ix-blue-soft) 0%, var(--ix-blue) 100%);
    box-shadow: 0 8px 20px -10px rgba(29,78,216,.55);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.dl-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(29,78,216,.62); }
.dl-btn:active { transform: translateY(0); }
.dl-btn svg { flex: none; }
.dl-btn-lg { padding: 15px 30px; font-size: 1rem; border-radius: 12px; }
.dl-btn-ghost {
    color: var(--ix-blue-deep); background: var(--ix-white);
    border-color: var(--ix-line); box-shadow: none;
}
.dl-btn-ghost:hover { background: var(--ix-tint); border-color: var(--ix-blue-soft); box-shadow: none; transform: translateY(-2px); }
.dl-btn-block { width: 100%; padding: 14px 22px; }
.dl-btn.is-disabled {
    background: #E7EDF6; color: var(--ix-ink-2); box-shadow: none; cursor: not-allowed;
    pointer-events: none; border-color: var(--ix-line);
}
.download-page a:focus-visible, .download-page button:focus-visible {
    outline: 2px solid var(--ix-blue); outline-offset: 3px;
}

/* ── โครงเนื้อหา ── */
.dl-body { padding-top: clamp(36px, 5vw, 56px); }
.dl-section { margin-top: clamp(44px, 6vw, 68px); }
.dl-section:first-child { margin-top: 0; }
.dl-section-head { margin-bottom: 22px; }
.dl-section-title {
    font-family: 'Cinzel', 'Prompt', serif;
    font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.2;
    letter-spacing: -0.005em; color: var(--ix-navy, #0A1430); margin: 0;
}
.dl-section-sub { margin: 7px 0 0; font-size: .92rem; color: var(--ix-ink-2); line-height: 1.5; }

/* ── การ์ดดาวน์โหลด ── */
.dl-files-grid {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.dl-card {
    display: flex; flex-direction: column; gap: 16px;
    background: var(--ix-white);
    border: 1px solid var(--ix-line);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 30px -20px rgba(15,30,61,.35);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dl-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -22px rgba(15,30,61,.4);
    border-color: rgba(59,130,246,.4);
}
.dl-card-main { display: flex; gap: 14px; align-items: flex-start; }
.dl-card-icon {
    flex: none; width: 52px; height: 52px; border-radius: 13px;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--ix-blue-soft), var(--ix-blue));
    box-shadow: 0 8px 18px -10px rgba(29,78,216,.5);
}
.dl-card-headings { min-width: 0; padding-top: 2px; }
.dl-card-title {
    font-family: 'Cinzel', 'Prompt', serif; font-weight: 700;
    font-size: 1.12rem; line-height: 1.25; color: var(--ix-ink); margin: 0;
    word-break: break-word;
}
.dl-card-desc { margin: 5px 0 0; font-size: .86rem; line-height: 1.55; color: var(--ix-ink-2); }

.dl-meta {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
    margin: 0; background: var(--ix-line); border: 1px solid var(--ix-line);
    border-radius: 12px; overflow: hidden;
}
.dl-meta-item { background: var(--ix-tint); padding: 11px 14px; }
.dl-meta-item dt { font-size: .72rem; color: var(--ix-ink-2); letter-spacing: .02em; margin: 0; }
.dl-meta-item dd { margin: 3px 0 0; font-size: .92rem; font-weight: 600; color: var(--ix-ink); }

.dl-card-foot { margin-top: auto; }
.dl-card-hint { margin: 9px 0 0; text-align: center; font-size: .78rem; color: var(--ix-ink-2); }
.dl-card-hint-warn { color: #B45309; }

/* ── empty / error state ── */
.dl-note-card {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--ix-white); border: 1px solid var(--ix-line); border-radius: 16px;
    padding: 24px 26px; box-shadow: 0 10px 30px -22px rgba(15,30,61,.3);
}
.dl-note-card svg { flex: none; }
.dl-note-empty svg { color: var(--ix-blue-soft); }
.dl-note-error { border-color: rgba(220,38,38,.3); background: #FEF4F4; }
.dl-note-error svg { color: #DC2626; }
.dl-note-title { margin: 2px 0 0; font-weight: 700; font-size: 1.02rem; color: var(--ix-ink); }
.dl-note-text { margin: 6px 0 0; font-size: .9rem; line-height: 1.55; color: var(--ix-ink-2); }

/* ── สเปกระบบ ── */
.dl-specs-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.dl-spec {
    background: var(--ix-white); border: 1px solid var(--ix-line); border-radius: 16px;
    padding: 20px 22px; box-shadow: 0 10px 30px -22px rgba(15,30,61,.3);
}
.dl-spec-recommended { border-color: rgba(59,130,246,.45); box-shadow: 0 14px 34px -20px rgba(29,78,216,.28); }
.dl-spec-head { display: flex; align-items: center; gap: 11px; padding-bottom: 14px; border-bottom: 1px solid var(--ix-line); margin-bottom: 6px; }
.dl-spec-icon {
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff;
    background: linear-gradient(135deg, #94A3B8, #64748B);
}
.dl-spec-recommended .dl-spec-icon { background: linear-gradient(135deg, var(--ix-blue-soft), var(--ix-blue)); }
.dl-spec-title { font-family: 'Cinzel','Prompt',serif; font-weight: 700; font-size: 1.08rem; color: var(--ix-ink); margin: 0; flex: 1; }
.dl-spec-badge {
    font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: var(--ix-blue-deep);
    background: var(--ix-tint); border: 1px solid rgba(59,130,246,.35); padding: 3px 9px; border-radius: 999px;
}
.dl-spec-list { margin: 0; }
.dl-spec-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px dashed var(--ix-line); }
.dl-spec-row:last-child { border-bottom: 0; }
.dl-spec-row dt { font-size: .84rem; color: var(--ix-ink-2); flex: none; margin: 0; }
.dl-spec-row dd { margin: 0; font-size: .88rem; font-weight: 600; color: var(--ix-ink); text-align: right; }

/* ── ขั้นตอนติดตั้ง ── */
.dl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dl-step {
    display: flex; gap: 15px; align-items: flex-start;
    background: var(--ix-white); border: 1px solid var(--ix-line); border-radius: 13px; padding: 16px 18px;
}
.dl-step-num {
    flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
    font-weight: 700; font-size: .95rem; color: #fff;
    background: linear-gradient(135deg, var(--ix-blue-soft), var(--ix-blue));
    box-shadow: 0 6px 14px -8px rgba(29,78,216,.5);
}
.dl-step-body { padding-top: 3px; }
.dl-step-title { margin: 0; font-weight: 600; font-size: .98rem; color: var(--ix-ink); }
.dl-step-desc { margin: 4px 0 0; font-size: .86rem; line-height: 1.55; color: var(--ix-ink-2); }

/* ── คำแนะนำ ── */
.dl-notes {
    margin-top: 18px; background: var(--ix-tint); border: 1px solid rgba(59,130,246,.28);
    border-radius: 13px; padding: 18px 20px;
}
.dl-notes-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 700; font-size: .95rem; color: var(--ix-blue-deep); }
.dl-notes-title svg { flex: none; }
.dl-notes-list { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.dl-notes-list li { font-size: .86rem; line-height: 1.55; color: var(--ix-ink-2); }

/* ── entrance เดียวต่อหน้า (CSS ล้วน · จาก resting ที่มองเห็น) ── */
@media (prefers-reduced-motion: no-preference) {
    .dl-section, .dl-hero-inner > * { animation: dl-rise .5s cubic-bezier(.22,.61,.36,1) both; }
    .dl-hero-inner > *:nth-child(2) { animation-delay: .05s; }
    .dl-hero-inner > *:nth-child(3) { animation-delay: .1s; }
    .dl-section:nth-of-type(2) { animation-delay: .04s; }
    .dl-section:nth-of-type(3) { animation-delay: .08s; }
    @keyframes dl-rise { from { opacity: .4; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* ── responsive ── */
@media (max-width: 860px) {
    .dl-specs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .dl-files-grid { grid-template-columns: 1fr; }
    .dl-hero-cta { flex-direction: column; }
    .dl-hero-cta .dl-btn { width: 100%; }
    .dl-meta { grid-template-columns: 1fr; }
    .dl-card { padding: 18px; }
    .dl-spec-row { flex-direction: column; gap: 3px; }
    .dl-spec-row dd { text-align: left; }
}
