/* jbdev.hu – Just Bloom Studio. One stylesheet, light and dark, no scripts.
   The only font is Nunito, served from this site (assets/fonts/, OFL). */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito.woff") format("woff");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf9ff;
  --surface: #ffffff;
  --tint: #f1eefb;
  --fg: #1e1a3c;
  --muted: #514c73;
  --line: #ddd7f3;
  --brand: #6b4eff;
  --brand-text: #5a3df0;
  --link-visited: #7a3fa0;
  --pip: #ffd23f;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151228;
    --surface: #1e1a3c;
    --tint: #262048;
    --fg: #f1eefb;
    --muted: #bdb6e3;
    --line: #3a3366;
    --brand-text: #b5a6ff;
    --link-visited: #d3b6f2;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.6;
}

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wrap.doc {
  max-width: 46rem;
}

.skip {
  position: absolute;
  left: -999rem;
  top: 0;
  background: var(--surface);
  color: var(--fg);
  padding: 0.75rem 1rem;
  border-radius: 0 0 0.75rem 0;
  font-weight: 800;
}

.skip:focus {
  left: 0;
  z-index: 2;
}

a {
  color: var(--brand-text);
  overflow-wrap: anywhere;
  text-underline-offset: 0.15em;
}

a:visited {
  color: var(--link-visited);
}

a:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

/* Header and footer */

header.site {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

header.site .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

header.site .logo {
  display: block;
  line-height: 0;
}

header.site .logo img {
  display: block;
  height: 3.25rem;
  width: auto;
}

header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

header.site nav a {
  color: var(--fg);
  font-weight: 800;
  text-decoration: none;
  padding: 0.7rem 0;
}

header.site nav a:hover {
  color: var(--brand-text);
  text-decoration: underline;
}

footer.site {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

footer.site .foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

footer.site p {
  margin: 0 0 0.4rem;
}

footer.site .social {
  display: flex;
  gap: 0.6rem;
  margin: 0;
}

footer.site .social a,
footer.site .social a:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--tint);
  color: var(--fg);
}

footer.site .social a:hover {
  background: var(--brand);
  color: #ffffff;
}

/* Text pages */

main {
  padding: 0 0 1rem;
}

main.doc {
  padding-top: 2rem;
}

h1,
h2,
h3 {
  overflow-wrap: anywhere;
  font-weight: 900;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

main.doc h2 {
  padding-top: 1.25rem;
  border-top: 2px solid var(--line);
}

h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 1.75rem 0 0.5rem;
}

h4 {
  font-size: 1rem;
  font-weight: 800;
  margin: 1.25rem 0 0.25rem;
}

p,
ul {
  margin: 0 0 0.9rem;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

.meta,
.lang-links {
  color: var(--muted);
  font-size: 0.95rem;
}

.lang-links a {
  font-weight: 800;
}

/* Home page */

.hero {
  background: var(--tint);
  padding: 3.5rem 0 3rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 14em;
}

.hero h1 span {
  color: var(--brand-text);
}

.hero .lead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.hero .cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin: 0;
}

.button,
.button:visited {
  display: inline-block;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.125rem;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 1rem;
}

.button:hover {
  background: #5a3df0;
}

.sig {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

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

.games > li {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 1.1rem;
  margin: 0;
}

.games .head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.games .icon {
  flex: none;
  width: 4rem;
  height: 4rem;
  border-radius: 0.9rem;
}

.games h3 {
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0;
  min-width: 0;
}

.games p {
  margin: 0;
}

.games .links {
  margin-top: auto;
  padding-top: 0.25rem;
}

.games .alias {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0;
}

.links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.6rem;
  font-size: 0.95rem;
}

.store,
.store:visited {
  display: inline-block;
  border: 2px solid var(--brand);
  color: var(--brand-text);
  font-weight: 800;
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.store:hover {
  background: var(--tint);
}

.about {
  background: var(--tint);
  border-radius: 1.25rem;
  padding: 1.1rem 1.4rem;
  margin: 2rem 0 0;
  max-width: 46rem;
  font-weight: 600;
}

section[id] {
  scroll-margin-top: 1rem;
}

.plain {
  list-style: none;
  padding: 0;
  columns: 18rem 2;
  column-gap: 2rem;
}

@media (max-width: 30rem) {
  header.site .logo img {
    height: 2.75rem;
  }

  .hero {
    padding: 2.25rem 0 2rem;
  }

  .games {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Wood-and-linen hero illustration. The band keeps the illustration's own
   lavender in both themes, so the picture has no visible edge; the copy and
   the picture stay inside the same .wrap width as the rest of the page. */
.hero {
  overflow: hidden;
  padding: 0;
  background: #d9cefb;
  color: #1e1a3c;
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 1.5rem;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
/* The bottom padding lifts the copy a little above the picture's middle. */
.hero-copy { position: relative; z-index: 1; padding-bottom: 1.75rem; }
.hero h1 {
  font-size: clamp(2.4rem, 3.9vw, 3.4rem);
  max-width: 10em;
  line-height: 1.07;
}
/* Two fixed lines: neither part of the headline may break. */
.hero h1 span { color: inherit; display: block; white-space: nowrap; }
.hero h1 .hl { color: #5a3df0; }
.hero .lead {
  color: #45406a;
  font-size: 1.125rem;
  max-width: 19rem;
  margin: 1.25rem 0 1.75rem;
  text-wrap: balance;
}
.hero .cta { justify-content: flex-start; gap: 1.25rem; }
/* "by betti" sits under the picture, at the right edge of the page width. */
.hero-side { min-width: 0; }
.hero .sig { display: block; color: #45406a; font-size: .75rem; text-align: right; margin: 0; }
/* The picture is wider than its column and reaches a little behind the copy. */
.hero-art {
  position: relative;
  width: 118%;
  margin-left: -18%;
  aspect-ratio: 2.25;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 96%, transparent), linear-gradient(180deg, transparent, #000 6%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 96%, transparent), linear-gradient(180deg, transparent, #000 6%, #000 92%, transparent);
}
.hero-art { mask-composite: intersect; -webkit-mask-composite: source-in; }
.hero-art img {
  position: absolute;
  display: block;
  width: 133.333%;
  max-width: none;
  height: 100%;
  left: -33.333%;
  object-fit: fill;
}
@media (max-width: 58rem) {
  .hero-layout { grid-template-columns: 1fr; gap: 0; padding-top: 2.5rem; padding-bottom: 1rem; }
  .hero-copy { padding-bottom: 0; }
  .hero h1 { max-width: 13em; font-size: clamp(2.35rem, 6.5vw, 3.6rem); }
  .hero .lead { max-width: 35rem; }
  .hero-art { width: 116%; margin: -0.75rem -8% 0; }
  .hero .sig { margin-top: .25rem; }
}
@media (max-width: 30rem) {
  .hero-layout { padding-top: 2rem; }
  /* 7.9 = width of the first headline line in em, with a little air. */
  .hero h1 { font-size: min(2.4rem, calc((100vw - 2.5rem) / 7.9)); }
  .hero .lead { font-size: 1rem; margin-top: 1rem; margin-bottom: 1.3rem; }
  .hero .button { font-size: 1rem; padding: .8rem 1.2rem; }
}

/* Game pages (/jatekok/<slug>/) and their links on the home page */
.games h3 a,
.games h3 a:visited {
  color: inherit;
  text-decoration: none;
}
.games h3 a:hover { color: var(--brand-text); text-decoration: underline; }
.more,
.more:visited {
  color: var(--brand-text);
  font-weight: 800;
  padding: 0.35rem 0.4rem;
}
main.game { padding-top: 1.5rem; }
main.game > ul:not([class]),
main.game .lead { max-width: 44rem; }
.crumb { font-size: 0.95rem; font-weight: 800; margin: 0 0 1.5rem; }
.crumb a::before { content: "‹ "; }
.game-head { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.game-head .icon { flex: none; width: 6rem; height: 6rem; border-radius: 1.35rem; }
.game-head h1 { margin: 0 0 0.7rem; }
.game-head .alias {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0;
  margin-top: 0.15rem;
}
main.game .lead { font-size: 1.2rem; line-height: 1.5; margin-bottom: 0; }
.shots {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 16rem));
  gap: 1rem;
}
.shots.land { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shots li { margin: 0; }
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: var(--tint);
}
.more-games { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.more-games li { margin: 0; }
.more-games a,
.more-games a:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.95rem 0.35rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font-weight: 800;
  text-decoration: none;
}
.more-games a:hover { border-color: var(--brand); }
.more-games img { width: 2.25rem; height: 2.25rem; border-radius: 0.6rem; }
/* Narrow screens: the screenshots become one row that scrolls sideways. */
@media (max-width: 44rem) {
  .shots,
  .shots.land {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    padding: 0 1.25rem 0.5rem;
  }
  .shots li { flex: none; width: 62%; max-width: 16rem; scroll-snap-align: center; }
  .shots.land li { width: 88%; max-width: 30rem; }
  .game-head { gap: 1rem; }
  .game-head .icon { width: 4.5rem; height: 4.5rem; border-radius: 1rem; }
  .game-head h1 { font-size: 1.6rem; }
}
