@font-face {
  font-family: "Kalam Notes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/kalam-latin-ext.woff2") format("woff2");
}

:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #292231;
  background: #f3eff6;
  --ink: #292231;
  --muted: #716778;
  --lavender: #d9cee8;
  --lavender-deep: #684683;
  --paper: #fffefd;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 17% 10%, rgba(255, 255, 255, .96), transparent 31rem),
    radial-gradient(circle at 92% 92%, rgba(217, 206, 232, .68), transparent 30rem),
    linear-gradient(145deg, #f8f5fa 0%, #eee8f2 100%);
}

.login-shell {
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 850px);
  min-height: 510px;
  padding: clamp(28px, 6vw, 64px);
  display: grid;
  grid-template-columns: minmax(210px, .8fr) minmax(300px, 1.2fr);
  align-items: center;
  gap: clamp(40px, 7vw, 82px);
  border: 1px solid rgba(91, 69, 109, .13);
  border-radius: 30px;
  background: rgba(255, 254, 253, .88);
  box-shadow: 0 24px 70px rgba(55, 39, 67, .15);
  backdrop-filter: blur(14px);
}

.login-visual {
  position: relative;
  width: min(100%, 244px);
  aspect-ratio: 340 / 470;
  justify-self: center;
  transform: rotate(-2deg);
}

.notebook-shadow {
  position: absolute;
  inset: 9% -9% -8% 8%;
  border-radius: 45%;
  background: rgba(54, 38, 68, .25);
  filter: blur(22px);
}

.notebook-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(62, 39, 81, .16);
  border-radius: 16px 25px 25px 16px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .28), transparent 34%),
    linear-gradient(145deg, #cbb9df, #8c6aa8 64%, #6a477f);
  box-shadow:
    inset 8px 0 16px rgba(67, 41, 86, .15),
    inset -3px 0 0 rgba(51, 31, 65, .16),
    0 16px 35px rgba(47, 31, 58, .22);
}

.binding {
  position: absolute;
  left: -9px;
  top: 8%;
  bottom: 8%;
  width: 23px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.binding i {
  width: 24px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(#675d6d, #b7adb9 48%, #4c4452 52%);
  box-shadow: 0 1px 2px rgba(33, 24, 39, .3);
}

.cover-mark {
  margin-top: -14px;
  color: #fff;
  font-family: "Kalam Notes", cursive;
  font-size: clamp(42px, 6vw, 58px);
  text-shadow: 0 2px 6px rgba(50, 31, 64, .24);
}

.cover-line {
  position: absolute;
  left: 23%;
  right: 18%;
  top: 59%;
  height: 1px;
  background: rgba(255, 255, 255, .5);
}

.login-content { min-width: 0; }

.eyebrow {
  margin: 0 0 9px;
  color: var(--lavender-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1;
  letter-spacing: -.045em;
}

.intro {
  max-width: 39rem;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.auth-message {
  margin: 22px 0 0;
  padding: 13px 15px;
  border-left: 4px solid #9b3154;
  border-radius: 3px 12px 12px 3px;
  background: #f8edf1;
  color: #6f2340;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

[data-auth-state="unavailable"] .auth-message {
  border-left-color: #9a641d;
  background: #fbf3e6;
  color: #70470f;
}

.login-button {
  width: fit-content;
  min-height: 52px;
  margin-top: 28px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid #684683;
  border-radius: 14px;
  background: #684683;
  color: #fff;
  font-size: 15px;
  font-weight: 780;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(104, 70, 131, .22);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.login-button:hover {
  background: #57376f;
  box-shadow: 0 12px 28px rgba(104, 70, 131, .29);
  transform: translateY(-1px);
}

.login-button:focus-visible {
  outline: 4px solid rgba(104, 70, 131, .27);
  outline-offset: 3px;
}

.privacy-note {
  max-width: 31rem;
  margin: 16px 0 0;
  color: #857b8c;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 680px) {
  .login-shell { align-items: start; padding-top: max(28px, env(safe-area-inset-top)); }

  .login-card {
    min-height: 0;
    padding: 28px 24px 30px;
    grid-template-columns: 1fr;
    gap: 25px;
    border-radius: 24px;
  }

  .login-visual { width: 132px; }
  .cover-mark { font-size: 34px; }
  .login-content { text-align: center; }
  .eyebrow { margin-bottom: 8px; }
  .intro { margin-top: 16px; font-size: 15px; }
  .auth-message { text-align: left; }
  .login-button { width: 100%; margin-top: 23px; }
  .privacy-note { margin-right: auto; margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .login-button { transition: none; }
}
