/**
 * Base: reset-lite, typography, containers, buttons, links, forms.
 * Consumes tokens from 01-tokens.css only.
 */

/* ---------- Reset-lite ---------- */

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

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

body {
	margin: 0;
	background: var(--tpt-sand-050);
	color: var(--tpt-ink-900);
	font-family: var(--tpt-font-body);
	font-size: var(--tpt-text-body);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--tpt-font-display);
	font-weight: 560;
	line-height: 1.15;
	margin: 0 0 var(--tpt-space-4);
	color: var(--tpt-ink-900);
	overflow-wrap: break-word;
}

p {
	margin: 0 0 var(--tpt-space-4);
	max-width: 68ch;
}

ul, ol {
	padding: 0;
	margin: 0 0 var(--tpt-space-4);
	list-style: none;
}

a {
	color: var(--tpt-nile-700);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--tpt-nile-800);
}

/* Accessible focus: visible everywhere, never removed. */
:focus-visible {
	outline: 2px solid var(--tpt-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

.tpt-skip-link {
	position: absolute;
	left: var(--tpt-space-4);
	top: var(--tpt-space-4);
	z-index: 1000;
	transform: translateY(-200%);
	background: var(--tpt-surface);
	color: var(--tpt-nile-700);
	padding: var(--tpt-space-3) var(--tpt-space-5);
	border-radius: var(--tpt-radius-badge);
	box-shadow: var(--tpt-shadow-hover);
	transition: transform var(--tpt-transition);
}

.tpt-skip-link:focus {
	transform: translateY(0);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
}

/* ---------- Layout primitives ---------- */

.tpt-container {
	width: 100%;
	max-width: var(--tpt-container);
	margin-inline: auto;
	padding-inline: var(--tpt-gutter);
}

.tpt-main {
	min-height: 50vh;
}

.tpt-section {
	padding-block: var(--tpt-section-gap);
}

.tpt-section:nth-of-type(even) {
	background: var(--tpt-sand-100);
}

/* ---------- Typography helpers ---------- */

.tpt-eyebrow {
	font-family: var(--tpt-font-body);
	font-size: var(--tpt-text-eyebrow);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--tpt-clay-600);
	margin: 0 0 var(--tpt-space-2);
}

.tpt-eyebrow--light {
	color: rgba(255, 255, 255, 0.85);
}

.tpt-section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--tpt-space-6);
	margin-bottom: var(--tpt-space-10);
	flex-wrap: wrap;
}

.tpt-section-title {
	font-size: var(--tpt-text-h2);
	margin: 0;
}

.tpt-link-arrow {
	font-weight: 600;
	font-size: var(--tpt-text-small);
	white-space: nowrap;
	text-decoration: none;
}

.tpt-link-arrow:hover {
	text-decoration: underline;
}

/* ---------- Buttons ---------- */

.tpt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--tpt-space-2);
	min-height: var(--tpt-control-height);
	padding: var(--tpt-space-3) var(--tpt-space-8);
	border-radius: var(--tpt-radius-pill);
	font-family: var(--tpt-font-body);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background-color var(--tpt-transition), color var(--tpt-transition),
		border-color var(--tpt-transition), transform var(--tpt-transition),
		box-shadow var(--tpt-transition);
}

.tpt-btn--primary {
	background: var(--tpt-nile-700);
	color: #fff;
}

.tpt-btn--primary:hover {
	background: var(--tpt-nile-800);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: var(--tpt-shadow-hover);
}

.tpt-btn--secondary {
	background: transparent;
	color: var(--tpt-ink-900);
	border-color: var(--tpt-ink-900);
}

.tpt-btn--secondary:hover {
	background: var(--tpt-ink-900);
	color: var(--tpt-sand-050);
	transform: translateY(-1px);
}

.tpt-btn--block {
	width: 100%;
}

.tpt-btn--sm {
	min-height: 44px;
	padding: var(--tpt-space-2) var(--tpt-space-5);
	font-size: var(--tpt-text-small);
}

.tpt-link-soft {
	color: var(--tpt-ink-900);
	font-weight: 500;
	font-size: var(--tpt-text-small);
	text-decoration: none;
	border-bottom: 1px solid var(--tpt-sand-300);
	padding-bottom: 2px;
}

.tpt-link-soft:hover {
	color: var(--tpt-nile-700);
	border-bottom-color: currentColor;
}

/* ---------- Forms ---------- */

.tpt-form .tpt-field {
	margin-bottom: var(--tpt-space-5);
}

.tpt-form label,
.tpt-field__label {
	display: block;
	font-size: var(--tpt-text-small);
	font-weight: 600;
	margin-bottom: var(--tpt-space-2);
	color: var(--tpt-ink-900);
}

.tpt-form input,
.tpt-form select,
.tpt-form textarea {
	width: 100%;
	min-height: var(--tpt-control-height);
	padding: var(--tpt-space-3) var(--tpt-space-4);
	background: var(--tpt-surface);
	border: 1px solid var(--tpt-sand-300);
	border-radius: var(--tpt-radius-input);
	color: var(--tpt-ink-900);
	font-family: var(--tpt-font-body);
	font-size: 1rem;
	transition: border-color var(--tpt-transition), box-shadow var(--tpt-transition);
}

.tpt-form textarea {
	min-height: 120px;
	resize: vertical;
}

.tpt-form input:focus,
.tpt-form select:focus,
.tpt-form textarea:focus {
	border-color: var(--tpt-nile-700);
	box-shadow: 0 0 0 3px var(--tpt-nile-050);
	outline: none;
}

.tpt-form input[aria-invalid="true"],
.tpt-form select[aria-invalid="true"] {
	border-color: var(--tpt-error);
}

.tpt-field__static {
	margin: 0;
	padding: var(--tpt-space-3) var(--tpt-space-4);
	background: var(--tpt-sand-100);
	border-radius: var(--tpt-radius-input);
	font-family: var(--tpt-font-display);
}

.tpt-field__error {
	color: var(--tpt-error);
	font-size: var(--tpt-text-small);
	margin: var(--tpt-space-1) 0 var(--tpt-space-2);
}

.tpt-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--tpt-space-5);
}

.tpt-form__errors {
	background: rgba(163, 58, 42, 0.08);
	border: 1px solid rgba(163, 58, 42, 0.35);
	border-radius: var(--tpt-radius-input);
	padding: var(--tpt-space-4) var(--tpt-space-5);
	margin-bottom: var(--tpt-space-6);
}

.tpt-form__errors p {
	margin-bottom: var(--tpt-space-1);
	font-weight: 600;
	color: var(--tpt-error);
}

.tpt-form__errors ul {
	margin: 0;
	padding-left: var(--tpt-space-5);
	list-style: disc;
}

.tpt-form__note {
	font-size: var(--tpt-text-small);
	color: var(--tpt-ink-600);
}

.tpt-form__honeypot {
	position: absolute !important;
	left: -9999px !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

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

.tpt-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: var(--tpt-space-2);
	list-style: none;
	margin: 0 0 var(--tpt-space-3);
	font-size: var(--tpt-text-small);
}

.tpt-breadcrumbs li + li::before {
	content: "/";
	margin-right: var(--tpt-space-2);
	color: var(--tpt-ink-600);
	opacity: 0.6;
}

.tpt-breadcrumbs a {
	color: inherit;
}

.tpt-breadcrumbs [aria-current="page"] {
	color: var(--tpt-ink-600);
}
