/* ===== Fonts ===== */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../outfit/Outfit-SemiBold.otf') format('opentype');
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #000;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Main Layout ===== */
.main {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 122px;
  padding: 0 80px;
  position: relative;
}

/* ===== Left: Brand ===== */
.brand {
  display: flex;
  flex-direction: column;
  gap: 30px;
  flex-shrink: 0;
}

.brand__title {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand__logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 130px;
  line-height: 1;
  color: #fff;
  letter-spacing: -2px;
}

.brand__tagline {
  font-weight: 200;
  font-size: 70px;
  line-height: 1.2;
  color: #fff;
  letter-spacing: 2px;
}

.brand__desc {
  font-weight: 400;
  font-size: 22px;
  line-height: 200%;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Right: Glass Card ===== */
.card {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 50px 60px;
  border-radius: 40px;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
  flex-shrink: 0;
}

/* Gradient border via pseudo-element */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 40px;
  padding: 2px;
  background: linear-gradient(
    136deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.08) 83%,
    rgba(255, 255, 255, 0.4) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.card__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card__title {
  font-weight: 200;
  font-size: 30px;
  color: #fff;
  letter-spacing: 1px;
}

.card__subtitle {
  font-weight: 400;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* ===== Form ===== */
.card__form {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ===== Input Group ===== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 340px;
}

.input-wrap {
  position: relative;
  width: 340px;
}

.input-field {
  width: 100%;
  height: 66px;
  padding: 16px 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 20px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  font-weight: 400;
}

.input-field:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.32);
}

.input-field:focus {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.9);
}

.input-field:focus::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* ===== Error State ===== */
.input-wrap.is-error .input-field {
  border-color: rgba(255, 75, 75, 0.9);
}

.input-error {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 3px;
  font-size: 14px;
  color: #FF4B4B;
  line-height: 1.4;
  white-space: nowrap;
}

.input-wrap.is-error .input-error {
  display: block;
}

/* ===== Submit Button ===== */
.btn-submit {
  width: 340px;
  height: 66px;
  padding: 14px 10px;
  border: 1px solid #fff;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn-submit:hover {
  background: #fff;
  color: #000;
}

.btn-submit:active {
  opacity: 0.85;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: default;
  background: transparent;
  color: #fff;
}

/* ===== Per-page Font Tweaks ===== */
.page-cloud-agent .brand__logo {
  font-size: 90px;
}

.page-oasn .brand__tagline {
  font-size: 60px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 32px;
  height: 48px;
  background: rgb(134 134 134);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 30px;
  box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.05);
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ===== Responsive ===== */
@media (max-width: 1440px) {
  .main {
    gap: 80px;
    padding: 0 60px;
  }

  .brand__logo {
    font-size: 100px;
  }

  .brand__tagline {
    font-size: 54px;
  }

  .brand__desc {
    font-size: 18px;
  }
}

@media (max-width: 1024px) {
  .main {
    flex-direction: column;
    gap: 48px;
    padding: 60px 40px;
    overflow-y: auto;
    align-items: center;
    text-align: center;
  }

  .brand {
    align-items: center;
  }

  .brand__title {
    align-items: center;
  }

  .brand__logo {
    font-size: 80px;
  }

  .brand__tagline {
    font-size: 40px;
  }

  .brand__desc {
    font-size: 16px;
    max-width: 460px;
  }

  .card {
    padding: 40px 36px;
    align-items: center;
  }

  .card__header {
    align-items: center;
    text-align: center;
  }

  .card__form {
    align-items: center;
  }

  .input-group {
    align-items: center;
  }
}

@media (max-width: 480px) {
  .main {
    padding: 40px 20px;
    gap: 36px;
  }

  .brand__logo {
    font-size: 56px;
  }

  .brand__tagline {
    font-size: 28px;
  }

  .brand__desc {
    font-size: 14px;
    line-height: 1.8;
  }

  .card {
    padding: 30px 20px;
    border-radius: 28px;
  }

  .card::before {
    border-radius: 28px;
  }

  .card__title {
    font-size: 24px;
  }

  .input-group,
  .input-wrap,
  .input-field,
  .btn-submit {
    width: 280px;
  }

  .input-field {
    height: 56px;
    font-size: 16px;
    padding: 12px 18px;
  }

  .input-field::placeholder {
    font-size: 16px;
  }

  .btn-submit {
    height: 56px;
    font-size: 18px;
  }
}
