/* ===================== VAKANSII PAGE ===================== */

/* ordered reveal: same look as the site's .reveal, but sequenced by
   vakansii.js (top-to-bottom, left-to-right) instead of script.js's groups */
.seq { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.seq.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .seq { opacity: 1; transform: none; transition: none; } }

/* ---- vacancy cards ---- */
/* the page no longer has a separate hero above this section, so its own
   head doubles as the page title — needs the fixed header's own height
   clearing on top of the section's usual padding */
.vacancies { background: #fff; }
.vacancies--first { padding-top: calc(var(--header-h) + 56px); }
.vacancies__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.vacancy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 16px;
  padding: 26px 26px 22px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 28px rgba(10,60,35,.06);
  transition: transform .3s ease, box-shadow .3s ease;
}
@media (hover: hover) and (pointer: fine) {
  .vacancy:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
}
.vacancy__head { display: flex; align-items: center; gap: 16px; }
.vacancy__icon {
  width: 52px; height: 52px;
  border-radius: 15px;
  background: linear-gradient(150deg, rgba(46,159,107,0.18), rgba(46,159,107,0.06));
  color: var(--green-dark);
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.vacancy__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
/* a shorter stand-in for the longest titles on narrow phones — full text
   there wrapped 3-4 lines and made cards look broken; swapped in only at
   the width where that actually happens (see RESPONSIVE) */
.vacancy__title-short { display: none; }
.vacancy__note { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: .78rem; font-weight: 400; line-height: 1.4; color: var(--ink-soft); }
.vacancy__note i { display: flex; margin-top: 1px; color: var(--green); font-size: 13px; }
/* schedule + button live in one bottom-pinned row so they land at the same
   height on every card in a row, no matter how many lines the title above
   takes — grid rows stretch every card to the tallest sibling, and
   margin-top:auto rides that extra space down to the bottom edge. */
.vacancy__footer {
  margin-top: auto;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.vacancy__schedule {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(46,159,107,0.08);
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}
.vacancy__schedule i { font-size: 13px; }

/* a livelier press/hover than the plain site-wide .btn — a slight bouncy
   lift, the arrow-circle nudging forward, and a light sweep across the
   pill, so 8 near-identical buttons on one page don't feel static */
.vacancy__btn {
  position: relative;
  overflow: hidden;
  width: auto;
  padding: 8px 8px 8px 18px;
  font-size: 13px;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease;
}
.vacancy__btn i {
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), background .3s ease;
}
.vacancy__btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 35%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.4), transparent);
  transform: skewX(-20deg);
  transition: left .7s ease;
  pointer-events: none;
}
.vacancy__btn:active { transform: scale(.93); }
.vacancy__btn:active i { transform: translateX(1px) scale(.92); }
@media (hover: hover) and (pointer: fine) {
  .vacancy__btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 12px 22px rgba(46, 159, 107, .32);
  }
  .vacancy__btn:hover i { transform: translateX(5px) rotate(-10deg); }
  .vacancy__btn:hover::after { left: 130%; }
}
.vacancy__btn i { width: 24px; height: 24px; font-size: 11px; }

/* ---- benefits ---- */
.benefits { background: var(--cream); }
.benefits__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.benefit {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 26px 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border);
}
.benefit__icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(46,159,107,0.18), rgba(46,159,107,0.06));
  color: var(--green-dark);
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
}
.benefit span { font-size: .92rem; font-weight: 600; color: var(--ink); line-height: 1.4; text-wrap: balance; }
/* only the very narrowest phones need smaller text to keep the longer KZ
   captions to two lines; everything wider keeps the full size */
@media (max-width: 380px) {
  .benefit { padding: 22px 10px; }
  .benefit span { font-size: .8rem; }
}

/* ---- application form ---- */
.apply { position: relative; overflow: hidden; background: #fff; padding: 88px 0; }
/* two soft green glows drifting slowly behind the logo texture, so the
   backdrop has depth and a bit of life instead of a flat wallpaper */
.apply::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(38% 42% at 18% 30%, rgba(46,159,107,.22), transparent 70%),
    radial-gradient(34% 40% at 84% 74%, rgba(46,159,107,.20), transparent 70%),
    radial-gradient(26% 30% at 62% 12%, rgba(120,200,160,.16), transparent 70%);
  animation: applyGlow 32s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes applyGlow {
  from { transform: translate3d(-1.5%, -1%, 0); }
  to   { transform: translate3d(1.5%, 1.5%, 0); }
}
.apply__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 56px;
  align-items: start;
}
/* a faint tiled repeat of the logo, behind the *entire* "Заполните заявку"
   section — not just the two-column grid, but the section's own padding
   above/below it too, so there's no bare strip at the top or bottom. It's
   a sibling of .apply__layout (not nested in it) so it can be sized to the
   whole section; .apply__layout carries its own z-index so its content
   still paints above this regardless of DOM order. */
.apply__intro-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../logo a-store/v13.png");
  background-size: 34px 34px;
  background-repeat: repeat;
  opacity: .13;
  /* calmer in the middle (behind the content), stronger toward the edges */
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(0,0,0,.45) 0%, #000 85%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(0,0,0,.45) 0%, #000 85%);
  pointer-events: none;
}
/* a calm, evenly-wrapped tag list under the contacts — plain flex flow, no
   forced height or rotation gymnastics. Reads like a set of trait badges,
   not a "word cloud" effect. */
.apply__word-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 14px 8px;
  /* padding gives the drifting chips room to move at the edges without
     being sliced by overflow:hidden; the negative margins cancel it out
     so the visible layout stays exactly where it was */
  padding: 18px;
  margin: 10px 0 0 -18px;
  max-width: 516px;
  /* capped so the list never runs on past the bottom of the form beside
     it — whatever doesn't fit is trimmed off (fading out, not cut sharp)
     rather than making the column taller than its neighbour */
  max-height: 396px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}
.apply__word-cloud .wc {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 100px;
  background: #fff;
  border: 1px solid var(--border);
  font-family: "Unbounded", sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--ink-soft);
}
/* each chip pops in on its own instead of the whole cloud fading in as one
   flat block — same scroll-triggered .reveal/.is-visible toggle the rest
   of the site uses (script.js staggers it in groups of 4 automatically),
   just with a bouncier scale here instead of the usual slide-up */
.apply__word-cloud .wc--kz { display: none; }
/* KZ words run shorter than the RU ones, leaving gaps at row ends — a few
   extra similar words that exist only in the KZ version fill them */
html[lang="kk"] .apply__word-cloud .wc--kz { display: inline-flex; }
.apply__word-cloud .wc.seq {
  opacity: 0;
  transform: scale(.6);
  transition: opacity .45s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.apply__word-cloud .wc.seq.is-visible {
  opacity: 1;
  transform: scale(1);
  /* constant, lively drift — each chip wanders on its own path/period
     (individual `translate`/`rotate` properties, so they never fight the
     scale pop-in above); --i is set per chip in vakansii.js */
  will-change: translate, rotate, transform;
  backface-visibility: hidden;
  animation: wcDrift 7s linear calc(var(--p, 0) * -1s) infinite;
}
/* a gentle elliptical loop (12 points on a smooth sine path, linear timing so
   there's no ease-in/out hitching), phase-shifted chip by chip so neighbours
   move together like a slow wave passing through the cloud */
@keyframes wcDrift {
  0.0% { translate: 0.00px -7.00px; rotate: 0.00deg; }
  4.167% { translate: 2.07px -6.76px; rotate: 0.78deg; }
  8.333% { translate: 4.00px -6.06px; rotate: 1.50deg; }
  12.5% { translate: 5.66px -4.95px; rotate: 2.12deg; }
  16.667% { translate: 6.93px -3.50px; rotate: 2.60deg; }
  20.833% { translate: 7.73px -1.81px; rotate: 2.90deg; }
  25.0% { translate: 8.00px -0.00px; rotate: 3.00deg; }
  29.167% { translate: 7.73px 1.81px; rotate: 2.90deg; }
  33.333% { translate: 6.93px 3.50px; rotate: 2.60deg; }
  37.5% { translate: 5.66px 4.95px; rotate: 2.12deg; }
  41.667% { translate: 4.00px 6.06px; rotate: 1.50deg; }
  45.833% { translate: 2.07px 6.76px; rotate: 0.78deg; }
  50.0% { translate: 0.00px 7.00px; rotate: 0.00deg; }
  54.167% { translate: -2.07px 6.76px; rotate: -0.78deg; }
  58.333% { translate: -4.00px 6.06px; rotate: -1.50deg; }
  62.5% { translate: -5.66px 4.95px; rotate: -2.12deg; }
  66.667% { translate: -6.93px 3.50px; rotate: -2.60deg; }
  70.833% { translate: -7.73px 1.81px; rotate: -2.90deg; }
  75.0% { translate: -8.00px 0.00px; rotate: -3.00deg; }
  79.167% { translate: -7.73px -1.81px; rotate: -2.90deg; }
  83.333% { translate: -6.93px -3.50px; rotate: -2.60deg; }
  87.5% { translate: -5.66px -4.95px; rotate: -2.12deg; }
  91.667% { translate: -4.00px -6.06px; rotate: -1.50deg; }
  95.833% { translate: -2.07px -6.76px; rotate: -0.78deg; }
  100.0% { translate: -0.00px -7.00px; rotate: -0.00deg; }
}
.apply__word-cloud .wc { transition: background .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease; }
@media (prefers-reduced-motion: reduce) {
  .apply::before, .apply__word-cloud .wc.seq.is-visible { animation: none; }
}
.apply__intro {
  position: sticky;
  z-index: 1;
  top: calc(var(--header-h) + 24px);
}
.apply__intro .section__title { text-align: left; }
.apply__intro .section__text { text-align: left; }
.apply-form { position: relative; z-index: 1; }

.apply-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--cream);
}
.apply-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.apply-form__row { display: flex; flex-direction: column; gap: 8px; }
.apply-form__row label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.apply-form__row input,
.apply-form__row select,
.apply-form__row textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: .92rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.apply-form__row textarea { resize: vertical; min-height: 96px; }
.apply-form__row input:focus,
.apply-form__row select:focus,
.apply-form__row textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46,159,107,0.15);
}
.apply-form__row select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%234d5c53' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.apply-form__submit { justify-content: center; margin-top: 6px; }
.apply-form__submit.is-loading { opacity: .7; pointer-events: none; }
.apply-form__status {
  margin: 0;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.5;
}
.apply-form__status--ok { background: rgba(46,159,107,0.12); color: var(--green-dark); }
.apply-form__status--error { background: rgba(214,69,69,0.1); color: #b5342d; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  /* iOS Safari zooms the page in when a field with text smaller than 16px
     gets focus, and doesn't zoom back out afterwards — 16px stops it */
  .apply-form__row input,
  .apply-form__row select,
  .apply-form__row textarea { font-size: 16px; }
  /* on tablet/phone the tag cloud moves out of the intro (vakansii.js
     relocates it) and becomes a compact strip *after* the form: centered,
     smaller chips, only a few rows tall, fading out at the bottom */
  .apply { padding: 64px 0 64px; }
  .apply__word-cloud {
    grid-column: 1;
    grid-row: 3;
    justify-content: center;
    margin: 0 auto;
    padding: 14px;
    gap: 10px 6px;
    max-width: 100%;
    max-height: 190px;
    -webkit-mask-image: linear-gradient(to bottom, #000 68%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 68%, transparent 100%);
  }
  .apply__word-cloud .wc { padding: 6px 12px; font-size: 11.5px; }
  .apply__layout { grid-template-columns: 1fr; gap: 20px; }
  /* single column now — intro and the bg share row 1, the form stacks
     below as row 2, and the bg (positioned to the whole layout box)
     spans behind both */
  .apply__intro {
    grid-row: 1;
    position: relative;
    top: auto;
    text-align: center;
    padding: 0;
  }
  .apply__intro .section__title,
  .apply__intro .section__text { text-align: center; }
  .apply-form { grid-column: 1; grid-row: 2; margin-top: 0; }
  .benefits__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .apply { padding: 48px 0 52px; }
  .apply__word-cloud { max-height: 168px; }
  .apply__word-cloud .wc { padding: 5px 11px; font-size: 11px; }
  .vacancies__grid { grid-template-columns: 1fr; }
  .vacancy { padding: 22px 20px 18px; gap: 14px; }
  .vacancy__icon { width: 44px; height: 44px; border-radius: 13px; font-size: 19px; }
  .vacancy__title { font-size: .96rem; }
  .vacancy__title-full { display: none; }
  .vacancy__title-short { display: inline; }
  .apply-form { padding: 24px 20px; }
}

/* ---- мягкие переходы между блоками (как на главной) ----
   фоны соседних секций сходятся на стыке, а логотипная текстура и свечения
   гаснут у верхнего и нижнего краёв, чтобы не обрываться линией */
.vacancies { background: linear-gradient(180deg, var(--cream) 0, #fff 260px, #fff 88%, var(--cream) 100%); }
.benefits { background: linear-gradient(180deg, var(--cream) 0%, var(--cream) 80%, #fff 100%); }
.apply { background: #fff; margin-top: -1px; }   /* -1px: на дробной высоте между белыми блоками просвечивал кремовый волосок */
.apply::after {
  /* вуаль поверх текстуры и свечений: сверху в цвет соседнего блока, снизу плавно в белый перед подвалом.
     Маска на самих слоях не годится: свечение вынесено за границы секции (inset -20%),
     и его затухание приходится на невидимую часть */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #fff 0, rgba(255,255,255,.85) 90px, rgba(255,255,255,0) 280px, rgba(255,255,255,0) calc(100% - 170px), #fff 100%);
  pointer-events: none;
}
/* подвал здесь стыкуется с текстурой встык, без скруглённых углов (за ними просвечивал бы кремовый фон страницы) */
.footer { border-radius: 0; }

/* ---- расстояния между блоками (было по 110 px с каждой стороны стыка) ---- */
.vacancies { padding-bottom: 84px; }
.benefits { padding: 68px 0 64px; }
.benefits .section__head { margin-bottom: 44px; }
.apply { padding-top: 80px; }
@media (max-width: 800px) {
  .vacancies { padding-bottom: 52px; }
  .benefits { padding: 52px 0 56px; }
  .benefits .section__head { margin-bottom: 30px; }
  .apply { padding-top: 64px; }
}
