:root {
  --bg: #ffffff;
  --surface: #f3f5f7;
  --mist: #ced9de;
  --ink: #2d2d2d;
  --muted: #555555;
  --nav-ink: #333333;
  --navy: #1c3a4a;
  --accent: #e54747;
  --accent-ink: #ffffff;
  --line: #e6ebef;
  --nav-width: 300px;
  --content-pad-x: 100px;
  --content-pad-y: 80px;
  --shadow-nav: 0 0 30px rgba(0, 0, 0, 0.2);
  --display: "Figtree", "Segoe UI", sans-serif;
  --body: "Figtree", "Segoe UI", sans-serif;
  --radius: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Mobile top bar */
.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mobile-bar img {
  height: 36px;
  width: auto;
}

.menu-toggle {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.nav-backdrop {
  display: none;
}

/* Sidebar */
.nav {
  width: var(--nav-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  background: #fff;
  box-shadow: var(--shadow-nav);
  overflow: auto;
  padding: 80px 0 40px;
}

.nav-logo {
  max-width: 100%;
  padding: 0 30px 30px;
}

.nav-menuitem a {
  text-decoration: none;
  color: var(--nav-ink);
  padding: 8px 10px 8px 30px;
  display: block;
  width: 100%;
  font-size: 14px;
  font-weight: 400;
  transition: background-color 0.2s ease, font-weight 0.2s ease;
}

.nav-menuitem.is-active,
.nav-menuitem:hover {
  background: rgba(222, 222, 222, 0.38);
}

.nav-menuitem.is-active a {
  font-weight: 700;
}

/* Main column */
.main {
  margin-left: var(--nav-width);
  min-width: 0;
}

.page-section {
  scroll-margin-top: 0;
}

.fw-image {
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.block {
  color: var(--ink);
}

.block--mist {
  background: var(--mist);
}

.block--white {
  background: #fff;
}

.block--surface {
  background: var(--surface);
}

.block--navy {
  background: var(--navy);
  color: #fff;
}

.block--accent {
  background: var(--accent);
  color: #fff;
}

.container {
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: var(--content-pad-y) var(--content-pad-x);
}

.container--narrow {
  width: min(100%, 900px);
}

.container--wide {
  width: min(100%, 1100px);
}

h1,
.h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 1rem;
}

h2,
.h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1rem;
}

h3,
.h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.05rem;
}

.center {
  text-align: center;
}

.muted-on-navy {
  opacity: 0.92;
}

.quote {
  font-size: 1.35rem;
  font-weight: 500;
  font-style: italic;
  margin: 0 0 1rem;
}

.quote-attr {
  font-weight: 400;
  margin: 0;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 3rem;
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
}

.services-grid li {
  margin: 0.35rem 0;
}

.services-grid h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.case {
  display: grid;
  gap: 1.5rem;
}

.case-header {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: center;
}

.case-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
}

.case-meta h2 {
  margin-bottom: 0.25rem;
}

.case-body h3 {
  margin-top: 1.25rem;
}

/* Pricing table */
.pt {
  background: #fff;
  border: 1px solid #d9e0e5;
  overflow: hidden;
}

.pt-header {
  background: var(--navy);
  color: #fff;
  padding: 0.9rem 1.1rem;
  font-weight: 600;
}

.pt-lineitem {
  padding: 1.1rem;
  border-top: 1px solid #e8edf0;
}

.pt-lineitem:first-of-type {
  border-top: 0;
}

.pt-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 1rem;
  align-items: end;
}

.pricing-name {
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.35rem;
}

.pricing-description {
  color: var(--muted);
  font-size: 0.95rem;
}

.pt-price {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.pt-totals {
  background: #fafbfc;
}

.pt-totals .pt-row {
  grid-template-columns: 1fr auto auto;
  justify-content: end;
  gap: 1.5rem;
  padding: 0.35rem 0;
}

.pt-totals .label {
  text-align: right;
  color: var(--muted);
}

.pt-totals .value {
  min-width: 5rem;
  text-align: right;
  font-weight: 700;
}

.steps {
  display: grid;
  gap: 1.25rem;
}

.step h3 {
  margin-bottom: 0.35rem;
}

/* Signature */
.signature {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.signature-statement {
  margin-bottom: 1rem;
  line-height: 1.55;
}

.sig-tabs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--line);
}

.sig-tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.sig-tabs button[aria-selected="true"] {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.sig-panel[hidden] {
  display: none;
}

.signature-instructions {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.signature-textbox {
  width: 100%;
  max-width: 420px;
  border: 0;
  border-bottom: 2px solid var(--navy);
  font: inherit;
  font-size: 1.35rem;
  padding: 0.4rem 0.2rem;
  margin-bottom: 1rem;
  background: transparent;
}

.signature-canvas-wrap {
  border: 1px dashed #b7c3cb;
  background: #fafcfd;
  margin-bottom: 0.75rem;
  max-width: 480px;
}

#signature-canvas {
  width: 100%;
  height: 160px;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.sig-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.button {
  appearance: none;
  border: 0;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button--ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.sig-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

.terms {
  font-size: 0.95rem;
}

.terms h3 {
  margin-top: 1.5rem;
}

.terms p,
.terms li {
  margin-bottom: 0.75rem;
}

.terms-note {
  font-style: italic;
  margin-bottom: 1.25rem;
}

@media (max-width: 980px) {
  :root {
    --content-pad-x: 1.5rem;
    --content-pad-y: 3rem;
  }

  .mobile-bar {
    display: flex;
  }

  .nav {
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    padding-top: 24px;
  }

  body.nav-open .nav {
    transform: translateX(0);
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 32, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    z-index: 998;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    margin-left: 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .case-header {
    grid-template-columns: 1fr;
  }

  .case-photo {
    width: 140px;
    height: 140px;
  }

  .pt-row {
    grid-template-columns: 1fr;
  }

  .pt-price,
  .pt-totals .pt-row,
  .pt-totals .label,
  .pt-totals .value {
    text-align: left;
  }

  .pt-totals .pt-row {
    grid-template-columns: 1fr auto;
  }
}
