/*
Theme Name: Bình Giấy
Theme URI: https://binhgiay.com/
Author: Mai Quốc Bình
Description: Theme thương hiệu cá nhân Mai Quốc Bình (Bình Giấy) — phong cách sổ tay giấy: gáy lò xo, giấy chấm bi, ảnh dán băng keo, giấy note, nét bút đỏ. Dữ liệu gom trong inc/data.php, schema Person + Organization, form lưu tin nhắn, không page builder, không jQuery.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: binhgiay
*/

/* ==========================================================================
   1. Tokens — đổi giao diện chủ yếu ở đây
   ========================================================================== */
:root {
	--paper: #fffefb;
	--paper-2: #f6f3ec;
	--paper-3: #ebe6da;
	--paper-white: #ffffff;
	--desk: #cdbf9f;
	--ink: #1d2740;
	--ink-2: #141b2e;
	--ink-soft: #4b536a;
	--red: #b5372a;
	--hl: #f0cf5a;
	--sage: #4f8a64;
	--tape: rgba(222, 205, 160, 0.8);
	--note-yellow: #f7e48e;
	--note-pink: #f4cdbd;
	--note-sage: #d6e5cf;
	--line: rgba(29, 39, 64, 0.16);

	--f-display: "Fraunces", "Literata", Georgia, serif;
	--f-text: "Literata", Georgia, "Times New Roman", serif;
	--f-hand: "Dancing Script", "Segoe Script", cursive;

	--t-hero: clamp(44px, 6.6vw, 96px);
	--t-h1: clamp(40px, 5.6vw, 84px);
	--t-h2: clamp(32px, 4.2vw, 58px);
	--t-h3: clamp(21px, 1.9vw, 27px);
	--t-statement: clamp(21px, 2.2vw, 30px);
	--t-body: clamp(17px, 1.15vw, 19px);
	--t-small: 15px;

	--maxw: 1180px;
	--gutter: 20px;
	--section: clamp(64px, 8.5vw, 128px);
	--header-h: 76px;

	--r-card: 12px;
	--r-btn: 240px 16px 225px 15px / 15px 225px 16px 255px;
	--shadow-note: 0 1px 1px rgba(60, 45, 15, 0.08), 0 14px 22px -18px rgba(60, 45, 15, 0.5);
	--shadow-photo: 0 1px 1px rgba(60, 45, 15, 0.08), 0 10px 22px -16px rgba(60, 45, 15, 0.45);
	--ease: cubic-bezier(.22, 1, .36, 1);

	--dots: radial-gradient(circle, rgba(29, 39, 64, 0.11) 1.05px, transparent 1.5px);
	/* Gáy lò xo: vòng kim loại nằm ngang (desktop, mép trái) và đứng (mobile, mép trên) — SVG tự vẽ. */
	--ring-h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='34' viewBox='0 0 72 34'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f7f6f1'/%3E%3Cstop offset='.5' stop-color='%23aeaca5'/%3E%3Cstop offset='1' stop-color='%23585550'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cellipse cx='60' cy='18' rx='4.2' ry='3.5' fill='%2365583f'/%3E%3Cpath d='M59 19C55 23 52 24 50 23' fill='none' stroke='%23000' stroke-opacity='.15' stroke-width='3'/%3E%3Cpath d='M60 17C51 5 24 4 12 16c-4 5-1 12 12 12' fill='none' stroke='url(%23g)' stroke-width='3.8' stroke-linecap='round'/%3E%3Cpath d='M52 9C43 5 29 5 19 10' fill='none' stroke='%23fff' stroke-opacity='.85' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
	--ring-v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='40' viewBox='0 0 30 40'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%23f7f6f1'/%3E%3Cstop offset='.5' stop-color='%23aeaca5'/%3E%3Cstop offset='1' stop-color='%23585550'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cellipse cx='15' cy='32' rx='3.6' ry='4' fill='%2365583f'/%3E%3Cpath d='M14 32C5 25 5 11 15 5c5-2 9 2 8 9' fill='none' stroke='url(%23g)' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
	--pen-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5.4C40 3.8 90 3.2 140 3.6c22 .2 40 .4 58-.3l.4 1.6C180 6.4 160 6.6 138 6.5 88 6.2 40 6.5 1.5 7Z' fill='%23b5372a' fill-opacity='.65'/%3E%3C/svg%3E");
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font: 400 var(--t-body) / 1.72 var(--f-text);
	color: var(--ink);
	background-color: var(--desk);
	background-image: radial-gradient(rgba(90, 70, 40, 0.07) 1px, transparent 1px);
	background-size: 5px 5px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
img, picture, video, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(181, 55, 42, 0.5); }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
input, select, textarea, button { font: inherit; color: inherit; }
mark {
	color: inherit;
	padding: 0;
	-webkit-box-decoration-break: clone; box-decoration-break: clone;
	background: linear-gradient(100deg, transparent 2%, rgba(240, 207, 90, 0.75) 4%, rgba(240, 207, 90, 0.6) 96%, transparent 98%) 0 62% / 100% 58% no-repeat;
}
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--hl); color: var(--ink); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; padding: 8px 16px; background: var(--paper-white); }
.center { text-align: center; }
.center .pen-link { margin-top: 2.5rem; }

/* ==========================================================================
   3. Mặt bàn + cuốn sổ
   ========================================================================== */
.desk { padding: 30px 8px 0; }
.book {
	position: relative;
	max-width: 1460px;
	margin-inline: auto;
	background-color: var(--paper);
	background-image: var(--dots);
	background-size: 26px 26px;
	border-radius: 10px 10px 0 0;
	box-shadow: 1px 0 0 rgba(90, 70, 40, 0.1), 3px 3px 0 -1px var(--paper-2), 3px 3px 0 0 rgba(90, 70, 40, 0.1), 0 30px 60px -34px rgba(50, 35, 15, 0.45);
}
.book__rings {
	position: absolute;
	z-index: 120;
	top: -20px;
	left: 16px;
	right: 16px;
	height: 40px;
	background: var(--ring-v) 0 0 / 30px 40px repeat-x;
	pointer-events: none;
}
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(760px + 2 * var(--gutter)); }
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(40px, 5vw, 72px); }
.section--band { background-color: var(--paper-2); background-image: var(--dots); background-size: 26px 26px; }
.section + .section:not(.section--band):not(.section--tight) { padding-top: calc(var(--section) * 0.6); }

/* ==========================================================================
   4. Chữ trang trí: viết tay, nét bút, tiêu đề khối
   ========================================================================== */
.hand { font-family: var(--f-hand); font-weight: 700; font-size: clamp(24px, 2vw, 30px); line-height: 1.15; color: var(--red); letter-spacing: 0; }
.hand-arrow { width: 96px; color: var(--red); opacity: 0.85; }
.underlined { position: relative; display: inline-block; white-space: nowrap; }
.scribble { max-width: none; position: absolute; left: -2%; width: 104%; bottom: -0.14em; height: 0.2em; fill: var(--red); opacity: 0.8; pointer-events: none; }
.eyebrow { margin-bottom: 0.6rem; font-size: var(--t-small); font-weight: 600; color: var(--ink-soft); letter-spacing: 0.02em; }
.statement { font-family: var(--f-display); font-weight: 400; font-size: var(--t-statement); line-height: 1.42; letter-spacing: -0.01em; max-width: 34ch; }
.bhead { max-width: 760px; margin-bottom: clamp(36px, 4.5vw, 64px); }
.bhead__title { font-size: var(--t-h2); letter-spacing: -0.025em; line-height: 1.05; margin-bottom: 0.4em; text-wrap: balance; }
.bhead__title--sm { font-size: clamp(28px, 3vw, 40px); }
.bhead__lead { color: var(--ink-soft); font-size: clamp(18px, 1.35vw, 21px); line-height: 1.6; max-width: 58ch; margin: 0; }

/* ==========================================================================
   5. Nút và link bút
   ========================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; padding: 14px 28px 15px;
	border: 0; border-radius: var(--r-btn);
	font: 600 17px/1 var(--f-text); letter-spacing: 0.005em;
	text-decoration: none; cursor: pointer;
	transition: transform 0.16s var(--ease), background-color 0.2s;
}
.btn:hover { transform: translateY(-2px) rotate(-0.6deg); }
.btn--ink { background: var(--ink); color: var(--paper-white); box-shadow: 0 10px 18px -14px rgba(29, 39, 64, 0.9); }
.btn--ink:hover { background: var(--ink-2); color: var(--paper-white); }
.btn--sm { min-height: 44px; padding: 10px 18px 11px; font-size: 15.5px; white-space: nowrap; }
.btn--block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.pen-link {
	display: inline-flex; align-items: center; gap: 8px;
	padding-block: 6px 9px;
	font-weight: 600; color: var(--ink); text-decoration: none;
	background: var(--pen-line) 0 100% / 100% 7px no-repeat;
	transition: background-size 0.3s var(--ease), color 0.2s;
}
.pen-link:hover { color: var(--red); background-size: 70% 7px; }
.pen-link span { transition: transform 0.2s var(--ease); }
.pen-link:hover span { transform: translateX(4px); }

/* ==========================================================================
   6. Ảnh dán, polaroid, giấy note, băng keo
   ========================================================================== */
.photo { position: relative; margin: 0; }
.photo img { width: 100%; }
.photo--polaroid { padding: 10px 10px 12px; background: var(--paper-white); box-shadow: var(--shadow-photo); border-radius: 3px; }
.photo--polaroid img { border-radius: 2px; }
.photo--polaroid:not(.photo--free) img { aspect-ratio: 4 / 3; object-fit: cover; }
.photo--polaroid figcaption { padding: 10px 4px 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }
.photo--polaroid figcaption.hand { font-size: 24px; color: var(--red); }
.photo--tape::before, .note::before {
	content: ""; position: absolute; z-index: 2;
	top: -14px; left: 50%; width: 112px; height: 30px;
	background: var(--tape);
	transform: translateX(-50%) rotate(-3deg);
	clip-path: polygon(3% 8%, 10% 0, 22% 7%, 36% 1%, 52% 6%, 66% 0, 80% 6%, 93% 1%, 100% 9%, 98% 92%, 88% 100%, 72% 94%, 56% 100%, 40% 95%, 24% 100%, 9% 94%, 0 98%);
	box-shadow: 0 1px 2px rgba(60, 45, 15, 0.12);
}
.tilt-l { transform: rotate(-1.3deg); }
.tilt-r { transform: rotate(1.4deg); }
.tilt-0 { transform: rotate(0.3deg); }
.note {
	position: relative;
	padding: 30px 26px 26px;
	background: var(--note-yellow);
	border-radius: 2px 2px 6px 3px;
	box-shadow: var(--shadow-note);
}
.note--yellow { background: var(--note-yellow); }
.note--pink { background: var(--note-pink); }
.note--sage { background: var(--note-sage); }
.note--white { background: var(--paper-white); }
.note__title { font-size: clamp(20px, 1.7vw, 24px); line-height: 1.25; margin-bottom: 0.5em; }
.note p:last-child { margin-bottom: 0; }
.note__hand { margin-bottom: 0.7rem; }
.note__rows { margin: 0; }
.note__rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px dashed rgba(29, 39, 64, 0.2); }
.note__rows dt { font-size: 15.5px; }
.note__rows dd { margin: 0; font-family: var(--f-display); font-weight: 600; text-align: right; }
.note__list { margin: 0; padding-left: 1.4em; font-size: 16px; line-height: 1.45; }
.note__list li { margin-bottom: 8px; }
.note__list li::marker { font-family: var(--f-display); color: var(--red); }
.note__foot { margin-top: 14px; font-weight: 600; font-size: 15px; }

/* ==========================================================================
   7. Header
   ========================================================================== */
.site-head { position: sticky; top: 0; z-index: 100; background: var(--paper); border-radius: 10px 10px 0 0; transition: box-shadow 0.2s; }
.site-head.is-scrolled { box-shadow: 0 10px 18px -16px rgba(60, 45, 15, 0.6); }
.site-head__inner { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); padding-top: 8px; }
.site-logo { margin-right: auto; font-family: var(--f-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; text-decoration: none; color: var(--ink); }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 0; border-radius: 14px 6px 14px 8px; background: var(--paper-2); cursor: pointer; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform 0.2s; border-radius: 2px; }
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }
.nav-open .nav-toggle__bar { background: transparent; }
.nav-open .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }
.primary-nav {
	position: fixed; inset: calc(var(--header-h) + 30px) 8px 0 8px; z-index: 99;
	padding: 20px 24px 40px;
	background: var(--paper) var(--dots); background-size: 26px 26px;
	overflow-y: auto;
	transform: translateX(110%); transition: transform 0.28s var(--ease);
}
.nav-open .primary-nav { transform: none; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav a { display: block; padding: 14px 4px; font-family: var(--f-display); font-size: 24px; text-decoration: none; border-bottom: 1px dashed var(--line); }
.primary-nav .current-menu-item > a, .primary-nav .current_page_item > a, .primary-nav .current_page_parent > a { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 6px; font-weight: 600; }
.hide-sm { display: none; }
.show-sm { display: inline; }

/* ==========================================================================
   8. Hero trang chủ
   ========================================================================== */
.hero { padding-block: clamp(24px, 5vw, 96px) clamp(48px, 7vw, 120px); }
.hero__grid { display: grid; gap: 40px; }
.hero__photo { order: -1; position: relative; width: min(100%, 420px); margin: 30px auto 0; }
.hero__photo .photo { padding: 10px 10px 12px; background: var(--paper-white); box-shadow: var(--shadow-photo); }
.hero__photo .photo img { aspect-ratio: 1; object-fit: cover; object-position: 50% 20%; }
.photo--polaroid img { object-position: 50% 30%; }
.hero__hand { position: absolute; z-index: 3; top: -34px; left: -6px; transform: rotate(-5deg); }
.hero__arrow { position: absolute; z-index: 3; top: 4px; left: 30%; width: 70px; transform: rotate(12deg); }
.paper-scrap {
	position: absolute; inset: 14% -7% -5% 9%;
	background: var(--note-sage);
	clip-path: polygon(4% 9%, 18% 2%, 34% 7%, 52% 0, 70% 6%, 88% 1%, 99% 12%, 96% 34%, 100% 58%, 95% 80%, 98% 97%, 76% 93%, 58% 100%, 38% 94%, 20% 99%, 3% 92%, 6% 70%, 0 48%, 5% 28%);
}
.hero__name { font-size: var(--t-hero); letter-spacing: -0.03em; line-height: 0.98; margin-bottom: 0.32em; }
.hero__role { font-size: clamp(15.5px, 1.2vw, 18px); font-weight: 600; color: var(--ink-soft); margin-bottom: 1.4em; max-width: 44ch; }
.hero__statement { font-family: var(--f-display); font-weight: 400; font-size: clamp(25px, 2.7vw, 38px); line-height: 1.3; letter-spacing: -0.015em; max-width: 22ch; margin-bottom: 0.8em; }
.hero__lead { color: var(--ink-soft); max-width: 56ch; margin-bottom: 2em; }

/* ==========================================================================
   9. Khối trang chủ
   ========================================================================== */
.cols-3 { display: grid; gap: 44px; }
.role__title { padding-bottom: 10px; margin-bottom: 18px; background: var(--pen-line) 0 100% / 60% 6px no-repeat; }
.role__list { list-style: none; padding: 0; margin: 0 0 22px; }
.role__list li { position: relative; padding-left: 20px; margin-bottom: 14px; font-size: 17px; line-height: 1.6; color: var(--ink-soft); }
.role__list li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.role__list strong { color: var(--ink); }

.split { display: grid; gap: 44px; align-items: center; }
.lessons { list-style: none; padding: 0; margin: clamp(56px, 7vw, 96px) 0 0; display: grid; gap: 36px; }
.lessons--topics { margin-top: 0; }
.lesson { padding-top: 22px; border-top: 2px dashed rgba(29, 39, 64, 0.22); }
.lesson__num { display: block; font-family: var(--f-display); font-size: clamp(44px, 4.4vw, 64px); font-weight: 500; line-height: 1; color: var(--red); margin-bottom: 14px; }
.lesson__title { font-size: var(--t-h3); }
.lesson p { color: var(--ink-soft); margin: 0; }

.stats { list-style: none; padding: 0; margin: 0 0 clamp(56px, 7vw, 100px); display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 24px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.stat__num { position: relative; display: inline-block; padding: 6px 4px 6px 10px; white-space: nowrap; font-family: var(--f-display); font-weight: 500; font-size: clamp(36px, 4vw, 58px); line-height: 1.05; letter-spacing: -0.02em; }
.stat__ring { max-width: none; position: absolute; top: -12px; left: -18px; width: calc(100% + 40px); height: calc(100% + 24px); fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; opacity: 0.75; overflow: visible; }
.stat__label { max-width: 22ch; font-size: var(--t-small); line-height: 1.5; color: var(--ink-soft); }
.book-row { display: grid; gap: 44px; align-items: start; }
.book-card { display: grid; gap: 26px; grid-template-columns: 1fr; }
.book-card__img { display: block; max-width: 220px; filter: drop-shadow(0 16px 18px rgba(50, 35, 15, 0.3)); transform: rotate(-3deg); }
.book-card__title { font-size: clamp(26px, 2.4vw, 34px); }
.book-card__parts { margin: 0 0 18px; padding-left: 1.3em; font-size: 16px; color: var(--ink-soft); }
.book-card__parts li { margin-bottom: 4px; }
.note blockquote { margin: 0 0 18px; font-size: 16.5px; line-height: 1.65; }
.note figcaption strong { display: block; font-family: var(--f-display); font-size: 18px; }
.note figcaption span { font-size: 14px; color: var(--ink-soft); }

.notes { display: grid; gap: 40px 28px; }
.polaroids { display: grid; gap: 44px 28px; }
.videos { display: grid; gap: 36px 28px; }
.video__btn { position: relative; display: block; }
.video__btn img { aspect-ratio: 16 / 9; object-fit: cover; }
.video__play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50% 46% 52% 48%; background: var(--ink); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.6); transition: transform 0.2s var(--ease), background 0.2s; }
.video__play::after { content: ""; position: absolute; left: 26px; top: 20px; border: 12px solid transparent; border-left: 18px solid var(--paper-white); border-right: 0; }
.video__btn:hover .video__play { transform: scale(1.08) rotate(-4deg); background: var(--red); }
.video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }

.post-rows { display: grid; }
.post-row { display: grid; grid-template-columns: 96px 1fr; gap: 18px; padding: 24px 0; border-bottom: 1px dashed var(--line); }
.post-row:first-child { padding-top: 0; }
.post-row__thumb { padding: 5px 5px 7px; align-self: start; }
.post-row__thumb img { aspect-ratio: 1; }
.post-row__meta { margin: 0 0 4px; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.post-row__title { font-size: clamp(20px, 1.8vw, 26px); font-weight: 500; line-height: 1.25; margin-bottom: 0.3em; }
.post-row__title a { text-decoration: none; }
.post-row__title a:hover { text-decoration: underline; }
.post-row__text { margin: 0; font-size: 16px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.ticks { list-style: none; padding: 0; margin: 1.6em 0 0; }
.ticks li { position: relative; padding-left: 34px; margin-bottom: 14px; color: var(--ink-soft); }
.ticks li::before { content: "✓"; position: absolute; left: 4px; top: -2px; font-family: var(--f-hand); font-size: 26px; font-weight: 700; color: var(--red); }
.invite__card { padding: 34px 30px 30px; max-width: 420px; justify-self: center; width: 100%; }
.invite__card .hand { margin-bottom: 16px; }
.invite__list { list-style: none; padding: 0; margin: 20px 0 0; }
.invite__list li { padding: 10px 0; border-top: 1px dashed var(--line); }
.invite__list a { font-weight: 600; text-decoration: none; }

/* ==========================================================================
   10. FAQ
   ========================================================================== */
.faq__item { border-bottom: 1px dashed rgba(29, 39, 64, 0.25); }
.faq__item:first-child { border-top: 1px dashed rgba(29, 39, 64, 0.25); }
.faq__q { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; width: 100%; padding: 22px 0; border: 0; background: none; text-align: left; font-family: var(--f-display); font-size: clamp(19px, 1.6vw, 23px); font-weight: 500; line-height: 1.3; color: var(--ink); cursor: pointer; }
.faq__q::after { content: "+"; flex: none; font-family: var(--f-text); font-size: 28px; line-height: 1; color: var(--red); transition: transform 0.2s var(--ease); }
.faq__q[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq__a { padding-bottom: 22px; color: var(--ink-soft); max-width: 64ch; }
.faq__a[hidden] { display: none; }

/* ==========================================================================
   11. Form
   ========================================================================== */
.form { position: relative; display: grid; gap: 18px; padding: 34px 28px 28px; background: var(--paper-white); border-radius: 3px; box-shadow: var(--shadow-note); }
.form__row { display: grid; gap: 18px; }
.form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.form input, .form select, .form textarea { width: 100%; min-height: 50px; padding: 11px 14px; border: 1.5px solid rgba(29, 39, 64, 0.22); border-radius: 12px 4px 12px 6px; background: #fffdf6; }
.form textarea { min-height: 130px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(240, 207, 90, 0.55); }
.form__hp { position: absolute; left: -9999px; }
.form__note { font-size: 14px; color: var(--ink-soft); margin: 0; }
.notice { padding: 14px 18px; border-radius: 10px 4px 10px 6px; }
.notice--ok { background: var(--note-sage); color: #234a30; }
.notice--err { background: var(--note-pink); color: #7a1e14; }

/* ==========================================================================
   12. Trang con
   ========================================================================== */
.page-head { padding-block: clamp(32px, 6vw, 100px) clamp(24px, 3vw, 48px); }
.page-head__grid { display: grid; gap: 44px; align-items: center; }
.page-head__title { font-size: var(--t-h1); letter-spacing: -0.03em; line-height: 1.02; margin-bottom: 0.45em; text-wrap: balance; }
.page-head__title .underlined { white-space: normal; }
.page-head__title--md { font-size: clamp(32px, 4vw, 56px); line-height: 1.1; }
.page-head__lead { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.62; max-width: 60ch; color: var(--ink); text-align: justify; text-align-last: left; }
.page-head__note { max-width: 360px; justify-self: center; width: 100%; }
.breadcrumb { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 18px; }
.breadcrumb a { color: inherit; }
.byline { display: flex; align-items: center; gap: 12px; margin: 1.6em 0 0; font-weight: 600; font-size: 15.5px; color: var(--ink-soft); }
.byline__img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--paper-white); box-shadow: var(--shadow-photo); }
.toc { padding-bottom: 22px; }
.toc ol { margin: 0; padding-left: 1.4em; font-size: 15.5px; line-height: 1.45; }
.toc li { margin-bottom: 6px; }
.toc li::marker { font-family: var(--f-display); color: var(--red); }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.entry { max-width: 70ch; margin-inline: auto; }
.entry p, .entry li { text-align: justify; text-align-last: left; }
.entry td p, .entry th p, .entry figcaption { text-align: left; }
.entry--story { font-size: clamp(18px, 1.25vw, 20px); line-height: 1.8; }
.entry h2 { font-size: clamp(28px, 3vw, 40px); margin-top: 2em; scroll-margin-top: calc(var(--header-h) + 24px); }
.entry h3 { margin-top: 1.6em; }
.entry > :first-child { margin-top: 0; }
.entry img { border-radius: 2px; }
.entry figure { margin: 2em 0; }
.entry figure.photo--polaroid { padding: 10px 10px 12px; }
.entry figure.alignright, .entry figure.alignleft { width: 44%; }
.entry figure img { height: auto; }
.entry .alignright { float: right; margin: 0.4em 0 1em 1.6em; }
.entry .alignleft { float: left; margin: 0.4em 1.6em 1em 0; }
.entry blockquote { position: relative; margin: 1.8em 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--red); font-family: var(--f-display); font-size: clamp(21px, 1.9vw, 27px); line-height: 1.4; }
.entry blockquote p { text-align: left; }
.entry .callout { margin: 2em 0; }
.entry .callout p:last-child { margin-bottom: 0; }
.entry .lead { font-family: var(--f-display); font-size: clamp(21px, 2vw, 27px); line-height: 1.45; text-align: left; }
.entry .ticks li { text-align: left; }
.entry hr { margin: 3em auto; width: 120px; height: 8px; border: 0; background: var(--pen-line) center / 100% 100% no-repeat; }
.entry table { width: 100%; border-collapse: collapse; }
.entry th, .entry td { padding: 10px; border: 1px solid var(--line); }
.entry::after { content: ""; display: table; clear: both; }
.stack { display: grid; gap: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.chip { padding: 8px 14px; border-radius: 12px 4px 12px 6px; background: var(--paper-2); font-size: 15px; text-decoration: none; }
.chip span { color: var(--ink-soft); font-size: 13px; }
.chip.is-active { background: var(--ink); color: var(--paper-white); }
.chip.is-active span { color: var(--paper-3); }
.empty-note { max-width: 520px; }
.contact-card { margin-bottom: 36px; }
.split--invite .form__row { grid-template-columns: 1fr; }
.contact-list { margin: 0; }
.contact-list > div { padding: 10px 0; border-top: 1px dashed var(--line); }
.contact-list dt { font-size: 14px; color: var(--ink-soft); }
.contact-list dd { margin: 0; font-weight: 600; }
.contact-entry { margin: 0; }
.map iframe { aspect-ratio: 16 / 7; height: auto; min-height: 280px; border: 0; }
.art-head { padding-block: clamp(32px, 6vw, 90px) 8px; }
.art-head__meta { font-size: 15px; color: var(--ink-soft); }
.art-head__title { font-size: clamp(34px, 4.6vw, 62px); letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
.art-cover { margin: 0 0 3rem; }
.art-cover img { aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 22%; }
.author-box { display: flex; gap: 20px; align-items: flex-start; margin-top: 4rem; }
.author-box__img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.author-box__name { font-family: var(--f-display); font-weight: 600; font-size: 21px; margin-bottom: 4px; }
.pagination, .nav-links { display: flex; justify-content: center; gap: 8px; margin-top: 2.5rem; }
.page-numbers { padding: 8px 14px; border-radius: 12px 4px 12px 6px; background: var(--paper-2); text-decoration: none; }
.page-numbers.current { background: var(--ink); color: var(--paper-white); }
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(20, 16, 10, 0.88); }
.lightbox img { max-height: 90vh; width: auto; border: 10px solid var(--paper-white); }
.lightbox__close { position: absolute; top: 12px; right: 12px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--paper-white); font-size: 1.6rem; cursor: pointer; }

/* ==========================================================================
   13. Footer
   ========================================================================== */
.site-foot { padding: clamp(64px, 8vw, 120px) 0 100px; background-color: var(--paper-2); background-image: var(--dots); background-size: 26px 26px; }
.site-foot__name { margin: 0; font-family: var(--f-display); font-size: clamp(52px, 10.5vw, 156px); font-weight: 600; line-height: 0.92; letter-spacing: -0.035em; }
.site-foot__role { margin: 18px 0 0; font-weight: 600; color: var(--ink-soft); font-size: clamp(15.5px, 1.2vw, 18px); }
.site-foot__tag { margin: 14px 0 0; max-width: 40ch; font-size: clamp(18px, 1.4vw, 21px); }
.site-foot__grid { display: grid; gap: 32px; margin-top: clamp(48px, 6vw, 90px); }
.site-foot__h { margin-bottom: 12px; font-family: var(--f-text); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ink-soft); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 8px; font-size: 16.5px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot__addr { color: var(--ink-soft); font-size: 15px !important; line-height: 1.5; }
.site-foot__bottom { margin: 56px 0 0; padding-top: 22px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--ink-soft); }

/* ==========================================================================
   14. Nút liên hệ nổi — mobile: thanh đáy; desktop: nút tròn góc phải
   ========================================================================== */
.float-contact { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--paper-white); box-shadow: 0 -6px 18px -10px rgba(60, 45, 15, 0.5); }
.float-contact__btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; font-size: 15px; font-weight: 600; color: var(--paper-white); text-decoration: none; }
.float-contact__btn:hover { color: var(--paper-white); }
.float-contact__btn svg { width: 22px; height: 22px; fill: currentColor; }
.float-contact__phone { background: var(--ink); }
.float-contact__zalo { background: #0068ff; }
.float-contact__mess { background: #a033ff; }

/* ==========================================================================
   15. Responsive
   ========================================================================== */
@media (min-width: 600px) {
	.form__row { grid-template-columns: 1fr 1fr; }
	.notes, .polaroids, .videos { grid-template-columns: repeat(2, 1fr); }
	.post-row { grid-template-columns: 140px 1fr; gap: 26px; }
	.book-card { grid-template-columns: 180px 1fr; align-items: start; }
	.hide-sm { display: inline; }
	.show-sm { display: none; }
	.site-foot__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
	:root { --gutter: 32px; }
	.desk { padding: 34px 20px 0 70px; }
	.book { border-radius: 4px 12px 0 0; box-shadow: 1px 0 0 rgba(90, 70, 40, 0.1), inset 18px 0 22px -20px rgba(90, 70, 40, 0.22), 4px 4px 0 -1px var(--paper-2), 4px 4px 0 0 rgba(90, 70, 40, 0.1), 8px 8px 0 -2px var(--paper-3), 8px 8px 0 -1px rgba(90, 70, 40, 0.09), 0 34px 60px -34px rgba(50, 35, 15, 0.45); }
	.book__rings { top: 14px; bottom: 0; left: -46px; right: auto; width: 72px; height: auto; background: var(--ring-h) 0 0 / 72px 34px repeat-y; }
	.book::before { content: ""; position: absolute; z-index: 1; top: var(--header-h); bottom: 0; left: 40px; width: 1px; background: rgba(181, 55, 42, 0.35); pointer-events: none; }
	.site-head { border-radius: 4px 12px 0 0; }
	.split { grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); }
	.split--story { grid-template-columns: 0.9fr 1.1fr; }
	.split--faq { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
	.split--invite { grid-template-columns: 1.2fr 0.8fr; }
	.split--contact { grid-template-columns: 0.85fr 1.15fr; align-items: start; }
	.lessons { grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3.4vw, 56px); }
	.stats { grid-template-columns: repeat(4, 1fr); }
	.page-head__grid.has-note { grid-template-columns: minmax(0, 1fr) 340px; }
	.stack { padding-top: 20px; }
	.site-foot__grid { grid-template-columns: repeat(3, 1fr); }
	.author-box__img { width: 88px; height: 88px; }
}
@media (min-width: 1024px) {
	.desk { padding: 34px 36px 0 100px; }
	.hero__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); align-items: center; gap: clamp(40px, 6vw, 96px); }
	.hero__photo { order: 0; width: 100%; max-width: 460px; margin: 40px 0 0 auto; }
	.hero__hand { top: -64px; left: -40px; }
	.hero__arrow { top: -18px; left: 34%; width: 96px; }
	.cols-3 { grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3.4vw, 56px); }
	.book-row { grid-template-columns: 1.35fr 1fr 1fr; gap: 36px; }
	.notes { grid-template-columns: repeat(4, 1fr); }
	.notes--3 { grid-template-columns: repeat(3, 1fr); }
	.polaroids, .videos { grid-template-columns: repeat(3, 1fr); }
	.nav-toggle { display: none; }
	.primary-nav { position: static; inset: auto; transform: none; padding: 0; overflow: visible; background: none; }
	.primary-nav > ul, .primary-nav > div > ul { display: flex; gap: 2px; }
	.primary-nav a { padding: 8px 11px; font-family: var(--f-text); font-size: 16px; border: 0; border-radius: 12px 4px 12px 6px; white-space: nowrap; transition: background-color 0.18s; }
	.primary-nav a:hover { background: var(--paper-2); color: var(--ink); }
	.primary-nav .current-menu-item > a, .primary-nav .current_page_item > a, .primary-nav .current_page_parent > a { background: var(--paper-2); text-decoration: none; }
	.header-cta { margin-left: 18px; }
	.float-contact { left: auto; right: 22px; bottom: 22px; grid-auto-flow: row; gap: 12px; background: none; box-shadow: none; }
	.float-contact__btn { width: 54px; height: 54px; min-height: 0; border-radius: 50% 46% 52% 48%; box-shadow: 0 10px 20px -10px rgba(29, 39, 64, 0.7); }
	.float-contact__btn span { display: none; }
	.float-contact__phone { display: none; }
	.site-foot { padding-bottom: 40px; }
}
@media (max-width: 1023px) {
	body { padding-bottom: 56px; }
}
/* ===== Lật trang khi chuyển trang (View Transitions; trình duyệt chưa hỗ trợ thì chuyển trang bình thường) =====
   Lật đúng khung đang nhìn (root); gáy lò xo, đầu trang, nút nổi đứng yên. */
@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }
	.site-head { view-transition-name: dau-trang; }
	.float-contact { view-transition-name: nut-noi; }

	::view-transition-group(gay-so), ::view-transition-new(gay-so) { animation: none; }
	::view-transition-old(gay-so) { display: none; }
	::view-transition-image-pair(root) { perspective: 2400px; }
	::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.7s; animation-timing-function: cubic-bezier(0.45, 0.05, 0.3, 1); animation-fill-mode: both; backface-visibility: hidden; }

	/* Mobile: gáy lò xo ở trên → lật lên như sổ tay */
	::view-transition-old(root) { z-index: 2; transform-origin: 50% 0; animation-name: bg-lat-len; }
	::view-transition-new(root) { z-index: 1; animation-name: bg-hien-duoi; }
	html:active-view-transition-type(lat-lui)::view-transition-old(root) { z-index: 1; animation-name: bg-chim; }
	html:active-view-transition-type(lat-lui)::view-transition-new(root) { z-index: 2; transform-origin: 50% 0; animation-name: bg-lat-xuong; }

	@keyframes bg-lat-len { 0% { transform: rotateX(0); filter: brightness(1); } 100% { transform: rotateX(-100deg); filter: brightness(0.7); } }
	@keyframes bg-lat-xuong { 0% { transform: rotateX(-100deg); filter: brightness(0.7); } 100% { transform: rotateX(0); filter: brightness(1); } }
	@keyframes bg-hien-duoi { 0% { filter: brightness(0.8); } 100% { filter: brightness(1); } }
	@keyframes bg-chim { 0% { filter: brightness(1); } 100% { filter: brightness(0.8); } }

	/* Từ tablet: gáy lò xo bên trái → lật sang trái như lật sách */
	@media (min-width: 768px) {
		.book__rings { view-transition-name: gay-so; }
		::view-transition-old(root) { transform-origin: 0 50%; animation-name: bg-lat-trai; }
		html:active-view-transition-type(lat-lui)::view-transition-new(root) { transform-origin: 0 50%; animation-name: bg-lat-phai; }
		@keyframes bg-lat-trai { 0% { transform: rotateY(0); filter: brightness(1); } 100% { transform: rotateY(-100deg); filter: brightness(0.7); } }
		@keyframes bg-lat-phai { 0% { transform: rotateY(-100deg); filter: brightness(0.7); } 100% { transform: rotateY(0); filter: brightness(1); } }
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
	.desk { padding: 0; }
	.book__rings, .float-contact, .site-head, .nav-toggle { display: none; }
}
