/* ████████████████████████████████████████████████████████████████████████████
   TeamNL Moves — Declaratieformulier Scheidsrechters
   Brand colours: Oranje #FF6000 · Oranje licht #f19107 · Oranje donker #e53516
                  Turquoise #00C2DE · Turquoise licht #57EBFF · Turquoise donker #007786
                  Roze #F4A7E6
   Typography: system-ui for body, Caveat (Google) for decorative
   ████████████████████████████████████████████████████████████████████████████ */

/* ── Reset ─────────────────────────────────────────────────────────────────── */

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

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

body {
	font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
	background: #f5f5f5;
	color: #222;
	line-height: 1.6;
	min-height: 100vh;
	min-height: 100dvh;
}

/* ── Header ────────────────────────────────────────────────────────────────── */

.site-header {
	background: #FF6000;
	position: relative;
	overflow: visible;
}

.header-inner {
	max-width: 600px;
	margin: 0 auto;
	padding: 32px 20px 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.header-logo {
	display: block;
	height: 44px;
	width: auto;
	max-width: 65%;
	object-fit: contain;
	object-position: left center;
}

.header-subtitle {
	font-family: system-ui, -apple-system, sans-serif;
	font-weight: 700;
	font-size: 14px;
	color: rgba(255,255,255,.85);
	text-align: right;
}

/* Torn/wave edge at bottom of header */
.header-edge {
	position: relative;
	height: 24px;
	background: #f5f5f5;
	margin-top: -1px;
}

.header-edge::before {
	content: '';
	position: absolute;
	top: -23px;
	left: 0;
	right: 0;
	height: 24px;
	background: #FF6000;
	clip-path: polygon(
		0% 0%, 100% 0%,
		100% 40%, 97% 55%, 93% 65%, 88% 72%, 83% 68%, 78% 60%,
		73% 55%, 68% 58%, 63% 65%, 58% 75%, 53% 70%, 48% 60%,
		43% 50%, 38% 55%, 33% 65%, 28% 70%, 23% 62%, 18% 52%,
		13% 48%, 8% 55%, 3% 65%, 0% 60%
	);
}

/* ── Form page ─────────────────────────────────────────────────────────────── */

.form-page {
	max-width: 600px;
	margin: 0 auto;
	padding: 8px 16px 40px;
}

/* ── Intro ─────────────────────────────────────────────────────────────────── */

.intro {
	margin-bottom: 28px;
	padding: 0 4px;
}

.intro h1 {
	font-family: system-ui, -apple-system, sans-serif;
	font-weight: 900;
	font-size: 24px;
	color: #FF6000;
	text-transform: uppercase;
	letter-spacing: .5px;
	line-height: 1.15;
	margin-bottom: 12px;
}

.intro p {
	color: #444;
	font-size: 15px;
	line-height: 1.65;
	margin-bottom: 8px;
}

.intro p strong {
	color: #FF6000;
	font-weight: 700;
}

.intro-note {
	font-size: 13px !important;
	color: #888 !important;
	font-style: italic;
}

/* ── Section headings ──────────────────────────────────────────────────────── */

#form h2 {
	font-family: system-ui, -apple-system, sans-serif;
	font-weight: 800;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	color: #FF6000;
	margin-bottom: 6px;
	margin-top: 8px;
	padding-left: 4px;
}

/* ── Segments ──────────────────────────────────────────────────────────────── */

.segment {
	background: #fff;
	border-radius: 12px;
	padding: 24px 20px;
	margin-bottom: 20px;
	border: 1px solid rgba(0,0,0,.06);
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* ── Fields ────────────────────────────────────────────────────────────────── */

.field {
	margin-bottom: 18px;
}

.field:last-child {
	margin-bottom: 0;
}

.field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	margin-bottom: 5px;
}

/* Required indicator */
.field:has(:required) > label::after {
	content: ' *';
	color: #e53516;
}

.field select,
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
	min-height: 46px;
	width: 100%;
	border: 2px solid #e0e0e0;
	background: #fff;
	padding: 10px 14px;
	font-family: inherit;
	font-size: 16px;
	color: #222;
	border-radius: 8px;
	transition: border-color .2s ease, box-shadow .2s ease;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 40px;
}

.field select:required:valid {
	border-color: #00C2DE;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	border-color: #00C2DE;
	box-shadow: 0 0 0 3px rgba(0,194,222,.15);
}

.field input::placeholder,
.field textarea::placeholder {
	color: #c0c0c0;
}

.field textarea {
	resize: vertical;
	min-height: 100px;
}

/* ── Validation ────────────────────────────────────────────────────────────── */

.field input:required:not(:placeholder-shown):valid,
.field textarea:required:not(:placeholder-shown):valid {
	border-color: #00C2DE;
}

.field input:required:not(:placeholder-shown):invalid {
	border-color: #e53516;
}

/* ── Field rows (inline fields) ────────────────────────────────────────────── */

.field-row {
	display: flex;
	gap: 12px;
}

.field-grow {
	flex: 1;
}

.field-small {
	flex: 0 0 110px;
}

.field-postal {
	flex: 0 0 130px;
}

/* ── Help text ─────────────────────────────────────────────────────────────── */

.help-text {
	display: block;
	font-size: 12px;
	color: #999;
	margin-top: 4px;
	line-height: 1.5;
}

/* ── Submit button ─────────────────────────────────────────────────────────── */

#submitButton {
	display: block;
	width: 100%;
	padding: 16px 28px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .8px;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: all .15s ease;
	background: #FF6000;
	color: #fff;
	box-shadow: 0 4px 12px rgba(255,96,0,.3);
}

#submitButton:hover {
	background: #e55500;
	box-shadow: 0 6px 16px rgba(255,96,0,.4);
	transform: translateY(-1px);
}

#submitButton:active {
	transform: translateY(0) scale(.99);
	box-shadow: 0 2px 8px rgba(255,96,0,.3);
}

/* ── Thank you ─────────────────────────────────────────────────────────────── */

#thanks {
	animation: fadeInUp .5s ease;
}

.thanks-content {
	text-align: center;
	padding: 48px 20px;
}

.thanks-content h2 {
	font-family: system-ui, -apple-system, sans-serif;
	font-weight: 900;
	font-size: 28px;
	color: #FF6000;
	text-transform: uppercase;
	margin-bottom: 12px;
}

.thanks-content p {
	color: #444;
	font-size: 15px;
	margin-bottom: 10px;
	line-height: 1.6;
}

.thanks-subtext {
	font-size: 14px !important;
	color: #888 !important;
	margin-bottom: 20px !important;
}

.thanks-caveat {
	font-family: 'Caveat', cursive;
	font-size: 26px;
	color: #00C2DE;
	margin-top: 16px !important;
}

.checkmark-circle {
	width: 72px;
	height: 72px;
	margin: 0 auto 24px;
}

.checkmark-circle svg {
	width: 72px;
	height: 72px;
}

.checkmark-circle circle {
	stroke: #FF6000;
	stroke-width: 2;
	stroke-dasharray: 157;
	stroke-dashoffset: 157;
	animation: circleIn .5s ease forwards;
}

.checkmark-circle path {
	stroke: #FF6000;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
	animation: checkIn .3s .4s ease forwards;
}

@keyframes circleIn { to { stroke-dashoffset: 0; } }
@keyframes checkIn { to { stroke-dashoffset: 0; } }
@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */

.site-footer {
	background: #FF6000;
	padding: 20px 16px;
	text-align: center;
	position: relative;
}

.site-footer::before {
	content: '';
	position: absolute;
	top: -23px;
	left: 0;
	right: 0;
	height: 24px;
	background: #FF6000;
	clip-path: polygon(
		0% 100%, 100% 100%,
		100% 45%, 96% 35%, 91% 28%, 86% 35%, 81% 45%,
		76% 50%, 71% 42%, 66% 30%, 61% 25%, 56% 32%,
		51% 42%, 46% 50%, 41% 45%, 36% 35%, 31% 28%,
		26% 32%, 21% 42%, 16% 50%, 11% 45%, 6% 35%,
		0% 40%
	);
}

.footer-inner {
	max-width: 600px;
	margin: 0 auto;
}

.footer-caveat {
	font-family: 'Caveat', cursive;
	font-size: 22px;
	color: rgba(255,255,255,.85);
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 520px) {
	.header-inner {
		padding: 20px 16px 28px;
		gap: 8px;
	}

	.header-logo {
		height: 36px;
		max-width: 60%;
	}

	.header-subtitle {
		font-size: 12px;
	}

	.intro h1 {
		font-size: 20px;
	}

	.form-page {
		padding: 8px 12px 32px;
	}

	.segment {
		padding: 20px 16px;
	}

	/* Stack name fields: voornaam + achternaam side by side, tussenvoegsel below */
	.field-row-name {
		flex-wrap: wrap;
		gap: 0;
	}

	.field-row-name .field {
		margin-bottom: 18px;
	}

	.field-row-name .field-grow:first-child {
		flex: 1 1 100%;
		padding-right: 0;
	}

	.field-row-name .field-grow:last-child {
		flex: 1 1 100%;
		padding-left: 0;
	}

	.field-row-name .field-small {
		flex: 0 0 100%;
		order: 3;
	}
}

@media (max-width: 380px) {
	.header-inner {
		flex-direction: column;
		align-items: flex-start;
		padding: 18px 16px 24px;
	}

	.header-logo {
		height: 32px;
		max-width: 75%;
	}

	.header-subtitle {
		text-align: left;
		font-size: 12px;
	}

	.intro h1 {
		font-size: 18px;
	}

	/* Stack all name fields vertically */
	.field-row-name {
		flex-direction: column;
	}

	.field-row-name .field-grow:first-child,
	.field-row-name .field-grow:last-child {
		padding: 0;
	}

	.field-row-name .field-small {
		order: unset;
	}

	/* Stack address fields vertically */
	.field-row-address {
		flex-direction: column;
	}

	.field-postal {
		flex: 1 1 auto !important;
	}
}
