/*
 * Roboto Serif (Google Fonts, SIL Open Font License), self-hosted.
 * Variable font: one file per character range covers weights 300 to 700.
 * Paths are relative to this CSS file.
 */
@font-face {
	font-family: 'Roboto Serif';
	font-style: normal;
	font-weight: 300 700;
	font-stretch: 100%;
	font-display: swap;
	src: url('../fonts/Roboto_Serif_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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Roboto Serif';
	font-style: normal;
	font-weight: 300 700;
	font-stretch: 100%;
	font-display: swap;
	src: url('../fonts/Roboto_Serif_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;
}

:root {
	--brand: #4ea2aa;        
	--fontcolor: rgb(0,20,120);    
	--ink: #1c2b2d;
	--white: #fff;
	--error: #a4161a;
	--font: "Roboto Serif", Georgia, serif;
}

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

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

body {
	margin: 0;
	background: var(--white);
	color: var(--fontcolor);
	font-family: var(--font);
	font-size: 1.125rem;
	line-height: 1.5;
}

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

/* ---------- Hero ---------- */


.hero-inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.25rem;
	max-width: 40rem;         /* same column as the form */
	margin: 0 auto;
	padding: 2rem 1rem;
}

.hero-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}

.hero h1 {
	margin: 0;
	font-size: clamp(2rem, 7vw, 2.5rem);
	line-height: 1.2;
	font-weight: 300;
}

.hero-sub {
	margin: 0;
	font-size: clamp(1.25rem, 4.5vw, 1.25rem);
	line-height: 1.35;
}

/* The logo SVG is white; it is used as a mask so the colour comes from --fontcolor. */
.hero-logo {
	display: block;
	width: 160px;
	aspect-ratio: 720 / 400;  /* viewBox of the SVG */
	margin-top: 0.25rem;
	background-color: var(--fontcolor);
	-webkit-mask: url('../images/puchner-logo-neu-white.svg') left center / contain no-repeat;
	mask: url('../images/puchner-logo-neu-white.svg') left center / contain no-repeat;
}

@media (min-width: 800px) {
	.hero {
		/* file name contains a ©, so it is percent-encoded (%C2%A9) */
		background: var(--white) url('../images/SophieDervaux14%C2%A9MarcoBorggeve-back1.jpg') no-repeat right center / cover;
		overflow: hidden;
	}
	.hero-text {
		gap: 1rem;
	}

	.hero-logo {
		width: 220px;
		margin-top: 0.5rem;
	}
}

/* ---------- Form ---------- */

main {
	max-width: 40rem;
	margin: 0 auto;
	padding: 0rem 1rem 3.5rem;
}

main h2 {
	margin: 0 0 1rem;
	font-size: 1.75rem;
	font-weight: 400;
}

label {
	display: block;
	margin-top: 1.25rem;
	margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"] {
	display: block;
	width: 100%;
	min-height: 2.75rem;      /* comfortable touch target */
	padding: 0.4rem 0.6rem;
	border: 2px solid var(--fontcolor);
	border-radius: 6px;
	background: var(--white);
	color: var(--ink);
	font: inherit;            /* >= 16px, so iOS Safari does not zoom on focus */
}

input[aria-invalid="true"] {
	border-color: var(--error);
}

input:focus-visible,
.button:focus-visible,
a:focus-visible {
	outline: 3px solid var(--fontcolor);
	outline-offset: 3px;
}

.note {
	margin: 1.5rem 0 0;
}

/* Small print (declaration of the organizer): smaller text, tighter lines than body (18px / 1.5) */
.notesmall {
	margin: 1.25rem 0 0;
	font-size: 0.9rem;        /* about 11px */
	line-height: 1.4;        /* below 1.2 the lines start to touch */
}

.notesmall b {
	font-weight: 700;
}

.note + .note {
	margin-top: 0.75rem;
}

.error {
	display: block;
	margin-top: 0.35rem;
	padding: 0.25rem 0.6rem;
	border-radius: 4px;
	background: var(--white);
	color: var(--error);
	font-size: 1rem;
}

.error-summary {
	margin: 0 0 1rem;
}

.code-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.25rem;
}

.code-row img {
	display: block;
	border-radius: 4px;
	background: var(--white);
	box-shadow: 0 0 0 2px var(--fontcolor);
}

.code-row input {
	width: 6.5rem;
	text-align: center;
	letter-spacing: 0.15em;
}

.code-hint {
	margin: 0.35rem 0 0;
	font-size: 1rem;
}

.button {
	display: block;
	width: 100%;
	min-height: 3rem;
	margin-top: 1.75rem;
	padding: 0.4rem 2.5rem;
	border: 0;
	border-radius: 10px;
	background: var(--fontcolor);
	color: var(--white);
	font: inherit;
	font-weight: 400;
	text-transform: uppercase;
	cursor: pointer;
}

.button:hover {
	opacity: 0.85;
}

@media (min-width: 480px) {
	.button {
		display: inline-block;
		width: auto;
	}
}

a {
	color: inherit;
}

/* ---------- Entrance animation (CSS only, optional) ---------- */

@media (prefers-reduced-motion: no-preference) {
	@keyframes drop-in {
		from { opacity: 0; transform: translateY(-1.25rem); }
		to   { opacity: 1; transform: none; }
	}

	@keyframes pop-in {
		from { opacity: 0; transform: scale(0.3); }
		to   { opacity: 1; transform: none; }
	}

	/* played once on arrival, not again after a form submit */
	body:not(.submitted) .hero h1    { animation: drop-in 0.8s ease-out 0.3s backwards; }
	body:not(.submitted) .hero-sub   { animation: drop-in 0.8s ease-out 0.9s backwards; }
	body:not(.submitted) .hero-logo  { animation: pop-in 1.2s ease-out 1.2s backwards; }
}
