/* ==========================================================================
   Optyk Do Widzenia – main stylesheet
   Mirrors the original Divi layout; breakpoints follow Divi (980 / 767).
   ========================================================================== */

/* Fonts (self-hosted, OFL) ------------------------------------------------ */
@font-face {
	font-family: "Instrument Serif";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(../fonts/instrument-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;
}
@font-face {
	font-family: "Instrument Serif";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(../fonts/instrument-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Instrument Serif";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url(../fonts/instrument-serif-italic-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;
}
@font-face {
	font-family: "Instrument Serif";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url(../fonts/instrument-serif-italic-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Instrument Sans";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(../fonts/instrument-sans-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;
}
@font-face {
	font-family: "Instrument Sans";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(../fonts/instrument-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Tokens ------------------------------------------------------------------ */
:root {
	--blue: #234285;
	--blue-title: #204ca3;
	--ink: #000;
	--white: #fff;
	--serif: "Instrument Serif", Georgia, "Times New Roman", serif;
	--sans: "Instrument Sans", Helvetica, Arial, sans-serif;

	--container: min(80%, 1200px);
	--radius: 60px;
	--gap: 64px;
	--header-h: 80px;

	--fs-body: 18px;
	--fs-display: clamp(2.5rem, 1.5rem + 3.9vw, 4.375rem);   /* 40 → 70 */
	--fs-hero: clamp(2.25rem, 1.2rem + 4.2vw, 4.375rem);     /* 36 → 70 */
	--fs-card: clamp(2rem, 1.5rem + 1.2vw, 2.5rem);          /* 32 → 40 */
	--fs-channel: clamp(1.75rem, 1rem + 2.2vw, 3.125rem);    /* 28 → 50 */
	--section-y: clamp(56px, 6vw, 90px);
}

@media (max-width: 980px) {
	:root {
		--container: min(88%, 760px);
		--radius: 48px;
		--gap: 40px;
		--fs-body: 17px;
	}
}

@media (max-width: 767px) {
	:root {
		--container: calc(100% - 48px);
		--radius: 40px;
		--gap: 32px;
		--fs-body: 16px;
		--header-h: 64px;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) - 16px);
}

body {
	margin: 0;
	font-family: var(--sans);
	font-size: var(--fs-body);
	font-weight: 400;
	line-height: 1.6;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

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

a { color: var(--blue); text-underline-offset: .15em; }

h1, h2, h3, .display {
	margin: 0;
	font-family: var(--serif);
	font-weight: 400;
	color: var(--blue);
	text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
	border-radius: 4px;
}

.container {
	width: var(--container);
	margin-inline: auto;
}

.display {
	font-size: var(--fs-display);
	line-height: 1.1;
	text-align: center;
}

.prose { text-align: center; }

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

.icon { width: 1em; height: 1em; flex: none; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--white);
	color: var(--blue);
	transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Buttons ----------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .6em;
	padding: 10px 35px;
	border: 1px solid currentColor;
	border-radius: 15px;
	font: 400 18px/1.7 var(--sans);
	text-decoration: none;
	transition: background-color .3s, color .3s;
}
.btn--outline { color: var(--white); }
.btn--outline:hover { background: var(--white); color: var(--blue); }
.btn--solid { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn--solid:hover { background: transparent; color: var(--blue); }

/* Header ------------------------------------------------------------------ */
.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
}

.site-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-h);
	padding-inline: clamp(24px, 3vw, 44px);
	transition: height .3s, background-color .3s, box-shadow .3s;
}

.site-header.is-scrolled .site-header__bar {
	height: calc(var(--header-h) - 16px);
	background: rgba(255, 255, 255, .86);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	backdrop-filter: saturate(1.4) blur(12px);
	box-shadow: 0 1px 0 rgba(35, 66, 133, .08);
}

.site-header__logo {
	position: relative;
	z-index: 2;
	color: var(--ink);
	transition: color .3s;
}
.site-header__logo .logo { width: clamp(160px, 18vw, 263px); height: auto; }

.menu-toggle {
	position: relative;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	margin-right: -8px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--blue);
	cursor: pointer;
}

.menu-toggle__icon {
	position: relative;
	width: 28px;
	height: 18px;
}
.menu-toggle__icon span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	transition: transform .3s, opacity .2s, top .3s;
}
.menu-toggle__icon span:nth-child(1) { top: 0; }
.menu-toggle__icon span:nth-child(2) { top: 8px; }
.menu-toggle__icon span:nth-child(3) { top: 16px; }

.menu-open .menu-toggle,
.menu-open .site-header__logo { color: var(--white); }
.menu-open .menu-toggle__icon span:nth-child(1) { top: 8px; transform: rotate(45deg); }
.menu-open .menu-toggle__icon span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle__icon span:nth-child(3) { top: 8px; transform: rotate(-45deg); }
.menu-open .site-header.is-scrolled .site-header__bar { background: transparent; box-shadow: none; backdrop-filter: none; }

.site-menu {
	position: fixed;
	inset: 0;
	z-index: 1;
	display: grid;
	place-items: center;
	padding: var(--header-h) 24px;
	background: rgba(35, 66, 133, .96);
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s, visibility 0s .35s;
}
.site-menu[hidden] { display: grid; }
.menu-open .site-menu { opacity: 1; visibility: visible; transition: opacity .35s; }

.site-menu__list {
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: center;
}
.site-menu__list a {
	display: inline-block;
	padding: .2em .3em;
	font: 400 clamp(32px, 2rem + 1vw, 37px)/1.4 var(--serif);
	color: var(--white);
	text-decoration: none;
}
.site-menu__list a:hover { font-style: italic; }

.menu-open { overflow: hidden; }

/* Hero -------------------------------------------------------------------- */
.hero {
	position: relative;
	display: flex;
	min-height: 96vh;
	min-height: 96svh;
	overflow: hidden;
	isolation: isolate;
	background: var(--blue);
}

.hero__media {
	position: absolute;
	inset: -8% 0 0;
	z-index: -2;
	will-change: transform;
}
.hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(255, 255, 255, .8) 0%, rgba(255, 255, 255, .3) 44%, rgba(35, 66, 133, .9) 100%);
}

.hero__content {
	width: var(--container);
	margin: 0 auto;
	padding: calc(var(--header-h) + 7vh + 10px) 0 7vh;
	text-align: center;
}

.hero__title {
	width: 70%;
	margin-inline: auto;
	font-size: var(--fs-hero);
	line-height: 1.2;
	color: var(--blue-title);
	text-shadow: .03em .03em .03em rgba(255, 255, 255, .25);
}
.hero__title em { font-style: italic; }

.hero__lead {
	width: 40%;
	margin: 50px auto;
	font-size: var(--fs-body);
	line-height: 1.55;
	color: var(--white);
	text-shadow: 0 1px 14px rgba(20, 35, 80, .45);
}

@media (max-width: 980px) {
	.hero { min-height: 80vh; min-height: 80svh; }
	.hero__title { width: 85%; }
	.hero__lead { width: 70%; }
	.btn { font-size: 16px; }
}

@media (max-width: 767px) {
	.hero { min-height: 75vh; min-height: 75svh; }
	.hero::before {
		background: linear-gradient(180deg, rgba(255, 255, 255, .6) 22%, rgba(35, 66, 133, .5) 64%, rgba(35, 66, 133, .8) 100%);
	}
	.hero__content { padding-top: calc(var(--header-h) + 5vh); }
	.hero__title,
	.hero__lead { width: 100%; }
	.hero__lead { margin-block: 32px; }
	.btn { padding-inline: 24px; font-size: 15px; }
}

/* About ------------------------------------------------------------------- */
.about { padding: var(--section-y) 0 calc(var(--section-y) * .6); }

.about__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--gap);
	align-items: start;
}

.about__body { text-align: center; }
.about__body .prose { max-width: 36em; margin: 50px auto; }

.call-bubble {
	display: inline-grid;
	place-items: center;
	width: 180px;
	aspect-ratio: 1 / 1.04;
	margin-top: 10px;
	border-radius: 50%;
	background: var(--blue);
	color: var(--white);
	font: 400 25px/1 var(--serif);
	text-decoration: none;
	transition: transform .4s cubic-bezier(.2, .7, .2, 1), background-color .3s;
}
.call-bubble:hover { transform: scale(1.05); background: var(--blue-title); }

@media (max-width: 980px) {
	.about__grid { grid-template-columns: 1fr; }
	.about__media { max-width: 560px; margin-inline: auto; width: 100%; }
	.about__body .prose { margin: 24px auto 36px; }
	.call-bubble { width: 160px; }
}

/* Philosophy -------------------------------------------------------------- */
.philosophy {
	padding: var(--section-y) 0 calc(var(--section-y) * 1.4);
	/* Original: transparent → blue over the full height. The blue now builds up
	   earlier so the white copy keeps ≥4.5:1 contrast. */
	background: linear-gradient(180deg,
		rgba(35, 66, 133, 0) 0%,
		rgba(35, 66, 133, .14) 12%,
		rgba(35, 66, 133, .72) 26%,
		rgba(35, 66, 133, .94) 55%,
		#234285 100%);
}

.philosophy__title { margin: 0 auto 60px; line-height: 1.2; }

.philosophy__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--gap);
	align-items: start;
}

.philosophy__item {
	max-width: 34em;
	margin: 0 auto 45px;
	text-align: center;
	color: var(--white);
}
.philosophy__item:last-child { margin-bottom: 0; }
.philosophy__item .ornament { width: 44px; height: 44px; margin: 0 auto; }
.philosophy__item p {
	padding-top: 60px;
	text-shadow: 0 1px 10px rgba(20, 35, 80, .25);
}

.philosophy__media {
	position: sticky;
	top: calc(var(--header-h) + 20px);
}

@media (max-width: 980px) {
	.philosophy__title { margin-bottom: 40px; }
	.philosophy__grid { grid-template-columns: 1fr; }
	.philosophy__media { position: static; max-width: 560px; margin: 16px auto 0; width: 100%; }
	.philosophy__item p { padding-top: 24px; }
	.philosophy__item { margin-bottom: 36px; }
	.philosophy {
		background: linear-gradient(180deg,
			rgba(35, 66, 133, 0) 0%,
			rgba(35, 66, 133, .3) 9%,
			rgba(35, 66, 133, .88) 20%,
			#234285 45%);
	}
}

/* Services ---------------------------------------------------------------- */
.services { padding: var(--section-y) 0 30px; }
.services .display { margin-bottom: 70px; }

.services__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px 10px;
}

.service {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 600px;
	padding: 30px 25px 45px;
	border: 1px solid var(--blue);
	border-radius: var(--radius);
	text-align: center;
	transition: background-color .35s, color .35s;
}
.service__num { font-size: var(--fs-body); }
.service__title {
	margin: 25px 0;
	font-size: var(--fs-card);
	line-height: 1;
	transition: color .35s;
}
.service__text { max-width: 30em; }

.service:hover { background: var(--blue); color: var(--white); }
.service:hover .service__title { color: var(--white); }

.services__tagline {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 30px;
}

@media (max-width: 1180px) {
	.service { min-height: 0; }
}

@media (max-width: 980px) {
	.services .display { margin-bottom: 40px; }
	.services__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
	.service { padding: 30px 20px 40px; }
}

@media (max-width: 640px) {
	.services__grid { grid-template-columns: 1fr; }
	.service { padding: 28px 22px 36px; }
	.services__tagline { padding: 32px 0 0; }
}

/* Location & contact (front page footer) --------------------------------- */
.site-footer {
	color: var(--white);
	background: linear-gradient(180deg, #fff 0%, rgba(35, 66, 133, 0) 40%, #234285 100%);
	overflow: hidden;
}
.site-footer--home {
	background: linear-gradient(180deg, #fff 0%, rgba(35, 66, 133, 0) 50%, #234285 99%);
}

.location { padding-top: var(--section-y); color: var(--ink); }
.location__title { margin-bottom: 30px; }
.location .location__lead { text-align: center; margin-bottom: 40px; }

.location__map {
	overflow: hidden;
	border: 1px solid var(--blue);
	border-radius: var(--radius);
	height: 440px;
	background: #e5e3df;
}
.location__map iframe { width: 100%; height: 100%; border: 0; }

.location__nav { margin: 0; text-align: center; }
.location__nav a {
	display: inline-block;
	padding: 15px 0;
	font: 400 25px/1.3 var(--serif);
	color: var(--ink);
	text-decoration: none;
}
.location__nav a:hover { color: var(--blue); }
.location__nav .icon { display: inline-block; margin-left: .3em; vertical-align: -0.1em; transition: transform .3s; }
.location__nav a:hover .icon { transform: translateX(4px); }

.contact-box {
	display: grid;
	grid-template-columns: 2fr 3fr;
	gap: 5.5%;
	align-items: center;
	margin-top: 30px;
	padding: 90px 60px;
	border-radius: var(--radius);
	background: var(--blue);
	color: var(--white);
	text-align: center;
}
.contact-box__text { max-width: 36em; margin-inline: auto; }
.contact-box__or { margin: 0; padding: 20px 0; }
.contact-box__channel {
	margin: 0;
	font: 400 var(--fs-channel)/1.1 var(--serif);
	overflow-wrap: anywhere;
}
.contact-box__channel a { color: inherit; text-decoration: none; }
.contact-box__channel a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

.contact-box__hours {
	display: grid;
	gap: 4px;
	margin: 28px 0 0;
	font-size: .9em;
}
.contact-box__hours div { display: flex; justify-content: center; gap: .6em; }
.contact-box__hours dt { opacity: .8; }
.contact-box__hours dd { margin: 0; }

@media (max-width: 980px) {
	.location__map { height: 400px; }
	.contact-box { grid-template-columns: 1fr; gap: 32px; padding: 64px 30px; }
}

@media (max-width: 767px) {
	.location__map { height: 340px; }
	.location__nav a { font-size: 22px; }
	.contact-box { padding: 56px 24px; }
	.contact-box__channel--email { font-size: clamp(1.5rem, 6.4vw, 1.875rem); }
}

/* Footer ------------------------------------------------------------------ */
.footer-menu { margin: 90px 0; }
.footer-menu__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.footer-menu__list a {
	font: 400 25px/1.6 var(--serif);
	color: var(--blue);
	text-decoration: none;
}
.footer-menu__list a:hover { font-style: italic; }

.footer-logo { padding-top: 10px; line-height: 0; }
.footer-logo__svg { width: 100%; height: auto; color: var(--white); }

@media (max-width: 980px) {
	.footer-menu { display: none; }
	.footer-logo { padding-top: 72px; }
}

/* Generic pages ----------------------------------------------------------- */
.page-wrap { padding: calc(var(--header-h) + 60px) 0 var(--section-y); }
.entry__title { margin-bottom: 40px; }
.entry__content { max-width: 70ch; margin-inline: auto; text-align: left; }
.entry__content h2,
.entry__content h3 { margin: 1.6em 0 .5em; font-size: 1.8em; line-height: 1.15; }

/* Reveal on scroll (only when JS runs) ----------------------------------- */
.js .reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.js .reveal { opacity: 1; transform: none; transition: none; }
	.hero__media { transform: none !important; }
	*, *::before, *::after { transition-duration: .01ms !important; }
}

/* Footer legal links ------------------------------------------------------ */
.footer-legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 24px;
	margin: 0;
	padding: 0 24px;
	font-size: 14px;
}
.footer-legal:not(:has(a, button:not([hidden]))) { display: none; }
.footer-legal a,
.footer-legal__btn {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: var(--white);
	opacity: .85;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
	cursor: pointer;
}
.footer-legal a:hover,
.footer-legal__btn:hover { opacity: 1; }

/* Cookie consent ---------------------------------------------------------- */
.consent {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 200;
	width: min(560px, calc(100% - 24px));
	padding: 28px 30px 26px;
	border: 1px solid var(--blue);
	border-radius: 32px;
	background: var(--white);
	color: var(--ink);
	box-shadow: 0 20px 60px rgba(35, 66, 133, .22);
	font-size: 15px;
	line-height: 1.55;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .35s, transform .35s cubic-bezier(.2, .7, .2, 1);
}
.consent.is-open { opacity: 1; transform: none; }
.consent[hidden],
.consent [hidden] { display: none !important; }
.consent__title {
	margin-bottom: 8px;
	font-size: 30px;
	line-height: 1.1;
}
.consent__text { margin: 0 0 16px; }
.consent__text a { white-space: nowrap; }
.consent__prefs {
	display: grid;
	gap: 10px;
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}
.consent__option {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	cursor: pointer;
}
.consent__option input {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 3px;
	accent-color: var(--blue);
}
.consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}
.consent__btn {
	padding: 8px 18px;
	border: 1px solid var(--blue);
	border-radius: 15px;
	background: transparent;
	color: var(--blue);
	font: 400 15px/1.5 var(--sans);
	cursor: pointer;
	transition: background-color .25s, color .25s;
}
.consent__btn:hover { background: rgba(35, 66, 133, .08); }
.consent__btn--solid { background: var(--blue); color: var(--white); }
.consent__btn--solid:hover { background: var(--blue-title); }

@media (max-width: 767px) {
	.consent {
		right: 12px;
		bottom: 12px;
		padding: 22px 20px 20px;
		border-radius: 24px;
	}
	.consent__title { font-size: 26px; }
	.consent__actions { justify-content: stretch; }
	.consent__btn { flex: 1 1 auto; }
	.consent__btn--solid { flex-basis: 100%; order: -1; }
}
