/* ===== CSS VARIABLES ===== */
:root {
  /* The login page keeps its original indigo identity — it is the front door
     and stands apart from the teal that themes the signed-in system. It
     loads no other stylesheet, so the palette is written out in full here. */
  --primary: #1C0ED7;
  --primary-dark: #150bb0;
  --primary-deeper: #0d0675;
  --primary-light: #3d2ef0;
  --accent-bg: #eef0ff;
  --white: #ffffff;
  --page-bg-start: #eef1ff;
  --page-bg-end: #e2e6fb;
  --text-dark: #0d1130;
  --text-mid: #56597a;
  --text-light: #6c6c93;
  --border: rgba(28, 14, 215, 0.14);
  --border-soft: rgba(28, 14, 215, 0.08);
  --shadow: 0 24px 64px rgba(28, 14, 215, 0.16);
  --shadow-sm: 0 4px 16px rgba(28, 14, 215, 0.1);
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== BASE ===== */
html, body {
  height: 100%;
  overflow-x: hidden;
  overscroll-behavior: none;
  font-family: var(--font-body);
  color: var(--text-dark);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, var(--page-bg-start) 0%, var(--page-bg-end) 100%);
}

/* ===== TOPBAR ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 40px;
  background: rgba(255, 255, 255, 0.7);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  width: 52px;
  height: 52px;
  /* Rounded square, matching the mark's own corners (~22% of the side). */
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(28, 14, 215,  0.25);
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-mid);
}

/* DCS department badge (topbar, right side next to Need help?) */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.topbar-dept {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dept-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(28, 14, 215,  0.25);
  background-size: 112%;
  background-position: center;
  background-repeat: no-repeat;
}
.dept-line1 {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-mid);
}
.dept-line2 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.help-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
.help-link svg { width: 18px; height: 18px; }
.help-link:hover { color: var(--primary-dark); }

/* ===== PAGE FRAME (hero + footer share this so the login card can float across both) ===== */
.page-frame {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ===== HERO SPLIT ===== */
.hero-split {
  position: relative;
  flex: 1;
  min-height: 0;
}

/* ---- LEFT: hero/photo panel (fills hero-split fully now) ---- */
.hero-left {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: var(--page-bg-start);
  background-image: url('../images/nemsu gate.png');
  background-size: contain;
  background-position: 30% center;
  background-repeat: no-repeat;
  min-height: 420px;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(240,242,255,1) 0%, rgba(240,242,255,0.97) 20%, rgba(240,242,255,0.78) 36%, rgba(240,242,255,0.3) 48%, rgba(240,242,255,0.3) 60%, rgba(240,242,255,0.8) 82%, rgba(240,242,255,1) 100%),
    linear-gradient(180deg, rgba(240,242,255,0.85) 0%, rgba(240,242,255,0.15) 28%, rgba(240,242,255,0.15) 70%, rgba(240,242,255,0.88) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  max-width: 560px;
  padding: 40px 32px 40px 48px;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(28, 14, 215,  0.08);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.location-pill svg { width: 14px; height: 14px; }

.hero-heading {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}
.hero-heading .accent { color: var(--primary); }

.hero-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-mid);
  max-width: 480px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.feature-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(28, 14, 215,  0.09);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.feature-text p {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.4;
}

/* ---- RIGHT: floating rounded login card (positioned relative to .page-frame, spans hero + footer) ---- */
.hero-right {
  position: absolute;
  top: 120px;
  right: 50px;
  bottom: 50px;
  z-index: 2;
  width: 500px;
  max-width: calc(100% - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 60px;
  padding-top: 0px;
}

.login-card {
  width: 100%;
  max-width: 460px;
  animation: cardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
 
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  display: block;
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  /* Rounded square, matching the mark's own corners (~22% of the side). */
  border-radius: 14px;
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.login-card-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-deeper);
  margin-bottom: 8px;
}
.login-card-sub {
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-mid);
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto 26px;
}

/* ===== ALERTS ===== */
.alert {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: alertIn 0.3s ease both;
}
@keyframes alertIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alert-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert ul { margin: 0; padding-left: 16px; line-height: 1.6; }
.alert-danger {
  background: rgba(194,45,59, 0.06);
  border: 1px solid rgba(194,45,59, 0.2);
  color: #b91c1c;
}
.alert-success {
  background: rgba(16, 185, 129,  0.06);
  border: 1px solid rgba(16, 185, 129,  0.2);
  color: #065f46;
}

/* ===== FORM ===== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-deeper);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-light);
  pointer-events: none;
  transition: color var(--transition);
  z-index: 1;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1.5px solid #e2e4f3;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dark);
  background: #f8f9ff;
  outline: none;
  transition: all var(--transition);
}
input::placeholder { color: var(--text-light); }

input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(28, 14, 215, 0.08);
}
.input-wrap:focus-within .input-icon { color: var(--primary); }

.toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: var(--text-light);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}
.toggle-pass svg { width: 16px; height: 16px; }
.toggle-pass:hover { color: var(--primary); }

/* ===== REMEMBER ROW ===== */
.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  user-select: none;
}
.checkbox-label input { display: none; }
.checkmark {
  width: 17px;
  height: 17px;
  border: 1.5px solid #d5d7ea;
  border-radius: 5px;
  background: #f8f9ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.checkbox-label input:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}
.checkbox-label input:checked + .checkmark::after {
  content: '';
  width: 4px;
  height: 8px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(42deg) translate(0, -1px);
  display: block;
}
.label-link {
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}
.label-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* ===== SUBMIT BUTTON ===== */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 6px 20px rgba(28, 14, 215, 0.32), inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.submit-btn:hover::before { transform: translateX(100%); }
.submit-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 28px rgba(28, 14, 215, 0.42), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(-1px);
}
.submit-btn:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(28, 14, 215, 0.3); }
.btn-label { position: relative; z-index: 1; }

/* ===== DIVIDER ===== */
.card-divider {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 22px 0 0;
}
.card-divider::before,
.card-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e6e8f5;
}
.divider-label {
  font-size: 0.78rem;
  color: var(--text-light);
  padding: 0 12px;
  white-space: nowrap;
}

/* ===== CARD FOOTER NOTE ===== */
.login-footer-note {
  text-align: center;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-mid);
}

/* ===== SITE FOOTER ===== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 28px;
  padding: 22px 40px;
  background: linear-gradient(90deg, var(--primary-deeper) 0%, var(--primary) 55%, rgba(238,240,255,0.9) 88%, rgba(255,255,255,0.98) 100%);
  color: rgba(255,255,255,0.92);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-seal {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--white);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.footer-brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.footer-brand-text strong { font-size: 0.95rem; font-weight: 700; }
.footer-brand-text span { font-size: 0.8rem; color: rgba(255,255,255,0.65); }

.footer-divider {
  width: 1px;
  align-self: stretch;
  margin: 4px 0;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
}
.footer-contact-item svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }

/* ===== RESPONSIVE ===== */
/* The login card stays a rounded, floating card over the photo at every breakpoint —
   only its margins/width/padding shrink on smaller screens. */
@media (max-width: 980px) {
  .page-frame { overflow-y: auto; overscroll-behavior: none; }
  .hero-right { width: 380px; padding: 10px 10px; }
  .hero-heading { font-size: 2rem; }
}

@media (max-width: 560px) {
  .topbar { padding: 16px 20px; flex-wrap: wrap; row-gap: 10px; }
  .brand-sub { display: none; }
  .topbar-dept { display: none; }
  .topbar-right { gap: 12px; }
  .hero-content { padding: 28px 22px; }
  .hero-heading { font-size: 1.7rem; }
  .help-panel { padding: 32px 24px; }
  .help-form { grid-template-columns: 1fr; }
  .hero-right {
    top: 16px;
    right: 16px;
    bottom: -16px;
    max-width: calc(100% - 32px);
    padding: 28px 20px;
  }
  .site-footer { padding: 20px; justify-content: center; text-align: center; }
  .footer-contact { align-items: center; }
}

/* ===== ACCOUNT RECOVERY (forgot / verify / reset password) ===== */
.recovery-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  border-radius: 50%;
  color: var(--text-mid);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.recovery-back:hover { background: var(--accent-bg); color: var(--primary); }
.recovery-back svg { width: 20px; height: 20px; }

.recovery-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 22px;
}

.recovery-desc {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin: -10px 0 22px;
}

.recovery-options {
  display: flex;
  flex-direction: column;
  border: 1.5px solid #e6e8f5;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 18px;
}

.recovery-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  border-bottom: 1px solid #e6e8f5;
  transition: background var(--transition);
}
.recovery-options label.recovery-option:last-child { border-bottom: none; }
.recovery-option:hover { background: #f8f9ff; }
.recovery-option input[type="radio"] { display: none; }

.recovery-option-radio {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid #d5d7ea;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition);
}
.recovery-option-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  transform: scale(0);
  transition: transform var(--transition);
}
.recovery-option input[type="radio"]:checked + .recovery-option-text ~ .recovery-option-radio,
.recovery-option input[type="radio"]:checked ~ .recovery-option-radio {
  border-color: var(--primary);
}
.recovery-option input[type="radio"]:checked ~ .recovery-option-radio::after {
  transform: scale(1);
}

.recovery-option-text { flex: 1; }
.recovery-option-text strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.recovery-option-text span {
  font-size: 0.82rem;
  color: var(--text-mid);
}

.recovery-help-link {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 22px;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
}
.recovery-help-link:hover { text-decoration: underline; }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  background: var(--white);
  color: var(--text-dark);
  border: 1.5px solid #e2e4f3;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  margin-top: 12px;
  transition: all var(--transition);
}
.btn-secondary:hover { background: #f8f9ff; border-color: #d5d7ea; }

.code-input-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}
.code-input-group input {
  width: 46px;
  height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 1.5px solid #e2e4f3;
  border-radius: var(--radius-sm);
  background: #f8f9ff;
  color: var(--text-dark);
  outline: none;
  transition: all var(--transition);
}
.code-input-group input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(28, 14, 215, 0.08);
}

/* ===== HELP PAGE: standalone layout (separate from the login split-screen) ===== */
.help-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}
.help-panel {
  width: 100%;
  max-width: 620px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px 52px;
  animation: cardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.help-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

/* Section divider with a label, e.g. "Registration Requirements" — spans both columns */
.help-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 2px;
}
.help-divider::before,
.help-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e6e8f5;
}
.help-divider span {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Icon + label/value row */
.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e6e8f5;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), background var(--transition);
}
.info-row:hover {
  border-color: #d5d7ea;
  background: #f8f9ff;
}
.info-row-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.info-row-icon svg { width: 20px; height: 20px; }
.info-row-text { flex: 1; min-width: 0; text-align: left; }
.info-row-text label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 2px;
}
.info-row-text span {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
  word-break: break-word;
}

/* ===== LOGIN PAGE MOTION ================================================
   Polish only. Nothing here changes the layout, the colours or the
   structure of the page: the pieces are exactly where they were, they
   just arrive rather than appear, and respond when touched.

   Everything animates `transform` and `opacity` only, so it composites on
   the GPU and never triggers layout. The whole block is switched off under
   prefers-reduced-motion at the bottom.
   ==================================================================== */

/* ── Entrance: the left panel introduces itself top to bottom ────────── */
@keyframes loginRise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes loginFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-content > .location-pill { animation: loginRise .55s cubic-bezier(.22,1,.36,1) .05s both; }
.hero-content > .hero-heading  { animation: loginRise .55s cubic-bezier(.22,1,.36,1) .14s both; }
.hero-content > .hero-desc     { animation: loginRise .55s cubic-bezier(.22,1,.36,1) .22s both; }
/* The four feature rows follow in sequence rather than together, which
   reads as the list being laid out for you. */
.feature-list .feature-item:nth-child(1) { animation: loginRise .5s cubic-bezier(.22,1,.36,1) .30s both; }
.feature-list .feature-item:nth-child(2) { animation: loginRise .5s cubic-bezier(.22,1,.36,1) .38s both; }
.feature-list .feature-item:nth-child(3) { animation: loginRise .5s cubic-bezier(.22,1,.36,1) .46s both; }
.feature-list .feature-item:nth-child(4) { animation: loginRise .5s cubic-bezier(.22,1,.36,1) .54s both; }

.topbar      { animation: loginFade .6s ease both; }
.site-footer { animation: loginFade .8s ease .5s both; }

/* ── Feature rows answer the cursor ──────────────────────────────────── */
.feature-item {
  transition: transform .22s cubic-bezier(.22,1,.36,1);
}
.feature-item:hover { transform: translateX(5px); }
.feature-icon {
  transition: transform .22s cubic-bezier(.22,1,.36,1), box-shadow .22s ease;
}
.feature-item:hover .feature-icon {
  transform: scale(1.09) rotate(-4deg);
  box-shadow: 0 6px 18px -6px rgba(28, 14, 215,  .45);
}

/* ── The card's logo settles, then breathes ──────────────────────────── */
@keyframes logoIn {
  0%   { opacity: 0; transform: scale(.82) translateY(-6px); }
  60%  { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}
.login-logo { animation: logoIn .7s cubic-bezier(.34,1.56,.64,1) .18s both; }

/* ── Fields lift a little when focused ───────────────────────────────── */
.input-wrap {
  transition: transform .18s ease;
}
.input-wrap:focus-within { transform: translateY(-1px); }
.input-icon { transition: color .18s ease, transform .18s ease; }
.input-wrap:focus-within .input-icon { transform: scale(1.1); }

/* ── Submit button: a light sweeps across on hover, and it presses ───── */
.submit-btn {
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .22s ease;
}
.submit-btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-18deg);
  transition: left .55s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
.submit-btn:hover::after { left: 130%; }
.submit-btn:hover  { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(28, 14, 215, .65); }
.submit-btn:active { transform: translateY(0); }

/* While the credentials are being checked the button says so, so a slow
   response never looks like a dead click.

   The spinner is its own element rather than a pseudo-element: ::before
   carries the gradient overlay and ::after the hover sweep, and borrowing
   either meant inheriting its transform - the ring slid in from the left
   on every loop instead of turning on the spot. */
.submit-btn.is-busy { pointer-events: none; cursor: default; }
/* Both sweeps are parked while it waits, so nothing travels across the
   button except the spinner. */
.submit-btn.is-busy::before,
.submit-btn.is-busy::after { opacity: 0; }

.btn-spin {
  /* Takes no room until it is needed, so the label stays centred. */
  display: none;
  width: 16px; height: 16px;
  flex: none;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin .6s linear infinite;
}
.submit-btn.is-busy .btn-spin { display: block; }
/* The label stays, and says what is happening; the spinner sits beside it
   rather than replacing it, so the button never reads as empty. */
.submit-btn.is-busy { gap: 10px; }
@keyframes btnSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── Small courtesies ────────────────────────────────────────────────── */
.help-link,
.label-link { transition: color .18s ease, transform .18s ease; }
.help-link:hover,
.label-link:hover { transform: translateY(-1px); }
.brand-logo { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.topbar-brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  .hero-content > .location-pill,
  .hero-content > .hero-heading,
  .hero-content > .hero-desc,
  .feature-list .feature-item:nth-child(n),
  .topbar, .site-footer, .login-logo {
    animation: none;
  }
  .feature-item, .feature-icon, .input-wrap, .input-icon,
  .submit-btn, .help-link, .label-link, .brand-logo { transition: none; }
  .submit-btn::after { display: none; }
  /* No spin, but the button still has to show it is working, so the ring
     stays as a static mark beside the label. */
  .btn-spin { animation: none; }
}
