@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Lora:ital,wght@0,400..700;1,400..700&display=swap');
@import url('https://fonts.cdnfonts.com/css/opendyslexic');

@font-face {
  font-family: "hkgothic";
  src: url("/passim/static/font/hkgothic/HKGothic-Regular.woff2") format('woff2');
}

@font-face {
  font-family: "hkgothic";
  src: url("/passim/static/font/hkgothic/HKGothic-Bold.woff2") format('woff2');
  font-weight: bold;
}

@font-face {
  font-family: "hkgothic";
  src: url("/passim/static/font/hkgothic/HKGothic-BoldItalic.woff2") format('woff2');
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: "hkgothic";
  src: url("/passim/static/font/hkgothic/HKGothic-Italic.woff2") format('woff2');
  font-style: italic;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font-base: Lora, serif;
  /*--font-title: Archivo, sans;*/
  --font-title: hkgothic, sans;
  --font-size-base: 23px;
  --line-height-base: 1.6;
  --line-height-tight: 1.2;
  --color-background: #FAFAFA;
  --color-text: #333 ;
  --color-accent: rgb(255, 156, 0);
  --color-faded: black;
  --color-link: black;
  --scale-ratio: 1.25;
  --color-hover: #bb44f0;
  --color-antiquity: rgb(178, 40, 255);
  --color-medieval-age: rgb(0, 86, 255);
  --color-modern-age: rgb(246, 0, 37);
  --color-nineteenth: rgb(0, 162, 0);
  --width-border:0.1em;
  --type-border:solid;
  --color-border: #333;
  --ratio: 1.25;
}

body {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  text-align: justify;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(40ch, 70ch) 300px;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header header header"
    "nav article period"
    "footer footer footer";
}

header {
  grid-area: header;
  border-bottom: 2px solid var(--color-border);
  display: flex;

  div.hero {
    border-right: 2px solid var(--color-border);
    width: 500px;
  }

  img {
    width: 100%;
  }

  div.breadcrumb {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    margin-top: 2rem;
    width: 100%;
    padding: 1em;
    font-family: var(--font-title);
  }

  div.breadcrumb ul {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    font-size: .9em;
    font-weight: 300;
    list-style: none;
  }

  div.breadcrumb ul li {
    display: inline;
    padding-left: 0;
  }

  div.breadcrumb ul li:before {
    content: " / ";
    font-weight: 300;
  }

  div.breadcrumb ul li:first-child:before {
    content: none;
  }

  div.breadcrumb ul li:last-child {
    font-weight: 700;
  }

}

h1,
div.breadcrumb ul li:last-child a {
  background-color: var(--color-text);
  color: white;
  padding: 0 .2em;
}

nav {
  font-size: .9em;
  grid-area: nav;
  padding: 1.5rem;
}

nav ul {
  list-style: none;
  padding-left: 0;
}

nav > ul {
  margin-top: 5em;
  position: sticky;
  top: 5em;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

nav > ul ul {
  padding-left: .5em;
}

nav a,
nav a:link,
nav a:visited,
.breadcrumb a,
.breadcrumb a:link,
.breadcrumb a:visited {
  text-decoration: none;
}

main {
  grid-area: article;
  padding: 1.5rem;
  border-right: 2px solid var(--color-border);
}

main article {
  figure {
    width: 80%;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  figure > img {
    width: 100%;
  }

  figcaption {
    font-size: .8em;
    text-align: center;
  }

  p img {
    max-width: 80%;
    display: block;
    margin: auto;
  }

  /*p img {
    float: left;
    max-width: 50%;
    margin: .5em 1em 1em .5em;
  }

  p:has(img) + * {
    clear:both;
  }*/
}

section.period {
  grid-area: period;
  padding: 1.5rem;
  img {
    position: sticky;
    top: calc(100vh - 200px - 2em);
    display: block;
    margin: auto;
    width: 200px;
  }
}

footer {
  grid-area: footer;
  padding: 1.5rem;
  text-align: center;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-title);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.2;
  text-align: left;
}

h1 {
  font-size: calc(var(--font-size-base) * var(--ratio) * var(--ratio) * var(--ratio));
}

h2 {
  font-size: calc(var(--font-size-base) * var(--ratio) * var(--ratio));
}

h3 {
  font-size: calc(var(--font-size-base) * var(--ratio));
}

h4 {
  font-size: calc(var(--font-size-base));
}

h5 {
  font-size: calc(var(--font-size-base) * 1);
}

a,
a:link,
a:visited {
  text-decoration: underline;
  text-decoration-color: #777;
  cursor:pointer;
  color: var(--color-link);
}

a:hover,
a:active {
  color:var(--color-accent);
}

.smallcaps {
  font-variant: small-caps;
}

sup {
  font-size: smaller;
  vertical-align: super;
  line-height: 0;
}

h1 {
    margin-top: 0;
    margin-bottom: 2.5rem;
}

h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    margin-top: 2rem;
    margin-bottom: 1.25rem;
}

h4 {
    margin-top: 1.75rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

li:last-child {
    margin-bottom: 0;
}

li > ul,
li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer{
  grid-area: footer;
  margin-top: auto;
  padding-top: 3em;
  width: 100%;
  text-align: center;

  .partners {
    margin: auto;
  }

  .partners ul {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    gap: 1em;
    justify-content:center;
    padding: 0;
    margin: 0;
  }

  .partners li {
    padding: O;
    margin: 0;
  }

  .partners img {
    transition: transform .2s;
    width: auto;
    height: 2em;
    margin: 0 auto;
  }

  .partners img:hover {
    transform: scale(1.6);
  }

  .legal {
    font-size: small;
  }

  .legal > ul  {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1em;
  }

  a{
    text-decoration: underline;
    text-decoration-style: dashed;
  }
}

.antiquity {

  h1,
  div.breadcrumb ul li:last-child a {
    background-color: var(--color-antiquity);
  }

}

.medievalage {

  h1,
  div.breadcrumb ul li:last-child a {
    background-color: var(--color-medieval-age);
  }
}

.modernage {

  h1,
  div.breadcrumb ul li:last-child a {
    background-color: var(--color-modern-age);
  }
}

.nineteenth {

  h1,
  div.breadcrumb ul li:last-child a {
    background-color: var(--color-nineteenth);
  }
}
@media (max-width: 1920px) {
  :root {
    --font-size-base: 20px;
  }
}

@media (max-width: 1512px) {
  :root {
    --font-size-base: 18px;
  }
}

@media (max-width: 1280px) {
  :root {
    --font-size-base: 16px;
  }
}
