:root {
  color-scheme: light;
  --ink: #211e18;
  --muted: #6b665d;
  --accent: #e0593a;
  --paper: #f8f7f3;
  --line: #e4ded3;
  --font-heading: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif;
  --font-body: "DM Sans", "Segoe UI", Arial, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: inherit; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.login-page {
  display: grid;
  min-height: calc(100vh - 58px);
  grid-template-columns: minmax(360px, .9fr) minmax(440px, 1.1fr);
}

.welcome-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 36px clamp(32px, 6vw, 88px) 30px;
  background:
    radial-gradient(circle at 17% 85%, rgba(224, 107, 67, .22), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, .62), transparent 28%),
    #eee9dd;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  width: 43px;
  height: 43px;
  border: 2px solid rgba(33, 30, 24, .12);
  border-radius: 50%;
  object-fit: cover;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .12em;
}

.brand-mark { color: var(--accent); }

.welcome-copy {
  position: relative;
  z-index: 1;
  max-width: 490px;
  margin: auto 0 20px;
  padding-top: 76px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.welcome-copy h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(50px, 6vw, 78px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .98;
}

.welcome-copy h1 span { color: var(--accent); }

.welcome-copy > p:last-child {
  max-width: 370px;
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.music-art {
  position: relative;
  width: min(100%, 440px);
  height: 190px;
  margin: 0 0 22px;
}

.music-art__disc {
  position: absolute;
  top: 5px;
  left: 10%;
  width: 175px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #292721 0 2px, #36332c 3px 4px, #26241f 5px 7px);
  box-shadow: 0 20px 42px rgba(33, 30, 24, .18);
  animation: disc-spin 18s linear infinite;
}

.music-art__disc span {
  position: absolute;
  inset: 34%;
  border: 7px solid #f8f7f3;
  border-radius: 50%;
  background: var(--accent);
}

.music-art__note {
  position: absolute;
  z-index: 1;
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 10px 20px rgba(33, 30, 24, .12);
}

.music-art__note--one { top: 0; right: 17%; font-size: 74px; transform: rotate(12deg); }
.music-art__note--two { right: 3%; bottom: 22px; font-size: 54px; transform: rotate(-12deg); }

.music-art__caption {
  position: absolute;
  right: 17%;
  bottom: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
}

.back-link, .mobile-back-link {
  width: fit-content;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.back-link span, .mobile-back-link span { margin-right: 8px; color: var(--accent); }
.back-link:hover, .mobile-back-link:hover { color: var(--ink); }

.form-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 34px 24px;
  background: #fff;
}

.login-card { width: min(100%, 410px); }
.mobile-brand { display: none; }
.form-eyebrow { margin-bottom: 12px; }

.login-card h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(30px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
}

.form-intro {
  margin: 12px 0 32px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-form { display: grid; }
.login-form > label, .password-label label {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.login-form > input, .password-field input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: 14px var(--font-body);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.login-form > input::placeholder, .password-field input::placeholder { color: #9a958c; }
.login-form > input:focus, .password-field input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(224, 89, 58, .12);
}

.password-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 21px 0 9px;
}

.password-label label { margin: 0; }
.password-label a, .login-help a { color: var(--accent); font-size: 12px; font-weight: 700; text-underline-offset: 3px; }
.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: 700 12px var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-button:hover { color: var(--ink); }
.password-field { position: relative; }
.password-field input { padding-right: 70px; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 13px;
  padding: 5px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 12px var(--font-body);
  cursor: pointer;
}

.password-toggle:hover { color: var(--accent); }

.remember-option {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin: 19px 0 22px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.remember-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.submit-button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font: 700 14px var(--font-body);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.submit-button:hover { transform: translateY(-1px); background: var(--accent); border-color: var(--accent); }
.submit-button span { font-size: 18px; }

.form-message {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-message:not(:empty) { margin-top: 14px; }
.reset-dialog {
  width: min(440px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(33, 30, 24, .2);
}

.reset-dialog::backdrop { background: rgba(33, 30, 24, .48); backdrop-filter: blur(4px); }
.reset-card { position: relative; padding: 34px; }
.reset-close {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 27px;
  cursor: pointer;
}

.reset-close:hover { background: var(--paper); color: var(--ink); }
.reset-card h2 { margin: 0; font-family: var(--font-heading); font-size: 30px; letter-spacing: -.04em; }
.reset-card .form-intro { margin: 11px 0 21px; }
.reset-label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.reset-input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: 14px var(--font-body);
}

.reset-input:focus { border-color: var(--accent); outline: 3px solid rgba(224, 89, 58, .12); }
.reset-submit { width: 100%; margin-top: 18px; }
.reset-submit:disabled { cursor: wait; opacity: .65; }
.reset-message { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.reset-message:empty { display: none; }
.login-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: #928d84;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
}

.login-divider::before, .login-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.google-button-wrap { display: flex; width: 100%; min-height: 44px; justify-content: center; }

.google-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #dadce0;
  border-radius: 5px;
  background: #fff;
  color: #3c4043;
  font: 600 14px var(--font-body);
  cursor: pointer;
  transition: background .18s ease, box-shadow .18s ease;
}

.google-button:hover { background: #f8faff; box-shadow: 0 1px 3px rgba(60, 64, 67, .22); }
.google-button svg { width: 18px; height: 18px; flex: none; }
.google-note { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.login-help { margin: 25px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.form-footer { margin: 45px 0 0; color: #928d84; font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.form-footer span { margin: 0 5px; color: var(--accent); }
.mobile-back-link { display: none; }

@keyframes disc-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .login-page { grid-template-columns: 1fr; }
  .welcome-panel { display: none; }
  .form-panel { min-height: 100vh; justify-content: flex-start; padding: 28px 24px 22px; }
  .login-card { width: min(100%, 410px); margin: auto 0; }
  .mobile-brand { display: inline-flex; margin-bottom: 54px; }
  .mobile-back-link { display: block; margin: 24px auto 0; }
  .form-footer { margin-top: 28px; }
}

@media (max-width: 420px) {
  .form-panel { padding-right: 22px; padding-left: 22px; }
  .mobile-brand { margin-bottom: 42px; }
  .form-intro { margin-bottom: 26px; }
  .reset-card { padding: 30px 23px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
