:root {
  --page-width: 900px;
  --gallery-width: 920px;
  --steam-width: 600px;
  --page-gutter: 20px;
  --section-gap: 34px;
  --column-gap: 14px;
  --accent: #87d1ea;
  --text: #ffffff;
  --link: #e5faff;
  --visited: #e2f0ff;
  --active: #efeff0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  min-height: 100%;
    background-color: black;
    background-image: url("../gfx/background.png");
    background-repeat: repeat;
    background-position: left top;
    background-size: auto;
}

body { 
  position: relative;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: transparent;


  color: var(--text);
  font-family: "Average Sans", "Courier New", "Lucida Console", monospace;
  font-style: normal;
  font-size: 16px;
  line-height: 1.45;
}





img,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

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

a:active {
  color: var(--active);
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Caveat", monospace;
}

h1 {
  margin-bottom: 0;
  color: var(--accent);
  font-size: 40px;
  line-height: 1.1;
  text-align: center;
}

h1 a {
  color: inherit;
  text-decoration: none;
}

h1 a:visited {
  color: inherit;
}

h2 {
  margin-bottom: 12px;
  font-size: 30px;
  line-height: 1.15;
}

h3 {
  margin-bottom: 14px;
  font-family: "Average Sans", "Courier New", "Lucida Console", monospace;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.35;
  text-align: justify;
}

p {
  margin-bottom: 16px;
  text-align: justify;
}

ul {
  margin-bottom: 0;
  padding-left: 28px;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 38px var(--page-gutter) 46px;
}

.section-width,
.gallery-width,
.steam-width {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}


.footer-width {
  max-width: var(--page-width);
  width: 40%;
  margin-right: auto;
  margin-left: auto;
}

.section-width {
  max-width: var(--page-width);
}

.gallery-width {
  max-width: var(--gallery-width);
}

.steam-width {
  max-width: var(--steam-width);
}

.hero {
  text-align: center;
}



.intro-text {
  max-width: 760px;
  margin: 8px auto 24px;
  padding: 0 8px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
}

.screenshot-grid a,
.feature-screenshots a {
  display: block;
  min-width: 0;
}


.screenshot-grid img,
.feature-screenshots img {
  width: 100%;
  aspect-ratio: 300 / 169;
  object-fit: cover;
}
.content-row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--column-gap);
  align-items: start;
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
}

.content-copy {
  min-width: 0;
}

.portrait-media {
  display: block;
  width: 100%;
  max-width: 280px;
}

.cover-media img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.album-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.features-row {
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: end;
}

.feature-screenshots {
  display: grid;
  gap: 10px;
}

.steam-section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 42px;
  margin-bottom: 48px;
}

.steam-logo-link,
.steam-logo-link img {
  width: 100%;
  max-width: 200px;
}

.book-section {
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
  text-align: center;
}

.book-section img {
  width: min(100%, 600px);
  margin: 0 auto;
}

.system-requirements {
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
}

.requirements-content {
  padding-left: 33px;
}

.final-gallery {
  margin-bottom: 48px;
}

.site-footer {
  padding-bottom: 20px;
}

p.footnotes {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 15px;
}


/* Responsive video and description */
.video-text-layout {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  margin: 24px auto 0;
  text-align: left;
}
.video-text-layout .intro-text {
  max-width: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 650px) {
  .video-text-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
}


.hero-logo-space {
    width: 100%;
    text-align: center;
}

.hero-logo {
    display: block;
    width: auto;
    height: 90vh;
    height: 90dvh;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

.book-title-logo {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 0 auto 20px;
}



/* Image and text split sections */

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 24px;
    align-items: center;
    width: 100%;
    margin: 30px auto;
    text-align: justify;
}

/* Image on left, text on right */
.split.text.right {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

/* Text on left, image on right */
.split.text.left {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

/* Image styling */
.split img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Text styling */
.split .split-copy {
    min-width: 0;
}

/* Horizontal decorative divider */
.hrcenter {
    display: block;
    width: 80%;
    max-width: 80%;
    height: auto;
    margin: 30px auto;
    object-fit: contain;
}

/* Mobile layout */
@media (max-width: 650px) {
    .split,
    .split.text.right,
    .split.text.left {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .split img {
        width: auto;
        max-width: 80%;
        max-height: 350px;
        margin: 0 auto;
    }

    .split .split-copy {
        width: 100%;
    }
}





/* Centred list section - 80% width */
.list {
    width: 80%;
    max-width: 80%;
    margin: 30px auto;
    text-align: left;
}

/* List formatting */
.list ul {
    width: 100%;
    margin: 0;
    padding-left: 28px;
    text-align: justify;
    text-align-last: left;
}

/* Individual list items */
.list li {
    text-align: justify;
    text-align-last: left;
    margin-bottom: 12px;
    line-height: 1.5;
}



/* FLOATING PORTRAIT GALLERY — adjustable settings */
.floating-gallery {
    --gallery-page-width: 29%; /* Maximum page width on desktop */
    position: relative;
    width: 100%;
    height: 610px;
    overflow: hidden;
    isolation: isolate;
    background: transparent;
    cursor: grab;
    touch-action: pan-y; /* vertical page scrolling still works */
    user-select: none;
    -webkit-user-select: none;
}
.floating-gallery.dragging { cursor: grabbing; }
.floating-gallery::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../gfx/galleryweb.png") center / contain no-repeat;
    opacity: .85;
    pointer-events: none;
    z-index: 0;
}
.floating-gallery-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.floating-gallery-stage {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}
.floating-gallery-image {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    width: var(--gallery-page-width);
    aspect-ratio: var(--page-ratio, 0.7071);
    height: auto;
    padding: 0;
    overflow: hidden;
    border: 2px solid #168cda;
    border-radius: 2px;
    background: #001425;
    box-shadow: 0 0 12px rgba(0,140,255,.45);
    cursor: pointer;
    transform-origin: center;
    will-change: transform, opacity;
    pointer-events: auto;
    touch-action: pan-y;
}
.floating-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* no stretched or cropped book pages */
    pointer-events: none;
    -webkit-user-drag: none;
}
.floating-gallery-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #003e78;
    opacity: var(--blue-tint, .7);
    pointer-events: none;
}
.floating-gallery-image.front {
    border-color: #8cddff;
    box-shadow: 0 0 25px rgba(22,159,255,.75);
}
@media (max-width: 650px) {
    .floating-gallery {
        --gallery-page-width: 45%;
        height: 460px;
    }
}

/* Enhanced neon-blue gallery connections and moving network */
.floating-gallery-lines { overflow: hidden; }
.gallery-network { opacity: .88; }
.gallery-connections { opacity: 1; }
.floating-gallery-image { border-color: #46bfff; box-shadow: 0 0 9px #159dff, 0 0 19px #0064c477; }
.floating-gallery-image.front { border-color: #b8f4ff; box-shadow: 0 0 12px #8ce7ff, 0 0 30px #168cffaa; }


/* Full-width decorative dividers, with no unwanted vertical gaps */
.animated-divider {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    overflow: hidden;
    isolation: isolate;
}
.animated-divider .divider-image {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    object-fit: contain;
}
.animated-divider .divider-network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: .65; /* Keep animation subtle over existing divider artwork */
}
.divider-tight { margin-top: 0; margin-bottom: 0; }
.divider-tight + .list { margin-top: 0; }
/* Hover and keyboard focus: blue luminous border and halo */
.floating-gallery-image:hover,
.floating-gallery-image:focus-visible {
    border-color: #b5f5ff !important;
    box-shadow: 0 0 10px 3px rgba(108,220,255,.9),
                0 0 28px 9px rgba(0,145,255,.72),
                0 0 52px 15px rgba(0,85,255,.36) !important;
    filter: brightness(1.15);
}
.floating-gallery-image:hover::after,
.floating-gallery-image:focus-visible::after {
    opacity: calc(var(--blue-tint, .7) * .45);
}

/* iOS / touch-device compositor optimisations */
.floating-gallery-image { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.floating-gallery-image img { -webkit-transform: translateZ(0); }
@media (pointer: coarse) {
  /* Large animated SVG blur filters are particularly expensive on iOS Safari.
     Keep the bright line and halo shapes, but avoid repeatedly blurring them. */
  .floating-gallery-lines .gallery-network line,
  .floating-gallery-lines .gallery-connections line { filter: none; }
  .floating-gallery-lines circle { filter: none; }
  .animated-divider .divider-network circle[filter] { filter: none; }
}


/* iPhone-safe YouTube poster: load iframe only after a tap */
.youtube-preview { position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; background: #07111d; }
.youtube-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background: #07111d; cursor: pointer; overflow: hidden; }
.youtube-play img { display: block; width: 100%; height: 100%; object-fit: cover; }
.youtube-play-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 76px; height: 54px; background: #ff0033; border-radius: 14px; box-shadow: 0 0 22px rgba(0,0,0,.6); transition: background .2s, transform .2s; }
.youtube-play-icon::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-40%, -50%); border-top: 13px solid transparent; border-bottom: 13px solid transparent; border-left: 21px solid white; }
.youtube-play:hover .youtube-play-icon, .youtube-play:focus-visible .youtube-play-icon { background: #ff0000; transform: translate(-50%, -50%) scale(1.08); }
.youtube-preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
