/* Shared look of arsosolan.com, taken from the coming-soon home page and the contact page:
   the forest, the fireflies, the header with the logo and the language menu, the footer. */
:root {
  color-scheme: dark;
  --ink: #fffdf6;
  --ink-soft: #f0eee2;
  --lime: #d9ed67;
  --coral: #e15d47;
  --green-dark: #10382e;
  --amber: #f6b25c;
  --serif: Georgia, "Times New Roman", serif;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  --c: 246 178 92; /* warm golden glow */
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--green-dark);
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

/* Forest background matching the main page */
.art {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
}

.art picture,
.art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 45% 60%;
}

.art span {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgb(10 29 25 / 55%), rgb(10 29 25 / 85%) 85%),
    linear-gradient(0deg, rgb(10 29 25 / 65%), rgb(10 29 25 / 25%) 50%, rgb(10 29 25 / 55%) 100%);
}

/* Floating fireflies */
.fireflies {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.fireflies span {
  --dur: 10s;
  --x: 50vw;
  --sway1: 30px;
  --sway2: -20px;
  position: absolute;
  bottom: -10px;
  left: var(--x);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f4f9c4;
  box-shadow: 0 0 10px 2px rgb(217 237 103 / 50%);
  opacity: 0;
  animation: firefly-rise var(--dur) ease-in-out calc(var(--i) * -1.8s) infinite;
  will-change: transform, opacity;
}

@keyframes firefly-rise {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 0.85; }
  50% { opacity: 0.35; transform: translate(var(--sway1), -50vh); }
  70% { opacity: 0.8; }
  100% { opacity: 0; transform: translate(var(--sway2), -105vh); }
}

header,
main,
footer {
  width: min(100% - 48px, 1180px);
  margin-inline: auto;
}

header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

header {
  padding-block: 12px;
}

.header-left {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

/* The author's logo: the handwritten signature with the moon and the rooster
   (docs/logo/podpis). The name stays as text for screen readers. */
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 92px; /* the same header height in every language */
}

/* Cyrillic signature for BG and RU, Latin for the other languages */
.wordmark-logo {
  display: none;
  width: auto;
  height: 92px;
}

.wordmark-logo--lat {
  height: 70px;
}

html[data-lang="bg"] .wordmark-logo--cyr,
html[data-lang="ru"] .wordmark-logo--cyr,
html[data-lang="en"] .wordmark-logo--lat,
html[data-lang="de"] .wordmark-logo--lat,
html[data-lang="cs"] .wordmark-logo--lat {
  display: block;
}

.back-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  min-height: 44px;
  padding: 0 16px;
  background: rgb(10 29 25 / 50%);
  border: 1px solid rgb(255 253 246 / 18%);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

.back-nav-link:hover {
  border-color: var(--lime);
  color: var(--lime);
  background: rgb(10 29 25 / 75%);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* Language switcher: the same component as on the home page */
.lang-switch {
  position: relative;
  z-index: 10;
}

.lang-switch summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgb(10 29 25 / 55%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgb(255 253 246 / 30%);
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.lang-switch summary::-webkit-details-marker,
.lang-switch summary::marker {
  display: none;
}

.lang-switch summary:hover,
.lang-switch[open] summary {
  border-color: var(--lime);
  box-shadow: 0 0 20px rgb(217 237 103 / 25%);
  background: rgb(10 29 25 / 75%);
}

.lang-switch-globe {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--lime);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.lang-switch-caret {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0.7;
  transition: transform 200ms ease;
}

.lang-switch[open] .lang-switch-caret {
  transform: rotate(180deg);
}

.lang-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 185px;
  padding: 6px;
  background: rgb(10 29 25 / 92%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgb(255 253 246 / 20%);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgb(0 0 0 / 50%);
  animation: lang-menu-open 180ms ease-out;
}

@keyframes lang-menu-open {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}

.lang-switch-menu :is(button, a) {
  display: flex;
  text-decoration: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.lang-switch-menu :is(button, a):hover {
  background: rgb(255 253 246 / 10%);
  color: var(--ink);
}

.lang-switch-menu :is(button[aria-pressed="true"], a[aria-current="page"]) {
  color: var(--lime);
  background: rgb(217 237 103 / 12%);
  font-weight: 800;
}

.lang-switch-menu :is(button, a) small {
  color: rgb(255 253 246 / 50%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.lang-switch-menu :is(button[aria-pressed="true"], a[aria-current="page"]) small {
  color: var(--lime);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Multi-language pane visibility */
.pane,
.t {
  display: none;
}

html[data-lang="en"] .pane[lang="en"],
html[data-lang="bg"] .pane[lang="bg"],
html[data-lang="ru"] .pane[lang="ru"],
html[data-lang="de"] .pane[lang="de"],
html[data-lang="cs"] .pane[lang="cs"] {
  display: block;
}

html[data-lang="en"] .t[lang="en"],
html[data-lang="bg"] .t[lang="bg"],
html[data-lang="ru"] .t[lang="ru"],
html[data-lang="de"] .t[lang="de"],
html[data-lang="cs"] .t[lang="cs"] {
  display: inline;
}

/* Main content layout */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: clamp(30px, 6vh, 60px) clamp(40px, 8vh, 80px);
}

/* Footer */
footer {
  padding-block: 4px 12px;
  font-size: 12px;
  color: var(--ink-soft);
  border-top: 1px solid rgb(255 253 246 / 10%);
}

footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 6px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: rgb(255 253 246 / 30%);
  text-underline-offset: 3px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

footer a:hover {
  color: var(--lime);
  text-decoration-color: var(--lime);
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-sep {
  opacity: 0.35;
  user-select: none;
}

/* The publisher after the name; on phones the separators are hidden, so it gets its own line */
.footer-publisher a {
  padding-inline: 2px;
}

@media (max-width: 760px) {
  .footer-publisher {
    display: block;
  }
}

@media (max-width: 760px) {
  header,
  footer {
    width: calc(100% - 32px);
  }

  footer {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0;
  }

  .header-left {
    gap: 10px;
  }

  .wordmark {
    min-height: 66px;
  }

  .wordmark-logo {
    height: 66px;
  }

  .wordmark-logo--lat {
    height: 52px;
  }
}

/* Small phones: the logo, the way home and the language button must fit in one row */
@media (max-width: 480px) {
  header {
    gap: 8px;
  }

  .header-left {
    gap: 6px;
  }

  .wordmark {
    min-height: 52px;
  }

  .wordmark-logo {
    height: 48px;
  }

  .wordmark-logo--lat {
    height: 38px;
  }

  /* The logo already leads home: keep the arrow, hide the words (still read aloud) */
  .back-nav-link {
    justify-content: center;
    min-width: 44px;
    padding-inline: 10px;
  }

  .back-nav-link .t {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* No moving lights, no sliding menu for visitors who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  .fireflies {
    display: none;
  }

  .lang-switch-menu {
    animation: none;
  }
}
