/* ===================================================================
   Rail Nexus — landing page styles
   Visual parity with bnsf-portal-wilson.surge.sh
   =================================================================== */

:root {
  --navy: #0b1e3d;          /* page background / headings */
  --navy-deep: #081729;     /* radial edge */
  --navy-panel: #0e254a;    /* logo box on portal view */
  --orange: #e8641c;        /* primary action */
  --orange-hover: #cf551338;
  --orange-solid-hover: #cf5513;
  --ink: #16233a;           /* dark text on white */
  --muted: #6b7a90;         /* secondary text */
  --line: #e3e8f0;
  --white: #ffffff;
  --tile-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  --focus: #ffb27a;
  --radius: 16px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--white);
  background:
    radial-gradient(1200px 800px at 70% 30%, #12305e 0%, var(--navy) 45%, var(--navy-deep) 100%);
  min-height: 100vh;
}

.view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.view[hidden] { display: none; }

/* ---------- Wordmark (generic RailNexus, no railroad logo) ---------- */
.wordmark-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.wordmark-slot--boxed {
  background: var(--white);
  padding: 22px 34px;
  border-radius: 10px;
  box-shadow: var(--tile-shadow);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 30px;
  color: var(--ink);
  line-height: 1;
}
.wordmark .x-mark { width: 26px; height: 26px; }
.wordmark .x-mark .stroke-a { fill: var(--navy); }
.wordmark .x-mark .stroke-b { fill: #7d93b3; }

/* ---------- Login view ---------- */
.card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--tile-shadow);
}
.login-card {
  width: 100%;
  max-width: 380px;
  padding: 36px 34px 34px;
  text-align: center;
}
.login-card .wordmark { color: var(--ink); font-size: 26px; }

.tagline {
  margin: 14px 0 0;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
}
.owner {
  margin: 3px 0 0;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 600;
}
.welcome {
  margin: 26px 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.welcome-sub {
  margin: 0 auto 22px;
  max-width: 280px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

#login-form { text-align: left; }
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 16px 0 7px;
}
.text-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.text-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 100, 28, 0.18);
}
.error-msg {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: #c02626;
  font-weight: 600;
}
.error-msg[hidden] { display: none; }

.btn-primary {
  width: 100%;
  margin-top: 22px;
  padding: 13px 18px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: var(--font);
  color: #fff;
  background: var(--orange);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn-primary:hover { background: var(--orange-solid-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Portal view ---------- */
.portal-view { gap: 0; }
.logo-block { margin-bottom: 26px; }
.portal-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
  text-align: center;
}
.portal-sub {
  margin: 8px 0 0;
  font-size: 14px;
  color: #b9c6db;
  text-align: center;
}
.wilson-mark {
  margin: 20px 0 34px;
  text-align: center;
  color: #8ea3c2;
  line-height: 1;
}
.wilson-mark .wilson-top { display: block; font-weight: 800; letter-spacing: 0.16em; font-size: 15px; }
.wilson-mark .wilson-bottom { display: block; font-weight: 600; letter-spacing: 0.12em; font-size: 10px; margin-top: 2px; }

/* Tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
  max-width: 1120px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 34px 22px 30px;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--tile-shadow);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
}
.tile:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.tile-icon {
  width: 44px;
  height: 44px;
  color: var(--navy);
}
.tile-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}
.tile-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}
.tile-badge {
  display: inline-block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--orange);
}

/* Footer */
.portal-footer { margin-top: 40px; text-align: center; }
.footer-access {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #8ea3c2;
}
.footer-brand {
  margin: 8px 0 0;
  font-size: 11px;
  color: #5f739a;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr; max-width: 360px; }
  .portal-title { font-size: 22px; }
  .wordmark { font-size: 22px; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .tile, .btn-primary { transition: none; }
  .tile:hover { transform: none; }
}
