@import './fonts.css';
@import './variables.css';

body {
  font-family: 'silka', sans-serif;
  padding: 0;
  margin: 0;
  color: var(--text);
}

::selection {
  background: var(--purple-m); /* WebKit/Blink Browsers */
  color: #fff;
}
::-moz-selection {
  background: var(--purple-m); /* Gecko Browsers */
  color: #fff;
}

html {
  min-height: 100%;
  background-image:
    url('./img/pattern.svg'),
    linear-gradient(to bottom, rgb(103 0 255 / 4%), transparent),
    linear-gradient(to bottom left, rgb(255 0 201 / 2%), transparent);
  background-size: 4px 4px, 100vw 200vh, 100vw 200vh;
  background-repeat: repeat, no-repeat, no-repeat;
  scroll-behavior: smooth;
}

html[data-dark-mode="true"] {
  background: #160430;
  background-image:
    url('./img/pattern-dark.svg'),
    linear-gradient(to bottom, rgb(103 0 255 / 15%), transparent),
    linear-gradient(to bottom left, rgb(255 0 201 / 10%), transparent 50%);
  background-size: 4px 4px, 100vw 200vh, 100vw 200vh;
  background-repeat: repeat, no-repeat, no-repeat;
}

.container {
  width: calc(100% - 2em);
  max-width: 70em;
  margin: 0 auto;
}

@media (min-width: 28em) {
  .container {
    width: calc(100% - 4em);
  }
}

h1, h2, h3, h4{
  margin: 0 0 .75em;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

h2 {
  padding-top: 1em;
}

#demo > h2:first-child {
  padding-top: 2.5em;
}

@media (min-width: 42em) {
  #demo > h2:first-child {
    padding-top: 0;
  }
}

h2.no-margin {
  padding-top: 0 !important;
}

h3 {
  margin-top: 2.5em;
}

h3 a:not(.button) {
  color: var(--text);
  display: inline-flex;
  align-items: center;
}

h3 a:not(.button) svg {
  width: .875em;
  display: block;
  margin-left: .5em;
}

h3 a:not(.button):hover svg {
  fill: var(--primary);
}

@media (min-width: 20em) {
  h2 {
    font-size: 1.75em;
  }
}

@media (min-width: 42em) {
  h2 {
    font-size: 2em;
  }
}
p {
  font-weight: 300;
  line-height: 1.5;
}

code {
  font-size: 0.9375em;
  padding: .1em .2em;
  background-color: rgba(0, 0, 0, .1);
  border-radius: .25em;
  line-height: 1;
  font-family: courier, monospace;
}
[data-dark-mode="true"] p code {
  background-color: rgba(255, 255, 255, .15);
  border: 1px solid var(--purple-md);
}
[data-dark-mode="true"] code > a:not(.button),
[data-dark-mode="true"] a:not(.button) > code {
  color: var(--purple-lm);
  text-decoration: underline;
}
section {
  margin-bottom: 3em;
}

section > ul {
  line-height: 1.5;
  list-style-type: none;
  margin: 1.5em 0;
}
section > ul li {
  margin-bottom: .5em;
  font-size: 1rem;
  font-weight: 300;
  color: currentColor;
}
section > ul li::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 5px;
  background-color: var(--primary);
  position: absolute;
  margin-left: -1em;
  margin-top: .55em;
}
[data-dark-mode="true"] section > ul li::before {
  background-color: var(--purple-m);
}
section h3 {
  margin: 1.5em 0 1em 0;
}
aside {
  display: block;
  padding: 1em;
  background-color: var(--purple-l);
  border-radius: .5em;
  margin: 2em 0;
}
[data-dark-mode="true"] aside {
  background-color: transparent;
  border: 2px solid var(--ui-green);
}

aside p {
  margin: 0;
  vertical-align: middle;
  font-size: .9em;
}

aside svg {
  width: 1.5em;
  display: inline-block;
  vertical-align: middle;
  fill: var(--purple-d);
}
[data-dark-mode="true"] aside svg {
  fill: var(--ui-green);
}
aside code {
  display: inline-block;
}

.button {
  appearance: none;
  background-color: var(--primary);
  border: 2px solid var(--primary);
  color: white;
  padding: 0.75em 2em;
  border-radius: 0.5em;
  box-shadow: 0 0 1em rgba(90, 41, 228, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  margin-bottom: 1em;
  text-decoration: none;
}

.button:hover {
  opacity: .9;
}

.button svg {
  width: 1em;
  fill: currentColor;
  display: block;
  margin-left: .5em;
}

@media (min-width: 23em) {
  .button {
    display: inline-flex;
    margin-right: 1em;
  }
}

.button--alt {
  background-color: rgba(255, 255, 255, .5);
  border-color: currentColor;
  color: grey;
  box-shadow: none;
}
[data-dark-mode="true"] .button--alt {
  background-color: var(--gray-l);
  border-color: #ddd;
  color: var(--gray-d);
}

.button--alt:hover {
  color: var(--grey-md);
}
[data-dark-mode="true"] .button--alt:hover {
  color: var(--gray-d);
  background: #fff;
}

a:not(.button) {
  color: var(--primary);
  text-decoration: none;
}
[data-dark-mode="true"] a:not(.button) {
  color: var(--purple-m);
}
a:not(.button):hover {
  text-decoration: underline;
}


.important {
  display: block;
  margin: 1.5em 2em;
  line-height: 1.4;
  font-size: 1.25em;
  opacity: 0.75;
}

.example {
  margin-bottom: 2em;
}

.example li {
  margin-bottom: .5em;
}

.formkit-outer {
  margin-bottom: 1em;
}

.formkit-label {
  display: block;
  margin-bottom: .25em;
}

.formkit-outer textarea,
.formkit-outer input {
  appearance: none;
  border: 1px solid var(--gray-l);
  padding: 0.75em;
  font-size: 0.875rem;
  width: 250px;
  max-width: 100%;
  border-radius: 0.5em;
  font-family: "silka";
  font-weight: 300;
}

.formkit-help {
  font-size: .75em;
  color: var(--gray-m);
  font-weight: 300;
  margin-top: .5em;
}

.formkit-outer label {
  font-weight: bold;
  font-size: 0.875em;
}

.formkit-outer .formkit-outer {
  margin-bottom: 0.5em;
}

.formkit-messages {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

li.formkit-message {
  font-size: .75em;
  padding-top: .25em;
  color: red;
  font-weight: 300;
  margin: 0;
}

.formkit-actions {
  margin-top: 0;
  transition: margin-top .25s;
}

.framework-jumplinks {
  padding: 0;
  margin: 2em 0;
  list-style-type: none;
  display: flex;
}
.framework-jumplinks li::before {
  display: none;
}
.framework-jumplinks a {
  width: 1.5em;
  height: 1.5em;
  padding: 1em;
  display: flex;
  border: 1px solid var(--purple-l);
  border-radius: .5em;
  margin-right: 1em;
  align-items: center;
  overflow: hidden;
  justify-content: center;
}
@media (min-width: 42em) {
  .framework-jumplinks a {
    width: 2em;
    height: 2em;
    padding: 1.25em;
    margin-right: 1.5em;
  }
}

.framework-jumplinks a:hover {
  background-color: var(--purple-ll);
}
.framework-jumplinks li:last-child a {
  margin-right: 0;
}
.framework-jumplinks a svg {
  width: 2.25em;
  aspect-ratio: 1;
  height: auto;
}
.framework-jumplinks a span {
  position: absolute;
  left: -999px;
}
.balls {
  background: url('./img/triangle.svg');
}
