/* Winter Classic Lahti — site styles.
   Colours, sizes and spacing come from the variables in :root. */

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("fonts/Inter-Variable.woff2") format("woff2");
}

:root {
	--ink: #0d1117;
	--ink-soft: #47525f;
	--paper: #ffffff;
	--mist: #eef4f8;
	--line: #d8e2ea;
	--ice: #29a9e0;
	--ice-dark: #0b6ea8;

	--content: 700px;
	--wide: 1200px;

	--pad: clamp(1.25rem, 4vw, 3rem);
	--gap: clamp(1rem, 2.5vw, 2rem);
	--section: clamp(3rem, 7vw, 6rem);

	--radius: 3px;
	--shadow: 0 1px 2px rgba(13, 17, 23, 0.06), 0 8px 24px rgba(13, 17, 23, 0.06);

	--font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	/* Nothing should ever scroll sideways. The causes are fixed above and
	   below; this is the net. clip rather than hidden, because hidden would
	   make this a scroll container and break the sticky header. */
	overflow-x: clip;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
	line-height: 1.65;
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--ice-dark);
	text-underline-offset: 3px;
}

a:hover {
	color: var(--ink);
}

h1,
h2,
h3,
h4 {
	margin: 0 0 0.6em;
	line-height: 1.08;
	letter-spacing: -0.02em;
	font-weight: 800;
	/* Finnish compounds like Yhteistyökumppanit are one long word and will
	   overflow a phone otherwise. Hyphenate where the browser can, break
	   where it cannot. */
	hyphens: auto;
	overflow-wrap: break-word;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2.4rem, 1.6rem + 4vw, 4.5rem);
	text-transform: uppercase;
	letter-spacing: -0.03em;
	font-weight: 900;
}

h2 {
	font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem);
	text-transform: uppercase;
}

h3 {
	font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.5rem);
}

h4 {
	font-size: 1.05rem;
	font-weight: 700;
}

p {
	margin: 0 0 1.15em;
}

ul {
	margin: 0 0 1.15em;
	padding-left: 1.2em;
}

:focus-visible {
	outline: 3px solid var(--ice);
	outline-offset: 3px;
}


/* Layout */

.wrap {
	max-width: var(--wide);
	margin-inline: auto;
	padding-inline: var(--pad);
}

.prose {
	max-width: var(--content);
	margin-inline: auto;
	padding-inline: var(--pad);
}

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

.section--mist {
	background: var(--mist);
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ink);
	color: #fff;
	padding: 0.75rem 1rem;
	z-index: 100;
}

.skip-link:focus {
	left: 0;
}


/* Header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}

.site-header__inner {
	max-width: var(--wide);
	margin-inline: auto;
	padding: 0.7rem var(--pad);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.site-logo img {
	width: 200px;
	max-width: 52vw;
}

.nav-toggle,
.nav-close {
	background: none;
	border: 0;
	padding: 0.5rem;
	cursor: pointer;
	color: inherit;
	display: none;
}

.site-nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: clamp(0.75rem, 2vw, 1.75rem);
	margin: 0;
	padding: 0;
}

.site-nav a {
	color: var(--ink);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding-block: 0.35rem;
	border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
	border-bottom-color: var(--ice);
}

@media (max-width: 860px) {
	.site-header {
		/* backdrop-filter would make the header a containing block, which
		   stops the fixed menu overlay from covering the viewport. */
		backdrop-filter: none;
		background: var(--paper);
	}

	.nav-toggle,
	.nav-close {
		display: block;
	}

	.site-nav {
		position: fixed;
		inset: 0;
		background: var(--paper);
		padding: var(--pad);
		display: none;
	}

	.site-nav.is-open {
		display: block;
	}

	.nav-close {
		position: absolute;
		top: 1rem;
		right: 1rem;
	}

	.site-nav ul {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		height: 100%;
		gap: 1.75rem;
	}

	.site-nav a {
		font-size: 1.4rem;
	}
}


/* Hero */

.hero {
	position: relative;
	isolation: isolate;
	min-height: min(78vh, 720px);
	display: flex;
	align-items: flex-end;
	color: #fff;
	background: var(--ink);
}

.hero img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: -2;
}

.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(13, 17, 23, 0.75) 0%, rgba(13, 17, 23, 0.2) 55%, rgba(13, 17, 23, 0) 100%),
		linear-gradient(180deg, rgba(13, 17, 23, 0.3) 0%, rgba(13, 17, 23, 0.5) 45%, rgba(13, 17, 23, 0.85) 100%);
}

.hero__inner {
	max-width: var(--wide);
	margin-inline: auto;
	width: 100%;
	padding: var(--section) var(--pad) clamp(2.5rem, 5vw, 4rem);
}

.hero h1 {
	margin-bottom: 0.35em;
	max-width: 14ch;
}

.hero__lead {
	font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem);
	max-width: 46ch;
	margin-bottom: 1.75rem;
	color: rgba(255, 255, 255, 0.88);
}

.eyebrow {
	display: inline-block;
	background: var(--ice);
	color: var(--ink);
	font-weight: 800;
	font-size: 0.85rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	padding: 0.4rem 0.9rem;
	border-radius: 0;
	margin-bottom: 1.25rem;
}


/* Buttons */

.buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.button {
	display: inline-block;
	padding: 0.85rem 1.6rem;
	border-radius: 0;
	font-weight: 700;
	text-decoration: none;
	letter-spacing: 0.02em;
	background: var(--ice);
	color: var(--ink);
	border: 2px solid var(--ice);
}

.button:hover {
	background: #fff;
	border-color: #fff;
	color: var(--ink);
}

.button--ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.6);
}

.button--ghost:hover {
	background: #fff;
	border-color: #fff;
	color: var(--ink);
}


/* Fact strip */

.facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
	gap: 1px;
	background: var(--line);
	border-block: 1px solid var(--line);
}

.fact {
	background: var(--paper);
	padding: clamp(1.25rem, 3vw, 2rem) var(--pad);
	text-align: center;
}

.fact dt {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--ink-soft);
	margin-bottom: 0.35rem;
}

.fact dd {
	margin: 0;
	/* the date and time belong together on one line */
	white-space: nowrap;
	font-size: clamp(1.05rem, 0.85rem + 0.9vw, 1.5rem);
	font-weight: 800;
	letter-spacing: -0.02em;
}


/* Cards */

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
	gap: var(--gap);
}

.card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: clamp(1.25rem, 3vw, 1.75rem);
	box-shadow: var(--shadow);
}

.card h3 {
	margin-bottom: 0.35em;
}

.card p:last-child,
.card ul:last-child {
	margin-bottom: 0;
}


/* Page header for subpages */

.page-head {
	background: var(--ink);
	color: #fff;
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.page-head p {
	color: rgba(255, 255, 255, 0.75);
	max-width: 55ch;
	margin: 0;
}

.page-head h1 {
	margin-bottom: 0.3em;
}


/* Media */

.figure {
	margin: 0 0 var(--gap);
}

.figure img {
	border-radius: var(--radius);
	width: 100%;
}

.figure figcaption {
	font-size: 0.9rem;
	color: var(--ink-soft);
	margin-top: 0.6rem;
}

.logo-row {
	display: flex;
	justify-content: center;
	gap: var(--gap);
	flex-wrap: wrap;
	align-items: center;
}

.logo-row img {
	width: 190px;
}


/* Timetable, built from the published Google Sheets */

/* Timetable.

   Deliberately plain: every slot is a stack of ordinary paragraphs. No fixed
   column widths, no nowrap, no per-breakpoint column templates and no
   side-by-side tables. Text wraps, so nothing can push the page sideways —
   which is what the earlier grid version did on a real phone. */

.schedule + .schedule { margin-top: var(--section); }

.schedule__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.3rem 0.75rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--ink);
	margin-bottom: 0.75rem;
}

.schedule__head h3 { margin: 0; text-transform: uppercase; letter-spacing: 0.02em; }

.schedule__status {
	margin: 0;
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.schedule__list { list-style: none; margin: 0; padding: 0; }

.slot { padding: 0.6rem 0; border-top: 1px solid var(--line); }
.slot:first-child { border-top: 0; }

.slot__when {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.7rem;
	margin: 0 0 0.15rem;
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
	color: var(--ink-soft);
}

.slot__age {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	color: var(--accent-deep, #0b6ea8);
}

.slot__game { margin: 0; font-weight: 600; line-height: 1.4; }
.slot__game + .slot__game { margin-top: 0.15rem; }
.slot__game i { font-style: normal; font-weight: 400; color: var(--ink-soft); }

.slot__where {
	font-size: 0.72rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.slot--break .slot__game { font-weight: 400; color: var(--ink-soft); }

/* Gallery */

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
	gap: 12px;
}

.gallery button {
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	border-radius: 0;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	display: block;
}

.gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery button:hover img {
	transform: scale(1.04);
	filter: saturate(1.1);
}


/* Lightbox */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: rgba(13, 17, 23, 0.95);
	display: none;
	align-items: center;
	justify-content: center;
	padding: clamp(0.5rem, 3vw, 2.5rem);
}

.lightbox.is-open {
	display: flex;
}

.lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 0;
}

.lightbox button {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: 0;
	border-radius: 0;
	width: 48px;
	height: 48px;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.lightbox button:hover {
	background: rgba(255, 255, 255, 0.25);
}

.lightbox__close {
	top: 1rem;
	right: 1rem;
}

.lightbox__prev {
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

.lightbox__next {
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
}


/* Contact card */

.person {
	display: grid;
	grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: clamp(1.25rem, 3vw, 2rem);
}

.person img {
	border-radius: var(--radius);
	width: 100%;
}

.person h2 {
	margin-bottom: 0.15em;
}

.person__role {
	color: var(--ink-soft);
	margin-bottom: 1rem;
}

.person__contact {
	list-style: none;
	margin: 0;
	padding: 0;
	font-weight: 600;
}

.person__contact li + li {
	margin-top: 0.35rem;
}

@media (max-width: 640px) {
	.person {
		grid-template-columns: 1fr;
	}
}


/* Footer */

/* Light, so the logo can keep its own black and ice blue. */
.site-footer {
	background: var(--paper);
	color: var(--ink-soft);
	border-top: 3px solid var(--ink);
	padding-block: var(--section);
	text-align: center;
}

.site-footer img {
	width: 240px;
	margin: 0 auto 1.5rem;
}

.site-footer a {
	color: var(--ink);
	font-weight: 600;
}

.site-footer a:hover {
	color: var(--ice-dark);
}

.site-footer nav {
	display: flex;
	justify-content: center;
	gap: 1.25rem;
	flex-wrap: wrap;
	margin-bottom: 1.25rem;
}

.site-footer small {
	display: block;
	margin-top: 1.5rem;
	color: var(--ink-soft);
}
