/* =====================================================================
   VernaSoft — custom.css
   Design system: glassmorphism, teal-blue #1888B8 + sky-cyan #38B8F8
   (matched to VernaSoft logo), Vazirmatn, RTL
   ===================================================================== */

:root {
  --brand: #1888B8;
  --brand-dark: #0E6688;
  --brand-light: #38B8F8;
  --brand-soft: #E6F6FC;
  --ink: #0a1124;
  --ink-soft: #1e293b;
  --body: #475569;
  --muted: #64748b;
  --line: #e7ebf3;
  --surface: #f6fbfe;
  --white: #ffffff;
  --ring: rgba(24, 136, 184, 0.35);
}

/* ---------- Base ---------- */
* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background-color: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(24, 136, 184, 0.18); color: var(--brand-dark); }

/* numbers stay LTR even inside RTL */
.ltr, .num { direction: ltr; unicode-bidi: embed; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #eef4f8; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1888B8, #38B8F8);
  border-radius: 999px;
  border: 3px solid #eef4f8;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-dark); }

/* ---------- Brand gradient text ---------- */
.text-gradient {
  background: linear-gradient(100deg, #1888B8 0%, #38B8F8 45%, #7AD0FA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Glass cards ---------- */
.glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 40px -16px rgba(8, 30, 50, 0.18),
              0 2px 8px -4px rgba(8, 30, 50, 0.08);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(231, 235, 243, 0.9);
}

.card-hover {
  transition: transform .45s cubic-bezier(.2,.7,.2,1),
              box-shadow .45s cubic-bezier(.2,.7,.2,1),
              border-color .45s ease;
  will-change: transform;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px -22px rgba(24, 136, 184, 0.30),
              0 8px 22px -10px rgba(8, 30, 50, 0.16);
  border-color: rgba(24, 136, 184, 0.30);
}

/* ---------- Decorative backgrounds ---------- */
.grid-pattern {
  background-image:
    linear-gradient(to right, rgba(24, 136, 184, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(24, 136, 184, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

.dot-pattern {
  background-image: radial-gradient(rgba(24, 136, 184, 0.14) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 70%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.brand-gradient-bg {
  background:
    radial-gradient(120% 120% at 0% 0%, #1A98C8 0%, #0E6688 55%, #073E52 100%);
}

.brand-gradient-soft {
  background: linear-gradient(135deg, #E6F6FC 0%, #f6fbfe 60%, #ffffff 100%);
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: linear-gradient(135deg, #1888B8, #1AA0D8);
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(24, 136, 184, 0.55);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px -10px rgba(24, 136, 184, 0.65);
  filter: brightness(1.04);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  border: 1.5px solid rgba(24, 136, 184, 0.35);
  color: var(--brand);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  transition: all .25s ease;
}
.btn-outline:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(24, 136, 184, 0.5);
}

/* ---------- Nav link underline ---------- */
.nav-link {
  position: relative;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  right: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: width .28s ease;
}
.nav-link:hover { color: var(--brand); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--brand); }
.nav-link.active::after { width: 100%; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1),
              transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-left { transform: translateX(34px); }
.reveal-right { transform: translateX(-34px); }
.reveal-left.is-visible,
.reveal-right.is-visible { transform: none; }

/* ---------- Animations ---------- */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.animate-floaty { animation: floaty 6s ease-in-out infinite; }
.animate-floaty-slow { animation: floaty 9s ease-in-out infinite; }

@keyframes pulse-ring {
  0% { transform: scale(.92); opacity: .7; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { opacity: 0; }
}
.pulse-ring { position: relative; }
.pulse-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(24, 136, 184, 0.4);
  animation: pulse-ring 2.6s cubic-bezier(.2,.7,.2,1) infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.shimmer {
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 2.4s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track { animation: marquee 26s linear infinite; }

@keyframes spin-slow { to { transform: rotate(360deg); } }
.animate-spin-slow { animation: spin-slow 26s linear infinite; }

@keyframes gradient-pan {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-pan 8s ease infinite;
}

/* ---------- Hero mockup window dots ---------- */
.win-dot { width: 11px; height: 11px; border-radius: 999px; }

/* ---------- Header ---------- */
.site-header {
  transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 6px 24px -14px rgba(8, 30, 50, 0.2);
  border-color: rgba(231, 235, 243, 0.9) !important;
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.mobile-menu.open { max-height: 620px; }

/* ---------- Section heading kicker ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .9rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  border: 1px solid rgba(24, 136, 184, 0.16);
}

/* ---------- Tech badge ---------- */
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .7rem;
  border-radius: 8px;
  font-size: .76rem;
  font-weight: 600;
  background: rgba(24, 136, 184, 0.08);
  color: var(--brand-dark);
  border: 1px solid rgba(24, 136, 184, 0.16);
}

/* ---------- Timeline ---------- */
.timeline-line {
  background: linear-gradient(180deg, var(--brand) 0%, rgba(24,136,184,.15) 100%);
}

/* ---------- Footer ---------- */
.site-footer { background: #06141E; }

.footer-link {
  color: rgba(226, 232, 240, 0.72);
  transition: color .2s ease, transform .2s ease;
}
.footer-link:hover { color: #fff; transform: translateX(-4px); }

/* ---------- Back to top ---------- */
.back-to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .3s ease;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Form ---------- */
.field {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: .85rem 1rem;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
  font-family: inherit;
  font-size: .95rem;
}
.field::placeholder { color: #94a3b8; }
.field:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

/* ---------- Toast ---------- */
.toast {
  transform: translateY(140%);
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.toast.show { transform: translateY(0); }

/* ---------- Utility ---------- */
.no-scroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
