/* One Dreamer static site. Recreates the look of the former WordPress/Avada pages. */

@font-face {
  font-family: "Apercu Light";
  src: url("/assets/fonts/Apercu-Light.woff") format("woff");
  font-display: swap;
}

:root {
  --text: #d3d3d3;
  --heading: #fff;
  --link: #03a9f4;
  --page-bg: #000;
  --site-width: 1100px;
  --gutter: 30px;
}

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

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

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font: 14px/21px "Apercu Light", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 1px;
}

a { color: var(--link); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

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

p { margin: 0 0 20px; }

h1, h2, h3 {
  color: var(--heading);
  font-weight: 400;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: 1.5px;
  margin: 0 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #fff;
  color: #000;
  padding: 10px 16px;
}
.skip-link:focus { left: 10px; top: 10px; }

.wrap {
  max-width: calc(var(--site-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- The Game ---------- */

.game { padding: 55px 0 60px; }

.hero {
  background: url("/assets/img/One-Dreamer-indie-Game-1.jpg") center / cover no-repeat;
  padding: 0 var(--gutter);
}

.video {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.buy {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr 1fr;
  column-gap: 4%;
  padding-top: 6px;
}
.buy .steam { grid-column: 2; margin-top: 2px; }
.buy .steam iframe { display: block; width: 500px; max-width: 100%; height: 190px; border: 0; }
.buy .gog { grid-column: 3; margin-top: 25px; text-align: center; }
.buy .gog img { display: block; width: 96px; margin: 0 auto; }
.buy .gog p {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 14pt;
  line-height: 1.4;
  font-weight: 700;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 4fr 1fr;
  column-gap: 4%;
}
.columns > * { grid-column: 2; min-width: 0; }

.about { margin-top: 45px; }
.about ul { margin: 0 0 20px; padding-left: 30px; }
.about li + li { margin-top: 11px; }
.about .links { text-align: center; }

.social {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.social a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: #fff;
}
.social svg { width: 16px; height: 16px; fill: currentColor; }
.social .twitter { background: #55acee; }
.social .tumblr { background: #35465c; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gallery a { display: block; }
.gallery img { display: block; width: 100%; }

/* ---------- Press kit (presskit() layout, light theme) ---------- */

body.press {
  background: #fff;
  color: #333;
}
.press-layout {
  display: grid;
  grid-template-columns: 1fr 3fr;
  column-gap: 4%;
  padding-bottom: 40px;
}
.press-nav .title {
  color: #000;
  font-size: 24pt;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 20px;
}
.press-nav a { color: #333; font-weight: 700; }
.press .press-nav ul { list-style: none; margin: 0; padding: 0; }
.press-nav li { margin-bottom: 20px; }

.press h2 {
  color: #333;
  font-size: 18pt;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 0 20px;
  scroll-margin-top: 20px;
}
.press strong { color: #333; }
.press .header-image { display: block; width: 100%; margin-bottom: 20px; }
.press .split-1-2 { display: grid; grid-template-columns: 1fr 2fr; column-gap: 4%; }
.press .split-1-1 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4%; }
.press ul { margin: 0 0 20px; padding-left: 20px; }
.press hr { border: 0; border-top: 1px solid #e0dede; margin: 24px 0; }
.press .press-video { max-width: 600px; aspect-ratio: 5 / 3; margin: 0 0 20px; }
.press .gallery { margin-bottom: 20px; }
.press .small { font-size: 10pt; }

/* ---------- Generic text pages ---------- */

.text-page { padding: 55px 0 60px; }
.text-page .content { width: 71%; }
.text-page .content p, .text-page .content li {
  font-size: 12pt;
  line-height: 24px;
  text-align: justify;
}
.text-page .content ul { margin: 0 0 20px; padding-left: 40px; }
.text-page.terms .content { color: #555; }

/* Page title bar used on "YouTube Let's Play" */
.title-bar {
  height: 87px;
  background: linear-gradient(#2b2b2b 0, #333 70%, #f2f2f2 70%, #f6f6f6 100%);
  border-bottom: 1px solid #d2d3d4;
}
.title-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 31px;
}
.title-bar h1 { color: #8a8a8a; font-size: 18px; line-height: 25px; letter-spacing: 0; margin: 0; }
.breadcrumbs { color: #8a8a8a; font-size: 10px; }
.breadcrumbs a { color: inherit; }

.lets-play { padding: 55px 0 60px; }
.lets-play table { width: 100%; border-collapse: collapse; }
.lets-play td { padding: 0; text-align: left; vertical-align: top; }
.lets-play td:first-child { width: 77%; color: #fff; }
.lets-play td a { font-weight: 700; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .9);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; box-shadow: 0 0 30px rgba(0, 0, 0, .6); }
.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font: 300 40px/1 "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  padding: 12px 18px;
  opacity: .8;
}
.lightbox button:hover { opacity: 1; }
.lightbox .close { top: 10px; right: 10px; }
.lightbox .prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .counter { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #ccc; font-size: 12px; }

/* ---------- 404 ---------- */

.not-found { padding: 120px 0; text-align: center; }

/* ---------- Responsive ---------- */

@media (max-width: 800px) {
  .columns { grid-template-columns: 1fr; }
  .columns > * { grid-column: 1; }
  .buy { grid-template-columns: 3fr 1fr; }
  .buy .steam { grid-column: 1; }
  .buy .gog { grid-column: 2; }
  .press-layout { grid-template-columns: 1fr; }
  .press-nav ul { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .press-nav li { margin-bottom: 10px; }
  .press-nav { margin: 30px 0 20px; }
  .text-page .content { width: 100%; }
  .lets-play td:first-child { width: 65%; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .game { padding-top: 20px; }
  /* The original hid the store widgets on small screens. */
  .buy { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .press .split-1-2, .press .split-1-1 { grid-template-columns: 1fr; }
  .text-page .content p, .text-page .content li { text-align: left; }
}
