/*
Theme Name: Joly Investigative
Theme URI: https://jolyinvestigative.com
Author: Joly Investigative & Protective Group
Description: Single-page theme for Joly Investigative & Protective Group.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: joly-investigative
*/

  :root {
    --navy-950: #0B1626;
    --navy-800: #16233B;
    --steel-600: #2C5578;
    --steel-500: #3D6D96;
    --paper-50: #FBFAF8;
    --paper-100: #F3F1EC;
    --ink-900: #1C2230;
    --ink-600: #4A5163;
    --brass-500: #A9825A;
    --line: rgba(28,34,48,0.12);

    --bg: var(--paper-50);
    --bg-alt: var(--paper-100);
    --text: var(--ink-900);
    --text-muted: var(--ink-600);
    --hero-bg: var(--navy-950);
    --hero-text: #F3F1EC;

    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #12161E;
      --bg-alt: #181D27;
      --text: #E9E7E1;
      --text-muted: #A9AEBB;
      --line: rgba(233,231,225,0.14);
    }
  }
  :root[data-theme="dark"] {
    --bg: #12161E;
    --bg-alt: #181D27;
    --text: #E9E7E1;
    --text-muted: #A9AEBB;
    --line: rgba(233,231,225,0.14);
  }

  * { box-sizing: border-box; }
  html { scroll-padding-top: env(safe-area-inset-top, 0px); scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3 {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-weight: 500;
    line-height: 1.15;
    margin: 0;
    color: inherit;
  }
  p { margin: 0; }
  a { color: inherit; text-decoration: none; }
  img { max-width: 100%; display: block; }

  .wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 48px);
  }
  .prose { max-width: 640px; }

  /* ---------- Header ---------- */
  header.site {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
  }
  .brand {
    font-family: 'Source Serif 4', serif;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
  }
  .brand strong { font-weight: 600; }
  nav.links { display: flex; gap: 28px; }
  nav.links a { font-size: 0.95rem; color: var(--text-muted); transition: color .15s ease; }
  nav.links a:hover { color: var(--text); }
  .nav-cta {
    display: none;
  }
  @media (min-width: 720px) {
    .nav-cta {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--navy-950);
      color: #F3F1EC;
      padding: 10px 18px;
      border-radius: 3px;
      font-size: 0.9rem;
      font-weight: 600;
    }
  }
  @media (max-width: 719px) {
    nav.links { display: none; }
  }

  /* ---------- Hero ---------- */
  .hero {
    background: var(--hero-bg);
    color: var(--hero-text);
    position: relative;
    overflow: hidden;
  }
  .hero-inner {
    padding: clamp(64px, 12vh, 120px) 0 clamp(56px, 10vh, 96px);
    position: relative;
    z-index: 2;
  }
  .hero .eyebrow-mark {
    width: 42px; height: 2px; background: var(--brass-500); margin-bottom: 28px;
    opacity: 0;
    animation: growLine 0.8s 0.15s ease forwards;
  }
  @keyframes growLine { from { width: 0; opacity: 0; } to { width: 42px; opacity: 1; } }

  .hero h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    letter-spacing: -0.01em;
    max-width: 14ch;
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s 0.25s ease forwards;
  }
  .hero .role {
    margin-top: 18px;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #C7CCD8;
    max-width: 46ch;
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s 0.4s ease forwards;
  }
  .hero-actions {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s 0.55s ease forwards;
  }
  @keyframes rise { to { opacity: 1; transform: translateY(0); } }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
  }
  .btn-primary { background: var(--brass-500); color: #1C1508; }
  .btn-outline {
    border-color: rgba(243,241,236,0.35);
    color: #F3F1EC;
  }
  .btn-outline:hover { border-color: rgba(243,241,236,0.7); }

  .hero-strip {
    border-top: 1px solid rgba(243,241,236,0.14);
    padding: 22px 0;
    position: relative;
    z-index: 2;
  }
  .hero-strip .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 32px;
    color: #9BA3B4;
    font-size: 0.88rem;
  }
  .hero-strip strong { color: #D8DCE4; font-weight: 600; }

  /* subtle line motif, evokes a target/scope reticle rather than decoration */
  .hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: 50%;
    transform: translateY(-50%);
    width: 480px;
    height: 480px;
    border-radius: 50%;
    border: 1px solid rgba(243,241,236,0.08);
    z-index: 1;
  }
  .hero::before {
    content: "";
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(243,241,236,0.10);
    z-index: 1;
  }
  @media (max-width: 900px) {
    .hero::before, .hero::after { display: none; }
  }

  /* ---------- Section shell ---------- */
  section { padding: clamp(56px, 10vh, 104px) 0; }
  .section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(32px, 5vh, 56px);
    flex-wrap: wrap;
  }
  .section-head h2 {
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  }
  .section-head .lede {
    color: var(--text-muted);
    max-width: 40ch;
    font-size: 0.98rem;
  }

  /* ---------- About ---------- */
  .about { background: var(--bg); }
  .about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
  }
  @media (min-width: 860px) {
    .about-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
  }
  .about h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); max-width: 16ch; }
  .about .statement {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    line-height: 1.5;
    color: var(--text);
    margin-top: 20px;
  }
  .credentials {
    border-left: 2px solid var(--brass-500);
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .credentials .item .k { font-size: 0.82rem; text-transform: none; color: var(--text-muted); }
  .credentials .item .v { font-family: 'Source Serif 4', serif; font-size: 1.3rem; margin-top: 2px; }

  /* ---------- Services / rate table ---------- */
  .services { background: var(--bg-alt); }
  .rate-table {
    border-top: 1px solid var(--line);
  }
  .rate-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px 24px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }
  @media (min-width: 720px) {
    .rate-row {
      grid-template-columns: 2.1fr 1fr 2.4fr;
      align-items: baseline;
    }
  }
  .rate-head {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-bottom: 12px;
  }
  .rate-head span:first-child { font-weight: 600; }
  .rt-title { font-weight: 600; font-size: 1.02rem; font-family: 'Source Serif 4', serif; }
  .rt-price {
    font-family: 'Source Serif 4', serif;
    font-size: 1.15rem;
    color: var(--navy-950);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .rt-price { color: var(--brass-500); }
  }
  :root[data-theme="dark"] .rt-price { color: var(--brass-500); }
  .rt-price small { font-size: 0.7rem; color: var(--text-muted); font-family: 'Public Sans', sans-serif; }
  .rt-note { color: var(--text-muted); font-size: 0.9rem; }

  /* ---------- Coverage ---------- */
  .coverage {
    background: var(--bg);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .coverage .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 48px;
    padding: 40px clamp(20px, 5vw, 48px);
  }
  .coverage .lead {
    font-family: 'Source Serif 4', serif;
    font-size: 1.15rem;
    max-width: 30ch;
  }
  .county-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    flex: 1;
  }
  .county-list span {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-left: 16px;
    border-left: 1px solid var(--line);
  }
  .county-list span:first-child { padding-left: 0; border-left: none; }

  /* ---------- Contact ---------- */
  .contact { background: var(--navy-950); color: #F3F1EC; }
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
  }
  @media (min-width: 800px) {
    .contact-grid { grid-template-columns: 1.1fr 0.9fr; }
  }
  .contact h2 { color: #F3F1EC; font-size: clamp(1.7rem, 3.4vw, 2.4rem); max-width: 14ch; }
  .contact .lede { color: #B7BECC; margin-top: 16px; max-width: 42ch; font-size: 1rem; }
  .contact-card {
    background: rgba(243,241,236,0.04);
    border: 1px solid rgba(243,241,236,0.14);
    border-radius: 4px;
    padding: 32px;
  }
  .contact-row {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    border-top: 1px solid rgba(243,241,236,0.12);
  }
  .contact-row:first-child { border-top: none; padding-top: 0; }
  .contact-row .k { font-size: 0.85rem; color: #9BA3B4; }
  .contact-row .v { font-family: 'Source Serif 4', serif; font-size: 1.35rem; margin-top: 4px; }
  .contact-row a:hover { color: var(--brass-500); }

  /* ---------- Footer ---------- */
  footer {
    background: var(--navy-950);
    color: #7F8798;
    border-top: 1px solid rgba(243,241,236,0.1);
    padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px));
  }
  footer .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.85rem;
  }

  @media (prefers-reduced-motion: reduce) {
    .hero .eyebrow-mark, .hero h1, .hero .role, .hero-actions {
      animation: none !important; opacity: 1 !important; transform: none !important;
    }
  }

  /* ---------- WordPress adjustments ---------- */
  .admin-bar header.site { top: 32px; }
  @media (max-width: 782px) { .admin-bar header.site { top: 46px; } }
  .page-content { padding: clamp(48px, 8vh, 96px) 0; }
  .page-content h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 24px; }
  .page-content p { margin-bottom: 16px; max-width: 70ch; }
