:root {
  --card-offset: 40%;
  --pico-background-color: black;
  --accent1: #FF00FF;
  --accent2: #0091FF;
  --accent3: #FBFF00;
  --tricolor-gradient: linear-gradient(
    110deg,
    var(--accent1) 0%,
    var(--accent1) 37.3%,
    var(--accent2) 37.3%,
    var(--accent2) 66.6%,
    var(--accent3) 66.6%,
    var(--accent3) 100%
  );
}

#card h1,
#card h2,
#card h3,
#card p,
dialog h1,
.button {
  font-family: "Science Gothic", sans-serif !important;
  font-optical-sizing: auto;
  font-style: normal;
  letter-spacing: -0.05em;
  border: none;
}
#card {
  height: 100lvh;
  width: 100lvw;
  position: relative;
  text-align: center;
}
#swizzle {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  height: 100%;
  width: 100%;
  background-image: url(./images/swizzle.svg);
  background-size: 130vw;
  background-repeat: no-repeat;
  background-position: 0 calc(var(--card-offset) - 6.6vw);
}
#card h1 {
  font-size: 6vw;
  font-weight: 800;
  color: white;
  position: absolute;
  left: calc(50%);
  top: calc(var(--card-offset) - 1.18em);
  z-index: 100;
  translate: -50%;
}
#card p {
  font-size: 2vw;
  color: white;
  font-weight: 400;
  line-height: 1;
  position: absolute;
  left: calc(50%);
  top: calc(var(--card-offset) + 2.7em);
  z-index: 6;
  translate: -50%;
}
#card p + p {
  top: calc(var(--card-offset) + 4.0em);
  z-index: 5;
}
#card #contact {
  height: 100lvh;
  width: 100lvw;
  position: relative;
  z-index: 100;
}

#card .button.button {
  position: relative;
  top: calc(var(--card-offset) + 6em);
}
.button.button {
  font-size: 2.4vw;
  display: inline-block;
  background: transparent;
  text-decoration: none;
  color: black;
  padding: .1em 1em;
  font-weight: 600;
  text-transform: uppercase;
  background-size: 300% 100%;
  transition: translate 0.3s ease;
  translate: 0;
  border-radius: 100px;
  user-select: none;

  /* background: linear-gradient(
    90deg,
    rgba(255, 0, 255, 1) 0%,
    rgba(0, 145, 255, 1) 50%,
    rgba(251, 255, 0, 1) 100%); */
}
.button.button::before {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: white;
  z-index: -1;
  border-radius: 100px;
}
.button.button::after {
  content: "";
  width: 100%;
  height: calc(100% + 0.2em);
  position: absolute;
  top: 0;
  left: 0;
  background: var(--tricolor-gradient);
  z-index: -2;
  border-radius: 100px;
  transition: height 0.3s ease;
}

.button.button:hover {
  translate: 0 -0.2em;
  /* background-position: left center; */
}
.button.button:hover::after {
  height: calc(100% + 0.4em);
}

 /* Modal styles */
dialog article {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--pico-block-spacing-vertical) * 2);
}
dialog article::before,
dialog article::after {
  content: "";
  display: block;
  width: calc(100% + var(--pico-block-spacing-vertical));
  height: 1em;
  background: var(--tricolor-gradient);
  position: absolute;
  top: 0;
  left: calc(0px - var(--pico-block-spacing-vertical));
}

dialog .contents {
  flex: 1 1 auto;
  height: calc(100% - var(--pico-block-spacing-vertical) * 2);
  padding-block: var(--pico-block-spacing-vertical);
  overflow: auto;
}

/* Modal transition */
dialog {
  --appear: 0.3s;
  transition: all var(--appear);
  transition-behavior: allow-discrete;
}
dialog:not([open]),
dialog[open=false] {
    display: none;
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
    background-color: rgba(0,0,0,0);
}
/* need starting style to transition in from display none */
@starting-style {
  dialog[open] {
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
    background-color: rgba(0,0,0,0);
  }
}

dialog article {
  transition: all var(--appear);
  opacity: 1;
  top: 0;
}
dialog:not([open]) article,
dialog[open=false] article {
  opacity: 0;
  top: -50px;
}
@starting-style {
  dialog[open] article {
    opacity: 0;
    top: -50px;
  }
}

/* Contact Form */
#contact-form .button {
  font-size: 1.3em;
  width: auto;
  display: block;
  margin: 0 auto 0;
}

#contact-form .form-row {
  display: flex;
  gap: 20px;
}

#contact-form .captcha-container {
  position: relative;
  margin-bottom: 1.5em;
}

#contact-form .form-row > .col {
  flex: 1 1 0;
  min-width: 0;
}
#contact-form .col-md-8 {
  padding: 40px;
}

#captcha {
  position: absolute;
  left: 50%;
  top: -4em;
  z-index: 9;
  translate: -50%;
  display: none;
}

/* overlay color to match pico theme */
#captcha::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 100, 255, 0.08);
  pointer-events: none;
}
/* fix for white background from pico theme */
#captcha iframe {
  color-scheme: normal;
}

/* Shake animation for validation feedback */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

#captcha.shake {
  animation: shake 0.5s ease;
}

@media  only screen and (max-width: 800px) {
  #contact-form {
      margin: 20px 0;
  }
}

@media  only screen and (max-width: 400px) {
  #contact-form .col-md-8 {
      padding: 20px;
  }
}
