/* Self-hosted fonts (latin subset only, woff2). Served from /fonts/ with a one-year cache. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/source-serif-4-latin-700-normal.woff2) format("woff2"); }

/* Prison Law Assist: design system
   Palette: navy (trust/authority) + gold (call to action), generous
   whitespace, no stock photography. The layout carries the credibility. */

:root {
  --navy-900: #0b2545;
  --navy-800: #123361;
  --navy-100: #e7ecf3;
  --gold-500: #d4af37;
  --gold-600: #b8942a;
  --gold-700: #8a6f1f; /* darker, accessible gold: use for gold TEXT on light backgrounds (gold-500/600 fail WCAG AA at small sizes) */
  --ink: #1b2430;
  --ink-soft: #4a5568;
  --paper: #ffffff;
  --paper-soft: #f6f7fa;
  --border: #e2e5ea;
  --success-bg: #eef7ef;
  --success-border: #bfe3c3;
  --radius: 10px;
  --max-width: 1160px;
  --shadow-sm: 0 1px 3px rgba(11, 37, 69, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 37, 69, 0.10);
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  color: var(--navy-900);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--navy-800); }
a:hover { color: var(--gold-700); }

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

section { padding: 3.5rem 0; }
section.tight { padding: 2rem 0; }
.bg-soft { background: var(--paper-soft); }
.bg-navy { background: var(--navy-900); color: #fff; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy p { color: #cfd8e6; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: 0.6rem;
}
.bg-navy .eyebrow { color: var(--gold-500); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold-500); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-600); color: var(--navy-900); }
.btn-secondary { background: transparent; border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-secondary:hover { border-color: #fff; color: #fff; }
.btn-outline { background: transparent; border-color: var(--navy-900); color: var(--navy-900); }
.btn-outline:hover { background: var(--navy-900); color: #fff; }
.btn-block { width: 100%; justify-content: center; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 1rem;
}
.site-logo { height: 52px; width: 52px; flex: none; border-radius: 8px; display: block; }
.header-brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.site-wordmark {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--navy-900);
}
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.header-phone {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-decoration: none;
  color: var(--navy-900);
  font-weight: 700;
}
.header-phone small { font-weight: 600; color: var(--ink-soft); font-size: 0.72rem; }

.main-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem 0.9rem;
  max-width: var(--max-width);
  margin: 0 auto;
  overflow-x: auto;
}
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
  white-space: nowrap;
}
.main-nav a[aria-current="page"] { color: var(--navy-900); font-weight: 700; border-bottom: 2px solid var(--gold-500); }

/* Below 640px the sticky mobile call/WhatsApp/enquire bar (see .sticky-cta)
   already covers these two actions, so the header call button + WhatsApp
   button are hidden here rather than wrapping onto three cramped lines
   next to the logo. */
@media (max-width: 640px) {
  .header-actions { display: none; }
  .header-inner { padding: 0.7rem 1.25rem; }
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--navy-900);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle[aria-expanded="true"] { background: var(--navy-100); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }

  .main-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    padding: 0.25rem 1.25rem 0.75rem;
    background: #fff;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
    white-space: normal;
  }
  .main-nav a:last-child { border-bottom: none; }
}

/* Reassurance strip under header */
.trust-strip {
  background: var(--navy-900);
  color: #dfe6f0;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.45rem 1rem;
}

/* Hero */
.hero {
  padding: 3.5rem 0 3rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-lede { font-size: 1.15rem; }
.hero-fee-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 0.9rem;
  background: var(--navy-100);
  border-radius: 999px;
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.95rem;
}
.hero-fee-line svg { width: 18px; height: 18px; flex: none; color: var(--gold-700); }
.hero-reassure {
  margin-top: 1.4rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.hero-panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-md);
}
.hero-panel h3, .hero-panel-heading { margin-bottom: 0.75rem; font-size: 1.25rem; font-weight: 700; color: var(--navy-900); }
.hero-panel .btn { margin-bottom: 0.6rem; }
.hero-panel-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.9rem; margin-bottom: 0; }

/* Photo + text split (About page) */
.photo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 860px) {
  .photo-split { grid-template-columns: 1fr; }
}
.photo-split-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: block;
}
.photo-split-text h2 { margin-bottom: 0.7rem; }

/* Cards / grids */
.grid {
  display: grid;
  gap: 1.4rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card h2, .card h3 { margin-bottom: 0.5rem; font-size: 1.1rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--navy-100);
  color: var(--navy-900);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.9rem;
}
.card-icon svg { width: 20px; height: 20px; }

.service-list { list-style: none; margin: 0; padding: 0; }
.service-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
}
.service-list li:last-child { border-bottom: none; }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 3.2rem; margin-bottom: 1.6rem; }
.step:last-child { margin-bottom: 0; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-500);
  font-family: "Source Serif 4", serif;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Case examples */
.case {
  border-left: 4px solid var(--gold-500);
  background: var(--paper-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.4rem;
}
.case:last-child { margin-bottom: 0; }
.case dt { font-weight: 700; color: var(--navy-900); margin-top: 0.7rem; }
.case dt:first-child { margin-top: 0; }
.case dd { margin: 0.15rem 0 0; color: var(--ink-soft); }

/* Pricing table */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 860px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  background: var(--paper);
}
.price-card.featured { border-color: var(--gold-500); box-shadow: var(--shadow-md); }
.price-tag { font-family: "Source Serif 4", serif; font-size: 1.6rem; color: var(--navy-900); margin: 0.2rem 0 1rem; }
.price-tag span { font-size: 0.9rem; color: var(--ink-soft); font-family: "Inter", sans-serif; }
.price-card ul { padding-left: 1.1rem; color: var(--ink-soft); margin: 0; }
.price-card li { margin-bottom: 0.4rem; }

/* Forms */
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.92rem; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: 0.85rem; color: var(--ink-soft); }
.honeypot-field { position: absolute; left: -9999px; }

.confirm-box {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
}

/* CTA banner */
.cta-banner {
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.2rem;
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255, 255, 255, 0.85); }
.cta-banner .btn-row { justify-content: center; }

/* Blog */
.post-card { display: block; text-decoration: none; }
.post-card time { font-size: 0.82rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.post-card h2, .post-card h3 { margin: 0.4rem 0 0.5rem; font-size: 1.1rem; }

/* Card-style headings promoted to h2 for correct document outline (no h2 above
   them on these pages) keep the same visual size as the h3 they replaced. */
.price-card h2, .case h2 { font-size: 1.25rem; }
.post-body h2 { margin-top: 2rem; }
.post-body h3 { margin-top: 1.5rem; }
.post-meta { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 2rem; }
.disclaimer {
  margin-top: 2.5rem;
  padding: 1.1rem 1.3rem;
  background: var(--paper-soft);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Footer */
.site-footer {
  background: var(--navy-900);
  color: #cfd8e6;
  padding: 3rem 0 6.5rem;
}
@media (min-width: 641px) {
  .site-footer { padding-bottom: 3rem; }
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .footer-heading { color: #fff; font-size: 0.95rem; margin-bottom: 0.8rem; font-weight: 700; }
.site-footer p { color: inherit; }
.site-footer a { color: #cfd8e6; }
.site-footer a:hover { color: var(--gold-500); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding: 1.2rem 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Mobile sticky call bar (the highest-intent lead surface on the site) */
.sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: none;
  z-index: 50;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 14px rgba(11, 37, 69, 0.12);
}
@media (max-width: 640px) {
  .sticky-cta { display: grid; grid-template-columns: 1fr 1fr 1fr; }
}
.sticky-cta a {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  padding: 0.6rem 0.2rem 0.75rem;
  text-decoration: none;
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 700;
  border-right: 1px solid var(--border);
}
.sticky-cta a:last-child { border-right: none; }
.sticky-cta svg { width: 20px; height: 20px; }
.sticky-cta a.call { color: var(--gold-700); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--paper);
  border-top: 3px solid var(--gold-500);
  box-shadow: 0 -8px 24px rgba(11, 37, 69, 0.14);
  padding: 1.1rem 1.25rem;
}
@media (max-width: 640px) {
  /* sit above the sticky call/WhatsApp bar on phones */
  .cookie-banner { bottom: 60px; }
}
.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 800px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 0.9rem; }
}
.cookie-banner-title { font-weight: 700; color: var(--navy-900); margin: 0 0 0.3rem; }
.cookie-banner-copy p { margin: 0; font-size: 0.92rem; }
.cookie-banner-copy p + p { margin-top: 0.3rem; }
.cookie-banner-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
@media (max-width: 800px) {
  .cookie-banner-actions .btn { flex: 1; justify-content: center; }
}
