@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,700&display=swap');
@import url('../fonts/dinnext/dinnext.css');

*, :before, :after {
  box-sizing: border-box;
}

html {
  font-size: 16px;

  --col-primary: #50B342;
  --col-primary-rgb: 80, 179, 66;

  --col-warning: #FF5745;
  --col-warning-rgb: 255, 87, 69;

  --col-background: #FFFFFF;
  --col-dimmed-background: #F8F8F8;
  --col-text: #282828;
  --col-text-inverted: #FAFAFA;
  --col-text-rgb: 40, 40, 40;
  --col-secondary-text: #505050;
  --col-meta-text: #949494;
  --col-border: #eeeeee;

  --fs-1: 3.025rem;
  --fs-2: 2.441rem;
  --fs-3: 1.953rem;
  --fs-4: 1.563rem;
  --fs-5: 1.25rem;
  --fs-6: 1rem;
  --fs-7: 0.8rem;
  --fs-8: 0.64rem;
}

@media (prefers-color-scheme: dark) {
  html {
    --col-background: #282828;
    --col-dimmed-background: #606060;
    --col-text: #FAFAFA;
    --col-text-rgb: 250, 250, 250;
    --col-secondary-text: #F0F0F0;
    --col-border: #808080;
  }
}

body {
  margin: 0;
  background-color: var(--col-background);
  color: var(--col-text);
}

body, button, input, select, textarea {
  font-family: 'Roboto', sans-serif;
  font-size: 1em;
  color: var(--col-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DIN Next Condensed', sans-serif;
  text-transform: uppercase;
  line-height: 1;
}

h1 {
  font-size: var(--fs-2);
}

h2 {
  font-size: var(--fs-3);
}

h3 {
  font-size: var(--fs-4);
}

a[href] {
  color: var(--col-primary);
}


/* CONTAINER */

.container {
  width: 1032px;
  max-width: 100%;
  padding: 1rem;
  margin: 0 auto;
}

.container.small {
  width: 688px;
}


/* LOGO */

.logo {
  display: inline-block;
  width: 300px;
}
.logo img {
  display: block;
  width: 100%;
}
.logo img.dm {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .logo img.dm {
    display: block;
  }
  .logo img.lm {
    display: none;
  }
}
.logo a {
  display: block;
  height: 100%;
  background-size: fit;
}

.top {
  background: center bottom / cover no-repeat url('../images/heightmap.png');
}

@media (prefers-color-scheme: dark) {
  .top {
    background-image: url('../images/heightmap-black.png');
  }
}


/* TOPMOST */

.topmost {
  position: relative;
  text-align: center;
  padding: 2rem 2rem 1rem 2rem;
}


/* NAV: menu */

nav.mainnav {
  position: relative;
  background: center / cover no-repeat url('../images/dotted-wave-black.png?v=2');
  padding-top: 10px;
}
@media (prefers-color-scheme: dark) {
  nav.mainnav {
    background-image: url('../images/dotted-wave-white.png');
  }
}
nav.mainnav:before {
  content: "";
  display: block;
  padding-top: 4.21875%;
}

nav.mainnav > .inner {
  position: absolute;
  top: 10px;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

ul.menu {
  display: flex;
  margin: 0;
  padding: 0 0.5rem;
  height: 2.5rem;
  background-color: var(--col-background);
  border-radius: 1.25rem;
  align-items: center;

  list-style: none;
}
ul.menu li {
  display: block;
  padding: 0.5rem 1rem;
}
ul.menu a {
  display: block;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  line-height: 1.5
}
ul.menu a.active {
  color: var(--col-primary);
}
ul.menu a:hover {
  background: bottom left / 100% 10% no-repeat linear-gradient(0deg, currentColor, currentColor);
}

@media screen and (max-width: 600px) {
  .topmost {
    padding-bottom: 2rem;
  }

  nav.mainnav:before {
    padding-top: 8.4375%;
  }

  ul.menu {
    display: none;
  }
}


/* SOCIAL */

.social {
  display: flex;
  margin: 0;
  padding: 0;
}

.social li {
  display: block;
  padding: 0 0.25rem;
}

.social li a {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.5rem;
  text-align: center;
  color: inherit;

  position: relative;
}

.social li a:before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px dashed currentColor;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.topmost .social {
  position: absolute;
  top: calc(50% - 0.75rem);
  right: 2rem;
}

.topmost .social li a:hover:before,
.footer .social li a:hover:before {
  animation: spin 3s linear infinite;
}

nav.mainnav .social {
  padding: 0.5rem 0.25rem;
  background-color: var(--col-background);
  border-radius: 1.75rem;
}

@media screen and (max-width: 600px) {
  .topmost .social {
    display: none;
  }
}

@media screen and (min-width: 601px) {
  nav.mainnav .social {
    display: none;
  }
}


/* MAIN HEADER */

.main-header {
  font-size: var(--fs-5);
  line-height: 1.5;
  color: var(--col-secondary-text);
  border-bottom: 1px dashed #f0f0f0;
}

.main-header h1 {
  margin-bottom: 0.5rem;
  line-height: 1;
}
.main-header h1 + p {
  margin-top: 0.5rem;
}

.main-header a[href] {
  display: inline-block;
  padding-bottom: 0.375rem;
  margin-bottom: -1px;
  text-decoration: none;
  color: var(--col-primary);
  border-bottom: 3px dashed transparent;
  /* background: bottom left / 100% 10% no-repeat linear-gradient(0deg, rgba(var(--col-primary-rgb), 0.2), rgba(var(--col-primary-rgb), 0.2));
  transition: background-size .2s; */
  transition: border-bottom-color .2s;

  font-family: 'DIN Next Condensed';
  text-transform: uppercase;
}
.main-header a[href]:hover,
.main-header a[href]:active {
  /* background-size: 100% 100%; */
  border-bottom-color: var(--col-primary);
}

@media screen and (min-width: 601px) {
  .main-header.flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }

  .main-header a[href] {
    display: block;
  }
}
/*
.main-header svg {
  stroke: var(--col-primary);
} */


/* SQUARE */

.square,
.photo-box {
  display: block;
  background-color: #f0f0f0;
  transition: box-shadow .2s;
  background-size: cover;
  background-position: center;
}
.square:before,
.photo-box:before {
  content: "";
  display: block;
}
.square:before {
  padding-top: 100%;
}
.photo-box:before {
  padding-top: 62.5%;
}
.square:hover,
.teaser:hover .square {
  box-shadow: 8px 8px 0 0 rgba(0, 0, 0, 0.12);
}

@media screen and (max-width: 600px) {
  .square:before {
    padding-top: 62.5%;
  }
}


/* MAIN GRID */

.maingrid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 2rem -1rem;
}

.maingrid-main {
  width: 100%;
  padding: 1rem;
}
.maingrid-subs, .maingrid-all {
  width: 100%;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.maingrid-sub {
  width: 100%;
  padding: 1rem;
}

.maingrid > p {
  padding: 1rem;
  width: 100%;
  text-align: center;
  font-size: var(--fs-4);
}

@media screen and (min-width: 600px) {
  .maingrid-sub {
    width: 50%;
    padding: 1rem;
  }
  .maingrid-all .maingrid-sub {
    width: 33.33333%;
    padding: 1rem;
  }
}

@media screen and (min-width: 1000px) {
  .maingrid-main {
    width: 40%;
    padding: 1rem;
  }
  .maingrid-subs {
    width: 55%;
  }
}


/* STICKY */

.sticky.stuck {
  position: fixed;
}


/* TEASER */

.teaser a {
  text-decoration: none;
  color: inherit;
}

.teaser h2 {
  margin: 0 0 1rem 0;
}

.teaser svg {
  stroke: var(--col-primary);
}

.teaser .teaser-more {
  font-weight: 500;
  text-transform: uppercase;
  font-size: var(--fs-7);
}

.teaser.small h2 {
  font-size: var(--fs-4);
}

.teaser .meta {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}


/* FOOTER */

.footer {
  background-color: #282828;
  background: center bottom / cover no-repeat url('../images/heightmap-black.png');
}

.footer > .inner {
  color: var(--col-text-inverted, white);
  padding: 1rem 0 2rem 0;
}

.footer:before {
  content: '';
  display: block;
  padding-top: 5.46875%;
  background: center bottom / cover no-repeat url('../images/footer-top-black.png?v=2');
}

@media (prefers-color-scheme: dark) {
  .footer:before {
    background-image: url('../images/footer-top-white.png');
  }
}

.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer .logo {
  width: 200px;
}

.footer-copy {
  padding-left: 20px;
  padding-top: 5px;
  font-size: 12px;
  line-height: 1.35;
}

@media screen and (max-width: 600px) {
  .footer:before {
    padding-top: 10.9375%;
  }

  .footer-flex {
    display: block;
  }

  .footer .social {
    margin: 2rem -0.25rem 0 -0.25rem;
  }

  .footer-copy {
    padding-left: 0;
  }
}


/* POST */

.page-post {
  margin-bottom: 3rem;
}

.page-post .container {
  line-height: 1.5;
}

.post-header {
  padding: 0 1rem;
  margin-top: 2rem;
}

.container .post-header {
  padding: 0;
}

.post-meta {
  font-family: 'DIN Next Condensed';
  font-size: var(--fs-5);
  text-transform: uppercase;
  font-weight: 500;
}

.teaser .post-meta {
  /* margin-top: -1em; */
  margin-bottom: 1em;
  font-size: var(--fs-6);
}

.post-meta a {
  text-decoration: none;
  color: inherit;
}

/* .post-meta .post-author {
  margin-right: 1rem;
} */

.post-meta {
  color: var(--col-meta-text);
}

.post-meta .far {
  font-size: 0.85em;
}

.post-header-info {
  text-align: center;
  padding: 0 2rem 0 0 0;
}

.post-header.with-image .post-header-info {
  padding-left: 2rem;
}

.post-header-info h1 {
  font-size: var(--fs-2);
  margin: 1rem 0 0.5rem 0;
}

.post-header-info p {
  font-size: var(--fs-5);
}

.post-header-info svg {
  stroke: var(--col-primary);
}

.post-header-image {
  margin: 0 -1rem;
  background-color: var(--col-border);
  background-size: cover;
  background-position: center;
}
.post-header-image:before {
  content: '';
  display: block;
  padding-top: 62.5%;
}
.post-header-image-square:before {
  padding-top: 100%;
}

.post-header .meta {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.page-post .post-content a[href]:not(.tag) {
  text-decoration: none;
  color: var(--col-primary);
  background: bottom left / 100% 10% no-repeat linear-gradient(0deg, rgba(var(--col-primary-rgb), 0.2), rgba(var(--col-primary-rgb), 0.2));
  transition: background-size .2s;
}
.page-post .post-content a[href]:not(.tag):hover,
.page-post .post-content a[href]:not(.tag):active {
  background-size: 100% 100%;
}

.page-post h2 {
  margin-top: 1em;
  margin-bottom: 0;
}
.page-post h3 {
  margin-top: 1em;
  margin-bottom: 0;
  color: var(--col-secondary-text);
}
.page-post h3 + p {
  margin-top: 0.5rem;
}

@media screen and (min-width: 601px) {
  .post-header {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    margin-top: 3rem;
    margin-bottom: 3rem;
  }

  .post-header-image {
    margin: 0;
  }

  .post-header-image,
  .post-header-info {
    width: 50%;
  }
  .post-header-info {
    text-align: left;
    padding: 0 7rem 0 0;
  }

  .post-header.with-image .post-header-info {
    padding-left: 7rem;
  }

  .post-header-image-square {
    width: 25%;
  }
  .container.small .post-header-info {
    width: 75%;
  }
}


/* BLOCKS */

.wp-block-image {
  margin: 2rem 0;
}

.wp-block-image.wide {
  margin-left: -2rem;
  margin-right: -2rem;
}

.wp-block-image.wide figcaption {
  padding-left: 2rem;
}

@media screen and (max-width: 1064px) {
  .wp-block-image.wide {
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .wp-block-image.wide figcaption {
    padding-left: 1rem;
  }
}


.wp-block-image img {
  display: block;
  width: 100%;
}

.wp-block-image figcaption {
  font-size: var(--fs-7);
  padding-top: 0.5rem;
  opacity: 0.75;
  margin: 0 !important;
}

.wp-block-gallery {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.wp-block-gallery > figure {
  width: 33.33333%;
  padding: 0.5rem;
}
.wp-block-gallery > figcaption {
  font-size: var(--fs-7);
  color: #808080;
}


/* TAGS */

.tag {
  display: inline-block;
  vertical-align: middle;
  background-color: var(--col-dimmed-background);
  font-size: var(--fs-8);
  line-height: 1;
  color: rgba(var(--col-text-rgb), 0.75) !important;
  padding: 0.375rem 0.5rem;
  margin-right: 0.25rem;

  text-decoration: none;
  text-transform: uppercase;
  font-weight: 500;
}

.tag-flag {
  padding-left: 2.5rem;
  background-position: left center;
  background-size: auto 100%;
  background-repeat: no-repeat;
  position: relative;
}

.tag-flag:before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 33px;
  height: 22px;
  background: left top / 330px 440px no-repeat url('../images/flags.png?v=3');
}

/*
Flag grid positions:
KH (Cambodja): 0, 3
FO (Faroer): 8, 5
IS (IJsland): 6, 7
IN (India): 7, 7
NP (Nepal): 1, 12
PK (Pakistan): 1, 13
PL (Polen): 9, 13
TH (Thailand): 3, 17
TR (Turkey): 9, 17
VN (Vietnam): 1, 19
*/

.tag-flag.flag-kh:before {
  background-position: 0px -66px;
}
.tag-flag.flag-fo:before {
  background-position: -264px -110px;
}
.tag-flag.flag-is:before {
  background-position: -198px -154px;
}
.tag-flag.flag-in:before {
  background-position: -231px -154px;
}
.tag-flag.flag-np {
  padding-left: 1.5rem;
}
.tag-flag.flag-np:before {
  background-position: -33px -264px;
}
.tag-flag.flag-pk:before {
  background-position: -33px -286px;
}
.tag-flag.flag-pl:before {
  background-position: -297px -286px;
}
.tag-flag.flag-th:before {
  background-position: -99px -374px;
}
.tag-flag.flag-tr:before {
  background-position: -297px -374px;
}
.tag-flag.flag-vn:before {
  background-position: -33px -418px;
}


/* FLAGS */
.flag {
  display: inline-block;
  vertical-align: baseline;
  font-size: 28px;
  width: 1.5em;
  height: 1em;
  background: left top / 15em 20em no-repeat url('../images/flags.png?v=3');
}
.flag.flag-kh {
  background-position: 0em -3em;
}
.flag.flag-fo {
  background-position: -12em -5em;
}
.flag.flag-is {
  background-position: -9em -7em;
}
.flag.flag-in {
  background-position: -10.5em -7em;
}
.flag.flag-np {
  width: 27px;
  background-position: -1.5em -12em;
}
.flag.flag-pk {
  background-position: -1.5em -13em;
}
.flag.flag-pl {
  background-position: -13.5em -13em;
}
.flag.flag-th {
  background-position: -4.5em -17em;
}
.flag.flag-tr {
  background-position: -13.5em -17em;
}
.flag.flag-vn {
  background-position: -1.5em -19em;
}


/* COMMENTS */

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.comments-container {
  border-top: 1px solid var(--col-border);
}

.comment .avatar {
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.commentlist, .commentlist .children {
  list-style: none;
  padding: 0;
}
.commentlist .children {
  padding-left: 3rem;
  margin-top: 1rem;
}

.comment {
  /* margin-bottom: 1rem;
  border-bottom: 1px solid var(--col-border); */
  padding-bottom: 1rem;
}

.comment cite {
  font-style: normal;
}

.comment-meta {
  font-size: var(--fs-7);
  color: rgba(var(--col-text-rgb), 0.5);
}

.comment-author .fn {
  font-weight: 500;
}

.comment-meta a[href] {
  color: inherit;
  background: none;
}

.comment-body {
  position: relative;
  padding: 1rem 1rem 1rem 4rem;
  background-color: var(--col-dimmed-background);
}

.comment-body p {
  margin: 0.5em 0;
}

.comment-awaiting-moderation {
  display: block;
  color: #FF5745;
  line-height: 1.25;
}

.comment-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: var(--fs-7);
  text-transform: uppercase;
  font-weight: 500;
}

.comment-form input[type="checkbox"] {
  float: left;
}

.comment-form input[type="checkbox"] + label {
  margin-left: 1.5rem;
  width: calc(100% - 1.5rem);
  cursor: pointer;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"] {
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid var(--col-border);
  background-color: var(--col-background);
  color: var(--col-text);
  border-radius: 0;
  padding: 0.5rem;
  outline: none;
  transition: border-color .2s;
}
.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus {
  border-color: var(--col-primary);
}

.button,
.comment-form button,
.comment-form input[type="button"],
.comment-form input[type="submit"] {
  display: inline-block;
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 0.625rem 1rem 0.5rem 1rem;
  font-family: 'DIN Next Condensed';
  font-weight: 800;
  background-color: var(--col-primary);
  color: white !important;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.button .icon-right {
  margin-left: 0.5rem;
  font-size: 0.85rem;
  transition: transform .2s;
}
.button:hover .icon-right {
  transform: translateX(0.25rem);
}

.button .icon-left {
  margin-right: 0.5rem;
  font-size: 0.85rem;
  transition: transform .2s;
}
.button:hover .icon-left {
  transform: translateX(-0.25rem);
}


/* PAGINATION */

.pagination {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
}


/* ALERT */

.alert {
  margin: 1rem 0 0 0;
  padding: 1rem;
  background-color: rgba(var(--col-warning-rgb), 0.2);
}


/* BLOCKQUOTE */

blockquote {
  position: relative;
  margin: 2rem 0 2rem 2rem;
  padding: 0 3rem;
  border-left: 3px solid var(--col-primary);
  font-family: 'Georgia', serif;
  font-style: italic;
}
blockquote:before {
  content: '';
  /* font: 5rem 'Roboto';
  line-height: 1; */
  display: block;
  position: absolute;
  top: 0;
  left: -1rem;
  /* font-size: 8rem; */
  /* padding: 0.125rem 0; */
  width: 2rem;
  height: 2rem;
  /* text-align: center; */
  background-color: var(--col-background);
  /* color: var(--col-primary); */
  background: var(--col-background) center / 2rem 2rem no-repeat url('../images/quote.png');
}

blockquote cite {
  font-family: 'Roboto', sans-serif;
  font-style: normal;
  font-size: var(--fs-7);
  color: var(--col-meta-text);
}
