/* Kansanusko — Finnish folk tradition inspired styling */
:root {
  --forest: #193c35;
  --pine: #2d554b;
  --lake: #3f6268;
  --birch: #f1ede1;
  --paper: #ead9b5;
  --paper-light: #f3e6c8;
  --paper-dark: #d5bd8e;
  --ochre: #9a7740;
  --iron: #594f43;
  --rust: #7b4639;
  --mist: #d9ddd3;
}

* {
  box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px 0;

    background-image: url("../images/background.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;

    color: #2d2a22;
    font-family: Georgia, "Times New Roman", serif;
}

.page,
.pageheading {
  margin: auto;
  width: min(900px, calc(100% - 30px));
  border: 0;
  padding: 18px 20px;
  background:
    radial-gradient(circle at 12% 18%, rgba(120,85,35,.09) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 72%, rgba(90,65,30,.07) 0 1px, transparent 2px),
    repeating-linear-gradient(7deg, rgba(110,80,35,.035) 0 1px, transparent 1px 7px),
    linear-gradient(100deg, var(--paper-dark), var(--paper-light) 18%, var(--paper) 50%, #e3cda3 100%);
  background-size: 43px 47px, 67px 59px, auto, auto;
  box-shadow: 5px 6px 0 rgba(25, 60, 53, .18), inset 0 0 22px rgba(92,65,30,.12);
  clip-path: polygon(0.8% 1%, 9% 0%, 18% 1.4%, 29% .4%, 40% 1.2%, 51% .2%, 62% 1.1%, 74% .3%, 85% 1.3%, 99% .5%, 98.8% 12%, 100% 25%, 98.9% 38%, 99.8% 51%, 98.7% 65%, 100% 78%, 98.6% 91%, 99.2% 99%, 88% 98.6%, 76% 100%, 64% 98.7%, 52% 99.7%, 39% 98.8%, 27% 100%, 15% 98.8%, 1% 99.5%, 1.4% 88%, 0% 76%, 1.2% 63%, .2% 49%, 1.1% 36%, 0% 22%);
  position: relative;
}

.page::before,
.pageheading::before {
  content: "ᛉ";
  position: absolute;
  top: 5px;
  right: 9px;
  color: var(--ochre);
  font-size: 18px;
  opacity: .75;
}

.pageheading {
  padding-top: 8px;
  background:
    radial-gradient(circle at 25% 35%, rgba(100,70,25,.08) 0 1px, transparent 2px),
    repeating-linear-gradient(0deg, rgba(100,70,25,.025) 0 1px, transparent 1px 9px),
    linear-gradient(rgba(243,230,200,.96), rgba(218,194,149,.96));
}

.pageheading #subtitle {
  margin: 0 0 3px 120px;
  color: var(--pine);
  font-style: italic;
  max-width: 680px;
}

#title {
  position: relative;
  margin: 12px 0 10px 120px;
  color: var(--forest);
  font-size: 300%;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 #d7c7a5;
}

.flag {
  width: 100px;
  height: 66px;
  object-fit: cover;
  border: 2px solid var(--ochre);
  position: absolute;
  top: 17px;
  left: 18px;
  opacity: .9;
}

/* Section headings */
h3,
#heading {
  color: var(--forest);
}

h3 {
  border-top: 2px solid var(--ochre);
  border-bottom: 1px solid var(--mist);
  padding: 7px 0;
  letter-spacing: 1px;
}

#heading {
  text-decoration: none;
  font-size: 120%;
  font-weight: bold;
  letter-spacing: .5px;
}

#subheading {
  color: #6d665a;
  font-style: italic;
}

/* Old-web menu, but with a Finnish folk palette */
.center {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 12px auto;
  width: 100%;
}

.menu {
  color: var(--forest);
  text-decoration: none;
}

.center .menu {
  width: 180px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
  font-weight: bold;
  border: 0;
  background:
    radial-gradient(circle at 18% 25%, rgba(100,70,25,.08) 0 1px, transparent 2px),
    linear-gradient(135deg, #f0dfba, #d9bf8e);
  box-shadow: 3px 4px 0 rgba(25,60,53,.16), inset 0 0 10px rgba(92,65,30,.12);
  clip-path: polygon(1% 5%, 14% 1%, 27% 4%, 42% 1%, 58% 4%, 73% 1%, 88% 4%, 99% 1%, 97% 18%, 100% 35%, 97% 52%, 99% 70%, 96% 98%, 80% 95%, 65% 99%, 50% 96%, 34% 99%, 18% 96%, 2% 99%, 4% 82%, 1% 65%, 3% 47%, 1% 30%);
}

.center .menu:hover {
  color: #fffdf6;
  background: var(--forest);
  border-color: var(--ochre);
  transform: translate(1px, 1px);
}

.menuOption {
  width: 180px;
  height: 180px;
  opacity: 0.82;
  border: 1px solid var(--ochre);
  position: relative;
  left: 0;
}

.menuOption:hover {
  opacity: 1;
  border: 0;
}

#email {
  color: var(--lake);
  font-size: 120%;
}

a:not(.menu) {
  color: var(--rust);
}

a:not(.menu):hover {
  color: var(--forest);
}

.gif,
.gif2,
.gif3,
.logo,
.logo2,
.logo3 {
  /* Decorative images can be added later without affecting the layout. */
  max-width: 100%;
}

.gif {
  width: 100px;
  border: 1px solid var(--ochre);
}

.gif2,
.gif3 {
  width: 50px;
}

.logo { width: 200px; position: relative; }
.logo2 { width: 100px; position: relative; }
.logo3 { width: 50px; position: relative; }

#aalto,
#oulu {
  left: -53px;
}

@media (max-width: 700px) {
  body { padding-top: 10px; }
  .page,
  .pageheading { width: calc(100% - 16px); }
  #title { font-size: 220%; margin-left: 105px; }
  .pageheading #subtitle { margin-left: 105px; }
  .flag { left: 10px; }
}
