/* ==========================================================================
   JusticePath public website
   All colour / type / spacing values come from tokens.css (var(--jp-*)).
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--jp-font-sans);
  font-size: var(--jp-text-base);
  line-height: var(--jp-leading-relaxed);
  color: var(--jp-text-primary);
  background: var(--jp-bg-app);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--jp-text-link); }
a:hover { color: var(--jp-text-link-hover); }
/* Brand Toolkit type: DIN for headers (all caps, wide tracking) and interface text, Minion Pro for body copy. */
h1, h2, h3, h4 {
  color: var(--jp-text-heading); line-height: var(--jp-leading-tight); margin: 0 0 var(--jp-space-4);
  font-weight: var(--jp-font-weight-regular); text-transform: uppercase; letter-spacing: var(--jp-tracking-widest);
}
p { margin: 0 0 var(--jp-space-4); }
p:last-child { margin-bottom: 0; }
ul { margin: 0 0 var(--jp-space-4); }
main p, main li, main blockquote { font-family: var(--jp-font-serif); font-size: var(--jp-text-lg); }

.container { max-width: var(--jp-width-content-max); margin: 0 auto; padding: 0 var(--jp-space-6); }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--jp-space-4); top: -100px; z-index: var(--jp-z-max);
  background: var(--jp-bg-brand-primary); color: var(--jp-text-on-brand);
  padding: var(--jp-space-2) var(--jp-space-4); border-radius: var(--jp-radius-sm);
  font-size: var(--jp-text-sm); text-decoration: none;
}
.skip-link:focus { top: var(--jp-space-4); color: var(--jp-text-on-brand); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--jp-space-2);
  font-family: var(--jp-font-sans); font-size: var(--jp-text-sm); font-weight: var(--jp-font-weight-bold);
  letter-spacing: var(--jp-tracking-button); text-transform: uppercase; line-height: var(--jp-leading-none);
  padding: var(--jp-space-3) var(--jp-space-6); border-radius: var(--jp-radius-sm);
  border: 2px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--jp-duration-fast) var(--jp-ease-default), color var(--jp-duration-fast) var(--jp-ease-default), border-color var(--jp-duration-fast) var(--jp-ease-default);
}
.btn:focus-visible { outline: none; box-shadow: var(--jp-focus-ring); }
.btn-sm { padding: var(--jp-space-2) var(--jp-space-4); font-size: var(--jp-text-xs); }
.btn-primary { background: var(--jp-interactive-primary); color: var(--jp-interactive-primary-text); }
.btn-primary:hover { background: var(--jp-interactive-primary-hover); color: var(--jp-interactive-primary-text); }
.btn-accent { background: var(--jp-interactive-accent); color: var(--jp-interactive-accent-text); }
.btn-accent:hover { background: var(--jp-interactive-accent-hover); color: var(--jp-interactive-accent-text); }
.btn-light { background: transparent; color: var(--jp-color-white); border-color: var(--jp-color-white); }
.btn-light:hover { background: var(--jp-color-white); color: var(--jp-color-navy-800); }
.btn[disabled] { background: var(--jp-interactive-disabled-bg); color: var(--jp-interactive-disabled-text); pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--jp-space-4); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--jp-z-sticky);
  background: var(--jp-bg-surface);
  border-bottom: 3px solid var(--jp-color-gold-500);   /* signature gold accent bar */
  box-shadow: var(--jp-shadow-sm);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--jp-space-6); height: 88px; }
.brand { display: flex; align-items: center; }
.brand img { height: 64px; width: auto; }
.site-nav { display: flex; align-items: center; gap: var(--jp-space-1); }
.nav-link {
  font-size: var(--jp-text-sm); font-weight: var(--jp-font-weight-medium);
  letter-spacing: var(--jp-tracking-nav); text-transform: uppercase;
  color: var(--jp-text-heading); text-decoration: none;
  padding: var(--jp-space-2) var(--jp-space-3); border-bottom: 2px solid transparent;
  transition: border-color var(--jp-duration-fast) var(--jp-ease-default);
}
.nav-link:hover { color: var(--jp-text-heading); border-bottom-color: var(--jp-color-gold-300); }
.page-about .nav-link[data-nav="about"],
.page-products .nav-link[data-nav="products"],
.page-features .nav-link[data-nav="features"],
.page-contact .nav-link[data-nav="contact"] { border-bottom-color: var(--jp-color-gold-500); }
.nav-login { margin-left: var(--jp-space-4); }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 10px; background: none; border: 0; cursor: pointer; border-radius: var(--jp-radius-sm);
}
.nav-toggle .bar { display: block; height: 2px; background: var(--jp-color-navy-800); border-radius: 1px; }
.nav-toggle:focus-visible { outline: none; box-shadow: var(--jp-focus-ring); }

/* --------------------------------------------------------------------------
   Home: hero + intro card
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; color: var(--jp-color-white);
  background: var(--jp-color-navy-800) url("/assets/img/hero-app-photo.jpg") no-repeat 70% center / cover;
}
.hero::before {
  content: ""; position: absolute; inset: 0; width: 60%;
  background: var(--jp-color-navy-800);
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 620px; align-items: center; }
.hero-copy { max-width: 540px; padding: var(--jp-space-20) 0 calc(var(--jp-space-20) + 48px); }
.hero h1 {
  color: var(--jp-color-white); font-size: clamp(1.875rem, 3.4vw, 2.75rem);
  line-height: var(--jp-leading-snug); margin-bottom: var(--jp-space-5);
}
.hero p { font-size: var(--jp-text-xl); color: rgba(255, 255, 255, 0.88); max-width: 46ch; }
.store-badges { display: flex; flex-wrap: wrap; gap: var(--jp-space-4); margin-top: var(--jp-space-6); }
.store-badges img { height: 54px; width: auto; }
.store-badges a { display: inline-block; border-radius: var(--jp-radius-sm); }
.store-badges a:focus-visible { outline: none; box-shadow: var(--jp-focus-ring); }

.intro { position: relative; z-index: 1; margin-top: -96px; }
.intro-card {
  max-width: 960px; margin: 0 auto; padding: var(--jp-space-10) var(--jp-space-12);
  background: var(--jp-bg-surface); border-top: 4px solid var(--jp-color-gold-500);
  border-radius: var(--jp-radius-md); box-shadow: var(--jp-shadow-xl); text-align: center;
}
.intro-card p { font-size: var(--jp-text-xl); margin-bottom: var(--jp-space-8); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: var(--jp-space-20) 0; }
.section-title { font-size: var(--jp-text-4xl); margin-bottom: var(--jp-space-6); }
.section-title.with-rule::after { content: ""; display: block; width: 64px; height: 3px; background: var(--jp-color-gold-500); margin-top: var(--jp-space-4); }
.section-title.center.with-rule::after { margin-left: auto; margin-right: auto; }
main .lead { font-size: var(--jp-text-2xl); line-height: var(--jp-leading-relaxed); }
.prose { max-width: var(--jp-width-prose-max); }
.prose h2 { font-size: var(--jp-text-xl); margin-top: var(--jp-space-8); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--jp-space-12); align-items: center; }
.split.split-1-2 { grid-template-columns: 1fr 2fr; }
.split.align-start { align-items: start; }
.split-media img { margin: 0 auto; }
/* The products artwork has a Bright Blue chevron that starts at the picture's left edge (rows 92-449 of 513).
   Carry the same blue on to the left edge of the screen, as the original site did. */
.chevron-left { position: relative; isolation: isolate; width: fit-content; max-width: 100%; justify-self: start; }
.chevron-left img { margin: 0; }
.chevron-left::before {
  content: ""; position: absolute; z-index: -1; right: calc(100% - 1px); width: 100vw;
  top: 17.934%; bottom: 12.43%; background: var(--jp-color-blue-500);
}
.split + .split { margin-top: var(--jp-space-20); }

/* Toolkit page title: Bright Blue over a full-width rule */
.page-title {
  font-size: var(--jp-text-5xl); color: var(--jp-color-blue-500); letter-spacing: var(--jp-tracking-brand);
  padding-bottom: var(--jp-space-3); border-bottom: 3px solid var(--jp-color-blue-500); margin-bottom: var(--jp-space-10);
}

/* Dark photo bands (tools / testimonials) */
.band { position: relative; padding: var(--jp-space-16) 0; color: var(--jp-color-white); background: var(--jp-color-navy-900) center / cover no-repeat; }
.band::before { content: ""; position: absolute; inset: 0; background: rgba(0, 23, 54, 0.72); }
.band > .container { position: relative; }
.band-tools { background-image: url("/assets/img/bg-lady-justice.jpg"); }
.band-testimonials { background-image: url("/assets/img/bg-courthouse.jpg"); padding: var(--jp-space-20) 0; }
.band .section-title { color: var(--jp-color-white); }
.band .lead { color: var(--jp-color-white); text-align: center; max-width: 52rem; margin: 0 auto var(--jp-space-8); }
.pill {
  display: inline-block; font-family: var(--jp-font-sans); font-size: var(--jp-text-sm); font-weight: var(--jp-font-weight-semibold);
  letter-spacing: var(--jp-tracking-widest); text-transform: uppercase; color: var(--jp-color-gold-300);
  border: 2px solid var(--jp-color-gold-500); border-radius: var(--jp-radius-full); padding: var(--jp-space-2) var(--jp-space-5);
}

/* Features grid (home) */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--jp-space-10); text-align: center; margin: var(--jp-space-4) 0 var(--jp-space-12); }
.feature img { height: 72px; width: auto; margin: 0 auto var(--jp-space-5); }
.feature h3 { font-size: var(--jp-text-lg); font-weight: var(--jp-font-weight-bold); margin: 0; }
.feature h3::before { content: ""; display: block; width: 40px; height: 3px; background: var(--jp-color-gold-500); margin: 0 auto var(--jp-space-4); }

/* Testimonials */
.testimonials { max-width: 880px; margin: 0 auto; text-align: center; }
.testimonial { display: none; margin: 0; }
.testimonial.is-active { display: block; animation: fade var(--jp-duration-slow) var(--jp-ease-out); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.testimonial blockquote { position: relative; margin: 0 0 var(--jp-space-6); padding: 0 var(--jp-space-8); font-size: var(--jp-text-xl); line-height: var(--jp-leading-relaxed); color: var(--jp-color-white); }
.testimonial blockquote::before, .testimonial blockquote::after {
  position: absolute; top: -0.35em; font-size: 4rem; line-height: 1; font-weight: var(--jp-font-weight-bold); color: var(--jp-color-gold-500);
}
.testimonial blockquote::before { content: "\201C"; left: -0.1em; }
.testimonial blockquote::after { content: "\201D"; right: -0.1em; top: auto; bottom: -0.6em; }
.testimonial figcaption { font-size: var(--jp-text-sm); font-weight: var(--jp-font-weight-semibold); letter-spacing: var(--jp-tracking-wide); text-transform: uppercase; color: var(--jp-color-gold-300); }
.dots { display: flex; justify-content: center; gap: var(--jp-space-3); margin-top: var(--jp-space-8); }
.dot { width: 12px; height: 12px; padding: 0; border: 0; border-radius: var(--jp-radius-full); background: rgba(255, 255, 255, 0.35); cursor: pointer; transition: background var(--jp-duration-fast); }
.dot:hover { background: rgba(255, 255, 255, 0.6); }
.dot.is-active { background: var(--jp-color-gold-500); }
.dot:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--jp-color-navy-900), 0 0 0 4px var(--jp-color-gold-300); }
/* no-JS fallback: show every quote */
.no-js .testimonial { display: block; margin-bottom: var(--jp-space-10); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--jp-space-16); align-items: start; }
/* The right padding clears the slant at its deepest point (the bottom), so the copy never crosses the edge. */
.contact-copy {
  --slant: 80px;
  position: relative; isolation: isolate;
  padding: var(--jp-space-10) calc(var(--slant) + var(--jp-space-8)) var(--jp-space-10) var(--jp-space-8);
}
/* Grey chevron: runs off the left edge of the screen, slanted on the right */
.contact-copy::before {
  content: ""; position: absolute; inset: 0; left: -100vw; z-index: -1;
  background: var(--jp-bg-muted);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}
.contact-phone a { font-family: var(--jp-font-sans); font-weight: var(--jp-font-weight-bold); color: var(--jp-text-heading); text-decoration: none; white-space: nowrap; }
.contact-phone a:hover { text-decoration: underline; }

/* Forms (brand input recipe) */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--jp-space-4); }
.field { margin-bottom: var(--jp-space-4); }
.jp-label { display: block; font-size: var(--jp-text-sm); font-weight: var(--jp-font-weight-medium); color: var(--jp-text-heading); margin-bottom: var(--jp-space-1-5); }
.jp-label .req { color: var(--jp-color-gold-700); }
.jp-input {
  width: 100%; font-family: var(--jp-font-sans); font-size: var(--jp-text-base); color: var(--jp-text-primary);
  background: var(--jp-bg-surface); border: 1px solid var(--jp-border-default); border-radius: var(--jp-radius-sm);
  padding: var(--jp-space-2-5) var(--jp-space-3);
  transition: border-color var(--jp-duration-fast), box-shadow var(--jp-duration-fast);
}
.jp-input::placeholder { color: var(--jp-text-muted); }
.jp-input:focus { outline: none; border-color: var(--jp-border-brand); box-shadow: 0 0 0 3px rgba(0, 23, 54, 0.1); }
.was-validated .jp-input:invalid { border-color: var(--jp-status-error-border); }
textarea.jp-input { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-bottom: var(--jp-space-4); }
.form-status { margin: var(--jp-space-4) 0 0; font-family: var(--jp-font-sans); font-size: var(--jp-text-sm); min-height: 1.5em; }
.form-status.is-success { color: var(--jp-status-success-text); }
.form-status.is-error { color: var(--jp-status-error-text); }

/* --------------------------------------------------------------------------
   Inner pages
   -------------------------------------------------------------------------- */
.page-banner { position: relative; height: 320px; background: var(--jp-color-navy-800) center / cover no-repeat; }
.page-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 23, 54, 0.1), rgba(0, 23, 54, 0.45)); }
.page-banner-about { background-image: url("/assets/img/banner-about.jpg"); }
.page-banner-products { background-image: url("/assets/img/banner-products.jpg"); }
.page-banner-features { background-image: url("/assets/img/banner-features.jpg"); background-position: center 40%; }
.page-banner-contact { background-image: url("/assets/img/banner-contact.jpg"); }

.callout-dark {
  background: var(--jp-color-navy-800); color: var(--jp-color-white);
  border-left: 4px solid var(--jp-color-gold-500); border-radius: var(--jp-radius-md);
  padding: var(--jp-space-8); box-shadow: var(--jp-shadow-lg);
}
.callout-dark h2 { color: var(--jp-color-gold-500); font-size: var(--jp-text-base); font-weight: var(--jp-font-weight-bold); line-height: var(--jp-leading-normal); }
.callout-dark ul { margin: 0; padding-left: 1.25rem; }
.callout-dark li { margin-bottom: var(--jp-space-3); line-height: var(--jp-leading-normal); }
.callout-dark li::marker { color: var(--jp-color-gold-500); }

/* Tabs */
.tabs, section[id] { scroll-margin-top: 104px; }
/* The baseline is an inset shadow, not a border with the tabs pulled 1px over it: that 1px overhang counts as
   vertical overflow, and with overflow-x set the strip then shows a vertical scrollbar on Windows. */
.tabs { display: flex; gap: var(--jp-space-2); box-shadow: inset 0 -1px 0 var(--jp-border-default); margin-bottom: var(--jp-space-10); overflow-x: auto; }
.tab {
  display: inline-flex; align-items: center; gap: var(--jp-space-2); white-space: nowrap;
  padding: var(--jp-space-3) var(--jp-space-5); background: none; border: 0; border-bottom: 3px solid transparent;
  font-family: var(--jp-font-sans); font-size: var(--jp-text-sm); font-weight: var(--jp-font-weight-semibold);
  letter-spacing: var(--jp-tracking-nav); text-transform: uppercase; color: var(--jp-text-secondary); cursor: pointer;
  transition: color var(--jp-duration-fast), border-color var(--jp-duration-fast);
}
.tab svg { width: 20px; height: 20px; }
.tab:hover { color: var(--jp-text-heading); }
.tab[aria-selected="true"] { color: var(--jp-text-heading); border-bottom-color: var(--jp-color-gold-500); }
.tab:focus-visible { outline: none; box-shadow: var(--jp-focus-ring-inset); border-radius: var(--jp-radius-sm); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.no-js .tab-panel { display: block; margin-bottom: var(--jp-space-16); }
.tab-panel h2 { font-size: var(--jp-text-2xl); }
/* Mobile App: four phone screens in a row under the copy */
.app-screens {
  display: grid; grid-template-columns: repeat(4, minmax(0, 220px)); justify-content: space-between;
  gap: var(--jp-space-8); margin-top: var(--jp-space-12);
}

/* Download band */
.download { background: var(--jp-bg-brand-subtle); border-top: 1px solid var(--jp-border-subtle); padding: var(--jp-space-12) 0; }
.download .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--jp-space-8); }
.download h2 { display: flex; align-items: center; gap: var(--jp-space-4); margin: 0; font-size: var(--jp-text-3xl); }
.download h2 svg { width: 44px; height: 44px; color: var(--jp-color-blue-500); flex-shrink: 0; }
.download .store-badges { margin: 0; }
.download .store-badges img { height: 48px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--jp-color-navy-900); color: var(--jp-color-navy-200); padding: var(--jp-space-8) 0; border-top: 3px solid var(--jp-color-gold-500); }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--jp-space-6); }
.footer-brand img { height: 22px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--jp-space-6); }
.footer-links a { font-size: var(--jp-text-xs); font-weight: var(--jp-font-weight-medium); letter-spacing: var(--jp-tracking-nav); text-transform: uppercase; color: var(--jp-color-navy-200); text-decoration: none; }
.footer-links a:hover { color: var(--jp-color-white); }
.footer-copy { margin: 0; font-size: var(--jp-text-sm); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .hero { background-image: none; }
  .hero::before { width: 100%; clip-path: none; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy { max-width: 620px; padding: var(--jp-space-16) 0 calc(var(--jp-space-16) + 48px); }
  .split, .split.split-1-2, .contact-grid { grid-template-columns: 1fr; gap: var(--jp-space-10); }
  .split-media img { max-width: min(100%, 480px); }
  .chevron-left { max-width: min(100%, 480px); }
  .chevron-left img { max-width: 100%; }
  .contact-copy { padding: var(--jp-space-8); }
  .contact-copy::before { left: 0; clip-path: none; border-radius: var(--jp-radius-md); }
  .intro-card { padding: var(--jp-space-8); }
}
@media (max-width: 899px) {
  .site-header .container { height: 72px; }
  .brand img { height: 52px; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--jp-bg-surface); border-bottom: 3px solid var(--jp-color-gold-500); box-shadow: var(--jp-shadow-lg);
    padding: var(--jp-space-2) var(--jp-space-6) var(--jp-space-4);
  }
  .site-nav.is-open { display: flex; }
  .nav-link { padding: var(--jp-space-3) 0; border-bottom: 1px solid var(--jp-border-subtle); }
  .page-about .nav-link[data-nav="about"], .page-products .nav-link[data-nav="products"],
  .page-features .nav-link[data-nav="features"], .page-contact .nav-link[data-nav="contact"] { border-bottom-color: var(--jp-border-subtle); color: var(--jp-color-gold-700); }
  .nav-login { margin: var(--jp-space-4) 0 0; align-self: flex-start; }
  .section { padding: var(--jp-space-16) 0; }
  .section-title { font-size: var(--jp-text-3xl); }
  .page-title { font-size: var(--jp-text-4xl); }
  .page-banner { height: 220px; }
  .features-grid { grid-template-columns: 1fr; gap: var(--jp-space-8); }
  .download h2 { font-size: var(--jp-text-2xl); }
}
@media (max-width: 599px) {
  .container { padding: 0 var(--jp-space-5); }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .app-screens { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: space-evenly; }
  .testimonial blockquote { padding: 0 var(--jp-space-4); }
  .testimonial blockquote::before, .testimonial blockquote::after { display: none; }
  .intro { margin-top: -64px; }
  .intro-card { padding: var(--jp-space-6); }
  .btn-row .btn { width: 100%; }
}
