/* =====================================================================
   meiyoneme.co.uk - main stylesheet (used by every desktop page)
   The mobile page also loads mobilestyle.css AFTER this file, for its
   few overrides.

   Contents
     1. Settings        - sizes and colours you might want to change
     2. Base            - page, headings, text, links
     3. Navbar          - header.html, which is shown inside an iframe
     4. Layout helpers  - alignment and picture classes
     5. Boxes           - homepage box, facts boxes, scrollbox
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. Settings
   --------------------------------------------------------------------- */
:root {
  /* Space left and right of every page. The navbar and the page content
     both sit inside this gutter, which is what keeps their edges lined up. */
  --page-gutter: 20px;

  /* Height of the navbar iframe. The navbar itself is about 270px tall,
     so this can be lowered if you want less space under it. */
  --header-height: 300px;

  /* Heading colour */
  --accent: #BAFFFF;

  /* Size of the text inside the about-page boxes */
  --box-font-size: 22px;
}

/* A note on "vertical-align: calc(var(--h) / -2)", used on several images below:
   it puts the middle of an image on the line of text it sits in, which is what
   the old align="CENTER" attribute did. --h must be the image's height. */


/* ---------------------------------------------------------------------
   2. Base
   --------------------------------------------------------------------- */
body {
  margin: var(--page-gutter) var(--page-gutter) 8px;
  padding: 0;
  background-color: #000000;
  background-image: url(/images/background.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  color: white;
  font-family: "Times New Roman", Times, serif;
}

h1 {
  color: var(--accent);
  font-style: italic;
  font-size: 35px;
}

h2 {
  color: var(--accent);
}

p {
  font-size: 20px;
}

a:link {
  color: white;
  background-color: transparent;
}

a:visited {
  color: pink;
  background-color: transparent;
  text-decoration: underline;
}

a:hover {
  color: #630091;
  background-color: transparent;
  text-decoration: underline;
}

a:active {
  color: yellow;
  background-color: transparent;
  text-decoration: underline;
}


/* ---------------------------------------------------------------------
   3. Navbar
   --------------------------------------------------------------------- */

/* The iframe on each page that shows header.html.
   display:block removes the small gap browsers leave under inline iframes. */
.header-frame {
  display: block;
  width: 100%;
  height: var(--header-height);
  border: 0;
}

/* Everything below only applies inside header.html */
.navbar-page {
  margin: 0;                 /* so the navbar's border reaches the iframe edges */
  background: transparent;   /* so the page's starry background shows through */
}

.site-header {
  border: 2px solid white;
  background-image: url(/images/navbar/bg.png);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.navbar-update img {         /* the little "under construction" gifs */
  --h: 25px;
  height: var(--h);
  vertical-align: calc(var(--h) / -2);
}

.navbar-links img {          /* planets and the Home / About / Music / Funny buttons */
  --h: 110px;
  height: var(--h);
  vertical-align: calc(var(--h) / -2);
}


/* ---------------------------------------------------------------------
   4. Layout helpers
   Add these as classes to any element, e.g. <img class="art float-right">

   Floated things sit on the edge of the page content, which is the same
   edge the navbar uses, so they line up with it automatically.
   --------------------------------------------------------------------- */
.float-right {
  float: right;
}

.float-left {
  float: left;
}

.center-block {              /* centres a block or an image on its own line */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* A picture with the white frame. Never wider than the page. */
.art {
  box-sizing: border-box;
  max-width: 100%;
  height: auto;
  border: 2px solid white;
}

.half-width {                /* a picture half as wide as the page (plus its frame) */
  box-sizing: content-box;
  width: 50%;
  height: auto;
}

.video {                     /* an embedded YouTube video (funny page) */
  width: 560px;
  height: 315px;
  border: 0;
}

.welcome {                   /* the "WELCOME!" gif. If you swap the gif, set --h to its height */
  --h: 111px;
  height: var(--h);
  vertical-align: calc(var(--h) / -2);
}

.page-title img {            /* the gif inside a page's <h1 class="page-title"> */
  --h: 150px;
  height: var(--h);
  vertical-align: calc(var(--h) / -2);
}


/* ---------------------------------------------------------------------
   5. Boxes
   --------------------------------------------------------------------- */

/* Text next to a floated picture stays in its own column instead of
   wrapping underneath the picture. */
.homepagebox {
  display: block;
  overflow: hidden;
}

/* The size, border and spacing of the boxes on the about page */
.factsbox {
  display: inline-block;
  vertical-align: top;
  position: relative;
  width: 15%;
  height: 300px;
  padding: 1%;
  border: 2px solid blue;
  overflow-wrap: break-word;
  font-size: var(--box-font-size);
}

.factsbox p {                /* the global p size would otherwise win */
  font-size: inherit;
}

.factsbox h2 img {           /* the gif at the top of each box */
  --h: 80px;
  height: var(--h);
  vertical-align: calc(var(--h) / -2);
}

/* SCROLLBOX
   Any element with this class scrolls, and gets the scrollbox.png
   background. scrollbox.js moves the background as you scroll, so you see
   the top of the picture at the top of the box and the bottom of the
   picture at the bottom. Remember to load /scrollbox.js on the page. */
.scrollbox {
  overflow-y: scroll;
  background-image: url(/images/about/scrollbox.png);
  background-repeat: repeat-x;
  background-position: 0 0;
}
