/* Creatu — фирменный стиль.
   Источник токенов: brand/creatu/tokens/*.css. Свои цвета мимо системы не заводим. */

/* ---------- Шрифты (локальные, без внешних загрузок) ---------- */
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/assets/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/assets/manrope-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/assets/manrope-latin.woff2") format("woff2");
  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: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("/assets/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url("/assets/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url("/assets/unbounded-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 400 900;
  src: url("/assets/unbounded-latin.woff2") format("woff2");
  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: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url("/assets/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url("/assets/jetbrains-mono-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url("/assets/jetbrains-mono-latin.woff2") format("woff2");
  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; }

/* ---------- Токены Creatu ---------- */
:root {
  --violet-50:#F3EEFF; --violet-100:#E6DCFF; --violet-200:#CDB9FF; --violet-300:#B092FF; --violet-400:#8F66FF;
  --violet-500:#6E3BFF; --violet-600:#5A28E6; --violet-700:#471CBE; --violet-800:#341590; --violet-900:#241063;
  --coral-50:#FFF0EE; --coral-100:#FFDCD8; --coral-300:#FF9B92; --coral-500:#FF5A4E; --coral-600:#E6433A; --coral-700:#B8302A;
  --lime-50:#F5FDE6; --lime-100:#E9FBC2; --lime-300:#CBF680; --lime-500:#A8F03A; --lime-600:#86CC1F; --lime-700:#5E9414;
  --cyan-50:#EAFBFD; --cyan-100:#CDF5F9; --cyan-500:#4ED8E8; --cyan-600:#22B7C9; --cyan-700:#178A98;
  --sun-50:#FFF9E6; --sun-100:#FFF0BF; --sun-500:#FFC933; --sun-600:#E6AD12; --sun-700:#B3850A;
  --ink-950:#0F0E14; --ink-900:#17161F; --ink-800:#25232F; --ink-700:#3A3846; --ink-600:#55525F; --ink-500:#7A7890;
  --ink-400:#A3A1B5; --ink-300:#C9C6D9; --ink-200:#E2E0EC; --ink-100:#EEEDF4; --ink-50:#F6F5FA; --ink-0:#FBFBFD; --white:#FFFFFF;

  --bg:var(--ink-0); --surface:var(--white); --surface-2:var(--ink-50); --surface-3:var(--ink-100); --surface-inverse:var(--ink-900);
  --border:var(--ink-200); --border-strong:var(--ink-300); --border-inverse:rgba(255,255,255,.14);
  --text:var(--ink-900); --text-2:var(--ink-600); --text-3:var(--ink-500); --text-inverse:var(--white);
  --primary:var(--violet-500); --primary-hover:var(--violet-600); --primary-active:var(--violet-700); --primary-soft:var(--violet-50);
  --accent:var(--coral-500); --accent-hover:var(--coral-600); --accent-soft:var(--coral-50);
  --highlight:var(--lime-500); --highlight-soft:var(--lime-50);
  --focus-ring:0 0 0 3px rgba(110,59,255,.32);
  --gradient-brand:linear-gradient(135deg,#FF5A4E 0%,#6E3BFF 100%);
  --gradient-brand-soft:linear-gradient(135deg,#FFF0EE 0%,#F3EEFF 100%);
  --gradient-hero:radial-gradient(60% 80% at 82% -6%,rgba(255,90,78,.16),transparent 62%),radial-gradient(52% 72% at 4% 96%,rgba(110,59,255,.16),transparent 62%);
  --type-post:var(--violet-500); --type-carousel:var(--coral-500); --type-reel:var(--lime-500); --type-story:var(--cyan-500); --type-article:var(--sun-500);

  --font-display:"Unbounded",system-ui,sans-serif;
  --font-body:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,monospace;
  --ls-display:-.03em; --ls-heading:-.02em; --ls-caps:.08em;

  --sh-xs:0 1px 2px rgba(23,22,31,.06);
  --sh-sm:0 2px 6px rgba(23,22,31,.08),0 1px 2px rgba(23,22,31,.04);
  --sh-md:0 8px 24px -8px rgba(23,22,31,.16),0 2px 6px rgba(23,22,31,.06);
  --sh-lg:0 24px 48px -16px rgba(23,22,31,.22),0 8px 16px -8px rgba(23,22,31,.08);
  --sh-primary:0 8px 24px -8px rgba(110,59,255,.55);
  --ease:cubic-bezier(.2,.8,.2,1); --dur-1:120ms; --dur-2:200ms; --dur-3:360ms;

  --r-md:10px; --r-lg:14px; --r-xl:20px; --r-2xl:28px; --r-3xl:36px; --r-full:999px;
  --container:1200px; --gutter:24px;
  --section:112px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--lime-500); color: var(--ink-900); }
a { color: var(--primary); text-decoration: none; transition: color var(--dur-1) var(--ease); }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
img, svg, picture { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }
main { display: block; }

.container { width: min(100% - (var(--gutter) * 2), var(--container)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 16px; border-radius: var(--r-md); background: var(--ink-900); color: var(--white); font-weight: 700; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); text-decoration: none; color: var(--white); }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: var(--ls-display); text-wrap: balance; }
h1 { font-size: clamp(34px, 5.6vw, 68px); line-height: 1.05; font-weight: 800; }
h2 { font-size: clamp(27px, 3.7vw, 44px); line-height: 1.1; }
h3 { font-size: clamp(20px, 2.1vw, 26px); line-height: 1.2; font-weight: 600; }
p { margin: 0; }
.lead { max-width: 640px; margin: 0; color: var(--text-2); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; text-wrap: pretty; }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding: 12px 0; background: rgba(251,251,253,.78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 48px; }
.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand img { width: 132px; height: 28px; }
.desktop-nav { display: flex; align-items: center; gap: 2px; }
.nav-link { padding: 9px 14px; border-radius: var(--r-md); color: var(--text-2); font-size: 14px; font-weight: 600; }
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.menu-button { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); cursor: pointer; }
.menu-button svg { width: 20px; height: 20px; }
.mobile-menu { margin-top: 10px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sh-md); }
.mobile-menu a { display: block; padding: 12px 14px; border-radius: var(--r-md); color: var(--text); font-weight: 600; }
.mobile-menu a:hover { background: var(--surface-2); text-decoration: none; }
.mobile-menu .button { width: 100%; margin-top: 8px; }

/* ---------- Кнопки ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--r-md); font-family: var(--font-body); font-size: 15px; font-weight: 700; line-height: 1; text-align: center; cursor: pointer; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
.button:hover { text-decoration: none; }
.button:active { transform: scale(.98); }
.button-primary { background: var(--primary); color: var(--white); box-shadow: var(--sh-primary); }
.button-primary:hover { background: var(--primary-hover); color: var(--white); }
.button-accent { background: var(--accent); color: var(--white); }
.button-accent:hover { background: var(--accent-hover); color: var(--white); }
.button-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.button-ghost:hover { background: var(--surface-2); color: var(--text); }
.button-dark { background: var(--white); color: var(--ink-900); }
.button-dark:hover { background: var(--ink-100); color: var(--ink-900); }
.button-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.button-xl { min-height: 56px; padding: 0 28px; font-size: 16px; }

/* ---------- Секции ---------- */
.section-tight { padding: 64px 0; }

/* ---------- Внутренние страницы ---------- */
.page-hero { padding: 56px 0 40px; background: var(--gradient-hero), var(--bg); }
.page-hero-shell { display: grid; gap: 18px; padding: clamp(32px, 4.5vw, 64px); border: 1px solid var(--border); border-radius: var(--r-3xl); background: var(--surface); }
.page-hero-shell .lead { max-width: 780px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--text-3); font-size: 14px; }
.breadcrumbs a { color: var(--text-3); }
.breadcrumbs span::before { content: "/"; margin-right: 8px; color: var(--ink-300); }
.prose { max-width: 820px; }
.prose h2 { margin: 48px 0 16px; font-size: clamp(22px, 2.6vw, 30px); }
.prose h3 { margin: 32px 0 12px; font-size: 20px; }
.prose p, .prose li { color: var(--text-2); }
.prose p + p { margin-top: 14px; }
.prose ul, .prose ol { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.prose code { padding: 2px 7px; border-radius: 6px; background: var(--surface-2); font-family: var(--font-mono); font-size: .9em; overflow-wrap: anywhere; }
.prose .notice { margin: 28px 0; padding: 22px; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--primary-soft); color: var(--text); }
.prose .legal-meta { padding: 16px 0; border-block: 1px solid var(--border); color: var(--text-3); font-size: 14px; }

/* ---------- Подвал ---------- */
.site-footer { padding: 0 0 24px; }
.footer-shell { padding: clamp(32px, 4vw, 48px); border: 1px solid var(--border); border-radius: var(--r-3xl); background: var(--surface); }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-brand img { width: 132px; height: 28px; margin-bottom: 18px; }
.footer-brand p { max-width: 320px; color: var(--text-3); font-size: 14px; }
.footer-column strong { display: block; margin-bottom: 14px; font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: var(--ls-heading); }
.footer-column a { display: block; padding: 5px 0; color: var(--text-3); font-size: 14px; }
.footer-column a:hover { color: var(--primary); text-decoration: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 13px; }

/* ---------- Появление ---------- */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  :root { --section: 88px; }
  .footer-top { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .desktop-nav { display: none; }
  .menu-button { display: inline-flex; }
  .nav-actions .button-ghost { display: none; }
}

@media (max-width: 760px) {
  :root { --section: 64px; --gutter: 18px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .footer-bottom { flex-direction: column; }
  .page-hero { padding: 32px 0 24px; }
}

@media (max-width: 460px) {
  body { font-size: 15px; }
  .brand img, .footer-brand img { width: 116px; height: 25px; }
  .footer-top { grid-template-columns: 1fr; }
  .island, .footer-shell, .page-hero-shell { border-radius: var(--r-2xl); padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* =====================================================================
   Готовый лендинг Creatu (главная страница).
   Разметка приходит из brand/creatu/landing-autoposting.dc.html
   и лежит в site/home-generated.html. Там стили заданы прямо в тегах,
   поэтому наведение и адаптив дописываются здесь через !important.
   ===================================================================== */

/* наведение и нажатие */
.scp0:hover { background: #F6F5FA !important; text-decoration: none !important; }
.scp1:hover { background: #5A28E6 !important; text-decoration: none !important; }
.scp2:active { transform: scale(.98) !important; }
.scp3 { transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.scp3:hover { transform: translateY(-2px) !important; box-shadow: var(--sh-lg) !important; }

/* подвал главной */
@media (max-width: 1080px) {
  .landing-footer-top { grid-template-columns: 1.2fr 1fr 1fr !important; }
  .landing-footer-top > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .landing-footer-top { grid-template-columns: 1fr 1fr !important; gap: 30px 20px !important; }
  .landing-footer-bottom { flex-direction: column; }
}
@media (max-width: 420px) {
  .landing-footer-top { grid-template-columns: 1fr !important; }
}

/* адаптив главной: инлайн-стили перебиваются через !important */
@media (max-width: 1024px) {
  [style*="grid-template-columns: minmax(0px, 6fr) minmax(320px, 5fr)"],
  [style*="grid-template-columns: minmax(0px, 7fr) minmax(0px, 5fr)"],
  [style*="grid-template-columns: minmax(0px, 5fr) minmax(0px, 7fr)"],
  [style*="grid-template-columns: minmax(0px, 1fr) minmax(280px, 380px)"],
  [style*="grid-template-columns: minmax(0px, 1.4fr) minmax(0px, 1fr)"],
  [style*="grid-template-columns: 4fr 8fr"] { grid-template-columns: minmax(0, 1fr) !important; }
  [style*="padding: 112px 24px"] { padding: 80px 24px !important; }
}

@media (max-width: 900px) {
  /* карточки в три колонки складываются в две; превью слайдов карусели (gap 8px) не трогаем */
  [style*="grid-template-columns: repeat(3, 1fr)"]:not([style*="gap: 8px"]) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 760px) {
  [style*="padding: 112px 24px"] { padding: 60px 18px !important; }
  [style*="padding: 0px 24px"] { padding-left: 18px !important; padding-right: 18px !important; }
  [style*="padding: 12px 24px"] { padding-left: 18px !important; padding-right: 18px !important; }
  [style*="padding: 48px 24px"] { padding: 36px 18px !important; }
  [style*="padding: 24px 28px"] { padding: 20px 18px !important; }
  [style*="padding: 28px 24px"] { padding: 22px 18px !important; }
  [style*="grid-template-columns: repeat(3, 1fr)"]:not([style*="gap: 8px"]) { grid-template-columns: minmax(0, 1fr) !important; }
  [style*="grid-template-columns: 1fr auto"] { grid-template-columns: minmax(0, 1fr) !important; }
  /* календарь месяца уезжает в горизонтальную прокрутку, а не сжимается в кашу */
  div:has(> [style*="grid-template-columns: repeat(7, 1fr)"]) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  [style*="grid-template-columns: repeat(7, 1fr)"] { min-width: 620px; }
  /* кнопки на всю ширину */
  a[style*="height: 56px"] { width: 100%; justify-content: center; }
}

@media (max-width: 460px) {
  [style*="padding: 112px 24px"] { padding: 48px 16px !important; }
  [style*="border-radius: 28px"] { border-radius: 20px !important; }
  [style*="border-radius: 36px"] { border-radius: 24px !important; }
}

/* сетки и флексы должны уметь сжиматься, иначе inline-разметка распирает экран */
@media (max-width: 1024px) {
  main * { min-width: 0 !important; }
  main [style*="grid-template-columns: repeat(7, 1fr)"] { min-width: 620px !important; }
  /* длинный микро-лейбл в первом экране переносится, а не растягивает страницу */
  main [style*="white-space: nowrap"][style*="letter-spacing: 0.08em"] { white-space: normal !important; }
}

/* мобильная посадка главной: поля, размеры заголовков, компактная шапка */
@media (max-width: 760px) {
  main [style*="max-width: 1200px"],
  main [style*="max-width: 1160px"] { padding-left: 18px !important; padding-right: 18px !important; }
  main h1 { font-size: clamp(30px, 8.4vw, 44px) !important; line-height: 1.06 !important; }
  main h2 { font-size: clamp(25px, 6.6vw, 34px) !important; line-height: 1.12 !important; }
  main h3 { font-size: clamp(18px, 4.6vw, 22px) !important; }
  main p[style*="font-size: 20px"] { font-size: 17px !important; }
  main p[style*="font-size: 18px"] { font-size: 16px !important; }
  /* шапка: только знак и действия, разделы остаются в подвале и по скроллу */
  main > div > header nav { display: none !important; }
  main > div > header > div { padding-left: 18px !important; padding-right: 18px !important; }
}

@media (max-width: 420px) {
  main a[style*="height: 56px"] { padding-left: 16px !important; padding-right: 16px !important; font-size: 15px !important; }
  main a[style*="height: 40px"] { padding-left: 12px !important; padding-right: 12px !important; font-size: 13px !important; }
}

@media (max-width: 760px) {
  /* строки «слева заголовок — справа статус» переносятся, а не наезжают друг на друга */
  main [style*="display: flex"][style*="justify-content: space-between"] { flex-wrap: wrap !important; }
  main [style*="display: flex"][style*="justify-content: space-between"] > * { min-width: 0; }
}

@media (max-width: 460px) {
  /* пары кнопок переносятся и растягиваются; строки «иконка + текст» не трогаем */
  main [style*="display: flex"][style*="gap: 8px"]:has(> a, > button) { flex-wrap: wrap !important; }
  main [style*="display: flex"][style*="gap: 8px"] > button,
  main [style*="display: flex"][style*="gap: 8px"] > a { flex: 1 1 auto; justify-content: center; }
}

/* якоря не уезжают под липкую шапку */
main section[id] { scroll-margin-top: 88px; }

/* Same brand, two languages. Language choice remains visible on mobile. */
.language-switch { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px; font-weight: 700; color: var(--text-2); }
.language-switch:hover { color: var(--primary); }
.page-hero h1 { overflow-wrap: anywhere; hyphens: auto; }
.landing-header > div > div { flex-wrap: wrap; }
@media (max-width: 460px) {
  .landing-header > div { gap: 8px !important; }
  .landing-header > div > div { gap: 4px !important; }
  .landing-header > div > a span { font-size: 17px !important; }
}
