/* Page /tarif/ (Тарифы), part 1 — render-blocking: base, shared landing pieces and the first screen
   (block 02: heading, offer capsule, three plans, connections strip). Blocks 03–10 and the phone sticky
   button live in tarif-landing-sections.css, which loads without blocking the first paint.
   Figma «LidFly — Проекты · новая структура» → page «34 · Лендинг — Тарифы (/tarif/)»: Desktop 1440
   (1143:8), Mobile 375 (1174:555). Figma Landing/* colours are the --v2-* tokens of tokens.css; header,
   footer and buttons (buttons.css, landing-buttons.css) are shared. Markup: scripts/lib/tarif-page-render.mjs.
   Layout: ≥1280 the 1200 container; 768–1279 40 px gutters; <768 the phone frame B (16 px gutters). */

/* Only the Cyrillic italic is used: one accent phrase per heading. */
@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/playfair-display/playfair-display-cyrillic-400-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.tf-page {
  --tf-shadow-tile: 0 2px 6px color-mix(in srgb, var(--v2-ink) 6%, transparent), 0 12px 32px -8px color-mix(in srgb, var(--v2-ink) 8%, transparent);
  --tf-offer-shadow: 0 4px 16px color-mix(in srgb, var(--v2-butter-ink) 8%, transparent);
  --tf-highlight: color-mix(in srgb, var(--v2-lime-soft) 60%, var(--v2-card));
  margin: 0;
  background: var(--v2-cream);
  color: var(--v2-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.tf-page img { display: block; max-width: 100%; }
.tf-page main { overflow-x: clip; }
.tf-page main [id] { scroll-margin-top: 88px; }
.tf-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.tf-skip { position: fixed; left: 16px; top: -80px; z-index: 1100; padding: 10px 14px; border-radius: var(--radius-element); background: var(--v2-ink); color: var(--v2-cream); }
.tf-skip:focus { top: 16px; }
.tf-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tf-ico { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.tf-brand { width: 18px; height: 18px; flex: none; object-fit: contain; }
.tf-mob { display: none; }
/* Emoji are decoration only: hidden from screen readers, never catch a tap. */
:is(.tf-offer__icon, .tf-tile, .tf-notice__icon) { pointer-events: none; user-select: none; }
.tf-page main :is(a, button, summary):focus-visible { outline: 3px solid var(--btn-focus-ring); outline-offset: 2px; }
/* buttons.css gives every .btn a top margin for forms; landing blocks place buttons themselves. */
.tf-page :is(main, .tf-sticky) .btn { margin: 0; }

/* Shared pieces (Landing / Eyebrow, Overline, H1/H2 with the Playfair accent, Lead, Check) */
.tf-wrap { width: min(calc(100% - 80px), 1200px); margin-inline: auto; }
.tf-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--v2-green); font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; }
.tf-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tf-overline { margin: 0; color: var(--v2-ink-muted); font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; }
.tf-h1 { margin: 0; color: var(--v2-ink); font-size: 56px; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.tf-h2 { margin: 0; color: var(--v2-ink); font-size: 46px; font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; }
.tf-h2--s { font-size: 36px; }
:is(.tf-h1, .tf-h2) em { font-family: var(--v2-font-accent); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--tf-accent, var(--v2-green)); }
.tf-h1 em { font-size: 1.107em; letter-spacing: -0.03em; }
.tf-h2 em { font-size: 1.087em; }
.tf-lead { margin: 0; color: var(--v2-ink-secondary); font-size: 19px; line-height: 1.5; }
.tf-checks { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.tf-checks li { display: flex; align-items: center; gap: 6px; color: var(--v2-ink-secondary); font-size: 14px; font-weight: 500; line-height: 1.4; }
.tf-checks .tf-ico { font-size: 20px; color: var(--v2-green); }
.tf-checks--row { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
/* Notes carry prices and rules: secondary ink keeps WCAG AA (the Figma muted grey is 3.2:1 on cream). */
.tf-footnote { margin: 0; color: var(--v2-ink-secondary); font-size: 14px; line-height: 1.55; }

/* 02 · First screen: background grid, heading, offer capsule */
.tf-hero { position: relative; padding: 72px 0 96px; overflow: clip; }
.tf-hero__bg {
  position: absolute; top: 0; left: 50%; width: 1440px; height: 760px; margin-left: -720px;
  background-image: var(--v2-fade-to-cream), linear-gradient(90deg, var(--v2-grid) 1px, transparent 1px), linear-gradient(180deg, var(--v2-grid) 1px, transparent 1px);
  background-position: 0 500px, 48px 0, 0 32px;
  background-size: 100% 260px, 72px 100%, 100% 72px;
  background-repeat: no-repeat, repeat-x, repeat-y;
  pointer-events: none;
}
.tf-hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.tf-hero__head { display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 900px; text-align: center; }
.tf-hero__head .tf-lead { max-width: 760px; }
.tf-hero__cta { display: none; }
.tf-offer { display: inline-flex; align-items: center; gap: 12px; margin: 0; padding: 10px 22px 10px 10px; border-radius: var(--radius-pill); background: var(--v2-butter); box-shadow: var(--tf-offer-shadow); color: var(--v2-butter-ink); }
.tf-offer__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--v2-card); font-size: 20px; line-height: 1; }
.tf-offer__text { display: flex; flex-direction: column; gap: 2px; }
.tf-offer__text b { font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.tf-offer__text span { font-size: 13px; line-height: 18px; }

/* Plans: three cards of one height; Рекламодатель is highlighted */
.tf-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: 100%; }
.tf-plan { display: flex; flex-direction: column; gap: 22px; min-width: 0; padding: 32px 28px; border: 1px solid var(--v2-line); border-radius: 28px; background: var(--v2-card); }
.tf-plan--featured { border: 2px solid var(--v2-lime); background: var(--v2-lime-soft); padding: 31px 27px; }
.tf-plan__head { display: flex; flex-direction: column; gap: 8px; }
.tf-plan__name { margin: 0; color: var(--v2-ink); font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.tf-plan__note { margin: 0; color: var(--v2-ink-secondary); font-size: var(--text-lg); line-height: 1.55; }
.tf-plan__price { display: flex; flex-direction: column; gap: 6px; }
.tf-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0; }
.tf-price b { color: var(--v2-ink); font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.tf-price span { color: var(--v2-ink-muted); font-size: var(--text-lg); line-height: 1.55; }
.tf-plan__sub { margin: 0; color: var(--v2-green); font-size: 14px; font-weight: 500; line-height: 1.4; }
.tf-plan__features { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; border-top: 1px solid var(--v2-line); }
.tf-plan--featured .tf-plan__features { border-top-color: var(--v2-lime); }
.tf-dots { display: none; }

/* Connections strip: chips link to the setup docs, as the header menu «Подключения» */
.tf-strip { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 1000px; text-align: center; }
.tf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tf-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 12px; border: 1px solid var(--v2-line); border-radius: var(--radius-pill); background: var(--v2-card); color: var(--v2-ink); font-size: 14px; font-weight: 500; line-height: 1.4; text-decoration: none; transition: border-color var(--motion-duration-fast) ease; }
.tf-chip:hover { border-color: var(--v2-green); }
.tf-hero .tf-footnote { max-width: 760px; text-align: center; }

/* Tablet and small desktop: the three cards stay in a row down to 1024 px. */
@media (max-width: 1279px) {
  .tf-plan { padding: 28px 22px; }
  .tf-plan--featured { padding: 27px 21px; }
}

/* 768–1023: cards become the swipe row of the phone. */
@media (max-width: 1023px) {
  .tf-plans { display: flex; gap: 12px; width: calc(100% + 80px); margin-inline: -40px; padding: 4px 40px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 40px; scrollbar-width: none; overscroll-behavior-x: contain; }
  .tf-plans::-webkit-scrollbar { display: none; }
  .tf-plan { flex: 0 0 min(340px, 80%); scroll-snap-align: start; }
  .tf-dots { display: flex; gap: 6px; align-self: flex-start; }
  .tf-dots i { width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--v2-line); transition: width var(--motion-duration-fast) ease, background-color var(--motion-duration-fast) ease; }
  .tf-dots i.is-active { width: 18px; background: var(--v2-green); }
}

/* Phone (frame B): left-aligned heading, own button on the first screen */
@media (max-width: 767px) {
  .tf-wrap { width: calc(100% - 32px); }
  .tf-desk { display: none; }
  .tf-mob { display: inline; }
  .tf-eyebrow { gap: 6px; font-size: 12px; }
  .tf-eyebrow::before { width: 7px; height: 7px; }
  .tf-h1 { font-size: 36px; line-height: 1.08; }
  .tf-h2, .tf-h2--s { font-size: 30px; line-height: 1.1; }
  .tf-h2 em { font-size: 1.1em; }
  .tf-lead { font-size: 17px; line-height: 1.5; }
  .tf-hero { padding: 20px 0 48px; }
  .tf-hero__bg { display: none; }
  .tf-hero__inner { align-items: stretch; gap: 14px; }
  .tf-hero__head { align-items: flex-start; gap: 14px; text-align: left; }
  .tf-hero__cta { display: block; width: 100%; }
  .tf-checks--row { flex-direction: column; justify-content: flex-start; gap: 6px; }
  .tf-checks--row li { font-size: 13px; }
  .tf-checks--row .tf-ico { font-size: 18px; }
  .tf-offer { align-items: center; padding: 10px 16px 10px 10px; border-radius: 24px; }
  .tf-offer__icon { width: 36px; height: 36px; font-size: 18px; }
  .tf-plans { width: calc(100% + 32px); margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .tf-plan { flex-basis: min(296px, 82%); padding: 26px 22px; }
  .tf-plan--featured { padding: 25px 21px; }
  .tf-plan__name { font-size: 20px; }
  .tf-plan__note { font-size: 14px; }
  .tf-plan__features { gap: 10px; padding-top: 18px; }
  .tf-plan__features .tf-checks { gap: 10px; }
  .tf-plan__features .tf-checks li { font-size: 13px; }
  .tf-plan__features .tf-ico { font-size: 18px; }
  .tf-strip { align-items: flex-start; text-align: left; }
  .tf-chips { justify-content: flex-start; gap: 8px; }
  .tf-chip { gap: 6px; padding: 4px 10px 4px 8px; font-size: 13px; }
  .tf-chip .tf-brand { width: 16px; height: 16px; }
  .tf-hero .tf-footnote { text-align: left; }
}
