/* =========================================================
   یارنیکو (Yarnico) - Accounting & Consulting
   Stylesheet
   ========================================================= */

:root {
  color: #10272e;
  background: #f6f3eb;
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f6f3eb;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

::selection {
  color: #10272e;
  background: #e2a56f;
}

.text-balance {
  text-wrap: balance;
}

/* ناوبری */
.nav-link {
  position: relative;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  width: 0;
  height: 1px;
  content: "";
  background: #d99a62;
  transition: width 250ms ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* فرم */
.field-label {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: #425a62;
  font-size: 0.78rem;
  font-weight: 700;
}

.form-field {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgb(23 52 60 / 20%);
  border-radius: 0;
  outline: none;
  background: transparent;
  padding: 0.72rem 0;
  color: #10272e;
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 200ms ease;
}

.form-field::placeholder {
  color: #8f9b9f;
  font-weight: 400;
}

.form-field:focus {
  border-color: #b96835;
}

select.form-field {
  cursor: pointer;
}

/* لوگو */
.logo-mark {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
}

/* انیمیشن ظهور هنگام اسکرول */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* انیمیشن fade-up برای بارگذاری اولیه */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* انیمیشن fade برای تغییر سرویس */
@keyframes serviceFade {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-fade {
  animation: serviceFade 0.35s ease-out;
}

/* استایل مخصوص منوی موبایل */
.mobile-nav-link {
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.mobile-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #e2a56f !important;
}

.mobile-nav-link:hover i {
  transform: translateX(-4px);
  transition: transform 0.3s ease;
}

@keyframes mobileFadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-nav-link {
  animation: mobileFadeIn 0.4s ease-out both;
}

/* در صورت ترجیح کاهش حرکت */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .fade-up,
  .service-fade,
  .mobile-nav-link {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
/* ===== دکمه تعاملی (موج خوانا با افکت چرخش کامل) ===== */
.fancy-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  z-index: 0;
  border: none;
  background-color: #17343c;
  transition: color 0.3s ease;
}

/* متن و آیکون - لایه فوقانی و کاملا خوانا */
.fancy-btn .btn-text,
.fancy-btn i {
  position: relative;
  z-index: 10; /* بالاتر از موج و تمام لایه‌ها */
  color: #ffffff;
  transition:
    transform 0.4s ease-out,
    color 0.3s ease;
  pointer-events: none;
}

/* لایه‌های تشخیص هوور چپ و راست */
.fancy-btn .right,
.fancy-btn .left {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  z-index: 5;
}

.fancy-btn .right {
  left: 66%;
}

.fancy-btn .left {
  right: 66%;
}

/* لایه متحرک اصلی موج (بدون متن اضافه برای جلوگیری از تداخل) */
.fancy-btn .right::after {
  content: "";
  display: block;
  position: absolute;
  pointer-events: none;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background-color: #b96835; /* رنگ موج هنگام هوور */
  transition: transform 0.4s ease-out;
  transform: translate(0, -85%) rotate(0deg);
  z-index: 2;
}

/* حرکت موج هنگام هوور موس */
.fancy-btn:hover .right::after {
  transform: translate(0, -42%) rotate(0deg);
}

.fancy-btn .right:hover::after {
  transform: translate(0, -42%) rotate(-8deg);
}

.fancy-btn .left:hover ~ .right::after {
  transform: translate(0, -42%) rotate(8deg);
}

/* انتقال چرخش افکت به خود متن جهت هماهنگی با موج */
.fancy-btn .right:hover ~ .btn-text,
.fancy-btn .right:hover ~ i {
  transform: rotate(-3deg);
}

.fancy-btn .left:hover ~ .btn-text,
.fancy-btn .left:hover ~ i {
  transform: rotate(3deg);
}

/* انیمیشن حباب‌ها */
.fancy-btn::before {
  content: "";
  pointer-events: none;
  opacity: 0.4;
  background:
    radial-gradient(
      circle at 20% 35%,
      transparent 0,
      transparent 2px,
      #fff 3px,
      #fff 4px,
      transparent 4px
    ),
    radial-gradient(
      circle at 75% 44%,
      transparent 0,
      transparent 2px,
      #fff 3px,
      #fff 4px,
      transparent 4px
    ),
    radial-gradient(
      circle at 46% 52%,
      transparent 0,
      transparent 4px,
      #fff 5px,
      #fff 6px,
      transparent 6px
    );
  width: 100%;
  height: 300%;
  top: 0;
  left: 0;
  position: absolute;
  animation: bubbles 5s linear infinite both;
  z-index: 3;
}

@keyframes bubbles {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(0, -66.666%);
  }
}
