/*
  Cenotvor — dočasná vstupní stránka
  Mobile-first: základní pravidla jsou pro malé displeje,
  větší rozvržení se přidává až v media queries níže.
*/

:root {
  --petrol: #167f7f;
  --petrol-dark: #075d5d;
  --petrol-deep: #004d4d;
  --petrol-soft: #e6f2f1;
  --orange: #e87522;
  --orange-hover: #c95d12;
  --orange-soft: #fff0e3;
  --paper: #f9f6f2;
  --white: #ffffff;
  --text: #173b3b;
  --muted: #526161;
  --line: #b7d1cc;
  --content-width: 96rem;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 12% 12%, rgba(230, 242, 241, 0.9), transparent 24rem),
    var(--paper);
  color: var(--text);
  font-family: "SUSE", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--petrol);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
  transition: color 240ms ease;
}

a:hover {
  color: var(--orange-hover);
}

a:focus-visible {
  outline: 0.2rem solid var(--orange);
  outline-offset: 0.25rem;
  border-radius: 0.2rem;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  transform: translateY(-200%);
  border-radius: 0.5rem;
  background: var(--petrol-deep);
  color: var(--white);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  overflow: hidden;
}

.page-shell::before {
  position: fixed;
  z-index: 0;
  top: -13rem;
  right: -11rem;
  width: 22rem;
  height: 22rem;
  background: url("./favicon-2.svg") center / contain no-repeat;
  filter: brightness(0) saturate(100%) invert(43%) sepia(20%) saturate(1554%) hue-rotate(131deg) brightness(96%) contrast(86%);
  opacity: 0.12;
  pointer-events: none;
  content: "";
}

.site-header,
.hero,
.site-footer {
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
}

.site-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-block: clamp(0.75rem, 2.4vh, 1.5rem) 0.5rem;
}

.brand-logo {
  width: clamp(9.5rem, 34vw, 15rem);
  height: auto;
}

.hero {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-areas:
    "headline"
    "mascot"
    "action";
  grid-template-rows: auto 19rem auto;
  flex: 1;
  min-height: 0;
  align-items: start;
  align-content: start;
  overflow: visible;
  padding-inline: 1rem;
  padding-block: clamp(2.5rem, 8vh, 4rem) 1rem;
}

.hero-copy {
  display: contents;
}

h1,
h2 {
  margin-top: 0;
  color: var(--petrol-deep);
  line-height: 1.08;
}

h1 {
  position: relative;
  z-index: 3;
  grid-area: headline;
  min-width: 0;
  max-width: 14ch;
  margin-bottom: 0;
  color: var(--petrol);
  font-size: clamp(2.35rem, 9.5vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

h1 em {
  color: var(--petrol-dark);
  font-style: normal;
}

h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.05rem, min(4.4vw, 3vh), 1.55rem);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.announcement {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  max-width: 41rem;
  padding: clamp(0.75rem, 1.8vh, 1.15rem);
  border: 0.0625rem solid rgba(232, 117, 34, 0.25);
  border-left: 0.25rem solid var(--orange);
  border-radius: 0.8rem;
  background: rgba(255, 240, 227, 0.88);
  box-shadow: 0 0.75rem 2rem rgba(23, 59, 59, 0.06);
  backdrop-filter: blur(0.4rem);
}

.announcement-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-size: 1rem;
  font-weight: 800;
}

.announcement p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.82rem, min(3.5vw, 2.2vh), 1rem);
  line-height: 1.5;
}

.announcement a {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.action-block {
  position: relative;
  z-index: 3;
  grid-area: action;
  min-width: 0;
  width: 100%;
  max-width: 41rem;
  margin-top: -5rem;
}

.cta {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: clamp(0.65rem, 1.8vh, 1.1rem);
  padding: 0.65rem 1.05rem;
  border-radius: 0.65rem;
  background: var(--orange);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 240ms ease;
}

.zobacek {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  backface-visibility: hidden;
  will-change: transform;
}

.cta:hover {
  background: var(--orange-hover);
  color: var(--white);
}

.cta:hover .zobacek {
  animation: zobacek-pulse 280ms ease-in-out infinite alternate;
}

.mascot-wrap {
  position: relative;
  z-index: 2;
  grid-area: mascot;
  top: -1.5rem;
  right: -2rem;
  bottom: auto;
  width: 19rem;
  height: 19rem;
  justify-self: end;
  pointer-events: none;
}

.mascot-wrap::before {
  position: absolute;
  z-index: 0;
  top: 5%;
  left: -45%;
  width: 17rem;
  aspect-ratio: 1;
  background: url("./favicon-2.svg") center / contain no-repeat;
  filter: brightness(0) saturate(100%) invert(43%) sepia(20%) saturate(1554%) hue-rotate(131deg) brightness(96%) contrast(86%);
  opacity: 0.1;
  content: "";
}

.mascot {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  filter: drop-shadow(-1rem 1rem 1.5rem rgba(0, 77, 77, 0.16));
}

.mascot-note {
  position: absolute;
  z-index: 2;
  top: 35%;
  left: -5%;
  display: grid;
  width: 7.4rem;
  aspect-ratio: 533 / 232;
  place-items: center;
  padding: 0.4rem 0.75rem 0.55rem;
  transform: rotate(-6deg);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.mascot-note::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url("./znak-samolepka.svg") center / 100% 100% no-repeat;
  content: "";
}

.mascot-note span {
  position: relative;
  z-index: 1;
}

.site-footer {
  position: relative;
  z-index: auto;
  display: flex;
  min-height: 4rem;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding-block: 0.65rem;
  background: transparent;
}

.site-footer::before {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  border-top: 0.0625rem solid rgba(183, 209, 204, 0.8);
  content: "";
}

.site-footer p {
  position: relative;
  z-index: 3;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.maker-link {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  color: inherit;
  transition: opacity 260ms ease;
}

.maker-link:hover {
  opacity: 0.68;
}

.maker-link img {
  width: 6.25rem;
  height: auto;
}

@keyframes zobacek-pulse {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(0.28rem);
  }
}

/* Větší telefony a tablety. */
@media (min-width: 36rem) {
  .site-header,
  .hero,
  .site-footer {
    width: min(100% - 4rem, var(--content-width));
  }

  .hero {
    grid-template-rows: auto 24rem auto;
    width: min(100% - 4rem, var(--content-width));
    padding-inline: 0;
    padding-block: clamp(3rem, 10vh, 6rem) 1rem;
  }

  h1 {
    margin-bottom: 0;
    font-size: clamp(3.2rem, 7vw, 4.5rem);
  }

  .action-block {
    margin-top: -6rem;
  }

  .announcement {
    gap: 1rem;
    padding-inline: 1.35rem;
  }

  .mascot-wrap {
    right: -2rem;
    width: 24rem;
    height: 24rem;
  }
}

/* Desktop: text a maskot dostanou vlastní prostor. */
@media (min-width: 64rem) {
  body {
    height: 100svh;
    min-height: 0;
    overflow: hidden;
  }

  .page-shell {
    height: 100svh;
    min-height: 0;
    overflow: hidden;
  }

  .site-header,
  .hero,
  .site-footer {
    width: min(100% - 10rem, var(--content-width));
  }

  .site-header {
    padding-block: clamp(1rem, 3vh, 2rem) 0.75rem;
  }

  .hero {
    grid-template-areas: none;
    grid-template-columns: minmax(0, 1.4fr) minmax(22rem, 0.6fr);
    grid-template-rows: none;
    min-height: 0;
    align-items: center;
    align-content: stretch;
    overflow: visible;
    padding-block: clamp(0.75rem, 2vh, 1.75rem);
  }

  h1 {
    margin-bottom: clamp(2.4rem, 6vh, 4rem);
    font-size: clamp(2.35rem, 9.5vw, 5.4rem);
  }

  .hero-copy {
    position: relative;
    z-index: 3;
    display: block;
    max-width: 47rem;
    padding-right: 2rem;
  }

  .action-block {
    width: auto;
    margin-top: 0;
  }

  /* Maskot je ukotvený ke svislému středu hera (stejně jako text), ne ke spodku,
     takže na vyšších displejích neujíždí dolů. Posun je v % vlastní výšky.
     grid-area: auto je nutné — jinak se top: 50 % počítá z malé implicitní buňky gridu. */
  .mascot-wrap {
    position: absolute;
    grid-area: auto;
    top: 50%;
    right: calc(50% - 50vw + 0.5rem);
    bottom: auto;
    transform: translateY(-43%);
    width: min(31vw, 27rem);
    height: auto;
    justify-self: auto;
  }

  .mascot-wrap::before {
    width: 29rem;
  }

  .mascot-note {
    top: 16%;
    left: -10%;
    width: 8.8rem;
    padding: 0.5rem 0.9rem 0.7rem;
    font-size: 0.8rem;
  }
}

/* Široké a 4K obrazovky: hlídáme čitelnost pomocí maximální šířky. */
@media (min-width: 100rem) {
  :root {
    --content-width: 112rem;
  }

  body {
    font-size: 1.125rem;
  }

  .hero-copy {
    max-width: 58rem;
  }

  .announcement {
    max-width: 47rem;
  }

  .announcement p {
    font-size: 1.125rem;
  }

  .mascot-wrap {
    right: calc(50% - 50vw + 0.5rem);
    width: 32rem;
  }
}

/* Na nízkých displejích kompozici ještě zhutníme, aby nevznikl svislý posuvník. */
@media (min-width: 64rem) and (max-height: 42rem) {
  .brand-logo {
    width: clamp(8.5rem, 27vw, 12rem);
  }

  .site-header {
    padding-block: 0.55rem 0.25rem;
  }

  .site-footer {
    min-height: 3.35rem;
    padding-block: 0.35rem;
  }

  .maker-link {
    padding: 0;
  }

  .maker-link img {
    width: 5.5rem;
  }

  .mascot-wrap {
    transform: translateY(-42%);
  }
}

/* Plynulé přebarvení respektuje nastavení omezeného pohybu. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
