/* PIGSPIN — เสริมท้าย site.css: ฟอนต์ root vars, Modal สมัคร, บทความ (blog) */

/* ---------- root font vars (ต้นฉบับใส่ผ่าน class ของ next/font) ---------- */
:root {
	--font-db-heavent-original: "dbHeaventOriginal", "dbHeaventOriginal Fallback";
	--font-ps-icons: "psIcons", "psIcons Fallback";
	--header-bg: rgba(255, 255, 255, 0.95);
}
html {
	font-family: var(--font-db-heavent-original), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }

/* โลโก้ใน header เป็น <a> แทน <div> เดิม */
.ps-logo-link { display: block; cursor: pointer; text-decoration: none; }
a.HeaderContent_loginButton__QYOl3 { text-decoration: none; }

/* ---------- Modal สมัครสมาชิก ---------- */
.ps-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ps-modal[hidden] { display: none; }
.ps-modal__backdrop { position: absolute; inset: 0; background: rgba(3, 3, 3, 0.6); }
.ps-modal__box {
	position: relative; background: #fff; border-radius: 20px; padding: 32px 28px;
	max-width: 360px; width: 100%; text-align: center; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
	animation: ps-modal-in 0.2s ease-out;
}
@keyframes ps-modal-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ps-modal__close {
	position: absolute; top: 10px; right: 12px; border: 0; background: none; cursor: pointer;
	font-size: 28px; line-height: 1; color: var(--greyscale-400, #7F7F82); padding: 6px;
}
.ps-modal__logo { width: 150px; height: auto; margin: 0 auto 12px; display: block; }
.ps-modal__title { font-size: 26px; font-weight: 900; color: var(--greyscale-600, #2A2A2E); margin: 0 0 8px; }
.ps-modal__text { font-size: 16px; line-height: 1.5; color: var(--greyscale-500, #555558); margin: 0 0 20px; }
.ps-modal__cta {
	display: block; width: 100%; box-sizing: border-box; padding: 12px 16px; border-radius: 999px;
	background: var(--primary-1, #6729ff) !important; color: var(--text-2, #FBFBFB) !important;
	font-size: 20px; font-weight: 700; text-decoration: none !important; transition: filter 0.2s;
}
.ps-modal__cta:hover, .ps-modal__cta:focus { filter: brightness(1.1); }
body.ps-modal-open { overflow: hidden; }

/* ---------- บทความ (archive + single) ดีไซน์ชุดเดียวกับธีม ---------- */
.ps-blog { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; color: var(--greyscale-600, #2A2A2E); }
.ps-blog__head { margin: 8px 0 20px; }
.ps-blog__title { font-size: 36px; font-weight: 900; line-height: 0.95; color: var(--text-1, #030303); margin: 16px 0; }
.ps-blog__subtitle { font-size: 18px; color: var(--greyscale-500, #555558); margin: 0 0 8px; }

.ps-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.ps-card {
	background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 16px rgba(3, 3, 3, 0.12);
	text-decoration: none; color: inherit; display: block; transition: transform 0.2s, box-shadow 0.2s;
}
.ps-card:hover, .ps-card:focus { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(3, 3, 3, 0.18); }
.ps-card__thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; display: block; background: var(--greyscale-100, #FCFCFC); }
.ps-card__body { padding: 16px; }
.ps-card__title { font-size: 20px; font-weight: 800; margin: 0 0 8px; color: var(--text-1, #030303); line-height: 1.25; }
.ps-card__excerpt { font-size: 15px; line-height: 1.5; color: var(--greyscale-500, #555558); margin: 0 0 10px; }
.ps-card__meta { font-size: 13px; color: var(--greyscale-400, #7F7F82); }

/* single / page content */
.ps-single { max-width: 800px; margin: 0 auto; padding: 24px 16px 48px; color: var(--greyscale-600, #2A2A2E); font-size: 18px; line-height: 1.65; }
.ps-single__title { font-size: 34px; font-weight: 900; line-height: 1.1; color: var(--text-1, #030303); margin: 8px 0 12px; }
.ps-single__meta { font-size: 14px; color: var(--greyscale-400, #7F7F82); margin-bottom: 20px; }
.ps-single__thumb { width: 100%; border-radius: 16px; margin: 0 0 24px; display: block; }
.ps-single__content h1, .ps-single__content h2, .ps-single__content h3 { color: var(--text-1, #030303); font-weight: 900; margin: 28px 0 12px; line-height: 1.2; }
.ps-single__content h2 { font-size: 28px; }
.ps-single__content h3 { font-size: 23px; }
.ps-single__content p { margin: 0 0 16px; }
.ps-single__content a { color: var(--primary-1, #6729ff); text-decoration: underline; }
.ps-single__content img { border-radius: 12px; }
.ps-single__content blockquote { border-left: 4px solid var(--primary-1, #6729ff); margin: 16px 0; padding: 8px 16px; background: #fff; border-radius: 0 12px 12px 0; }
.ps-single__content ul, .ps-single__content ol { margin: 0 0 16px; padding-left: 24px; }
.ps-single__back {
	display: inline-block; margin-top: 28px; padding: 10px 22px; border-radius: 999px;
	background: var(--primary-1, #6729ff); color: var(--text-2, #FBFBFB) !important;
	font-weight: 700; text-decoration: none !important; font-size: 16px;
}
.ps-single__back:hover, .ps-single__back:focus { filter: brightness(1.1); }

/* pagination */
.ps-pagination { display: flex; gap: 10px; justify-content: center; margin-top: 28px; }
.ps-pagination .page-numbers {
	display: inline-block; padding: 8px 16px; border-radius: 999px; background: #fff;
	color: var(--greyscale-600, #2A2A2E) !important; text-decoration: none !important; font-weight: 700;
	box-shadow: 0 2px 8px rgba(3, 3, 3, 0.1);
}
.ps-pagination .page-numbers.current { background: var(--primary-1, #6729ff); color: var(--text-2, #FBFBFB) !important; }

/* 404 / fallback */
.ps-empty { text-align: center; padding: 64px 16px; }
.ps-empty__code { font-size: 72px; font-weight: 900; color: #fff; margin: 0; }

/* hero headline สถานะ static (ต้นฉบับซ่อนไว้รอ JS intro)
   ต้นฉบับเป็น position:fixed + JS ย้ายตอน intro จบ — ไม่มี JS จึง fix ให้อยู่ท้ายจอแรกของ hero */
.page_homeHeroHeadline__C1lLg {
	position: absolute;
	top: calc(100svh - 250px);
	bottom: auto;
	pointer-events: auto;
	transform: translateX(-50%);
}
.page_homeHero__GGp4y { position: relative; } /* มีอยู่แล้วในต้นฉบับ — กัน override */
