/* PTY Smile — main stylesheet (mobile-first · 390px base · breakpoints 768 / 1024 / 1440) */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font-en);
	font-size: var(--fs-body);
	line-height: var(--lh);
	-webkit-font-smoothing: antialiased;
	padding-bottom: calc(76px + env(safe-area-inset-bottom)); /* room for the mobile contact bar */
}
html[lang^="th"] body { font-family: var(--font-th); line-height: calc(var(--lh) + .1); }
html[lang^="th"] :is(h1, h2, h3) { font-family: var(--font-th-head); }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--brand-700); }
a:hover { color: var(--brand-800); }
:focus-visible { outline: 3px solid var(--brand-600); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.2; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 600; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
html[lang^="th"] :is(h1, h2) { font-weight: 600; line-height: 1.35; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
.icon { flex: none; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; padding: 10px 16px; background: var(--brand-700); color: var(--white); border-radius: var(--r-pill); text-decoration: none; }
.skip-link:focus { top: 8px; color: var(--white); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

.eyebrow { margin: 0 0 8px; color: var(--brand-600); font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
/* Optional short gold rule before eyebrows (site token --eyebrow-rule; 0 = none) */
.eyebrow::before { content: ""; display: inline-block; width: var(--eyebrow-rule, 0px); height: 2px; margin-right: calc(var(--eyebrow-rule, 0px) * .42); vertical-align: middle; background: var(--gold-500, var(--brand-600)); transform: translateY(-2px); }
.eyebrow--plain::before { display: none; }
/* Tagline (serif italic EN · Prompt TH) — hero, CTA, footer only */
.tagline { margin: 0; font-family: var(--font-serif, inherit); font-style: italic; font-weight: 600; line-height: 1.3; color: var(--gold-700, var(--brand-700)); }
html[lang^="th"] .tagline { font-family: var(--font-th-head); font-style: normal; font-weight: 500; }
html[lang^="th"] .tagline--quote::before { content: "“"; }
html[lang^="th"] .tagline--quote::after { content: "”"; }
html[lang^="th"] .eyebrow { letter-spacing: 0; text-transform: none; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px;
	border: 1px solid transparent; border-radius: var(--r-pill);
	font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
	transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--brand-700); color: var(--white); }
.btn--primary:hover { background: var(--brand-800); color: var(--white); }
.btn--outline { background: var(--white); border-color: var(--line-strong); color: var(--brand-700); }
.btn--outline:hover { border-color: var(--brand-700); color: var(--brand-800); }
.btn--line { background: var(--line-app); color: var(--on-chat); }
.btn--line:hover { background: #05b34c; color: var(--on-chat); }
.btn--whatsapp { background: var(--whatsapp); color: var(--on-chat); }
.btn--block { display: flex; width: 100%; }

/* ---------- Utility bar (desktop) ---------- */
.utility-bar { display: none; background: var(--surface-dark); color: var(--on-dark); font-size: 14px; }
.utility-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 8px; }
.utility-bar__addr { display: flex; align-items: center; gap: 8px; }
.utility-bar__addr .icon { color: var(--line-strong); }
.utility-bar__links { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.utility-bar a { color: var(--white); text-decoration: none; }
.utility-bar a:hover { text-decoration: underline; color: var(--white); }
.utility-bar a.utility-bar__map { margin-left: 4px; padding: 2px 10px; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--r-pill); font-weight: 600; }
.utility-bar a.utility-bar__map:hover { border-color: var(--white); background: rgba(255, 255, 255, .1); text-decoration: none; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 1000; background: var(--white); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__logo { width: 46px; height: 35px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-size: 16px; font-weight: 600; color: var(--brand-name, var(--ink)); }
.brand__sub { font-size: 11px; color: var(--ink-muted); letter-spacing: .04em; }
html[lang^="th"] .brand__name { font-family: var(--font-th-head); }
html[lang^="th"] .brand__sub { order: var(--brand-sub-order-th, -1); letter-spacing: 0; } /* PS reads "คลินิกทันตกรรม" above the name; HS now matches (TH only) */
.site-header__actions { display: flex; align-items: center; gap: 6px; }
.lang-pill {
	display: flex; align-items: center; justify-content: center;
	min-width: var(--tap); height: var(--tap); padding: 0 10px;
	border: 1px solid var(--line-pill); border-radius: var(--r-pill);
	color: var(--brand-700); font-size: 13px; font-weight: 600; text-decoration: none;
}
.lang-pill:hover { border-color: var(--brand-700); }
.site-header__book { display: none; }
.menu-btn {
	display: flex; align-items: center; justify-content: center;
	width: var(--tap); height: var(--tap); border: 0; border-radius: var(--r-pill);
	background: var(--brand-50); color: var(--ink);
}
.menu-btn[aria-expanded="true"] { background: var(--brand-100); }
.main-nav { display: none; }

/* Mobile drawer */
.drawer { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 64px); overflow-y: auto; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(19, 41, 75, .12); padding: 8px var(--gutter) 24px; }
.drawer[hidden] { display: none; }
.drawer__link { display: flex; align-items: center; min-height: 48px; color: var(--ink); font-size: 17px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.drawer__link.is-current, .drawer__link:hover { color: var(--brand-700); }
.drawer__sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 4px 0 8px 12px; border-bottom: 1px solid var(--line); }
.drawer__sub a { display: flex; align-items: center; min-height: 44px; color: var(--ink-muted); font-size: 15px; text-decoration: none; }
.drawer__sub a[aria-current], .drawer__sub a:hover { color: var(--brand-700); }
.drawer__contact { display: grid; gap: 10px; margin-top: 20px; }
.drawer__meta { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; color: var(--ink-muted); font-size: 14px; }
body.drawer-open { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-dark); color: var(--on-dark); font-size: 14px; }
.site-footer__grid { display: grid; gap: 20px; padding-top: 32px; }
.site-footer__brand { display: flex; align-items: center; gap: 10px; }
.site-footer__logo { display: flex; flex: none; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: var(--white); }
.site-footer__logo img { width: 42px; height: 32px; object-fit: contain; }
.site-footer__about .site-footer__tagline { margin-top: 12px; color: var(--gold-300, var(--on-dark)); font-size: 17px; }
.site-footer__addr { color: var(--on-dark); }
.site-footer__name { color: var(--white); font-size: 17px; font-weight: 600; }
.site-footer__name-line { display: block; }
.site-footer__about p { margin: 14px 0 0; color: var(--on-dark-muted); }
.site-footer h2 { margin: 0 0 6px; color: var(--white); font-size: 15px; font-weight: 600; font-family: inherit; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer__col ul { display: flex; flex-direction: column; gap: 8px; }
/* Mobile: clinic links as a 2-column grid, no headings, services column folded away */
.site-footer__col:not(.site-footer__contact) h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.site-footer__col:first-of-type ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.site-footer__col:first-of-type a { display: flex; align-items: center; min-height: 40px; color: var(--white); }
.site-footer__services { display: none; }
.site-footer__contact { padding-top: 20px; border-top: 1px solid #24405F; }
.site-footer__contact h2 { display: none; }
.site-footer__contact ul { gap: 6px; }
.site-footer__contact a { color: var(--white); }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { display: flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: var(--r-pill); background: var(--surface-dark-2); color: var(--white); font-size: 13px; font-weight: 600; }
.social a:hover { background: var(--brand-700); text-decoration: none; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; padding-bottom: 32px; color: var(--on-dark-faint); font-size: 12px; }
.site-footer__langs a { color: var(--on-dark); text-decoration: underline; }

/* ---------- Mobile sticky contact bar ---------- */
.contact-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001;
	display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px;
	padding: 8px 10px calc(12px + env(safe-area-inset-bottom));
	background: var(--white); border-top: 1px solid var(--line); box-shadow: var(--shadow-bar);
}
.contact-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 14px; color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; }
.contact-bar a:hover { background: var(--brand-50); color: var(--ink); }
.contact-bar a.contact-bar__book { background: var(--brand-700); color: var(--white); }
.contact-bar a.contact-bar__book:hover { background: var(--brand-800); color: var(--white); }

/* ---------- Default page (legacy content until each page gets its template) ---------- */
.page-default__inner { padding-block: var(--section-y); }
.page-default__title { margin-bottom: 24px; }
.entry-content img { height: auto; }
.entry-content > :last-child { margin-bottom: 0; }

/* ---------- ≥768px ---------- */
@media (min-width: 768px) {
	.utility-bar { display: block; }
	.site-header__book { display: inline-flex; min-height: 46px; }
	.site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
}

/* ---------- ≥1024px (desktop header, no contact bar) ---------- */
@media (min-width: 1024px) {
	body { padding-bottom: 0; }
	.contact-bar { display: none; }
	.site-header__inner { gap: 16px; padding-block: 14px; }
	.brand { gap: 12px; }
	.brand__logo { width: 60px; height: 46px; }
	.brand__name { font-size: 20px; }
	.brand__sub { font-size: 12px; letter-spacing: .05em; }
	.site-header__actions { gap: 10px; }

	.main-nav__list { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 500; }
	.main-nav__item { position: relative; display: flex; align-items: center; }
	.main-nav__link { display: block; padding: 10px var(--nav-pad-x, 12px); color: var(--ink); text-decoration: none; white-space: nowrap; }
	.main-nav__link:hover, .main-nav__link.is-current { color: var(--brand-700); }
	.main-nav__link.is-current { font-weight: 600; }
	/* TH: shorter words + Noto Sans Thai reads smaller → bigger type and wider spacing so the menu fills about the same width as EN */
	html[lang^="th"] .main-nav__list { font-size: 16px; }
	html[lang^="th"] .main-nav__link { padding-inline: 18px; }
	html[lang^="th"] .has-sub .main-nav__link { padding-right: 2px; }
	.has-sub .main-nav__link { padding-right: 2px; }
	.main-nav__toggle { display: flex; align-items: center; justify-content: center; width: 24px; height: 40px; padding: 0; border: 0; background: none; color: var(--ink); }
	.main-nav__toggle .icon { transition: transform .15s; }
	.main-nav__sub {
		position: absolute; left: 0; top: 100%; min-width: 250px; padding: 8px;
		background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-card);
		opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
	}
	.has-sub:hover .main-nav__sub, .has-sub:focus-within .main-nav__sub, .has-sub.is-open .main-nav__sub { opacity: 1; visibility: visible; transform: none; }
	.has-sub:hover .main-nav__toggle .icon, .has-sub.is-open .main-nav__toggle .icon { transform: rotate(180deg); }
	.main-nav__sub a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--ink); font-size: 15px; text-decoration: none; }
	.main-nav__sub a:hover, .main-nav__sub a[aria-current] { background: var(--brand-50); color: var(--brand-700); }
	.main-nav__sub a.is-all { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; color: var(--brand-700); font-weight: 600; }

	.drawer { top: 100%; }

	.site-footer { font-size: 15px; }
	.site-footer__grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 40px; padding-top: 64px; padding-bottom: 32px; }
	.site-footer__name { font-size: 18px; }
	.site-footer__logo { width: 60px; height: 60px; border-radius: 16px; }
	.site-footer__logo img { width: 50px; height: 38px; }
	.site-footer__about .site-footer__tagline { margin-top: 14px; font-size: 20px; }
	.site-footer__col:not(.site-footer__contact) h2, .site-footer__contact h2 { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: block; }
	.site-footer__col:first-of-type ul { display: flex; gap: 8px; }
	.site-footer__col:first-of-type a { display: inline; min-height: 0; color: var(--on-dark); }
	.site-footer__col .only-mobile { display: none; }
	.site-footer__services { display: block; }
	.site-footer__contact { padding-top: 0; border-top: 0; }
	.site-footer__contact a { color: var(--on-dark); }
	.site-footer__bottom { padding-top: 20px; border-top: 1px solid #24405F; font-size: 13px; }
}

/* ---------- Shared section building blocks (Home + later templates) ---------- */
.section { padding-block: var(--section-y); }
.section--tint { background: var(--brand-50); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.muted { color: var(--ink-muted); }
.small { font-size: 13px; }
.section .small { margin: 14px 0 0; }
.tag { padding: 2px 10px; border-radius: var(--r-pill); background: var(--brand-100); color: var(--brand-800); font-size: 12px; font-weight: 600; }
.quote-box { margin: 0; padding: 18px 20px; background: var(--brand-50); border-radius: var(--r-card); }
.quote-box blockquote { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.4; }
.quote-box figcaption { margin-top: 6px; color: var(--ink-muted); font-size: 13px; }
.nw { white-space: nowrap; }
.br-desk { display: none; }
.only-desk, .only-desk-flex { display: none !important; }
.btn--lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn--sm { min-height: 46px; padding: 0 20px; font-size: 15px; }
.btn--shadow { box-shadow: 0 10px 24px rgba(0, 89, 158, .25); }
.btn--ink { color: var(--ink); border-width: 1.5px; }
.btn--ink:hover { color: var(--ink); }
.btn--white { background: var(--white); color: var(--ink); }
.btn--white:hover { background: var(--brand-50); color: var(--ink); }
.btn--ghost-light { border: 1.5px solid var(--line-strong); background: transparent; color: var(--white); }
.btn--ghost-light:hover { border-color: var(--white); color: var(--white); }

/* Lite YouTube embed (thumbnail + play → iframe on click) */
.lite-yt { position: relative; display: block; overflow: hidden; border-radius: var(--r-card); box-shadow: 0 18px 40px rgba(0, 89, 158, .18); background: var(--surface-dark); aspect-ratio: 16 / 9; }
.lite-yt__thumb { width: 100%; height: 100%; object-fit: cover; }
.lite-yt__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(11, 37, 69, .15); }
.lite-yt__play > span { display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: var(--r-pill); background: var(--brand-700); color: var(--white); box-shadow: 0 0 0 10px rgba(255, 255, 255, .55); transition: transform .15s; }
.lite-yt:hover .lite-yt__play > span { transform: scale(1.06); }
.lite-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (min-width: 1024px) {
	.only-mob { display: none !important; }
	.only-desk { display: inline !important; }
	.only-desk-flex { display: flex !important; }
	.br-desk { display: inline; }
	.nw-desk { white-space: nowrap; }
	.nw-desk wbr { display: none; } /* Chrome still breaks at <wbr> inside nowrap */
	.link-arrow { font-size: inherit; }
	.section .small { font-size: 13px; }
	.btn--lg { min-height: 54px; padding: 0 26px; }
	.quote-box { padding: 20px 24px; }
	.quote-box blockquote { font-size: 21px; }
	.quote-box figcaption { font-size: 14px; }
	.lite-yt { border-radius: 28px; }
	.lite-yt__play > span { width: 92px; height: 92px; }
	.tag { padding: 3px 12px; font-size: 13px; }
}

/* ---------- ≥1200px: full nav (7 items + dropdown) fits; below that the drawer is used ---------- */
@media (min-width: 1200px) {
	.menu-btn, .drawer { display: none !important; }
	.main-nav { display: block; }
}

/* ---------- Book + visit ---------- */
.book-visit { padding-top: 0; }
.book-visit__grid { display: grid; gap: 40px; }
.book-card { padding: 24px 20px; background: var(--brand-700); color: var(--white); border-radius: 24px; }
.book-card h2 { color: var(--white); font-size: 23px; line-height: 1.3; }
.book-card p { margin: 10px 0 0; color: #E3F0FC; font-size: 15px; }
.book-card__ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.visit-card__img { width: 100%; height: 190px; margin-top: 16px; object-fit: cover; border-radius: 20px; }
.visit-card__body { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; font-size: 15px; }
.visit-card__line { display: flex; gap: 10px; margin: 0; }
.visit-card__line .icon { flex: none; margin-top: 2px; color: var(--brand-600); }
.visit-card__dir { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin-top: 4px; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); color: var(--ink); font-weight: 600; text-decoration: none; }
.visit-card__dir .icon { display: none; }

@media (min-width: 1024px) {
	.book-visit { padding-top: var(--section-y); }
	.book-visit__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.book-card { display: flex; flex-direction: column; justify-content: center; padding: 40px; border-radius: 28px; }
	.book-card h2 { font-size: 32px; line-height: 1.25; }
	.book-card p { margin-top: 12px; font-size: inherit; }
	.book-card__ctas { flex-direction: row; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
	.visit-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; }
	.visit-card__img { order: -1; height: auto; aspect-ratio: 1140 / 623; margin: 0; border-radius: 0; }
	.visit-card__title { order: 0; padding: 24px 28px 0; font-size: 22px; }
	.visit-card__body { gap: 10px; margin: 0; padding: 10px 28px 28px; }
	.visit-card__line .icon { display: none; }
	.visit-card__dir { justify-content: flex-start; min-height: 0; margin: 0; border: 0; color: var(--brand-700); }
	.visit-card__dir .icon { display: inline; }
}

/* ---------- Book card tagline + framed visit photo (Hollywood Smile) ---------- */
.book-card__tagline { margin: 0 0 10px; color: var(--white); font-size: 20px; }
@media (min-width: 1024px) {
	.book-card__tagline { font-size: 26px; }
	.visit-card__img { width: auto; margin: 28px 28px 0; border-radius: 20px; aspect-ratio: 16 / 7; }
	.visit-card__title { padding-top: 24px; }
	.visit-card__dir { align-self: flex-start; min-height: 48px; margin-top: 6px; padding: 0 22px; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); color: var(--ink); }
	.visit-card__dir .icon { display: none; }
	.visit-card__line .icon { display: inline; }
}
