/* Good luck and I'm sorry */

:root {
    --bg: #004b79;
    --bg-grad: linear-gradient(180deg, #000340 0%, #2b0a56 100%);
    --main: rgba(243, 248, 254, 0.8);
    --pattern: url("../resources/images/dimension.png");
    --text: black;
    --accent: rgb(0, 15, 128); /* #760000 */
    --dimmer: rgba(255,255,255,0.3);
}

@media only screen and (prefers-color-scheme: dark) {
    :root {
        --bg: #1f1f32;
        --bg-grad: linear-gradient(180deg, #01022b 0%, #1a0b23 100%);
        --pattern: none;
        --main: rgb(34, 34, 34);
        --text: rgb(255, 255, 255);
        --dimmer: rgba(0,0,0,0.3);
        --accent: rgb(83, 58, 171);
    }
    a {color: var(--text);}
}

body {
    margin: 0; padding: 0;
    font-family: Dyslexie, OpenDyslexic, 'Calson', 'Atkinson Hyperlegible', Verdana, Ubuntu, roboto, noto, Arial, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, -apple-system, BlinkMacSystemFont, Sans-Serif;
    font-size: 1em;
    line-height: 1.5em;
    background-color: var(--bg);
    background: var(--bg-grad);
    color: var(--text);
    /*background-image: var(--pattern);*/
}

.bg-pattern {
    background-image: var(--pattern);
}

.bg-pattern, body {min-height: calc(100vh - 2em);}

section {
    max-width: 60ch;
    flex-basis: 60ch;
    font-size: 1.2em;
    margin: 0 auto 1em auto;
    padding: 1em;
    background: var(--main);
    padding-bottom: 0;
}

.box {background: var(--dimmer);}

.bg-pattern {background-image: var(--pattern);}

h1, h2 {
    font-family: Dyslexie, OpenDyslexic, 'Headers', 'Calson', sans-serif;
    line-height: 1em;
}

h1 {font-size: 2.5em;}

.box, section {
    padding: 1em;
    border: 2px solid var(--accent);
    border-radius: 10px;
}
.box {padding: 0 1em; margin-bottom: 0.5em;}

.headline {border-bottom: 1px solid var(--accent);}

.flex {display: flex; padding-bottom: 0; margin-bottom: 1em; flex-wrap: wrap;}
main.flex {align-items: flex-start;} 
.flex :is(h1, .headline) {flex-basis: 50%;}
h1 {margin: 0.2em; flex-grow: 2;}
h2 {margin-bottom: 0;}

h2 ~ p {margin-top: 0.5em;}

.right {text-align: right;}

#gwen, #more {margin-top: 3%;}

#gwen h1, #gwen h2 {
    font-family: Dyslexie, OpenDyslexic, "Mansalva", sans-serif;
    line-height: 1em;
}

@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Calson';
    font-style: normal;
    font-weight: 400;
    src: local("Calson Antique Regular"),
    url('./fonts/caslon-antique-regular.ttf') format('truetype');
  }

  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Mansalva';
    font-style: normal;
    font-weight: 400;
    src: local("Mansalva"),
    url('../resources/fonts/mansalva-v12-latin-regular.ttf') format('truetype');
  }

  @font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Headers';
    font-style: normal;
    font-weight: 400;
    src: local("Broken 15"),
    url('../resources/fonts/broken15/BROKEN15.ttf') format('truetype');
  }

img {display: block; margin: 0.5em auto; padding: 0; max-width: calc(100% - 4px); border-radius: 10px; border: 2px solid var(--accent);}

@font-face {
    font-display: block; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Owl Elian';
    font-style: normal;
    font-weight: 400;
    src: local("owl-elian"),
    url('./fonts/owl-elian.ttf') format('truetype');
  }

  @font-face {
    font-display: block; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Elian';
    font-style: normal;
    font-weight: 400;
    src: local("elian_cc_mono"),
    url('/resources/fonts/elian_cc_mono.ttf') format('truetype');
  }

body {margin: 0; padding: 0;}

header, footer, .blackbar {
    background: black; 
    color: white;
    padding: 1em;
  }

.purple {background: rgb(53, 23, 77); font-family: 'Mansalva';}

  header {
    margin-bottom: 2em;
    padding: 2em 0 1.5em 0;
}

footer {padding-bottom: 4em; padding-top: 2em;}

.blackbar {text-align: center; /*width: calc(100% + 2em); margin-left: -1em;*/}

section.fullwidth {
  max-width: 100%;
  border: none;
  min-width: calc(100% - 2em);
  margin-top: 2em;
}
section.fullwidth p {
  max-width: 60ch; 
  margin: 1em auto;
  line-height: 1.5em;
}

header p, footer p, .blackbar {
    text-align: center;
    font-size: 1.5em;
}

/*.blackbar, .purple {padding-left: 0; padding-right: 0;}*/

header p, footer p {
    max-width: 40ch;
    margin: auto;
}

footer p {margin-bottom: 1em;}

img ~ p {margin-top: 0; margin-bottom: 0.3em;}
img {margin-bottom: 0; border-radius: 10px 10px 0 0;}

.elian, #gwen .elian {font-family: "Owl Elian", monospace; font-size: 2em;}

.rigidelian, #gwen .rigidelian {font-family: "Elian", monospace; font-size: 1.4rem;}

.center {text-align: center;}

section ~ #here {margin-bottom: 0;}

section#here {
  background: rgb(237, 236, 255) !important;
  color: black;
  border: none !important;
  padding: 2em 1em;
  margin: 0;
  border-radius: 0;
}

#here .box :is(p:not(.blackbar), h2){
  max-width: 60ch;
  margin: auto;
}

#here p.blackbar {max-width: 100%;}

#here .box{
  max-width: 100%;
  margin: auto;
  border: none;
  background: none;
}

@media only screen and (max-width: 60ch) {
  main {border-radius: 0; flex-direction: column;}
  #gwen, #more {margin-top: 0; min-width: calc(100vw - 2em - 4px);}
  section {
    max-width: 100%; 
    flex-basis: 100%; 
    margin-bottom: 0; 
    border-radius: 0; 
    border-bottom: 0;
  }
  #the-sea {margin-top: 0;}
  #more {border-top: 0; padding-top: 0;}
  header {margin-bottom: 0;}
  .headline:not(h2) {text-align: right;}
  .headline p {margin-top: 0;}
  .blackbar:first-of-type {padding: 0.5em;}
  footer {margin-top: 0;}
  .flex {margin-bottom: 0;}
}

@media only screen and (min-width: 120ch) {
  #the-sea {transform: rotate(3deg);}
#more {transform: rotate(-5deg);}
}