/* ==========================================================================
   Northfield Services LLC — Our Technology page
   Loaded AFTER Bootstrap 5 so these rules restore the original design.
   Desktop matches the live page; the mobile layout is reworked (see bottom).
   ========================================================================== */

:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --ink: #22221e;
  --muted: #6b6a63;
  --accent: #14532d;
  --accent-dark: #0f3f22;
  --accent-soft: #e8f0ea;
  --line: #e6e1d7;
}

/* ---------- Base (neutralises Bootstrap reboot where it differs) ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;               /* safety net: never allow sideways scrolling */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
a:hover { color: inherit; }
p { margin: 0; }
h1, h2, h3 { font-weight: 700; }
h2, h3 { line-height: 1.6; }
img, svg { max-width: 100%; }

code {
  color: inherit;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .875em;
  overflow-wrap: anywhere;
}

.wrap { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.serif { font-family: 'Libre Baskerville', Georgia, serif; }

/* ---------- Sticky top bar ---------- */
.topbar {
  background: rgba(250, 247, 242, .97);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; gap: 12px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand img { width: 38px; height: 38px; display: block; flex: 0 0 auto; }
.brand-text { white-space: nowrap; }
.brand em { font-style: normal; color: var(--accent); }

.topcall {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.topcall:hover, .topcall:focus { background: var(--accent-dark); color: #fff; }
.topcall-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 48px 0 36px; }
.nf-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: .85rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; margin-bottom: 14px; }
.sub { color: var(--muted); font-size: 1.1rem; max-width: 36rem; margin: 0 auto 24px; }

/* ---------- Sections ---------- */
section { padding: 36px 0; }
h2 { font-size: clamp(1.3rem, 4vw, 1.7rem); text-align: center; margin-bottom: 8px; }
.lead {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 400;
  max-width: 36rem;
  margin: 0 auto 26px;
}

/* Cards: Bootstrap row/cols handle the grid, these rules handle the look */
.nf-card {
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.nf-card .n { font-family: 'Libre Baskerville', serif; color: var(--accent); font-size: 1.5rem; margin-bottom: 8px; }
.nf-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.nf-card p { color: var(--muted); font-size: .96rem; }

/* ---------- Call-out ---------- */
.callout { background: var(--accent); color: #fff; border-radius: 16px; text-align: center; padding: 36px 24px; }
.callout h2 { color: #fff; }
.callout p { opacity: .9; max-width: 34rem; margin: 0 auto 18px; }
.cta {
  display: inline-block;
  max-width: 100%;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 15px 34px;
  border-radius: 10px;
}
.callout .cta { background: #fff; color: var(--accent); transition: transform .15s ease, box-shadow .15s ease; }
.callout .cta:hover, .callout .cta:focus { color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 32px 0 120px; color: var(--muted); font-size: .9rem; text-align: center; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }
footer p, footer nav { margin-bottom: 8px; }
.footer-row .sep { margin: 0 .35em; }
footer a[href^="tel:"], footer a[href^="mailto:"] { white-space: nowrap; }

/* ---------- Focus visibility (keyboard users) ---------- */
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.callout a:focus-visible { outline-color: #fff; }

/* ==========================================================================
   Mobile (phones, < 576px)
   ========================================================================== */
@media (max-width: 575.98px) {
  .wrap { padding: 0 16px; }

  /* Top bar: compact two-line logo lockup + call button that always fits */
  .topbar .wrap { padding: 10px 16px; gap: 10px; }
  .brand { gap: 9px; }
  .brand img { width: 34px; height: 34px; }
  .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
  .brand-name { font-size: 1rem; letter-spacing: -.01em; }
  .brand em {
    margin-top: 3px;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .topcall { padding: 9px 13px; font-size: .9rem; gap: 6px; border-radius: 8px; }
  .topcall-icon { width: 14px; height: 14px; }

  /* Hero: tighter, no big empty gap underneath */
  .hero { padding: 30px 0 6px; }
  .nf-badge { font-size: .78rem; padding: 5px 12px; margin-bottom: 14px; }
  h1 { font-size: 1.7rem; line-height: 1.2; margin-bottom: 12px; }
  .sub { font-size: 1rem; margin-bottom: 0; }

  /* Sections */
  section { padding: 30px 0; }
  h2 { font-size: 1.32rem; line-height: 1.35; margin-bottom: 8px; }
  .lead { font-size: .97rem; margin-bottom: 20px; }

  /* Cards: number sits beside the title instead of on its own line */
  .row.g-3 { --bs-gutter-y: .75rem; }
  .nf-card { padding: 18px 18px 20px; border-radius: 12px; }
  .nf-card .n {
    float: left;
    margin: 0 10px 0 0;
    font-size: 1.05rem;
    line-height: 1.6;
  }
  .nf-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
  .nf-card p { clear: both; font-size: .95rem; }

  /* Call-out: full-width button that can never spill out of the box */
  .callout { padding: 28px 18px; border-radius: 14px; }
  .callout h2 { font-size: 1.3rem; }
  .callout p { font-size: .97rem; margin-bottom: 16px; }
  .cta {
    display: block;
    width: 100%;
    font-size: 1rem;
    padding: 14px 12px;
    overflow-wrap: anywhere;
  }

  /* Footer: one fact per line, no orphaned separators, no huge blank tail */
  footer { padding: 26px 0 36px; font-size: .88rem; }
  .footer-about { margin-bottom: 14px; }
  .footer-row { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 14px; }
  .footer-links { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
  .footer-row .sep { display: none; }
}

/* Very small phones (≤ 359px, e.g. Galaxy Fold / older devices) */
@media (max-width: 359.98px) {
  .wrap, .topbar .wrap { padding-left: 12px; padding-right: 12px; }
  .brand { gap: 7px; }
  .brand img { width: 30px; height: 30px; }
  .brand-name { font-size: .92rem; }
  .brand em { font-size: .58rem; }
  .topcall { padding: 8px 10px; font-size: .82rem; }
  .topcall-icon { display: none; }
  h1 { font-size: 1.55rem; }
  .callout { padding: 24px 14px; }
  .cta { font-size: .92rem; }
}
