/*
Theme Name:  Suan Luang Canal
Description: Child theme of Twenty Twenty-Five for suanluangprawet.com — "Canal Line: Formal Edition". Deep navy, gilded-waterline gold, Noto Serif Thai + Sarabun. Same CSS classes as v1: existing pages re-skin automatically.
Author:      Jakravee Visutipol
Template:    twentytwentyfive
Version:     2.0.0
Requires at least: 6.7
Text Domain: suanluang-canal
*/

/* ============================================================
   1. THE CANAL LINE — the signature element
   Add the CSS class  canal-line  to any Separator block
   (select the block → Settings sidebar → Advanced →
   Additional CSS class(es) → type: canal-line)
   ============================================================ */

hr.canal-line {
	border: none;
	background: var(--wp--preset--color--lotus);
	height: 2px;
	width: 72px;
	margin-left: 0;           /* sits flush left under a heading */
	margin-top: 0.75rem;
	margin-bottom: 2rem;
	opacity: 1;
}

/* Centered variant, e.g. under a centered heading:
   use both classes: canal-line canal-line-center */
hr.canal-line-center {
	margin-left: auto;
	margin-right: auto;
}

/* Full-width faint "waterline" for the hero:
   class: canal-line canal-line-hero */
hr.canal-line-hero {
	width: 100%;
	height: 1px;
	opacity: 0.25;
}

/* ============================================================
   2. EYEBROW LABELS (small text above headings)
   Add class  eyebrow  to a Paragraph block
   ============================================================ */

p.eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--lotus);
	margin-bottom: 0.5rem;
}

/* Teal variant: classes  eyebrow eyebrow-canal  */
p.eyebrow-canal {
	color: var(--wp--preset--color--canal);
}

/* Thai text should never be forced uppercase —
   if an eyebrow contains Thai, add class  eyebrow-thai  too */
p.eyebrow-thai {
	text-transform: none;
	letter-spacing: 0.02em;
}

/* ============================================================
   3. CARDS ("What I do" + article cards)
   Add class  canal-card  to a Group or Column block
   ============================================================ */

.canal-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--mist);
	border-radius: 8px;
	padding: 2rem !important;
	box-shadow: 0 1px 2px rgba(28, 34, 38, 0.08);
	transition: border-color 200ms ease;
	height: 100%;
}

.canal-card:hover {
	border-color: var(--wp--preset--color--canal);
}

.canal-card h3 {
	margin-top: 0;
	font-size: 1.2rem;
}

/* ============================================================
   4. SECONDARY (paired) THAI TEXT
   Add class  thai-pair  to the Thai paragraph that sits
   directly under its English twin
   ============================================================ */

p.thai-pair {
	font-size: 0.95em;
	color: var(--wp--preset--color--ink);
	opacity: 0.8;
	line-height: 1.85;
	margin-top: 0.35rem;
}

/* Thai script needs breathing room everywhere */
:lang(th),
.thai-pair {
	line-height: 1.85;
}

/* ============================================================
   5. TIMELINE (About page)
   Wrap the timeline rows in a Group block with class  canal-timeline
   Each row = a Paragraph starting with the year in <strong>
   ============================================================ */

.canal-timeline {
	border-left: 2px solid var(--wp--preset--color--lotus);
	padding-left: 1.5rem;
}

.canal-timeline p {
	margin-bottom: 1.25rem;
	position: relative;
}

.canal-timeline p strong:first-child {
	display: block;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--canal);
	margin-bottom: 0.15rem;
}

/* ============================================================
   6. AUTHOR BOX (bottom of every article)
   Group block with class  author-box
   ============================================================ */

.author-box {
	background: var(--wp--preset--color--mist);
	border-radius: 8px;
	padding: 1.5rem 2rem !important;
	margin-top: 3rem;
}

.author-box p {
	margin: 0;
	font-size: 0.95rem;
}

/* ============================================================
   7. FOOTER — deep canal
   Add class  canal-footer  to the footer Group block
   ============================================================ */

.canal-footer {
	background: var(--wp--preset--color--canal-deep) !important;
	color: var(--wp--preset--color--white);
}

.canal-footer a {
	color: var(--wp--preset--color--white);
}

.canal-footer a:hover {
	color: var(--wp--preset--color--gold-light);
}

.canal-footer p {
	color: var(--wp--preset--color--white);
	opacity: 0.9;
}

/* ============================================================
   8. GENTLE FADE-UP ON SCROLL — the one allowed motion
   Add class  fade-up  to any Group/section block.
   (Sections appear instantly if the visitor prefers
   reduced motion, or if JavaScript is unavailable.)
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
	.fade-up {
		opacity: 0;
		transform: translateY(12px);
		transition: opacity 300ms ease, transform 300ms ease;
	}

	.fade-up.is-visible {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Safety net: if the small script doesn't run, never hide content */
html.no-js .fade-up {
	opacity: 1;
	transform: none;
}

/* ============================================================
   9. ACCESSIBILITY & POLISH
   ============================================================ */

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
.wp-element-button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--canal);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Keep body prose at a readable measure */
.entry-content > p,
.entry-content > ul,
.entry-content > ol {
	max-width: 68ch;
}

/* Images: soft corners, captions in utility style */
.wp-block-image img {
	border-radius: 8px;
}

.wp-block-image figcaption {
	text-align: left;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--slate);
	margin-top: 0.6rem;
}

/* FAQ (core Details block): lotus marker, tidy spacing */
details.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--mist);
	padding: 1rem 0;
}

details.wp-block-details summary {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 500;
	cursor: pointer;
}

details.wp-block-details summary::marker {
	color: var(--wp--preset--color--lotus);
}

/* No gradients, no heavy shadows — if a plugin injects them, calm them */
.wp-block-button__link {
	box-shadow: none;
}


/* ============================================================
   v2 COMPONENTS — Formal Edition
   ============================================================ */

/* STAT BAND — Group block, class: stat-band
   Inside: a Columns block; each column = big number Paragraph
   (class stat-number) + label Paragraph (class stat-label)   */
.stat-band {
	background: var(--wp--preset--color--mist);
	padding: 3rem 1.5rem !important;
}
.stat-band p.stat-number {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 2.5rem;
	color: var(--wp--preset--color--ink);
	margin: 0;
	line-height: 1.1;
}
.stat-band p.stat-label {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
	margin-top: 0.35rem;
}

/* PULL QUOTE — Paragraph or Quote block, class: pull-quote */
.pull-quote,
blockquote.pull-quote p {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.4rem;
	line-height: 1.5;
	color: var(--wp--preset--color--ink);
}
.pull-quote {
	border-left: 2px solid var(--wp--preset--color--lotus);
	padding-left: 1.5rem;
	margin: 2.5rem 0;
}
.pull-quote cite {
	display: block;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.875rem;
	font-style: normal;
	color: var(--wp--preset--color--slate);
	margin-top: 0.75rem;
}

/* TESTIMONIAL — Group block, class: testimonial-card
   Inside: Quote text + attribution paragraph (class: attribution) */
.testimonial-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--mist);
	border-radius: 8px;
	padding: 2rem !important;
	box-shadow: 0 1px 3px rgba(11, 37, 69, 0.08);
	height: 100%;
}
.testimonial-card p.attribution {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--slate);
	margin-top: 1rem;
}

/* CATEGORY CHIP — Paragraph, class: chip (or auto on post terms) */
.chip,
.article-card .wp-block-post-terms a {
	display: inline-block;
	background: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--ink);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	text-decoration: none;
}

/* ARTICLE CARD — apply class article-card to the Query Loop's
   Post Template block; each post becomes a card */
.article-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--mist);
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 200ms ease;
	height: 100%;
}
.article-card:hover {
	border-color: var(--wp--preset--color--canal);
}
.article-card .wp-block-post-featured-image img {
	border-radius: 0;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.article-card .wp-block-post-title {
	font-size: 1.2rem;
	padding: 0 1.5rem;
}
.article-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}
.article-card .wp-block-post-excerpt,
.article-card .wp-block-post-date,
.article-card .wp-block-post-terms {
	padding: 0 1.5rem;
	font-size: 0.9rem;
	color: var(--wp--preset--color--slate);
}
.article-card > *:last-child {
	padding-bottom: 1.5rem;
}

/* PRESS-KIT DOWNLOAD CARD — Group, class: press-card */
.press-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--mist);
	border-radius: 8px;
	padding: 1.5rem !important;
	height: 100%;
}
.press-card p.file-meta {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
	margin-bottom: 0.5rem;
}

/* LOGO ROW — Group (row layout), class: logo-row */
.logo-row img {
	height: 32px;
	width: auto;
	filter: grayscale(1);
	opacity: 0.6;
	transition: opacity 200ms ease, filter 200ms ease;
}
.logo-row img:hover {
	filter: grayscale(0);
	opacity: 1;
}

/* READING TIME — printed by functions.php before post content */
.reading-time {
	font-size: 0.875rem;
	color: var(--wp--preset--color--slate);
	margin-bottom: 1.5rem;
}

/* Sticky header polish for the nav (Header template part) */
.is-position-sticky {
	background: var(--wp--preset--color--paper);
	border-bottom: 1px solid var(--wp--preset--color--mist);
}
