/*
 * Copyright (C) 2021 Axis Linux <mail@axislinux.org>
 *
 * This file contains all general styles for
 * axislinux.org website.
 */

/* body */
html, body {
  padding: 0;
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background-color: var(--bg-color);
}

/* all */
* {
  box-sizing: border-box;
  transition: all 0.2s ease-out;
}

/* paragraph */
p {
  font-weight: 300;
  color: var(--text-color);
}

/* bold */
b {
  font-weight: 400;
}

/* anchor */
a {
  text-decoration: none;
  color: var(--text-dark-color);
}

/* header break */
hr {
  padding: 1rem 0;
  border: 0;
  border-bottom: 2px solid var(--bg-code-color);
}


/*               */
/* table section */
/*               */

/* table */
table {
  border-collapse: collapse;
  width: 100%;
  transition: color .3s ease-out;
  margin-bottom: 2rem;
  display: block;
  white-space: nowrap pre-line;
  overflow-x: auto;
}

table tbody {
  display: table;
  width: 100%;
}

table td, table th {
  color: var(--text-color);
  border: 2px solid var(--bg-code-color);
  padding: 0.8rem;
  font-weight: 300;
}

table th {
  text-align: left;
  color: var(--accent-color);
  background-color: var(--bg-color);
  border: 2px solid var(--bg-code-color);
}

table td:first-child {
  color: var(--text-color);
  background-color: var(--bg-color);
  font-weight: 600;
}

/* navigation bar */
nav {
  display: grid;
  grid-template-columns: 1fr auto;
  background: var(--bg-code-color);
}


/* layout */
.wrapper {
  margin: 0 auto;
  width: 70%;
}

/* text */
.text {
  color: var(--text-color);
}

/* title */
.title {
  color: var(--accent-color);
}

/* footer */
.footer {
  text-align: center;
  background-color: var(--bg-dark-color);
  padding: 2rem;
  font-size: 1rem;
  color: var(--text-color);
}


/*               */
/* start section */
/*               */

/* start */
.start {
  text-align: center;
  background-color: var(--bg-color);
  padding: 2rem 0 10rem 0;
  padding-top: 70px;
}

/* start title */
.start-title {
  font-weight: 900;
  color: var(--accent-color);
  animation: wipe-enter 1s;
}

/* start description */
.start-description {
  color: var(--text-color);
  margin: -1rem auto 2rem auto;
  animation: fadeIn 1s;
  animation-delay: 1s;
  animation-fill-mode: forwards;
}

/* start terminal */
.start-terminal {
  width: 60%;
  margin: -11rem auto 3rem auto;
  text-align: left;
  color: var(--text-color);
  border-radius: 4px;
  background-color: var(--bg-code-color);
  min-height: 320px;
  animation: fadeUp 2s;
  box-shadow: 0px 10px 15px 8px var(--bg-dark-color);
}

/* pre start terminal */
.start-terminal pre {
  white-space: pre-line;
  padding-top: 1rem;
}

/* shell session */
.shell-session {
  font-family: Fira Code;
  font-size: 0.8rem;
  padding: 0.4rem 1.4rem;
  animation: fadeUp 1s;
  display: block;
}


/*             */
/* tab section */
/*             */

/* tab container */
.tab-container {
  position: relative;
}

.tab-container > ul {
  position: absolute;
  list-style: none;
  margin: 0;
  right: 1rem;
  top: -2rem;
  padding-left: 0;
}

/* tab code */
.tab-container .code {
  white-space: normal;
  padding: 1rem 1.5rem;
}

/* tab */
.tab {
  color: var(--text-dark-color);
  display: inline-block;
  padding: 0.3rem 0.5rem;
  font-weight: 200;
  cursor: pointer;
}

/* active tab */
.tab.active {
  color: var(--text-color);
  border-bottom: 1px solid var(--accent-color);
  font-weight: 700;
  animation: fadeUp linear 1s;
  -webkit-animation: fadeIn linear 1s;
  -moz-animation: fadeIn linear 1s;
  -o-animation: fadeIn linear 1s;
  -ms-animation: fadeIn linear 1s;
  display: inline-block;
}

/* tab pane */
.tab-pane {
  display: none;
  animation: fadeIn 1s 1;
}

/* active tab pane */
.tab-pane.active {
  font-family: Fira Code;
  font-size: 0.8rem;
  display: block;
}


/*              */
/* code section */
/*              */

/* code */
.code {
  border-radius: 4px;
  font-family: Fira Code;
  font-size: 0.7rem;
  background: var(--bg-code-color);
  border: 1px solid var(--bg-code-color);
  color: var(--text-color);
  white-space: nowrap;
  padding: 0 1.5rem 1rem 1.5rem;
  overflow-x: auto;
  position: relative;
}

/* code block */
.code-block {
  border-radius: 4px;
  font-family: Fira Code;
  font-size: 0.8rem;
  background: var(--bg-code-color);
  border: 1px solid var(--bg-code-color);
  color: var(--text-color);
  white-space: nowrap pre-line;
  padding: 0 1.5rem 1rem 1.5rem;
  overflow-x: auto;
  position: relative;
  display: block;
  opacity: 0;
}

.code-block b {
  font-weight: bold
}

/* inline code */
.code-inline {
  border-radius: 4px;
  font-family: Fira Code;
  font-size: 0.8rem;
  background: var(--bg-code-color);
  border: 1px solid var(--bg-code-color);
  color: var(--text-color);
  white-space: normal;
  word-wrap: break-word;
  padding: 3px 6px;
}

/* code copy button */
.code-button {
  border-radius: 4px;
  display: none;
}

.code-button-success {
  display: block;
  color: var(--astro15);
  background-color: var(--bg-color);
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  padding: 5px 10px;
  margin: 10px 10px 0 0;
  font-size: 1rem;
  position: absolute;
  top: 0;
  right: 0;
  border-radius: 4px;
}

.code-prefix {
 left: 0;
 color: var(--bg-light-color);
 text-align: left;
}

.code-prefix::before {
 content: attr(code-prefix-char)" ";
}


/*                */
/* button section */
/*                */

/* primary button */
.button-primary {
  border-radius: 4px;
  padding: 10px 22px;
  background-color: var(--accent-color);
  color: var(--white-color);
  position: relative;
  text-decoration: none;
  border: 0;
  transition: all .3s ease-out;
  display: inline-block;
  opacity: 0;
}

/* primary button addon */
.button-primary:after {
  border-radius: 4px;
  position: absolute;
  content: "";
  width: 1rem;
  height: 1rem;
  background-color: var(--accent-color-light);
  right: -0.4rem;
  top: -0.4rem;
  transition: all 0.3s ease-out;
}

/* secondary button */
.button-secondary {
  border-radius: 4px;
  padding: 10px 22px;
  border: 2px solid var(--text-color);
  transition: all 0.5s ease-out;
  opacity: 0;
}


/*       */
/* links */
/*       */

/* link */
.link {
  text-decoration: none;
  transition: all 0.3s ease-out;
}

/* link with text color */
.link-dark {
  color: var(--text-color);
}

/* link with accent color */
.link-light {
  color: var(--accent-color);
}


/*              */
/* form section */
/*              */

/* form group */
.form-group {
  text-align: center;
  animation-fill-mode: forwards;
}

/* input form */
.form-input {
  border-radius: 4px;
  padding: 10px 22px;
  background: var(--bg-code-color);
  border: 1px solid var(--bg-code-color);
  color: var(--text-color);
  transition: all 0.5s ease-out;
}

.form-input:focus {
  border-radius: 4px;
  padding: 10px 22px;
  background: var(--bg-code-color);
  border: 1px solid var(--accent-color);
  color: var(--text-color);
  transition: all 0.5s ease-out;
}

/* message sent text */
.message-sent {
  color: var(--accent-color);
}


/*              */
/* menu section */
/*              */

/* menu */
.menu {
  margin: 0;
  text-align: right;
  overflow: hidden;
  list-style: none;
}

/* menu item */
.menu-item {
  padding: 1rem;
  padding-top: 1.4rem;
  display: inline-block;
}

/* menu item toggle */
.menu-item.toggle {
  display: none;
}

/* menu theme switcher */
.menu-theme {
  padding: 1rem;
  padding-top: 1.4rem;
  display: inline-block;
  text-decoration: none;
  color: var(--text-color);
}

/* menu logo */
.logo {
  margin: 1rem 0 0 1rem;
}


/*              */
/* custom block */
/*              */

/* custom block */
.custom-block {
  opacity: 0;
  border-radius: 4px;
  margin-bottom: -.4rem
}

/* custom block bold text */
.custom-block b {
  font-weight: bold
}

.custom-block.danger,
.custom-block.tip,
.custom-block.warning {
  padding: .1rem 1.5rem;
  border-left-width: .5rem;
  border-left-style: solid;
  margin: 1rem 0
}

.custom-block-title {
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: -.4rem
}

.custom-block.tip {
  background: var(--bg-code-color);
  border-color: var(--text-dark-color);
}

.custom-block.tip .custom-block-title {
  color: var(--text-color);
}

.custom-block.tip a {
  color: var(--accent-color);
}

.custom-block.tip code {
  background: var(--bg-dark-color);
}

.custom-block.tip ul {
  color: var(--text-color);
}

.custom-block.tip .title {
  color: var(--accent-color);
}

.custom-block.warning {
  background-color: rgba(237, 199, 7, 0.2);
  border-color: var(--astro14);
}

.custom-block.warning .custom-block-title {
  color: var(--astro14);
}

.custom-block.warning a {
  color: var(--astro14);
}

.custom-block.warning ul {
  color: var(--astro14);
}

.custom-block.warning .title {
  color: var(--astro14);
}

.custom-block.danger {
  background-color: rgba(251, 3, 0, 0.2);
  border-color: var(--accent-color);
}

.custom-block.danger .custom-block-title {
  color: var(--accent-color);
}

.custom-block.danger a {
  color: var(--accent-color);
}

.custom-block.danger ul {
  color: var(--accent-color);
}

.custom-block.danger .title {
  color: var(--accent-color);
}

.custom-block.details {
  display: block;
  position: relative;
  border-radius: 2px;
  margin: 1.6em 0;
  padding: 1.6em;
}

.custom-block.details h4 {
  margin-top: 0
}

.custom-block.details figure:last-child,
.custom-block.details p:last-child {
  margin-bottom: 0;
  padding-bottom: 0
}

.custom-block.details summary {
  outline: none;
  cursor: pointer
}


/*                */
/* toggle section */
/*                */

/* toggle */
.toggle {
  display: none;
  position: relative;
}

.toggle span,
.toggle span:before,
.toggle span:after {
  content: '';
  position: absolute;
  height: 2px;
  width: 18px;
  border-radius: 4px;
  background: var(--accent-color);
  display: block;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  right: 0;
}

.toggle span:before {
  top: -6px;
}

.toggle span:after {
  bottom: -6px;
}

.toggle.open span {
  background-color: transparent;
}

.toggle.open span:before,
.toggle.open span:after {
  top: 0;
}

.toggle.open span:before {
  transform: rotate(45deg);
}

.toggle.open span:after {
  transform: rotate(-45deg);
}


/*                 */
/* feature section */
/*                 */

/* feature */
.feature {
  display: flex;
  flex-wrap: wrap;
}

/* feature item */
.feature-item {
  max-width: calc(33% - 20px);
  margin: 0 20px 0 0;
  animation-fill-mode: forwards;
}

/* feature item title */
.feature-item .title {
  margin-bottom: 0;
}

/* feature item paragraph */
.feature-item p {
  color: var(--text-dark-color);
  margin-top: 0.5rem;
}


/*                    */
/* keybinding section */
/*                    */

/* keybinding */
.keybinding {
  margin-top: 3rem;
  display: flex;
  animation-fill-mode: forwards;
}

/* keybinding detail */
.keybinding-detail {
  color: var(--text-dark-color);
  position: relative;
  border: 1px solid var(--bg-code-color);
  flex-basis: 50%;
  padding: 2rem 1rem 1rem 1rem;
  list-style: none;
  line-height: 2rem;
}

.keybinding-detail:first-child {
  text-align: right;
  padding-right: 1rem;
}

.keybinding-detail:last-child {
  padding-left: 1rem;
  margin-left: -1px;
}

.keybinding-detail:first-child .keybinding-title {
  position: absolute;
  right: 0.5rem;
  top: -2.25rem;
  padding: 0 0.5rem;
}

.keybinding-detail:last-child .keybinding-title {
  position: absolute;
  left: 0.5rem;
  top: -2.25rem;
  padding: 0 0.5rem;
}

.keybinding-label {
  background: var(--bg-code-color);
  border: 1px solid var(--bg-code-color);
  box-shadow: 0 1px 0 0 var(--bg-light-color);
  border-radius: 4px;
  font-family: Fira Code;
  font-size: 0.7rem;
  color: var(--text-color);
  padding: 3px 3px 1px 3px;
  vertical-align: middle;
}


/*                 */
/* callout section */
/*                 */

/* callout */
.callout {
  text-align: center;
  padding: 1rem 0 3rem 0;
}

/* callout paragraph */
.callout p {
  color: var(--text-dark-color);
  text-align: center;
}

/* callout primary button */
.callout .button-primary {
  margin-top: 0.5rem;
}


/*                   */
/* changelog section */
/*                   */

/* changelog */
.changelog {
  background-color: var(--bg-color);
  padding: 2rem 0;
}

/* changelog item */
.changelog-item {
  color: var(--text-color);
  display: flex;
}

/* changelog meta */
.changelog-meta {
  flex-basis: 25%;
}

/* changelog meta small */
.changelog-meta small {
  color: var(--text-dark-color);
  font-weight: 200;
  letter-spacing: 1px;
}

/* changelog title */
.changelog-title {
  color: var(--accent-color);
  margin-bottom: 0;
}

/* changelog callout */
.changelog-callout {
  margin: 3rem auto 2rem auto;
  text-align: center;
}


@media (max-width: 750px) {
  .start-terminal {
    width: 70%;
  }
  .tab-container > ul {
    right: auto;
    left: 0;
    padding-left: 0;
  }
  .tab-container .code {
    margin-top: 2rem;
  }
  .feature, .keybinding, .changelog-item {
    flex-direction: column;
  }
  .feature-item {
    max-width: 100%;
    margin: 0;
  }
  .keybinding {
    font-size: 0.8rem;
  }
}

/*
@media screen and (max-width: 600px) {
  nav {
    grid-template-columns: 70px auto;
  }

  .menu {
    text-align: right;
    padding: 0.5rem 1rem;
  }

  .menu-item{
    display: none;
  }

  .menu-item.toggle {
    padding: 0.5rem;
    display: inline-block;
  }

  .toggle {
    display: block;
  }

  .menu.responsive .menu-item:not(:first-child) {
    display: block;
    padding: 0 0 1 0;
  }
}
*/


/*                             */
/* small mobile device screens */
/*                             */
@media screen and (max-width: 600px) {

  /* menu item */
  .menu-item {
    display: none;
  }
}

/*                                    */
/* hover classes on supported devices */
/*                                    */
@media(hover: hover) and (pointer: fine) {

  /* anchor hover */
  a:hover {
    text-decoration: none;
    color: var(--text-dark-color);
  }

  /* primary button hover */
  .button-primary:hover {
    color: var(--bg-color);
    background-color: var(--text-color);
    transform: translate3D(0, -3px, 0);
  }

  /* primary button addon hover */
  .button-primary:hover::after {
    transform: rotate(90deg);
  }

  /* secondary button hover */
  .button-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
  }

  /* code button hover */
  .code button:hover {
    border-radius: 4px;
    color: var(--accent-color);
    box-sizing: border-box;
    transition: 0.2s ease-out;
    cursor: pointer;
    user-select: none;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0);
    padding: 5px 10px;
    font-size: 0.8em;
    position: absolute;
    top: 0;
    right: 0;
  }

  /* form input hover */
  .form-input:hover {
    border-radius: 4px;
    padding: 10px 22px;
    background: var(--bg-code-color);
    border: 1px solid var(--text-dark-color);
    color: var(--text-color);
    transition: all 0.5s ease-out;
  }

  /* link hover */
  .link:hover {
    color: var(--accent-color);
  }

  /* link with text color */
  .link-dark:hover {
    color: var(--accent-color);
  }

  /* link with accent color hover */
  .link-light:hover {
    color: var(--text-color);
  }

  /* menu theme switcher hover */
  .menu-theme:hover {
    color: var(--accent-color);
  }

  /* show code button when hovering on code block */
  .code-block:hover > .code-button {
    animation: wipe-enter 0.5s 1;
    display: block;
    color: var(--text-color);
    background-color: var(--bg-color);
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    padding: 5px 10px;
    margin: 10px 10px 0 0;
    font-size: 1rem;
    position: fixed;
    top: 0;
    right: 0;
    border-radius: 4;
  }

  /* code button hover */
  .code-button:hover {
    background-color: var(--accent-color)!important;
  }

  /* code button success hover */
  .code-button-success:hover {
    color: var(--bg-color);
    background-color: var(--astro15);
  }

  .custom-block a:hover {
    color: var(--text-color);
  }
}

/*                                           */
/* hover class alternatives on touch devices */
/*                                           */
/* code copy button temporarily disabled on mobile
@media(hover: none) and (pointer: none) {
  .code-button {
    animation: wipe-enter 0.5s 1;
    display: block!important;
    color: var(--text-color);
    background-color: var(--bg-color);
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    padding: 5px 10px;
    margin: 10px 10px 0 0;
    font-size: 1rem;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 4px;
  }
}
*/

/*            */
/* animations */
/*            */

/* fade up animation */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translate3d(0,30px,0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
}

@-moz-keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translate3d(0,30px,0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
}

@-webkit-keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translate3d(0,30px,0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
}

@-o-keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translate3d(0,30px,0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
}

@-ms-keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translate3d(0,30px,0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
}


/* fade in animation */
@keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}

@-moz-keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}

@-webkit-keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}

@-o-keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}

@-ms-keyframes fadeIn {
  0% {opacity:0;}
  100% {opacity:1;}
}

/* wipe enter animation */
@keyframes wipe-enter {
	0% {
    opacity:1;
		transform: scale(0, .025);
	}
	50% {
    opacity:1;
		transform: scale(1, .025);
	}
  100% {
    opacity:1;
  }
}

@-moz-keyframes wipe-enter {
	0% {
    opacity:1;
		transform: scale(0, .025);
	}
	50% {
    opacity:1;
		transform: scale(1, .025);
	}
  100% {
    opacity:1;
  }
}

@-webkit-keyframes wipe-enter {
	0% {
    opacity:1;
		transform: scale(0, .025);
	}
	50% {
    opacity:1;
		transform: scale(1, .025);
	}
  100% {
    opacity:1;
  }
}

@-o-keyframes wipe-enter {
	0% {
    opacity:1;
		transform: scale(0, .025);
	}
	50% {
    opacity:1;
		transform: scale(1, .025);
	}
  100% {
    opacity:1;
  }
}

@-ms-keyframes wipe-enter {
	0% {
    opacity:1;
		transform: scale(0, .025);
	}
	50% {
    opacity:1;
		transform: scale(1, .025);
	}
  100% {
    opacity:1;
  }
}

/* wipe enter 2 animation */
@keyframes wipe-enter-2 {
	0% {
    opacity:1;
		transform: scale(.025, 0);
	}
	50% {
    opacity:1;
		transform: scale(.025, 1);
	}
  100% {
    opacity:1;
  }
}

@-moz-keyframes wipe-enter-2 {
	0% {
    opacity:1;
		transform: scale(.025, 0);
	}
	50% {
    opacity:1;
		transform: scale(.025, 1);
	}
  100% {
    opacity:1;
  }
}

@-webkit-keyframes wipe-enter-2 {
	0% {
    opacity:1;
		transform: scale(.025, 0);
	}
	50% {
    opacity:1;
		transform: scale(.025, 1);
	}
  100% {
    opacity:1;
  }
}

@-o-keyframes wipe-enter-2 {
	0% {
    opacity:1;
		transform: scale(.025, 0);
	}
	50% {
    opacity:1;
		transform: scale(.025, 1);
	}
  100% {
    opacity:1;
  }
}

@-ms-keyframes wipe-enter-2 {
	0% {
    opacity:1;
		transform: scale(.025, 0);
	}
	50% {
    opacity:1;
		transform: scale(.025, 1);
	}
  100% {
    opacity:1;
  }
}


/* left to right animation - broken */
@keyframes left-to-right {
  0% {
    position: relative;
    opacity:0;
    margin-right: 100%;
  }
  100% {
    position: relative;
    opacity:1;
    margin-right: 0;
  }
}


/*                   */
/* animation classes */
/*                   */

/* fade up animation class */
@media (prefers-reduced-motion: no-preference) {
  .fade-up-animation {
    animation: fadeUp 1s 1;
    animation-fill-mode: forwards;
    animation-delay: 0.5s;
  }
}

/* fade in animation class */
@media (prefers-reduced-motion: no-preference) {
  .fade-in-animation {
    animation: fadeIn 1s 1;
    animation-fill-mode: forwards;
    animation-delay: 0.5s;
  }
}

/* wipe enter animation class */
@media (prefers-reduced-motion: no-preference) {
  .wipe-enter-animation {
    animation: wipe-enter 1s 1;
    animation-fill-mode: forwards;
  }
}

/* wipe enter 2 animation class */
@media (prefers-reduced-motion: no-preference) {
  .wipe-enter-2-animation {
    animation: wipe-enter-2 1s 1;
    animation-fill-mode: forwards;
  }
}

/* left to right animation class */
@media (prefers-reduced-motion: no-preference) {
  .left-to-right-animation {
    animation: left-to-right 1s 1;
    animation-fill-mode: forwards;
  }
}

/*
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1B1C1E;
    --bg-dark-color: #17181A;
    --bg-code-color: #222326;
    --accent-color: #FB0300;
    --accent-color-light: #E12A38;
    --text-color: #ECEFF4;
    --text-dark-color: #D8DEE9;
    --light-gray-color: #C6CBD1;
    --bg-light-color: #3A3C42;
    --dark-gray-color: #222326;
    --white-color: #ECEFF4;
    --black-color: #1B1C1E;
  }
}
 
@media (prefers-color-scheme: light) {
  :root {
    --bg-color: #ECEFF4;
    --bg-dark-color: #D8DEE9;
    --bg-code-color: #E5E9F0;
    --accent-color: #FB0300;
    --accent-color-light: #E12A38;
    --text-color: #1B1C1E;
    --text-dark-color: #17181A;
    --light-gray-color: #C6CBD1;
    --bg-light-color: #3A3C42;
    --dark-gray-color: #222326;
    --white-color: #ECEFF4;
    --black-color: #1B1C1E;
  }
}
*/
