/* ==========================================================================
   modern.css — visual modernization overlay for the ПроКонсалт site.
   Loaded AFTER the Webflow stylesheet so these rules refine the existing look
   without altering the original markup or layout structure.
   ========================================================================== */

:root {
  --m-accent: #5E18EB;
  --m-accent-2: #8b46ff;
  --m-accent-soft: rgba(94, 24, 235, .12);
  --m-ink: #0d0d14;
  --m-ring: rgba(94, 24, 235, .35);
  --m-shadow-sm: 0 2px 8px rgba(16, 24, 40, .06);
  --m-shadow-md: 0 12px 32px -8px rgba(16, 24, 40, .14);
  --m-shadow-lg: 0 28px 60px -18px rgba(31, 18, 64, .28);
  --m-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ----- Global typography & rendering polish ----------------------------- */
html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
}

h1, h2, h3, .title-2, .step-main-title, .team-title,
.work-title-first, .quote-text {
  letter-spacing: -0.022em;
}

::selection { background: var(--m-accent-soft); color: var(--m-ink); }

/* Smooth, modern custom scrollbar */
* { scrollbar-color: rgba(94,24,235,.4) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: rgba(94,24,235,.35);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background-clip: content-box; background-color: rgba(94,24,235,.6); }

/* ----- Buttons ---------------------------------------------------------- */
.button,
.button-wrapper-new,
.w-button {
  transition: transform .35s var(--m-ease),
              box-shadow .35s var(--m-ease),
              background-color .3s var(--m-ease),
              color .3s var(--m-ease) !important;
  will-change: transform;
}

.button:hover,
.w-button:hover {
  background-color: var(--m-accent) !important;
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -12px var(--m-ring);
}

.button-wrapper-new:hover { transform: translateY(-2px); }

.button:active,
.w-button:active { transform: translateY(-1px); }

/* ----- Cards: steps, testimonials, team, projects ----------------------- */
.step-box-main,
.testimonial-wrapper,
.team-wrapper {
  transition: transform .45s var(--m-ease),
              box-shadow .45s var(--m-ease),
              border-color .45s var(--m-ease) !important;
  border-radius: 18px !important;
  backdrop-filter: saturate(1.05);
}

.step-box-main:hover,
.testimonial-wrapper:hover,
.team-wrapper:hover {
  transform: translateY(-6px);
  box-shadow: var(--m-shadow-lg) !important;
  border-color: rgba(94, 24, 235, .35) !important;
}

/* ----- Team photos: uniform 2:3 frame across all cards ------------------ */
/* Neighboring portraits are ~853x1280 (2:3). Force every team photo into the
   same aspect ratio and cover-fit it so card heights stay even regardless of
   the source image's native proportions. */
.team-wrapper .photo-line-animation {
  aspect-ratio: 853 / 1280;
  width: 100%;
}
.team-wrapper .photo-line-animation img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ----- Images: soft rounding + depth ------------------------------------ */
.blog-image,
.work-photo-first,
.team-photo,
.photo-main-2,
.project-photo,
.about-image,
.image-cover {
  border-radius: 16px !important;
  overflow: hidden;
  transition: transform .6s var(--m-ease), box-shadow .6s var(--m-ease) !important;
}

.blog-image:hover,
.work-photo-first:hover,
.project-photo:hover {
  transform: scale(1.015);
  box-shadow: var(--m-shadow-md);
}

/* ----- Text brand labels inside the logo strip -------------------------- */
.logo-strip-main .logo-text-brand {
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  opacity: .85;
  align-self: center;
}

/* Real (colored) partner logos: cancel the strip's invert() so they keep
   their true colors, and normalize their height for an even row. */
.logo-strip-main .logo-img-real {
  filter: invert(1);
  height: 64px;
  width: auto;
  object-fit: contain;
  align-self: center;
}

/* ----- Service cards: align to top so a longer card doesn't stretch
   its neighbours, plus tidy bullet list inside a card ------------------- */
.grid-3-columns-2 { align-items: start; }

.step-box-main .service-list {
  margin: 10px 0 16px;
  padding-left: 20px;
}
.step-box-main .service-list li {
  margin-bottom: 6px;
  line-height: 1.45;
}
.step-box-main p { margin-bottom: 10px; }

/* ----- Navbar: frosted, sticky feel ------------------------------------- */
.navbar-component {
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  background-color: rgba(255, 255, 255, .72);
  border-bottom: 1px solid rgba(16, 24, 40, .06);
  transition: box-shadow .3s var(--m-ease), background-color .3s var(--m-ease);
}
.navbar-component:hover { box-shadow: var(--m-shadow-sm); }

.navbar-link {
  position: relative;
  transition: color .25s var(--m-ease);
}
.navbar-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--m-accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--m-ease);
}
.navbar-link:hover { color: var(--m-accent); }
.navbar-link:hover::after { transform: scaleX(1); }

/* ----- Social circles & icon chips -------------------------------------- */
.social-wrapper,
.social-circle {
  transition: transform .35s var(--m-ease), background-color .3s var(--m-ease) !important;
}
.social-wrapper:hover { transform: translateY(-3px) rotate(-4deg); }
.social-wrapper:hover .social-circle { background-color: var(--m-accent) !important; }

.icon-wrapper,
.icon-wrap,
.step-icon,
.small-icon,
.project-icon {
  transition: transform .35s var(--m-ease), box-shadow .35s var(--m-ease) !important;
}
.step-box-main:hover .step-icon,
.icon-wrapper:hover { transform: translateY(-2px) scale(1.06); }

/* ----- Links underline animation ---------------------------------------- */
.link-underline {
  background-image: linear-gradient(var(--m-accent), var(--m-accent));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .35s var(--m-ease), color .25s var(--m-ease);
  padding-bottom: 1px;
}
.link-underline:hover {
  background-size: 100% 1.5px;
  color: var(--m-accent);
}

/* ----- Accessible focus rings ------------------------------------------- */
a:focus-visible,
button:focus-visible,
.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--m-ring);
  border-radius: 10px;
}

/* ----- Form fields ------------------------------------------------------ */
.text-field,
.w-input,
.w-select,
textarea {
  border-radius: 12px !important;
  transition: border-color .25s var(--m-ease), box-shadow .25s var(--m-ease) !important;
}
.text-field:focus,
.w-input:focus,
.w-select:focus,
textarea:focus {
  border-color: var(--m-accent) !important;
  box-shadow: 0 0 0 4px var(--m-accent-soft) !important;
}

/* ----- Gentle entrance for content blocks ------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes m-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .step-box-main,
  .testimonial-wrapper,
  .team-wrapper,
  .blog-image {
    animation: m-rise .7s var(--m-ease) both;
  }
}

/* ----- Respect reduced motion ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; }
}
