/* =========================================================================
   Tojiha – stránka „Web ve vývoji“ s fotografií přírody
   Rozvržení podle gdbau.cz: fotka přes celé okno, velké logo, tři panely
   s textem, které se samy přepínají (vyvoj.js), počítadlo 01 / 03.
   Bez externích knihoven a bez cizích serverů.
   Autor: Pavol Girašek
   ========================================================================= */

/* 1. Písma ---------------------------------------------------------------- */
@font-face {
  font-family: "Outfit";
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/outfit-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Outfit";
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/outfit-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: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-400-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-400-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: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-500-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-500-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: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-500-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plex-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plex-700-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: "IBM Plex Sans";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plex-700-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Barvy a proměnné (z brandu Tojiha) ----------------------------------- */
:root {
  --navy: #0e1c33;
  --teal: #2ee0d6;        /* zvýraznění – světlejší tyrkys z křídla loga, čitelný na fotce */
  --blue: #2a9cf5;
  --white: #ffffff;
  --text-2: rgba(255, 255, 255, 0.86);
  --line: rgba(255, 255, 255, 0.42);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --slide-delay: 1.2s;
  color-scheme: dark;
}

/* 3. Základ ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.visually-hidden {
  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: absolute; left: 1rem; top: -4rem; z-index: 50;
  padding: 0.6rem 1rem; border-radius: 3px; background: var(--white); color: var(--navy);
  font-weight: 500; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* 4. Fotografie na pozadí -------------------------------------------------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  /* fotka nereaguje na myš: pravé tlačítko nenabídne „Uložit obrázek“, nejde přetáhnout */
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overflow: hidden;
  background: var(--navy);
}
.bg__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  /* jako na gdbau.cz: fotka se vynoří z rozmazání a tmy, usadí se a pak pomalu „dýchá“ */
  animation: usazeni 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) 350ms both, dych 32s ease-in-out 2.95s infinite alternate;
  transform-origin: 60% 50%;
}
@keyframes usazeni {
  from { opacity: 0; transform: scale(1.14); filter: blur(6px); }
  to   { opacity: 1; transform: scale(1.06); filter: blur(0); }
}
/* na výšku (mobil): výřez s ostrůvkem a horami vlevo */
@media (max-aspect-ratio: 1/1) {
  .bg__img { object-position: 24% 50%; transform-origin: 24% 50%; }
}
@keyframes dych {
  from { transform: scale(1.06); }
  to   { transform: scale(1.14); }
}
/* Ztmavení kvůli čitelnosti textu: nahoře pod logem a dole u patičky víc, uprostřed méně */
.bg__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 48%, rgba(14, 28, 51, 0.25) 0%, rgba(14, 28, 51, 0.55) 100%),
    linear-gradient(180deg, rgba(14, 28, 51, 0.65) 0%, rgba(14, 28, 51, 0.15) 30%, rgba(14, 28, 51, 0.2) 65%, rgba(14, 28, 51, 0.8) 100%);
  /* rozmazání fotky pod textem (jako na gdbau.cz) – text vynikne, fotka zůstane jako atmosféra */
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  pointer-events: none;
}

/* 5. Hlavička --------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem) var(--gutter) 0;
}
.brand { display: inline-flex; }
.brand__logo {
  width: auto;
  height: clamp(2.3rem, 5.5vw, 4.8rem);
}

/* Výběr jazyka (bez JavaScriptu – <details>): jen text, bez rámečků a ikonek */
.lang-menu { position: relative; }
.lang-menu summary {
  display: inline-block;
  padding: 0.4rem 0.1rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--white);
  border-bottom: 1px solid var(--teal);
  cursor: pointer;
  list-style: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--teal); border-color: var(--teal); }
.lang-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  z-index: 20;
  min-width: 11rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  border-radius: 3px;
  background: #0E1C33;
}
.lang-menu a {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-2);
}
.lang-menu a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.lang-menu a[aria-current] { color: var(--teal); }
.lang-menu__code {
  min-width: 1.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

/* 6. Text uprostřed ----------------------------------------------------------- */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vh, 4rem) var(--gutter);
}
.intro {
  width: min(100%, 46rem);
  text-align: center;
}
.intro__title {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 7.5vw, 4.4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}
.intro__title span { display: block; color: var(--teal); }
.intro__lead {
  max-width: 34rem;
  margin: 0 auto 1.4rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--text-2);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
  text-wrap: pretty;
}
.intro__date {
  margin: 0 auto 2.4rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
}
.intro__date time { font-weight: 600; color: var(--teal); white-space: nowrap; }

/* Co Tojiha bude umět – tři sloupce oddělené tenkou čarou */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 44rem;
  margin: 0 auto 2.2rem;
  padding: 1.1rem 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}
.feature {
  padding: 0 1.2rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}
.feature + .feature { border-left: 1px solid rgba(255, 255, 255, 0.22); }
.feature strong { display: block; margin-bottom: 0.2rem; font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--white); }
@media (max-width: 44em) {
  .features { grid-template-columns: 1fr; max-width: 22rem; padding: 0; }
  .feature { padding: 0.8rem 0.5rem; }
  .feature + .feature { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.22); }
}

/* Loga nejdou přetáhnout, označit ani uložit pravým tlačítkem (nejsou to obrázky, ale součást stránky) */
.brand__logo, .site-footer__logo {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* Sdílení – obyčejné textové odkazy */
.share {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.2rem 1.1rem;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.6);
}
.share__btn {
  padding: 0.35rem 0;
  border: 0;
  background: none;
  color: var(--white);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(46, 224, 214, 0.6);
  text-underline-offset: 4px;
  cursor: pointer;
}
.share__btn:hover, .share__btn.is-done { color: var(--teal); text-decoration-color: var(--teal); }
.share__btn[hidden] { display: none; }

/* Najetí textu po načtení (celý blok najednou, až se usadí fotka) */
.intro {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 900ms ease, transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.intro.is-active { opacity: 1; transform: none; transition-delay: var(--slide-delay); }
html:not(.js) .intro { opacity: 1; transform: none; }

/* Ukrajinština: Outfit nemá azbuku → IBM Plex Sans */
:lang(uk) { --font-display: "IBM Plex Sans", system-ui, sans-serif; }
:lang(uk) .intro__title { letter-spacing: -0.015em; }

/* 7. Patička ----------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0 var(--gutter) clamp(1rem, 3vw, 1.6rem);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}
.site-footer__brand { display: inline-flex; align-items: center; gap: 0.85rem; }
.site-footer__logo { display: block; height: 2rem; width: auto; opacity: 0.7; }
.site-footer__made { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.01em; }
.site-footer__right { justify-self: end; text-align: right; }
.site-footer__right a { text-decoration: none; }
.site-footer__right a:hover { color: var(--teal); }
.credit {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
}
.credit a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 40em) {
  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.6rem;
  }
  .site-footer__right { justify-self: center; text-align: center; }
  .site-footer__brand { order: 2; }
  .site-footer__right { order: 1; }
}

/* 8. Omezení pohybu --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bg__img { animation: none; transform: scale(1.06); }
  .intro { transition: none !important; opacity: 1; transform: none; }
}

/* 9. Pomocné */
.site-footer p { margin: 0; }
