/* «36 лет с опорой на будущее» campaign — see lib/content/sovcombank-36.js
 * (on/off switch). Figma: «совкомбанк» section (desktop 1829:15591, mobile
 * 1829:16112).
 *   .nav-logo-badge — «× СОВКОМБАНК» after the logo
 *   .sovcombank36   — «36 лет с опорой на будущее» card under the schedule picker
 */

/* ───── NAV BADGE ───── */

/* .nav-brand holds the Кампус logo link and the badge side by side.
 * Figma desktop (1829:16061): 10px gap, badge as tall as the 31.16px logo;
 * the Express logo is 28px, so the badge keeps that proportion (28px, 9px). */
.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 9px;
}

.nav-logo-badge-link {
  display: block;
  flex-shrink: 0;
  border-radius: 4px;
  line-height: 0;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (hover: hover) and (pointer: fine) {
  .nav-logo-badge-link:hover {
    transform: scale(1.04);
  }
}

.nav-logo-badge-link:active {
  transform: scale(0.97);
}

.nav-logo-badge-link:focus-visible {
  outline: 2px solid #003790;
  outline-offset: 4px;
}

.nav-logo-badge-link picture {
  display: block;
}

.nav-logo-badge {
  display: block;
  flex-shrink: 0;
  width: auto;
  height: 28px;
  -webkit-user-drag: none;
  user-select: none;
  animation: sovcombank36-badge-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both;
}

@keyframes sovcombank36-badge-in {
  from {
    opacity: 0;
    transform: translateX(-8px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Small desktops: all the links are still inline (they collapse at ≤1020px)
 * and leave no room for the 179px badge. Full badge from 1240px, 22px badge
 * down to 1160px, then «×» + mark (<picture> swaps the artwork, see
 * lib/content/sovcombank-36.js), and nothing below 1060px. */
@media (min-width: 1021px) and (max-width: 1239px) {
  .nav-brand {
    gap: 8px;
  }
  .nav-logo-badge {
    height: 22px;
  }
}

@media (min-width: 1021px) and (max-width: 1159px) {
  .nav-brand {
    gap: 6px;
  }
  .nav-logo-badge {
    height: 28px;
  }
}

@media (min-width: 1021px) and (max-width: 1059px) {
  .nav-logo-badge-link {
    display: none;
  }
}

/* Phones (≤767px): «×» + mark (<picture> swaps the artwork), as in the 390w
 * frame (1829:16115) — 28px tall, 6px after the 90×28 logo. */
@media (max-width: 767px) {
  .nav-brand {
    gap: 6px;
  }
}

/* ───── CARD: «36 лет с опорой на будущее» ───── */

/* Figma: picker card → this card 60px, 20px below it (1829:15647). .schedule
 * above already ends with 60px of padding (40px ≤600px). Side insets match
 * its .container (40px, 16px ≤600px), so the card lines up with the picker. */
.sovcombank36 {
  /* Above the opaque .lp that follows, so the card's shadow isn't cut off. */
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 40px 20px;
  box-sizing: border-box;
}

/* Figma 1829:15648: 1120×120 white card, radius 24, logo left and title
 * right with 115px insets. The insets shrink with the card (115/1120). */
.sovcombank36__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1120px;
  min-height: 120px;
  margin: 0 auto;
  padding: 0 clamp(32px, 10.27%, 115px);
  box-sizing: border-box;
  border-radius: 24px;
  background: var(--campus-card, #fff);
  box-shadow:
    0 20px 42.5px rgba(20, 20, 60, 0.05),
    0 1px 1.7px rgba(20, 20, 60, 0.04);
  color: #003790;
  text-decoration: none;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .sovcombank36__card:hover {
    transform: translateY(-2px);
    box-shadow:
      0 24px 48px rgba(20, 20, 60, 0.08),
      0 1px 1.7px rgba(20, 20, 60, 0.04);
  }
}

.sovcombank36__card:active {
  transform: scale(0.99);
}

.sovcombank36__card:focus-visible {
  outline: 2px solid #003790;
  outline-offset: 4px;
}

/* Logo 248×32 (Figma 1829:15649). */
.sovcombank36__logo {
  display: block;
  flex-shrink: 0;
  width: 248px;
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}

/* SF Pro Rounded Medium 32px, -0.5px tracking; «будущее» in the bank's red. */
.sovcombank36__title {
  font-family: "SF Pro Rounded", var(--campus-font-sans, system-ui), sans-serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 38px;
  letter-spacing: -0.5px;
  color: #003790;
  text-align: center;
  text-wrap: balance;
}

.sovcombank36__accent {
  color: #fc5055;
}

/* Tablets: the row no longer fits at full size — stack it as on phones. */
@media (max-width: 860px) {
  .sovcombank36__card {
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 33px 16px;
  }
}

/* Phones (Figma 1829:16134): 358px card, 33px insets, 198px logo, 18px gap,
 * 24px title; 48px below the picker card (40px of it is .schedule's padding)
 * and 42px below. */
@media (max-width: 600px) {
  .sovcombank36 {
    padding: 8px 16px 42px;
  }
  .sovcombank36__logo {
    width: 198px;
  }
  .sovcombank36__title {
    /* 24px at 390w, never below 20px so the line still fits a 320px phone. */
    font-size: clamp(20px, 6.15vw, 24px);
    line-height: 1.2;
  }
}

/* ───── REVEAL: a gentle entrance, never hiding content without motion ───── */

@media (prefers-reduced-motion: no-preference) {
  .sovcombank36__logo {
    animation: sovcombank36-logo-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
  }
  .sovcombank36__title {
    animation: sovcombank36-title-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.32s both;
  }
}

@keyframes sovcombank36-logo-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sovcombank36-title-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-logo-badge {
    animation: none;
  }
  .nav-logo-badge-link,
  .sovcombank36__card {
    transition: none;
  }
}
