/* Grant Legal Solutions: B, Institutional */

:root {
  --navy: #1f3864;
  --navy-deep: #002060;
  --ink: #403c38;
  --ink-soft: #736d66;
  --rule: #e2dfda;
  --field: #cfcac3;
  --stone: #f5f4f1;
  --error: #9b2c2c;

  --sans: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-space: clamp(96px, 11vw, 160px);
  --header-height: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); }
p { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 8px 14px; background: var(--navy); color: #fff;
}
.skip-link:focus { top: 12px; }

main, .site-footer, .site-nav { transition: opacity 500ms ease; }
.is-loading main, .is-loading .site-footer, .is-loading .site-nav { opacity: 0; }

.noscript { padding: 48px var(--gutter); text-align: center; }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-height);
}

.wordmark {
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav ul { display: flex; gap: clamp(24px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.site-nav a { font-size: 0.9375rem; font-weight: 500; color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--navy); }

@media (max-width: 640px) {
  :root { --header-height: 64px; }
  .wordmark { font-size: 1.0625rem; }
  .site-nav { display: none; }
}

/* Shared */

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

.section-heading {
  font-size: clamp(2rem, 3.4vw, 2.875rem);
  line-height: 1.12;
}

.prose p + p { margin-top: 1.15em; }
.prose p { max-width: 64ch; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px;
  border: 0; border-radius: 3px;
  background: var(--navy); color: #fff;
  font: 500 1rem/1 var(--sans);
  text-decoration: none; cursor: pointer;
  transition: background-color 150ms ease;
}
.button:hover { background: var(--navy-deep); }
.button:disabled { opacity: 0.6; cursor: default; }

.text-link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* Hero: full-bleed Wasatch Front, headline set on the sky */

.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: clamp(560px, 82vh, 860px);
  overflow: hidden;
  background: #e9eaec;
}

.hero__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

/* A soft veil keeps the sky behind the type bright without looking like an overlay */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.45) 45%, rgba(255, 255, 255, 0) 75%);
  pointer-events: none;
}

.hero__inner {
  position: relative; z-index: 2;
  padding-top: clamp(72px, 10vw, 136px);
}

.hero__headline {
  max-width: 17ch;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__subhead {
  max-width: 48ch;
  margin-top: 24px;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--navy-deep);
}

@media (max-width: 640px) {
  .hero { min-height: 640px; }
  .hero__photo { object-position: 30% 100%; }
}

/* About */

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 8vw, 120px);
  align-items: stretch;
}

.about__role { margin: 10px 0 32px; font-size: 1.0625rem; color: var(--ink-soft); }
.about__body .prose { margin-bottom: 1.15em; }

/* The portrait takes the height of the bio text, so its top and bottom line up with it */
.about__portrait { position: relative; margin: 0; justify-self: end; width: 100%; max-width: 380px; min-height: 360px; }
.about__portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__portrait { order: -1; justify-self: start; max-width: 340px; min-height: 0; }
  .about__portrait img { position: static; height: auto; aspect-ratio: 4 / 5; }
}

/* Approach: photo runs to the left edge of the page */

.approach { background: var(--stone); }

.approach__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: stretch;
}

.approach__photo {
  width: 100%; height: 100%;
  min-height: 520px;
  object-fit: cover;
  object-position: 60% 30%;
}

.approach__body {
  align-self: center;
  max-width: calc(640px + var(--gutter));
  padding: var(--section-space) var(--gutter) var(--section-space) clamp(40px, 7vw, 112px);
}
.approach__body .section-heading { margin-bottom: 32px; }

.services { margin: 1.15em 0; padding-left: 1.2em; }
.services li { max-width: 64ch; padding-left: 0.2em; }
.services li + li { margin-top: 0.85em; }
.services li::marker { color: var(--navy); }
.services strong { font-weight: 600; color: var(--navy); }

@media (max-width: 860px) {
  .approach__grid { grid-template-columns: 1fr; }
  .approach__photo { min-height: 0; height: 320px; }
  .approach__body { padding: 72px var(--gutter); }
}

/* Contact */

.contact__inner > * { max-width: 820px; }

.contact__intro { margin: 16px 0 48px; font-size: 1.125rem; max-width: 52ch; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.field label { display: block; margin-bottom: 6px; font-size: 0.9375rem; font-weight: 500; }

.field input,
.field textarea {
  display: block; width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--field); border-radius: 3px;
  background: #fff; color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  -webkit-appearance: none; appearance: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field textarea { resize: vertical; min-height: 170px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.field [aria-invalid="true"] { border-color: var(--error); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
  margin-top: 28px;
}
.turnstile { min-height: 65px; flex: 1 1 300px; max-width: 360px; }

.form-status { min-height: 1.5em; margin-top: 12px; font-size: 0.9375rem; color: var(--error); }

.form-success:focus { outline: none; }
.form-success h3 { font-size: 1.75rem; margin-bottom: 8px; }

/* Footer */

.site-footer { background: var(--navy); color: rgba(255, 255, 255, 0.78); }
.site-footer__inner {
  display: flex; align-items: center; gap: 12px 40px; flex-wrap: wrap;
  padding-top: 40px; padding-bottom: 40px;
  font-size: 0.9375rem;
}
.site-footer__name { color: #fff; font-weight: 600; margin-right: auto; }
.site-footer a { color: #fff; }
.site-footer__legal { flex-basis: 100%; max-width: 110ch; font-size: 0.8125rem; font-style: italic; line-height: 1.6; }
.site-footer :focus-visible { outline-color: #fff; }
