/*
 * Landing Pad Asia: global styles
 * Mirrors the design tokens in theme.json and the approved mockup.
 */

/* ---- Reset / base ---- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 17px;
	line-height: 1.65;
	color: oklch(0.25 0.04 245.54);
	background: #fafafa;
	-webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: oklch(0.5 0.15 251.66); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
	outline: 3px solid oklch(0.5 0.15 251.66);
	outline-offset: 2px;
	border-radius: 4px;
}

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5, h6 {
	line-height: 1.25;
	margin: 0;
	font-weight: 800;
	letter-spacing: -0.01em;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }

/* ---- Layout wrappers ---- */

.lpa-wrap {
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: 0 16px;
}

.lpa-wrap-wide {
	max-width: 980px;
}

/* ---- Utility ---- */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Site header ---- */

.lpa-site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid oklch(0.94 0.01 248.12);
}

.lpa-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 60px;
	flex-wrap: wrap;
}

.lpa-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	text-decoration: none;
}

.lpa-brand img { height: 26px; width: auto; }

.lpa-brand-fallback {
	display: none; /* Revealed by the logo img onerror handler only. */
	font-weight: 800;
	color: oklch(0.25 0.04 245.54);
	font-size: 1.05rem;
	letter-spacing: -0.02em;
}

.lpa-primary-nav { display: flex; gap: 8px; align-items: center; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }

.lpa-chip {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 4px 12px;
	border: 1px solid oklch(0.94 0.01 248.12);
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	color: oklch(0.52 0.03 245.11);
	background: #ffffff;
	text-decoration: none;
	transition: color .2s, border-color .2s, background .2s;
}

.lpa-chip:hover {
	text-decoration: none;
	color: oklch(0.5 0.15 251.66);
	border-color: oklch(0.5 0.15 251.66);
}

.lpa-chip[aria-current="true"] {
	/* Hex first: without it, a dropped oklch() background falls back to the base
	   chip's white, giving a blank white "current page" pill (WCAG 1.4.3). */
	background: #0165B5;
	background: oklch(0.5 0.15 251.66);
	border-color: #0165B5;
	border-color: oklch(0.5 0.15 251.66);
	color: #ffffff;
}

/* ---- Responsive header (hamburger menu); see design/responsive-header-hamburger-reference.html ---- */

/* Menu toggle: hidden at tablet/desktop (>=768px), shown below. */
.lpa-menu-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	min-width: 44px;
	padding: 12px 16px;
	background: #ffffff;
	border: 1px solid oklch(0.94 0.01 248.12);
	border-radius: 8px;
	color: oklch(0.25 0.04 245.54);
	font-weight: 700;
	font-size: 0.9rem;
	cursor: pointer;
}

.lpa-menu-toggle:hover { border-color: oklch(0.5 0.15 251.66); color: oklch(0.5 0.15 251.66); }
.lpa-menu-toggle .lpa-menu-ico { width: 20px; height: 20px; flex: 0 0 auto; }
.lpa-menu-toggle .lpa-menu-ico-close { display: none; }
.lpa-site-header.is-open .lpa-menu-toggle .lpa-menu-ico-open { display: none; }
.lpa-site-header.is-open .lpa-menu-toggle .lpa-menu-ico-close { display: block; }

/* Below 768px: collapse the six items behind the toggle. */
@media (max-width: 767px) {
	.lpa-header-inner { flex-wrap: wrap; justify-content: space-between; min-height: 60px; }
	.lpa-menu-toggle { display: inline-flex; }
	#lpa-nav { display: none; width: 100%; order: 3; }
	.lpa-site-header.is-open #lpa-nav { display: block; padding-top: 12px; }
	.lpa-site-header.is-open .lpa-primary-nav { flex-direction: column; align-items: stretch; gap: 8px; flex-wrap: nowrap; }
	.lpa-site-header.is-open .lpa-chip { width: 100%; min-height: 44px; justify-content: flex-start; border-radius: 8px; }
}

/* ---- Breadcrumbs ---- */

.lpa-crumbs {
	font-size: 0.85rem;
	color: oklch(0.52 0.03 245.11);
	padding: 16px 0 0;
}

.lpa-crumbs ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.lpa-crumbs li {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lpa-crumbs li + li::before {
	content: "";
	width: 5px;
	height: 5px;
	border-right: 1.5px solid oklch(0.52 0.03 245.11);
	border-top: 1.5px solid oklch(0.52 0.03 245.11);
	transform: rotate(45deg);
	opacity: .6;
	flex-shrink: 0;
}

.lpa-crumbs [aria-current="page"] {
	color: oklch(0.25 0.04 245.54);
	font-weight: 600;
}

/* ---- Footer ---- */

.lpa-site-footer {
	border-top: 1px solid oklch(0.94 0.01 248.12);
	margin-top: 64px;
	padding: 32px 0;
	color: oklch(0.52 0.03 245.11);
	font-size: 0.9rem;
}

.lpa-footer-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 16px;
	list-style: none;
	padding: 0;
	margin-top: 0;
}

.lpa-footer-nav a {
	color: oklch(0.25 0.04 245.54);
	font-weight: 600;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.lpa-foot-disc {
	max-width: 70ch;
	margin-bottom: 16px;
}

/* ---- Inline link styles (site-wide; see design/inline-link-styles-reference.html) ---- */

/*
 * Three inline link types in body and product content, each distinguishable by
 * shape, not colour alone:
 *   1. Internal link - the default `a` above (primary colour, underline on hover).
 *   2. External link - primary colour with a trailing arrow glyph (the SVG is
 *      authored inline in the markup; this rule only sizes it).
 *   3. Glossary term - ink text with a persistent dotted underline and a help
 *      cursor; hover/focus firms the underline and shifts to the brand colour.
 */

a.lpa-link-external svg {
	display: inline;
	width: 0.66em;
	height: 0.66em;
	margin-left: 2px;
	vertical-align: baseline;
}

a.lpa-term {
	color: oklch(0.25 0.04 245.54);
	text-decoration: underline dotted oklch(0.5 0.15 251.66);
	text-underline-offset: 3px;
	text-decoration-thickness: 1.5px;
	cursor: help;
	transition: color .2s, text-decoration-color .2s, text-decoration-style .2s;
}

a.lpa-term:hover,
a.lpa-term:focus-visible {
	color: #004A8B;
	text-decoration-color: #004A8B;
	text-decoration-style: solid;
}

/* Keep the dotted shape cue distinct from solid-underline links when the system
 * forces colours (Windows High Contrast), where text-decoration-color is overridden. */
@media (forced-colors: active) {
	a.lpa-term { text-decoration-style: dotted; }
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
