/* ============================================================
   VELARY US — общие компоненты
   Menu (4005:1710) · Contacts_footer (4169:2372) · Clickable Card
   ============================================================ */

/* ------------------------------------------------------------
   Шапка
   ------------------------------------------------------------ */
.header {
  position: relative;
  z-index: 50;
  padding-block: 20px;
  background: var(--bg-header);
}
/* Пока открыто мобильное меню, шапка поднимается над ним — чтобы крестик оставался нажимаемым */
body.is-locked .header { z-index: 90; }

/* На главной меню закреплено внутри героя — ровно как в макете (Menu, sticky top-0
   внутри фрейма высотой 900px). На внутренних страницах меню обычное, как во фреймах. */
.header--hero { position: sticky; top: 0; }
.header--page { position: sticky; top: 0; }
.header--case { position: relative; }
/* На главной шапка лежит на жёлтом фоне героя, на внутренних — на фоне страницы */
.header--hero { background: var(--bg-hero); }
.header--page { background: var(--bg-about); }   /* шапка About лежит на фоне страницы About */

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.04;
  letter-spacing: -.18px;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}
.logo__mark { width: 15px; height: 18.16px; color: var(--text); flex: none; }
.logo__mark svg { width: 100%; height: 100%; }

.nav {
  display: flex;
  align-items: center;
  gap: 50px;
}
.nav__link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.04;
  letter-spacing: -.18px;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  white-space: nowrap;
}
/* Подчёркивания под пунктами меню в макете нет — только состояние наведения курсора */
.nav__link:hover { opacity: .6; }

/* Переключатель темы */
.theme-toggle {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--text);
  display: grid;
  place-items: center;
}
.theme-toggle svg { width: 19px; height: 19px; }

/* Бургер */
.burger {
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.burger__box { width: 20px; height: 14px; position: relative; }
.burger__box span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .22s var(--ease-out), opacity .15s linear;
}
.burger__box span:nth-child(1) { top: 0; }
.burger__box span:nth-child(2) { top: 6px; }
.burger__box span:nth-child(3) { top: 12px; }
[aria-expanded="true"] .burger__box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
[aria-expanded="true"] .burger__box span:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .burger__box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------
   Мобильное меню (4215:30863)
   ------------------------------------------------------------ */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;   /* поверх контента; шапка поднимается выше только при открытом меню */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 0 24px 60px;
  background: var(--bg-hero);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .22s var(--ease-out), transform .22s var(--ease-out), visibility .22s;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.mobile-menu__link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.04;
  letter-spacing: -.24px;
  text-transform: uppercase;
  color: var(--text);
}
.mobile-menu .theme-toggle { width: 26px; height: 26px; margin-top: 8px; }
.mobile-menu .theme-toggle svg { width: 26px; height: 26px; }
body.is-locked { overflow: hidden; }

/* ------------------------------------------------------------
   Футер (4169:2372)
   ------------------------------------------------------------ */
.footer {
  background: var(--bg-footer);
  padding-block: 27px;
  color: #000;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer__mark { flex: none; color: #000; display: block; }
.footer__mark svg { width: 100%; height: 100%; }
.footer__links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 803px;
  max-width: 100%;
}
.footer__link {
  display: block;          /* иначе строка тянется межстрочником шрифта */
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 25px;
  line-height: 40px;
  letter-spacing: -.75px;
  color: #000;
  position: relative;
}
.footer__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s var(--ease-out);
}
.footer__link:hover::after { transform: scaleX(1); }

/* ------------------------------------------------------------
   Карточка проекта (Clickable Card)
   ------------------------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 39px;
  row-gap: 79px;
  width: 100%;
  max-width: var(--grid-max);
  margin-inline: auto;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  color: var(--text-body);
  padding: 16px;
}
.card__cover {
  position: relative;
  height: 282px;
  border-radius: var(--card-radius);
  overflow: hidden;
}
.card__cover .cover__media { width: 100%; height: 100%; object-fit: cover; }

/* Hover overlay follows the card silhouette: 18px at the cover edge,
   10px at the lower card edge. */
.card--link { isolation: isolate; }
.card--link > * { position: relative; z-index: 0; }
.card--link::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9;
  border-radius: 18px;
  background: var(--card-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease-out);
}
.card--link:hover::after,
.card--link:focus-visible::after { opacity: 1; }

.card__body { position: relative; display: flex; flex-direction: column; gap: 16px; }
.card__text { display: flex; flex-direction: column; gap: 4px; }
.card__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: .8px;
  color: var(--text-body);
}
/* Preserve the authored case from Figma: brand names, labels and prose use different casing. */
.card__text, .tag { text-transform: none; }

.card__desc {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: .56px;
  color: var(--text-body);
}
.card__desc b, .card__desc strong { font-weight: 600; }
.card__kicker { display: block; font-weight: 600; }   /* в макете это просто первая строка того же абзаца, без отступа */

/* Теги */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .56px;
  text-transform: none;
  white-space: nowrap;
}
.tag--fintech    { background: #C1E2E2; color: #0181AC; }
.tag--systems    { background: #E8C7CF; color: #AC1F78; }
.tag--product    { background: #DEEDDE; color: #7F9C1F; }
.tag--mobile     { background: #E9E3BE; color: #9F7B0D; }
.tag--interaction{ background: #E9E3BE; color: #9F7B0D; }
.tag--healthcare { background: #F6E6DC; color: #FF6600; }
.tag--research   { background: #F6E6DC; color: #FF6600; }
.tag--responsive { background: #D5ECF5; color: #079DD8; }
.tag--ux         { background: #D5ECF5; color: #079DD8; }
.tag--website    { background: #E7DBEE; color: #8F4CBC; }
.tag--competition{ background: #E7DBEE; color: #8F4CBC; }
.tag--ia         { background: #E3E5FF; color: #686BA3; }
.tag--mobility   { background: #F8E1E2; color: #B65F61; }


/* ------------------------------------------------------------
   Кнопки
   ------------------------------------------------------------ */
/* .btn-figma описана в case.css — используется только на страницах кейсов */

.btn-cv {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 340px;
  padding: 15px 28px;
  border-radius: 100px;
  background: var(--cv-bg);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 4px 6.8px rgba(0, 0, 0, .1));
  transition: background-color .2s var(--ease-out);
}
.btn-cv:hover { background: var(--cv-bg-hover); }

/* ------------------------------------------------------------
   Адаптив общих компонентов
   ------------------------------------------------------------ */
@media (max-width: 1199px) {
  .cards { grid-template-columns: minmax(0, 1fr); row-gap: 56px; max-width: 700px; }
}

@media (max-width: 767px) {
  :root { --shell-pad: 20px; --header-h: 60px; }
  .nav { display: none; }
  .burger { display: inline-flex; }
  .header { padding-block: 14px; }
  .logo { font-size: 16px; }
  .footer { padding-block: 14px; }
  .footer__inner { gap: 12px; }
  .footer__mark { width: 26px; height: 31.5px; }
  .footer__links { width: auto; flex: 1; gap: 16px; justify-content: space-between; }
  .footer__link { font-size: 15px; line-height: 24px; letter-spacing: -.3px; }
  .card__cover { height: 200px; }
  .btn-figma { font-size: 15px; padding: 10px 18px; }
}
