/* 42.fund — v2. One stylesheet for / and /en/. Phone layout below 761px. */

:root {
  --ink: #191919;
  --muted: #6B6B6B;
  --line: #ECECEA;
  --bg: #FFFFFF;
  --green: #2EF07F;
  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-text: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap { max-width: 1440px; margin: 0 auto; padding-inline: var(--pad); }

/* Header strip */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  min-height: 180px;
  padding-block: clamp(24px, 3vw, 44px);
}
.logo { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; text-decoration: none; }
.logo__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 6.4vw, 92px);
  letter-spacing: -0.06em;
  line-height: 0.85;
}
.logo__mark { flex: none; width: clamp(40px, 4.6vw, 66px); height: clamp(40px, 4.6vw, 66px); }
.logo:focus-visible, .lang a:focus-visible, .footer__mail:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 6px; }

.lang { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; text-decoration: none; color: var(--muted); }
.lang a[aria-current="page"] { color: var(--ink); }

/* Cards */
.cards {
  list-style: none;
  margin: 0;
  padding: 0 0 clamp(64px, 8vw, 112px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.card__link {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 32px 40px;
  min-height: 540px;
  padding: clamp(28px, 4vw, 56px) 0 0 clamp(28px, 4vw, 56px);
  border-radius: 36px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  background: var(--card-bg);
}
.card__link:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

.card__body {
  flex: 1 1 340px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 0 clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0;
}
.card__tag {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.card__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  /* "komarovskiy.info" is ~10.3em wide in Unbounded 800: 44px keeps it inside the 464px text column at 1440 */
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.05em;
  line-height: 1;
}
.card__text { margin: 0; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; color: #1F1F1F; }
.card__pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 16px;
}

.card__visual { flex: 1 1 520px; min-width: 0; align-self: flex-end; }

/* Desktop: screenshot in a browser window, bleeding off the right and bottom edges */
.card__shot--desktop {
  display: block;
  width: 106%;
  margin-bottom: -6%;
  border-radius: 18px 0 0 0;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 30px 70px var(--shadow, rgba(0, 0, 0, 0.2));
}
.card__shot--desktop img { width: 100%; }
.card__shot-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 16px;
  background: #F3F3F1;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.card__shot-bar span { width: 11px; height: 11px; border-radius: 50%; }
.card__shot-bar span:nth-child(1) { background: #FF5F57; }
.card__shot-bar span:nth-child(2) { background: #FEBC2E; }
.card__shot-bar span:nth-child(3) { background: #28C840; }
.card__shot--phone { display: none; }

/* Vitamins: D3 pack in front of the Ca / Ω3 / Mg line */
.card__pack { position: relative; display: block; aspect-ratio: 3 / 2; }
.card__pack img {
  position: absolute;
  left: 5%;
  top: 20%;
  width: 40%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  transform: rotate(-6deg);
  box-shadow: 0 28px 50px rgba(80, 30, 0, 0.35);
}
.box {
  position: absolute;
  width: 28%;
  aspect-ratio: 2 / 3;
  padding: 5%;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 18px 36px rgba(60, 30, 0, 0.22);
}
.box::before { content: ""; display: block; width: 72%; height: 16px; border-radius: 4px; background: #FFFFFF; }
.box span {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 4.4vw, 66px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #FFFFFF;
  text-shadow: 4px 4px 0 #141B4D;
}
.box--ca { left: 37%; top: 12%; background: #2F6BFF; transform: rotate(6deg); }
.box--omega { left: 52%; top: 18%; background: #009C90; transform: rotate(12deg); }
.box--mg { left: 67%; top: 26%; background: #7B3FF2; transform: rotate(18deg); }

/* Card colours */
.card--sereda {
  --card-bg: radial-gradient(55% 75% at 18% 95%, rgba(255, 138, 76, 0.6) 0%, rgba(255, 138, 76, 0) 70%), radial-gradient(45% 60% at 72% 8%, rgba(255, 175, 210, 0.85) 0%, rgba(255, 175, 210, 0) 70%), radial-gradient(55% 70% at 100% 100%, rgba(150, 172, 255, 0.8) 0%, rgba(150, 172, 255, 0) 70%), #FCEDE6;
  --shadow: rgba(120, 60, 80, 0.25);
}
.card--komarovskiy {
  --card-bg: radial-gradient(70% 90% at 0% 0%, #FFB15C 0%, rgba(255, 177, 92, 0) 60%), radial-gradient(60% 80% at 100% 100%, #FF5A1F 0%, rgba(255, 90, 31, 0) 65%), #FF8A3D;
  --shadow: rgba(120, 40, 0, 0.32);
}
.card--vitamins {
  --card-bg: radial-gradient(70% 80% at 85% 15%, #FFE58A 0%, rgba(255, 229, 138, 0) 70%), radial-gradient(60% 80% at 10% 100%, #FFC4A3 0%, rgba(255, 196, 163, 0) 70%), #FFF3D6;
}
.card--finance {
  --card-bg: radial-gradient(70% 80% at 100% 0%, #CFE5D7 0%, rgba(207, 229, 215, 0) 65%), radial-gradient(60% 70% at 0% 100%, #F4E1C1 0%, rgba(244, 225, 193, 0) 65%), #EFEAE2;
  --shadow: rgba(40, 60, 40, 0.25);
}
.card--chetver {
  --card-bg: radial-gradient(70% 70% at 0% 100%, #FFD66B 0%, rgba(255, 214, 107, 0) 65%), radial-gradient(80% 80% at 100% 0%, #93A9FF 0%, rgba(147, 169, 255, 0) 65%), #E3E7FF;
  --shadow: rgba(40, 50, 120, 0.28);
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-direction: column; gap: 28px; padding-block: clamp(40px, 5vw, 56px) 32px; }
.footer__mail {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 5.6vw, 84px);
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; font-size: 15px; color: var(--muted); }

/* Hover only where there is a pointer that hovers */
@media (hover: hover) {
  .card__link { transition: transform 0.25s ease, box-shadow 0.25s ease; }
  .card__link:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(25, 25, 25, 0.12); }
  .card__pill { transition: background-color 0.2s ease, color 0.2s ease; }
  .card__link:hover .card__pill { background: var(--green); color: var(--ink); }
  .lang a:hover { color: var(--ink); }
  .footer__mail:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .card__link, .card__pill { transition: none; }
  .card__link:hover { transform: none; }
}

/* Phone */
@media (max-width: 760px) {
  .site-header { min-height: 0; padding-block: 20px; }
  .logo__num { font-size: 44px; }
  .logo__mark { width: 32px; height: 32px; }

  .cards { gap: 16px; padding-bottom: 40px; }
  .card__link {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 22px;
    min-height: 0;
    padding: 24px 24px 0;
    border-radius: 28px;
  }
  .card__body { flex: none; max-width: none; padding: 0; gap: 12px; }
  .card__tag { padding: 5px 11px; font-size: 12px; }
  .card__name { font-size: clamp(20px, 6.8vw, 30px); line-height: 1.02; }
  .card__text { font-size: 16px; }
  .card__pill { min-height: 44px; padding: 0 18px; font-size: 15px; gap: 8px; }

  .card__visual { flex: none; align-self: stretch; position: relative; height: 300px; }
  .card__shot--desktop { display: none; }
  .card__shot--phone {
    display: block;
    position: absolute;
    left: 50%;
    top: 0;
    width: 236px;
    transform: translateX(-50%);
    border: 7px solid var(--ink);
    border-bottom: 0;
    border-radius: 38px 38px 0 0;
    overflow: hidden;
    background: var(--ink);
    box-shadow: 0 24px 50px var(--shadow, rgba(0, 0, 0, 0.25));
  }
  .card__shot--phone img { width: 100%; border-radius: 31px 31px 0 0; }

  .card--vitamins .card__visual { height: 260px; }
  .card__pack { position: absolute; inset: 0; aspect-ratio: auto; }
  .card__pack img { left: 4%; top: 36px; width: 150px; height: 225px; border-radius: 10px; box-shadow: 0 20px 36px rgba(80, 30, 0, 0.35); }
  .box { width: 104px; height: 156px; padding: 10px; gap: 8px; border-radius: 10px; box-shadow: 0 14px 28px rgba(60, 30, 0, 0.22); }
  .box::before { height: 10px; border-radius: 3px; }
  .box span { font-size: 36px; text-shadow: 3px 3px 0 #141B4D; }
  .box--ca { left: 42%; top: 22px; }
  .box--omega { left: 55%; top: 40px; }
  .box--mg { left: 67%; top: 60px; }

  .footer__mail { font-size: 26px; }
}
