/* Dark / futuristic landing-page theme.
   Lives in its own file so it doesn't perturb the existing `styles.css` for
   the per-branch app. The login page also pulls this in for a consistent
   first-impression. */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body.landing-body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #05080f;
  color: #e6edf7;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- animated background ---- */
.landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.landing-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(0, 195, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 195, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.95), transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.95), transparent 75%);
  animation: grid-pan 30s linear infinite;
}

@keyframes grid-pan {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 44px 44px, 44px 44px; }
}

.landing-glow {
  position: absolute;
  width: 50rem;
  height: 50rem;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}
.landing-glow--left {
  top: -10rem;
  left: -10rem;
  background: radial-gradient(circle, #1d4ed8 0%, transparent 70%);
}
.landing-glow--right {
  bottom: -12rem;
  right: -12rem;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
}

/* ---- shell ---- */
.landing-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 2rem 4rem;
}

.landing-header {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 3rem;
}

.landing-logo {
  width: 14rem;
  max-width: 60vw;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(0, 195, 255, 0.35));
}

.landing-main {
  width: 100%;
  max-width: 80rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing-eyebrow {
  margin: 0 0 2rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.8rem;
  color: #6ee7ff;
  opacity: 0.8;
}

.landing-title {
  margin: 0 0 3rem;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-align: center;
  color: #f4f8ff;
  text-shadow: 0 0 24px rgba(110, 231, 255, 0.25);
}

.landing-hint, .landing-error {
  color: #94a3b8;
  font-size: 0.95rem;
  text-align: center;
}
.landing-error { color: #f87171; }

/* ---- branch tile grid ---- */
.landing-branches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin-bottom: 3rem;
}

.branch-card {
  position: relative;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.85) 0%, rgba(8, 15, 30, 0.95) 100%);
  border: 1px solid rgba(110, 231, 255, 0.18);
  border-radius: 1rem;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  color: inherit;
  font: inherit;
  box-shadow: 0 0 0 1px rgba(110, 231, 255, 0.04), 0 20px 60px -20px rgba(0, 0, 0, 0.5);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 240ms ease;
  display: flex;
  flex-direction: column;
  min-height: 16rem;
}

.branch-card:hover, .branch-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(110, 231, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(110, 231, 255, 0.25),
    0 25px 80px -20px rgba(6, 182, 212, 0.35);
  outline: none;
}

.branch-card[disabled], .branch-card--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.branch-card[disabled]:hover {
  transform: none;
  box-shadow: 0 0 0 1px rgba(110, 231, 255, 0.04), 0 20px 60px -20px rgba(0, 0, 0, 0.5);
  border-color: rgba(110, 231, 255, 0.18);
}

.branch-card-image {
  position: relative;
  height: 11rem;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.branch-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(5, 8, 15, 0.85) 100%);
}
.branch-card-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 200;
  letter-spacing: 0.12em;
  color: rgba(110, 231, 255, 0.45);
}

.branch-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 1;
}
.branch-card-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #f4f8ff;
}
.branch-card-role {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #6ee7ff;
  margin-top: 0.1rem;
}
.branch-card-role-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #6ee7ff;
  box-shadow: 0 0 8px #6ee7ff;
}
.branch-card-disabled-tag {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #f59e0b;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---- actions ---- */
.landing-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.landing-action-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(110, 231, 255, 0.3);
  color: #cbd5e1;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}
.landing-action-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(110, 231, 255, 0.6);
  color: #f4f8ff;
}
.landing-action-btn--ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.3);
}
.landing-action-icon { font-size: 1.05rem; }

.landing-footer-text {
  margin-top: 2.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.6);
}

/* ---- login form on this theme ---- */
.landing-login-card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.85) 0%, rgba(8, 15, 30, 0.95) 100%);
  border: 1px solid rgba(110, 231, 255, 0.25);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 22rem;
  box-shadow: 0 30px 80px -30px rgba(6, 182, 212, 0.4);
}

.landing-login-card h2 {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6ee7ff;
}

.landing-login-card .login-field {
  margin-bottom: 1rem;
}
.landing-login-card .login-field label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: #94a3b8;
}
.landing-login-card input:not([type='checkbox']) {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(110, 231, 255, 0.18);
  border-radius: 0.5rem;
  color: #f4f8ff;
  font-size: 0.95rem;
  font-family: inherit;
}
.landing-login-card input:not([type='checkbox']):focus {
  outline: none;
  border-color: rgba(110, 231, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}
.landing-login-card .login-remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.25rem 0 0.75rem;
  font-size: 0.85rem;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}
.landing-login-card .login-remember input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  accent-color: #06b6d4;
  cursor: pointer;
  flex-shrink: 0;
}

.landing-login-card button[type='submit'] {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
  color: #fff;
  border: 0;
  border-radius: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: filter 180ms ease, transform 180ms ease;
}
.landing-login-card button[type='submit']:hover { filter: brightness(1.1); transform: translateY(-1px); }

.landing-login-message {
  min-height: 1.1em;
  font-size: 0.85rem;
  text-align: center;
  color: #94a3b8;
  margin: 0 0 1rem;
}
.landing-login-message--error { color: #f87171; }

/* ---- spinner/loading state ---- */
.landing-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.landing-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(110, 231, 255, 0.2);
  border-top-color: #6ee7ff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .landing-shell { padding: 1.5rem 1rem 3rem; }
  .landing-header { margin-bottom: 2rem; }
  .landing-logo { width: 10rem; }
  .landing-title { margin-bottom: 2rem; }
  .branch-card { min-height: 14rem; }
  .branch-card-image { height: 9rem; }
}
