@charset "UTF-8";

/* ---------- fonts (self-hosted, latin + latin-ext) ---------- */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/open-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;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../assets/fonts/open-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: "Kaushan Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/kaushan-script-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: "Kaushan Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/kaushan-script-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;
}

/* ---------- base ---------- */
:root {
  --page: #1b2723;
  --page-deep: #0b0e0d;
  --ink: #212529;
  --muted: #889d94;
  --text-dark-bg: #d7e0dc;
  --accent: #eba73b;
  --accent-hover: #9a693c;
  --accent-ink: #3d290a;
  --ok: #3fbf6f;
  --warn: #f0b429;
  --bad: #e0574f;
  --script: "Kaushan Script", cursive;
  --sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* transparent window of ram-videa.webp, printed by scripts/build-images.py */
  --win-left: 13.605%;
  --win-top: 29.994%;
  --win-width: 75.869%;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--ink);
  background-color: var(--page);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6rem 1.75rem;
  border: 0;
  border-radius: 15px;
  font-family: var(--script);
  font-size: 1.15rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent-ink);
  background-color: var(--accent);
  box-shadow: 0 0.1875rem 0.1875rem rgb(0 0 0 / 10%);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.btn:hover {
  color: #05070c;
  background-color: var(--accent-hover);
}

.btn-small {
  min-height: 2.5rem;
  padding: 0.4rem 1.25rem;
  font-size: 1rem;
}

.btn-ghost {
  color: inherit;
  background: transparent;
  box-shadow: inset 0 0 0 2px currentColor;
}

.btn-ghost:hover {
  color: inherit;
  background: rgb(0 0 0 / 8%);
}

.link-button {
  padding: 0;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-decoration: underline;
  background: none;
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #ecd9b4 url("../assets/img/pozadie-1280.webp") center / cover no-repeat;
  box-shadow: rgb(0 0 0 / 40%) 0 18px 20px;
}

@media (min-width: 900px) {
  .hero {
    background-image: url("../assets/img/pozadie-2560.webp");
  }
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: max(0.75rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgb(255 255 255 / 55%);
  box-shadow: 0 2px 6px rgb(0 0 0 / 15%);
}

.lang-switch button {
  min-width: 2.75rem;
  min-height: 2.25rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 999px;
  font: 600 0.85rem/1 var(--sans);
  letter-spacing: 0.08em;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  color: var(--accent-ink);
  background: var(--accent);
}

.weather {
  flex: none;
  width: 7rem;
  margin: 0;
  padding: 1.1rem 0 1rem;
  font-size: 0.85rem;
  line-height: 1.35;
  text-align: center;
  background: url("../assets/img/oblacik.webp") center / contain no-repeat;
}

.weather > div {
  display: block;
}

.weather dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.weather dd {
  margin: 0;
  font-weight: 600;
}

.intro {
  position: relative;
  z-index: 2;
  width: min(100% - 2rem, 46rem);
  margin: 0.5rem auto 1.5rem;
  padding: 0.9rem 1.15rem 1.15rem;
  border-radius: 1.25rem;
  /* keeps the text readable over the dark trees and clouds of the illustration */
  background: rgb(253 244 225 / 78%);
  box-shadow: 0 8px 24px rgb(60 40 10 / 12%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.intro h1 {
  margin: 0 0 0.15rem;
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1.2;
  color: var(--accent);
  text-shadow: 0 1px 0 rgb(255 255 255 / 40%);
}

.lead {
  margin: 0 0 0.6rem;
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.45;
}

.online {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  font-weight: 300;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.actions .btn {
  flex: 1 1 auto;
}

@media (max-width: 575px) {
  .actions .btn {
    min-height: 2.5rem;
    padding: 0.45rem 0.9rem;
    font-size: 1rem;
    letter-spacing: 0.08rem;
  }
}

.noscript {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgb(255 255 255 / 70%);
}

@media (min-width: 576px) {
  .intro h1 {
    font-size: 2.5rem;
  }

  .lead {
    font-size: 1.2rem;
  }

  .online {
    font-size: 1.05rem;
  }

  .actions .btn {
    flex: 0 0 auto;
  }

  .weather {
    width: 8.5rem;
    padding: 1.6rem 0 1.4rem;
    font-size: 1rem;
  }
}

@media (min-width: 992px) {
  .intro {
    margin-top: 2rem;
  }

  .intro h1 {
    font-size: 3rem;
  }

  .lead,
  .online {
    font-size: 1.35rem;
  }
}

/* ---------- live camera ---------- */
.cam {
  position: relative;
  width: 100%;
  margin: auto 0 0;
  aspect-ratio: 1600 / 1300;
  container-type: inline-size;
}

@media (min-width: 768px) {
  .cam {
    width: min(85vw, 62rem);
  }
}

@media (min-width: 992px) {
  /*
   * Fit the whole camera on screen. The top ~30 % of the frame image is transparent (bird on the
   * beam), so the intro may overlap it by 0.1625 * width. Frame height = 0.8125 * width.
   */
  .hero {
    --cam-w: max(30rem, min(72vw, 70rem, calc((100vh - 26rem) * 1.53)));
    --cam-w: max(30rem, min(72vw, 70rem, calc((100svh - 26rem) * 1.53)));
  }

  .intro {
    margin-bottom: calc(var(--cam-w) * -0.1625);
  }

  .cam {
    width: var(--cam-w);
  }
}

.cam-window {
  position: absolute;
  top: calc(var(--win-top) + 0.6%); /* just below the beam's shadow, keeps the camera timestamp visible */
  bottom: 0;
  left: calc(var(--win-left) - 0.4%);
  width: calc(var(--win-width) + 0.8%);
  overflow: hidden;
  background: radial-gradient(circle at 30% 45%, #20232b 0%, #0f131c 70%);
}

.cam-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  visibility: hidden;
}

.cam.has-frame .cam-image {
  visibility: visible;
}

.cam-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.cam-offline {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4%;
  padding: 4% 6% 0;
  color: #f3f1ea;
  background: radial-gradient(circle at 30% 45%, #20232b 0%, #0f131c 70%);
}

.cam[data-state="offline"] .cam-offline {
  display: flex;
}

.cam-offline img {
  width: 22%;
  height: auto;
}

.cam-offline-text p {
  margin: 0;
}

.bubble {
  display: inline-block;
  margin-bottom: 0.6em !important;
  padding: 0.3em 0.7em;
  font-family: var(--script);
  font-size: 1rem;
  font-size: clamp(0.8rem, 3.6cqw, 1.9rem);
  background: rgb(255 255 255 / 12%);
}

.cam-offline-title {
  font-size: 1.1rem;
  font-size: clamp(0.95rem, 4.6cqw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
}

.cam-offline-hint {
  margin-top: 0.4em !important;
  font-size: 0.8rem;
  font-size: clamp(0.7rem, 2.2cqw, 1.1rem);
  opacity: 0.75;
}

.cam-status {
  position: absolute;
  top: calc(var(--win-top) + 2.5%);
  right: calc(100% - var(--win-left) - var(--win-width) + 2%);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgb(0 0 0 / 55%);
}

.cam-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--warn);
  animation: pulse 1.2s ease-in-out infinite;
}

.cam[data-state="live"] .cam-dot {
  background: var(--bad);
}

.cam[data-state="offline"] .cam-dot {
  background: #8a8f98;
  animation: none;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

/* ---------- history / gallery ---------- */
.history {
  padding: 3rem max(1rem, env(safe-area-inset-right)) 4rem max(1rem, env(safe-area-inset-left));
  color: var(--text-dark-bg);
}

.history-inner {
  width: min(100%, 72rem);
  margin-inline: auto;
}

.history h2 {
  margin: 0 0 1rem;
  font-family: var(--script);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--accent);
}

.history-msg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.history-msg-text {
  margin: 0;
}

.day + .day {
  margin-top: 2rem;
}

.day-title {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.75rem;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--page);
}

.day-date {
  font-weight: 300;
}

.day-count {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--muted);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .thumbs {
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  }
}

.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0.5rem;
  background: #26332e;
  cursor: zoom-in;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.thumb.is-missing img {
  visibility: hidden;
}

@media (hover: hover) {
  .thumb:hover img {
    transform: scale(1.08) rotate(-2deg);
  }
}

/* ---------- lightbox ---------- */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  background: rgb(5 7 6 / 94%);
  touch-action: pan-y;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgb(0 0 0 / 60%);
}

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(100%, 64rem);
  max-height: 100%;
  margin: 0;
  padding: 3.5rem 0.5rem 1rem;
}

.lb-image {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  max-height: calc(100svh - 7rem);
  object-fit: contain;
  border-radius: 0.25rem;
  background: #111;
}

.lightbox.is-loading .lb-image {
  opacity: 0.4;
}

.lightbox.is-error .lb-image {
  display: none;
}

.lb-caption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  text-align: center;
}

.lb-btn {
  position: absolute;
  z-index: 1;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  font: 2rem/1 var(--sans);
  color: #fff;
  background: rgb(255 255 255 / 12%);
  cursor: pointer;
}

.lb-btn:hover {
  background: rgb(255 255 255 / 25%);
}

.lb-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.lb-close {
  top: max(0.5rem, env(safe-area-inset-top));
  right: 0.5rem;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev {
  left: 0.5rem;
}

.lb-next {
  right: 0.5rem;
}

/* ---------- footer ---------- */
.footer {
  padding: 1.5rem 1rem max(1.5rem, env(safe-area-inset-bottom));
  font-size: 0.85rem;
  text-align: center;
  color: var(--muted);
  background-color: var(--page-deep);
}

.footer p {
  margin: 0.25rem 0;
}

.footer-donate {
  font-size: 1rem;
  color: var(--text-dark-bg);
}

.footer-donate a {
  font-family: var(--script);
  color: var(--accent);
}

.heart {
  color: var(--bad);
}

/* ---------- consent banner ---------- */
.consent {
  position: fixed;
  right: 0.75rem;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  left: 0.75rem;
  z-index: 10;
  max-width: 34rem;
  margin-inline: auto;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  color: var(--ink);
  background: #fffaf0;
  box-shadow: 0 10px 30px rgb(0 0 0 / 35%);
}

.consent p {
  margin: 0 0 0.75rem;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
