:root {
  --ink: #25201a;
  --body: #64594a;
  --dark: #4c4238;
  --cream: #f9f2e5;
  --gold: #cd963d;
  --muted: #d5ccc4;
  --border: #baac9d;
  --gold-bar: linear-gradient(#deb573, #cd973f);
  --nav-bg: linear-gradient(#64594a, #26211b);
  /* 45deg pinstripes over the gradient, matching selectedNavBG.jpg: the tile
     repeats every 8.11px horizontally, i.e. 5.73px perpendicular. Line width
     and alpha were fitted to the original tile's luminance distribution. */
  --nav-on:
    repeating-linear-gradient(135deg, rgb(0 0 0 / .09) 0 .9px, rgb(0 0 0 / 0) .9px 5.73px),
    linear-gradient(#d3cac3, #b8c4c2);
  --veil: rgba(242, 228, 219, .702);
  --shadow: 0 0 6px rgb(0 0 0 / .55);
  --hairline: 1px solid var(--border);
  --font: Tahoma, "Segoe UI", Arial, sans-serif;
  --wrap: 960px;
  --gap: 10px;
  --side: 245px;
  --card: 215px;
  --hero-h: 295px;
}

/* base */

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.25; }
ul, ol { padding-inline-start: 1.5em; }
img, svg, iframe { max-width: 100%; border: 0; }
img, svg { height: auto; vertical-align: middle; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--ink); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:where(a, button, input, summary, [tabindex]):focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

body {
  min-height: 100vh;
  background: #cdc3b8;
  color: var(--body);
  font: 16px/1.55 var(--font);
  text-align: start;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-image, none) center/cover no-repeat;
}

/* lists that are structure, not prose */

.main-nav__list, .main-nav__list ul, .carousel__track, .carousel__dots,
.footer-menu, .practice__list, .widget > :is(ul, ol) {
  padding: 0;
  list-style: none;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-block-start: -100vh;
  inset-inline-start: 1rem;
  z-index: 1000;
  padding: .7em 1.4em;
  background: var(--cream);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow);
}

.skip-link:focus { inset-block-start: 1rem; text-decoration: none; }

/* header */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }
.site-header { background: var(--veil); }

.site-header__inner {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  align-content: start;
  column-gap: clamp(.5rem, 3.6vw, 35px);
  min-height: 200px;
  padding-block-start: 100px;
  padding-inline: 20px;
  background: url("../images/header-skyline.png") right 7px bottom -2px no-repeat;
}

.site-title, .site-tagline, .site-phone { color: var(--ink); }
.site-title { grid-column: 1; font-size: clamp(1.75rem, 6vw, 2.9375rem); line-height: normal; white-space: nowrap; }
.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; }
.site-tagline { grid-column: 2; font-size: clamp(.875rem, 2.6vw, 1.6875rem); line-height: normal; }
.site-phone { grid-column: 3; align-self: start; justify-self: end; margin-block-start: 70px; white-space: nowrap; }
.site-phone a { color: inherit; font-weight: 600; }

/* navigation */

.nav-bar { background: var(--nav-bg); }
.nav-bar > .wrap { padding-inline: 0; }
.main-nav { min-height: 45px; border: var(--hairline); border-block-end: 0; box-shadow: var(--shadow); }
.main-nav__list { display: flex; flex-wrap: wrap; align-items: center; min-height: 43px; }
.main-nav__list li { position: relative; }
.main-nav__list > li + li::before { content: "|"; color: var(--muted); opacity: .65; }
.main-nav__list > li:first-child > a { margin-inline-start: 17px; }

.main-nav__list a {
  display: inline-block;
  margin: 6px 5px;
  padding: 4px 15px;
  color: var(--muted);
  font-size: clamp(.9375rem, 1.8vw, 1.125rem);
  line-height: normal; /* not the body's 1.55, or the tab grows 6px */
}

.main-nav__list a:is(:hover, :focus-visible),
.main-nav__list :is(.current-menu-item, .current-menu-ancestor, .current_page_item, .current-menu-parent) > a {
  background: var(--nav-on);
  color: #000;
  text-decoration: none;
  border-start-end-radius: 5px;
  border-end-start-radius: 5px;
}

.main-nav__list ul {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 0;
  z-index: 50;
  display: none;
  min-width: 200px;
  background: var(--dark);
  border: var(--hairline);
}

.main-nav__list li:is(:hover, :focus-within) > ul { display: block; }
.main-nav__list ul li::before { content: none; }
.main-nav__list ul a { display: block; margin: 0; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .55em;
  width: 100%;
  min-height: 43px;
  padding: .5em 1em;
  color: var(--muted);
  font-size: 1.0625rem;
}

.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentcolor;
}

.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; transition: .3s; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { bottom: -7px; }
[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
[aria-expanded="true"] .nav-toggle__bars::after { bottom: 0; transform: rotate(-45deg); }

/* layout */

.site-content {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--gap);
  background: #fff;
  border: var(--hairline);
  border-block-start: 0;
  box-shadow: var(--shadow);
}

.site-main { padding-block-end: var(--gap); }

.layout {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.layout__main { grid-column: 2; min-width: 0; }
.layout__sidebar { grid-column: 1; grid-row: 1; }
.layout--full { grid-template-columns: minmax(0, 1fr); }
.layout--full .layout__main { grid-column: 1; }

/* surfaces */

.content-box { margin-block-end: var(--gap); padding: var(--gap); background: var(--cream); font-size: .875rem; }
.content-box:last-child { margin-block-end: 0; }
.content-box > * + * { margin-block-start: 1em; }
.content-box :is(h1, h2) { font-size: clamp(1.25rem, 3.4vw, 1.5625rem); }
.content-box :is(ul, ol) { padding-inline-start: 1.75em; }
.content-box li + li { margin-block-start: .35em; }
.content-box p:empty { display: none; }
.content-box--center { text-align: center; }

.panel, .widget, .content-box--dark { background: var(--dark); color: var(--cream); }
.panel, .widget { display: flex; flex-direction: column; }
.panel { padding-block-end: 15px; }
.panel--light { background: var(--cream); color: var(--body); }
.content-box--dark :is(h1, h2, h3, a) { color: var(--cream); }

/* the gold bar: widget titles, panel titles, section titles, practice items */

.bar, .practice__list li {
  background: var(--gold-bar);
  color: var(--cream);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  font-weight: 400;
  line-height: 39px;
  text-align: center;
}

.bar { margin: 15px 10px 0; }
.bar a { color: inherit; }
.content-box > .bar { width: 95%; margin: 5px auto var(--gap); }

/*
 * Bars on a panel overhang it by 5px, and the topic/section bars are half
 * width and anchored to the start edge so they read as bookmarks sticking out
 * of the right side — both measured off the original.
 */
.panel > .bar { margin-inline: -5px; }

.practice__list li,
.contact .bar {
  align-self: flex-start;
  width: 50%;
  margin-inline: -5px 0;
}

.golden, a.golden { color: var(--gold); font-weight: 400; }
strong.golden, .contact-strip__line { font-size: 1.1875rem; }

/* sidebar */

.sidebar { display: flex; flex-direction: column; gap: var(--gap); }
.widget__body, .widget > :is(ul, ol) { padding: var(--gap); }
.widget > :is(p, .textwidget) { padding: 0 var(--gap) var(--gap); }
/* The ul/ol here must stay a direct child: as a descendant it also matches
   .carousel__track and turns the lawyer's name cream-on-white. */
.widget :is(.bar, .widget__body, p) a,
.widget > :is(ul, ol) a { color: var(--cream); }

.widget > :is(ul, ol) li + li {
  margin-block-start: .5em;
  padding-block-start: .5em;
  border-block-start: 1px solid rgb(249 242 229 / .18);
}

/* 240 wide in a 245 panel, inset 10 from the start edge and overhanging the
   end edge by 5 — the bookmark sits out on the left, as in the original. */
.widget .bar { margin-inline: 10px -5px; }

/* +10px because box-sizing is border-box here: the white separator border
   would otherwise eat into the height and leave the dark panel 10px shorter
   than the hero beside it. The original had no box-sizing reset. */
/* No white border: the sidebar's own 10px gap separates this from the widget
   below, matching the hero's 10px gap so the four panels meet in a cross. */
.widget--keywords .carousel { height: var(--hero-h); }
.widget--lawyers .carousel { width: var(--card); margin: 15px auto; padding-block-end: 26px; background: #fff; }
.widget--lawyers .lawyer-card { padding-block-end: 0; }
.widget--lawyers .carousel__dots { inset-block-end: 6px; }
.widget--lawyers .carousel__arrow { inset-block-start: 228px; }

.keyword {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 1rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  text-align: center;
}

/* carousel */

.carousel { position: relative; overflow: hidden; touch-action: pan-y; }
.carousel__track { display: flex; height: 100%; }
.carousel__slide { position: relative; flex: 0 0 100%; min-width: 0; }
.carousel.is-animating .carousel__track { transition: transform .45s cubic-bezier(.4, 0, .2, 1); }
.carousel.is-dragging { cursor: grabbing; }
.carousel.is-dragging .carousel__track { transition: none; }
.carousel--fade .carousel__track { display: block; transform: none !important; }
.carousel--fade .carousel__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; }
.carousel--fade .carousel__slide.is-active { position: relative; opacity: 1; }

.carousel__arrow {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--dark);
  background: none;
  opacity: 0;
  transition: opacity .4s;
}

.carousel__arrow svg {
  width: 12px;
  height: 14px;
  fill: currentcolor;
  filter: drop-shadow(0 0 2px rgb(255 255 255 / .9));
}
.carousel__arrow--prev { inset-inline-start: 8px; }
.carousel__arrow--next { inset-inline-end: 8px; }

/* Each arrow points the way it travels: prev toward the inline-start edge,
   next toward the inline-end. The glyph is drawn pointing right. */
.carousel__arrow--prev svg { transform: scaleX(-1); }
[dir="rtl"] .carousel__arrow--prev svg { transform: none; }
[dir="rtl"] .carousel__arrow--next svg { transform: scaleX(-1); }
.carousel:is(:hover, :focus-within) .carousel__arrow { opacity: 1; }

.carousel__dots {
  position: absolute;
  inset-block-end: 8px;
  inset-inline: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgb(255 255 255 / .55);
  border: 1px solid rgb(0 0 0 / .35);
  border-radius: 50%;
}

.carousel__dot[aria-current="true"] { background: var(--gold); }

/* Matches the keyword panel beside it, exactly as the original's 675x295
   banner matched its 245x295 sidebar box. */
.hero { height: var(--hero-h); margin-block-end: var(--gap); background: var(--dark); }
.hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero .carousel__dots { display: none; }

/* lawyers */

.lawyer-card {
  position: relative;
  display: flex;
  color: var(--body);
  flex-direction: column;
  align-items: center;
  max-width: var(--card);
  min-height: 280px;
  margin-inline: auto;
  padding: 8px;
  background: #fff;
  text-align: center;
}

.lawyer-card a { color: inherit; }
/* The link covers the card, so the photo is clickable too. */
.lawyer-card__link::after { content: ""; position: absolute; inset: 0; }
.lawyer-card__link:is(:hover, :focus-visible) { text-decoration: none; }
/* fit-content so the cream frame hugs the photo. Inside .lawyer-card it is a
   flex item and shrinks anyway; in the bio aside it is a plain block and would
   otherwise stretch to the full column width. */
.lawyer-card__media {
  width: fit-content;
  margin-inline: auto;
  border: 7px solid var(--cream);
  line-height: 0;
}
.lawyer-card__media img { width: 184px; aspect-ratio: 184 / 213; object-fit: cover; }
.lawyer-card__role, .lawyer-card__name { display: block; }
.lawyer-card__role { margin-block-start: 4px; color: var(--body); font-size: .8125rem; line-height: 1.15; }
.lawyer-card__name { font-size: 1.25rem; line-height: 1.15; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 20px;
  justify-items: center;
  padding-block: var(--gap);
}

.team-grid, .lawyer-single { width: min(80%, 100%); margin-inline: auto; }
.lawyer-single { display: grid; grid-template-columns: 1fr 2fr; gap: var(--gap); }
.lawyer-single__aside, .lawyer-single__body { padding: var(--gap); background: #fff; color: var(--body); }
/* These panels are white inside a dark box, so they have to undo the cream
   that .content-box--dark hands to headings and links. */
.lawyer-single :is(h2, h3) { color: var(--body); }
.lawyer-single a:not(.golden) { color: var(--ink); }
.lawyer-single__aside { text-align: center; }
.lawyer-single__email { display: block; margin-block-start: 1em; }
.lawyer-single__body { padding: 20px clamp(10px, 5%, 30px); font-size: .875rem; }
.lawyer-single__body > * + * { margin-block-start: 1em; }

/* practice areas */

/* 13px, not --gap: both panels' bars protrude 5px into this gap, so a 10px
   gap would leave them touching. The original used 13, leaving 3px clear. */
.practice { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 13px; }

.practice__list {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  padding: 25px 0;
}

.practice__aside {
  justify-content: space-between;
  min-height: 510px;
  background: var(--dark) url("../images/contact-panel.jpg") center/cover no-repeat;
  box-shadow: 0 0 5px rgb(0 0 0 / .8);
}

/* contact */

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

/* Panel metrics come straight from the original's 465x535 boxes. */
.contact .panel { position: relative; min-height: 535px; padding-block: 20px 15px; }

.contact__details {
  display: grid;
  gap: 1em;
  width: min(360px, 100%);
  margin: 90px auto 0; /* the original's margin below the bar */
  text-align: center;
}

.contact__details .golden { font-size: 1.1875rem; }

.contact__address {
  margin-block-start: 16px;
  padding-inline-start: 30px;
  font-weight: 700;
  text-align: start;
}

.contact__map {
  position: relative;
  aspect-ratio: 1;
  width: min(360px, calc(100% - 20px));
  margin: 20px auto 0;
  background: rgb(0 0 0 / .05);
}

.contact__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

.contact__marker {
  position: absolute;
  inset-block-start: 445px;
  inset-inline-end: 5px;
}

/* footer */

.site-footer {
  max-width: 962px;
  margin-inline: auto;
  padding: 4px var(--gap);
  background: #fff;
  border: var(--hairline);
  border-block-end: 0;
  box-shadow: var(--shadow);
  font-size: .6875rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5em 1.5em;
  min-height: 25px;
}

.footer-menu { display: flex; flex-wrap: wrap; gap: .5em 1em; }

/* WordPress content classes */

.alignleft { float: left; margin: .5em 1.5em .5em 0; }
.alignright { float: right; margin: .5em 0 .5em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .8125rem; text-align: center; }
.search-form { display: flex; gap: .5em; }
.search-form input { flex: 1; min-width: 0; padding: .45em .6em; border: var(--hairline); font: inherit; }
.search-form button { padding: .45em 1.1em; background: var(--gold-bar); color: var(--cream); }
.post-list { display: grid; gap: var(--gap); }
.error-404 { text-align: center; }

/* responsive */

@media (max-width: 900px) {
  .layout, .practice { grid-template-columns: minmax(0, 1fr); }
  .layout__main, .layout__sidebar { grid-column: 1; grid-row: auto; }
  .team-grid, .lawyer-single { width: 100%; }
  .sidebar { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .hero { height: auto; aspect-ratio: 675 / 295; }
  .widget--keywords .carousel { height: 180px; }
  .practice__aside { min-height: 320px; }

  /* min-width:0 is load-bearing: a flex item will not shrink below its
     min-content width, and the track's is the sum of all its slides. */
  .sidebar > .widget { flex: 1 1 260px; min-width: 0; max-width: min(420px, 100%); }
}

@media (max-width: 768px) {
  .site-header__inner {
    grid-template-columns: auto minmax(0, 1fr);
    row-gap: .15rem;
    column-gap: 1rem;
    min-height: 0;
    padding-block: 1.25rem;
    padding-inline: var(--gap);
    background-size: 150% auto;
    background-position: center bottom -2px;
  }

  .site-title { grid-column: 1 / -1; justify-self: start; white-space: normal; }
  .site-tagline { grid-column: 1; justify-self: start; }
  .site-phone { grid-column: 2; justify-self: end; align-self: baseline; margin-block-start: 0; }

  .nav-toggle { display: flex; }
  .main-nav { min-height: 0; box-shadow: none; }
  .main-nav__list { display: none; flex-direction: column; align-items: stretch; min-height: 0; padding-block-end: .5rem; }
  .main-nav.is-open .main-nav__list { display: flex; }
  .main-nav__list > li + li::before { content: none; }
  .main-nav__list a { display: block; margin: 2px 8px; padding: .7em 1em; text-align: center; }
  .main-nav__list > li:first-child > a { margin-inline-start: 8px; }
  .main-nav__list ul { position: static; display: block; border: 0; background: rgb(0 0 0 / .18); }

  .contact, .lawyer-single { grid-template-columns: minmax(0, 1fr); }
  .contact .panel { min-height: 0; }
  .contact__details { margin-block-start: 2rem; }
  .contact .bar { width: auto; align-self: stretch; margin-inline: -5px; }
  .contact__address { padding-inline-start: var(--gap); }
  .contact__marker { display: none; }
  .site-footer__inner { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  :root { --gap: 8px; }
  .sidebar > .widget { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel.is-animating .carousel__track,
  .carousel--fade .carousel__slide,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after { transition: none; }
}

@media print {
  body::before, .nav-bar, .carousel__arrow, .carousel__dots, .hero,
  .layout__sidebar, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .site-content, .site-footer { max-width: none; border: 0; box-shadow: none; }
  .content-box { background: #fff; }
}
