:root {
  --brand-ink: #18273D;
  --brand-sand: #E4C99C;
  --brand-accent: #FE5131;

  /* Core remap */
  --color--1: var(--brand-ink);
  --base--text-color: var(--brand-ink);
  --outline-color: var(--brand-ink);
}

/* Accent highlights for interactive links */
@media (hover: hover) and (pointer: fine) {
  .c-header .menu_link:hover,
  .c-header .menu_link:focus-visible,
  .c-header .header_cta:hover,
  .c-header .header_cta:focus-visible,
  .c-footer .col_menu .menu_link:hover,
  .c-footer .col_menu .menu_link:focus-visible,
  .c-footer .footer_back-to-top:hover,
  .c-footer .footer_back-to-top:focus-visible,
  .u-btn--1:hover,
  .u-btn--1:focus-visible {
    color: var(--brand-accent);
  }
}

/* Ensure full accent feedback for CTA buttons: text + underline + arrow */
.u-btn--1 {
  color: var(--brand-ink);
}

.u-btn--1:before,
.u-btn--1:after {
  background-color: currentColor;
}

.u-btn--1 .btn_icon:before,
.u-btn--1 .btn_icon:after {
  background-color: currentColor;
  background-image: none;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' fill='none'%3E%3Cpath fill='%23000' d='M8.354 8h-1V1.707L.707 8.354 0 7.646 6.646 1H.354V0h8z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' fill='none'%3E%3Cpath fill='%23000' d='M8.354 8h-1V1.707L.707 8.354 0 7.646 6.646 1H.354V0h8z'/%3E%3C/svg%3E");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 9px 9px;
  mask-size: 9px 9px;
}

/* Secondary tone for section accents */
.c-statement[data-cid] .statement_services-list li:before {
  color: var(--brand-sand);
  opacity: 1;
}

/* Company stats block: tighter composition + stronger visual hierarchy */
#block_46a823e1d05975aeed3418b734da916a .block_media {
  aspect-ratio: auto;
  min-height: clamp(300px, 40vw, 440px);
}

#block_46a823e1d05975aeed3418b734da916a .fs_media-stats {
  top: 50%;
  bottom: auto;
  display: flex;
  gap: clamp(27px, 3.3vw, 54px);
  justify-content: center;
  left: 50%;
  max-width: min(calc(var(--container-max-width-1) - 2 * var(--container-padding)), calc(100% - 40px));
  right: auto;
  transform: translate(-50%, -50%);
  width: auto;
}

#block_46a823e1d05975aeed3418b734da916a .fs_media-stat {
  align-items: center;
  aspect-ratio: 1 / 1;
  backdrop-filter: blur(8px);
  background-color: color-mix(in srgb, var(--brand-ink) 84%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-sand) 62%, transparent);
  border-radius: 10px;
  color: var(--brand-sand);
  display: flex;
  flex: 1 1 0;
  gap: 10px;
  justify-content: center;
  max-width: 360px;
  min-height: 0;
  min-width: 220px;
  padding: clamp(16px, 2vw, 24px);
  text-align: center;
  transition: transform 0.28s var(--transition-ease--1), border-color 0.28s var(--transition-ease--1), box-shadow 0.28s var(--transition-ease--1);
}

#block_46a823e1d05975aeed3418b734da916a .fs_media-stat-value {
  color: var(--brand-sand);
  font-size: clamp(3.1rem, 7.2vw, 5.8rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.9;
}

#block_46a823e1d05975aeed3418b734da916a .fs_media-stat-label {
  color: color-mix(in srgb, var(--brand-sand) 88%, white);
  font-size: clamp(0.95rem, 1.1vw, 1.2rem);
  line-height: 1.15;
}

@media (hover: hover) and (pointer: fine) {
  #block_46a823e1d05975aeed3418b734da916a .fs_media-stat:hover {
    border-color: var(--brand-accent);
    box-shadow: 0 14px 28px rgba(24, 39, 61, 0.34);
    transform: translateY(-3px);
  }
}

@media (max-width: 768px) {
  #block_46a823e1d05975aeed3418b734da916a .block_media {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: clamp(380px, 92vw, 520px);
    padding: 12px;
  }

  #block_46a823e1d05975aeed3418b734da916a .fs_media-stats {
    bottom: auto;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    justify-content: stretch;
    left: auto;
    margin: 0;
    max-width: min(100%, 360px);
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
  }

  #block_46a823e1d05975aeed3418b734da916a .fs_media-stat {
    aspect-ratio: auto;
    gap: 6px;
    max-width: none;
    min-width: 0;
    padding: 14px 16px;
  }

  #block_46a823e1d05975aeed3418b734da916a .fs_media-stat-value {
    font-size: clamp(2rem, 11vw, 2.8rem);
    line-height: 0.95;
  }

  #block_46a823e1d05975aeed3418b734da916a .fs_media-stat-label {
    font-size: clamp(0.9rem, 4vw, 1rem);
    line-height: 1.1;
  }
}

/* Interactive first case */
.case-card .projects_media-forefront {
  transform: none !important;
}

.case-card_custom-image {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
  z-index: 2;
}

.case-card_hint {
  inset: 0;
  position: absolute;
  z-index: 3;
  align-items: center;
  background: rgb(255 255 255 / 88%);
  color: #484848;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  opacity: 0;
  text-align: center;
  transition: opacity 0.3s ease;
}

.case-card_hint-icon {
  align-items: center;
  background: transparent;
  border-radius: 50%;
  display: flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.case-card_hint-icon svg {
  height: 42px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  width: 42px;
}

.case-card_hint-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.case-card_hint:focus-visible,
.case-modal_close:focus-visible,
.case-modal_link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -5px;
}

@media (hover: hover) and (pointer: fine) {
  .case-card .projects_media:hover .case-card_hint,
  .case-card .case-card_hint:focus-visible {
    opacity: 1;
  }
}

@media (hover: none), (pointer: coarse) {
  .case-card {
    cursor: pointer;
  }

  .case-card_hint {
    background: transparent;
    inset: 0;
    opacity: 0;
    pointer-events: none;
  }

  .case-card_hint-icon {
    background: transparent;
    height: 44px;
    width: 44px;
  }

  .case-card_hint-icon svg {
    height: 42px;
    width: 42px;
  }

  .case-card_hint-label {
    display: block;
  }

}

.case-modal {
  background: #f2f0e6;
  color: #171717;
  height: 100dvh;
  max-height: none;
  max-width: none;
  overflow: hidden;
  padding: 0;
  width: 100vw;
}

.case-modal[open] {
  animation: case-modal-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.case-modal[open]::backdrop {
  animation: case-backdrop-in 0.38s ease both;
}

.case-modal.is-closing {
  animation: case-modal-out 0.28s cubic-bezier(0.4, 0, 1, 1) both;
}

.case-modal.is-closing::backdrop {
  animation: case-backdrop-out 0.28s ease both;
}

@keyframes case-modal-in {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes case-modal-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(14px) scale(0.99); }
}

@keyframes case-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes case-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .case-modal[open],
  .case-modal[open]::backdrop {
    animation-duration: 0.01ms;
  }
}

.case-modal::backdrop {
  background: rgb(0 0 0 / 72%);
}

.case-modal_layout {
  display: grid;
  grid-template-columns: minmax(280px, 38vw) 1fr;
  height: 100%;
  min-height: 0;
  position: relative;
}

.case-modal_placeholder {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  padding: 40px;
  position: relative;
  text-align: center;
}

.case-modal_placeholder h2 {
  font-size: clamp(2.6rem, 7vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin-top: 18px;
}

.case-modal_image {
  height: 100%;
  overflow: hidden;
}

.case-modal_image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.case-modal_close {
  align-items: center;
  background: #f2f0e6;
  border: 1px solid rgb(23 23 23 / 30%);
  border-radius: 50%;
  display: flex;
  font-family: Arial, sans-serif;
  font-size: 28px;
  height: 44px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 20px;
  top: 20px;
  width: 44px;
  z-index: 2;
}

.case-modal_content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: clamp(38px, 5vh, 64px) clamp(34px, 5vw, 84px);
}

.case-modal_number {
  font-size: 0.75rem;
  opacity: 0.55;
  text-transform: uppercase;
}

.case-modal_content h2 {
  font-size: clamp(2rem, min(4.2vw, 5.2vh), 4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-top: clamp(10px, 1.8vh, 20px);
  max-width: 900px;
}

.case-modal_sections {
  border-top: 1px solid rgb(23 23 23 / 20%);
  margin-top: clamp(22px, 3vh, 38px);
}

.case-modal_sections > div {
  border-bottom: 1px solid rgb(23 23 23 / 18%);
  display: grid;
  gap: clamp(16px, 2vw, 32px);
  grid-template-columns: minmax(150px, 0.55fr) 1.45fr;
  padding: clamp(9px, 1.35vh, 17px) 0;
}

.case-modal_sections dt {
  font-size: clamp(0.66rem, min(0.82vw, 1.25vh), 0.78rem);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

.case-modal_sections dd {
  font-size: clamp(0.76rem, min(1vw, 1.55vh), 0.98rem);
  line-height: 1.3;
}

.case-modal_link {
  border-bottom: 1px solid currentColor;
  align-self: flex-start;
  display: inline-block;
  font-size: clamp(0.78rem, min(1vw, 1.5vh), 0.95rem);
  margin-top: clamp(14px, 2vh, 24px);
  padding-bottom: 3px;
}

@media (min-width: 769px) and (max-width: 1024px) {
  .c-portfolio-grid .block_projects {
    row-gap: 64px;
  }

  .c-portfolio-grid .block_projects > .projects_item {
    grid-column: span 3;
  }

  .c-portfolio-grid .projects_caption {
    grid-template-columns: 1fr;
    row-gap: 7px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .case-modal_layout {
    grid-template-columns: minmax(280px, 38vw) 1fr;
  }

  .case-modal_content {
    justify-content: flex-start;
    max-height: 100dvh;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 64px clamp(28px, 4vw, 46px) calc(96px + env(safe-area-inset-bottom));
    scrollbar-gutter: stable;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .case-modal_sections > div {
    grid-template-columns: minmax(125px, 0.55fr) 1.45fr;
  }

  .case-modal_close {
    position: fixed;
  }
}

@media (min-width: 641px) and (max-width: 900px) and (orientation: portrait) {
  .case-modal {
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .case-modal_layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 34dvh) minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .case-modal_image {
    height: 100%;
    min-height: 0;
  }

  .case-modal_content {
    display: block;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 44px clamp(32px, 7vw, 58px) calc(96px + env(safe-area-inset-bottom));
    scrollbar-gutter: stable;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .case-modal_content h2 {
    font-size: clamp(2.35rem, 6vw, 3.25rem);
  }

  .case-modal_sections > div {
    grid-template-columns: minmax(150px, 0.5fr) 1.5fr;
    padding: 18px 0;
  }

  .case-modal_sections dt {
    font-size: 0.76rem;
  }

  .case-modal_sections dd {
    font-size: 1rem;
    line-height: 1.4;
  }
}

@media (max-width: 640px) {
  .case-modal {
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .case-modal_layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 34dvh) minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .case-modal_image {
    height: 100%;
    min-height: 0;
  }

  .case-modal_close {
    right: 14px;
    top: 14px;
  }

  .case-modal_content {
    display: block;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 34px 20px calc(88px + env(safe-area-inset-bottom));
    scrollbar-gutter: stable;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .case-modal_content h2 {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
  }

  .case-modal_sections > div {
    display: block;
    padding: 18px 0;
  }

  .case-modal_sections dt {
    font-size: 0.72rem;
  }

  .case-modal_sections dd {
    font-size: 0.95rem;
    line-height: 1.42;
    margin-top: 8px;
  }
}

@media (min-width: 769px) and (max-width: 1120px) {
  #block_46a823e1d05975aeed3418b734da916a .fs_media-stats {
    display: grid;
    gap: clamp(24px, 3vw, 36px);
    grid-template-columns: repeat(2, minmax(220px, 320px));
    justify-content: center;
  }
}

/* Footer alignment */
#page-footer .block_inner {
  padding-top: clamp(48px, 5vw, 90px);
}

@media (min-width: 1281px) {
  #page-footer .block_inner {
    min-height: 360px;
  }
}

#page-footer .footer_main {
  align-items: start;
  justify-items: stretch;
  padding-bottom: clamp(36px, 4vw, 50px);
  text-align: left;
}

#page-footer .footer_logo-wrap,
#page-footer .info_col,
#page-footer .footer_links-wrap,
#page-footer .footer_back-to-top-wrap,
#page-footer .footer_copyright-wrap {
  align-self: start;
  text-align: left;
}

#page-footer .info_col {
  align-items: flex-start;
}

#page-footer .col_menu {
  align-items: flex-start;
}

#page-footer .col_menu .menu_item {
  justify-content: flex-start;
}

#page-footer .footer_bottom {
  box-sizing: border-box;
  justify-items: stretch;
  margin-left: auto;
  margin-right: auto;
  max-width: calc(var(--container-max-width-1) + (2 * var(--container-padding)));
  text-align: left;
}

#page-footer .footer_copyright {
  text-align: left;
}

#page-footer .footer_links .links_menu {
  justify-content: flex-start;
}

@media (max-width: 768px) {
  #page-footer .block_inner {
    padding-top: clamp(40px, 12vw, 56px);
  }

  #page-footer .footer_main {
    --gap-row: 28px;
    padding-bottom: 36px;
  }

  #page-footer .footer_logo-link {
    height: 48px;
    width: 48px;
  }

  #page-footer .info_col {
    gap: 12px;
  }

  #page-footer .col_menu .menu_link {
    line-height: 1.1;
  }

  #page-footer .footer_bottom {
    align-items: start;
    row-gap: 14px;
  }

  #page-footer .footer_links-wrap {
    display: none;
  }

  #page-footer .footer_copyright-wrap {
    grid-column: 1 / 2;
    order: 1;
  }

  #page-footer .footer_back-to-top-wrap {
    grid-column: 2 / 3;
    order: 2;
    text-align: right;
  }

  #page-footer .footer_large-title-wrap {
    padding-bottom: 14px;
    padding-top: 16px;
  }
}
