/*
Theme Name: ArbitraLex Theme
Version: 1.0
*/

@layer tokens, fonts, reset, base, components, layouts, sections;

@layer tokens {
  :root {
    --color-navy: #031B41;
    --color-navy-deep: #0A214B;
    --color-beige: #DABF94;
    --color-white: #fff;
    --color-off-white: #F7F5E8;
    --color-light-gray: #F2F2F2;

    --color-text-light: rgb(3 27 65 / 0.7);

    /* RGB helpers (for alpha usage) */
    --color-navy-rgb: 3 27 65;
    --color-bg-rgb: 247 245 232;
    --color-gray-rgb: 242 242 242;
    --color-beige-rgb: 218 191 148;

    --font-text: "Raleway", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-header: "Kontora", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

    --fs-14: 0.78em; /* 14 / 18 */
    --fs-15: 0.83em; /* 15 / 18 */
    --fs-20: 1.11em; /* 20 / 18 */
    --fs-26: 1.44em; /* 26 / 18 */
    --fs-30: 1.67em; /* 30 / 18 */
    --fs-40: 2.22em; /* 40 / 18 */
    --fs-50: 2.78em; /* 50 / 18 */
    --fs-60: 3.33em; /* 60 / 18 */
    --fs-80: 4.45em; /* 80 / 18 */

    --fs-15-dynamic: 16px;
    --fs-26-dynamic: 20px;
    --fs-30-dynamic: 24px;
    --fs-40-dynamic: 32px;
    --fs-50-dynamic: 40px;
    --fs-60-dynamic: 48px;

    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-extrabold: 800;

    --lh-tight: 1.1;
    --lh-normal: 1.35;
    --lh-body: 1.5;

    --ls-wide: 0.02em;
    --ls-extrawide: 0.05em;

    --bp-sm: 768px;    /* tablet / desktop-lite */
    --bp-md: 1024px;   /* base desktop */
    --bp-lg: 1280px;   /* comfortable desktop */
    --bp-xl: 1440px;   /* fine tuning */
    --bp-xxl: 1600px;  /* wide desktop */
    --bp-max: 1920px;  /* hard ceiling */

    --cols: 12;
    --container-max: 2560px;

     /* mobile defaults */
    --outer: 16px;   /* outer margin */
    --gutter: 14px;  /* col gap */

    --content: calc(min(100vw, var(--container-max)) - (var(--outer) * 2));
    --col-width: calc((var(--content) - ((var(--cols) - 1) * var(--gutter))) / 4);    
  }

  /* tablet */
  @media (min-width: 768px) {
    :root {
      --fs-26-dynamic: 1.44em; 
      --fs-30-dynamic: 1.67em; 
      --fs-50-dynamic: 2.78em; 
      --fs-60-dynamic: 3.33em; 
      --fs-15-dynamic: 0.83em;

      --outer: 32px;
      --gutter: 18px;

      --col-width: calc((var(--content) - ((var(--cols) - 1) * var(--gutter))) / var(--cols));    
    }
  }

  /* desktop base */
  @media (min-width: 1024px) {
    :root {
      --outer: 50px;
      --gutter: 20px;
    }
  }

  /* 1440 → 2560: растим пропорционально (x = vw / 1440) */
  @media (min-width: 1440px) {
    :root {
      /* 50 * (2560/1440) = 88.8889 */
      --outer: clamp(50px, calc(50px * (100vw / 1440px)), 88.8889px);

      /* 20 * (2560/1440) = 35.5556 */
      --gutter: clamp(20px, calc(20px * (100vw / 1440px)), 35.5556px);
    }
  }


}

@layer fonts {
  @font-face {
    font-family: "Kontora";
    src: url("assets/fonts/Kontora-SemiBold.otf") format("opentype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: "Kontora";
    src: url("assets/fonts/Kontora-ExtraBold.otf") format("opentype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
  }
}

@layer reset {
  *,
  *::after,
  *::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  :where(html) {
    color-scheme: light dark;
    hanging-punctuation: first allow-end last;
    word-break: break-word;
    interpolate-size: allow-keywords;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    text-size-adjust: none;
    tab-size: 2;
    -webkit-text-size-adjust: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
  }

  :where(html.translated-rtl) {
    direction: rtl;
  }

  @media (prefers-reduced-motion: reduce) {
    :where(html) {
      scroll-behavior: auto;
    }
  }

  :where(body) {
    min-block-size: 100svb;
    min-inline-size: 300px;
  }

  :where(canvas, img, picture, svg, video) {
    block-size: auto;
    border: none;
    display: block;
    max-inline-size: 100%;
  }

  :where(button, input, progress, select, textarea) {
    appearance: none;
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    hanging-punctuation: none;
    line-height: inherit;
    text-align: start;
    touch-action: manipulation;
  }

  :where(button) {
    cursor: pointer;
    user-select: none;
  }

  :where(textarea) {
    resize: vertical;
  }

  :where(textarea:not([rows])) {
    field-sizing: content;
  }

  :where(fieldset, iframe) {
    border: none;
  }

  :where(p, li, h1, h2, h3, h4, h5, h6) {
    overflow-wrap: break-word;
    text-wrap: pretty;
  }

  :where(abbr[title]) {
    border: none;
    text-decoration: none;
  }

  :where(cite) {
    font-style: inherit;
  }

  :where(small) {
    font-size: inherit;
  }

  :where(li, ol, ul) {
    list-style: none;
  }

  :where(dialog, [popover]) {
    background: transparent;
    border: none;
    color: inherit;
    margin: auto;
    max-block-size: none;
    max-inline-size: none;
    position: fixed;
  }

  :where([popover]) {
    inset: auto;
  }

  :where(dialog:not([open], [popover]), [popover]:not(:popover-open)) {
    display: none;
  }

  :where([hidden]:not([hidden="until-found"])) {
    display: none !important;
  }

  :target {
    scroll-margin: 3rlh;
  }
}

@layer base {
  html {
    font:
      clamp(1rem, 1rem + 0.15vw, 2rem) / var(--lh-body) system-ui,
      sans-serif;
  }

  body {
    font-family: var(--font-text);
    font-weight: var(--fw-medium);
    color: var(--color-navy);
  }

  h1,
  h2 {
    
  }
  h1,
  h2,
  h3 {
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    text-wrap: balance;
    font-family: var(--font-header);
    font-weight: var(--fw-semibold);

    strong {
      font-weight: inherit;
      color: var(--color-beige);
    }
  }

  a {
    color: var(--link-color);
    text-underline-offset: 2px;
    &:not(:is(:hover, :focus)) {
      text-decoration-color: color-mix(in srgb, currentColor, transparent 50%);
    }
  }

  p {
    /*font-size: var(--fs-15-dynamic);*/
  }

  sub,
  sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    inset-block-end: -0.25em;
  }
  sup {
    inset-block-start: -0.5em;
  }

  .title-small {
    font-size: var(--fs-15-dynamic);
    line-height: var(--lh-tight);
    font-weight: var(--fw-extrabold);
  }

  @media screen and (min-width: 768px) {
    h2.title-small {
      font-size: 1em;
    }
  }

  .title-mid {
    font-size: var(--fs-30-dynamic);
    line-height: var(--lh-tight);
  }

  .title-big {
    font-size: var(--fs-40-dynamic);
    line-height: var(--lh-normal);
  }

  .title-extra {
    font-size: var(--fs-60-dynamic);
    line-height: var(--lh-tight);
  }

  .color-beige {
    color: var(--color-beige);
  }

  hr {
    border-style: solid;
    border-width: 1px 0;    
    height: 0;
    overflow: visible;
  }

  .hr-short {
    width: var(--fs-40);  
    color: var(--color-beige);
    display: inline-block;
  }

  .btn {
    font-family: var(--font-header);
    font-size: var(--fs-14);
    font-weight: var(--fw-extrabold);
    letter-spacing: var(--ls-wide);
    height: 2.86em;
    padding-inline: 1.43em;
    display: inline-grid;
    justify-content: center;
    align-content: center;
    text-decoration: none;
  }

  .btn-navy {
    background-color: var(--color-navy);
    color: var(--color-off-white);
  }

  .btn-beige {
    background-color: var(--color-beige);
    color: var(--color-off-white);
  }

  .page-inner h2.title-small:first-child {
    margin-bottom: 1em;
  }

  @media screen and (min-width: 1024px) {
    .page-inner h2 + h3 {
      max-width: 60vw;
    }
    
    .page-inner h2.title-small:first-child {
      margin-bottom: 2em;
    }
  }
}

@layer layouts {
  .col-3 {
    display: grid;
  }

  @media screen and (min-width: 1024px) {
    .card-6 {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      grid-gap: var(--gutter);
    }
  }

  .page-inner {
    margin: var(--fs-40) var(--outer);
  }

  @media screen and (min-width: 1024px) {
    .page-inner {
       margin-block: var(--fs-60); 
    }
  }

  .page-home .section, .header, .footer {
    .container {
      max-width: var(--container-max);
      margin-inline: var(--outer);
      display: grid;
    }
  }
}

@layer components {

  .header {     
    position: relative;
    z-index: 2;
    display: grid;
    align-content: center;

    .container {
      height: 5.4em;   
    }

  }
  
  .header-home {  
    margin-bottom: -5.4em;   

    .container {
      border-bottom: 1px solid rgba(var(--color-bg-rgb) / 0.2); 
    }

    .logo-name {
      fill: var(--color-off-white);
    }

    .nav-mobile {
      svg {
        fill: var(--color-off-white);
      }
    }
  }

  .header-inner {
    .container {
      border-bottom: 1px solid rgba(var(--color-navy-rgb) / 0.1); 
    }

    .menu-primary {
      font-weight: var(--fw-semibold);

      a {
        color: var(--color-navy);
      }

      .current-menu-item, .current_page_parent {
        & > a {
          color: var(--color-beige);
        }
      }
    }

    .logo-name {
      fill: var(--color-navy);
    }
  }

  .menu-primary {
    display: flex;
    flex-direction: row;    
    gap: 1.6em;
    font-family: var(--font-header);
    font-weight: var(--fw-extrabold);
    font-size: var(--fs-15-dynamic);
    letter-spacing: var(--ls-wide);
    margin-right: 0.6em;

    a {
      text-decoration: none;
      color: var(--color-off-white);

      &:hover {
        color: var(--color-beige);
      }
    }
  }



  .header-inside {
    display: grid;
    grid-template-columns: 1fr max-content max-content max-content;
    align-items: center;
    grid-gap: var(--gutter);
  }

  .nav-primary {
    display: none;
  }

  .nav-mobile {
    svg {
      fill: var(--color-navy);
      height: var(--fs-20);
    }
  }

  .mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 1000;
  }

  .mobile-menu.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-panel {
    background: var(--color-beige);
    height: 100%;
    width: 100%;
    max-width: 100%;
    transform: translateX(100%);
    transition: transform .35s ease;
    padding: var(--fs-40);
    display: grid;
    grid-gap: var(--fs-40);
    grid-template-rows: min-content 1fr;
    overflow: scroll;
  }

  .mobile-menu.is-open .mobile-menu-panel {
    transform: translateX(0);
  }
  
  .mobile-menu-close, .popup-close {
    justify-self: end;
    cursor: pointer;

    svg {
      height: var(--fs-40-dynamic);
      fill: var(--color-off-white);
    }
  }

  nav.nav-mobile {
    padding-bottom: var(--col-width);
    font-size: var(--fs-30-dynamic);
    font-family: var(--font-header);
    font-weight: var(--fw-semibold);
    display: grid;
    justify-content: center;
    align-content: center;

    a {
      color: var(--color-off-white);
    }

    li {
      margin-bottom: 1em;
    }

    .menu-item-about {
      display: none;
    }
    
    .sub-menu {
      font-size: 0.8em;
      margin-top: .5em;
      margin-left: .5em;

      li {
        margin-block: .25em 0;
      }
    }
  }

  /* Accessibility helper */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
  }

  @media (max-height: 768px) and (orientation: landscape) {
    nav.nav-mobile li {
      margin-bottom: .5em;
    }
  }

  @media (min-width: 1024px) {
    .mobile-menu-panel {
      width: 40vw;
      box-shadow: 0 0 40px rgba(0,0,0,.15);
      margin-left: auto;
    }

    nav.nav-mobile {
      font-size: var(--fs-26-dynamic);
    }
  }

  @media (min-width: 1024px) {
    .mobile-menu-panel {
      max-width: 30vw;
    }

    .nav-primary {
      &.nav-left {
        display: block;
      }

      
      .sub-menu {
        display: none;

        a {
          color:  var(--color-off-white);

          &::before {
            content: "•";
            margin-right: .5em;
          }
        }
      }

      .menu-item-has-children {
        position: relative;

        &::after {                 
          content: "";
          position: absolute;
          left: 0;
          right: 0;
          top: 100%;
          height: .5em;
        }

        &:hover, &:focus-within {
          .sub-menu {
            display: flex;
            flex-direction: column;
            position: absolute;
            gap: .75em;
            background-color: var(--color-navy);
            padding: calc(var(--gutter) / 2) var(--gutter);
            width: max-content;
            top: calc(100% + .5em);
            left: calc(var(--gutter)*(-1));
          }
        }
      }
    }

    
  }

  @media screen and (min-width: 1320px) {   
    .header-inside { 
      grid-gap: 0;
      grid-template-columns: 1fr max-content max-content;
    }

    .nav-primary.nav-right {
      display: flex;
    }

    .nav-primary .menu-item-about {
      display: none;
    }

    .header-logo {}

    .nav-mobile {
      display: none;
    }

    .nav-right {
      flex-direction: row;
      justify-content: end;
      align-items: center;  
    }

    .menu-primary {
      margin-right: 1.6em;
    }
  }

  @media screen and (min-width: 1600px) {   
    .header-inside { 
      grid-template-columns: 5fr 2fr 5fr;
    }

    .header-logo {
      grid-column-start: 2;
      justify-content: center;
    }

    .nav-left {
      grid-column-start: 1;
      grid-row-start: 1;
    }
  }


  .header-logo {
    display: grid;

    svg {
      height: 2.6em;
      max-height: var(--fs-60);
      width: auto;
    }

    .logo-sign {
      fill: var(--color-beige);
    }
  }

  .footer {
    margin-block: var(--fs-40) var(--fs-20);
  }

  nav:has(.footer-menu) {
    background-color: var(--color-navy);
    display: grid;
    align-content: center;
    margin-bottom: var(--fs-40);
    padding-block: var(--fs-40);
  }

  .footer-menu {
    font-family: var(--font-header);
    letter-spacing: var(--ls-wide);
    font-weight: var(--fw-semibold);
    grid-template-columns: 1fr 1fr;
    grid-gap: var(--gutter) var(--col-width);
    display: grid;
    justify-self: center;

    li {
      font-size: var(--fs-15-dynamic);
    }

    a {
      text-decoration: none;
      color: var(--color-off-white);

      &:hover {
        color: var(--color-beige);
      }
    }

    li:last-child {
      a {
        color: var(--color-beige);
      }
    }
  }

  .footer-logo svg {
    width: 100%;
    max-width: 8em;
  }

  .footer-content {
    font-family: var(--font-header);
    margin-bottom: var(--fs-80);    
    display: grid;
    grid-row-gap: var(--fs-40);
    max-width: 260px;
    justify-self: center;
    justify-items: center;
    text-align: center;
    
    div {
      display: grid;
    }
  }

  .footer-title {
    font-size: var(--fs-14);
    letter-spacing: var(--ls-extrawide);
    color: rgba(var(--color-navy-rgb) / 0.4);
    font-weight: var(--fw-extrabold);
    text-transform: uppercase;
    text-align: center;
  }

  .footer-text {
    font-size: var(--fs-20);
    margin-block: .5em;
    font-weight: var(--fw-semibold);
    line-height: var(--lh-normal);

    .icon {
      width: 1em;
    }
  }

  .footer-link {
    a {
      color: var(--color-beige);
      font-size: var(--fs-15-dynamic);
      font-weight: var(--fw-extrabold);
      letter-spacing: var(--ls-wide);
    }

    .icon {
      fill: var(--color-beige);
      width: 0.6em;
    }
  }

  .footer-link:has(.icon), .footer-text:has(svg) {
    display: flex;
    align-items: center;
    gap: 1em;    
    justify-self: center;
  }

  .footer-copy {
    font-size: var(--fs-14);
    color: var(--color-text-light);

    .disclaimer {
      border: 1px solid rgb(var(--color-navy-rgb) / 0.2);
      padding: 1em;
      margin-block: 2em;
    }

    .menu {
      display: flex;
      flex-direction: row;
      gap: 2em;
    }

    div:has(p+nav) {
      display: flex;
      flex-direction: column;
      gap: var(--gutter);      
    }
  }

  @media screen and (min-width: 768px) {
    .footer-copy {
      div:has(p+nav) {
        justify-content: space-between;
        flex-direction: row;
      }
    }

    .footer-content {
      grid-template-columns: repeat(4, 1fr);
      gap: var(--col-width);
      justify-items: start;
      text-align: left;
      max-width: none;

      hr {
        display: none;
      }

      .linkid {
        align-self: start;
        padding-top: .3em;
      }
    }
    .footer-title {
      text-align: left;
    }

    .footer-link:has(.icon), .footer-text:has(svg) { 
      justify-self: start;
    }

    .footer-menu {
      gap: 1em var(--fs-40);
      flex-wrap: wrap;
      flex-direction: row;
      max-width: none;
      font-weight: var(--fw-extrabold);
      
        li {
        font-size: var(--fs-14);
      }
    }

    nav:has(.footer-menu) {
      padding-block: var(--fs-20);
    }
  }

  @media screen and (min-width: 1024px) {
    .footer-content {
      .linkid {
        align-self: centerZ;
        padding-top: 0;
      }
    }
    .footer-menu {
      justify-content: space-between;
      gap: inherit;
      justify-self: unset;
    }

    nav:has(.footer-menu) {
      height: var(--fs-60);
    }
  }
}

@layer sections {
  .section:not(.hero-1) {
    margin-bottom: var(--col-width);
  }
    
  .section img {
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: cover;
  }  

  .hero {      
    display: grid;
    grid-gap: var(--gutter);
  }
  
  .hero-1 {
    background: url(assets/svg/sign-bg.svg) -10vw -12em no-repeat var(--color-navy-deep);
    background-size: 36em;
    color: var(--color-off-white);

    .hero div {
      padding-block: calc(6.2em + var(--fs-40)) var(--fs-80);
      padding-inline: var(--fs-40);
    }

    h1 {
      margin-bottom: .75em;
    }
  }

  .hero-2 {
    background-color: var(--color-light-gray);

    div:first-child {
      padding: var(--fs-40);
    }

    h2 {
      font-size: var(--fs-20);
      letter-spacing: var(--ls-wide);
    }

    .title-extra {
      margin-top: .75em;
    }

    img {    
      height: 40vh;
    }
  }

  @media screen and (min-width: 768px) {
    .section:not(.hero-1) {
      margin-bottom: 6.5em;
    }

    .hero div {
      min-height: calc(22em + 5.4em);
    }

    .hero-1 {
      .hero div {
        padding-block: calc(6.2em + var(--col-width)) 0;
        padding-inline: calc(var(--col-width) * 3 + var(--gutter) * 3 + var(--outer)) 0;
      }

      h1 {
        max-width: 50vw;
      }
    }
    
    .hero-2 {
      grid-template-columns: 1fr 2fr;

      img {
        height: auto;
        min-height: 29em;        
        object-fit: cover;
      }

      .title-extra {
        margin-top: 1em;
      }
      
      div:first-child {
        padding: 4.7em 0 0 0;
        margin-left: var(--outer);
      }
    }

    @media screen and (min-width: 1280px) {
      .hero-2 {
        grid-template-columns: calc(var(--col-width) * 3 + var(--gutter) * 2 + var(--outer)) 1fr;
      }

    }
  }

  .profile {
    .title-mid {
      line-height: var(--lh-normal);

      strong {
        color: var(--color-text-light);
      }
    }

    p {
      margin-block: 1em 2em;
      font-size: var(--fs-15-dynamic);
    }

    .btn {
      width: max-content;
    }

    .title-small {
      color: var(--color-beige);
      transform: rotate(90deg);
      transform-origin: left;
      width: max-content;


    }
    .profile-title {
      /*overflow: hidden;*/
      width: 40%;
      height: 100%;
      border-right: 1px solid var(--color-beige);
    }
  }

  .profile-text + img {
    max-height: 50vh;
    margin-block: var(--fs-40);
    width: 100%;
    object-fit: cover;
  }

  
  .profile-sign {      
    img {
      display: none;
    }

    svg {
      fill: var(--color-beige);
      width: var(--fs-80);        
      height: var(--fs-80);
    }
  }

  @media screen and (min-width: 1024px) {
    .profile {
      .container {
        display: grid;
        grid-template-columns: 5fr 4fr 2fr;
        grid-gap: var(--gutter);
      }
    }

    .profile-text {
      padding-right: 20%;
      display: grid;
      grid-template-rows: auto auto 1fr;
    }

    .profile-sign {      
      display: grid;
      grid-template-rows: 1fr auto;

      img {
        display: initial;
      }

      svg {
      justify-self: end;}
    }

    .profile-text + img {
      margin-block: 0;
      max-height: none;
    }
  }
    

  .expertise {
    .container {
      display: grid;        
      grid-gap: var(--gutter);
    }

    .title-big {
      line-height: var(--lh-tight);
      margin-bottom: 0.75em;

      &::before {
        content: "";
        width: var(--fs-20);
        height: 0;
        border-width: 1.5px 0 0;
        border-style: solid;
        margin-bottom: 0.75em;
        display: block;
      }
    }

    .title-mid {
      margin-bottom: 1em;
    }

    a {
      text-decoration: none;
      display: grid;
      grid-template-columns: 13em max-content;

      &:hover {
        text-decoration: underline;
      }

      &:not(:last-of-type) {
        margin-bottom: 1em;
      }
    }

    svg {
      width: 0.6em;
      height: 0.6em;
      margin-top: .4em;
    }

    p {padding-right: var(--fs-20);}
  }

  .expertise-2, .expertise-3, .expertise-4 {
    padding-inline: var(--fs-80);
    padding-block: var(--fs-80);
    display: grid;
    align-content: center;
  }

  .expertise-1 {
  }

  .card-navy {
    background-color: var(--color-navy);
    color: var(--color-off-white);

    h3, span {
      color: var(--color-beige);
    }

    * {
      border-color: var(--color-beige);
    }

    svg {
      fill: rgb(var(--color-bg-rgb) / 0.5);
    }

    .title-mid {
      color: var(--color-beige);
    }
  }

  @media screen and (min-width: 1024px) {
    .card-navy svg {
      fill: transparent;
    }
  }

  .card-beige {
    background-color: var(--color-beige);
    color: var(--color-off-white);

    svg {
      fill: var(--color-off-white);
    }

    * {
      border-color: var(--color-off-white);
    }
  }

  .card-gray {
    background-color: var(--color-light-gray);    
    color: var(--color-navy);

    p {
     color: var(--color-text-light); 
    }

    svg {
      fill: var(--color-navy);
    }

    h3:before {
      border-color: var(--color-text-light);
    }

  }

  @media screen and (min-width: 1024px) {  
    .expertise {
      .container {
        grid-template-columns: repeat(3, 1fr);
      }      
    }
    
    .expertise-2, .expertise-3, .expertise-4 {
      padding-block: 0;
      min-height: 15em;
    }

    .expertise-1, .expertise-2 {
      grid-row: span 2;
    }

    .expertise-1 {
      padding-right: calc(25% + 20px);
    }
  }


  .experience {
    text-align: center;
    display: grid;
    justify-content: center;

    .container {
      width: 66vw;
      max-width: 49em;
    }

    ul {
      display: grid;
      grid-gap: var(--col-width)
    }

    h2 {
      margin-bottom: var(--fs-30);;
    }

    hr {
      margin-block: var(--fs-40);
      justify-self: center;
    }

    p {
      font-size: var(--fs-15-dynamic);
      margin-top: var(--fs-15);
      color: var(--color-text-light);
    }

    .title-mid {
      font-size: var(--fs-26-dynamic);
    }
  }

  @media screen and (min-width: 1024px) {
    .experience {
      ul {
        display: flex;
        justify-content: space-between
      }

      li {
        max-width: 11.45em;
        width: 20%;
      }
    }    
  }

  .advantages {
    .container {
      padding-inline: var(--fs-40);
      padding-block: var(--fs-80);
      background-color: var(--color-light-gray);
      display: grid;
      grid-gap: var(--fs-60);
      align-content: center;
    }
    
    .title-extra {
      margin-bottom: .5em;
    }

    p {
      font-size: var(--fs-15-dynamic);
      color: var(--color-text-light);
      margin-bottom: 2em;
    }
  }

  .advantages-list {
    display: grid;
    grid-gap: var(--fs-40) var(--gutter);
    grid-template-columns: repeat(auto-fit, minmax(9em, 1fr));

    .title-small {
      font-size: var(--fs-15-dynamic);
      line-height: var(--lh-normal);
      letter-spacing: var(--ls-wide);
      text-wrap: balance;
      max-width: 9em;
    }

    svg {
      height: var(--fs-50-dynamic);
      fill: var(--color-beige);
    }

    li {
      display: grid;
      grid-template-rows: var(--fs-50-dynamic) auto;
      grid-gap: var(--gutter);
    }
  }

  .testimonials {
    .container {
      display: grid;
      padding-inline: var(--fs-40);        
      grid-gap: var(--fs-40);
    }

    a {
      color:var(--color-beige);
      font-size: var(--fs-15-dynamic);
    }
  }

  .testimonial-card {
    
    p {
        font-family: var(--font-header);
        font-weight: var(--fw-semibold);
        font-size: var(--fs-20);
        padding-right: 10%;
    }

    p:last-child {
      font-size: var(--fs-15-dynamic);      
      color: var(--color-text-light);
      margin-top: 1.3em;

      &::before {
        content: "— ";
      } 
    }
  }
    
  @media screen and (min-width: 1024px) {
    .advantages {
      .container {
        padding-block: 4em 4.7em;
        min-height: 26em;
      
        padding-inline: calc(var(--col-width) + var(--gutter));
      }
    }

    .advantages-title {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-gap: var(--gutter);
      align-content: end;

      .title-extra {
        max-width: 7em;
        margin-bottom: 0;
      }
    }
    
    .advantages-list {
      grid-template-columns: repeat(5, 1fr);

      .title-small {
        font-size: 1em;
        max-width: 70%;
      }
    }  

    .testimonials {
      .container {
        padding-inline: calc(var(--col-width) + var(--gutter));
        grid-template-columns: repeat(3, 1fr);
        grid-gap: var(--fs-40) var(--fs-20);
      }

      a {
        grid-column-start: 2;
      }
    }
  }

 

  .section-cta {

    img {    
      height: 100%;
    }

    ul {
      display: flex;
      border-top: 1px solid rgb(var(--color-navy-rgb) / 0.1); 
      padding-top:  var(--fs-20);
      margin-top:  var(--fs-40);
      gap: 1em;
      align-self: end;
      flex-wrap: wrap;
      gap: .5em;
    }

    li {
      font-size: var(--fs-15-dynamic);
      display: block;
    }

    .title-extra {
      font-size: var(--fs-50-dynamic);
      margin-bottom: 0.6em;
    }

    .title-small {
      margin-bottom: 2em;
      line-height: var(--lh-normal);
    }

    .section-cta-text {
      height: 100%;
      display: grid;
      grid-template-rows: auto 1fr auto;
      padding: var(--fs-60-dynamic);
    }

    .btn {
      justify-self: start;
    }
  }

  .cta-light {
    .container {
      background-color: var(--color-light-gray);
    }

    ul {
      border-top: 1px solid rgb(var(--color-navy-rgb) / 0.1); 
    }
  }

  .cta-beige {
    .container {
      background-color: var(--color-beige);
      color: var(--color-off-white);
    }

    ul {
      border-top: 1px solid rgba(var(--color-bg-rgb) / 0.4); 
    }
  }

  .cta-navy {
    .container {
      background-color: var(--color-navy);
      color: var(--color-off-white);
    }

    h2 {
      color: var(--color-beige);
    }

    ul {
      border-top: 1px solid rgba(var(--color-bg-rgb) / 0.1); 
      
      li {
        color: rgba(var(--color-bg-rgb) / 0.6); 
      }
    }
  }


  @media screen and (min-width: 768px) {
    .section-cta .container {
      min-height: 24em;
      display: grid;
      grid-template-columns: 1fr 1fr;
      grid-gap: var(--gutter);
    }

    .section-cta {
      h2 {
        max-width: 30vw;
      }

      ul {
       gap: 1em;
      }
    }
  }

  .litigation-hero {

    figure:has(img) {
      padding-block: var(--fs-40);
    }

    h2 {
      line-height: var(--lh-normal);
      margin-top: .5em;
    }
  }

  @media screen and (min-width: 1024px) {
    .litigation-hero {
      figure:has(img) {
        padding-block: 0;
      }
    
      .wp-block-group__inner-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: var(--fs-40) var(--fs-20);

        div:has(h1) {
          grid-column: span 2;
          max-width: 65vw;
        }
      }

      p {
        padding-inline: 0 calc(var(--col-width) + var(--gutter));
      }
    }
  }

  .litigation-menu {

    .wp-block-group__inner-container {
      display: grid;
      grid-gap: var(--gutter);
    }

    h2 {
      margin-bottom: .6em;
    }

    .card {
      display: grid;
      grid-template-columns: 1fr 3fr;
      grid-gap: var(--gutter);
      padding-inline: 0 var(--fs-40);
      padding-block: var(--fs-40);

      span {
        font-size: var(--fs-40-dynamic);
        font-family: var(--font-header);
        font-weight: var(--fw-semibold);
        text-align: center;
        opacity: .2;
        line-height: 2em;
      }
    }

    .title-mid {
      font-size: var(--fs-26-dynamic);
      font-family: var(--font-header);

      &:before {
        content: "";
        width: 1.54em;
        height: 0;
        border-width: 1.5px 0 0;
        border-style: solid;
        margin-bottom: 0.75em;
        display: block;
      }
    }

    a {
      text-decoration: none;
    }

    figure img {
      min-height: 20vh;
      object-fit: cover;
    }
  }

  .litigation-card {

    .wp-block-group__inner-container {
      display: grid;
      grid-gap: var(--fs-40);
    }

    .title-big {
      line-height: var(--lh-tight)
    }

    &.light-bg {
      padding: var(--fs-40);
    }

    li {
      list-style-position: outside;
      display: grid;
      grid-template-columns: min-content 1fr;
      grid-gap: .3em;

      &:not(:last-child) {
        margin-bottom: .5em;
      }

      &::before {
        content: "•";
        color: currentColor;
      }
    }
    
    ul + p {
      grid-row-start: 3;
    }

    .litigation-card-add {
      h4 {
        border-top: 1px solid rgba(var(--color-navy-rgb) / 0.2);
        margin-bottom: var(--fs-40);
        padding-top: var(--fs-40);
      }
    }
  }

  @media screen and (min-width: 1024px) {
      .litigation-menu {
        h2 {
          /*margin-left: calc(var(--col-width) + 20px);*/
        }
      }

      .card {
        padding-inline: 0;
        padding-block: var(--fs-50) 0;
      }

      .litigation-menu-inside {
        figure {
          grid-column: span 3;

          img {
            max-height: 100%;
            width: 100%;
          }
        }

        .wp-block-group__inner-container {
          grid-template-columns: 1fr 1fr 1fr;
          grid-template-rows: 12em 12em;
        }        
      }

      .litigation-card {
        .wp-block-group__inner-container {
          grid-template-columns: 8fr 4fr;
          grid-row-gap: var(--fs-20);
        }

        h3, p {
          margin-inline: calc(var(--col-width) + 20px);
        }

        h3 {
          max-width: 60%;          
          align-self: end;
        }

        h4:not(:first-child) {
          grid-column-start: 2;
          grid-row-start: 1;
          align-self: end;
        }
        
        ul {
          margin-right: var(--fs-40);
          
          &:not(:last-child) {
            grid-row: span 2;
          }
        }

        li {
          font-size: var(--fs-15-dynamic);
          color: var(--color-text-light);
        }
        
        ul + p {
          font-size: var(--fs-15-dynamic);
          color: var(--color-text-light);
          align-self: end;
          grid-row-start: initial;
        }

        .litigation-card-add {
          .wp-block-group__inner-container {
            display: block;
          }

          h4, ul {
            margin-inline: calc(var(--col-width) + 20px);
          }
        }

        &.light-bg {
          padding-block: var(--fs-80);
          padding-inline: 0;
        }
      }
  }

  .approach-hero {

    .wp-block-group__inner-container {
      display: grid;
    }

    .wp-block-image {
      grid-row-start: 3;
      padding-block: var(--fs-40);
    }

    .title-mid {
      line-height: var(--lh-normal);
    }
  }

  .approach-menu {

    .wp-block-group__inner-container {
      grid-gap: var(--gutter);
      display: grid;
    }
    
    .card {
      padding: var(--fs-40);
    }

    h4 {
      font-size: var(--fs-20);
      line-height: var(--lh-normal);

      &:before {
        content: "";
        width: 2em;
        height: 0;
        border-width: 1.5px 0 0;
        border-style: solid;
        margin-bottom: 1.5em;
        display: block;
      }
    }

    .card-navy:before {
      border-color: var(--color-beige);
    }
  }

  .approach-menu + hr {
    display: none;
  }

  .approach-img {
    margin-top: var(--col-width);

    .wp-block-group__inner-container {
      display: flex;
      flex-direction: column;
      gap: var(--fs-40);
      align-items: center;
    }

    .title-mid {
      font-size: var(--fs-26-dynamic);
      line-height: var(--lh-normal);
    }

    H5 + p {
      font-size: var(--fs-15-dynamic);
      color: var(--color-text-light);
    }

    img {
      min-height: 30vh;
      object-fit: cover;
    }

    .litigation-card {
      padding: 0 var(--fs-40) var(--fs-40);

      h3 {
        margin-bottom: 1em;
      }
    }
  }

  @media screen and (min-width: 1024px) {
    .approach-hero {

      .wp-block-group__inner-container {
        grid-template-columns: 8fr 4fr;
        grid-column-gap: var(--gutter);
        grid-template-rows: min-content 1fr;
      }

      .wp-block-image {
        grid-row: span 2;
        padding: 0;
      }
    }

    .approach-menu {
      .wp-block-group__inner-container {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
      } 
      
      .card {
        padding: 3em 4em;
      }
    } 

    .approach-menu + hr {
      display: grid;
      justify-self: center;
      margin-bottom: var(--fs-80);
    }


    .approach-img {
      margin-inline: calc(var(--col-width)*2 + var(--fs-20)*2);
      margin-top: 0;

      .wp-block-group__inner-container {
        gap: var(--fs-80);
      }

      img {
        max-height: none;
      }

      .litigation-card {      
        display: grid;
        grid-gap: var(--col-width);
        grid-template-columns: 1fr 1fr;
        padding: 0;

        h3, p {
          margin-inline: 0;
          max-width: none;
          margin-bottom: 0;
        }
      }
    }
  }

  .about-hero {
    margin-bottom: var(--fs-40);

    .title-mid {
      line-height: var(--lh-normal);
      margin-top: 1em;
    }

    .wp-block-image {
      padding-block: var(--fs-40);
    }
  }

  .about-info {
    background-color: var(--color-light-gray);
    padding: var(--fs-40);
    display: grid;
    grid-gap: var(--fs-40);

    figure + p {
        padding-block: 1em;
        font-family: var(--font-header);
        font-weight: var(--fw-semibold);
        color: var(--color-text-light);
        display: grid;
        grid-template-columns: 1fr var(--fs-20);
        border-bottom: 1px solid rgba(var(--color-navy-rgb) / 0.1);;

        strong {          
          font-size: var(--fs-26-dynamic);
          font-weight: var(--fw-semibold);
          color: var(--color-navy);
        }      
      }

      p {
        &:not(:last-child) {
          margin-bottom: 1em;
        }
      }

      a:has(svg) {
        justify-self: end;
        padding-top: .5em;
      }

      svg {
        width: var(--fs-20);
      }
  }

  .about-short {
    display: grid;
    background-color: var(--color-light-gray);
    padding: var(--fs-40);
    
    h3 {
      margin-bottom: 1.3em;

    }

    p {
      font-size: var(--fs-26-dynamic);
      font-family: var(--font-header);
      font-weight: var(--fw-semibold);
      line-height: var(--lh-normal);
    }

    em {
      color: var(--color-text-light);
      font-style: normal;
    }

    hr {
      margin-block: 2em;
    }

    p:has(br) {
      font-size: var(--fs-20);
      margin-block: calc(var(--fs-20)/4) var(--fs-20);

      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  .about-list {
    display: grid;
    grid-gap: var(--gutter);
    padding-inline: var(--fs-40);
    
    div {
      display: grid;
      grid-template-rows: auto ;

    }

    p {
      font-size: var(--fs-20);
      font-family: var(--font-header);
      font-weight: var(--fw-semibold);
      line-height: var(--lh-normal);
      margin-bottom: 1em;

      &:last-child {
        font-size: var(--fs-15-dynamic);
        color: var(--color-text-light);
      }
    }

    em {
      color: var(--color-text-light);
      font-style: normal;
    }
  }

  .about-text {
    margin-block: var(--fs-40) var(--fs-80);
    display: grid;
    justify-content: center;
    
    h2, p, h3 {
      max-width: 45vw;
      text-align: center;
    }

    .title-big {
      line-height: var(--lh-normal);
      margin-block: 1em;
    }
  }

  .about-cards {
    margin-bottom: var(--fs-80);

    .card {
      padding: var(--fs-40);

      p {
        font-size: var(--fs-15-dynamic);
      }

      .title-mid {
        font-size: var(--fs-26-dynamic);
        margin-bottom: 1em;

        &:before {
          content: "";
          width: 1.5em;
          height: 0;
          border-width: 1.5px 0 0;
          border-style: solid;
          margin-bottom: 1.5em;
          display: block;
        }
      }
    }
  }

  @media screen and (min-width: 1024px) {
    .about-hero {
      margin-bottom: var(--fs-80);

      .wp-block-group__inner-container {
        display: grid;
        grid-template-columns: 8fr 4fr;
        grid-gap: var(--gutter) calc(var(--col-width) + var(--gutter));
        grid-template-rows: min-content 1fr;
      }

      .wp-block-image {
        grid-row: span 3;
        padding: 0;
      }

      h2, p {
        max-width: 60vw;
      }

      p {
        font-size: var(--fs-20);
        margin-bottom: 1em;
      }
    }

    .about-info {
      grid-template-columns: 4fr 8fr;
      grid-gap: calc(var(--col-width) + var(--gutter));
      padding-inline: calc(var(--col-width) + var(--gutter));
      padding-block: var(--fs-80);
    }

    .about-short {
      grid-template-columns: 1fr 1fr;
      grid-gap: calc(var(--col-width) * 2 +  var(--gutter) * 3);
      margin-bottom: var(--fs-80);      
      padding-block: var(--fs-60);
      padding-inline: calc((var(--col-width) + var(--gutter)) * 2);

      hr:first-child {
        display: none;
      }
    }

    .about-list {
      grid-template-columns: repeat(3, 1fr);
      grid-gap: calc(var(--col-width) + var(--gutter)*2);
      padding-inline: 0;
      text-align: center;
    }

    .about-cards {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-gap: var(--gutter);
    }
  }

  .page-inner .light-bg {
    background-color: var(--color-light-gray);
  }

  .page-inner {
    section:not(.approach-hero) {
      margin-bottom: var(--fs-60);
    }

    &:has(.wp-block-image:last-child), section:has(+ .section-cta) {
      margin-bottom: var(--gutter);      
    }
  }
  

  @media screen and (min-width: 1024px) {
    .page-inner section.wp-block-group:not(.approach-hero) {
      margin-bottom: var(--fs-80);
    }
  }

  .page-id-18 {
    .page-inner {
      display: grid;
      grid-gap: var(--gutter);
    }

    .wp-block-group {
      padding: var(--fs-40);
    }

    h2 {
      margin-bottom: 1em;
    }

    p {
      font-size: var(--fs-15-dynamic);

      &:not(:last-of-type) {
        margin-bottom: 1em;
      }
    }

    h2 + p {
      font-weight: var(--fw-semibold);
      font-size: var(--fs-20);
      color: inherit;
    }

    p + .btn {
      margin-top: 3em;
    }
  }

  @media screen and (min-width: 1024px) { 
    .page-id-18 {
      .page-inner {
        grid-template-columns: 1fr 1fr;
      }

      .wp-block-group {
        padding: var(--col-width);
     }
    }
  }

  .page-id-16 {
    h2:has(+ h3) {
      /*font-size: var(--fs-20);*/
      margin-bottom: 1.5em;
    }
  }

  .page-id-21 {
    h2 + p, h3 + p {
      margin-block: 0 2em;
    }

    .title-small {
      font-size: 1em;
    }

    .title-small + p, .title-big + p {
      color: var(--color-text-light);
      font-size: 1em;
    }

    .title-small + .profile-list, p + .profile-list {
      margin-top: 1em;
    }
  }

  @media screen and (min-width: 768px) { 
    h2 + p, h3 + p {
      max-width: 60vw;
    }
  }

  .title-small:has(+ .counsel-profile-hero) {
    font-size: 1em;
  }

  .counsel-profile-hero {
    .title-mid {
      font-size: var(--fs-30-dynamic);
      line-height: var(--lh-normal);
      margin-bottom: 1em;
    }

    p {
      font-size: var(--fs-20);
      align-self: end;

      &:not(:last-of-type) {
        margin-bottom: 1em;
      }
    }

    figure:has(img) {
      grid-row-start: 2;
      padding-top: var(--fs-40);
    }

    &:not(:first-child) {
      margin-top: var(--fs-40);
    }
  }

  .profile-list-numbers {
    font-family: var(--font-header);
    font-style: var(--fs-20);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-normal);
    font-size: var(--fs-20);
    counter-reset: item;
    margin-block: 2em 3em;

    li {
      counter-increment: item;
      padding-right: 1em;
      display: grid;
      grid-template-columns: var(--col-width) 1fr;
    }

    li::before {
      content: counter(item, decimal-leading-zero);      
      font-size: 2em;
      justify-self: center;
      color: rgba(var(--color-navy-rgb) / 0.1);
      line-height: 1;
    }
  }

  .profile-list {
    font-family: var(--font-header);
    font-style: var(--fs-20);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-normal);
    font-size: var(--fs-20);
    margin-block: 2em 3em;
    display: grid;
    grid-gap: var(--gutter);

    li {
      background-color: rgba(var(--color-gray-rgb) / 0.5);
      padding: var(--fs-20);
    }
  }


  .profile-with-img {
    border-top: 1px solid var(--color-beige);
    padding-top: var(--gutter);
    margin-block: 0 var(--fs-40);

    .wp-block-image {
      padding-bottom: var(--fs-40);
    }
  }

  .counsel-profile-hero, .profile-with-img {
    & > .wp-block-group__inner-container {
      display: grid;
      grid-gap: var(--gutter);
    }
  }


  @media screen and (min-width: 1024px) {
    .counsel-profile-hero {
      div .wp-block-group__inner-container {
        height: 100%;
        display: grid;
      }

      .title-mid, p {
        max-width: 40vw;
        margin-left: var(--col-width);
      } 
      
      figure:has(img) {
        grid-row-start: initial;
        padding-top: 0;
      }
    }


    .profile-list {
      grid-template-columns: repeat(3, 1fr);
    }

    .profile-with-img {
      padding-top: var(--fs-60);
      border-bottom: 1px solid var(--color-beige);
      
      figure.wp-block-image {
        padding: 0 var(--col-width) 0 0;

        img {
          object-fit: cover;
        }
      }
    }
    
    .counsel-profile-hero, .profile-with-img {
      & > .wp-block-group__inner-container {
        grid-template-columns: 4fr 8fr;
      }
    }

    .profile-with-img {  
      .profile-list {
        grid-template-columns: repeat(2, 1fr);
      }
    }
  }

  .page-reviews {
    border: 1.5px solid var(--color-beige);
    padding: var(--fs-40);
    margin-top: var(--fs-80);
    
    & > .wp-block-group__inner-container {      
        display: grid;
        grid-gap: var(--fs-40);
    }

    p:last-child {
      font-size: var(--fs-15-dynamic);
      color: var(--color-text-light);
      margin-block: 1em var(--fs-40);

      &::before {
        content: "— ";
      }    
    }
  }

  @media screen and (min-width: 1024px) {
    .page-reviews {      
      padding-inline: 0;
      padding-block: var(--fs-80);

      & > .wp-block-group__inner-container {
        grid-template-columns: repeat(3, 1fr);
        grid-gap: var(--gutter);

        .wp-block-group {
          padding-inline: var(--fs-20) var(--col-width);
        }
      }

      p:last-child {
        margin-block: 1.3em 0;
      }

      h2 {
        margin-left: var(--fs-20);
      }
    }
  }

  .pub-hero {
    margin-bottom: var(--fs-40);

    figure {
      padding-block: var(--fs-40);
    }
  }

  .pub-list > .wp-block-group__inner-container {
    display: grid;
    grid-gap: var(--gutter);
  }

  .pub-card {
    background-color: var(--color-light-gray);
    padding: var(--fs-60);

    .wp-block-group__inner-container {
      display: flex;
      flex-direction: column;
      gap: var(--fs-30);
    }

    &.card-beige {
      background-color: var(--color-beige);

      .pub-title, .pub-sub {
        color: var(--color-navy);
      }

      .pub-role, .pub-info {
        color: var(--color-off-white);
      }
      
      *::after, *::before {
        border-color: var(--color-off-white);
      }
    }
  }

  .pub-title {
    font-family: var(--font-header);
    font-size: var(--fs-26-dynamic);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-normal);
  }

  .pub-sub {
    font-family: var(--font-header);
    font-size: var(--fs-20);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-normal);

    &::after {
      margin-top: 2em;
    }
  }


  .pub-sub::after, .pub-title + .pub-role::before {
    content: "";
    width: 2em;
    height: 0;
    border-width: 1.5px 0 0;        
    border-style: solid;
    display: block;
    border-color: var(--color-text-light);
  }

  .pub-role {
    font-family: var(--font-header);
    font-weight: var(--fw-extrabold);
    line-height: var(--lh-normal);

    &::before {
      margin-bottom: 2em;
    }
  }

  .pub-info {
    color: var(--color-text-light);
  }

  @media screen and (min-width: 768px) {
    .pub-list > .wp-block-group__inner-container {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media screen and (min-width: 1024px) {
    .pub-hero .wp-block-group__inner-container {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: 1fr min-content min-content;
      gap: var(--gutter);

      h1, h2, h3 {
        grid-column: span 2;
      }

      h3 {
        margin: 0;
      }

      .wp-block-image {
        grid-row: span 3;
        padding: 0;
      }
    } 

    .pub-list > .wp-block-group__inner-container {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .page-id-27 {
    h3 {
      font-size: var(--fs-20);
      margin-block: 1em 2em;
    }
  }

  .page-privacy {
    max-width: 80vw;
    margin: 3em auto;

    h1 {
      text-align: center;
      margin-bottom: 1em;
    }

    p {
      margin-bottom: 1em;
    }

    h2 {
      margin-block: 1em .5em;
    }
  }

  @media screen and (min-width: 768px) {
    .page-privacy {
      max-width: 60vw;
    }
  }

  .service-note {
    border: 1px solid var(--color-navy);
    margin-bottom: var(--fs-40);
    padding: var(--fs-20);
    color: var(--color-text-light);

    .title-small {
      text-transform: uppercase;
      font-family: var(--font-header);
      margin-bottom: .5em;
    }

    p:not(.title-small) {
      font-size: var(--fs-15-dynamic);
    }
    
    a {
      font-weight: var(--fw-semibold);
    }
  }

  .page-id-23 {
    h3.title-mid {
/*      font-size: var(--fs-26-dynamic);*/
    }
  }

  .mediation-hero {
    display: grid;
    grid-gap: var(--gutter);

    .title-mid, p {
      margin-block: 1em;
    }

    .title-mid {
      line-height: var(--lh-normal)
    }

    p {
      color: var(--color-text-light);
    }    
  }

  .mediation-main {
    .title-mid {
      line-height: var(--lh-normal);
    }
  }

  .mediation-img {
    text-align: center;
    margin-inline: var(--fs-40);

    img {
      min-height: 30vh;
      object-fit: cover;
    }

    p {
      margin-block: var(--fs-40);
    }

    hr {
      margin-top: var(--fs-80);
    }
  }

  .mediation-cols {
    display: grid;
    grid-gap: var(--gutter);
    margin-bottom: var(--fs-80);

    .title-big {
      line-height: var(--lh-tight);
      margin-bottom: 1em;

      &:before {
      content: "";        
      width: 1em;
      height:0;
      border-width: 1.5px 0 0;        
      border-style: solid;
      margin-bottom: 1em;
      display: block;
      }
    }

    p:not(:last-child) {
      margin-bottom: 1em;
    }

    .card {
      padding: var(--fs-40);
    }

  }

  .mediation-text {
    display: grid;
    grid-gap: var(--fs-40);

    div {
      padding-inline: var(--fs-40);
    }

    .title-mid {
      font-size: var(--fs-26-dynamic);
      margin-bottom: 1em;
    }

    p {
      font-size: var(--fs-15-dynamic);
      color: var(--color-text-light);

      &:not(:last-child) {
        margin-bottom: 1em;
      }
    }
  }

  .mediation-grid {
    margin-top: var(--fs-40);
    display: grid;
    grid-gap: var(--gutter);

    .card {
      background-color: var(--color-light-gray);

      &:has(h4) {
        padding: var(--fs-40);
      }
    }
    
    figure:has(img) {    
      display: grid;
      overflow: hidden;        
      align-content: center;

      img {
        width: 100%;
        max-height: 35vh;
      }
    }

    h4 {
      margin-bottom: 1em;
      font-size: 1em;
      
      &::before {
        content: "";
        width: 2.2em;
        height: 0;
        border-width: 1.5px 0 0;
        border-style: solid;
        border-color: rgba(var(--color-navy-rgb) / .2);
        margin-bottom: 2em;
        display: block;
      }
    }

    p {
      font-size: var(--fs-15-dynamic);
      color: var(--color-text-light);
    }

    .wp-block-image img {
      height: 100%;
      object-fit: cover;
    }
  }

  @media screen and (min-width: 768px) {

    .mediation-hero {
      grid-template-columns: 8fr 4fr;

      div {
        padding-right: var(--col-width);
      }
    }

    .mediation-img {
      margin-inline: calc(var(--col-width)*2 + var(--fs-20)*2);
      margin-top: 0;
      text-align: center;

      img {
        max-height: none;
      }
    }

    .mediation-cols {
      grid-template-columns: 1fr 1fr;

      .card {
        padding: var(--fs-80) var(--col-width);
      }
    }

    .mediation-text {
      grid-template-columns: repeat(2, 1fr);
      grid-gap: var(--fs-80) var(--gutter);

      div {
        padding-inline: var(--col-width);
      }
    }

    .mediation-grid {
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: repeat(3, 20em);

      figure:has(img) {    
        align-content: stretch;  
             
        img {
          max-height: unset;
        } 

        &:first-of-type, &:last-of-type {
          display: none;
        }
      }
    }
  }

  @media screen and (min-width: 1024px) {
    

    .mediation-main {
      .title-mid  {
        max-width: 50vw;
      }
    }

    .mediation-grid {
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: repeat(2, 22em);
    }
  }

  @media screen and (min-width: 1280px) {

    .mediation-grid {
      grid-template-columns: repeat(4, 1fr);
      grid-template-rows: auto;

      figure:has(img) {      
        
        &:first-of-type, &:last-of-type {
          display: initial;
        }
      }
    }
  }

  .post-template-default {
    display: grid;
  }

  .page-blog {
    display: grid;
    justify-content: center;

    .blog-header {
      text-align: center;
      margin-block: var(--fs-40);
    }

    article {
      display: grid;
      margin-bottom: var(--fs-80);
      grid-gap: var(--gutter);

      h2 {
        margin-bottom: 1em;
      }

      .post-author {
        background-color: initial;
        padding-inline: 0;
        margin-top: 1em;
        padding-block: .5em 0;
        border-top: 1px solid rgba(var(--color-navy-rgb) / .2);
        grid-template-columns: var(--fs-40) 1fr;
        align-items: center;
      }
    }
  }

  .posts-list, .page-post {
    width: 90vw;
    max-width: 60em;
  }

  .post-meta {
    font-family: var(--font-header);
    font-size: var(--fs-15-dynamic);
    font-weight: var(--fw-semibold);
    color: var(--color-text-light);
    letter-spacing: var(--ls-wide);
    margin-bottom: 1em;

    .post-reading {
      margin-left: 1em;

      &::before {
        content: "•";
        margin-right: 1em;
      }
    }
  }

  .post-excerpt {
    font-size: var(--fs-15-dynamic);
    color: var(--color-text-light);
  }

  .post-author {
    display: grid;
    grid-template-columns: var(--fs-80) 1fr;
    grid-gap: 0  var(--gutter);
  }

  .details-card {    
    background-color: var(--color-light-gray);
    padding: var(--fs-20);

    h2 {
      grid-column: span 2;
      font-size: 0.7em;
      letter-spacing: var(--ls-extrawide);
      color: rgba(var(--color-navy-rgb) / 0.5);
      text-transform: uppercase;
      margin-bottom: 1em; 
      padding-bottom: 1em;     
      border-bottom: 1px solid rgba(var(--color-navy-rgb) / 0.1);
    }

    dl {
      font-family: var(--font-header);
      font-size: var(--fs-14);
      font-weight: var(--fw-semibold);
      color: var(--color-text-light);
      letter-spacing: var(--ls-wide);
      display: grid;
      grid-template-columns: auto max-content;
      grid-gap: 1em;
    }

    dd {
      color: var(--color-navy);
      justify-self: end;
      text-align: right;
    }
  }

  .author-card-img img {
    border-radius: 50%;
  }

  .author-card-content {
    font-size: var(--fs-14);
    color: var(--color-text-light);
    line-height: var(--lh-normal);
    margin-top: 1em;
    grid-column: span 2;
  }

  .post-hero {
    text-align: center;
    margin-block: var(--fs-40);
    display: grid;
    justify-items: center;

    h1 {
      line-height: var(--lh-tight);
      margin-bottom: .5em;
    }

    p {
      max-width: 80vw;
    }
  }

  .post-cover {
    padding-bottom: var(--gutter);

    img {
      width: 100%;
      max-height: 45vh;
      object-fit: cover;
    }
  }

  .page-post {
    display: grid;
    justify-content: center;
    justify-self: center;

    article {}

    .post-author {
        margin-top: 1em;
        grid-template-columns: var(--fs-40) 1fr;
        align-items: center;
      }
    }

  .post-content {
    margin-bottom: var(--fs-80);
    grid-row-start: 2;

    p:not(:last-child) {
      margin-bottom: 1em;
    }

    a {
      color: var(--color-beige);
    }

    h2 {
      margin-bottom: .5em;
    }

    h3.title-big {
      margin-top: 1em;
    }

    h3 + h4 {
      border-top: 1px solid var(--color-beige);
      padding-top: 1em;
      margin-top: 1em;
    }

    h4, h5 {
      font-size: 1.2em;
      font-weight: var(--fw-extrabold);
      letter-spacing: var(--ls-wide);
      text-wrap: initial;
      line-height: var(--lh-normal);
    }

    h4 {
      margin-block: .5em 1em;
    }

    h5 {
      font-size: 1.2em;
      margin-bottom: .5em;
    }

    h4 + p {
      font-style: italic;
    }

    ul {
      margin-bottom: 1.5em;
    }

    li {
      padding-left: .3em;
      margin-left: .3em;       
      list-style-position: outside;

      &:not(:last-child) {
        margin-bottom: .5em;
      }

      &::marker {
        content: "•";
        color: currentColor;
      }
    }
  }

  hr:has(+.blog-cta) {
    margin-top: var(--fs-40);
  }

  .blog-cta {
    margin-top: var(--fs-20);
    font-style: italic;

    a {
      color: var(--color-beige);
    }
  }

  .blog-quote {
    background-color: var(--color-beige);
    padding: var(--fs-30);
    color: var(--color-off-white);
    margin-bottom: 1em;

    h3 {
      font-size: var(--fs-26-dynamic);
      margin-bottom: .25em;
    }
  }

  .post-body {
    display: grid;
    grid-row-gap: var(--fs-40);
  }

  @media screen and (min-width: 1024px) {
    .page-blog {
      .blog-header {        
        margin-block: var(--fs-80);
      }

      article {
        grid-template-columns: 1fr 1fr;
        grid-gap: var(--col-width);
      }

      figure {
        img {
          height: 100%;
          object-fit: cover;
        }
      }      
    }

    .post-hero {
      margin-block: var(--fs-80) var(--fs-40);    
      
      p {
        max-width: 60vw;
      }
    }
    
    .page-post {
      .post-body {
        margin-block: var(--fs-40);
        display: grid;
        grid-template-columns: auto minmax(14em, calc((var(--col-width) * 2 + var(--fs-20)*3)));
        grid-gap: var(--col-width);
      }
    }

    .post-content {
      margin-bottom: 0;
      grid-row-start: initial;
    }
    
  }

  body.is-gate-open {
   overflow: hidden;
  }

  .contact-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    
   &.is-open {
      display: grid;
      place-items: center;
    }
  }

.contact-gate__backdrop {
  position: absolute;
  inset: 0;
    background: rgba(0,0,0,.4);
}

.contact-gate__dialog {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  background: #fff;
  padding: var(--fs-40);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 0 40px rgba(0,0,0,.15);

  h2 {
    margin-block: 1em;
  }
}

/* Typography */
.contact-gate__content {
  font-size: var(--fs-15-dynamic);

  p {
    margin-bottom: 1em;
  }

  li {
    margin-bottom: 1em;

    ul {
      margin-top: 1em;
    }
  }
  
  ul ul li {
    display: grid;
    grid-template-columns: min-content 1fr;      
    grid-gap: .3em;

    &:not(:last-child) {
      margin-bottom: .5em;
    }

    &::before {
      content: "•";        
      color: currentColor;
    }
  }
    
}


.page-contact {
  display: grid;

  &>div:first-child {
    padding-bottom: var(--fs-40);
    margin-bottom: var(--fs-40);
    border-bottom: 1px solid var(--color-beige);
  }

  .title-mid {
    margin-bottom: 1em;
  }

  .title-small {
    margin-bottom: 1em;
    &:not(h3 + h4) {
      margin-top: 2em;
    }
  }

  a {
    color: var(--color-beige);
    font-weight: var(--fw-semibold);
  }

  .linkid svg {
    height: var(--fs-20);
  }

}

@media (min-width: 768px) {
  .page-contact {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: var(--gutter);

    &>div {
      padding-inline: calc(var(--col-width) + var(--gutter));
    }

    &>div:first-child {
      border-bottom: none;
      border-right: 1px solid var(--color-beige);
      margin-bottom: 0;
    }
  }
  }

  .popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 1000;
  }

  .popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
  }

  .popup-dialog {
    position: relative;
    background: #fff;
    max-width: 600px;
    width: 100%;
    margin: var(--gutter);
    padding: var(--fs-20) var(--fs-40);
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-gap: var(--fs-40);

    .title-mid {
      margin-bottom: 0;
    }
  }

  .popup-close svg {
    fill: var(--color-text-light);
  }

}


/* overwrites */

figure:has(img) { 
  margin: 0 !important; 
}

.mediation-grid {    
  .wp-block-image img {
    height: 100%;
    object-fit: cover;
  }
}

@media screen and (min-width: 768px) {
  .footer .footer-menu {
    display: flex;
  }
}

.ff_t_c {
  font-size: var(--fs-15);
}

.page-form {
  .ff-default .ff-el-form-control {
    border-radius: 2px !important;
    font-size: var(--fs-15-dynamic);
    color: var(--color-navy) !important;
    border-color: rgb(var(--color-navy-rgb) / 0.2) !important;
    padding: 0.75em 1em !important;
    font-family: inherit !important;

  }

  .ff-default .ff-el-input--label label {
    font-size: var(--fs-15-dynamic);
    color: var(--color-text-light) !important;
    font-family: var(--font-header);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wide);
  }
}