/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
	--color-teal: #44c0ca;
	--color-teal-dark: #39adb7;
	--color-navy: #034596;
	--color-navy-dark: #02337a;
	--color-white: #ffffff;
	--color-text: #034596;
	--color-sand: #ffeee0;
	--color-salmon: #ffa8a5;
	--color-bg-post: #d8eef0;

	--font-main: "sofia-pro", sans-serif;

	--logo-badge-main-size: 320px;
	--logo-badge-size: 190px;
	--section-max-width: 1200px;
	--section-wide-max-width: 1600px;
	--section-px: 2.5rem;

	--wave-height-xl: 33svh;
	--wave-height-md: 20svh;
	--wave-height-sm: 15svh;
}

/* ============================================================
   ENTRANCE ANIMATIONS
   Triggered by .is-visible class added via IntersectionObserver.
   Respects prefers-reduced-motion.
   ============================================================ */
@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(22px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Elements that animate on scroll — start hidden */
.anim-fade-up {
	opacity: 0;
}

.anim-fade-up.is-visible {
	animation: fadeUp 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* Stagger intro h1 vs paragraph */
.intro__content h1.anim-fade-up.is-visible {
	animation-delay: 0ms;
}

.intro__content p.anim-fade-up.is-visible {
	animation-delay: 110ms;
}

/* Stagger feed heading vs buttons */
.feed__heading.anim-fade-up.is-visible {
	animation-delay: 0ms;
}

.feed__buttons.anim-fade-up.is-visible {
	animation-delay: 90ms;
}

/* Feed posts stagger via inline --delay CSS var set in JS */
.feed__post {
	opacity: 0;
}

.feed__post.is-visible {
	animation: fadeUp 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
	animation-delay: var(--anim-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
	.anim-fade-up,
	.anim-fade-up.is-visible,
	.feed__post,
	.feed__post.is-visible {
		animation: none;
		opacity: 1;
	}
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-main);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-white);
	overflow-x: hidden;
}

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

a {
	color: inherit;
	text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	text-wrap: pretty;
	line-height: 1.3;
}

/* ============================================================
   LANGUAGE SWITCH
   Fixed top-right pill, floats above the hero.
   ============================================================ */
.lang-switch {
	position: fixed;
	top: 1rem;
	right: 1.25rem;
	z-index: 200;
}

.lang-switch__btn {
	display: inline-block;
	padding: 0.3rem 0.85rem;
	border-radius: 9999px;
	background: rgba(3, 69, 150, 0.72);
	color: #fff;
	font-family: var(--font-main);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-decoration: none;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	transition: background 0.18s ease;
}

.lang-switch__btn:hover {
	background: rgba(3, 69, 150, 0.95);
}

/* ============================================================
   LOGO BADGE
   Appears at wave peaks (hero→intro and feed→footer).
   Positioned absolute within its wave container.
   ============================================================ */
.logo-badge {
	position: absolute;
	top: 15%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: var(--logo-badge-size);
	aspect-ratio: 1/1;
	z-index: 10;
}

.logo-badge img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
	position: relative;
	height: 60svh; /* svh = small viewport height, avoids mobile chrome */
	min-height: 560px;
	overflow: visible; /* wave element can bleed below the section boundary */
}

/* Inner wrapper clips the sliding images to the hero bounds */
.hero__slides {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.hero__slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 1.4s ease-in-out;
}

/* <picture> and its <img> fill the slide wrapper */
.hero__slide picture {
	position: absolute;
	inset: 0;
	display: block;
}

.hero__slide picture img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hero__slide.active {
	opacity: 1;
}

/* Photo credit — vertical text, right edge of hero */
.hero__credit {
	position: absolute;
	right: 0.55rem;
	bottom: 13.3%;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-size: 0.66rem;
	font-family: var(--font-main);
	font-weight: 400;
	color: #fff;
	transition: opacity 1.4s ease-in-out;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
	letter-spacing: 0.05em;
	pointer-events: none;
	z-index: 3;
	white-space: nowrap;
}

.hero__credit.active {
	opacity: 0.72;
}

/* Wave sits flush at the hero bottom and extends 1px below
   so it meets the intro section without a hairline gap */
.hero__wave {
	position: absolute;
	bottom: calc((var(--wave-height-xl) / -2) - 1px);
	left: 0;
	right: 0;
	/*z-index: 1;*/
}

.hero__wave svg {
	display: block;
	width: 100%;
	height: var(--wave-height-xl);
}

/* Logo badge is centered on the wave peak (top-center of the SVG) */
.hero__wave .logo-badge {
	/* inherits .logo-badge positioning: top:0; left:50%; translate(-50%,-50%) */
	width: var(--logo-badge-main-size);
}

/* ============================================================
   INTRO SECTION
   ============================================================ */
.intro {
	background-color: var(--color-teal);
	position: relative;
	/*z-index: -1;*/
	/* Extra top padding so content clears the logo badge that
     overlaps downward from the hero wave above */
	padding-top: 3.5rem;
	text-align: center;
}

.intro__content {
	max-width: var(--section-max-width);
	margin: 0 auto;
	padding: 1rem var(--section-px) 1rem;
}

.intro__content h1 {
	max-width: min(var(--section-max-width), 88%);
	color: var(--color-white);
	font-size: clamp(2.8rem, 5.9vw, 4.4rem);
	font-weight: 800;
	line-height: 1.08;
	margin-bottom: 1.5rem;
	text-wrap: balance;
	hyphens: auto;
	margin-left: auto;
	margin-right: auto;
}

.intro__content p {
	max-width: min(40em, 95%);
	color: var(--color-white);
	font-size: clamp(1.15rem, 2.2vw, 1.33rem);
	line-height: 1.7;
	opacity: 0.92;
	margin: 1em auto;

	&:nth-last-child(1) {
		margin-bottom: 0;
	}

	a {
		font-weight: 600;
		transition: color 0.18s ease;
	}
	a:hover {
		color: var(--color-navy);
		text-decoration: underline;
	}
}

/* Wave at the bottom of the intro section.
   White background makes the feed section seamless.
   The SVG teal path fills the top, curving down at center. */
.intro__wave {
	/*background-color: var(--color-white);*/
	line-height: 0; /* kill any inline baseline gap */
	margin-bottom: -3px;
	margin-top: -3px;
	transform: rotate(180deg);
	z-index: -2;
}

.intro__wave svg {
	display: block;
	width: 100%;
	height: var(--wave-height-md);
}

/* ============================================================
   INSTAGRAM FEED SECTION
   ============================================================ */
.feed {
	background-color: var(--color-white);
	padding: 4rem var(--section-px) 11rem;
	text-align: center;
}

.feed__inner {
	max-width: var(--section-wide-max-width);
	margin: 0 auto;
}

.feed__heading {
	color: var(--color-navy);
	font-size: clamp(1.4rem, 3.2vw, 3rem);
	font-weight: 700;
	margin-bottom: 2rem;
}

/* Social buttons row */
.feed__buttons {
	display: flex;
	justify-content: center;
	gap: 0.85rem;
	flex-wrap: wrap;
	margin-bottom: 3rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1.6rem;
	border-radius: 9999px;
	font-family: var(--font-main);
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
	border: 2px solid transparent;
	text-decoration: none;
	transition:
		background-color 0.18s ease,
		color 0.18s ease,
		border-color 0.18s ease;
}

.btn__icon {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
}

.btn--instagram {
	background-color: var(--color-salmon);
	color: var(--color-navy);
	border-color: var(--color-salmon);
}

.btn--instagram:hover {
	background-color: #ff9896;
	border-color: #ff9896;
}

.btn--facebook {
	background-color: transparent;
	color: var(--color-teal);
	border-color: var(--color-teal);
}

.btn--facebook:hover {
	background-color: var(--color-teal);
	color: var(--color-white);
}

/* Post grid */
.feed__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.6rem;
}

.feed__post {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
	background-color: var(--color-bg-post);
	outline-offset: 3px;
}

.feed__post img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.32s ease;
}

.feed__post:hover img {
	transform: scale(1.05);
}

.feed__post:focus-visible {
	outline: 3px solid var(--color-teal);
}

/* Video indicator badge */
.feed__post-badge {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.65rem;
	pointer-events: none;
}

/* Status / error / empty messages inside the grid */
.feed__status {
	grid-column: 1 / -1;
	padding: 3rem;
	color: var(--color-navy);
	opacity: 0.5;
	font-style: italic;
	font-size: 0.95rem;
}

/* ============================================================
   FOOTER WAVE
   White background (matching feed) with a navy arch rising
   upward. Logo badge sits at the arch peak.
   ============================================================ */
.footer-wave {
	/*background-color: var(--color-white);*/
	color: var(--color-navy);
	position: relative;
	overflow: visible; /* logo badge can extend above */
	line-height: 0;
	margin-bottom: -1px;
}

.footer-wave svg {
	display: block;
	width: 100%;
	height: var(--wave-height-sm);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
	background-color: var(--color-navy);
	color: var(--color-white);
	padding: 2rem var(--section-px) 3rem;
}

.footer__inner {
	max-width: var(--section-max-width);
	margin: 0 auto;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
}

.footer__columns {
	display: flex;
	gap: 3.5rem;
	flex-wrap: wrap;
}

.footer__col {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;

	flex: 1 1 auto;

	&:first-child {
		flex: 1 1 50%;
	}
}

.footer__col-heading {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	opacity: 0.55;
	margin-bottom: 0.2rem;
}

.footer__link {
	color: var(--color-white);
	opacity: 0.85;
	font-size: 0.95rem;
	line-height: 1.8;
	transition: opacity 0.18s ease;
	display: block;
}

.footer__link:hover {
	opacity: 1;
	text-decoration: underline;
}

/* Social icons stacked vertically as in design */
.footer__social {
	display: flex;
	flex-direction: row;
	gap: 0.75rem;
	align-items: center;
	margin-left: auto;
	justify-content: center;
}

.footer__social-link {
	display: flex;
	color: var(--color-white);
	opacity: 0.75;
	transition: opacity 0.18s ease;
}

.footer__social-link:hover {
	opacity: 1;
}

.footer__social-link svg {
	width: 26px;
	height: 26px;
}

.footer__copyright {
	max-width: var(--section-max-width);
	margin: 2rem auto 0;
	font-size: 0.78rem;
	opacity: 0.4;
	text-align: center;
}

/* Cookie settings button in footer */
.footer__cookie-btn {
	background: none;
	border: none;
	padding: 0;
	color: var(--color-white);
	opacity: 0.85;
	font-size: 0.95rem;
	font-family: var(--font-main);
	line-height: 1.8;
	cursor: pointer;
	text-align: left;
	transition: opacity 0.18s ease;
}

.footer__cookie-btn:hover {
	opacity: 1;
	text-decoration: underline;
}

/* ============================================================
   COOKIE CONSENT — extracted from 100syyta.fi/assets/index.css
   ============================================================ */
body .cookie-consent__button {
	display: inline-block;
	background: #034596;
	border: none;
	color: #fff;
	padding: 1em 1.1em;
	cursor: pointer;
	border-radius: 30px;
	font-weight: 600;
	font-size: 0.875em;
	transition: background 0.2s linear;
	position: relative;
	appearance: none;
	-webkit-appearance: none;
}

body .cookie-consent__button:hover {
	filter: none;
}

body .cookie-consent__button--decline {
	background: #fff;
	color: #034596;
	border: 2px solid #034596;
}

body .cookie-consent__button--settings {
	background: none;
	border: none;
	padding: 0;
	color: #034596;
	margin-top: 1em;
}

body .cookie-consent__button--settings:hover {
	text-decoration: underline;
}

body .cookie-consent__overlay label > span:before {
	border-color: #034596;
}

body .cookie-consent__overlay label span {
	border-color: #034596;
}

body .cookie-consent__overlay label input:checked:not(:disabled) + span {
	background: #034596;
}

body .cookie-consent h2 {
	font-size: 2em;
}

body .cookie-consent p {
	font-size: 1.125em;
}

body .cookie-consent a {
	color: #034596 !important;
}

/* ============================================================
   RESPONSIVE — TABLET  (≤ 900px)
   ============================================================ */
@media (max-width: 1100px) {
	.feed__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ============================================================
   RESPONSIVE — SMALL TABLET  (≤ 760px)
   ============================================================ */
@media (max-width: 800px) {
	.feed__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ============================================================
   RESPONSIVE — MOBILE  (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
	:root {
		--logo-badge-main-size: 220px;
		--logo-badge-size: 160px;
	}

	.hero {
		height: 50svh;
		min-height: 400px;
	}

	.hero__wave {
		bottom: calc((var(--wave-height-md) / -3) - 1px);
	}
	.hero__wave svg {
		height: var(--wave-height-md);
	}

	.intro__content {
		padding: 1rem;
	}

	.intro__wave svg {
		height: var(--wave-height-sm);
	}

	.footer-wave svg {
		height: var(--wave-height-md);
	}

	.feed__grid {
		grid-template-columns: repeat(1, 1fr);
		gap: 0.4rem;
	}

	.footer__inner {
		flex-direction: column;
		gap: 1.5rem;
	}

	.footer__social {
		margin-left: 0;
	}

	.footer__columns {
		gap: 2rem;
	}

	.footer__col:first-child {
		flex: 1 1 100%;
	}

	.footer {
		padding: 1.5rem 1rem 2.5rem;
	}
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE  (≤ 380px)
   ============================================================ */
@media (max-width: 380px) {
	:root {
		--logo-badge-size: 110px;
	}

	.intro__content {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	.feed__buttons {
		flex-direction: column;
		align-items: center;
	}
}
