/* ==========================================================================
   Elsiri app-site template
   --------------------------------------------------------------------------
   One stylesheet, meant to be reused for every app and game on elsiri.de.

   TO REUSE THIS FOR ANOTHER APP, YOU CHANGE TWO THINGS AND NOTHING ELSE:

     1. the --brand-* block directly below
     2. the files in img/  (icon.png, favicon.png, cover.jpg, shot-*.jpg)

   Everything past the brand block is layout and typography that has no opinion
   about which app it is dressing. Nothing here loads from a third party - no
   web fonts, no CDN, no analytics - because the privacy policy says so, and a
   policy that is not true is worse than no policy.
   ========================================================================== */

:root {
  /* ---- BRAND: the only block to touch per app --------------------------- */
  --brand-bg:        #0c0f16;   /* page behind everything                    */
  --brand-bg-2:      #131824;   /* raised panels                             */
  --brand-surface:   #182031;   /* cards                                     */
  --brand-line:      #2a3548;   /* hairlines and card borders                */
  --brand-ink:       #e8ecf4;   /* body text                                 */
  --brand-dim:       #97a3b8;   /* secondary text                            */
  --brand-accent:    #6ea8fe;   /* links and the active language pill        */
  --brand-accent-2:  #4fd1c5;   /* second accent, barely used here           */
  --brand-on-accent: #08111f;   /* text on an accent-filled button           */
  --brand-radius:    18px;
  --brand-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
                Arial, "Noto Sans", sans-serif;
  /* ----------------------------------------------------------------------- */

  --wrap: 1080px;
  --narrow: 660px;
  --gap: 22px;
}

/* --- reset ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-ink);
  font-family: var(--brand-font);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-accent); text-underline-offset: 3px; }
a:hover { text-decoration: none; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 6vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); letter-spacing: -.01em; }
h3 { font-size: 1.08rem; margin-top: 1.9em; }
p  { margin: 0 0 1em; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  background: #ffffff10;
  padding: .12em .4em;
  border-radius: 5px;
}

/* --- layout --------------------------------------------------------------- */

.wrap   { max-width: var(--wrap);   margin: 0 auto; padding: 0 22px; }
.narrow { max-width: var(--narrow); margin-left: auto; margin-right: auto; }
main section { padding: 46px 0; }
main section + section { border-top: 1px solid #ffffff0f; }

/* --- hero ----------------------------------------------------------------- */

header.hero {
  text-align: center;
  padding: 0 0 8px;
  background:
    radial-gradient(120% 90% at 50% 0%, #1d3a22 0%, var(--brand-bg) 70%);
}

.hero-cover {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  border-radius: 0 0 26px 26px;
  box-shadow: 0 18px 46px #00000066;
}

.hero-body { padding: 26px 22px 44px; }

.hero .icon {
  width: 96px; height: 96px;
  margin: -76px auto 16px;
  border-radius: 22px;
  border: 3px solid var(--brand-bg);
  box-shadow: 0 10px 26px #00000073;
  position: relative;
}

.tagline {
  color: var(--brand-dim);
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  max-width: 44ch;
  margin: 0 auto 1.5em;
}

.cta {
  display: inline-block;
  background: var(--brand-accent);
  color: var(--brand-on-accent);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .01em;
  padding: 14px 30px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 22px #00000059;
  transition: transform .12s ease;
}
.cta:hover  { transform: translateY(-2px); }
.cta:active { transform: translateY(0); }

.cta-note { color: var(--brand-dim); font-size: .88rem; margin-top: 14px; }

/* --- cards and grids ------------------------------------------------------ */

.card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius);
  padding: 20px 22px;
}
.card.quiet { background: var(--brand-bg-2); }

ul.grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
ul.grid li {
  background: var(--brand-surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius);
  padding: 20px 22px;
}
ul.grid b    { display: block; margin-bottom: .35em; font-size: 1.02rem; }
ul.grid span { color: var(--brand-dim); font-size: .95rem; }

ul.plain { padding-left: 1.15em; }
ul.plain li { margin-bottom: .5em; }

/* --- screenshot carousel --------------------------------------------------- */

/* The window clips; the track slides inside it. Arrows sit outside the window
   on a wide screen and tuck under it when there is no room beside it. */
.carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "prev window next" ". dots .";
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 12px;
}
.carousel-window {
  grid-area: window;
  overflow-x: auto;
  overflow-y: hidden;
  /* The easing lives here rather than in a script-driven tween. A tween has to be
     fed animation frames to arrive at all; this either eases or jumps, but the
     rail always ends up where it was sent. */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* The rail is driven by scrollLeft, so the bar itself is redundant chrome. */
  scrollbar-width: none;
}
.carousel-window::-webkit-scrollbar { display: none; }

.carousel-track {
  list-style: none;
  margin: 0; padding: 6px 0 16px;
  display: flex;
  gap: 16px;
  width: max-content;
}
.carousel-track li { flex: 0 0 auto; }
.carousel-track img {
  display: block;
  width: 240px; height: auto;
  border-radius: 14px;
  border: 1px solid var(--brand-line);
  box-shadow: 0 10px 26px #00000052;
}

.carousel-arrow {
  grid-area: prev;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  padding: 0;
  border: 1px solid var(--brand-line);
  border-radius: 50%;
  background: var(--brand-bg-2);
  color: var(--brand-ink);
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s;
}
.carousel-arrow[data-next] { grid-area: next; }
.carousel-arrow:hover { background: var(--brand-surface); border-color: var(--brand-accent); }
.carousel-arrow:active { transform: scale(.94); }
.carousel-arrow svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}

.carousel-dots {
  grid-area: dots;
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 8px;
}
.carousel-dot {
  width: 9px; height: 9px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--brand-line);
  cursor: pointer;
  transition: background .2s, width .2s;
}
.carousel-dot[aria-selected="true"] { background: var(--brand-accent); width: 22px; border-radius: 5px; }

/* A visible focus ring on everything you can reach with a keyboard. */
.carousel-arrow:focus-visible,
.carousel-dot:focus-visible,
.carousel-track img:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .carousel { grid-template-columns: 1fr; grid-template-areas: "window" "dots"; }
  /* Below this width the arrows are competing with the swipe they duplicate. */
  .carousel-arrow { display: none; }
  .carousel-track img { width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  /* The script also stops advancing on its own. */
  .carousel-window { scroll-behavior: auto; }
  .carousel-arrow, .carousel-dot { transition: none; }
}

.shots-note { color: var(--brand-dim); font-size: .85rem; margin: 0; }

/* --- steps ---------------------------------------------------------------- */

ol.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }
ol.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 46px;
  margin-bottom: 1.1em;
}
ol.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-accent);
  color: var(--brand-on-accent);
  font-weight: 700; font-size: .92rem;
}

/* --- FAQ ------------------------------------------------------------------ */

details.faq {
  border-bottom: 1px solid #ffffff14;
  padding: 14px 0;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex; justify-content: space-between; gap: 14px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--brand-accent); font-weight: 700; }
details.faq[open] summary::after { content: "\2013"; }
details.faq p { margin: .8em 0 .2em; color: var(--brand-dim); }

/* --- language switch (privacy page) --------------------------------------- */

ul.langs { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 28px; }
ul.langs button {
  font: inherit; font-size: .9rem;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--brand-line);
  background: transparent;
  color: var(--brand-dim);
  cursor: pointer;
}
ul.langs button[aria-pressed="true"] {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: var(--brand-on-accent);
  font-weight: 700;
}
html.no-js ul.langs { display: none; }
/* With no JavaScript there are no buttons to switch with, so every language
   section is shown one after another rather than stranding a German or Arabic
   reader - and a scripted compliance crawler - on the English one. */
html.no-js .lang[hidden] { display: block; }
.lang[dir="rtl"] { text-align: right; }
.updated { color: var(--brand-dim); font-size: .88rem; }

/* --- tables (Impressum, data tables) -------------------------------------- */

table.facts { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.facts th, table.facts td {
  text-align: left; vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid #ffffff12;
}
table.facts th { color: var(--brand-dim); font-weight: 600; width: 34%; white-space: nowrap; }

/* --- footer --------------------------------------------------------------- */

footer {
  border-top: 1px solid #ffffff12;
  margin-top: 20px;
  padding: 30px 0 46px;
  color: var(--brand-dim);
  font-size: .9rem;
}
footer a { margin-right: 20px; display: inline-block; }
footer .fine { margin-top: 14px; font-size: .82rem; opacity: .85; }

/* --- accessibility -------------------------------------------------------- */

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cta { transition: none; }
}
