/* ============================================================
   Indocement Distribusi, sign in.
   Built on the Harmony foundations: deep navy primary ramp, one gold
   accent, Inter at three weights (300/400/700), 0px radii, flat fills,
   8px spacing scale, tracking at zero.

   Three deliberate departures from Harmony, all requested:
     the plant photograph behind the poster column,
     the reveal that plays line by line,
     the card carrying a border and a fill and a shadow at once
     (Harmony allows one of the three).
   ============================================================ */

.login-page {

  min-height: 100vh;
  background: var(--color-neutral-0);
  color: var(--color-neutral-900);
  font-family: var(--font-text);
}

/* Geometric, not soft: undo base.css's global round joins on this page
   so strokes read as drawn with a technical pen. */
.login-page svg {
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

.login {
  display: grid;
  grid-template-columns: 1.32fr 1fr;
  min-height: 100vh;
  align-items: stretch;
}

/* ===================== Left poster ===================== */
/* Type only: the mark now lives in the card. Headline sits centred in
   the column, flush left. */
.poster {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 64px);
  overflow: hidden;
  color: var(--color-neutral-0);

  /* The photograph, held down by a vertical two-stop scrim drawn from
     adjacent steps of the primary ramp (900 → 800). Vertical and
     two-stop is the only gradient form the system permits; diagonal
     and multi-hue are precluded. */
  background:
    linear-gradient(180deg,
      rgba(5, 11, 24, 0.90) 0%,
      rgba(11, 37, 69, 0.72) 100%),
    var(--color-primary-900) url("../images/login-bg.6788bcb7c909.jpg") center / cover no-repeat fixed;
}

.poster > * { position: relative; }

/* ---- Hero: masked line-by-line reveal (kept) ----
   Lines 1-2 Light 300, line 3 Bold 700. Weight contrast is the single
   emphasis mechanism; no colour shift, no tracking change. */
.hero {
  margin: 0;
  font-family: var(--font-text);
  font-weight: 300;
  font-size: clamp(2.5rem, 5.8vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}
.hero .line {
  display: block;
  overflow: hidden;
}
.hero .line-in {
  display: block;
  transform: translateY(110%);
  animation: line-rise 0.85s cubic-bezier(.16, 1, .3, 1) forwards;
}
.hero .line:nth-child(1) .line-in { animation-delay: 0.30s; }
.hero .line:nth-child(2) .line-in { animation-delay: 0.42s; }
.hero .line:nth-child(3) .line-in { animation-delay: 0.54s; font-weight: 700; }
@keyframes line-rise {
  to { transform: translateY(0); }
}

/* ===================== Right panel ===================== */
.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 64px);
  background: var(--color-neutral-0);
}

/* The sign in card: hairline border, white fill, one overlay shadow.
   Square corners hold the line with the rest of the system. */
.panel-inner {
  width: 100%;
  max-width: 440px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  opacity: 0;
  animation: fade-in 0.5s ease forwards 0.45s;
  box-shadow: var(--shadow-overlay);
}

/* The mark, full colour, on the card's white field. */
.panel-logo {
  display: block;
  height: 52px;
  width: auto;
  margin-bottom: 24px;
}

.panel-head { margin-bottom: 32px; }
.panel-head h2 {
  margin: 0;
  font-size: 32px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--color-primary-800);
}
.panel-sub {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-neutral-600);
}

/* ---- Fields: bordered, square, 48px ---- */
.field { margin-bottom: 24px; }
.field label {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--color-neutral-900);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--color-neutral-300);
  background: var(--color-neutral-0);
  color: var(--color-neutral-900);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.1s ease;
}
.field input::placeholder { color: var(--color-neutral-500); }
.field input:focus {
  border-color: var(--color-primary-500);
}

/* ---- Submit: the one gold-filled element on this screen ---- */
.submit {
  width: 100%;
  height: 48px;
  margin-top: 32px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-accent-500);
  /* Label and arrow both inherit this grey (the arrow strokes with
     currentColor). 3.05:1 against the gold fill, under the 4.5:1 AA
     floor for 16px bold; --color-neutral-700 would clear it at 4.95:1. */
  color: var(--color-neutral-600);
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}
.submit svg { transition: transform 0.15s ease; }
/* The fill darkens a step on hover and two on press, so the label has to
   darken with it or it sinks into the gold. Grey on accent-600 is
   1.84:1 and on accent-700 is effectively invisible. */
.submit:hover {
  background: var(--color-accent-600);
  color: var(--color-neutral-900);
}
.submit:hover svg { transform: translateX(4px); }
.submit:active {
  background: var(--color-accent-700);
  color: var(--color-neutral-0);
}
.submit:focus-visible {
  outline: 2px solid var(--color-primary-800);
  outline-offset: 2px;
}

/* ---- Messages: colour is never the sole carrier of meaning, so each
   banner also carries an icon. Border on one edge only. ---- */
.errors,
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 20px;
}
.errors svg,
.notice svg { flex: none; margin-top: 2px; }

.errors {
  border-left: 2px solid var(--color-danger-600);
  background: var(--color-danger-100);
  color: var(--color-danger-600);
}
.notice {
  border-left: 2px solid var(--color-warning-600);
  background: var(--color-warning-100);
  color: var(--color-warning-600);
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===================== Responsive ===================== */
@media (max-width: 920px) {
  .login { grid-template-columns: 1fr; }
  /* Stacked: the poster keeps symmetric padding so the centred headline
     reads centred rather than pushed down. */
  .poster { min-height: auto; padding: clamp(48px, 10vw, 96px) clamp(32px, 5vw, 64px); }
}

@media (max-width: 560px) {
  .poster { padding: 48px 24px; }
  .panel { padding: 32px 24px 48px; }
  .panel-logo { height: 44px; }
  .panel-inner { padding: 24px; }
  .hero { font-size: clamp(1.9rem, 9.2vw, 2.9rem); }
}

/* ===================== Reduced motion ===================== */
@media (prefers-reduced-motion: reduce) {
  .hero .line-in,
  .panel-inner,
  .submit svg {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
