/* FORTIS — главная страница. Цвета, шрифт и скругления те же, что у сайтов продуктов (тема GeneratePress). */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/InstrumentSans-Variable.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --red: #fa4549;
  --red-600: #da2936;
  --red-50: #ffcbbd;
  --ink: #1e1e1e;
  --ink-2: #4b4b4b;
  --muted: #727272;
  --line: #dddddd;
  --bg: #ffffff;
  --card: #f6f8fa;
  --radius-card: 32px;
  --radius-pill: 99px;
  --wrap: 1280px;
  --gutter: 32px;
  --header-h: 76px;
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Шапка ---------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
}

.header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header__logo img {
  height: 40px;
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto; /* меню остаётся справа и без логотипа */
}

.header__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s;
}

.header__link:hover {
  color: var(--red);
}

.lang {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

.lang a {
  min-width: 40px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
}

.lang a[aria-current="true"] {
  background: var(--ink);
  color: #fff;
}

.lang a:not([aria-current="true"]):hover {
  color: var(--ink);
}

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 64px) 0 40px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.hero::before {
  width: 720px;
  height: 720px;
  top: -260px;
  right: -180px;
  background: radial-gradient(closest-side, rgba(250, 69, 73, 0.22), rgba(250, 69, 73, 0));
}

.hero::after {
  width: 560px;
  height: 560px;
  bottom: -320px;
  left: -200px;
  background: radial-gradient(closest-side, rgba(255, 203, 189, 0.55), rgba(255, 203, 189, 0));
}

/* текст слева, логотип FORTIS справа */
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
}

.hero__logo img {
  width: clamp(300px, 32vw, 500px);
  height: auto;
}

.hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.accent {
  color: var(--red);
}

.hero__text {
  max-width: 620px;
  margin: 24px 0 0;
  font-size: 18px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  margin-top: 28px;
  padding: 0 22px;
  border: 1px solid var(--red);
  border-radius: var(--radius-pill);
  color: var(--red);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--red);
  color: #fff;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ---------- Продукты ---------- */

.products {
  padding: 32px 0 112px;
}

.products__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.products h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.products__count {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  background: var(--card);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -16px rgba(30, 30, 30, 0.16);
}

.card__media {
  position: relative;
  height: 380px;
  padding: 36px 40px 0;
  background: radial-gradient(60% 70% at 50% 60%, #ffffff 0%, rgba(255, 255, 255, 0) 70%);
}

/* картинка вписывается в рамку целиком — и широкие, и вытянутые по высоте */
.card__media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.card:hover .card__media img {
  transform: scale(1.04);
}

/* вместо фото препарата — его логотип (файлы <продукт>-logo.png втрое крупнее показываемого размера,
   поэтому остаются чёткими на экранах с высокой плотностью пикселей) */
.card__media.card__media--logo {
  display: grid;
  place-items: center;
  height: 260px;
  padding: 36px 40px 12px;
}

.card__media.card__media--logo img {
  height: auto;
  max-width: 72%;
}

.card__media--logo img[src$="twac-logo.png"] { width: 226px; }
.card__media--logo img[src$="fortox-logo.png"] { width: 290px; }
.card__media--logo img[src$="phillex-logo.png"] { width: 330px; }
.card__media--logo img[src$="appeex-logo.png"] { width: 256px; }

@media (max-width: 760px) {
  .card__media.card__media--logo {
    height: 200px;
    padding: 28px 24px 8px;
  }
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 28px 32px 32px;
}

.chip {
  align-self: flex-start;
  padding: 6px 12px;
  border: 1px solid var(--red-50);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--red-600);
  font-size: 13px;
  font-weight: 500;
}

.card h3 {
  margin: 4px 0 0;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.card h3 sup {
  font-size: 0.45em;
  vertical-align: 0.9em;
  margin-left: 2px;
}

.card p {
  margin: 0;
  color: var(--ink-2);
  text-wrap: pretty;
}

.card__more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
  font-size: 15px;
  font-weight: 500;
}

.card__arrow {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--red);
  transition: background-color 0.25s, color 0.25s, transform 0.25s;
}

.card:hover .card__arrow {
  background: var(--red);
  color: #fff;
  transform: translateX(2px);
}

.card__arrow svg {
  width: 18px;
  height: 18px;
}

/* ---------- Контакты ---------- */

.contacts {
  padding: 0 0 112px;
}

.contacts h2 {
  margin: 0 0 40px;
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.contacts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* подстраивается под число карточек */
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 32px 32px;
  border-radius: var(--radius-card);
  background: var(--card);
  text-decoration: none;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -16px rgba(30, 30, 30, 0.16);
}

.contact-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #fff;
  color: var(--red);
}

.contact-card__icon svg {
  width: 24px;
  height: 24px;
}

.contact-card__label {
  font-size: 14px;
  color: var(--muted);
}

.contact-card__value {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  text-wrap: pretty;
}

.contact-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--red);
  font-size: 15px;
  font-weight: 500;
}

.contact-card__more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s;
}

.contact-card:hover .contact-card__more svg {
  transform: translateX(3px);
}

/* ---------- Политика конфиденциальности ---------- */

.legal {
  padding: calc(var(--header-h) + 48px) 0 96px;
}

.legal .wrap {
  max-width: 880px;
}

.legal__back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.legal__back:hover {
  color: var(--red);
}

.legal h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.legal__note {
  margin: 12px 0 40px;
  color: var(--muted);
}

.legal__text {
  color: var(--ink-2);
  line-height: 1.65;
}

.legal__text p {
  margin: 0 0 16px;
}

.legal__text ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal__text a {
  color: var(--red);
}

/* ---------- Подвал ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

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

.footer__logo img {
  height: 36px;
  width: auto;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a {
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--red);
}

.footer__copy {
  margin: 32px 0 0;
}

/* ---------- Адаптив ---------- */

@media (max-width: 960px) {
  .card__media {
    height: 320px;
  }

  .contacts__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  /* на узких экранах логотип есть в шапке — второй справа не помещается */
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__logo {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
    --header-h: 64px;
    --radius-card: 24px;
  }

  .header__logo img {
    height: 32px;
  }

  .header__nav {
    gap: 16px;
  }

  .hero {
    padding: calc(var(--header-h) + 56px) 0 40px;
  }

  .hero__text {
    font-size: 16px;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .products {
    padding: 24px 0 72px;
  }

  .products__head {
    margin-bottom: 24px;
  }

  .card__media {
    height: 260px;
    padding: 28px 24px 0;
  }

  .card__body {
    padding: 20px 20px 24px;
  }

  .card h3 {
    font-size: 28px;
  }
}

@media (max-width: 420px) {
  .header__link {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .card__media img,
  .card__arrow {
    transition: none;
  }
}
