/* ------------------------------------------------------------
       Tokens
       Palette is taken from the logo: navy from the "I", teal from
       the COMMERCE wordmark, pale aqua from the sphere.
       ------------------------------------------------------------ */
    :root {
      --navy: #1E2A5A;
      --navy-deep: #16204A;
      --teal: #2F9A9B;
      --teal-soft: #DCEFEF;
      --aqua: #B9DEDF;
      --ink: #1C2333;
      --ink-2: #4A5266;
      --ink-3: #7B8398;
      --line: #D9DEE6;
      --paper: #FFFFFF;
      --paper-2: #F4F6F8;

      --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
      --sans: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

      --max: 1120px;
      --gutter: clamp(20px, 5vw, 48px);
    }

    * { box-sizing: border-box; }
    html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
    body {
      margin: 0;
      font-family: var(--sans);
      font-size: 17px;
      line-height: 1.6;
      color: var(--ink);
      background: var(--paper);
      -webkit-font-smoothing: antialiased;
    }
    img { max-width: 100%; display: block; }
    a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
    a:hover { color: var(--teal); }
    :focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

    h1, h2, h3 {
      font-family: var(--serif);
      font-weight: 500;
      color: var(--navy);
      margin: 0;
      letter-spacing: -0.01em;
    }
    h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.08; }
    h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.15; }
    h3 { font-size: 1.25rem; line-height: 1.3; }
    p { margin: 0 0 1em; }
    .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }

    .wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
    .section { padding: clamp(64px, 9vw, 120px) 0; }
    .section + .section { border-top: 1px solid var(--line); }
    .section-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 44em; }

    /* ---------------- Header ---------------- */
    .site-header {
      position: sticky; top: 0; z-index: 20;
      background: rgba(255,255,255,.92);
      backdrop-filter: saturate(150%) blur(8px);
      border-bottom: 1px solid var(--line);
    }
    .nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
    .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
    .brand img { height: 40px; width: auto; }
    .brand-name { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .01em; }
    .brand-name em { font-style: italic; font-weight: 600; }
    .brand-name span { color: var(--teal); letter-spacing: .12em; font-size: .95rem; }
    .menu { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
    .menu a { text-decoration: none; font-weight: 500; color: var(--ink-2); font-size: .98rem; }
    .menu a[aria-current] { color: var(--navy); border-bottom: 2px solid var(--teal); padding-bottom: 2px; }
    .menu a:hover { color: var(--navy); }
    .menu-toggle {
      display: none; background: none; border: 1px solid var(--line); border-radius: 4px;
      width: 40px; height: 40px; cursor: pointer; color: var(--navy);
    }
    .menu-toggle svg { display: block; margin: auto; }

    /* ---------------- Hero ---------------- */
    .hero { padding: clamp(64px, 10vw, 128px) 0 clamp(56px, 8vw, 104px); }
    .hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
    .hero h1 { max-width: 15em; }
    .hero .lede { margin-top: 24px; }
    .hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 36px; }
    .btn {
      display: inline-flex; align-items: center; justify-content: center;
      font-family: var(--sans); font-weight: 600; font-size: 1rem;
      padding: 14px 24px; border-radius: 4px; text-decoration: none;
      border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
    }
    .btn-primary { background: var(--navy); color: #fff; }
    .btn-primary:hover { background: var(--navy-deep); color: #fff; }
    .btn-ghost { border-color: var(--line); color: var(--navy); background: #fff; }
    .btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

    /* The one distinctive element: the "record" — company facts set
       like an institutional register beside the headline. */
    .record { border-top: 2px solid var(--navy); font-size: 1rem; }
    .record dl { margin: 0; }
    .record div { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
    .record dt { color: var(--ink-3); }
    .record dd { margin: 0; color: var(--ink); font-weight: 500; }

    /* ---------------- Services ---------------- */
    .services { background: var(--paper-2); }
    .two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); }
    .service { border-top: 2px solid var(--teal); padding-top: 24px; }
    .service h3 { margin-bottom: 12px; }
    .service p { color: var(--ink-2); }
    .service ul { margin: 16px 0 0; padding-left: 1.1em; color: var(--ink-2); }
    .service li { margin-bottom: 6px; }

    .products { margin-top: clamp(48px, 6vw, 80px); padding-top: 40px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; }
    .products h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; color: var(--ink-2); }
    .product-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 32px; }
    .product-list li { padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 500; }

    /* ---------------- Clients ---------------- */
    .client-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
    .client-table th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: .95rem; padding: 0 0 12px; border-bottom: 2px solid var(--navy); }
    .client-table td { padding: 18px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
    .client-table td:first-child { font-family: var(--serif); font-size: 1.2rem; color: var(--navy); }
    .client-table td:nth-child(2) { color: var(--ink-2); }
    .client-table td:last-child { color: var(--ink-2); }
    .clients-note { margin-top: 24px; color: var(--ink-2); max-width: 40em; }

    /* ---------------- CTA ---------------- */
    .cta { background: var(--navy); color: #fff; }
    .cta .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: center; }
    .cta h2 { color: #fff; }
    .cta p { color: var(--aqua); margin: 16px 0 0; max-width: 34em; }
    .cta .contact-lines { font-size: 1.05rem; line-height: 1.9; }
    .cta .contact-lines a { color: #fff; }
    .cta .contact-lines a:hover { color: var(--aqua); }
    .cta .contact-lines .btn-light { background: #fff; color: var(--navy); margin-top: 20px; }
    .cta .contact-lines .btn-light:hover { background: var(--paper-2); color: var(--navy-deep); }

    /* ---------------- Footer ---------------- */
    .site-footer { padding: 48px 0; font-size: .95rem; color: var(--ink-2); }
    .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
    .site-footer .brand img { height: 32px; }
    .site-footer h4 { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--navy); margin: 0 0 10px; }
    .site-footer ul { list-style: none; margin: 0; padding: 0; }
    .site-footer li { margin-bottom: 6px; }
    .site-footer a { text-decoration: none; color: var(--ink-2); }
    .site-footer a:hover { color: var(--teal); }
    .footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: .9rem; }

    /* ---------------- Responsive ---------------- */
    @media (max-width: 860px) {
      .hero-grid, .two-col, .products, .cta .wrap { grid-template-columns: 1fr; }
      .footer-grid { grid-template-columns: 1fr 1fr; }
      .record { margin-top: 8px; }
      .client-table th:nth-child(3), .client-table td:nth-child(3) { display: none; }
    }
    @media (max-width: 640px) {
      body { font-size: 16px; }
      .menu-toggle { display: block; }
      .menu {
        display: none; position: absolute; left: 0; right: 0; top: 72px;
        flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
        padding: 8px var(--gutter) 16px;
      }
      .menu.is-open { display: flex; }
      .menu li { padding: 12px 0; border-bottom: 1px solid var(--line); }
      .menu li:last-child { border-bottom: 0; }
      .menu a[aria-current] { border-bottom: 0; }
      .footer-grid { grid-template-columns: 1fr; }
      .record div { grid-template-columns: 7em 1fr; }
    }
    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      .btn { transition: none; }
    }

/* ============================================================
   Inner pages
   ============================================================ */

/* Page intro (used on About / Services / History / Contact) */
.page-intro { padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--line); }
.page-intro h1 { max-width: 14em; }
.page-intro .lede { margin-top: 20px; }

/* Prose blocks: heading in left column, text in right */
.prose-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 80px); }
.prose-grid + .prose-grid { margin-top: clamp(48px, 7vw, 96px); padding-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.prose { max-width: 40em; color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }
.prose ul { padding-left: 1.1em; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); font-weight: 600; }

/* Fact list (About: MD profile, Contact: details) */
.facts { border-top: 2px solid var(--navy); margin: 0; font-size: 1rem; }
.facts div { display: grid; grid-template-columns: 11em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; color: var(--ink); }
.facts dd small { display: block; color: var(--ink-3); font-size: .95rem; }

/* Services page: numbered only where content is a sequence (upgrade steps) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5em 1fr; column-gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step); grid-column: 1; grid-row: 1 / span 2; font-family: var(--serif); font-size: 1.2rem; color: var(--teal); line-height: 1.4; }
.steps li strong, .steps li span { grid-column: 2; }
.steps li strong { display: block; color: var(--ink); font-weight: 600; }
.steps li span { color: var(--ink-2); }

.coverage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.coverage div { border-top: 2px solid var(--teal); padding-top: 12px; }
.coverage div b { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; color: var(--navy); }
.coverage div span { color: var(--ink-2); font-size: .98rem; }

.figure { margin: 0; }
.figure img { width: 100%; border: 1px solid var(--line); }
.figure figcaption { margin-top: 12px; font-size: .95rem; color: var(--ink-3); max-width: 40em; }

.article { max-width: 40em; }
.article .byline { color: var(--ink-3); font-size: .95rem; margin-bottom: 20px; }
.article p { color: var(--ink-2); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 80px); }
.map { margin-top: 24px; border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 860px) {
  .prose-grid, .contact-grid { grid-template-columns: 1fr; }
  .coverage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .facts div { grid-template-columns: 8em 1fr; }
  .coverage { grid-template-columns: 1fr; }
}

/* Team (About)
   Photos are small (116x155 source), so the portrait is set at native size
   beside the text rather than blown up as a hero image. */
.team { display: grid; gap: 24px; max-width: 800px; }
.person { display: grid; grid-template-columns: 116px 1fr; gap: 32px; padding: 32px; background: #fff; border: 1px solid var(--line); }
.person-photo {
  width: 116px; height: 155px; background: var(--paper-2); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--line); overflow: hidden;
}
.person-photo img { width: 116px; height: 155px; object-fit: cover; }
.person-photo svg { width: 52px; height: auto; }
.person-body h3 { font-size: 1.5rem; margin-bottom: 4px; }
.person-body .role { color: var(--teal); font-weight: 600; margin: 0 0 4px; }
.person-body .email { margin: 0 0 16px; font-size: .95rem; }
.person-body .email a { text-decoration: none; }
.person-body .email a:hover { text-decoration: underline; }
.person-body p { color: var(--ink-2); max-width: 40em; }
.person-body .facts { margin-top: 20px; font-size: .95rem; max-width: 40em; }
.person-body .facts div { grid-template-columns: 6.5em 1fr; padding: 10px 0; }
@media (max-width: 640px) { .person { grid-template-columns: 1fr; gap: 20px; padding: 24px; } }
