/* ===========================================================
   Ноль — IT-блог. Общий стиль в эстетике Apple.
   =========================================================== */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f5f5f7;   /* фирменный светло-серый Apple */
  --bg-dark:   #000000;
  --ink:       #1d1d1f;   /* почти-чёрный текст */
  --ink-soft:  #6e6e73;   /* вторичный серый */
  --line:      #d2d2d7;   /* тонкие разделители */
  --accent:    #0071e3;   /* синий Apple */
  --accent-hi: #2997ff;   /* синий при наведении */
  --radius:    18px;
  --radius-lg: 28px;
  --maxw:      1024px;
  --nav-h:     48px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.47;
  letter-spacing: -0.01em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); text-decoration: underline; }

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Навигация: матовое стекло ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(251, 251, 253, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.nav__in {
  max-width: 1000px; margin: 0 auto; height: 100%;
  padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo {
  font-size: 19px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.nav__logo:hover { text-decoration: none; color: var(--ink); }
.nav__menu { display: flex; gap: 28px; list-style: none; }
.nav__menu a {
  font-size: 14px; color: var(--ink); opacity: 0.85;
  transition: opacity 0.2s;
}
.nav__menu a:hover { opacity: 1; text-decoration: none; color: var(--ink); }
.nav__menu a.is-active { opacity: 1; font-weight: 500; }

/* ---------- Общие секции ---------- */
main { padding-top: var(--nav-h); }

.section { padding: 90px 0; }
.section--soft { background: var(--bg-soft); }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 12px;
}
.h2 {
  font-size: clamp(30px, 4vw, 44px); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.1;
}
.lead {
  font-size: 19px; color: var(--ink-soft); max-width: 640px;
  margin-top: 14px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 22px; border-radius: 980px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  transition: transform 0.2s, background 0.2s, opacity 0.2s;
}
.btn:hover { text-decoration: none; }
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--accent-hi); color: #fff; transform: scale(1.02); }
.btn--ghost { color: var(--accent); }
.btn--ghost:hover { color: var(--accent-hi); text-decoration: underline; }
.btn--light { background: rgba(255,255,255,0.14); color: #fff; }
.btn--light:hover { background: rgba(255,255,255,0.24); color: #fff; }

/* ---------- Hero главной ---------- */
.hero {
  background: var(--bg-dark); color: #f5f5f7;
  text-align: center; padding: 120px 0 130px;
}
.hero__eyebrow { color: var(--accent-hi); }
.hero h1 {
  font-size: clamp(40px, 7vw, 80px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.03;
  background: linear-gradient(180deg, #fff 0%, #b8b8bd 130%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(18px, 2.4vw, 24px); color: #a1a1a6;
  max-width: 620px; margin: 20px auto 34px;
}
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Избранная статья ---------- */
.feature {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  background: var(--bg-soft); border-radius: var(--radius-lg);
  overflow: hidden; align-items: stretch;
}
.feature__media { min-height: 340px; position: relative; }
.feature__body {
  padding: 48px; display: flex; flex-direction: column;
  justify-content: center;
}
.feature__body h3 {
  font-size: clamp(26px, 3vw, 36px); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.12; margin: 10px 0 14px;
}
.feature__body p { color: var(--ink-soft); font-size: 18px; margin-bottom: 22px; }

/* ---------- Сетка карточек ---------- */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.card {
  background: var(--bg-soft); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.card:hover .card__title { color: var(--accent); }
.card a { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.card a:hover { text-decoration: none; }
.card__media { aspect-ratio: 16 / 10; }
.card__in { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.card__tag {
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.card__title {
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.22; transition: color 0.2s;
}
.card__excerpt { font-size: 15px; color: var(--ink-soft); margin-top: 8px; flex: 1; }
.card__meta { font-size: 13px; color: var(--ink-soft); margin-top: 16px; }

/* ---------- Иллюстрации-градиенты (без картинок) ---------- */
.art { width: 100%; height: 100%; position: relative; overflow: hidden; }
.art--ai   { background: linear-gradient(135deg, #5e5ce6 0%, #bf5af2 55%, #ff6482 100%); }
.art--q    { background: linear-gradient(135deg, #0071e3 0%, #64d2ff 60%, #30d158 120%); }
.art--web  { background: linear-gradient(135deg, #ff9f0a 0%, #ff375f 55%, #bf5af2 110%); }
.art--dark { background: radial-gradient(120% 120% at 30% 20%, #1c1c1e 0%, #000 70%); }
.art--soft { background: linear-gradient(135deg, #f5f5f7 0%, #d2d2d7 100%); }
.art::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 80% 20%, rgba(255,255,255,0.35), transparent 60%);
}

/* ---------- Хлебные крошки ---------- */
.crumbs { font-size: 14px; color: var(--ink-soft); padding: 26px 0 0; }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Статья ---------- */
.article-hero { text-align: center; padding: 60px 0 48px; }
.article-hero .tag {
  font-size: 14px; font-weight: 600; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.02em;
}
.article-hero h1 {
  font-size: clamp(34px, 5.5vw, 56px); font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.06; max-width: 820px;
  margin: 14px auto 18px;
}
.article-hero .meta { font-size: 15px; color: var(--ink-soft); }
.article-cover { height: clamp(240px, 40vw, 440px); border-radius: var(--radius-lg); overflow: hidden; }

.prose { max-width: 700px; margin: 0 auto; padding: 54px 0 20px; }
.prose > p { font-size: 19px; line-height: 1.6; margin: 0 0 26px; color: #333336; }
.prose > p:first-of-type::first-letter { }
.prose .dek { font-size: 22px; line-height: 1.5; color: var(--ink); font-weight: 400; }
.prose h2 {
  font-size: 30px; font-weight: 600; letter-spacing: -0.02em;
  margin: 46px 0 16px; line-height: 1.15;
}
.prose h3 { font-size: 22px; font-weight: 600; margin: 32px 0 10px; }
.prose ul, .prose ol { margin: 0 0 26px 24px; }
.prose li { font-size: 19px; line-height: 1.6; margin-bottom: 10px; color: #333336; }
.prose blockquote {
  margin: 34px 0; padding: 6px 0 6px 26px;
  border-left: 3px solid var(--accent);
  font-size: 24px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.35;
}
.prose figure { margin: 40px 0; }
.prose .callout {
  background: var(--bg-soft); border-radius: var(--radius);
  padding: 26px 28px; margin: 34px 0; font-size: 17px; color: var(--ink-soft);
}
.prose .callout strong { color: var(--ink); }
.prose code {
  background: var(--bg-soft); border-radius: 6px; padding: 2px 7px;
  font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 0.9em;
}

/* Следующая статья */
.next {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 44px 0 10px; text-align: center;
}
.next__label { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.next__title { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 8px 0 18px; }

/* ---------- Страница списка ---------- */
.list-head { text-align: center; padding: 70px 0 10px; }
.list-head h1 { font-size: clamp(38px, 6vw, 60px); font-weight: 600; letter-spacing: -0.03em; }
.list-head p { font-size: 20px; color: var(--ink-soft); margin-top: 12px; }

.filters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 34px 0 10px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 7px 16px; border-radius: 980px; font-size: 14px; cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.rows { max-width: 820px; margin: 0 auto; }
.row {
  display: grid; grid-template-columns: 150px 1fr; gap: 26px;
  padding: 30px 0; border-bottom: 1px solid var(--line);
  align-items: center;
}
.row a { text-decoration: none; color: inherit; }
.row a:hover { text-decoration: none; }
.row__thumb { aspect-ratio: 16/10; border-radius: 14px; overflow: hidden; }
.row__tag { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--accent); letter-spacing: 0.02em; }
.row__title { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 8px; line-height: 1.15; transition: color 0.2s; }
.row a:hover .row__title { color: var(--accent); }
.row__excerpt { font-size: 16px; color: var(--ink-soft); }
.row__meta { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }

/* ---------- Подвал ---------- */
.footer {
  background: var(--bg-soft); border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-soft); padding: 34px 0;
}
.footer__in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--accent); text-decoration: none; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---------- Появление при скролле ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .feature { grid-template-columns: 1fr; }
  .feature__media { min-height: 220px; }
  .feature__body { padding: 34px; }
}
@media (max-width: 620px) {
  .section { padding: 64px 0; }
  .grid { grid-template-columns: 1fr; }
  .nav__menu { gap: 18px; }
  .nav__menu a { font-size: 13px; }
  .row { grid-template-columns: 1fr; gap: 14px; }
  .row__thumb { max-width: 100%; }
  .hero { padding: 90px 0 96px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .card:hover { transform: none; }
}
