/* Procurement Auctions — base stylesheet.
 *
 * Design tokens (colours, fonts, radii) live in /theme.css, served from
 * branding.toml. This file holds layout rules only; every brand-bearing value
 * is a CSS custom property. Rebranding is a configuration + asset swap.
 *
 * The visual language targets enterprise industrial sites: narrow radii, dense
 * tables, generous whitespace at the section level, muted neutrals, high-
 * contrast CTA. No gradients, no decorative shadows beyond the token.
 */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 36px; line-height: 1.15; margin: 0 0 16px; }
h2 { font-size: 24px; line-height: 1.2; margin: 32px 0 12px; }
h3 { font-size: 18px; line-height: 1.3; margin: 16px 0 8px; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--color-muted); }
.mono { font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace; font-size: 13px; }

/* --- Layout scaffolding --- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.layout { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

.env-banner {
  background: #202020; color: #fff;
  text-align: center; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; padding: 6px 12px; font-weight: 600;
}
.env-development { background: #262626; }
.env-demo { background: var(--color-accent); }

/* --- Header --- */
.site-header { border-bottom: 2px solid var(--color-primary); background: #fff; }
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
}
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--color-text); font-weight: 700; }
.wordmark:hover { text-decoration: none; }
.wordmark-svg { width: 32px; height: 32px; display: block; }
.wordmark-text { font-size: 20px; letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; }
.site-nav a {
  color: var(--color-text);
  margin-left: 28px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
}
.site-nav a:hover { color: var(--color-primary); text-decoration: none; }
.site-nav-user { margin-left: 28px; font-size: 12px; color: var(--color-muted); letter-spacing: .04em; }
.link-button {
  background: none; border: none; color: var(--color-text);
  margin-left: 28px; font-size: 13px; text-transform: uppercase;
  letter-spacing: .12em; font-weight: 600; cursor: pointer; padding: 0;
}
.link-button:hover { color: var(--color-primary); }

/* --- Hero --- */
.hero {
  background:
    linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.7)),
    linear-gradient(135deg, #202020 0%, #3a3a3a 100%);
  color: #fff;
  padding: 72px 0 80px;
  border-bottom: 4px solid var(--color-primary);
}
.hero .muted { color: #d0d0d0; }
.hero-grid {
  display: grid; gap: 56px;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
}
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: 11px;
  color: var(--color-primary); font-weight: 700; margin: 0 0 14px;
  display: inline-block; border-bottom: 2px solid var(--color-primary); padding-bottom: 4px;
}
.hero-title { font-size: 48px; line-height: 1.08; margin: 0 0 20px; color: #fff; letter-spacing: -0.02em; }
.hero-sub { font-size: 18px; color: #d8d8d8; max-width: 56ch; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.button {
  display: inline-block; padding: 13px 26px; border-radius: var(--radius);
  font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  border: 2px solid transparent; cursor: pointer; transition: all .15s ease;
  text-decoration: none !important;
}
.button-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.button-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.button-ghost { background: transparent; border-color: #c4c4c4; color: var(--color-text); }
.button-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.hero .button-ghost { color: #fff; border-color: #fff; }
.hero .button-ghost:hover { background: #fff; color: var(--color-text); }

.hero-card {
  background: #fff; color: var(--color-text);
  border-top: 4px solid var(--color-primary);
  padding: 32px; box-shadow: var(--shadow-md);
}
.hero-card-title { font-weight: 700; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 18px; }
.feature-list { padding-left: 20px; margin: 0; }
.feature-list li { margin-bottom: 12px; font-size: 15px; }

/* --- Sections --- */
.section { padding: 56px 0; }
.section-roles { padding: 72px 0; background: var(--color-surface); }
.section-roles h2 { margin: 0 0 32px; font-size: 28px; letter-spacing: -0.01em; text-align: center; }
.role-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.role-card {
  border: 1px solid #e4e4e4; padding: 24px; background: #fff;
  border-top: 3px solid var(--color-primary);
  transition: transform .15s ease, box-shadow .15s ease;
}
.role-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.role-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--color-text); }
.role-card p { margin: 0; font-size: 14px; color: var(--color-muted); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid #e4e4e4;
  background: #1a1a1a; color: #c4c4c4;
  padding: 36px 0; margin-top: 56px; font-size: 13px;
}
.site-footer p { margin: 0 0 6px; }
.site-footer .muted { color: #8a8a8a; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* --- Status page / tables --- */
.status-headline {
  margin: 20px 0 24px; padding: 14px 18px; border-radius: var(--radius);
  font-weight: 700; border-left: 4px solid transparent;
}
.status-headline.ok { background: #e7f5ec; color: #0f6b2b; border-left-color: #1f8c3b; }
.status-headline.bad { background: #fdecea; color: #9b1b17; border-left-color: #c7211c; }

.status-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.status-table th, .status-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #e4e4e4; vertical-align: top; }
.status-table th {
  background: var(--color-surface); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--color-muted); font-weight: 600;
}
.status-table tr:hover td { background: #fcfcfc; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pill-ok  { background: #e7f5ec; color: #0f6b2b; }
.pill-bad { background: #fdecea; color: #9b1b17; }

/* --- Forms --- */
.form-grid { display: grid; gap: 18px; max-width: 540px; }
.form-grid label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-muted); }
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #c4c4c4; border-radius: var(--radius);
  font-size: 15px; font-family: inherit;
  background: #fff; color: var(--color-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(200,16,46,.15);
}
.form-error { color: var(--color-primary); font-size: 13px; }

/* print-friendly results */
@media print {
  .site-header, .site-footer, .site-nav, .env-banner, .button { display: none !important; }
  .hero { background: #fff !important; color: #000 !important; border: none; padding: 20px 0; }
  .hero-title, .hero .muted { color: #000 !important; }
  body { background: #fff; color: #000; }
  .container { max-width: 100%; }
  .status-table { font-size: 11px; }
}
