/* Визитка Flow Skills. Цвета и шрифты — как на flowskills.ru (site-v2/04_site/src/styles.css) */

@font-face {
  font-family: 'Oranienbaum';
  src: url('fonts/oranienbaum-cyrillic-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Oranienbaum';
  src: url('fonts/oranienbaum-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  src: url('fonts/onest-cyrillic-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  src: url('fonts/onest-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  src: url('fonts/onest-rub-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+20BD;
}

:root {
  --neutral: #ECEDEF;
  --card: #FFFFFF;
  --ink: #111214;
  --graphite: #585D65;
  --hair: #DCDFE3;
  --lime: #CDEB71;
  --lime-hi: #D9F28C;
  --steel-hi: #A9B1B9;

  --r-xl: 28px;
  --shadow: 0 1px 2px rgba(17, 18, 20, .04), 0 8px 24px -8px rgba(17, 18, 20, .10);
  --shadow-hi: 0 2px 4px rgba(17, 18, 20, .05), 0 18px 40px -12px rgba(17, 18, 20, .18);

  --serif: 'Oranienbaum', Georgia, 'Times New Roman', serif;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --gutter-l: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--neutral);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.i { width: 1.1em; height: 1.1em; flex: none; fill: currentColor; }

.page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding:
    max(28px, env(safe-area-inset-top))
    var(--gutter-r)
    max(32px, env(safe-area-inset-bottom))
    var(--gutter-l);
  display: grid;
  gap: 28px;
}

/* ---------- первый экран ---------- */
.hero { display: grid; justify-items: center; text-align: center; gap: 10px; padding-top: 8px; }
.hero-photo {
  width: 112px; height: 112px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  box-shadow: 0 0 0 4px var(--card), var(--shadow-hi);
  margin-bottom: 8px;
}
.hero-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 11vw, 64px);
  line-height: .95;
  letter-spacing: -0.02em;
}
.hero-role { font-size: 17px; color: var(--graphite); max-width: 22em; }
.hero-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.hero-facts li {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 15px;
  color: var(--graphite);
}
.hero-facts b { color: var(--ink); font-weight: 600; }

/* ---------- карточки: общее ---------- */
.card {
  display: block;
  background: var(--card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi); }
  .card:hover .btn-lime { background: var(--lime-hi); }
}
.card:active { transform: scale(.98); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 16px; font-weight: 600;
  white-space: nowrap;
  transition: background .2s;
}
.btn-lime { background: var(--lime); color: var(--ink); }

.tag {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--neutral);
  font-size: 15px; font-weight: 500;
  color: var(--graphite);
}

.block { display: grid; gap: 14px; }
.block-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 7.5vw, 40px);
  line-height: 1;
  padding-left: 4px;
}

/* ---------- Telegram ---------- */
.tg {
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-areas: "ava text" "btn btn";
  align-items: center;
  gap: 16px 14px;
  padding: 18px;
  background: var(--ink);
  color: #fff;
}
.tg-avatar { grid-area: ava; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.tg-text { grid-area: text; display: grid; gap: 2px; }
.tg-title { font-size: 18px; font-weight: 600; line-height: 1.2; }
.tg-sub { font-size: 15px; color: var(--steel-hi); }
.tg-btn { grid-area: btn; width: 100%; }

/* ---------- свои продукты ---------- */
.own-grid { display: grid; gap: 14px; }
.product { display: grid; }
.product-visual { display: block; height: 220px; overflow: hidden; }
.product-visual--phone {
  position: relative;
  background:
    radial-gradient(120% 90% at 50% 110%, var(--lime) 0%, rgba(205, 235, 113, 0) 60%),
    linear-gradient(160deg, #F4F5F6 0%, #DADDE1 100%);
}
.phone {
  position: absolute;
  left: 50%; top: 28px;
  width: 168px;
  translate: -50% 0;
  rotate: -6deg;
  padding: 7px;
  border-radius: 30px;
  background: #1A1B1E;
  box-shadow: 0 24px 40px -14px rgba(17, 18, 20, .45);
  transition: rotate .5s var(--ease), translate .5s var(--ease);
}
.phone img { border-radius: 24px; }
@media (hover: hover) {
  .product--course:hover .phone { rotate: -2deg; translate: -50% -6px; }
}
.product-visual--kit {
  position: relative;
  background: linear-gradient(160deg, #DCEBF5 0%, #BCD8F0 100%);
}
.kit {
  position: absolute;
  left: 50%; bottom: 0;
  width: 300px; height: 196px;
  translate: -50% 0;
}
.kit-back {
  position: absolute; left: 10px; right: 10px; bottom: 0;
  height: 150px;
  border-radius: 14px 14px 0 0;
  background: #1F43C2;
}
.kit-back::before {
  content: "";
  position: absolute; left: 0; top: -16px;
  width: 92px; height: 24px;
  border-radius: 12px 12px 0 0;
  background: #1F43C2;
}
.kit-sheet {
  position: absolute; bottom: 30px;
  width: 104px; height: 140px;
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px -8px rgba(17, 18, 20, .35);
  transform-origin: 50% 100%;
  transition: transform .5s var(--ease);
}
.kit-sheet b { font-size: 14px; font-weight: 650; line-height: 1.1; letter-spacing: -0.01em; white-space: nowrap; margin-bottom: 2px; }
.kit-sheet i { display: block; height: 6px; border-radius: 3px; background: #E2E5E9; }
.kit-sheet i:last-child { width: 60%; }
.kit-sheet--1 { left: 6px; transform: rotate(-9deg); }
.kit-sheet--2 { left: 98px; bottom: 44px; }
.kit-sheet--3 { right: 6px; transform: rotate(9deg); }
.kit-sheet--2 b { color: #1F43C2; }
.kit-front {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  height: 92px;
  display: flex; align-items: flex-end;
  padding: 0 16px 14px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, #4C7DF8 0%, #2B57DB 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 -6px 18px -8px rgba(31, 67, 194, .45);
  color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .06em;
}
@media (hover: hover) {
  .product--kit:hover .kit-sheet--1 { transform: translateY(-8px) rotate(-12deg); }
  .product--kit:hover .kit-sheet--2 { transform: translateY(-12px); }
  .product--kit:hover .kit-sheet--3 { transform: translateY(-8px) rotate(12deg); }
}

.product-body { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.product-title {
  font-size: 22px; font-weight: 650; line-height: 1.15; letter-spacing: -0.02em;
}
.product-points { display: grid; gap: 8px; }
.product-points li {
  position: relative;
  padding-left: 26px;
  font-size: 16px;
  color: var(--graphite);
}
.product-points li::before {
  content: "";
  position: absolute; left: 0; top: .2em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-4.9' fill='none' stroke='%23111214' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.product-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}
.price { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; }

/* ---------- Stepik ---------- */
.stepik-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l));
  padding: 4px var(--gutter-r) 18px var(--gutter-l);
  scroll-padding: 0 var(--gutter-r) 0 var(--gutter-l);
}
.stepik-row::-webkit-scrollbar { display: none; }
.course { position: relative; scroll-snap-align: start; display: flex; flex-direction: column; }
.course-cover { width: 100%; aspect-ratio: 1; object-fit: cover; background: #1C1D24; transition: transform .6s var(--ease); }
@media (hover: hover) {
  .course:hover .course-cover { transform: scale(1.03); }
}
.badge {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 15px; font-weight: 600;
}
.course-body {
  display: grid; gap: 10px; align-content: space-between; flex: 1;
  padding: 16px 18px 18px;
  position: relative; /* поверх обложки, которая растёт при наведении */
  background: var(--card);
}
.course-title { font-size: 18px; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
.course-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 15px; color: var(--graphite); }
.rating { color: var(--ink); font-weight: 600; }

.foot { text-align: center; font-size: 15px; color: var(--graphite); padding-top: 4px; }
.foot a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- появление ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero, .tg, .block { animation: rise .7s var(--ease) backwards; }
  .tg { animation-delay: .08s; }
  .block:nth-of-type(1) { animation-delay: .16s; }
  .block:nth-of-type(2) { animation-delay: .24s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 379px) {
  .tg { grid-template-columns: 48px 1fr; gap: 16px 12px; }
  .tg-avatar { width: 48px; height: 48px; }
  .tg-title { font-size: 17px; }
}

/* ---------- шире телефона ---------- */
@media (min-width: 640px) {
  .page { gap: 36px; padding-top: 56px; }
  .tg {
    grid-template-columns: 64px 1fr auto;
    grid-template-areas: "ava text btn";
    padding: 20px 20px 20px 22px;
  }
  .tg-avatar { width: 64px; height: 64px; }
  .tg-btn { width: auto; }
  .own-grid { grid-template-columns: 1fr 1fr; }
  .product { grid-template-rows: auto 1fr; }
  .stepik-row {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-columns: auto;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
}
@media (min-width: 900px) {
  .hero-photo { width: 132px; height: 132px; }
  .product-visual { height: 260px; }
  .phone { width: 196px; }
  .kit { scale: 1.15; transform-origin: 50% 100%; }
}
