/* ============================================================================
   FeRRUM staff shell — design tokens and primitives.
   ----------------------------------------------------------------------------
   LIGHT. Rob, Jul 31 2026: "We need to brighten this up. The main page should
   be delightful."

   This is not a departure from the brand — it is a correction toward it.
   FeRRUM's published material (The Movement Restoration System manual, the
   ferrumathleticco.com site) is light: warm grey paper, near-black text, a
   rust-orange angled band, spaced caps. The dark industrial palette came from
   the projection instrument, which invented it. The manual is the brand.

   Two accents, both real and both from the printed material:
     --rust    #C4502F  the angled band on the manual cover. Brand.
     --orange  #E8752A  carried over from the projection instrument. Energy,
                        interactive states, the FE block in the wordmark.

   Prefix: .fx-  — so a tool that lands here keeps its own .section / .line /
   .field class names without colliding with shell chrome.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&display=swap');

:root {
  /* Paper */
  --paper: #ececee;
  --paper-2: #f7f7f8;
  --paper-3: #ffffff;
  --line: #d7d8dc;
  --line-soft: #e4e5e8;

  /* Ink */
  --ink: #16181c;
  --ink-2: #454a53;
  --muted: #7b808a;

  /* Brand */
  --rust: #c4502f;
  --rust-dim: #a63f22;
  --rust-wash: #f7e9e4;
  --orange: #e8752a;
  --orange-hi: #f0863c;
  --orange-wash: #fdf0e6;

  /* Signal */
  --green: #2f7d51;
  --green-wash: #e6f2ea;
  --red: #b23b33;
  --red-wash: #f9e8e6;

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 48px;
  --s-9: 72px;

  /* Type */
  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-base: 14.5px;
  --fs-md: 16px;
  --fs-lg: 21px;
  --fs-xl: 30px;
  --fs-2xl: 44px;
  --ls-wide: 2px;
  --ls-widest: 4px;

  /* Radius */
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 14px;
  --r-pill: 999px;

  /* Elevation — soft, paper-like */
  --shadow-1: 0 1px 2px rgba(22, 24, 28, 0.05), 0 2px 8px rgba(22, 24, 28, 0.05);
  --shadow-2: 0 4px 12px rgba(22, 24, 28, 0.08), 0 12px 32px rgba(22, 24, 28, 0.09);

  /* Layout */
  --wrap: 820px;
  --wrap-wide: 1080px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* -- Brand ----------------------------------------------------------------- */

.fx-logo {
  display: inline-flex;
  font-weight: 800;
  letter-spacing: 1px;
  border: 3px solid var(--ink);
  border-radius: var(--r-2);
  overflow: hidden;
  line-height: 1;
  font-size: var(--fs-lg);
  text-decoration: none;
  flex: 0 0 auto;
}
.fx-logo-fe {
  background: var(--orange);
  color: var(--ink);
  padding: 6px 8px;
  display: flex;
  align-items: center;
}
.fx-logo-rrum {
  background: var(--ink);
  color: var(--paper-3);
  padding: 6px 10px;
  display: flex;
  align-items: center;
}

.fx-tag {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  font-weight: 700;
}

/* -- Top bar --------------------------------------------------------------- */

.fx-topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(236, 236, 238, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.fx-topbar-inner {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: var(--s-3) var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.fx-nav {
  display: flex;
  gap: var(--s-1);
  flex: 1 1 auto;
  flex-wrap: wrap;
}
.fx-nav a {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
}
.fx-nav a:hover {
  color: var(--ink);
  background: var(--paper-3);
  border-color: var(--line);
}
.fx-nav a[aria-current='page'] {
  color: var(--rust);
  background: var(--rust-wash);
  border-color: transparent;
}

.fx-who {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  flex: 0 0 auto;
}
.fx-role {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--paper-3);
  border: 1px solid var(--line);
  color: var(--muted);
}
.fx-role[data-role='admin'] {
  color: var(--rust);
  border-color: transparent;
  background: var(--rust-wash);
}

/* -- Layout ---------------------------------------------------------------- */

.fx-wrap {
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: var(--s-7) var(--s-5) var(--s-8);
}
.fx-eyebrow {
  font-size: 10.5px;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: var(--s-3);
}

/* -- Hero ------------------------------------------------------------------ */

.fx-greet {
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.5px;
  margin-bottom: var(--s-2);
}
.fx-greet em {
  font-style: normal;
  color: var(--rust);
}
.fx-greet-sub {
  font-size: var(--fs-md);
  color: var(--ink-2);
  margin-bottom: var(--s-6);
  max-width: 56ch;
}

/* Photo band — contained, admin-swappable, no deploy. */
.fx-band {
  position: relative;
  border-radius: var(--r-3);
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  aspect-ratio: 21 / 8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-1);
}
.fx-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fx-band-empty {
  color: var(--muted);
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--s-5);
  max-width: 42ch;
}
.fx-band-edit {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
}

/* The angled rust band, straight off the manual cover. */
.fx-ribbon {
  background: var(--rust);
  color: #fff;
  margin-top: -34px;
  position: relative;
  z-index: 2;
  clip-path: polygon(0 26%, 100% 0, 100% 74%, 0 100%);
  padding: 34px 0;
  text-align: center;
}
.fx-ribbon .fx-tag {
  font-size: var(--fs-sm);
  letter-spacing: 5px;
}

@media (max-width: 680px) {
  :root {
    --fs-2xl: 32px;
  }
  .fx-band {
    aspect-ratio: 4 / 3;
  }
  .fx-ribbon {
    margin-top: -26px;
    padding: 26px 0;
  }
  .fx-ribbon .fx-tag {
    font-size: var(--fs-xs);
    letter-spacing: 3px;
  }
}

/* -- Status block ---------------------------------------------------------- */

.fx-status {
  margin-top: var(--s-7);
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: var(--r-3);
  padding: var(--s-6);
  display: flex;
  align-items: center;
  gap: var(--s-5);
  flex-wrap: wrap;
  box-shadow: var(--shadow-1);
}
.fx-status[data-tone='action'] {
  border-left-color: var(--orange);
}
.fx-status[data-tone='good'] {
  border-left-color: var(--green);
  background: var(--green-wash);
}
.fx-status[data-tone='late'] {
  border-left-color: var(--red);
  background: var(--red-wash);
}
.fx-status-body {
  flex: 1 1 260px;
  min-width: 0;
}
.fx-status-head {
  font-size: var(--fs-lg);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--s-1);
}
.fx-status-sub {
  font-size: var(--fs-base);
  color: var(--ink-2);
}
.fx-status-action {
  flex: 0 0 auto;
}

/* -- Tool cards ------------------------------------------------------------ */

.fx-cards {
  margin-top: var(--s-4);
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
}
.fx-card {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-top: 3px solid var(--rust);
  border-radius: var(--r-3);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-1);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.fx-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}
.fx-card-top {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  justify-content: space-between;
}
.fx-card-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}
.fx-card-desc {
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.fx-card-meta {
  margin-top: auto;
  padding-top: var(--s-4);
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.fx-card[data-state='soon'] {
  border-top-color: var(--line);
  pointer-events: none;
}
.fx-card[data-state='soon'] .fx-card-title {
  color: var(--ink-2);
}

.fx-pill {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.fx-pill[data-tone='good'] {
  color: var(--green);
  background: var(--green-wash);
  border-color: transparent;
}
.fx-pill[data-tone='action'] {
  color: var(--rust);
  background: var(--rust-wash);
  border-color: transparent;
}
.fx-pill[data-tone='late'] {
  color: var(--red);
  background: var(--red-wash);
  border-color: transparent;
}

/* -- Buttons --------------------------------------------------------------- */

.fx-btn {
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--paper-3);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.fx-btn:hover {
  background: var(--paper-2);
  border-color: var(--muted);
}
.fx-btn--primary {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
}
.fx-btn--primary:hover {
  background: var(--rust-dim);
  border-color: var(--rust-dim);
  transform: translateY(-1px);
}
.fx-btn--sm {
  font-size: var(--fs-xs);
  padding: 7px 12px;
}
.fx-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* -- Section --------------------------------------------------------------- */

.fx-section {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-6);
  margin-top: var(--s-5);
  box-shadow: var(--shadow-1);
}
.fx-section-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.fx-section-title {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 600;
  flex: 1 1 auto;
}

.fx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.fx-table th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: var(--s-2) var(--s-2) var(--s-2) 0;
  border-bottom: 1px solid var(--line);
}
.fx-table td {
  padding: var(--s-3) var(--s-2) var(--s-3) 0;
  border-bottom: 1px solid var(--line-soft);
}
.fx-table tr:last-child td {
  border-bottom: 0;
}

.fx-empty {
  color: var(--muted);
  font-size: var(--fs-sm);
  padding: var(--s-4) 0;
}

/* -- Footer ---------------------------------------------------------------- */

.fx-footer {
  border-top: 1px solid var(--line);
  margin-top: var(--s-8);
  padding: var(--s-6) var(--s-5) var(--s-8);
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-xs);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  align-items: center;
}
.fx-footer .fx-tag {
  color: var(--rust);
}

/* -- Toast ----------------------------------------------------------------- */

.fx-toasts {
  position: fixed;
  bottom: var(--s-5);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  z-index: 80;
  pointer-events: none;
}
.fx-toast {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-pill);
  padding: 11px 20px;
  font-size: var(--fs-sm);
  font-weight: 600;
  box-shadow: var(--shadow-2);
  max-width: 90vw;
}
.fx-toast[data-tone='good'] {
  background: var(--green);
  color: #fff;
}
.fx-toast[data-tone='bad'] {
  background: var(--red);
  color: #fff;
}

/* -- Utility --------------------------------------------------------------- */

.fx-hidden {
  display: none !important;
}
.fx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.fx-skeleton {
  color: transparent;
  background: var(--line-soft);
  border-radius: var(--r-1);
  animation: fx-pulse 1.2s ease-in-out infinite;
}
@keyframes fx-pulse {
  50% {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
