:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-smooth: cubic-bezier(.65, 0, .35, 1);
}

/* Motion enhances the page; the unenhanced document remains fully visible. */
/* Keep the RTL page anchored to the viewport; wide tracks scroll only inside their own containers. */
html { scrollbar-gutter: stable; width: 100%; max-width: 100%; overflow-x: hidden; }
body { min-width: 0; width: 100%; max-width: 100%; overflow-x: clip; }
main { width: 100%; min-width: 0; max-width: 100%; overflow-x: clip; contain: inline-size; }
.container { min-width: 0; max-width: 100%; }
main > [data-section] { min-width: 0; max-width: 100%; }
/* Keep both phrases balanced, with type sized to the available text column. */
.hero-copy { container-type: inline-size; min-width: 0; }
.hero h1 {
  display: flex;
  flex-direction: column;
  gap: .06em;
  font-size: clamp(28px, 12cqw, 60px);
  line-height: 1.5;
  letter-spacing: 0;
  margin-block: 22px 24px;
  text-align: start;
}
.hero-title-line { display: block; text-wrap: balance; }
.hero-title-line [data-cms] { white-space: normal; }
.motion-pending { opacity: 0; }
.motion-pending:focus-within { opacity: 1; }
.site-header { transition: box-shadow .4s, background .4s; }
.site-header.is-scrolled { background: #f8fafcf0; box-shadow: 0 8px 32px #17253e09; }
.site-header::after {
  content: ''; position: absolute; inset: auto 0 -1px;
  height: 2px; background: var(--blue); pointer-events: none;
  transform: scaleX(var(--scroll-progress, 0)); transform-origin: right;
}
.desktop-nav a::before {
  content: ''; position: absolute; right: 0; bottom: 5px;
  height: 2px; width: 100%; border-radius: 2px; background: var(--blue);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.desktop-nav a:hover::before { transform: scaleX(1); }
.button {
  transition: background .25s, transform .45s var(--ease-out), box-shadow .35s, border-color .25s;
}
.button svg, .text-link svg, .art-caption svg {
  transition: transform .45s var(--ease-out);
}
.button:hover svg, .text-link:hover svg { transform: translateX(-4px); }
.button:hover svg:has(use[href="#up-left"]) { transform: translate(-3px, -3px); }
.button:active { transform: translateY(0) scale(.98); }
.circle-arrow { transition: background .25s, transform .45s var(--ease-out); }
.text-link:hover .circle-arrow { transform: rotate(-10deg); }

.hero-art { perspective: 1000px; }
.hero-art .poster > img { position: absolute; inset: 0; }
.art-caption-link { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.art-caption-link > span:last-child { display: flex; flex-direction: column; font-size: 9px; color: var(--muted); line-height: 1.8; }
.art-caption-link > .caption-label { font-size: 12px; font-weight: 700; color: var(--navy); }
.art-orbits { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; z-index: -1; }
.poster-front { translate: calc(var(--depth-x, 0px) * 1.15) calc(var(--depth-y, 0px) * 1.15); }
.poster-back { translate: calc(var(--depth-x, 0px) * -.55) calc(var(--depth-y, 0px) * -.55); }
.art-stamp { translate: calc(var(--depth-x, 0px) * 1.6) calc(var(--depth-y, 0px) * 1.6); }
.art-word { translate: calc(var(--depth-x, 0px) * -.3) calc(var(--depth-y, 0px) * -.3); }
.art-orbit::after {
  content: ''; position: absolute; left: 50%; top: -4px;
  width: 7px; height: 7px; border-radius: 50%; background: #8eadd5;
  box-shadow: 0 0 0 5px #c2d5ed44;
}
.orbit-two::after { width: 5px; height: 5px; top: -3px; background: #b2c8e7; }
.art-orbit { animation: orbit-turn 28s linear infinite; animation-play-state: paused; }
.orbit-two { animation-duration: 38s; animation-direction: reverse; }
.hero-art.is-in-view .art-orbit { animation-play-state: running; }
@keyframes orbit-turn { to { transform: rotate(360deg); } }
.word-mark::after {
  transform-origin: right;
  animation: ink-reveal 1s .48s var(--ease-out) both;
}
@keyframes ink-reveal {
  from { transform: rotate(-3deg) scaleX(0); }
  to { transform: rotate(-3deg) scaleX(1); }
}

.service { position: relative; overflow: hidden; }
.service::after {
  content: ''; position: absolute; right: 0; bottom: 0; left: 0;
  height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--ease-out);
}
.service:hover::after, .service:focus-visible::after { transform: scaleX(1); }
.service-top > svg { transition: transform .55s var(--ease-out); }
.service:hover .service-top > svg { transform: translateY(-4px) rotate(-5deg); }
.service-link svg { transition: transform .4s var(--ease-out); }
.work-grid { align-content: start; }
.work-section { overflow-anchor: none; }
.work-image {
  transform: perspective(1000px) rotateX(var(--card-rx, 0deg)) rotateY(var(--card-ry, 0deg));
  transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out);
}
.work-image > img { transition: transform .9s var(--ease-out); }
.work-image::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at var(--shine-x, 50%) var(--shine-y, 30%), #ffffff28, transparent 65%);
  transition: opacity .5s;
}
.work-card:hover .work-image { box-shadow: 0 18px 36px -18px #17253e77; }
.work-card:hover .work-image::after { opacity: 1; }
.work-open { transition: transform .5s var(--ease-out), background .25s, color .25s; }
.work-card:hover .work-open { transform: rotate(-8deg); }
.filter { transition: background .25s, border-color .25s, color .25s, transform .4s var(--ease-out); }
.filter:active { transform: scale(.96); }
.metrics strong { font-variant-numeric: tabular-nums; }
.metrics strong .count-visual { font: inherit; color: inherit; letter-spacing: inherit; }
.bar-line i { transform-origin: right; }
.package { transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out); }
.package:hover { transform: translateY(-7px); box-shadow: 0 18px 40px -22px #17253e44; }
.steps li { transition: border-color .3s; }
.steps li:hover { border-color: #90b8f0; }
.step-number { transition: color .3s, transform .5s var(--ease-out); }
.steps li:hover .step-number { color: #adcfff; transform: translateX(-4px); }
.faq-list details { overflow: hidden; }
.faq-list summary:focus-visible { outline-offset: -3px; border-radius: 4px; }
.faq-list summary > span { transition: transform .4s var(--ease-out); }
.contact-form input, .contact-form select, .contact-form textarea {
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.contact-form :is(input,select,textarea):focus { background: #fff; box-shadow: 0 0 0 4px #076cf008; }
.contact-number > svg { transition: transform .5s var(--ease-out), background .3s; }
.contact-number:hover > svg { transform: rotate(-10deg); background: #ffffff50; }
.back-top > span { transition: transform .45s var(--ease-out); }
.back-top:hover > span { transform: translateY(-5px); }
.project-dialog::backdrop { animation: backdrop-in .4s ease both; }
.project-dialog.is-closing::backdrop { animation: backdrop-out .22s ease both; }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.dialog-close { transition: transform .4s var(--ease-out), background .2s; }
.dialog-close:hover { transform: rotate(90deg); background: #eaf0f7; }

@media (max-width: 650px) {
  .art-caption { gap: 7px; padding-inline: 12px; }
  .art-caption-link { gap: 6px; }
  .art-caption-link b { font-size: 11px; }
  .art-caption-link > .caption-label { font-size: 10px; }
  .mobile-menu {
    position: absolute; top: 100%; right: 0; left: 0;
    background: #f8fafc; border-bottom: 1px solid var(--line); box-shadow: 0 16px 26px #17253e0b;
  }
}
@media (max-width: 370px) {
  .hero-gallery-button { width: 28px; }
  .art-caption-link > span:last-child { font-size: 8px; }
  .art-caption-link > .caption-label { font-size: 9px; }
  .art-caption-link b { font-size: 10px; }
}
@media (hover: none) {
  .package:hover, .button:hover { transform: none; }
  .work-image { transform: none; }
  .work-card:hover .work-image > img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motion-pending { opacity: 1; }
  .poster, .art-stamp, .art-word { translate: none; }
  .work-image, .package:hover { transform: none; }
}
