/* ==========================================================================
   AP Transportas: base (tokens, reset, typography, layout, header, footer)
   ========================================================================== */

:root {
	--blue: #0094de;          /* logo colour: decorative use */
	--blue-600: #007cbd;      /* buttons: white text passes AA */
	--blue-700: #00659a;      /* small blue text on white */
	--blue-100: #dff1fb;
	--navy-950: #06141e;
	--navy-900: #0b1d2a;
	--navy-800: #10283a;
	--navy-700: #173650;
	--ink: #0e1f2b;
	--muted: #4e606e;
	--line: #dbe5ec;
	--tint: #eef5fa;
	--white: #fff;

	--font-head: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--font-brand: 'Oswald', 'Arial Narrow', sans-serif; /* logo wordmark only */
	--font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 22px;
	--shadow-sm: 0 1px 2px rgb(11 29 42 / 6%), 0 2px 8px rgb(11 29 42 / 5%);
	--shadow: 0 10px 30px -10px rgb(11 29 42 / 18%);
	--shadow-lg: 0 30px 60px -20px rgb(11 29 42 / 35%);

	--container: 1200px;
	--gutter: clamp(16px, 4vw, 32px);
	--section-y: clamp(72px, 10vw, 128px);
	--header-h: 76px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
figure,
blockquote { margin: 0; }
button,
input,
textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 {
	margin: 0;
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.022em;
	text-wrap: balance;
}

:focus-visible {
	outline: 3px solid var(--blue);
	outline-offset: 3px;
	border-radius: 4px;
}

main:focus { outline: none; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	top: 8px; left: 8px;
	z-index: 200;
	padding: 10px 16px;
	background: var(--white);
	color: var(--ink);
	border-radius: var(--radius-sm);
	transform: translateY(-150%);
	transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* Layout ------------------------------------------------------------------ */
.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(780px + var(--gutter) * 2); }

.section { padding-block: var(--section-y); position: relative; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--navy-900); color: rgb(255 255 255 / 82%); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	color: var(--blue-700);
	font-family: var(--font-head);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.eyebrow::before {
	content: '';
	width: 28px;
	height: 2px;
	background: currentColor;
}
.section-head--center .eyebrow::after {
	content: '';
	width: 28px;
	height: 2px;
	background: currentColor;
}
.eyebrow--light { color: #6cc8f2; }

.section-title {
	margin-bottom: 20px;
	color: var(--navy-900);
	font-size: clamp(1.85rem, 1.3rem + 1.9vw, 2.75rem);
}
.section-title--light { color: var(--white); }

.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--muted); }
.lead--light { color: rgb(255 255 255 / 78%); }

.card {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

/* Buttons ----------------------------------------------------------------- */
.btn {
	--btn-bg: transparent;
	--btn-fg: var(--ink);
	--btn-border: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 46px;
	padding: 10px 22px;
	border: 1.5px solid var(--btn-border);
	border-radius: 999px;
	background: var(--btn-bg);
	color: var(--btn-fg);
	font-family: var(--font-head);
	font-size: .98rem;
	font-weight: 600;
	letter-spacing: -.005em;
	line-height: 1.2;
	white-space: nowrap;
	transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }

.btn--primary { --btn-bg: var(--blue-600); --btn-fg: var(--white); box-shadow: 0 8px 20px -8px rgb(0 124 189 / 60%); }
.btn--primary:hover { --btn-bg: var(--blue-700); }
.btn--ghost { --btn-fg: var(--white); --btn-border: rgb(255 255 255 / 55%); }
.btn--ghost:hover { --btn-bg: var(--white); --btn-fg: var(--navy-900); --btn-border: var(--white); }
.btn--outline { --btn-fg: var(--navy-900); --btn-border: var(--line); --btn-bg: var(--white); }
.btn--outline:hover { --btn-border: var(--navy-900); }
.btn--lg { min-height: 54px; padding: 14px 28px; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* Header ------------------------------------------------------------------ */
.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	height: var(--header-h);
	color: var(--white);
	transition: background-color .3s, box-shadow .3s, height .3s;
}
.site-header.is-scrolled,
.site-header.is-solid {
	background: rgb(11 29 42 / 92%);
	backdrop-filter: saturate(140%) blur(12px);
	-webkit-backdrop-filter: saturate(140%) blur(12px);
	box-shadow: 0 1px 0 rgb(255 255 255 / 8%);
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
/* ≤600px WP makes the admin bar scroll away (position: absolute), so the header must stick to 0. */
@media (max-width: 600px) {
	.admin-bar .site-header { top: 0; }
	.admin-bar .site-nav { top: var(--header-h) !important; }
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	height: 100%;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex: none;
}
.brand__mark { width: 44px; height: 44px; border-radius: 9px; }
.brand__name {
	font-family: var(--font-brand);
	font-size: 1.3rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.site-nav__list { display: flex; gap: 4px; }
.site-nav__link {
	position: relative;
	display: block;
	padding: 8px 12px;
	font-size: .95rem;
	font-weight: 500;
	color: rgb(255 255 255 / 85%);
	transition: color .2s;
}
.site-nav__link::after {
	content: '';
	position: absolute;
	left: 12px; right: 12px; bottom: 2px;
	height: 2px;
	background: var(--blue);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s var(--ease);
}
.site-nav__link:hover,
.site-nav__link.is-active { color: var(--white); }
.site-nav__link:hover::after,
.site-nav__link.is-active::after { transform: scaleX(1); }
.site-nav__cta { min-height: 42px; padding: 8px 18px; }

.site-header__actions { display: flex; align-items: center; gap: 10px; }

.lang-menu { position: relative; }
.lang-menu__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid rgb(255 255 255 / 25%);
	border-radius: 999px;
	font-size: .85rem;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--white);
	list-style: none;
	cursor: pointer;
	transition: background-color .2s, border-color .2s;
}
.lang-menu__toggle::-webkit-details-marker { display: none; }
.lang-menu__toggle:hover,
.lang-menu[open] .lang-menu__toggle { background: rgb(255 255 255 / 12%); border-color: rgb(255 255 255 / 40%); }
.lang-menu__toggle .icon { width: 17px; height: 17px; }
.lang-menu__caret { transition: transform .2s; }
.lang-menu[open] .lang-menu__caret { transform: rotate(180deg); }
.lang-menu__list {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 20;
	min-width: 190px;
	padding: 6px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white);
	box-shadow: var(--shadow-lg);
}
.lang-menu__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 12px;
	border-radius: var(--radius-sm);
	font-size: .95rem;
	color: var(--ink);
	transition: background-color .15s;
}
.lang-menu__link:hover { background: var(--tint); }
.lang-menu__link.is-active { background: var(--blue-100); color: var(--blue-700); font-weight: 600; }
.lang-menu__code {
	width: 26px;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .06em;
	color: var(--muted);
}
.lang-menu__link.is-active .lang-menu__code { color: inherit; }

.nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 10px;
	background: rgb(255 255 255 / 10%);
	color: var(--white);
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle__icon--close { display: none; }
.nav-open .nav-toggle__icon--open { display: none; }
.nav-open .nav-toggle__icon--close { display: block; }

@media (max-width: 1180px) {
	.nav-toggle { display: inline-flex; }
	.site-header__actions { margin-left: auto; }

	.site-nav {
		position: fixed;
		inset: var(--header-h) 0 0;
		z-index: -1;
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
		margin: 0;
		padding: 24px var(--gutter) 40px;
		background: var(--navy-900);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
	}
	.admin-bar .site-nav { top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 46px)); }
	.nav-open .site-nav {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition-delay: 0s;
	}
	/* backdrop-filter would make the fixed menu panel relative to the header */
	.nav-open .site-header {
		background: var(--navy-900);
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}
	.site-nav__list { flex-direction: column; gap: 0; }
	.site-nav__link {
		padding: 16px 0;
		border-bottom: 1px solid rgb(255 255 255 / 10%);
		font-size: 1.35rem;
	}
	.site-nav__link::after { display: none; }
	.site-nav__cta { min-height: 54px; }
}

@media (max-width: 420px) {
	.brand__name { font-size: 1.1rem; }
	.brand__mark { width: 38px; height: 38px; }
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
	padding-top: clamp(56px, 8vw, 80px);
	background: var(--navy-950);
	color: rgb(255 255 255 / 70%);
	font-size: .95rem;
}
.site-footer__grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr;
	gap: 40px;
	padding-bottom: 48px;
}
.brand--light { color: var(--white); margin-bottom: 18px; }
.site-footer__text { max-width: 340px; }
.site-footer__contacts { display: grid; gap: 14px; align-content: start; }
.site-footer__contacts li { display: flex; gap: 12px; align-items: flex-start; }
.site-footer__contacts .icon { margin-top: 3px; color: var(--blue); }
.site-footer__contacts a { color: var(--white); transition: color .2s; }
.site-footer__contacts a:hover { color: #6cc8f2; }
.site-footer__contacts small { display: block; font-size: .85rem; color: rgb(255 255 255 / 55%); }

.site-footer__bottom {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	padding-block: 22px;
	font-size: .85rem;
}
/* Divider aligned with the content, not the container's side padding. */
.site-footer__bottom::before,
.site-footer__legal::before {
	content: '';
	position: absolute;
	top: 0;
	left: var(--gutter);
	right: var(--gutter);
	height: 1px;
	background: rgb(255 255 255 / 10%);
}
.site-footer__bottom p { margin: 0; }
.to-top { display: inline-flex; align-items: center; gap: 6px; color: rgb(255 255 255 / 80%); }
.to-top:hover { color: var(--white); }

@media (max-width: 860px) {
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
	.site-footer__grid { grid-template-columns: 1fr; }
}

.site-footer__legal {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	padding-block: 18px;
	font-size: .85rem;
	color: rgb(255 255 255 / 55%);
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer__links a,
.site-footer__links button {
	padding: 0;
	border: 0;
	background: none;
	font-size: inherit;
	color: rgb(255 255 255 / 80%);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.site-footer__links a:hover,
.site-footer__links button:hover { color: var(--white); }

/* Astra prints its scroll-to-top button in wp_footer; the theme has its own. */
div#ast-scroll-top {
	display: none !important;
}

/* Simple pages (privacy policy, 404) -------------------------------------- */
.page-simple { padding-block: calc(var(--header-h) + 56px) 96px; min-height: 70vh; }
.prose h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); margin-bottom: 24px; color: var(--navy-900); }
.prose h2 { font-size: 1.6rem; margin: 2em 0 .6em; color: var(--navy-900); }
.prose h3 { font-size: 1.25rem; margin: 1.6em 0 .5em; color: var(--navy-900); }
.prose a { color: var(--blue-700); text-decoration: underline; }
.prose ul { list-style: disc; padding-left: 1.2em; margin-bottom: 1em; }
.prose li + li { margin-top: .35em; }
.prose__meta { color: var(--muted); font-size: .95rem; }
.prose__table-wrap { margin: 1em 0 1.5em; overflow-x: auto; }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .92rem; }
.prose th,
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--tint); font-weight: 600; color: var(--navy-900); }
.prose .btn { text-decoration: none; }

/* Reveal on scroll (only when JS runs and motion is allowed) --------------- */
@media (prefers-reduced-motion: no-preference) {
	.js [data-reveal] {
		opacity: 0;
		transform: translateY(22px);
		transition: opacity .7s var(--ease), transform .7s var(--ease);
		transition-delay: var(--reveal-delay, 0s);
	}
	.js [data-reveal].is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
