:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #182723;
  background: #edf1ed;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.layout {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(ellipse at 16% 10%, #f8faf5 0%, transparent 58%),
    radial-gradient(ellipse at 90% 95%, #dce8df 0%, transparent 54%);
}

.portal {
  display: grid;
  grid-template-columns: 0.96fr 1fr;
  width: min(100%, 960px);
  min-height: 560px;
  overflow: hidden;
  background: #fdfefc;
  border: 1px solid #d8e1d9;
  border-radius: 24px;
  box-shadow: 0 32px 84px -35px #172c2559, 0 8px 18px -12px #172c252b;
}

.identity {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 38px;
  min-width: 0;
  padding: 42px 42px 35px;
  overflow: hidden;
  color: #f3faf4;
  background: linear-gradient(150deg, #142923, #11241e 52%, #0e201b);
}

.identity::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(#ace4c412 1px, transparent 1px),
    linear-gradient(90deg, #ace4c412 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(135deg, transparent 20%, #000 80%);
}

.storage-art {
  position: absolute;
  z-index: -1;
  right: -14px;
  bottom: 15px;
  width: min(95%, 420px);
  height: auto;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #e4f4e9;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.brand img {
  border: 1px solid #a1e4bd42;
  border-radius: 10px;
}

.brand-divider {
  width: 1px;
  height: 15px;
  background: #adf1c74a;
}

.brand-s3 {
  color: #a9deb9;
}

.identity h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4.2vw, 3rem);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.identity h1 span {
  display: block;
}

.domain {
  align-self: flex-start;
  margin: auto 0 0;
  padding: 8px 12px;
  color: #d2edda;
  background: #152e25;
  border: 1px solid #a0d8b739;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.3;
}

.signin {
  align-self: center;
  min-width: 0;
  padding: 52px clamp(32px, 5.1vw, 72px);
}

.signin h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.625rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.intro {
  margin: 12px 0 30px;
  color: #54665e;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.fields {
  display: grid;
  gap: 18px;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
}

.field input,
.fields button {
  width: 100%;
  min-height: 49px;
  border-radius: 9px;
  font: inherit;
}

.field input {
  padding: 11px 13px;
  color: inherit;
  background: #f8faf7;
  border: 1px solid #b9c7bf;
  transition: border-color 150ms, background-color 150ms;
}

.field input::placeholder {
  color: #64746b;
}

.field input:focus {
  background: #fff;
  border-color: #32704f;
}

.field input[aria-invalid="true"] {
  border-color: #b35347;
}

.field input:focus-visible,
.fields button:focus-visible {
  outline: 2px solid #348058;
  outline-offset: 2px;
}

.fields button {
  position: relative;
  margin-top: 4px;
  padding: 10px 42px;
  color: #fff;
  background: #20583e;
  border: 1px solid transparent;
  font-weight: 640;
  cursor: pointer;
  transition: background-color 150ms;
}

.fields button svg {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
}

.fields button:hover {
  background: #174630;
}

.fields button:disabled {
  color: #f2f5f2;
  background: #5e7568;
  cursor: default;
}

.feedback {
  display: flex;
  align-items: center;
  min-height: 43px;
  margin: 12px 0 0;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.feedback:not(:empty) {
  color: #8e332b;
  background: #fdf1ed;
  border-color: #f0cec7;
}

@media (max-width: 760px) {
  .layout {
    padding: 24px;
  }

  .portal {
    grid-template-columns: 1fr;
    width: min(100%, 480px);
    min-height: 0;
  }

  .identity {
    gap: 18px;
    padding: 24px 26px;
  }

  .identity h1 {
    font-size: clamp(1.75rem, 6.2vw, 2.3rem);
  }

  .storage-art {
    right: -72px;
    bottom: -68px;
    width: 335px;
    opacity: 0.52;
  }

  .signin {
    padding: 30px 26px 21px;
  }

  .intro {
    margin-bottom: 22px;
  }
}

@media (max-width: 365px) {
  .layout {
    padding: 12px;
  }

  .identity,
  .signin {
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .field input,
  .fields button {
    transition: none;
  }
}
