/* Litchfield Law Corporation, version 1
   Spruce and fog. Quiet, typographic, west coast. Colours, type and spacing are set once in :root. */

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

:root {
  --white: #ffffff;
  --fog: #eff2f0;        /* alternating sections */
  --ink: #1b2b26;        /* spruce ink: text and wordmark */
  --lichen: #5e6a66;     /* secondary text */
  --mist: #d8dedb;       /* hairlines */
  --spruce: #2e5e4e;     /* the single accent */
  --spruce-deep: #234a3d;

  --serif: "EB Garamond", "Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 9vw, 8rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern", "liga", "onum";
}
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; font-feature-settings: "kern", "liga", "lnum"; }
h1 { font-size: clamp(2.875rem, 6vw, 5.25rem); line-height: 1.04; letter-spacing: -0.012em; }
h2 { font-size: clamp(2.125rem, 3.4vw, 3rem); line-height: 1.1; letter-spacing: -0.008em; }
h3 { font-size: 1.75rem; line-height: 1.2; }
p { margin: 0 0 1.05em; max-width: 64ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--spruce); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--spruce-deep); }
:focus-visible { outline: 2px solid var(--spruce); outline-offset: 3px; }

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

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; font-family: var(--sans); font-size: .9rem; }
.skip:focus { left: 0; color: #fff; }

/* Small sans text: navigation, labels, dates, buttons */
.nav a, .btn, .more, .meta, .when, time, .eyebrow { font-family: var(--sans); font-feature-settings: normal; }
.eyebrow { display: block; font-size: .75rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--lichen); margin-bottom: 1.5rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--mist); background: var(--white); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 6rem; }
.brand img { height: 3rem; width: auto; }
.nav ul { display: flex; gap: clamp(1.5rem, 3vw, 2.75rem); margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: .4rem 0;
  font-size: .8125rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--spruce); }
.nav a[aria-current="page"] { border-bottom-color: var(--spruce); color: var(--spruce); }
.nav-toggle { display: none; background: none; border: 1px solid var(--mist); border-radius: 2px; padding: .5rem .9rem; font-family: var(--sans); font-size: .8125rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); cursor: pointer; }

/* Hero: type first, the photograph follows */
.hero { padding-block: clamp(4rem, 9vw, 7.5rem) clamp(3rem, 6vw, 4.5rem); }
.hero h1 { max-width: 16ch; }
.hero .intro { margin-top: 2rem; font-size: clamp(1.375rem, 1.9vw, 1.625rem); line-height: 1.45; color: var(--lichen); max-width: 40rem; }
.hero-page h1 { max-width: 20ch; }

.actions { display: flex; flex-wrap: wrap; gap: .875rem; margin-top: 2.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 1.6rem; border-radius: 1px; border: 1px solid var(--spruce);
  background: var(--spruce); color: #fff;
  font-size: .8125rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2;
  text-decoration: none; transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--spruce-deep); border-color: var(--spruce-deep); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Photographs sit within the page width */
.photo { margin: 0 auto; max-width: var(--wrap); padding-inline: var(--gutter); }
.photo img { width: 100%; height: clamp(17rem, 40vw, 34rem); object-fit: cover; }
.photo-home img { height: clamp(18rem, 44vw, 38rem); }

/* Who we advise */
.clients { margin-top: clamp(2.5rem, 5vw, 4rem); }
.clients ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid var(--mist); border-bottom: 1px solid var(--mist); }
.clients li { list-style: none; padding: 1.35rem 1.25rem; border-left: 1px solid var(--mist); font-size: 1.25rem; }
.clients li:nth-child(3n+1) { border-left: 0; padding-left: 0; }
.clients li:nth-child(n+4) { border-top: 1px solid var(--mist); }

/* Sections */
.section { padding-block: var(--section); }
.section-fog { background: var(--fog); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 2rem; margin-bottom: 3rem; }
.more { font-size: .8125rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.aside { margin-top: 1.25rem; color: var(--lichen); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem clamp(2.5rem, 6vw, 6rem); align-items: start; }
.lede { font-size: clamp(1.5rem, 2vw, 1.75rem); line-height: 1.42; }

/* Three columns separated by hairlines above */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); }
.cols > * { border-top: 1px solid var(--ink); padding-top: 1.75rem; }
.cols p { margin-top: .9rem; color: var(--lichen); font-size: 1.1875rem; }
.cols h3 a { color: var(--ink); text-decoration: none; }
.cols h3 a:hover { color: var(--spruce); }

/* Rows for columns, talks and lists */
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.rows > li, .rows > article { padding-block: 1.6rem; border-bottom: 1px solid var(--mist); }
.row-dated { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .25rem 2rem; align-items: baseline; }
.row-dated h3 { font-size: 1.5rem; }
.row-dated h3 a { color: var(--ink); text-decoration: none; }
.row-dated h3 a:hover { color: var(--spruce); text-decoration: underline; }
.row-dated p { grid-column: 2; margin-top: .1rem; color: var(--lichen); font-size: 1.125rem; }
time, .when { font-size: .75rem; font-weight: 500; color: var(--lichen); letter-spacing: .08em; text-transform: uppercase; }

/* Person block: portrait beside text */
.person { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.person > div { max-width: 46rem; }
.person figure { margin: 0; }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.person figcaption { margin-top: 1rem; font-family: var(--sans); font-size: .8125rem; color: var(--lichen); }
.person figcaption strong { display: block; color: var(--ink); font-weight: 600; font-size: .875rem; }
.person h2 + p, .person h2 + .lede { margin-top: 1.5rem; }
.sticky { position: sticky; top: 2rem; }

/* Detail lists use a short spruce rule as the marker, echoing the logo */
.ticks { margin: 1.75rem 0 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 2rem; margin-top: 1rem; max-width: 62ch; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .78em; width: 1.1rem; height: 2px; background: var(--spruce); }
.ticks strong { font-weight: 600; }

.steps { margin: 3rem 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: 1.5rem; }
.steps li::before { content: counter(step); display: block; font-size: 2.25rem; line-height: 1; color: var(--spruce); margin-bottom: 1rem; font-feature-settings: "lnum"; }
.steps p { margin-top: .6rem; color: var(--lichen); font-size: 1.1875rem; }

.facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2.5rem; }
.facts div { border-top: 1px solid var(--ink); padding-top: 1.1rem; }
.facts dt { font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--lichen); }
.facts dd { margin: .5rem 0 0; font-size: 1.375rem; line-height: 1.35; }
.facts-wide { margin-top: 2.5rem; }

/* Legal notices */
.notice h2 { font-size: 1.75rem; margin-top: 2.75rem; }
.notice h2:first-child { margin-top: 0; }
.notice h2 + p { margin-top: .8rem; }
.notice { max-width: 46rem; }

/* Closing */
.closing { border-top: 1px solid var(--mist); }
.closing .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 2rem; }
.closing p { margin-top: 1rem; color: var(--lichen); }
.closing .actions { margin-top: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--mist); background: var(--fog); padding-block: 4rem 2.5rem; font-family: var(--sans); font-size: .875rem; line-height: 1.7; color: var(--lichen); }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--spruce); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 2.5rem; }
.footer-grid img { height: 2.75rem; width: auto; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid li { margin-bottom: .35rem; }
.footer-grid h2 { font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: .8rem; }
.footer-note { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--mist); font-size: .8125rem; }
.footer-note p { max-width: 64rem; margin-bottom: .45em; }

@media (max-width: 64rem) {
  .steps, .cols { grid-template-columns: minmax(0, 1fr); }
  .split, .person { grid-template-columns: minmax(0, 1fr); }
  .person figure { max-width: 12rem; }
  .sticky { position: static; }
  .clients ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
  .clients li, .clients li:nth-child(n+4) { border-left: 0; border-top: 0; padding: 1.1rem 0; border-bottom: 1px solid var(--mist); font-size: 1.1875rem; }
  .clients li:nth-last-child(-n+2) { border-bottom: 0; }
  .facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 52rem) {
  .site-header .wrap { flex-wrap: wrap; min-height: 5rem; }
  .brand img { height: 2.6rem; }
  .nav-toggle { display: block; }
  .nav { display: none; flex-basis: 100%; padding-bottom: 1rem; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { border-bottom: 1px solid var(--mist); padding: .85rem 0; }
  .nav a[aria-current="page"] { border-bottom-color: var(--mist); }
  .section-head { flex-direction: column; gap: 1rem; }
}
@media (max-width: 36rem) {
  body { font-size: 1.25rem; }
  .row-dated { grid-template-columns: minmax(0, 1fr); }
  .row-dated p { grid-column: 1; }
  .clients ul { grid-template-columns: minmax(0, 1fr); }
  .clients li:nth-last-child(2) { border-bottom: 1px solid var(--mist); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
