@charset "UTF-8";
/*
Osobnosti ČKAIT
Author: Jindřich Sládek
Author URI: https://digisvet.cz/
*/



/* ============================================================
   FONTS
   ============================================================ */

@font-face {font-family: 'GeneralSans'; src: url('fonts/GeneralSans-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap;}
@font-face {font-family: 'GeneralSans'; src: url('fonts/GeneralSans-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap;}
@font-face {font-family: 'GeneralSans'; src: url('fonts/GeneralSans-Medium.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap;}
@font-face {font-family: 'GeneralSans'; src: url('fonts/GeneralSans-MediumItalic.woff2') format('woff2'); font-weight: 600; font-style: italic; font-display: swap;}
@font-face {font-family: 'GeneralSans'; src: url('fonts/GeneralSans-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap;}
@font-face {font-family: 'GeneralSans'; src: url('fonts/GeneralSans-BoldItalic.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap;}
@font-face {font-family: 'Symbols'; src: url('fonts/Symbols-CKAIT.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap;}



/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */

:root {
	--page-padding: clamp(1rem, 5vw, 6rem);
}



/* ============================================================
   RESET
   ============================================================ */

*, *::before, *::after {box-sizing: border-box; margin: 0;}
html {color-scheme: light; background: white; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased;}
body {min-height: 100vh; min-height: 100dvh;}
img {display: block; max-width: 100%;}
button {font: inherit;}
:focus-visible {outline: 2px solid currentColor; outline-offset: 2px;}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}



/* ============================================================
   BASE — body, typography, lists
   ============================================================ */

body {color: #111; background: #fff; line-height: 1.5; font-size: clamp(1rem, 1.25vw, 1.5rem); font-family: GeneralSans, system-ui, -apple-system, "Segoe UI", sans-serif; max-width: 80em; margin-inline: auto;}

h1 {font-size: 2.5em; margin-bottom: .2em;}
h2 {font-size: 2em; margin-bottom: .25em;}
h3 {font-size: 1.5em; margin-bottom: .5em;}
h4 {font-size: 1.25em; margin-top: 1em; margin-bottom: .5em;}
h5 {font-size: 1em; margin-top: 1em; margin-bottom: .5em;}
h1, h2, h3, h4, h5 {line-height: 1.25;}
h1, h2, h3 {text-wrap: balance;}
h4, h5 {text-wrap: pretty;}

p {margin-bottom: .5em; text-wrap: pretty;}

a {color: inherit;}
a:hover {color: #a9872a; text-decoration: underline;}

ul {padding-inline-start: 1.5em; margin-bottom: .5em; list-style-type: disc;}
nav ul {margin: 0; padding: 0; list-style-type: none;}



/* ============================================================
   UTILITY
   ============================================================ */

.sr-only, main > dl dt {position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;}



/* ============================================================
   LAYOUT — header, main, hero, footer
   ============================================================ */

/* --- header --- */

body > header {display: flex; align-items: center; justify-content: space-between; gap: 1em; min-height: 6em; margin-inline: var(--page-padding);}

header h1 {margin: 0; font-size: 3em; line-height: 1; font-weight: 400; text-transform: uppercase; text-wrap: balance;}
header h1 a {color: inherit; text-decoration: none;}
header h1 a:hover {color: #a9872a; text-decoration: none;}

header > a {flex-shrink: 0; display: block; width: 1em; height: 1em; font-family: 'Symbols'; font-size: 4em; line-height: 1; color: inherit; text-decoration: none;}
header > a:hover {color: #a9872a; text-decoration: none;}

/* --- main --- */

main {display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2em; align-items: start; margin-inline: var(--page-padding);}
main section, main aside {margin-bottom: 1em;}

/* dva sloupce: rozhovor vlevo, údaje (dl) a životopis vpravo pod sebou */
main > div {grid-column: 1; grid-row: 2 / span 2;}
main > dl, aside {grid-column: 2;}
main > dl {grid-row: 2;}
aside {grid-row: 3;}
/* výšku navíc od dlouhého rozhovoru dostane jen řádek se životopisem, ne řádek s dl */
main:has(> dl) {grid-template-rows: auto auto 1fr;}

/* --- hero (velká fotka s textem, shodná na indexu i na detailu; přes celou šířku stránky) --- */

/* písmo v hero se plynule zmenšuje s šířkou okna, zbytek stránky drží minimum 1rem */
.hero {grid-column: 1 / -1; position: relative; display: grid; margin: 0 calc(-1 * var(--page-padding)); font-size: clamp(.75rem, 1.25vw, 1.5rem);}
.hero > img {grid-area: 1 / 1; width: 100%; aspect-ratio: 16/9; object-fit: cover;}

.hero > div {grid-area: 1 / 1; align-self: start; width: 20em; margin: 6em 0 0 var(--page-padding); color: white; text-shadow: 0 0 4px black;}
.hero h2 {font-size: 2.5em; font-weight: 400; line-height: 1.125; margin-bottom: 1em;}
.hero h2 strong {font-size: 2em;}
.hero h2:focus, .hero > div:focus {outline: none;}
.hero h2 + p {font-size: 1.75em; line-height: 1.25;}

/* úvodní text na titulní stránce (místo jména a motta) */
/* na užších oknech se písmo zmenšuje s šířkou, aby se text vešel do výšky hero */
.intro p {font-size: min(1.5em, 2.25vw); line-height: 1.25;}
.intro p:last-child {margin-bottom: 0;}

.hero nav {position: absolute; right: var(--page-padding); bottom: 4em; display: flex; gap: 1em;}
.hero nav a {font-family: 'Symbols'; font-size: 4em; line-height: 1; color: white; text-decoration: none; text-shadow: 0 0 4px black;}
.hero nav a:hover {color: #a9872a; text-shadow: none;}

/* na titulní stránce šipka pulzuje září a vybízí ke kliknutí (jen u skutečného intra, ne u mizející vrstvy při přechodu) */
.hero > .intro:not([aria-hidden]) ~ nav a {animation: glow 2s ease-in-out infinite;}
.hero > .intro:not([aria-hidden]) ~ nav a:hover, .hero > .intro:not([aria-hidden]) ~ nav a:focus-visible {animation: none;}

@keyframes glow {
	0%, 100% {text-shadow: 0 0 4px black;}
	50% {text-shadow: 0 0 4px black, 0 0 18px white, 0 0 36px white;}
}

/* --- footer --- */

footer {position: relative; padding-block: 2em; margin-top: 2em; margin-inline: var(--page-padding); border-top: 1px solid currentColor;}
footer section {text-align: center; margin-bottom: 2em;}
footer section:last-child {display: flex; flex-wrap: wrap; justify-content: center; gap: 1em; margin-bottom: 0;}
footer section:first-child p {margin: 0;}
footer section:last-child a {width: 2.5em; height: 2.5em;}
footer section:last-child a:hover {opacity: .7;}
footer section:last-child img {width: 100%; height: 100%; object-fit: contain;}



/* ============================================================
   COMPONENTS
   ============================================================ */

/* --- personalities list --- */

main > nav {grid-column: 1 / -1;}
aside ~ nav {padding-top: 2em; border-top: 1px solid rgb(0 0 0 / .3);}
main > nav > ul {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em;}
main > nav li {aspect-ratio: 16/9; background: #aaa; container-type: inline-size;}
main > nav a {position: relative; display: block; height: 100%; text-decoration: none;}
main > nav a:hover {box-shadow: 0 0 1em rgb(0 0 0 / .5);}
main > nav img {width: 100%; height: 100%; object-fit: cover;}
/* písmo se odvozuje od šířky karty (1em = 1/35 karty, minimum 12px jako dřív), takže jména nelezou do obličejů */
main > nav h3 {position: absolute; top: 2em; left: 2em; width: 40%; margin: 0; color: white; font-size: clamp(.75rem, 2.86cqw, 1.5rem); font-weight: 400; line-height: 1.25;}
main > nav h3 strong {font-size: 1.5em;}

/* --- interview --- */

main > div p {text-align: justify;}
main > div h4 {font-size: 1em; margin-block: 1.5em .75em; text-wrap: balance;}
main > div h4:first-of-type {margin-top: 0;}

/* --- photo gallery --- */

html:has(dialog[open]) {overflow: hidden;}

.photo-gallery > ul {display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1em; padding: 0; margin-bottom: 1em; list-style-type: none;}
.photo-gallery > ul li {aspect-ratio: 4/3;}
.photo-gallery > ul a {display: block; height: 100%; transition: opacity .2s;}
.photo-gallery > ul a:hover {opacity: .8;}
.photo-gallery > ul img {width: 100%; height: 100%; object-fit: cover;}

dialog {inset: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; padding: 0; border: none; background: rgb(0 0 0 / .95);}
dialog[open] {display: flex; align-items: center; justify-content: center;}
dialog::backdrop {background: rgb(0 0 0 / .95);}
dialog:focus {outline: none;}
dialog img {max-width: 100vw; max-height: 100dvh; width: auto; height: auto;}
.photo-gallery dialog p {position: absolute; bottom: 1em; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 8em); padding: .5em 1em; background: rgb(0 0 0 / .6); color: white; font-size: .875em; text-align: center; border-radius: 1.5em; margin: 0;}
dialog button {position: absolute; text-align: center; width: 2.5em; height: 2.5em; padding: 0; background: rgb(0 0 0 / .5); color: white; border: none; border-radius: 50%; font-family: 'Symbols'; font-size: 1.5em; cursor: pointer; transition: background .2s, color .2s; line-height: 2.5em;}
dialog button:hover {background: rgb(0 0 0 / .75); color: #a9872a;}
dialog button:disabled {opacity: .3; cursor: not-allowed;}

dialog .prev {left: 1em; top: 50%; transform: translateY(-50%);}
dialog .next {right: 1em; top: 50%; transform: translateY(-50%);}
dialog .close {top: 1em; right: 1em;}

/* --- souhlas s cookies --- */

.cookie-consent {position: fixed; inset: auto 0 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5em 2em; padding: 1em var(--page-padding); background: #111; color: white; font-size: .875em;}
.cookie-consent p {margin: 0;}
.cookie-consent div {display: flex; gap: 1em;}
.cookie-consent button {padding: .5em 1.5em; background: transparent; color: white; border: 1px solid white; border-radius: 1.5em; cursor: pointer; transition: background .2s, color .2s;}
.cookie-consent button:hover {background: white; color: #111;}
.cookie-settings {padding: 0; background: none; border: none; color: inherit; text-decoration: underline; cursor: pointer;}
.cookie-settings:hover {color: #a9872a;}

/* --- meta sidebar (životopis) --- */

/* autorizace, obor a narození: v HTML hned za hero, aby byly při jednom sloupci pod jménem a mottem */
main > dl {font-size: 1.25em; font-weight: 700;}
main > dl dd {margin: 0 0 .5em;}
main > dl dd:has(+ dd) {margin-bottom: 0;}
main > dl dd:last-child {margin-bottom: 0;}
aside > h3 + * {margin-top: 0;}



/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 641px) {
	.hero > .intro {align-self: center; width: 40em; margin-top: 0;}
}

@media (max-width: 1024px) {
	.photo-gallery > ul {grid-template-columns: repeat(3, minmax(0, 1fr));}
}

@media (max-width: 800px) {
	.hero > div {margin-top: 4em;}
	.hero h2 {font-size: 2em; margin-bottom: .25em;}
}

@media (max-width: 640px) {
	:root {--page-padding: 1rem;}
	body > header {min-height: 4.5em;}
	header h1 {font-size: clamp(1.75em, 6.25vw + .5rem, 3em);}
	header > a {font-size: 3em;}
	.hero {font-size: inherit;}
	.hero > div {grid-area: 2 / 1; width: auto; margin: 1.5em var(--page-padding) 0; color: #111; text-shadow: none;}
	/* mizející text předchozí osobnosti leží přes nový, aby výšku pod fotkou určoval jen nový text a obsah neposkakoval */
	.hero > div[aria-hidden] {position: absolute; inset: 0 0 auto; pointer-events: none;}
	.hero h2 {font-size: 1.25em;}
	.hero h2 + p {font-size: 1.25em;}
	.intro p {font-size: 1.25em;}
	.hero nav {grid-area: 1 / 1 / 2 / 2; bottom: 1em;}
	.hero nav a {font-size: clamp(1.75em, 6.25vw + .5rem, 3em);}
	main {grid-template-columns: minmax(0, 1fr);}
	main > div, main > dl, aside {grid-column: auto; grid-row: auto;}
	main:has(> dl) {grid-template-rows: none;}
	main > dl {margin-top: -1.625rem;}
	main > div p {text-align: left;}
	main > nav > ul {grid-template-columns: minmax(0, 1fr);}
	.photo-gallery > ul {grid-template-columns: repeat(2, minmax(0, 1fr));}
}

/* velké obrazovky (TV): hlavička se přesune přes horní část hero, které začíná úplně nahoře */
@media (min-width: 1921px) {
	body {position: relative;}
	body > header {position: absolute; top: 2em; left: 0; right: 0; z-index: 1; min-height: 0; color: white; text-shadow: 0 0 4px black;}
	header h1 a:hover, header > a:hover {text-shadow: none;}
	.hero > div {margin-top: 9em;}
}
