/* ============================================================
   TRM Systems LLC — shared stylesheet
   Modern Technical: crisp grotesk, tight layout, one accent.
   ============================================================ */

/* ---- Fonts (self-hosted Inter subset) ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-latin-700.woff2") format("woff2");
}

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

/* ---- Tokens ---- */
:root {
  --ink: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-ring: rgba(37, 99, 235, 0.12);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container: 1120px;
  --radius: 10px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
}

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--slate-700);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-hover);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- Navigation ---- */
nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  z-index: 100;
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo:hover {
  color: var(--ink);
}
.logo .mark {
  color: var(--accent);
  font-size: 0.7em;
  transform: translateY(-1px);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-link {
  color: var(--slate-600);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav-link:hover {
  color: var(--ink);
}

.nav-cta {
  padding: 8px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav-cta:hover {
  background: var(--slate-800);
  color: var(--white);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--slate-800);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--slate-300);
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--slate-400);
  transform: translateY(-2px);
}

/* ---- Sections ---- */
section {
  padding: 100px 0;
}
.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title {
  font-size: 2rem;
  margin-bottom: 16px;
}
.section-lead {
  font-size: 1.125rem;
  color: var(--slate-600);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 130px 0 120px;
  border-bottom: 1px solid var(--slate-200);
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 40%, transparent 100%);
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 3.25rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 16ch;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 1.1875rem;
  color: var(--slate-600);
  max-width: 56ch;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 52px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: 0.9375rem;
  color: var(--slate-500);
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- Track record strip ---- */
.trackrecord {
  padding: 54px 0;
  border-bottom: 1px solid var(--slate-200);
  background: var(--slate-50);
}
.tr-lead {
  font-size: 1.0625rem;
  color: var(--slate-600);
  max-width: 62ch;
  margin-bottom: 22px;
}
.tr-lead strong {
  color: var(--ink);
  font-weight: 600;
}
.tr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tr-chips span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 7px 15px;
}

/* ---- Capability cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--slate-300);
}
.card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}
.card-icon svg {
  width: 22px;
  height: 22px;
}
.card h3 {
  font-size: 1.1875rem;
  margin-bottom: 10px;
}
.card p {
  color: var(--slate-600);
  font-size: 0.9875rem;
}

/* ---- Approach (dark band) ---- */
.band {
  background: var(--ink);
  color: var(--slate-300);
}
.band .eyebrow {
  color: #93b4fb;
}
.band .section-title {
  color: var(--white);
}
.band .section-lead {
  color: var(--slate-400);
}
.approach-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 40px;
  margin-top: 8px;
}
.approach-item {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
}
.approach-item h3 {
  color: var(--white);
  font-size: 1.0625rem;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.approach-item h3 .num {
  color: #93b4fb;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.approach-item p {
  color: var(--slate-400);
  font-size: 0.9375rem;
}

/* ---- Engagements ---- */
.engage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.engage {
  padding: 28px 0 0;
  border-top: 2px solid var(--ink);
}
.engage h3 {
  font-size: 1.0625rem;
  margin-bottom: 10px;
}
.engage p {
  color: var(--slate-600);
  font-size: 0.9375rem;
}

/* ---- About ---- */
.about {
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}
.about-wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-body p {
  font-size: 1.0625rem;
  color: var(--slate-700);
  margin-bottom: 18px;
  max-width: 60ch;
}
.about-body p:last-child {
  margin-bottom: 0;
}
.about-side h3 {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 16px;
}
.domain-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.domain-list li {
  font-size: 0.9875rem;
  color: var(--ink);
  font-weight: 500;
  padding-left: 20px;
  position: relative;
}
.domain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---- Closing CTA ---- */
.cta {
  text-align: center;
  padding: 110px 0;
}
.cta h2 {
  font-size: 2.25rem;
  margin-bottom: 16px;
}
.cta p {
  font-size: 1.125rem;
  color: var(--slate-600);
  max-width: 46ch;
  margin: 0 auto 32px;
}

/* ---- Contact page ---- */
.contact-container {
  max-width: 620px;
  margin: 90px auto;
  padding: 0 32px;
}
.contact-container h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.contact-container .subtitle {
  font-size: 1.125rem;
  color: var(--slate-600);
  margin-bottom: 44px;
}
.form-group {
  margin-bottom: 22px;
}
label {
  display: block;
  font-weight: 500;
  color: var(--slate-700);
  margin-bottom: 8px;
  font-size: 0.9375rem;
}
.required {
  color: var(--accent);
}
input,
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
textarea {
  resize: vertical;
  min-height: 150px;
}
.submit-button {
  width: 100%;
  padding: 14px 32px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.2s ease;
}
.submit-button:hover {
  background: var(--slate-800);
  transform: translateY(-1px);
}
.submit-button:active {
  transform: translateY(0);
}

/* ---- Footer ---- */
footer {
  background: var(--white);
  color: var(--slate-500);
  border-top: 1px solid var(--slate-200);
  padding: 44px 0;
  font-size: 0.9375rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-inner .logo {
  font-size: 1rem;
}
.footer-meta {
  display: flex;
  gap: 22px;
  align-items: center;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .about-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .engage-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .engage {
    padding: 24px 0;
    border-top: 1px solid var(--slate-200);
  }
  .engage:first-child {
    border-top: 2px solid var(--ink);
  }
}

@media (max-width: 768px) {
  section {
    padding: 64px 0;
  }
  .container,
  .nav-container,
  .footer-inner {
    padding-left: 24px;
    padding-right: 24px;
  }
  .hero {
    padding: 84px 0 72px;
  }
  .hero h1 {
    font-size: 2.35rem;
  }
  .hero-sub {
    font-size: 1.0625rem;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .card-grid,
  .approach-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-links .nav-link.hide-mobile {
    display: none;
  }
  .cta h2 {
    font-size: 1.7rem;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
