:root {
  --dvy-nav-height: 60px;
  --dvy-nav-inset: 12px;
  --dvy-nav-space: calc(var(--dvy-nav-height) + var(--dvy-nav-inset) * 2);
  scroll-padding-top: var(--dvy-nav-space);
}

body.case-body {
  padding-top: var(--dvy-nav-space);
}

.dvy-home .hero {
  box-sizing: content-box;
  padding-top: var(--dvy-nav-space);
}

.site-header, .case-site-nav {
  position: fixed;
  inset: var(--dvy-nav-inset) 0 auto;
  width: min(calc(100% - 40px), 1240px);
  height: var(--dvy-nav-height);
  margin-inline: auto;
  padding: 0 clamp(14px, 2vw, 26px);
  border: 1px solid #ffffff26;
  border-radius: 16px;
  background: #11110ff5;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px #0003;
  transition: transform 280ms cubic-bezier(.22,.61,.36,1), opacity 220ms ease;
  z-index: 200;
}

.site-header .desktop-nav a { padding-block: 18px; }
.site-header .desktop-nav a::after { bottom: 10px; }
.site-header .header-cta { padding: 8px 12px; border-radius: 8px; }

.dvy-nav-hidden:not(:has(:focus-visible)) {
  transform: translateY(calc(-100% - var(--dvy-nav-inset) - 6px));
  opacity: 0;
  pointer-events: none;
}

.dvy-home .mobile-menu {
  top: calc(var(--dvy-nav-inset) + var(--dvy-nav-height) + 8px) !important;
  right: max(20px, calc((100vw - 1240px) / 2)) !important;
  max-height: calc(100dvh - var(--dvy-nav-space) - 8px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dvy-home .hero-container { padding-top: clamp(24px, 4vw, 52px); }

.dvy-project-cover {
  display: block;
  width: 100%;
  height: auto;
  background: #080807;
}

.dvy-case-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #11110f;
  color: #f5f0e8;
  padding-block: clamp(44px, 8vw, 110px) 24px;
}

.dvy-case-footer .case-container { position: relative; }
.dvy-case-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: -12%;
  width: min(74vw, 700px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #ff612c2b 0 1px, transparent 2px 44px);
  mask-image: linear-gradient(135deg, transparent 15%, #000);
  opacity: .65;
}

.dvy-footer-kicker {
  margin: 0;
  color: #ff783f;
  font: 11px/1.4 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dvy-case-footer h2 {
  max-width: 11ch;
  margin: 20px 0 28px;
  font-size: clamp(44px, 8.4vw, 112px);
  font-weight: 800;
  line-height: .94;
  letter-spacing: -.075em;
  overflow-wrap: anywhere;
}

.dvy-footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #ff612c;
  color: #15110e;
  font-weight: 800;
  transition: background-color .2s ease;
}

.dvy-footer-cta:hover { background: #ff9b72; }
.dvy-footer-cta:focus-visible, .dvy-footer-meta a:focus-visible {
  outline: 2px solid #ff9b72;
  outline-offset: 5px;
}

.dvy-footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 28px;
  justify-content: space-between;
  margin-top: clamp(44px, 8vw, 100px);
  padding-top: 20px;
  border-top: 1px solid #ffffff26;
  color: #d9d0c4;
  font: 11px/1.5 var(--mono);
}

.dvy-footer-meta nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.dvy-footer-meta a:hover { color: #ff9b72; }

@media (max-width: 700px) {
  :root { --dvy-nav-height: 56px; --dvy-nav-inset: 8px; }
  .site-header, .case-site-nav { width: calc(100% - 24px); border-radius: 14px; }
  .dvy-home .mobile-menu { right: 12px !important; }
  .case-site-nav .case-lang { min-height: 40px; }
  .case-page-head h1 { font-size: clamp(54px, 14vw, 100px); }
  .case-page-intro { gap: 18px; }
  .case-page-meta { grid-template-columns: 1fr; }
  .case-caption { flex-wrap: wrap; row-gap: 6px; line-height: 1.45; }
  .case-cta { padding-bottom: 64px; }
  .dvy-footer-meta { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
  .dvy-home .hero { min-height: 640px; height: max(640px, calc(100svh - var(--dvy-nav-space))); }
  .dvy-home .hero-heading { font-size: clamp(42px, 12.7vw, 78px); }
}

@view-transition { navigation: auto; }

::view-transition-old(root) { animation: 210ms ease both dvy-page-out; }
::view-transition-new(root) { animation: 330ms cubic-bezier(.22,.61,.36,1) both dvy-page-in; }

@keyframes dvy-page-out {
  to { opacity: 0; transform: translateY(-6px); }
}
@keyframes dvy-page-in {
  from { opacity: 0; transform: translateY(10px); }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .site-header, .case-site-nav { transition: none; }
}

.dvy-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  vertical-align: -.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-arrow .dvy-icon { display: block; }
.service-row > span .dvy-icon { vertical-align: middle; }
.system-description { align-items: center; gap: .4em; }

@media (max-width: 420px) {
  .case-site-nav .case-back::before { content: none; }
  .case-site-nav .case-back .dvy-icon { font-size: 22px; }
}

@media (max-width: 760px) {
  #process .v11-sticky {
    --process-min-height: 580px;
    top: min(0px, calc(100svh - var(--process-min-height)));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(12px, 2svh, 22px);
    height: auto;
    min-height: max(100svh, var(--process-min-height));
    padding: 28px 16px 22px;
  }

  #process .v11-heading,
  #process .v11-copy-area,
  #process .v11-bottom,
  #process .v11-footnote {
    position: relative;
    inset: auto !important;
    transform: none;
    flex: none;
    width: min(100%, 430px) !important;
  }

  #process .v11-heading { padding: 0 !important; }
  #process .v11-heading h2 {
    font-size: clamp(30px, 8vw, 47px) !important;
    line-height: 1.05;
  }
  #process .v11-heading p { display: block; margin-top: 8px; }
  #process .v11-current-mobile { display: none !important; }
  #process .v11-arc-layer { opacity: .55; }

  #process .v11-copy-list {
    display: grid;
    height: auto !important;
    min-width: 0;
  }
  #process .v11-copy {
    position: relative;
    grid-area: 1 / 1;
    inset: auto;
    min-width: 0;
  }
  #process .v11-copy h3 {
    max-width: 15ch !important;
    font-size: clamp(27px, 7.1vw, 38px) !important;
    overflow-wrap: anywhere;
  }
  #process .v11-copy p { margin-bottom: 12px !important; }
  #process .v11-book {
    min-width: min(240px, 100%) !important;
    margin-top: 16px !important;
  }
  #process .v11-book-arrow .dvy-icon { width: 18px; height: 18px; }
  #process .v11-bottom {
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 2px !important;
    padding: 0;
  }
  #process .v11-counter { justify-self: center; }
  #process .v11-bottom-side { display: none; }
  #process .v11-step-nav { justify-content: center; gap: 2px; }
  #process .v11-nav-dot,
  #process .v11-nav-dot:hover,
  #process .v11-nav-dot.is-active {
    display: grid;
    place-items: center;
    width: 36px;
    height: 44px;
    border: 0;
    background: transparent;
    transform: none;
  }
  #process .v11-nav-dot::before {
    content: '';
    width: 10px;
    height: 10px;
    border: 1px solid #bcb5ab;
    border-radius: 50%;
    background: #f8f6f3;
  }
  #process .v11-nav-dot.is-active::before {
    border-color: #ff6d34;
    background: #ff6d34;
  }
  #process .v11-footnote { padding: 0 !important; }

  .service-row > span { font-size: 21px; }
}

@media (max-width: 600px) {
  .bento-system .system-art {
    width: min(100%, 320px) !important;
    min-height: 0 !important;
    height: auto;
    aspect-ratio: 1;
  }

  .system-art .sys-center {
    position: absolute;
    inset: 50% auto auto 50% !important;
    transform: translate(-50%, -50%) !important;
    width: clamp(54px, 25%, 80px) !important;
    height: auto !important;
    aspect-ratio: 1;
    box-shadow: 0 0 0 7px #ffffff12;
  }

  .system-art .sys-center::before {
    width: 68%;
    height: 68%;
  }

  .system-art .sys-node {
    inset: var(--node-y, 50%) auto auto var(--node-x, 50%) !important;
    width: clamp(44px, 18%, 56px) !important;
    height: auto !important;
    aspect-ratio: 1;
    padding: 0;
    border-radius: 15px !important;
    transform: translate(-50%, -50%) !important;
  }

  .system-art .sys-node.node1 { --node-y: 15%; }
  .system-art .sys-node.node2 { --node-x: 85%; }
  .system-art .sys-node.node3 { --node-y: 85%; }
  .system-art .sys-node.node4 { --node-x: 15%; }

  .system-art .sys-node.node1::before {
    width: 56%;
    height: 56%;
  }
}

#project-brief {
  width: min(510px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  border-radius: 18px;
  overscroll-behavior: contain;
}

#project-brief[open] { animation: brief-enter .25s ease-out both; }

#project-brief .brief-inner { padding: clamp(18px, 5vw, 32px); }
#project-brief .brief-head { align-items: center; padding-bottom: 12px; }
#project-brief .brief-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  cursor: pointer;
}

#project-brief .brief-plan {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 9px;
  border: 1px solid #d9d1c5;
  border-radius: 6px;
  font: 11px var(--mono);
}

#project-brief h2 {
  font-size: clamp(36px, 8vw, 57px);
  letter-spacing: -.07em;
  line-height: .98;
  margin: 14px 0 9px;
}

#project-brief .brief-form { gap: 12px; margin-top: 17px; }
#project-brief .brief-phone {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 9px;
}

#project-brief input,
#project-brief select {
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
  padding: 9px;
  border-radius: 7px;
}

#project-brief :is(input, select, button, a):focus-visible {
  outline: 2px solid #97401f;
  outline-offset: 2px;
}

#project-brief [hidden],
#project-brief .brief-honeypot { display: none; }

#project-brief .brief-form button,
#project-brief .brief-whatsapp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--orange);
  color: #191512;
  font-weight: 750;
  cursor: pointer;
}

#project-brief button:disabled { opacity: .65; cursor: wait; }

#project-brief .brief-result {
  padding: 10px 13px;
  border-radius: 8px;
}

#project-brief .brief-result[data-state="success"] {
  background: #e3eddf;
  color: #244329;
  animation: brief-enter .25s ease-out both;
}

#project-brief .brief-result[data-state="error"] {
  background: #f6e0d8;
  color: #792f20;
}

#project-brief .brief-whatsapp:not([hidden]) {
  display: inline-flex;
  margin-top: 8px;
}

@keyframes brief-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  #project-brief[open],
  #project-brief .brief-result[data-state="success"] { animation: none; }
}
