/* 18th Square, shared stylesheet (direction B, "Grid")
   Wider and more structured. Source Serif 4 headings, Inter body. */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf9f6;
  --ink: #17191e;
  --muted: #5a5f68;
  --rule: #dad8d2;
  --accent: #1b3f7e;
  --accent-dark: #122e5e;
  --tint: #eef1f6;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --measure: 34em;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  border-top: 4px solid var(--accent);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 48em) {
  body {
    font-size: 1.125rem; /* 18px */
  }
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-dark);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 48em) {
  .wrap {
    padding-inline: 2.5rem;
  }
}

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: #fff;
}

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

/* Header */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 32px;
  height: 32px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.005em;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48em) {
  .site-nav ul {
    gap: 0.25rem 2.25rem;
  }
}

.site-nav a {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Hero */

.hero {
  padding-block: clamp(3.5rem, 10vw, 8rem) clamp(3rem, 6vw, 5rem);
}

.hero h1 {
  max-width: 14em;
  font-size: clamp(2.25rem, 1.1rem + 4.6vw, 5.25rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

@media (min-width: 48em) {
  .hero h1 {
    text-wrap: balance;
  }
}

.hero-foot {
  display: grid;
  gap: 1.75rem;
  margin-top: 2rem;
}

.lede {
  max-width: var(--measure);
  margin: 0;
  font-size: clamp(1.125rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  text-wrap: wrap;
}

.cta {
  margin: 0;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 2px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* Proof strip */

.proof {
  display: grid;
  gap: 2rem;
  margin: 0;
}

.proof > div {
  padding-top: 1.25rem;
  border-top: 2px solid var(--accent);
}

.proof dt {
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.proof dd {
  max-width: 20em;
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

@media (min-width: 48em) {
  .proof {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

/* Practice areas */

/* Three columns, each a heading, optional text and a ruled list
   (practice areas on Home, the role on Careers). */

.columns {
  display: grid;
  gap: 3rem;
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
}

.column h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.75rem);
}

.column p {
  max-width: var(--measure);
}

.ruled-list,
.column ul {
  margin: 1.5rem 0 0;
  padding: 0;
  border-bottom: 1px solid var(--rule);
  list-style: none;
}

.ruled-list li,
.column li {
  padding-block: 0.65rem;
  border-top: 1px solid var(--rule);
  font-size: 1rem;
  line-height: 1.45;
}

@media (min-width: 64em) {
  /* Heading, text and list share rows across the three columns,
     so the three lists start at the same height. */
  .columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 3.5rem;
    row-gap: 0;
  }

  .column {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
  }

  .column ul {
    margin-top: 0.5rem;
  }
}

/* Tinted band (About on Home, How to apply on Careers) */

.band {
  background: var(--tint);
}

.band-inner {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.band h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
}

.band p {
  max-width: var(--measure);
}

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

/* About block on Home */

.about-inner {
  display: grid;
  gap: 2rem;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.headshot {
  width: 10rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
}

.about-body p {
  max-width: var(--measure);
}

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

.text-link {
  font-weight: 600;
}

@media (min-width: 48em) {
  .about-inner {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 3.5rem;
  }

  .headshot {
    width: 15rem;
  }
}

/* Footer */

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 2rem 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0;
}

.copyright {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-mark {
  width: 20px;
  height: 20px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Current page in the navigation */

.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.site-footer a[aria-current="page"] {
  color: var(--ink);
}

/* Inner page heading */

.page-head {
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 4vw, 3rem);
}

.page-head h1 {
  max-width: 16em;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.page-head .lede {
  margin-top: 1.25rem;
}

.meta {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-weight: 500;
}

/* Inner page sections */

.section {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.section:last-child {
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.section > h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.75rem);
}

/* Data tables (Experience, Testimony).
   Full tables on wide screens; each row stacks into a block on phones. */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.5;
}

.data-table thead th {
  padding: 0 1.5rem 0.6rem 0;
  border-bottom: 2px solid var(--accent);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.data-table tbody th,
.data-table tbody td {
  padding: 1rem 1.5rem 1rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.data-table thead th:last-child,
.data-table tbody td:last-child {
  padding-right: 0;
}

.data-table tbody th {
  font-weight: 600;
}

.col-years {
  width: 9.5rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.col-client {
  width: 30%;
}

.col-docket {
  width: 11rem;
}

.col-forum {
  width: 5rem;
}

.col-party {
  width: 20%;
}

@media (max-width: 47.99em) {
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table tbody th,
  .data-table tbody td {
    display: block;
    width: auto;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .data-table tbody tr {
    padding-block: 1rem;
    border-bottom: 1px solid var(--rule);
  }

  .data-table tbody tr:first-child {
    border-top: 2px solid var(--accent);
  }

  .data-table tbody th,
  .data-table tbody td {
    padding: 0;
    border: 0;
  }

  .col-years {
    font-size: 0.875rem;
  }

  .data-table .col-client {
    margin: 0.15rem 0 0.35rem;
  }

  /* Testimony rows: label each value, since four columns don't read in order. */
  .labelled-table tbody th,
  .labelled-table tbody td {
    margin-bottom: 0.5rem;
  }

  .labelled-table tbody td:last-child {
    margin-bottom: 0;
  }

  .labelled-table [data-label]::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

/* About page profile */

.profile {
  display: grid;
  grid-template-areas:
    "head"
    "photo"
    "bio";
  gap: 1.75rem;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem);
}

.profile-head {
  grid-area: head;
}

.profile-head h1 {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.profile-head .meta {
  margin-top: 0.5rem;
  font-size: 1.125rem;
}

.profile .headshot {
  grid-area: photo;
}

.profile-bio {
  grid-area: bio;
}

.profile-bio p {
  max-width: var(--measure);
}

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

@media (min-width: 48em) {
  .profile {
    grid-template-columns: 15rem minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "photo head"
      "photo bio";
    gap: 1.5rem 3.5rem;
  }
}

/* Contact form */

.contact-form {
  display: grid;
  gap: 1.5rem;
  max-width: 36rem;
}

.field label,
.field legend {
  display: block;
  margin-bottom: 0.4rem;
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid #7a7f88;
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

fieldset.field {
  margin: 0;
  padding: 0;
  border: 0;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.choices label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.choices input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--accent);
}

/* Honeypot: off-screen for people, still in the form for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button.button {
  justify-self: start;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.address {
  margin: 3rem 0 0;
  color: var(--muted);
}

/* Careers: the three lists sit closer under the page heading. */
.columns.careers {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

/* Turnstile widget keeps its own size. */
.cf-turnstile {
  min-height: 65px;
}

/* Keep docket numbers such as ER25-324 on one line. */
.nowrap {
  white-space: nowrap;
}

/* Contact form: send button and status message */

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

.form-status {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

button.button:disabled {
  cursor: progress;
  opacity: 0.6;
}

.form-note {
  max-width: 36rem;
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--tint);
}

/* Keep the footer at the bottom of the window on short pages. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

main {
  flex: 1 0 auto;
}
