/* Karala Gallery — start page and sign-in. One card on the studio's colours, set like the karala.co.uk masthead:
   League Spartan capitals for the name, small tracked capitals for labels and links. */

.auth { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column }
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 76px 20px 56px }

.auth-lang {
  position: absolute; top: 14px; right: 16px; padding: 8px 6px;
  font-size: 12px; line-height: 1; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fog); text-decoration: none;
}
.auth-lang:hover, .auth-lang:focus-visible { color: var(--paper) }

.auth-flashes { width: min(420px, 100%) }
.auth-flashes .flash { margin: 0 }
.auth-flashes .flash + .flash { margin-top: 8px }

.auth-card {
  width: min(420px, 100%);
  padding: 44px 36px 30px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 32px 90px var(--shadow);
}
.auth-mark {
  margin: 0 0 34px; text-align: center;
  font: 700 46px/0.9 var(--display); letter-spacing: 0.01em; text-transform: uppercase;
  color: var(--paper); text-wrap: balance; overflow-wrap: anywhere;
}
.auth-mark img { display: block; margin: 0 auto; max-height: 72px; max-width: 100%; width: auto }
.auth-title { margin: 0 0 18px; font-size: 18px; line-height: 1.35; font-weight: 500; letter-spacing: 0; overflow-wrap: anywhere }
.auth-text { margin: -6px 0 20px; color: var(--fog); font-size: 16px; line-height: 1.5 }
.auth-text + .auth-submit { margin-top: 4px }

.auth-form { display: grid; gap: 16px }
.auth-form label {
  margin: 0 0 8px; color: var(--fog);
  font: 500 12px/1.2 var(--font); letter-spacing: 0.16em; text-transform: uppercase;
}
.auth-form input[type="email"], .auth-form input[type="password"] {
  min-height: 50px; padding: 12px 14px; background: var(--viewing); font-size: 17px;
}
.auth-form input:focus { border-color: var(--paper) }
.auth-form .help { font-size: 13px; margin-top: 8px }
.auth-form .form-error { margin: -4px 0 0 }

.auth-submit { min-height: 52px; margin-top: 4px; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: 0.01em }
.auth-i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round }
.auth-submit .auth-i { transition: transform 0.15s ease-out }
.auth-submit:hover .auth-i { transform: translateX(3px) }

.auth-links { margin: 20px 0 0; font-size: 15px }
.auth-links a { color: var(--paper); text-decoration: none }
.auth-links a:hover { text-decoration: underline }
.auth-links .link-btn { font-size: 15px }
.auth-sep { margin: 24px 0 18px; border: 0; border-top: 1px solid var(--rule) }
.auth-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--fog) }

.auth-more { font-size: 14px; color: var(--fog) }
.auth-more summary { cursor: pointer; color: var(--paper); width: fit-content }
.auth-more p { margin: 10px 0 0; line-height: 1.5 }

.auth-back { margin: 0; font-size: 12px; line-height: 1.4; letter-spacing: 0.18em; text-transform: uppercase; text-align: center }
.auth-back a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 2px; color: var(--fog); text-decoration: none }
.auth-back a:hover, .auth-back a:focus-visible { color: var(--paper) }
.auth-i-back { width: 15px; height: 15px }

/* Public galleries under the card */
.auth-galleries { width: min(1080px, 100%); margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule) }
.auth-galleries-title { margin: 0 0 18px; font: 500 12px/1.2 var(--font); letter-spacing: 0.18em; text-transform: uppercase; color: var(--fog) }
.auth-gal-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 16px }
.auth-gal { display: block; text-decoration: none }
.auth-gal-img { display: grid; place-items: center; aspect-ratio: 3 / 2; overflow: hidden; background: var(--panel) }
.auth-gal-lock { width: 30px; height: 30px; color: var(--fog); stroke-width: 1.3 }
.auth-gal-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease-out }
.auth-gal:hover .auth-gal-img img { transform: scale(1.03) }
.auth-gal-title { display: block; margin-top: 10px; font-weight: 500 }
.auth-gal:hover .auth-gal-title { text-decoration: underline; text-underline-offset: 0.18em }
.auth-gal-sub { display: block; font-size: 14px; color: var(--fog) }

@media (max-width: 520px) {
  .auth-main { justify-content: flex-start; padding: 64px 14px 36px; gap: 18px }
  .auth-card { padding: 34px 22px 24px }
  .auth-mark { font-size: 40px; margin-bottom: 28px }
  .auth-gal-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px }
}
@media (prefers-reduced-motion: reduce) {
  .auth-submit:hover .auth-i, .auth-gal:hover .auth-gal-img img { transform: none }
}
