:root {
  color-scheme: light;
  --login-paper: #f4efe7;
  --login-ink: #292927;
  --login-muted: #73716d;
  --login-accent: #b65d43;
  --login-line: #c9c1b7;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-width: 320px; min-height: 100%; }

body {
  font-family: var(--app-font-family);
  font-weight: 400;
  color: var(--login-ink);
  background: var(--login-paper);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.login-page {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 680px;
  overflow: hidden;
}

.studio-background {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.site-header {
  position: absolute;
  top: 4%;
  left: 5%;
}

.brand { display: flex; align-items: center; gap: 16px; }
.brand-symbol { display: block; width: 48px; height: 48px; object-fit: contain; }
.brand-name { margin: 0; font-size: clamp(18px, 1.6vw, 24px); font-weight: 650; letter-spacing: -.035em; line-height: 1.35; }
.brand-caption { margin: 5px 0 0; font-size: 11px; font-weight: 500; letter-spacing: .39em; line-height: 1.5; color: #71716f; }

.hero-copy { position: absolute; top: 15.2%; left: 5.2%; }
.hero-copy h1 { margin: 0; font-size: clamp(64px, 6.72vw, 108px); font-weight: 750; line-height: 1.2; letter-spacing: -.055em; }
.hero-copy h1 span { display: block; }
.hero-copy p { margin: 20px 0 0; color: #6e6d69; font-size: clamp(17px, 1.65vw, 25px); line-height: 1.65; letter-spacing: .01em; }

.auth-panel { position: absolute; top: 25.7%; right: 5.05%; width: 29.5%; max-width: 500px; }
.auth-heading h2 { margin: 0; font-size: clamp(30px, 3.1vw, 48px); font-weight: 650; line-height: 1.3; letter-spacing: -.02em; }
.auth-heading p { margin: 10px 0 0; font-size: clamp(16px, 1.45vw, 22px); color: var(--login-muted); line-height: 1.6; }

.login-form { margin-top: 34px; }
.form-field + .form-field { margin-top: 28px; }
.form-label { display: block; margin-bottom: 12px; font-size: 18px; font-weight: 500; line-height: 1.4; color: #53534f; }

input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--login-line);
  border-radius: 8px;
  color: var(--login-ink);
  background: rgba(255, 255, 255, .09);
  font-size: 18px;
  font-weight: 400;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

input::placeholder { color: #8b8881; opacity: 1; }
input:hover { border-color: #a9a196; }
input:focus { border-color: var(--login-accent); box-shadow: 0 0 0 3px rgba(182, 93, 67, .12); background: rgba(255, 255, 255, .25); }
input:-webkit-autofill { -webkit-text-fill-color: var(--login-ink); box-shadow: 0 0 0 40px #f5f0e8 inset; }

.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 144px; gap: 12px; }
button { cursor: pointer; transition: background-color .18s ease, border-color .18s ease, opacity .18s ease, box-shadow .18s ease; }
button:focus-visible { outline: 3px solid rgba(182, 93, 67, .5); outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .65; }

.code-button {
  height: 56px;
  padding: 0 12px;
  border: 1px solid var(--login-line);
  border-radius: 8px;
  color: var(--login-accent);
  background: rgba(255, 255, 255, .08);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.code-button:hover:not(:disabled) { border-color: var(--login-accent); background: rgba(182, 93, 67, .06); }
.login-button { display: block; width: 100%; height: 60px; margin-top: 30px; border: 1px solid #424240; border-radius: 8px; color: #fffdf8; background: #414140; font-size: 22px; font-weight: 500; }
.login-button:hover:not(:disabled) { background: #2c2c2a; border-color: #2c2c2a; box-shadow: 0 5px 16px rgba(45, 39, 31, .1); }
.auth-note { margin: 20px 0 0; text-align: center; color: #75736e; font-size: 18px; line-height: 1.6; }
.status { visibility: hidden; min-height: 24px; margin: 12px 0 0; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.status.show { visibility: visible; }
.status.ok { color: #3b6c52; }
.status.error { color: #a33d2e; }

.site-footer { position: absolute; left: 3.5%; right: 3.3%; bottom: 5.4%; display: flex; justify-content: space-between; align-items: center; gap: 24px; color: #74736e; }
.footer-note { display: flex; align-items: center; gap: 18px; margin: 0; font-size: 16px; line-height: 1.5; }
.footer-note::before { content: ''; display: block; width: 50px; height: 1px; background: #9c9992; }
.footer-caption { margin: 0; font-size: 11px; letter-spacing: .35em; line-height: 1.5; }
.mobile-art { display: none; }

@media (min-width: 901px) and (max-height: 820px) {
  .site-header { top: 4.8%; }
  .brand-symbol { width: 42px; height: 42px; }
  .hero-copy { top: 17%; }
  .hero-copy h1 { font-size: clamp(60px, 6.05vw, 88px); }
  .hero-copy p { margin-top: 16px; font-size: 18px; }
  .auth-panel { top: 23%; }
  .auth-heading h2 { font-size: 32px; }
  .auth-heading p { font-size: 16px; margin-top: 8px; }
  .login-form { margin-top: 28px; }
  .form-field + .form-field { margin-top: 20px; }
  .form-label { font-size: 16px; }
  input, .code-button { height: 50px; font-size: 16px; }
  .login-button { height: 54px; margin-top: 24px; font-size: 18px; }
  .auth-note { margin-top: 12px; font-size: 14px; }
  .site-footer { bottom: 4%; }
}

@media (max-width: 1100px) and (min-width: 901px) {
  .brand-caption { font-size: 9px; letter-spacing: .28em; }
  .hero-copy p { max-width: 28ch; font-size: 16px; }
  .auth-panel { width: 33%; right: 4%; }
  .auth-heading h2 { font-size: 28px; }
  .auth-heading p { font-size: 15px; }
  .code-row { grid-template-columns: minmax(0, 1fr) 118px; gap: 10px; }
  .code-button { font-size: 14px; padding-inline: 8px; }
}

@media (max-width: 900px) {
  .login-page { height: auto; min-height: 100svh; padding: 28px 32px 24px; }
  .studio-background { display: none; }
  .site-header { position: static; }
  .brand { gap: 12px; }
  .brand-symbol { width: 42px; height: 42px; }
  .brand-name { font-size: 20px; }
  .brand-caption { font-size: 9px; letter-spacing: .25em; }
  .login-main { display: flex; flex-direction: column; gap: 38px; max-width: 680px; margin: 40px auto 0; }
  .hero-copy { position: static; }
  .hero-copy h1 { font-size: clamp(40px, 8vw, 64px); line-height: 1.16; letter-spacing: -.05em; }
  .hero-copy p { margin-top: 18px; font-size: 17px; line-height: 1.65; }
  .auth-panel { position: static; width: 100%; max-width: 440px; margin-inline: auto; }
  .auth-heading h2 { font-size: 29px; }
  .auth-heading p { font-size: 16px; margin-top: 7px; }
  .login-form { margin-top: 28px; }
  input { font-size: 16px; }
  .form-field + .form-field { margin-top: 22px; }
  .login-button { margin-top: 26px; height: 56px; font-size: 18px; }
  .mobile-art { display: block; width: calc(100% + 64px); height: 280px; margin: -18px -32px 0; overflow: hidden; }
  .mobile-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 35% 68%; }
  .site-footer { position: static; gap: 12px; margin-top: 12px; }
  .footer-note { gap: 12px; font-size: 13px; }
  .footer-note::before { width: 24px; }
  .footer-caption { font-size: 8px; letter-spacing: .2em; }
}

@media (max-width: 480px) {
  .login-page { padding: 24px 24px 22px; }
  .brand-symbol { width: 40px; height: 40px; }
  .brand-name { font-size: 18px; }
  .brand-caption { font-size: 8px; letter-spacing: .24em; }
  .login-main { gap: 32px; margin-top: 34px; }
  .hero-copy h1 { font-size: 42px; }
  .hero-copy p { margin-top: 16px; font-size: 15px; }
  .auth-heading h2 { font-size: 26px; }
  .auth-heading p { font-size: 15px; }
  input, .code-button { height: 52px; }
  .form-label { font-size: 15px; margin-bottom: 8px; }
  .code-row { grid-template-columns: minmax(0, 1fr) 116px; gap: 10px; }
  .code-button { padding-inline: 8px; font-size: 14px; }
  input { padding-inline: 13px; }
  .auth-note { font-size: 14px; }
  .mobile-art { width: calc(100% + 48px); height: 230px; margin: -10px -24px 0; }
  .footer-note { font-size: 12px; gap: 8px; }
  .footer-caption { font-size: 7px; letter-spacing: .16em; }
}

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