/* Sign-in for Chef-Flix.

   The hero is a bright white kitchen and the brand is near-black, so the two
   are given their own halves rather than layering the ink over the photograph:
   a scrim heavy enough to make the form legible would have buried the dog. */

:root {
  --ink:        #08030F;
  --deep:       #261044;
  --panel-soft: #231334;
  --gold:       #F3C34E;
  --pink:       #E879F9;
  --lilac:      #E9D5FF;
  --lavender:   #C4B5FD;
  --dim:        #9A8CA8;
  --danger:     #FF8FA3;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; background: var(--ink); }
@media (max-width: 1100px) { html { font-size: 15px; } }

body {
  min-height: 100vh; min-height: 100dvh;
  background: var(--ink); color: #fff;
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

#shell { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; min-height: 100dvh; }

/* ------------------------------- the art ------------------------------ */

#art { position: relative; overflow: hidden; background: #f4f4f4; }
#art img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; display: block; }
/* feathers the photograph into the panel instead of ending on a hard seam */
#art-fade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(8,3,15,0.35) 0%, rgba(8,3,15,0) 22%, rgba(8,3,15,0) 62%, var(--ink) 100%),
    linear-gradient(to top, rgba(8,3,15,0.45), rgba(8,3,15,0) 40%);
}

/* ------------------------------ the panel ----------------------------- */

#panel {
  position: relative;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 3rem clamp(1.5rem, 4vw, 4.5rem);
  background:
    linear-gradient(to bottom, rgba(38,16,68,0.5) 0%, rgba(38,16,68,0.12) 45%, rgba(38,16,68,0) 75%),
    var(--ink);
}
.panel-inner { width: 100%; max-width: 24rem; }

.wordmark { font-size: 2.25rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.wm-gold { color: var(--gold); }
.wm-pink { color: var(--pink); margin-left: 0.3em; }

#panel h1 { font-size: 2rem; font-weight: 800; margin-top: 2.25rem; }
.sub { color: var(--dim); font-size: 0.9375rem; margin-top: 0.4rem; line-height: 1.5; }

#form { margin-top: 2rem; display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field > span { color: var(--lavender); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; }
.pw { position: relative; display: block; }

input[type="text"], input[type="password"] {
  width: 100%; height: 3rem; padding: 0 1rem;
  border: 0.125rem solid rgba(255,255,255,0.14); border-radius: 0.375rem;
  background: rgba(255,255,255,0.06); color: #fff; font: inherit; font-size: 1rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
input:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,0.09); }
.pw input { padding-right: 4.25rem; }

.reveal {
  position: absolute; right: 0.375rem; top: 50%; transform: translateY(-50%);
  height: 2.25rem; padding: 0 0.75rem; border: 0; border-radius: 0.25rem;
  background: rgba(255,255,255,0.08); color: var(--lavender);
  font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer;
}
.reveal:hover { background: var(--gold); color: var(--ink); }

.btn-primary {
  height: 3rem; border: 0; border-radius: 0.375rem;
  background: var(--gold); color: var(--ink);
  font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn-primary:hover:not(:disabled) { background: #ffd76a; }
.btn-primary:active:not(:disabled) { transform: scale(0.985); }
.btn-primary:disabled { opacity: 0.55; cursor: progress; }

.message { margin-top: 1rem; font-size: 0.9375rem; line-height: 1.5; color: var(--danger); }
.message.ok { color: var(--gold); }
.warning {
  margin-top: 0.75rem; padding: 0.75rem 0.875rem; border-radius: 0.375rem;
  border: 0.0625rem solid rgba(255,143,163,0.4); background: rgba(255,143,163,0.09);
  color: var(--lilac); font-size: 0.875rem; line-height: 1.5;
}
.fineprint { margin-top: 1.5rem; color: var(--dim); font-size: 0.75rem; line-height: 1.5; }

/* ------------------------------- stacked ------------------------------ */

@media (max-width: 820px) {
  #shell { grid-template-columns: 1fr; grid-template-rows: 34vh 1fr; }
  #art img { object-position: center 34%; }
  #art-fade {
    background:
      linear-gradient(to bottom, rgba(8,3,15,0.25) 0%, rgba(8,3,15,0) 45%, var(--ink) 100%);
  }
  #panel { padding: 1.75rem 1.25rem 3rem; align-items: flex-start; }
  .panel-inner { max-width: 28rem; margin: 0 auto; }
  #panel h1 { margin-top: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.01ms !important; } }
