/* ==========================================================================
   ITLawyers — layout: header, nav, hero, sections, footer, page shells
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 860px;
}

.container--wide {
  max-width: 1320px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-topbar {
  position: relative;
  z-index: 41;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px var(--sp-5);
  padding: 9px 0;
}

.topbar__identity {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.topbar__contact {
  margin: 0;
  font-style: normal;
  line-height: 1.5;
  color: var(--muted);
}

.topbar__contact a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}

.topbar__contact a:hover {
  color: var(--ink);
  text-decoration-color: var(--brass);
}

.topbar__sep {
  padding: 0 7px;
  color: var(--line-strong);
}

@media (max-width: 760px) {
  .topbar__inner {
    display: block;
  }

  .topbar__contact {
    margin-top: 3px;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand img {
  height: 32px;
  width: auto;
  mix-blend-mode: multiply;
}

.brand:hover {
  text-decoration: none;
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li {
  margin: 0;
}

.nav a {
  display: inline-block;
  padding: 8px 0;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--brass-soft);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--brass);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
  background: var(--paper-3);
}

@media (max-width: 1020px) {
  .nav {
    display: none;
    position: fixed;
    inset: 76px 0 0;
    z-index: 39;
    background: var(--paper);
    padding: var(--sp-6) var(--gutter) var(--sp-8);
    overflow-y: auto;
    border-top: 1px solid var(--line);
  }

  .nav.is-open {
    display: block;
  }

  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav li {
    border-bottom: 1px solid var(--line);
  }

  .nav a {
    display: block;
    padding: var(--sp-4) 0;
    font-size: var(--fs-lg);
    border-bottom: 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .header__cta {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 6vw, 76px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: var(--fs-hero);
  line-height: 1.04;
  max-width: 14ch;
  margin-bottom: var(--sp-5);
}

.hero .lead {
  max-width: 30em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin: var(--sp-6) 0 0;
  padding: var(--sp-4) 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.hero__facts li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__facts li::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--brass);
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.hero__media {
  position: relative;
  isolation: isolate;
  background: var(--paper);
}

.hero__media img {
  width: 100%;
  mix-blend-mode: multiply;
}

.hero__media figcaption {
  position: absolute;
  bottom: -26px;
  right: 0;
  font-size: 11px;
  color: var(--muted);
}

.hero__motif {
  position: absolute;
  z-index: 0;
  right: -80px;
  top: -60px;
  width: min(620px, 55vw);
  height: auto;
  opacity: 0.35;
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-7);
  }

  .hero h1 {
    max-width: 18ch;
  }

  .hero__media {
    max-width: 480px;
  }

  .hero__motif {
    width: 420px;
    right: -140px;
    top: -40px;
  }
}

@media (max-width: 560px) {
  .hero__media {
    margin-top: var(--sp-2);
  }

  .hero__media figcaption {
    position: static;
    margin-top: var(--sp-3);
  }
}

/* --------------------------------------------------------------------------
   Sections and grids
   -------------------------------------------------------------------------- */

.section {
  padding: var(--section-y) 0;
}

.section--tight {
  padding: clamp(36px, 5vw, 64px) 0;
}

.section--tint {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section--ink {
  background: var(--ink);
  color: var(--paper);
}

.section--ink h2,
.section--ink h3 {
  color: var(--paper);
}

.section--ink .lead,
.section--ink p {
  color: #ded5c6;
}

.section--ink .eyebrow {
  color: #bdb2a2;
}

.section--flush {
  padding-bottom: 0;
}

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: var(--sp-5) var(--sp-7);
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section__head h2 {
  max-width: 22ch;
  margin-bottom: 0;
}

.section__head p {
  max-width: 38ch;
  color: var(--muted);
  margin-bottom: 4px;
}

@media (max-width: 760px) {
  .section__head {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.split--reverse {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.split--center {
  align-items: center;
}

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split,
  .split--reverse {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Page head and breadcrumbs
   -------------------------------------------------------------------------- */

.page-head {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5vw, 56px) 0 clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  max-width: 22ch;
  margin-bottom: var(--sp-4);
}

.page-head .lead {
  max-width: 46em;
}

.page-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.breadcrumbs {
  margin-bottom: var(--sp-5);
  font-size: var(--fs-xs);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--line-strong);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  border-top: 1px solid var(--line-strong);
}

.footer__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: var(--sp-7) var(--sp-6);
  padding: clamp(48px, 7vw, 72px) 0 var(--sp-7);
}

.footer__brand img {
  height: 28px;
  width: auto;
  margin-bottom: var(--sp-4);
  mix-blend-mode: multiply;
}

.footer__brand p {
  max-width: 34ch;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}

.footer__title {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links li {
  margin-bottom: 10px;
}

.footer__links a {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--brass);
}

.footer__contact {
  font-size: var(--fs-sm);
  font-style: normal;
  color: var(--ink-soft);
  line-height: 1.7;
}

.footer__contact a {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}

.footer__contact a:hover {
  text-decoration-color: var(--brass);
}

.footer__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-5);
  padding: var(--sp-4) 0 var(--sp-5);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.footer__bottom p {
  margin: 0;
}

.footer__motif {
  position: absolute;
  right: -100px;
  bottom: -180px;
  width: 480px;
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
}

/* --------------------------------------------------------------------------
   Answer-first block
   -------------------------------------------------------------------------- */

.answer {
  max-width: 62ch;
  margin: 0 0 clamp(32px, 5vw, 48px);
  padding: 2px 0 2px var(--sp-5);
  border-left: 2px solid var(--brass);
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--ink-soft);
}

.answer p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Wizard shell and admin shell
   -------------------------------------------------------------------------- */

.wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
  padding: clamp(28px, 4vw, 48px) 0 clamp(80px, 10vw, 120px);
}

.wizard-aside {
  position: sticky;
  top: 100px;
}

@media (max-width: 980px) {
  .wizard-layout {
    grid-template-columns: 1fr;
    padding-bottom: 96px;
  }

  .wizard-aside {
    position: static;
    order: 2;
  }
}

.admin-body {
  background: var(--paper);
}

.admin-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.admin-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 68px;
}

.admin-header__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
}

.admin-main {
  padding: var(--sp-6) 0 var(--sp-9);
}

.admin-titlebar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.admin-titlebar h1 {
  font-size: var(--fs-2xl);
  margin: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: var(--sp-5);
  align-items: start;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

/* Sticky mobile total bar is only shown when JS marks the wizard as enhanced */
.mobile-bar {
  display: none;
}

@media (max-width: 980px) {
  .wizard--enhanced .mobile-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--line-strong);
    box-shadow: 0 -8px 24px rgba(36, 31, 26, 0.06);
  }

  .wizard--enhanced.has-mobile-bar {
    padding-bottom: 120px;
  }
}
