/* ============================================================
   BYPLAN — bio.css (About mini slider)
   Scope: ONLY #about block

   What this file does:
   - Keeps the original #about markup (2 columns on desktop, stacked on mobile).
   - Inside the LEFT card (.about-card) creates a small 2-screen slider:
       1) Биография (about-bio)
       2) Подход (trustBullets)
   - The RIGHT column ("Почему можно доверять" + stats + PDF) stays on the page
     and is NOT turned into a separate swipe screen.
   ============================================================ */

#about{
  /* local tokens */
  --about-card-bg: rgba(255,255,255,.42);
  --about-border: rgba(0,0,0,.10);
  --about-border-strong: rgba(0,0,0,.14);
  --about-shadow: 0 14px 38px rgba(0,0,0,.12);
  --about-ease: cubic-bezier(.2,.8,.2,1);
}

/* ------------------------------
   Layout: hide duplicated right column ("Почему можно доверять")
   (we already show "Подход" inside the mini slider)
   ------------------------------ */
#about .container.two-col{
  display: block;
}
#about .container.two-col > div:nth-child(2){
  display: none !important;
}


/* ------------------------------
   Left card (bio)
   ------------------------------ */
#about .about-card{
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 18px 16px;
  border: 1px solid var(--about-border);
  border-radius: 26px;
  background: var(--about-card-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--about-shadow);
  overflow: hidden;
}

/* IMPORTANT: allow the text column to shrink inside flex.
   Without min-width:0 long content may overflow horizontally. */
#about .about-card > div{
  min-width: 0;
}

#about .about-photo{ flex: 0 0 118px; }

#about .about-photo img{
  width: 118px;
  height: 118px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--about-border);
  box-shadow: 0 18px 45px rgba(0,0,0,.16);
  cursor: zoom-in;
  transition: transform 160ms var(--about-ease), filter 160ms var(--about-ease);
}

#about .about-photo img.is-zoomable:hover{ filter: saturate(1.03); }
#about .about-photo img.is-zoomable:active{ transform: scale(0.98); }

#about .about-name{
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.2rem;
  margin: 2px 0 2px;
}

#about .about-role{
  margin: 0 0 10px;
  color: var(--muted, rgba(28,27,27,.72));
  font-weight: 600;
}

/* Bio text */
#about .about-bio{
  margin: 0;
  color: rgba(28,27,27,.86);
  line-height: 1.55;
  text-wrap: pretty;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Clamp (JS toggles classes) */
#about .about-bio.about-bio--clamp{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
  position: relative;
  padding-bottom: 8px;
}

#about .about-bio.about-bio--clamp:not(.is-expanded)::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2.6em;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0),
    rgba(237,232,236,.95));
}

#about .about-bio.is-expanded{
  display: block;
  -webkit-line-clamp: initial;
  padding-bottom: 0;
}

#about .bio-toggle{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--about-border);
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: rgba(28,27,27,.86);
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 160ms var(--about-ease), box-shadow 160ms var(--about-ease);
}

#about .bio-toggle:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0,0,0,.12);
}

#about .bio-toggle:active{
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}

#about .bio-toggle__chev{
  opacity: .7;
  font-size: 0.95em;
}

/* ------------------------------
   About mini slider (inside .about-card)
   ------------------------------ */
#about .about-mini{
  margin-top: 12px;
}

#about .about-mini__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

#about .about-tabs{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#about .about-tab{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--about-border);
  background: rgba(255,255,255,.35);
  color: rgba(28,27,27,.90);
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition:
    transform 160ms var(--about-ease),
    box-shadow 160ms var(--about-ease),
    background 160ms var(--about-ease),
    border-color 160ms var(--about-ease),
    opacity 160ms var(--about-ease);
}

#about .about-tab:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0,0,0,.12);
  border-color: var(--about-border-strong);
}

#about .about-tab.is-active{
  background: rgba(255,255,255,.70);
  border-color: var(--about-border-strong);
}

#about .about-tab__icon{
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  font-size: 12px;
}

/* slider viewport */
#about .about-carousel{
  position: relative;
}

#about .about-carousel__viewport{
  overflow: hidden;
  outline: none;
  touch-action: pan-y;
  /* height is controlled by JS for nicer layout */
  height: auto;
  transition: height 220ms var(--about-ease);
  min-width: 0;
}

#about .about-carousel__track{
  display: flex;
  width: 100%; /* was 200%: caused horizontal text clipping */
  transform: translate3d(0,0,0);
  transition: transform 220ms var(--about-ease);
  will-change: transform;
  min-width: 0;
}

#about .about-slide{
  flex: 0 0 100%;
  padding: 0;
  min-width: 0;
}

#about .about-dots{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

#about .about-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  transition: transform 160ms var(--about-ease), opacity 160ms var(--about-ease);
  opacity: .55;
}

#about .about-dot.is-active{
  opacity: 1;
  transform: scale(1.15);
}

/* Slide 2 (bullets) spacing */
#about .about-slide--bullets{
  padding-top: 4px;
}

/* ------------------------------
   Trust bullets => chips/cards
   (These are shown in slide 2)
   ------------------------------ */
#about #trustBullets{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

#about #trustBullets li{
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--about-border);
  background: rgba(255,255,255,.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: rgba(28,27,27,.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}

/* ------------------------------
   Right column: stats
   ------------------------------ */
#about .grid.stats{
  margin-top: 18px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

#about .stat{
  padding: 16px 16px 14px;
  border-radius: 20px;
  border: 1px solid var(--about-border);
  background: rgba(255,255,255,.38);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26);
  min-height: 88px;

  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 360ms var(--about-ease),
    transform 360ms var(--about-ease);
}

#about .stat.is-in{
  opacity: 1;
  transform: none;
}

#about .stat__num{
  margin: 0;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
}

#about .stat__label{
  margin: 8px 0 0;
  color: var(--muted, rgba(28,27,27,.72));
  font-size: 0.95rem;
  line-height: 1.35;
}

/* Doc sample callout */
#about .doc-sample{
  margin-top: 16px;
  border-radius: 22px;
  border: 1px solid var(--about-border);
  background: rgba(255,255,255,.32);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}

#about .doc-sample__title{
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ------------------------------
   Responsive
   ------------------------------ */
@media (max-width: 860px){
  #about .about-card{
    flex-direction: column;
    align-items: flex-start;
  }

  #about .about-photo{ flex: 0 0 auto; }

  #about .about-photo img{
    width: 132px;
    height: 132px;
    border-radius: 26px;
  }

  #about .grid.stats{
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* ------------------------------
   Reduced motion
   ------------------------------ */
@media (prefers-reduced-motion: reduce){
  #about .stat{
    transition: none;
    transform: none;
    opacity: 1;
  }
  #about .bio-toggle,
  #about .about-tab,
  #about .about-carousel__viewport,
  #about .about-carousel__track,
  #about .about-dot{
    transition: none !important;
  }
}


/* ------------------------------
   Designer photo modal (click-to-zoom)
   ------------------------------ */
.about-photo-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(20,18,19,.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms cubic-bezier(.2,.8,.2,1);
}

.about-photo-modal.is-open{
  opacity: 1;
  pointer-events: auto;
}

.about-photo-modal__dialog{
  position: relative;
  transform: translateY(10px) scale(.98);
  transition: transform 200ms cubic-bezier(.2,.8,.2,1);
}

.about-photo-modal.is-open .about-photo-modal__dialog{
  transform: none;
}

.about-photo-modal__img{
  display: block;
  max-width: min(560px, 92vw);
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 28px 90px rgba(0,0,0,.55);
  background: rgba(255,255,255,.06);
}

.about-photo-modal__close{
  position: absolute;
  top: -12px;
  right: -12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.42);
  color: rgba(255,255,255,.92);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.about-photo-modal__close:hover{
  background: rgba(0,0,0,.58);
}

html.about-photo-open,
body.about-photo-open{
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce){
  .about-photo-modal,
  .about-photo-modal__dialog{
    transition: none !important;
  }
  .about-photo-modal__dialog{
    transform: none !important;
  }
}
