/* ==========================================================================
   Trainor Interactive — shared stylesheet (modernized restoration, 2024)
   Palette derived from the 2004 original: steel blue #6689A1, slate grays,
   and the red accent used for "Revolution".
   ========================================================================== */

:root {
  --steel: #6689a1;
  --steel-dark: #3f6d91;
  --steel-deep: #2e546f;
  --ink: #22313a;
  --muted: #5b6b76;
  --line: #dde5ea;
  --bg: #f5f7f9;
  --card: #ffffff;
  --red: #cc3311;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(34, 49, 58, 0.06), 0 8px 24px rgba(34, 49, 58, 0.07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }

a { color: var(--steel-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--red); }

:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; border-radius: 4px; }

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

main { display: block; }

.page {
  padding: 40px 0 72px;
}

.page--narrow { max-width: 820px; margin: 0 auto; }

.section { margin: 56px 0; }
.section:first-child { margin-top: 0; }

.kicker {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-dark);
  margin-bottom: 8px;
}

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); margin: 0 0 16px; }

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; }

h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 700; letter-spacing: -0.01em; }

h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 16px; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

hr.rule { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* --------------------------------------------------------------------------
   Accessibility helpers
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--steel-deep);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Header + navigation
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--steel-deep); }
.brand img { display: block; }

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover { background: #eef3f6; color: var(--steel-deep); }
.site-nav a[aria-current="page"] { color: var(--steel-deep); background: #e6eef4; }

.site-nav .nav-cta {
  background: var(--steel-dark);
  color: #fff;
}
.site-nav .nav-cta:hover { background: var(--steel-deep); color: #fff; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; }
  .site-nav a { padding: 12px; }
  .header-inner { position: relative; }
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */

.breadcrumbs { font-size: 0.875rem; color: var(--muted); margin: 0 0 20px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--steel); }
.breadcrumbs a { color: var(--steel-dark); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; color: var(--red); }
.breadcrumbs [aria-current="page"] { color: var(--muted); }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px;
  margin: 28px 0 0;
}

.hero__text .btn-row { margin-top: 24px; }

.hero__media {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #eef2f5;
}
.hero__media img { display: block; width: 100%; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding: 32px 24px; }
}

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

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--steel-dark); color: #fff; }
.btn--primary:hover { background: var(--steel-deep); color: #fff; }
.btn--ghost { border-color: var(--steel); color: var(--steel-deep); background: transparent; }
.btn--ghost:hover { border-color: var(--steel-dark); color: var(--steel-deep); background: #eef3f6; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 20px;
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 880px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .card-link { font-weight: 700; text-decoration: none; }
.card .card-link::after { content: " →"; }
.card .card-link:hover { color: var(--red); }

.card--plain { box-shadow: none; }

/* Numbered process steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px 20px 76px;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--steel-dark);
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin-bottom: 6px; }
.steps p { margin-bottom: 0; color: var(--muted); }

/* Client chips */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.92rem;
  color: var(--steel-deep);
  font-weight: 600;
}
.chips li a { text-decoration: none; }
.chips li a:hover { color: var(--red); }

/* News list */
.news-item { border-left: 4px solid var(--steel); padding: 4px 0 4px 18px; margin-bottom: 24px; }
.news-item time { font-weight: 800; color: var(--steel-deep); display: block; margin-bottom: 4px; }
.news-item p { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Archive tables (directory index pages)
   -------------------------------------------------------------------------- */

.archive-table-wrap { overflow-x: auto; }
.archive-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}
.archive-table caption { text-align: left; padding: 12px 2px; color: var(--muted); font-size: 0.875rem; }
.archive-table th, .archive-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.archive-table thead th { background: #eef3f6; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--steel-deep); }
.archive-table tbody tr:last-child td { border-bottom: 0; }
.archive-table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; }

/* --------------------------------------------------------------------------
   Notices / callouts
   -------------------------------------------------------------------------- */

.notice {
  background: #f2f7fa;
  border: 1px solid #d3e2ec;
  border-left: 4px solid var(--steel);
  border-radius: 10px;
  padding: 14px 18px;
  color: var(--ink);
  margin: 0 0 24px;
}
.notice p:last-child { margin-bottom: 0; }

.cta-band {
  background: linear-gradient(135deg, var(--steel-deep), var(--steel-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; color: #dbe7ef; }
.cta-band .btn { background: #fff; color: var(--steel-deep); }
.cta-band .btn:hover { background: #eef3f6; color: var(--steel-deep); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: 0.92rem; }
.form-field .req { color: var(--red); }
.form-field input, .form-field textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--steel-dark); outline: 2px solid var(--steel); outline-offset: 1px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.contact-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
@media (max-width: 880px) { .contact-layout { grid-template-columns: 1fr; } }

.address-card { font-style: normal; }
.address-card strong { display: block; margin-bottom: 6px; }

/* --------------------------------------------------------------------------
   Flash / media preview
   -------------------------------------------------------------------------- */

.media-frame {
  background: #10151a;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item h3 { margin: 0 0 8px; font-size: 1.05rem; }
.faq-item p { margin-bottom: 0; color: var(--ink); }
.faq-item p + p { margin-top: 8px; }

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

.site-footer {
  background: var(--ink);
  color: #b9c6cf;
  margin-top: 72px;
  padding: 48px 0 28px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.footer-brand { color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.site-footer a { color: #d5e0e8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer nav h4 { color: #fff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-legal {
  border-top: 1px solid #3a4a55;
  margin-top: 36px;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: #8fa1ad;
}
.footer-legal p { margin: 0; }

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Utility page (archived endpoints)
   -------------------------------------------------------------------------- */

.utility-main {
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 40px;
}
.utility-main .kicker { margin-bottom: 12px; }