/* ==========================================================================
   Blog: index, article page and the extra product mock-ups it uses.
   Loaded only on /blog pages, after site.css. Uses the tokens defined there.
   1. Mock-ups (mobile app, AI chat, AI extraction)  2. Blog index
   3. Article header and figure  4. Article layout and reading column
   5. Contents, takeaways, call to action  6. Keep reading
   ========================================================================== */

/* 1. Mock-ups ------------------------------------------------------------- */
.phone {
	position: relative;
	width: min(284px, 100%);
	margin: 0 auto;
	padding: 10px;
	border-radius: 40px;
	background: var(--navy-900);
	box-shadow: 0 4px 10px rgba(11, 23, 40, 0.1), 0 40px 70px -24px rgba(11, 23, 40, 0.45);
	user-select: none;
}
.phone__speaker { width: 72px; height: 5px; margin: 3px auto 9px; border-radius: 3px; background: var(--navy-700); }
.phone__screen {
	display: flex;
	flex-direction: column;
	min-height: 480px;
	border-radius: 30px;
	overflow: hidden;
	background: #fff;
	color: #1F2A3A;
	font-size: 11px;
	line-height: 1.35;
}
.phone__top { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; }
.phone__brand { margin-right: auto; font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.phone__icon .icon { width: 16px; height: 16px; color: #55657B; }
.phone__banner {
	display: grid;
	gap: 8px;
	align-content: end;
	min-height: 112px;
	margin: 0 12px;
	padding: 14px;
	border-radius: 14px;
	background: linear-gradient(140deg, #0F2038 0%, #1B3350 52%, #2563EB 130%);
	color: #fff;
}
.phone__banner strong { font-size: 15px; letter-spacing: -0.02em; max-width: 70%; line-height: 1.2; }
.phone__banner span { justify-self: start; padding: 4px 10px; border-radius: 6px; background: #fff; color: var(--navy-900); font-size: 10px; font-weight: 650; }
.phone__chips { display: flex; gap: 6px; padding: 12px; overflow: hidden; }
.phone__chips span { padding: 4px 11px; border: 1px solid #E2E8F0; border-radius: 999px; font-size: 10px; color: #55657B; white-space: nowrap; }
.phone__chips .is-on { border-color: var(--accent-strong); background: var(--accent-strong); color: #fff; }
.phone__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; padding: 0 12px 12px; }
.phone__grid .store__item { gap: 3px; }
.phone__grid b { font-size: 10.5px; font-weight: 650; }
.phone__grid i { font-style: normal; color: #7B889C; font-size: 9.5px; }
.phone__tabs { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: auto; padding: 8px 6px 12px; border-top: 1px solid #E7ECF3; }
.phone__tabs span { display: grid; justify-items: center; gap: 3px; font-size: 9px; color: #7B889C; }
.phone__tabs .icon { width: 16px; height: 16px; }
.phone__tabs .is-on { color: var(--accent-strong); font-weight: 650; }

.chat-mock { max-width: 460px; margin-inline: auto; }
.chat-mock__body { display: grid; gap: 10px; padding: 16px; background: #FBFCFE; }
.chat-mock__msg { max-width: 84%; padding: 9px 12px; border-radius: 14px; font-size: 11.5px; line-height: 1.45; }
.chat-mock__msg.is-visitor { justify-self: end; border-bottom-right-radius: 4px; background: var(--accent-strong); color: #fff; }
.chat-mock__msg.is-agent { justify-self: start; border-bottom-left-radius: 4px; background: #fff; border: 1px solid #E7ECF3; }
.chat-mock__who { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; font-size: 9.5px; font-weight: 650; color: var(--teal-strong); }
.chat-mock__who .icon { width: 11px; height: 11px; }
.chat-mock__product { display: flex; align-items: center; gap: 9px; margin-top: 8px; padding: 7px; border: 1px solid #E7ECF3; border-radius: 10px; background: #FBFCFE; }
.chat-mock__product .store__img { width: 38px; flex: none; }
.chat-mock__product b { display: block; font-size: 11px; }
.chat-mock__product i { font-style: normal; font-size: 10px; color: var(--accent-strong); }
.chat-mock__handoff { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 10px; color: #55657B; }
.chat-mock__handoff .icon { width: 12px; height: 12px; }
.chat-mock__input { display: flex; align-items: center; justify-content: space-between; margin: 0 14px 14px; padding: 8px 10px 8px 12px; border: 1px solid #E2E8F0; border-radius: 999px; font-size: 11px; color: #7B889C; background: #fff; }
.chat-mock__input i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-strong); color: #fff; }
.chat-mock__input .icon { width: 12px; height: 12px; }

.extract-mock { max-width: 640px; margin-inline: auto; }
.extract-mock__cols { display: grid; grid-template-columns: 1fr 28px 1.15fr; align-items: center; gap: 12px; padding: 18px; background: #FBFCFE; }
.extract-mock__photo { display: grid; gap: 8px; justify-items: center; }
.extract-mock__label {
	display: grid;
	gap: 6px;
	width: 100%;
	padding: 18px 14px;
	border-radius: 12px;
	background: linear-gradient(145deg, #EEF2F8, #E2E8F1);
	font-size: 10px;
	color: #3C4A5E;
	transform: rotate(-2deg);
	box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08), 0 14px 24px -12px rgba(16, 36, 64, 0.25);
}
.extract-mock__label b { font-family: var(--font-display); font-size: 13px; letter-spacing: -0.01em; color: #1F2A3A; }
.extract-mock__bars { height: 22px; margin-top: 4px; border-radius: 3px; background: repeating-linear-gradient(90deg, #1F2A3A 0 2px, transparent 2px 5px, #1F2A3A 5px 6px, transparent 6px 10px); opacity: 0.75; }
.extract-mock__photo small { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: #7B889C; }
.extract-mock__photo small .icon { width: 12px; height: 12px; }
.extract-mock__arrow { display: grid; place-items: center; color: var(--accent-strong); }
.extract-mock__arrow .icon { width: 20px; height: 20px; }
.extract-mock__draft { display: grid; gap: 6px; padding: 12px; border: 1px solid #E7ECF3; border-radius: 12px; background: #fff; }
.extract-mock__badge { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-strong); font-size: 9.5px; font-weight: 650; }
.extract-mock__badge .icon { width: 11px; height: 11px; }
.extract-mock__field { display: grid; gap: 1px; padding: 6px 8px; border-radius: 7px; background: #F5F8FC; }
.extract-mock__field em { font-style: normal; font-size: 9px; color: #7B889C; }
.extract-mock__field span { font-size: 11px; font-weight: 600; }
.extract-mock__field.is-empty span { font-weight: 450; color: #7B889C; }
@media (max-width: 520px) {
	.extract-mock__cols { grid-template-columns: 1fr; }
	.extract-mock__arrow { transform: rotate(90deg); }
}

/* 2. Blog index ------------------------------------------------------------ */
.blog-featured { padding-block: clamp(40px, 6vw, 72px) clamp(48px, 7vw, 88px); background: var(--bg-soft); }
.blog-featured__grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .blog-featured__grid { grid-template-columns: 1.05fr 1fr; } }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 14px; font-size: 0.875rem; color: var(--text-muted); }
.blog-tag { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 0.8125rem; font-weight: 600; }
.blog-featured h2 { margin-bottom: 14px; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; }
.blog-featured h2 a { color: var(--text); }
.blog-featured h2 a:hover { color: var(--accent-strong); }
.blog-featured p.blog-excerpt { max-width: 56ch; font-size: 1.0625rem; color: var(--text-muted); }

.blog-index { padding-block: clamp(40px, 6vw, 80px); }
.blog-index > .container > h2 { margin-bottom: clamp(18px, 3vw, 28px); font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); letter-spacing: -0.02em; }
.blog-rows { list-style: none; border-top: 1px solid var(--border); }
.blog-row { display: grid; gap: 8px 40px; padding: clamp(20px, 3vw, 30px) 0; border-bottom: 1px solid var(--border); }
@media (min-width: 820px) { .blog-row { grid-template-columns: 200px minmax(0, 1fr) 32px; align-items: start; } }
.blog-row .blog-meta { margin: 4px 0 0; flex-direction: column; align-items: flex-start; gap: 6px; }
.blog-row h3 { margin-bottom: 8px; font-family: var(--font-display); font-size: clamp(1.15rem, 1.02rem + 0.5vw, 1.4rem); line-height: 1.25; letter-spacing: -0.015em; text-wrap: balance; }
.blog-row h3 a { color: var(--text); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 2px; transition: text-decoration-color var(--speed) var(--ease), color var(--speed) var(--ease); }
.blog-row:hover h3 a, .blog-row:focus-within h3 a { color: var(--accent-strong); text-decoration-color: currentColor; }
.blog-row p { max-width: 62ch; margin: 0; color: var(--text-muted); }
.blog-row__go { display: none; align-self: center; color: var(--accent-strong); }
.blog-row__go .icon { width: 22px; height: 22px; transition: transform var(--speed) var(--ease); }
.blog-row:hover .blog-row__go .icon { transform: translateX(4px); }
@media (min-width: 820px) { .blog-row__go { display: block; } }

/* 3. Article header and figure --------------------------------------------- */
.post-head { padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 48px); background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%); }
.post-head__inner { max-width: 820px; }
.post-head h1 { margin: 6px 0 18px; font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.post-head .lead { max-width: 62ch; margin: 0 0 20px; }
.post-byline { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.post-byline strong { color: var(--text); font-weight: 600; }
.post-figure { margin: 0; padding: clamp(20px, 4vw, 44px); border-radius: var(--radius-xl); background: var(--bg-muted); }
.post-figure .preview-stage { max-width: 760px; margin-inline: auto; }
.post-figure .preview-caption { justify-content: center; }
.post-figure-wrap { padding-bottom: clamp(32px, 5vw, 56px); }

/* 4. Article layout and reading column ----------------------------------- */
.post-layout { display: grid; gap: 32px; padding-bottom: clamp(48px, 7vw, 88px); }
@media (min-width: 1100px) {
	.post-layout { grid-template-columns: minmax(0, 70ch) 270px; justify-content: space-between; gap: 72px; align-items: start; }
}
.post-body { font-size: 1.0625rem; line-height: 1.75; color: #1F2A3A; }
.post-body ::selection, .post-head ::selection { background: var(--accent-soft); color: var(--navy-900); }
.post-body section { margin-top: clamp(40px, 5vw, 56px); }
.post-body section:first-of-type { margin-top: 32px; }
.post-body h2 { margin: 0 0 14px; scroll-margin-top: calc(var(--header-h) + 24px); font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); line-height: 1.22; letter-spacing: -0.02em; text-wrap: balance; }
.post-body p { margin: 0 0 1.15em; }
.post-body a { text-decoration: underline; text-decoration-color: rgba(37, 99, 235, 0.35); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
.post-body a:hover { text-decoration-color: currentColor; }
.post-body .check-list { margin: 4px 0 1.3em; gap: 10px; }
.post-body .check-list li { line-height: 1.55; }

/* 5. Contents, takeaways, call to action ------------------------------------ */
.post-aside { display: none; }
@media (min-width: 1100px) {
	.post-aside { display: block; position: sticky; top: calc(var(--header-h) + 24px); }
}
.post-toc { font-size: 0.9375rem; }
.post-toc__title { margin: 0 0 8px; padding: 0 14px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--text-subtle); }
.post-toc ol { list-style: none; display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--border); }
.post-toc a { display: block; padding: 7px 14px; border-radius: 8px; color: var(--text-muted); line-height: 1.4; }
.post-toc a:hover { background: var(--bg-soft); color: var(--accent-strong); }

.takeaways { margin: 0 0 8px; padding: clamp(20px, 3vw, 28px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.takeaways h2 { margin: 0 0 12px; font-size: 1.15rem; letter-spacing: -0.01em; }
.takeaways .check-list { margin: 0; font-size: 1rem; }

.post-cta { margin-top: clamp(40px, 5vw, 56px); padding: clamp(22px, 4vw, 34px); border-radius: var(--radius-lg); background: var(--navy-900); color: var(--on-dark); box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
.post-cta h2 { margin: 0; color: #fff; font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem); }
.post-cta p { margin: 0; max-width: 52ch; color: var(--on-dark-muted); font-size: 1rem; line-height: 1.6; }
.post-cta .btn-row { margin: 0; }

.post-end { margin-top: clamp(40px, 5vw, 56px); padding-top: 22px; border-top: 1px solid var(--border); font-size: 0.9375rem; color: var(--text-muted); }
.post-end strong { color: var(--text); }

/* 6. Keep reading ---------------------------------------------------------- */
.post-more { padding-block: clamp(40px, 6vw, 72px); background: var(--bg-soft); }
.post-more h2 { margin-bottom: 20px; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); letter-spacing: -0.02em; }
.post-more__grid { display: grid; gap: 28px 48px; }
@media (min-width: 820px) { .post-more__grid { grid-template-columns: 1fr 1fr; } }
.post-more h3 { margin-bottom: 10px; font-size: 0.9375rem; font-family: var(--font-sans); font-weight: 650; color: var(--text-muted); }
.post-more ul { list-style: none; display: grid; gap: 14px; }
.post-more li a { font-weight: 600; font-size: 1.0625rem; line-height: 1.35; }
.post-more li span { display: block; margin-top: 2px; font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
	.blog-row h3 a, .blog-row__go .icon { transition: none; }
}
