/* Sui Generis Law: Advocate J F Bosman
   Palette drawn from the black-ink crest: bone paper, engraving ink, oxblood seal. */

:root {
  --bone: #F2F1EC;
  --bone-deep: #E9E7E0;
  --ink: #0E0D0B;
  --oxblood: #6B1F2A;
  --slate: #5A5751;
  --rule: #D9D5CC;

  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --text: "Libre Caslon Text", Georgia, "Times New Roman", serif;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --page: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 4px;
}

/* Masthead */

.masthead {
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 2rem;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.masthead nav { display: flex; gap: 2rem; }

.masthead nav a,
.masthead-phone {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--slate);
  transition: color 160ms ease;
}
.masthead nav a:hover,
.masthead-phone:hover { color: var(--oxblood); }

.masthead-phone { justify-self: end; font-variant-numeric: tabular-nums; }

/* Hero */

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) var(--gutter) clamp(3rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: minmax(260px, 5fr) 7fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.hero-crest img {
  width: min(100%, 440px);
  margin-inline: auto;
  animation: crest-in 1400ms cubic-bezier(.2,.7,.2,1) both;
}

.hero-text > * { animation: rise 900ms cubic-bezier(.2,.7,.2,1) both; }
.hero-role     { animation-delay: 500ms; }
.hero h1       { animation-delay: 600ms; }
.hero-tagline  { animation-delay: 720ms; }
.hero-lede     { animation-delay: 820ms; }
.hero-actions  { animation-delay: 920ms; }

.hero-role {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  color: var(--oxblood);
  margin-bottom: 0.25rem;
}

.hero h1 {
  font-size: clamp(3.25rem, 8vw, 6.5rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

.hero-lede {
  max-width: var(--measure);
  color: var(--slate);
  margin-bottom: 2.25rem;
}

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

.button {
  display: inline-block;
  background: var(--ink);
  color: var(--bone);
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
  transition: background 180ms ease;
}
.button:hover { background: var(--oxblood); }

.link-quiet {
  text-decoration: none;
  color: var(--slate);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 160ms ease, border-color 160ms ease;
}
.link-quiet:hover { color: var(--oxblood); border-color: var(--oxblood); }

/* Section rhythm */

.section-head {
  max-width: var(--page);
  margin: 0 auto 3rem;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}

.section-head h2,
.about h2 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  letter-spacing: -0.01em;
}

.section-head p { color: var(--slate); max-width: var(--measure); }

/* Services */

.services {
  border-top: 1px solid var(--rule);
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.service-list {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(2rem, 6vw, 6rem);
}

.service {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}

.service dt {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.service dd {
  margin: 0;
  color: var(--slate);
  max-width: 48ch;
}

/* About */

.about {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--gutter);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  border-top: 1px solid var(--rule);
}

.about-photo { margin: 0; position: sticky; top: 2rem; }

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  filter: grayscale(100%) contrast(1.05);
}

.about-photo figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--slate);
}

.about-text h2 { margin-bottom: 2rem; }

.about-text p {
  max-width: var(--measure);
  margin-bottom: 1.25rem;
}

.about-text p b { font-weight: 700; color: var(--ink); }

.about-motto {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1.35;
}
.about-motto i { color: var(--oxblood); }

/* Contact */

.contact {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--bone);
}

.contact-watermark {
  position: absolute;
  right: -6%;
  top: 50%;
  width: clamp(360px, 44vw, 620px);
  transform: translateY(-50%);
  filter: invert(1);
  opacity: 0.09;
  pointer-events: none;
}

.contact-inner {
  position: relative;
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) var(--gutter);
}

.contact h2 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

.contact-lede {
  max-width: var(--measure);
  color: var(--bone-deep);
  opacity: 0.8;
  margin-bottom: 3rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-details a {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.6vw, 2.75rem);
  line-height: 1.2;
  text-decoration: none;
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.contact-details a:hover { border-color: var(--bone); }

/* Footer */

.footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: 3rem var(--gutter) 3.5rem;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(2rem, 6vw, 6rem);
  color: var(--slate);
  font-size: 0.95rem;
}

.footer h2 {
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 1rem;
}

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

.footer li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--rule);
}
.footer li span { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

.footer-meta { align-self: end; text-align: right; }
.footer-meta p + p { margin-top: 0.25rem; }

/* Motion */

@keyframes crest-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-crest img, .hero-text > * { animation: none; }
  * { transition: none !important; }
}

/* Responsive */

@media (max-width: 900px) {
  .hero,
  .section-head,
  .about,
  .footer { grid-template-columns: 1fr; }

  .hero { padding-top: 1.5rem; }
  .hero-crest img { width: min(70%, 320px); }
  .about-photo { position: static; max-width: 380px; }
  .footer-meta { text-align: left; }
}

@media (max-width: 680px) {
  .masthead {
    grid-template-columns: 1fr auto;
    row-gap: 0.75rem;
  }
  .masthead nav { grid-column: 1 / -1; gap: 1.5rem; }
  .masthead-phone { justify-self: end; }

  .service-list { grid-template-columns: 1fr; }
  .contact-watermark { width: 80vw; right: -25%; opacity: 0.07; }
}

/* Guard against long links widening narrow layouts */
.hero-text, .about-text, .contact-inner, .footer > * { min-width: 0; }
.link-quiet, .contact-details a { overflow-wrap: anywhere; }
