/* base */

:root {
  --primary: #432e7c;
  --secondary: #634bb2;
  --success: #27a376;
  --error: #e03137;
  --black: #050505;
  --blue: #016fe5;
  --gray: #5d5d5d;
  --light-gray: #a0aec0;
  --border-color: #f1f2f4;
  --green: #34c759;
  --shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.12);

  --fs-h1: clamp(32px, 3.33vw, 4rem);
  --fs-h2: clamp(32px, 2.5vw, 3rem);
  --fs-h3: clamp(24px, 2.08vw, 2.5rem);
  --fs-h4: clamp(24px, 1.9vw, 2.25rem);
  --fs-h5: max(1.5rem, 18px);
  --fs-h6: max(1.25rem, 16px);
}

@font-face {
  font-family: "LINESeedSans";
  font-weight: 300;
  src: url("../fonts/LINESeedSansTH_W_Th.woff2") format("woff2");
}

@font-face {
  font-family: "LINESeedSans";
  font-weight: 400;
  src: url("../fonts/LINESeedSansTH_W_Rg.woff2") format("woff2");
}

@font-face {
  font-family: "LINESeedSans";
  font-weight: 700;
  src: url("../fonts/LINESeedSansTH_W_Bd.woff2") format("woff2");
}

h1,
h2,
h3,
h4,
h5,
h6 {
  /* text-wrap: balance; */
  font-weight: 700;
  line-height: 1.125;
  letter-spacing: -0.5px;
}

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

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

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

h4 {
  font-size: var(--fs-h4);
}

h5 {
  font-size: var(--fs-h5);
}

h6 {
  font-size: var(--fs-h6);
}

button,
a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.15s, background-color 0.15s, color 0.15s;
}

* {
  touch-action: manipulation;
  font-family: "LINESeedSans", sans-serif;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  font-smooth: always;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
  border-color: var(--border-color);
}

*:not(.otp-input) {
  outline: none;
}

.bg-gradient-violet {
  background-image: linear-gradient(90deg, #8400ff 0%, #ed3b7d 50.5%, #ec7c32 100%);
}

html {
  font-size: clamp(14px, 0.84vw, 16px);
  scroll-behavior: smooth;
}

.body-bg-gradient::after {
  width: 100%;
  height: 90vh;
  content: "";
  position: absolute;
  z-index: -1;
  background: linear-gradient(180deg, #edfbfe 0%, #ffffff 100%);
}

.body-bg-1::after {
  width: 100%;
  height: 90vh;
  content: "";
  position: absolute;
  z-index: -1;
  background-image: url("../images/body-bg.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: bottom;
}

.body-bg-2 {
  background-image: url("../images/body-bg-support.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top;
}

@media screen and (max-width: 1024px) {
  html {
    font-size: 14px;
  }
  .body-bg-1 {
    background-size: cover;
  }
  .body-bg-2 {
    background-size: cover;
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--dark);
  animation: fade-in 0.35s forwards;
  background-repeat: no-repeat;
  position: relative;
}

#main-content {
  flex: 1;
}

#main-content:where(:not(.no-space)) {
  margin-top: 9rem;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

address {
  font-style: normal;
}

.shadow {
  box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.12);
}

button:disabled {
  opacity: 0.4;
  pointer-events: none;
}

ul li {
  list-style: disc;
  margin-left: 2rem;
}

ol li {
  list-style: decimal;
  margin-left: 2rem;
}

.disabled {
  pointer-events: none;
}

/* Scroll bar */

::-webkit-scrollbar {
  width: 10px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #888;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* text gradient */

.text-gradient.animated {
  background-size: 200% auto;
  animation: textShine 2s ease-in-out infinite alternate;
}

@keyframes textShine {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* accordion */

.accordion {
  width: 100%;
  display: flex;
  text-align: left;
  flex-direction: column;
}

.accordion .accordion-icon:not(:has(.fa-chevron-down)) {
  width: 1rem;
  height: 1rem;
  position: relative;
  flex-shrink: 0;
}

.accordion .accordion-icon:not(:has(.fa-chevron-down))::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  width: 100%;
  height: 0.0625rem;
  background: black;
}

.accordion .accordion-icon:not(:has(.fa-chevron-down))::after {
  position: absolute;
  left: 50%;
  top: 0;
  transform: rotate(0deg);
  transform-origin: center;
  content: "";
  width: 0.0625rem;
  height: 100%;
  background: black;
  transition: 0.25s;
}

.accordion .accordion-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  cursor: pointer;
}

.accordion .accordion-body {
  display: grid;
  overflow: hidden;
  width: 100%;
  transition: grid-template-rows 0.25s, padding 0.25s;
  grid-template-rows: 0fr;
}

.accordion .accordion-content {
  overflow: hidden;
}

.accordion[data-enabled="true"] .accordion-body {
  grid-template-rows: 1fr;
}

.accordion[data-enabled="true"] .accordion-icon::after {
  transform: rotate(-90deg);
}

.accordion .accordion-icon .fa-chevron-down {
  transition: 0.15s;
}

.accordion[data-enabled="true"] .accordion-icon .fa-chevron-down {
  transform: rotate(-180deg);
}

/* checkbox */

input[type="checkbox"]:not(.switch) {
  color: #fff;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(88, 88, 88, 0.6);
  min-width: 1.125rem;
  min-height: 1.125rem;
  border-radius: 5px;
  /* top: 0.225rem; */
  overflow: hidden;
  position: relative;
  transition: background-color 0.1s;
}

input[type="checkbox"]:not(.switch):checked {
  background: var(--primary);
}

input[type="checkbox"]:not(.switch):checked::before {
  display: block;
}

input[type="checkbox"]:not(.switch):checked::before {
  display: block;
}

input[type="checkbox"]:not(.switch)::before {
  position: absolute;

  content: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="%23fff" d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>');
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: -0;
  width: 60%;
  height: 60%;
  top: 45%;
  left: 50%;
  font-size: 0.5rem;
  transform: translate(-50%, -50%);
  display: none;
}

/* input number */

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* modal */

.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 42;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(5px);
}

.input-wrapper.required label::after {
  content: "*";
  color: var(--error);
}

/* password input */
.password-input {
  width: 100%;
  position: relative;
}

.password-input .eye-toggle {
  position: absolute;
  right: 0;
  top: 20%;
  background: #fff;
  padding: 0.5rem 0.5rem;
}

.password-input .eye-toggle i {
  transition: 0.15s;
}

.password-input input[type="text"] ~ .eye-toggle i {
  opacity: 0.25;
}

/* footer */

.get-started-button {
  background: linear-gradient(90deg, #8400ff 50%, #ed3b7d 75.5%, #ec7c32 100%);
  background-size: 200% 100%;
  background-position: 100% 0;
  transition: background 0.25s ease-in-out;
  border-color: #C3ADFF;
}

.get-started-button:hover {
  background-position: 70% 0;
  background-size: 300% 200%;
  /* opacity: 0.5; */
}

/* Try button */

.try-button {
  display: flex;
  justify-items: center;
  align-items: center;
  color: #fff;
  border-radius: 999px;
  gap: 0.625rem;
  padding: 0.5rem 1.25rem;
  font-weight: bold;
  background-image: linear-gradient(to right, #686cfc, #ff6a53, #ff6a53, #686cfc);
  width: fit-content;
  background-size: 300% 100%;
  transition: background 0.4s ease-in-out;
}

.try-button:hover {
  background-position: 100% 0;
}

/* Switch */

.switch {
  appearance: none;
  width: 2.5rem;
  aspect-ratio: 2;
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
  background-color: rgba(155, 159, 167, 0.34);
  transition: background-color 0.15s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 10%;
  width: 34%;
  transform: translateY(-50%);
  aspect-ratio: 1/1;
  border-radius: 99999px;
  background-color: #fff;
  transition: transform 0.15s;
}

.switch::before {
  content: "Off";
  position: absolute;
  left: -65%;
  font-size: 0.875rem;

  color: #9b9fa7;
}

.switch:checked::before {
  content: "On";
  color: var(--primary);
}

.switch:checked::after {
  transform: translateY(-50%) translateX(140%);
}

.switch:checked {
  background: var(--primary);
}
