/*
 * AIPro 2026 design system — tokens, base, global components.
 * Source: Figma "AIPro.co.th — Redesign Concept" + DESIGN_HANDOFF.md section 3–4.
 * Templates use these variables; do not hard-code colours elsewhere.
 */

/* ---------- Fonts (self-hosted Inter, variable 400–800) ---------- */
@font-face {
	/* Noto Sans Thai, SIL Open Font License 1.1 (assets/fonts/OFL-noto-sans-thai.txt). Downloaded only for Thai text. */
	font-family: "Noto Sans Thai";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/noto-sans-thai.woff2") format("woff2");
	unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/inter-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/inter-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
	/* Colors (Figma variable collection "AIPro Tokens") */
	--color-brand-blue: #087FF5;
	--color-brand-navy: #071E3B;
	--color-deep-blue: #0B3B73;
	--color-text-primary: #0A1F3D;
	--color-text-secondary: #5D6B7C;
	--color-soft-blue: #F1F7FE;
	--color-border: #DCE5EF;
	--color-white: #FFFFFF;
	--color-success: #12B76A;
	/* Derived states */
	--color-brand-blue-hover: #0670DB;
	--color-muted-grey: #8A96A6;
	--color-error: #C0362C;
	--color-error-soft: #FDF0EF;
	--color-success-soft: #E9F8F0;
	--color-on-dark-muted: rgba(255, 255, 255, .82);
	--color-on-dark-line: rgba(255, 255, 255, .12);

	/* Gradients */
	--gradient-brand-panel: linear-gradient(135deg, #087FF5 0%, #0B3B73 100%);
	--gradient-page-hero: linear-gradient(135deg, #FFFFFF 0%, #F1F7FE 60%, #E3EFFD 100%);
	--gradient-logo: linear-gradient(90deg, #00C2FF 0%, #1593F0 28%, #2563EB 50%, #1E3A8A 72%, #0B1B33 86%, #0B1B33 100%);
	--gradient-card-visual: linear-gradient(155deg, #F1F7FE 0%, #D1E5FC 71%);

	/* Typography */
	--font-sans: "Inter", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
	/* Thai phase: add a Thai font after Inter, e.g. "Noto Sans Thai" or "IBM Plex Sans Thai" */

	/* Layout */
	--container: 1200px;
	--gutter: 120px;
	--page-gutter: 48px;
	--section-y: 104px;
	--gap-card: 24px;
	--utility-h: 38px;

	/* Radius */
	--radius-button: 8px;
	--radius-input: 8px;
	--radius-card: 16px;
	--radius-panel: 20px;
	--radius-pill: 999px;

	/* Shadow (use sparingly) */
	--shadow-card: 0 24px 48px rgba(7, 30, 59, 0.08);
	--shadow-dropdown: 0 20px 44px rgba(7, 30, 59, 0.12);

	/* Focus */
	--focus-ring: 0 0 0 3px rgba(8, 127, 245, .35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--color-white);
	color: var(--color-text-primary);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
h1, h2, h3, h4 { color: var(--color-brand-navy); }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--color-brand-blue); outline-offset: 3px; border-radius: 4px; }
.icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }

.aipro-container { width: min(100% - 2 * var(--page-gutter), var(--container)); margin-inline: auto; }
.content-narrow { max-width: 840px; }
.entry-content { padding-top: 44px; padding-bottom: 90px; font-size: 18px; line-height: 1.7; }
.entry-content > * { max-width: 100%; }
.entry-content a { color: var(--color-brand-blue); text-decoration: underline; }
@media (max-width: 767px) { .entry-content { font-size: 16px; } }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { clip: auto; width: auto; height: auto; margin: 10px; padding: 10px 14px; background: var(--color-white); color: var(--color-text-primary); z-index: 9999; border-radius: var(--radius-button); }

/* ---------- Type helpers ---------- */
.eyebrow-label { margin: 0 0 14px; color: var(--color-brand-blue); font-size: 12px; font-weight: 700; letter-spacing: 1.6px; line-height: 1.4; text-transform: uppercase; }
.eyebrow-pill { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-white); color: var(--color-brand-blue); font-size: 11px; font-weight: 700; letter-spacing: 1.4px; line-height: 1.3; text-transform: uppercase; }
.section-title { margin: 0; font-size: 40px; font-weight: 700; line-height: 48px; letter-spacing: -.8px; }
.section-lead { margin: 16px 0 0; max-width: 720px; color: var(--color-text-secondary); font-size: 17px; line-height: 28px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--color-brand-blue); font-size: 14px; font-weight: 600; }
.text-link:hover { color: var(--color-brand-blue-hover); }

/* ---------- Buttons ---------- */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 22px;
	border: 1px solid transparent;
	border-radius: var(--radius-button);
	font-size: 15px;
	font-weight: 600;
	line-height: 18px;
	white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button-arrow { font-size: 16px; line-height: 1; transition: transform .15s ease; }
.button:hover .button-arrow { transform: translateX(2px); }
.button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.button-primary { background: var(--color-brand-blue); color: var(--color-white); }
.button-primary:hover { background: var(--color-brand-blue-hover); }
.button-secondary, .button-outline { background: var(--color-white); border-color: var(--color-border); color: var(--color-text-primary); }
.button-secondary:hover, .button-outline:hover { border-color: var(--color-brand-blue); color: var(--color-brand-blue); }
.button-on-dark, .button-light { background: var(--color-white); color: var(--color-brand-navy); }
.button-on-dark:hover, .button-light:hover { background: var(--color-soft-blue); }
.button-block { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: calc(-1 * var(--utility-h)); z-index: 1000; background: var(--color-white); }
.admin-bar .site-header { top: calc(32px - var(--utility-h)); }
.utility-bar { height: var(--utility-h); background: var(--color-brand-navy); color: var(--color-on-dark-muted); font-size: 13px; line-height: 16px; }
.utility-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.utility-text { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.utility-contacts { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; font-weight: 500; white-space: nowrap; }
.utility-contacts a:hover { color: var(--color-white); }

.main-header { border-bottom: 1px solid var(--color-border); background: var(--color-white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 82px; padding-block: 18px; }
.site-logo { display: inline-flex; flex-shrink: 0; }
.site-logo-img { width: 87px; height: 25px; }

.site-navigation { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 40px; margin: 0; padding: 0; list-style: none; }
.nav-item { position: relative; }
.nav-item > a, .nav-dropdown-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 0;
	border: 0;
	background: none;
	color: var(--color-text-primary);
	font-size: 15px;
	font-weight: 600;
	line-height: 18px;
}
.nav-item > a:hover, .nav-dropdown-toggle:hover, .nav-item.is-current > a, .nav-item.is-current > .nav-dropdown-toggle, .has-dropdown.is-open > .nav-dropdown-toggle { color: var(--color-brand-blue); }
.nav-dropdown-toggle .icon { transition: transform .15s ease; }
.has-dropdown.is-open .nav-dropdown-toggle .icon { transform: rotate(180deg); }

.nav-dropdown {
	position: absolute;
	top: calc(100% + 22px);
	left: -40px;
	z-index: 20;
	width: 620px;
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-card);
	background: var(--color-white);
	box-shadow: var(--shadow-dropdown);
	visibility: hidden;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.nav-dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; }
@media (hover: hover) and (min-width: 961px) {
	.has-dropdown:hover .nav-dropdown { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
}
.has-dropdown.is-open .nav-dropdown { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.nav-dropdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 16px; list-style: none; }
.nav-dropdown-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px; border-radius: 12px; }
.nav-dropdown-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: var(--color-soft-blue); color: var(--color-brand-blue); }
.nav-dropdown-text { display: flex; flex-direction: column; gap: 4px; }
.nav-dropdown-title { color: var(--color-brand-navy); font-size: 15px; font-weight: 700; line-height: 18px; }
.nav-dropdown-desc { color: var(--color-text-secondary); font-size: 13px; line-height: 19px; }
.nav-dropdown-item:hover, .nav-dropdown-item:focus-visible { background: var(--color-soft-blue); }
.nav-dropdown-item:hover .nav-dropdown-icon, .nav-dropdown-item:focus-visible .nav-dropdown-icon { background: var(--color-white); }
.nav-dropdown-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 30px; background: var(--color-soft-blue); font-size: 13px; line-height: 16px; }
.nav-dropdown-footer p { margin: 0; color: var(--color-text-secondary); }
.nav-dropdown-footer a { color: var(--color-brand-blue); font-weight: 600; white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.lang-switch { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-button); font-size: 13px; line-height: 16px; }
.lang-option { color: var(--color-text-secondary); font-weight: 600; }
.lang-option.is-current { color: var(--color-brand-blue); font-weight: 700; }
.lang-option.is-disabled { cursor: not-allowed; }
a.lang-option:hover { color: var(--color-brand-blue); }
.lang-sep { color: var(--color-border); }

.menu-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; }
.menu-toggle-bars { position: relative; display: block; width: 22px; height: 16px; }
.menu-toggle-bars span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--color-brand-navy); transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.menu-toggle-bars span:nth-child(1) { top: 0; }
.menu-toggle-bars span:nth-child(2) { top: 7px; }
.menu-toggle-bars span:nth-child(3) { top: 14px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(1) { top: 7px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars span:nth-child(3) { top: 7px; transform: rotate(-45deg); }
.mobile-nav-footer { display: none; }

/* ---------- Page hero ---------- */
.page-hero {
	padding: 72px 0 80px;
	border-bottom: 1px solid var(--color-border);
	background: var(--gradient-page-hero);
}
.page-hero.has-banner {
	background:
		linear-gradient(90deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .85) 50%, rgba(255, 255, 255, .25) 72%, rgba(255, 255, 255, 0) 100%),
		var(--hero-image) center right / cover no-repeat,
		var(--gradient-page-hero);
}
.page-hero--detail.has-banner {
	background:
		linear-gradient(90deg, rgba(255, 255, 255, .97) 0%, rgba(255, 255, 255, .90) 50%, rgba(255, 255, 255, .50) 72%, rgba(255, 255, 255, .25) 100%),
		var(--hero-image) center right / cover no-repeat,
		var(--gradient-page-hero);
}
.page-hero-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.page-hero h1 { max-width: 900px; margin: 0; font-size: 56px; font-weight: 800; line-height: 64px; letter-spacing: -1.2px; }
.page-hero-subtitle { max-width: 720px; margin: 0; color: var(--color-text-secondary); font-size: 19px; line-height: 30px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; color: var(--color-text-secondary); font-size: 14px; font-weight: 500; line-height: 17px; }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; }
.breadcrumbs a:hover { color: var(--color-brand-blue); }
.breadcrumbs [aria-current] { color: var(--color-text-secondary); }

/* ---------- Pills, tags, filters ---------- */
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--color-white); color: var(--color-brand-blue); font-size: 12px; font-weight: 600; line-height: 15px; }
.type-tag { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; letter-spacing: .6px; line-height: 13px; text-transform: uppercase; }
.type-tag--article { background: rgba(8, 127, 245, .1); color: var(--color-brand-blue); }
.type-tag--open-source { background: rgba(7, 30, 59, .08); color: var(--color-brand-navy); }
.type-tag--faq { background: rgba(18, 183, 106, .1); color: var(--color-success); }
.type-tag--glossary { background: rgba(11, 59, 115, .1); color: var(--color-deep-blue); }
.status-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 15px; }
.status-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-tag--active { color: var(--color-success); }
.status-tag--changed { color: var(--color-brand-blue); }
.status-tag--archived { color: var(--color-muted-grey); }
.filter-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.filter-pill { display: inline-flex; align-items: center; padding: 9px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-white); color: var(--color-text-primary); font-size: 14px; font-weight: 500; line-height: 17px; }
.filter-pill:hover { border-color: var(--color-brand-blue); color: var(--color-brand-blue); }
.filter-pill.is-active, .filter-pill[aria-current] { border-color: var(--color-brand-navy); background: var(--color-brand-navy); color: var(--color-white); }

/* ---------- Cards ---------- */
.service-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 24px;
	min-height: 300px;
	padding: 26px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-card);
	background: var(--color-white);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.service-tile:hover { border-color: rgba(8, 127, 245, .45); box-shadow: var(--shadow-card); }
.service-tile-top { display: flex; align-items: flex-start; justify-content: space-between; }
.icon-box { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px; background: var(--color-soft-blue); color: var(--color-brand-blue); }
.service-tile-number { color: var(--color-text-secondary); font-size: 13px; font-weight: 700; line-height: 16px; }
.service-tile-body { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.service-tile h3 { margin: 0; color: var(--color-text-primary); font-size: 19px; font-weight: 700; line-height: 26px; }
.service-tile p { margin: 0; color: var(--color-text-secondary); font-size: 14px; line-height: 22px; }
.service-tile .text-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.article-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-white); transition: box-shadow .15s ease; }
.article-card:hover { box-shadow: var(--shadow-card); }
.article-card-visual { position: relative; display: flex; align-items: flex-end; justify-content: space-between; height: 180px; padding: 22px; background: var(--gradient-card-visual); }
.article-card-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-card-visual .pill, .article-card-visual .card-icon { position: relative; z-index: 1; }
.article-card-visual img ~ .card-icon { display: none; } /* The cover already shows the topic. */
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px; background: var(--color-white); color: var(--color-brand-blue); }
.article-card-content { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px 24px 24px; }
.article-card-meta { margin: 0; color: var(--color-text-secondary); font-size: 13px; line-height: 16px; }
.article-card h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 27px; }
.article-card h3 a::after { content: ""; position: absolute; inset: 0; }
.article-card-excerpt { margin: 0; color: var(--color-text-secondary); font-size: 14px; line-height: 22px; }
.article-card .text-link { margin-top: auto; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { color: var(--color-text-primary); font-size: 13px; font-weight: 600; line-height: 16px; }
.input, .contact-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .contact-form select, .contact-form textarea, .aipro-search input[type="search"] {
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-input);
	background: var(--color-soft-blue);
	color: var(--color-text-primary);
	font-size: 14px;
	line-height: 20px;
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.input::placeholder, .contact-form ::placeholder, .aipro-search ::placeholder { color: var(--color-text-secondary); opacity: 1; }
.input:focus, .contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus, .aipro-search input:focus { outline: none; border-color: var(--color-brand-blue); background: var(--color-white); box-shadow: var(--focus-ring); }

/* ---------- FAQ accordion ---------- */
.faq-list { border-top: 1px solid var(--color-border); }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; color: var(--color-brand-navy); font-size: 18px; font-weight: 600; line-height: 24px; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; color: var(--color-text-secondary); font-size: 24px; font-weight: 500; line-height: 1; }
.faq-item[open] summary::after { content: "–"; color: var(--color-brand-blue); }
.faq-item[open] summary { padding-bottom: 12px; }
.faq-item-answer { padding: 0 48px 22px 0; color: var(--color-text-secondary); font-size: 15px; line-height: 25px; }
.faq-item-answer p { margin: 0; }

/* ---------- CTA panels ---------- */
.cta-panel { padding: 56px 64px; border-radius: var(--radius-panel); }
.cta-panel--navy { background: var(--color-brand-navy); color: var(--color-white); }
.cta-panel--gradient { background: var(--gradient-brand-panel); color: var(--color-white); }
.cta-panel--soft { border: 1px solid var(--color-border); background: var(--color-soft-blue); }
.cta-panel--navy h2, .cta-panel--gradient h2 { color: var(--color-white); }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 40px; background: var(--color-brand-navy); color: var(--color-white); }
.site-footer .aipro-container { display: flex; flex-direction: column; gap: 56px; }
.footer-columns { display: flex; align-items: flex-start; gap: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 18px; flex: 0 0 280px; }
.footer-brand p { max-width: 270px; margin: 0; font-size: 15px; line-height: 24px; }
/* DBD Registered badge (DBD_BADGE_HANDOFF.md): only our wrapper is styled, never DBD's code. The chip keeps the
   badge's size (about 92 × 36) so nothing moves when the image loads. */
.footer-trust { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.dbd-badge { flex: none; box-sizing: content-box; height: 36px; padding: 7px 10px; border-radius: 8px; background: #fff; line-height: 0; }
.dbd-badge img { display: block; width: 76px; height: 36px; }
.site-footer .footer-brand p.footer-trust__caption { max-width: none; margin: 0; font-size: 12px; line-height: 18px; }
.footer-trust__caption span { display: block; color: rgba(255, 255, 255, .6); font-weight: 400; }
.footer-trust__caption span + span { color: rgba(255, 255, 255, .85); font-weight: 500; }
.footer-col { flex: 1 1 0; min-width: 0; }
.footer-contact { flex: 0 0 auto; }
.footer-col .footer-title { margin: 0 0 14px; color: var(--color-white); font-size: 12px; font-weight: 700; letter-spacing: 1.6px; line-height: 15px; text-transform: uppercase; }
.footer-col ul { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 18px; }
.site-footer a:hover { color: var(--color-on-dark-muted); text-decoration: underline; }
.footer-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-top: 0; border-top: 0; font-size: 13px; line-height: 16px; }
.footer-columns + .footer-bottom { position: relative; }
.footer-columns + .footer-bottom::before { content: ""; position: absolute; left: 0; right: 0; top: -28px; height: 1px; background: var(--color-on-dark-line); }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.footer-legal li + li::before { content: "·"; margin: 0 12px; }
.footer-legal button { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
.footer-legal button:hover { text-decoration: underline; }

/* ---------- Tablet (≤1024px) ---------- */
@media (max-width: 1024px) {
	:root { --page-gutter: 48px; --section-y: 88px; }
	.nav-list { gap: 28px; }
	.header-inner { gap: 24px; }
	.footer-columns { flex-wrap: wrap; row-gap: 40px; }
	.footer-brand { flex-basis: 100%; }
	.footer-col, .footer-contact { flex: 1 1 calc(25% - 40px); min-width: 160px; }
}

/* ---------- Header collapses to the menu button (≤960px) ---------- */
@media (max-width: 960px) {
	.menu-toggle { display: inline-flex; }
	.header-actions { display: none; }
	.header-inner { min-height: 68px; padding-block: 12px; }
	.site-navigation {
		position: fixed;
		inset: var(--menu-top, 106px) 0 0 0;
		z-index: 999;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 32px;
		overflow-y: auto;
		padding: 16px var(--page-gutter) 32px;
		background: var(--color-white);
	}
	.site-navigation.is-open { display: flex; }
	.nav-list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav-item { border-bottom: 1px solid var(--color-border); }
	.nav-item > a, .nav-dropdown-toggle { width: 100%; padding: 16px 0; font-size: 18px; line-height: 24px; }
	.nav-dropdown-toggle { pointer-events: none; color: var(--color-text-primary); }
	.nav-dropdown-toggle .icon { display: none; }
	.nav-dropdown { position: static; width: auto; margin: 0 0 16px; border: 0; border-radius: 0; box-shadow: none; visibility: visible; opacity: 1; transform: none; overflow: visible; }
	.nav-dropdown::before { content: none; }
	.nav-dropdown-grid { grid-template-columns: 1fr; gap: 4px; padding: 0; }
	.nav-dropdown-item { padding: 10px 12px; }
	.nav-dropdown-footer { padding: 12px; border-radius: 12px; }
	.nav-dropdown-footer p { display: none; }
	.mobile-nav-footer { display: flex; align-items: center; gap: 16px; }
	.mobile-nav-footer .button { flex: 1; }
}

/* ---------- Mobile (≤767px) ---------- */
@media (max-width: 767px) {
	:root { --page-gutter: 20px; --section-y: 64px; }
	.utility-text .utility-tag { display: none; }
	.utility-text { font-size: 12px; }
	.utility-contacts { gap: 18px; font-size: 12px; }
	.page-hero { padding: 48px 0 56px; }
	.page-hero.has-banner { background:
		linear-gradient(180deg, rgba(255, 255, 255, .94) 0%, rgba(255, 255, 255, .9) 100%),
		var(--hero-image) center right / cover no-repeat,
		var(--gradient-page-hero); }
	.page-hero-inner { gap: 16px; }
	.page-hero h1 { font-size: 38px; line-height: 44px; letter-spacing: -.8px; }
	.page-hero-subtitle { font-size: 17px; line-height: 27px; }
	.section-title { font-size: 29px; line-height: 36px; letter-spacing: -.5px; }
	.cta-panel { padding: 36px 24px; }
	.site-footer { padding: 56px 0 32px; }
	.site-footer .aipro-container { gap: 40px; }
	.footer-columns { flex-direction: column; gap: 32px; }
	.footer-brand, .footer-col, .footer-contact { flex: none; width: 100%; }
	.footer-bottom { flex-direction: column; gap: 12px; }
	.footer-columns + .footer-bottom::before { top: -20px; }
	.faq-item-answer { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Top bar on tablets: drop the middle part so the service area is never cut off. */
@media (max-width: 1023px) {
	.utility-text .utility-tag--mid { display: none; }
}

/* Top bar on narrow phones: service area, then phone and e-mail on a second row (owner, 2026-10-26). */
@media (max-width: 559px) {
	:root { --utility-h: 52px; }
	.utility-inner { flex-direction: column; justify-content: center; gap: 2px; }
	.utility-text, .utility-contacts { line-height: 18px; }
}
