/* Document root */
:root {
  --foreground-color: #1e1e1e;
  --background-color: #fcfcfc;
  --accent-color: #ff0000;
  --border: 3px solid var(--foreground-color);

  /* Flexbox spacing */
  --flex-gap: 16px;
  --flex-gap-section: 100px;

  /* Fonts */
  --font: Montserrat, sans-serif;

  /* Box shadows */
  --box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);

  color-scheme: light dark;
}

/*
@media (prefers-color-scheme: light) {
  :root {
    --foreground-color: #000000;
    --background-color: #ffffff;
    --accent-color: #ff0000;
  }
}*/

html {
  height: auto;
  width: 100%;
  background-color: var(--background-color);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  margin: 50px auto;
  width: 80%;
  max-width: 1024px;
  color: var(--foreground-color);
  display: flex;
  flex-flow: column;
  gap: var(--flex-gap-section);
}

/* Sections */
section {
  padding: 0px 128px;
}

section > *:nth-child(1) {
	margin-top: 0;
}

/* Header */
section#header {
	padding-bottom: 150px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.0) 80%), url("../img/image1-15.jpg");
	background-size: cover;
	backdrop-filter: blur(10px);
	display: relative;
}

section#header:after {
	content: "LEARN MORE ↓";
	position: fixed;
	bottom: 10px;
	left: 0;
	right: 0;
	text-align: center;
	width: 100%;
	font-weight: 500;
	letter-spacing: 5px;
}

section#header svg {
	width: 400px;
	height: auto;
	color: var(--foreground-color);
}

section#header .subtitle {
	text-align: left;
	font-size: 24px;
	font-style: italic;
	font-weight: 300;
	margin-bottom: 64px;
}

section#header .buttons {
	display: flex;
	align-content: center;
	/* flex-flow: row; */
	justify-content: center;
	gap: var(--flex-gap);
}

section#header div.buttons > a {
	flex: auto;
}

section#header div.buttons button {
	width: 100%;
}

/* Sponsor button */

section#sponsors_link {
	display: flex;
}

section#sponsors_link * {
	flex-grow: 1;
	width: 100%;
}

/* Why us */
section#why-us {
	display: flex;
	flex-flow: row;
	align-content: center;
	justify-content: center;
	gap: var(--flex-gap);
	background: var(--foreground-color);
	color: var(--background-color);
	padding-top: 64px;
	padding-bottom: 64px;
}

section#why-us > div {
	flex-basis: 100%;
	width: 0;
}
section#why-us > hr {
	border-color: var(--background-color);
}

/* Who we are */
section#who-we-are {
	display: flex;
	flex-flow: column;
	gap: var(--flex-gap);
	padding-left: 0;
	padding-right: 0;
}

section#who-we-are > div.grid {
	gap: var(--flex-gap);
	/* justify-content: space-between; */
	flex-grow: 1;
}

section#who-we-are > div.grid > * {
	margin: 0;
}

section#who-we-are > div.grid img {
	height: 246px;
}

section#who-we-are .card {
	flex-grow: 1;
}

/* Past year stats */
section#stats {
	display: flex;
	flex-flow: column;
	gap: var(--flex-gap);
	text-align: center;
}

section#stats h1 {
	font-size: 50px;
}

section#stats > div.grid {
	display: grid;
    grid-template-columns: 200px 200px 200px;
    grid-gap: var(--flex-gap);
	padding-left: 0;
	padding-right: 0;
	flex-flow: unset;
}

section#stats .card {
	display: flex;
	flex-flow: column;
	justify-content: center;
	gap: var(--flex-gap);
	text-align: center;
	font-style: italic;
	width: unset;
	height: unset;
	margin: 0;
}

section#stats .card.image:nth-child(4) {
	grid-column: span 2;
    grid-row: span 2;
}


section#stats .card.image:nth-child(5) {
    grid-row: span 2;
}

section#stats span {
	font-size: 32px;
	font-weight: 800;
	margin: 0;
	font-style: normal;
}

/* (last year) Gallery */
section#gallery {
	display: grid;
    grid-template-columns: 20;
    grid-gap: var(--flex-gap);
	padding-left: 0;
	padding-right: 0;
}

section#gallery div.tile:nth-child(1) {
	grid-column: span 4;
    grid-row: span 2;
}

section#gallery div.tile:nth-child(2) {
	grid-column: span 2;
    grid-row: span 1;
}

section#gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Sponsors */
section#sponsors {
	display: flex;
	flex-flow: column;
	align-content: center;
	justify-content: center;
	gap: var(--flex-gap);
	border: var(--border);
	text-align: center;
	padding-top: 64px;
	padding-bottom: 64px;
}

section#sponsors > a {
	margin-top: 32px;
}

/* Team */
section#team {
	display: flex;
	flex-flow: column;
	justify-content: center;
	padding-left: 0;
	padding-right: 0;
}

section#team h1 {
	text-align: center;
}

/* Components */
/* Horizontal rule */
hr {
	opacity: 0.08;
	border: var(--border);
}

/* Icons */
.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

/* Buttons */
button, a.card, details {
  border: var(--border);
  padding: 8px;
  background: var(--background-color);
  cursor: pointer;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--foreground-color);
  transition: all 0.1s ease;
  box-shadow: var(--box-shadow);
}


button:hover, button:focus, a.card:hover {
  border-color: var(--accent-color);
  color: var(--foreground-color);
  background: var(--background-color);
  transform: translateY(-4px);
}

button > span {
	vertical-align: bottom;
	margin-right: 8px;
}

a:link,
a:link button {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(0, 0, 0, 0.2);
}

/* Columns, rows */
div.grid {
  display: flex;
  flex-flow: wrap;
  justify-content: center;
}

/* Cards */
.card.small {
  width: 200px;
  height: auto;
  padding-bottom: 32px;
}

.card.image {
	margin: 0;
	padding: 0;
}

.card.image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	padding: 0;
}


.card {
  position:relative;
  padding: 32px;
  padding-bottom: 64px;
  width: 300px;
  height: 150px;
  color: var(--background-color);
  background: var(--foreground-color);
  margin: 15px;
}

.card svg {
	width: 100%;
	height: 50px;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
}

.card img {
  width: 100%;
  margin-bottom: 15px;
}

.card span {
	margin-right: 20px;
}

/* Details */

details {
	font-size: 16px;
	letter-spacing: unset;
}

summary {
  font-weight: bold;
  text-decoration: italic;
  margin: -8px -8px 0;
  padding: 8px;
}

details[open] summary {
  border-bottom: var(--border);
  margin-bottom: 8px;
}

/* Rows */

div.row {
	display: flex;
  flex-flow: column;
  gap: var(--flex-gap);
}

/* Small screens */
@media (max-width: 1024px) {
	/* Reduce padding */
	section {
		padding: 64px;
	}

	/* Hide images in Who We Are section */
	section#who-we-are img {
		display: none;
	}

	/* Make Why Us section arranged vertically */
	section#why-us {
		flex-flow: column;
	}

	section#why-us > div {
		width: 100%;
	}

	section#why-us hr {
		width: 100% !important;
		height: 0 !important;
	}

	/* Smaller card widths */
	.card.small {
		width: 127px;
	}
}

@media (max-width: 700px) {
	/* Reduce padding */
	section {
		padding: 32px;
	}

	/* Makes stats arranged vertically */
	section#stats > div.grid {
		display: flex;
		flex-direction: column;
	}

	/* Smaller cards */
	section#stats .card {
		max-height: 256px;
	}

	/* Restyles header */
	section#header {
		background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.5) 70%, rgba(255, 255, 255, 0.3) 95%), url("../img/image1-15.jpg");
	}

	section#header .subtitle {
		text-align: center;
	}

	section#header > div {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	section#header svg {
		width: 80%
	}

	section#header div.buttons {
		flex-direction: column;
	}

	/* Simpler grid card styling */
	section#who-we-are .card {
	  flex-grow: 1;
	  height: auto;
	}

	/* Smaller font size */
	body {
		font-size: 14px;
	}
}

@media (max-width: 500px) {
	/* Smaller body padding */
	body {
		margin: 16px;
		width: calc(100% - 32px);
	}
}
