/* netbrains.ch apps: shared styles. No external fonts or requests (see the privacy policy). */

:root {
  --ink: #2a1a10;          /* outline brown from the game */
  --text: #2a1a10;
  --muted: #6b5443;
  --bg-top: #8fd8ff;       /* sunny sky */
  --bg-bottom: #fff6dc;    /* sand */
  --card: #fffaf0;
  --card-2: #f6e7c8;
  --accent: #ffcf3d;       /* game button yellow */
  --accent-2: #ff8a1e;
  --pink: #ff5a8a;
  --green: #8ad65a;
  --link: #b8420f;
  --shadow: #2a1a10;
  --edge: #2a1a10;        /* card outlines (lighter in dark mode so they stay visible) */
  --radius: 22px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #fbefd9;
    --muted: #cdb89c;
    --bg-top: #10283a;     /* island at night */
    --bg-bottom: #17130f;
    --card: #2a2119;
    --card-2: #382b20;
    --link: #ffcf3d;
    --shadow: #000;
    --edge: #6b4c33;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg-bottom);
  background-image: linear-gradient(180deg, var(--bg-top) 0, var(--bg-bottom) 520px);
  background-repeat: no-repeat;
}

a { color: var(--link); font-weight: 700; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
a:focus-visible, .btn:focus-visible, .app-card:focus-visible { outline: 4px solid var(--pink); outline-offset: 3px; }

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

.wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px; }

/* ---- header ---- */
.site-head { padding: 18px 0 8px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  display: inline-block;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .2px;
  color: var(--ink);
  background: var(--accent);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 3px 14px 4px;
  box-shadow: 0 4px 0 var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; transform: translateY(1px); box-shadow: 0 3px 0 var(--ink); }
.crumb { font-size: 15px; font-weight: 700; }

main { flex: 1 0 auto; padding: 12px 0 32px; }

/* ---- hero ---- */
.hero { text-align: center; padding: 22px 0 12px; }
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  color: var(--text);
}
.hero p { margin: 0 auto; max-width: 560px; font-size: 18px; }

.logo { display: block; width: 100%; max-width: 520px; margin: 4px auto 6px; }

.tagline { font-size: 19px; font-weight: 700; max-width: 560px; margin: 0 auto; }

/* ---- cards ---- */
.card {
  background: var(--card);
  border: 4px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--shadow);
  padding: 20px;
  margin: 22px 0;
}
.card h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.2; font-weight: 900; }
.card h3 { margin: 18px 0 6px; font-size: 19px; font-weight: 900; }
.card p { margin: 0 0 12px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.section-title { font-size: 22px; font-weight: 900; margin: 28px 0 0; }

/* app list on the home page */
.apps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 18px; }
@media (min-width: 700px) { .apps { grid-template-columns: 1fr 1fr; } }
.app-card {
  display: flex;
  gap: 16px;
  align-items: center;
  height: 100%;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  border: 4px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.app-card:hover { text-decoration: none; transform: translateY(2px); box-shadow: 0 4px 0 var(--shadow); }
.app-card img {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 20px;
  border: 3px solid var(--ink);
}
.app-card .name { display: block; font-size: 20px; font-weight: 900; line-height: 1.2; }
.app-card .desc { display: block; font-weight: 400; font-size: 15.5px; margin-top: 4px; color: var(--muted); }
.app-card .go { display: inline-block; margin-top: 8px; font-size: 15px; font-weight: 800; color: var(--link); }

/* ---- app page ---- */
.app-hero { text-align: center; padding: 6px 0 4px; }
.app-hero .icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  border: 4px solid var(--ink);
  box-shadow: 0 5px 0 var(--shadow);
  margin-top: 10px;
}
.app-hero h1 {
  /* the logo carries the name visually; the h1 stays for screen readers and search engines */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.store { text-align: center; margin: 18px 0 6px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 24px;
  font: 900 19px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--accent);
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--ink);
  text-decoration: none;
}
a.btn:hover { text-decoration: none; transform: translateY(2px); box-shadow: 0 3px 0 var(--ink); }
.btn.soon { background: var(--card-2); color: var(--ink); cursor: default; }
@media (prefers-color-scheme: dark) { .btn.soon { background: #f6e7c8; } }
.btn small { display: block; font-size: 13px; font-weight: 700; }
.store .note { margin: 10px 0 0; font-size: 15px; color: var(--muted); }

.features { margin: 8px 0 12px; padding: 0; list-style: none; }
.features li { position: relative; padding-left: 30px; margin: 8px 0; }
.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .38em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--ink);
}
.features li:nth-child(3n+2)::before { background: var(--pink); }
.features li:nth-child(3n)::before { background: var(--green); }

.closing { font-weight: 800; font-size: 18px; }

/* screenshot strip: hidden until at least one <img> is placed inside .shots-row */
.shots:not(:has(img)) { display: none; }
.shots-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 14px;
  margin: 0 -4px;
}
.shots-row img {
  flex: 0 0 auto;
  width: 220px;
  max-width: 62vw;
  height: auto;
  border: 4px solid var(--ink);
  border-radius: 18px;
  scroll-snap-align: start;
  background: var(--card-2);
}

/* ---- privacy policy ---- */
.policy .updated { margin: 0 0 14px; font-style: italic; color: var(--muted); }
.policy h2 { font-size: 21px; margin: 24px 0 6px; }
.policy h2:first-of-type { margin-top: 8px; }
.policy ul { margin: 6px 0 12px; padding-left: 22px; }
.policy li { margin: 4px 0; }
.policy .short {
  background: var(--card-2);
  border: 3px solid var(--edge);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 8px 0 4px;
}
.policy .short h2 { margin-top: 0; }
.policy .short p { margin: 0; font-weight: 700; }

/* ---- 404 ---- */
.lost { text-align: center; }
.lost .big { font-size: clamp(64px, 20vw, 120px); font-weight: 900; line-height: 1; margin: 10px 0 0; color: var(--accent-2); }
.lost p { font-size: 18px; }
.lost .btn { margin-top: 10px; }

/* ---- footer ---- */
.site-foot {
  flex-shrink: 0;
  padding: 18px 0 calc(22px + env(safe-area-inset-bottom));
  font-size: 15px;
  text-align: center;
  color: var(--muted);
  border-top: 3px dashed color-mix(in srgb, var(--muted) 45%, transparent);
}
.site-foot p { margin: 0; }
.site-foot .sep { margin: 0 6px; }

/* ---- game mini site (valentinas-adventure) ---- */
nav.crumb { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; }
.app-hero .store { margin-top: 14px; }

.story { display: flex; gap: 18px; align-items: flex-start; }
.story .icon {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  border: 4px solid var(--ink);
  margin: 0;
}
@media (max-width: 520px) {
  .story { flex-direction: column; align-items: center; text-align: center; }
}

.feature-grid { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.feature-grid li {
  background: var(--card);
  border: 4px solid var(--edge);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--shadow);
  padding: 12px 16px 14px;
  font-size: 16px;
  border-top-width: 10px;
  border-top-color: var(--accent);
}
.feature-grid li:nth-child(4n+2) { border-top-color: var(--pink); }
.feature-grid li:nth-child(4n+3) { border-top-color: var(--green); }
.feature-grid li:nth-child(4n) { border-top-color: #5ab8ff; }
.feature-grid b { display: block; font-size: 18px; font-weight: 900; margin-bottom: 2px; }
.closing { text-align: center; margin: 22px 0 0; }

.cast { list-style: none; margin: 0; padding: 0; }
.cast > li { display: flex; gap: 18px; align-items: flex-start; margin: 16px 0; }
.cast > li > img {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: #bfe8ff;
  padding: 4px;
}
.cast > li:nth-child(2) > img { background: #ffd9a8; }
.cast > li:nth-child(3) > img { background: #d8f5c0; }
.cast h3 { margin: 0; font-size: 22px; }
.cast .role { margin: 0 0 8px; font-weight: 800; color: var(--accent-2); }
.quotes { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.quotes li {
  background: var(--card-2);
  border: 3px solid var(--ink);
  border-radius: 14px 14px 14px 4px;
  padding: 3px 10px;
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
}
@media (max-width: 520px) {
  .cast > li { flex-direction: column; align-items: center; text-align: center; }
  .quotes { justify-content: center; }
}

.shots .shots-row { margin-top: 12px; }
.more p { margin: 0 0 10px; }

/* ---- changelog ---- */
.release-head { margin-bottom: 10px; }
.release-head h2 { margin: 0; }
.release .meta { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.release .meta span, .release .meta time {
  font-size: 14px;
  font-weight: 800;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 1px 10px;
  color: var(--ink);
  background: var(--accent);
}
.release .meta .soon { background: var(--card-2); }
@media (prefers-color-scheme: dark) { .release .meta .soon { background: #f6e7c8; } }
