@font-face {
  font-family: "Equity A";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/equity_a_regular.woff2") format("woff2");
}

@font-face {
  font-family: "Equity B";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/equity_b_regular.woff2") format("woff2");
}

@font-face {
  font-family: "Equity A";
  font-style: italic;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/equity_a_italic.woff2") format("woff2");
}

@font-face {
  font-family: "Equity B";
  font-style: italic;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/equity_b_italic.woff2") format("woff2");
}

@font-face {
  font-family: "Equity A";
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: url("../fonts/equity_a_bold.woff2") format("woff2");
}

@font-face {
  font-family: "Equity B";
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: url("../fonts/equity_b_bold.woff2") format("woff2");
}

@font-face {
  font-family: "Equity Caps A";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/equity_a_caps_regular.woff2") format("woff2");
}

@font-face {
  font-family: "Equity Caps B";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/equity_b_caps_regular.woff2") format("woff2");
}

@font-face {
  font-family: "Mrs Eaves";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("../fonts/mrseavesot-romanlining-webfont.woff2") format("woff2");
}

/* ============================
   Universal Reset
============================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ============================
   Variables
============================ */
:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --content-max-width: 1200px;
  --page-padding: 1.375rem;
  --layout-gap: clamp(1.375rem, 4.9vw, 3.6rem);
  --grid-gap: var(--layout-gap);
  --text-md: 1.375rem;
  --text-xl: 3.6rem;
  --space-xs: 0.85rem;
  --space-sm: 1.375rem;
  --space-md: 2.22rem;
  --space-lg: 3.6rem;
  --equity-text: "Equity A";
  --equity-caps: "Equity Caps A";
}

html[data-equity-grade="b"] {
  --equity-text: "Equity B";
  --equity-caps: "Equity Caps B";
}

html[data-theme="dark"] {
  --bg-color: #131210;
  --text-color: #f1efe9;
}

html[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #111111;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg-color: #131210;
    --text-color: #f1efe9;
  }
}

/* ============================
   Base
============================ */
html {
  background: var(--bg-color);
  color: var(--text-color);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg-color);
  color: var(--text-color);
  font-family:
    var(--equity-text),
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: var(--text-md);
  font-weight: 400;
  line-height: 1.618;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums;
}

strong {
  font-weight: 700;
}

img,
svg,
iframe {
  max-width: 100%;
}

img {
  height: auto;
}

p,
ul,
ol {
  margin-top: 0;
}

p+p {
  margin-top: var(--space-sm);
}

ul,
ol {
  margin-bottom: 0;
  padding-left: 1.2em;
}

li+li {
  margin-top: var(--space-xs);
}

/* ============================
   Typography
============================ */
h1 {
  margin: 0 0 var(--layout-gap);
  font-family: "Mrs Eaves", serif;
  font-style: normal;
  font-weight: 400;
  font-size: var(--text-xl);
  line-height: 1;
  font-variant-numeric: normal;
  text-wrap: pretty;
}

h2 {
  margin: 0 0 var(--space-sm);
  font-family: var(--equity-text), serif;
  font-style: normal;
  font-weight: 700;
  font-size: var(--text-md);
  line-height: 1.2;
  text-wrap: pretty;
}

/* ============================
   Links
============================ */
a {
  color: currentColor;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* Internal text links: editorial small-caps treatment */
a[href^="/"] {
  font-family: var(--equity-caps), var(--equity-text), serif;
  text-decoration: none;
}

a[href^="/"]:hover,
a[href^="/"]:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* External and protocol links retain conventional link styling */
a:not([href^="/"]):hover,
a:not([href^="/"]):focus-visible {
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

header a {
  text-decoration: none;
}

header a:hover,
header a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

/* Keep image-only internal links visually clean */
.site-logo,
.home-portrait-frame,
.home-mobile-headshot {
  text-decoration: none;
}

a.site-logo:hover,
a.site-logo:focus-visible,
a.home-portrait-frame:hover,
a.home-portrait-frame:focus-visible,
a.home-mobile-headshot:hover,
a.home-mobile-headshot:focus-visible {
  text-decoration: none;
}

/* ============================
   Page Width
============================ */
main,
.header-row {
  width: min(var(--content-max-width), calc(100% - (2 * var(--page-padding))));
  margin-inline: auto;
}

/* ============================
   Header
============================ */
header {
  padding-top: var(--layout-gap);
  padding-bottom: var(--layout-gap);
}

.header-row {
  display: grid;
  grid-template-columns:
    minmax(0, 61.8fr) minmax(0, 38.2fr);
  gap: var(--grid-gap);
  align-items: center;
}

.header-logo {
  grid-column: 1;
  width: 61.8%;
}

.site-logo {
  display: flex;
  width: 100%;
  align-items: center;
  opacity: 1;
  transform: translateZ(0);
}

.site-logo svg {
  display: block;
  width: 100%;
  height: auto;
  fill: currentColor;
}

.header-phone {
  grid-column: 2;
  justify-self: end;
}

.header-phone-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
}

.header-phone-link .icon {
  width: var(--space-sm);
  height: var(--space-sm);
  flex-shrink: 0;
  fill: currentColor;
}

.header-phone-text {
  display: none;
}

@media (min-width: 900px) {
  .header-phone-link .icon {
    display: none;
  }

  .header-phone-text {
    display: inline;
  }
}

/* ============================
   Main
============================ */
main {
  padding-bottom: var(--layout-gap);
}

/* ============================
   Desktop Page Layout
   61.8% main area / 38.2% true sidebar
   Default split: 23.6% / 38.2% / 38.2%
============================ */
.layout-grid-three {
  display: grid;
  grid-template-columns:
    minmax(0, 23.6fr) minmax(0, 38.2fr) minmax(0, 38.2fr);
  gap: var(--grid-gap);
  align-items: start;
}

/* Practice pages reverse the two columns inside the 61.8% main area. */
.practice-page-layout {
  grid-template-columns:
    minmax(0, 38.2fr) minmax(0, 23.6fr) minmax(0, 38.2fr);
}

.col-nav {
  grid-column: 1;
}

.col-primary {
  grid-column: 2;
}

.col-secondary {
  grid-column: 3;
}

/* ============================
   Editorial Sidebar
============================ */
.site-sidebar-copy>p {
  margin: 0;
}

.site-sidebar-copy>p+p {
  margin-top: var(--space-sm);
}

.sidebar-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.sidebar-arrow-icon {
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
  fill: currentColor;
}

.sidebar-contact-link {
  display: flex;
  align-items: flex-start;
  gap: 0.618em;
  text-decoration: none;
}

.sidebar-contact-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: currentColor;
  margin-top: 0.309em;
}

.sidebar-contact-link:hover,
.sidebar-contact-link:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* ============================
   Homepage Content
============================ */
.home-visual-grid {
  display: contents;
}

.home-portrait-frame {
  display: block;
  width: 100%;
  aspect-ratio: 0.618 / 1;
  overflow: hidden;
  text-decoration: none;
}

.home-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-map-frame {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.home-map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.home-office-frame {
  display: block;
  width: 100%;
  aspect-ratio: 1.618 / 1;
  overflow: hidden;
}

.home-office-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 900px) {

  .home-portrait-frame,
  .home-map-frame,
  .home-office-frame,
  .attorney-headshot {
    border-radius: 0.85rem;
  }
}


@media (min-width: 900px) {

  .site-sidebar-copy>.home-mobile-office+p,
  .site-sidebar-copy>.home-mobile-map+p {
    margin-top: var(--space-sm);
  }
}

/* ============================
   Homepage Mobile Visual Rhythm
============================ */
.home-mobile-visual {
  aspect-ratio: 1.618 / 1;
  overflow: hidden;
}

.home-mobile-visual img,
.home-mobile-visual iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.home-mobile-visual img {
  object-fit: cover;
}

/* ============================
   Attorney Page
============================ */
.attorney-headshot {
  display: block;
  width: 100%;
  height: auto;
}

.attorney-detail-section {
  margin-top: var(--space-lg);
}

.attorney-background> :last-child {
  margin-bottom: 0;
}

/* ============================
   Practice Area Pages
============================ */
.practice-column> :last-child {
  margin-bottom: 0;
}

.practice-section+.practice-section {
  padding-top: var(--space-lg);
}

.practice-main {
  display: contents;
}

/* ============================
   Privacy Policy
============================ */
.privacy-intro> :last-child,
.privacy-content> :last-child {
  margin-bottom: 0;
}

/* ============================
   Utility: Visibility
============================ */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

/* Homepage phi-grid placement.
   The visual composition is an independent nested grid so sidebar height
   cannot stretch the map/office rows. */
@media (min-width: 1200px) {
  .home-page-layout>.home-visual-grid {
    display: grid;
    grid-column: 1 / 3;
    grid-row: 1;
    grid-template-columns:
      minmax(0, 23.6fr) minmax(0, 38.2fr);
    gap: var(--grid-gap);
    align-self: start;
    align-content: start;
  }

  .home-visual-grid>.home-portrait-frame {
    grid-column: 1;
    grid-row: 1;
  }

  .home-visual-grid>.home-map-frame {
    grid-column: 2;
    grid-row: 1;
  }

  .home-visual-grid>.home-office-frame {
    grid-column: 2;
    grid-row: 2;
  }

  .home-page-layout>.site-sidebar {
    grid-column: 3;
    grid-row: 1;
  }
}

/* ============================
   Tablet Layout
   61.8% content / 38.2% sidebar
============================ */
@media (min-width: 900px) and (max-width: 1199px) {
  .header-logo {
    width: 100%;
  }

  .page-layout {
    grid-template-columns:
      minmax(0, 61.8fr) minmax(0, 38.2fr);
  }

  .page-layout>.col-nav {
    grid-column: 1;
    grid-row: 1;
  }

  .page-layout>.col-primary {
    grid-column: 1;
    grid-row: 2;
  }

  .page-layout>.col-secondary {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .home-visual-grid>.home-portrait-frame {
    grid-column: 1;
    grid-row: 1;
  }

  .home-visual-grid>.home-map-frame {
    grid-column: 1;
    grid-row: 2;
  }

  .home-visual-grid>.home-office-frame {
    grid-column: 1;
    grid-row: 3;
  }

  .home-page-layout>.site-sidebar {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .home-portrait-frame,
  .home-map-frame {
    aspect-ratio: 1.618 / 1;
  }

  .home-portrait-frame picture {
    display: block;
    width: 100%;
    height: 100%;
  }

  .page-layout>.practice-main {
    display: block;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .practice-main>.practice-column+.practice-column,
  .practice-main>.privacy-content,
  .practice-main>.attorney-background {
    margin-top: var(--space-lg);
  }
}

/* ============================
   Responsive
============================ */
@media (max-width: 899px) {
  :root {
    --layout-gap: var(--space-md);
  }

  .header-row {
    display: flex;
    gap: var(--space-sm);
  }

  .header-logo {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-phone {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .layout-grid-three {
    display: block;
  }

  .home-page-layout>.site-sidebar {
    margin-top: 0;
  }

  .home-mobile-headshot {
    margin-top: 0;
    margin-bottom: var(--space-lg);
  }

  .home-mobile-office,
  .home-mobile-map {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
  }

  .attorney-background,
  .practice-column,
  .privacy-content,
  .site-sidebar {
    margin-top: var(--space-lg);
  }

  .practice-main>.practice-column:first-child {
    margin-top: 0;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }
}

/* ============================
   Mobile Full Bleed
============================ */
@media (max-width: 899px) {
  .full-bleed-mobile {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    display: block;
  }
}

/* ============================
   Print
============================ */
@media print {
  @page {
    margin: 0.75in;
  }

  html,
  body {
    background: #ffffff;
    color: #000000;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  main,
  .header-row {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  header {
    padding: 0 0 0.35in;
  }

  .header-row {
    display: block;
  }

  .header-logo {
    width: 3.25in;
    max-width: 61.8%;
  }

  .header-phone,
  .site-sidebar,
  .home-map-frame,
  .home-office-frame,
  .home-portrait-frame,
  .home-mobile-visual {
    display: none !important;
  }

  /* On the homepage, the sidebar contains the substantive text content. */
  .home-page-layout>.site-sidebar {
    display: block !important;
    width: 100%;
    margin-top: 0;
  }

  main {
    padding: 0;
  }

  h1 {
    margin-bottom: 0.3in;
    break-after: avoid;
  }

  h2 {
    break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  img {
    break-inside: avoid;
  }

  .layout-grid-three,
  .practice-main {
    display: block;
  }

  .col-nav,
  .col-primary,
  .col-secondary {
    width: 100%;
  }

  .practice-column,
  .privacy-content,
  .attorney-background {
    margin-top: 0;
  }

  .practice-column+.practice-column,
  .privacy-content {
    margin-top: 0.3in;
  }

  .attorney-headshot {
    width: 2.25in;
    margin-bottom: 0.3in;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  a[href^="http"]:not([href*="traviswestbrook.com"]):not([href*="maps.app.goo.gl"])::after {
    content: " (" attr(href) ")";
    font-family: var(--equity-text), serif;
    font-size: 0.85em;
    font-style: normal;
    word-break: break-all;
  }
}