/* =========================================================
   Top Tips For Life — main stylesheet
   Дизайн: editorial top-10, navy + красный акцент
   ========================================================= */

:root {
  --navy:        #0F2A52;
  --navy-dark:   #0A1F3F;
  --accent:      #E63946;
  --accent-dark: #C92B3A;
  --text:        #1A1A1A;
  --text-soft:   #3D3D3D;
  --text-muted:  #6B7280;
  --bg:          #FFFFFF;
  --bg-soft:     #FAF7F2;
  --border:      #E5E7EB;
  --border-soft: #F1F0EC;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(15, 42, 82, 0.06);
  --shadow:    0 4px 16px rgba(15, 42, 82, 0.08);

  --max-w:     760px;   /* читабельная ширина статьи */
  --max-w-wide: 1140px; /* для header / footer */
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  border-bottom: 1px solid var(--navy-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__logo img {
  height: 36px;
  width: auto;
}

.badge-reclame {
  display: inline-block;
  padding: 5px 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  user-select: none;
}

/* ---------- Article ---------- */
.article {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.article__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.article__meta-dot {
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

.article__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.article__hero {
  position: relative;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
}

.article__hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article__hero-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.article__lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 16px;
}

.article__lead strong { color: var(--text); font-weight: 700; }

.article__divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 48px 0 40px;
}

/* ---------- Cards (top-10 items) ---------- */
.cards { display: flex; flex-direction: column; gap: 56px; }

.card { display: flex; flex-direction: column; gap: 20px; }

.card__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
}

.card__image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card__meta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.card__head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 4px;
}

.card__number {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 56px;
  font-weight: 700;
  line-height: 0.95;
  color: var(--accent);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  min-width: 72px;
}

.card__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.25;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.005em;
  padding-top: 6px;
}

.card__body { display: flex; flex-direction: column; gap: 14px; }

.card__body p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
}

.card__cta {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 14px 22px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background 0.15s ease, transform 0.15s ease;
  align-self: flex-start;
  line-height: 1.3;
}

.card__cta:hover { background: var(--accent-dark); }
.card__cta:active { transform: translateY(1px); }

.card__cta::after {
  content: '→';
  font-size: 16px;
  line-height: 1;
}

/* ---------- Legal pages ---------- */
.legal {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.legal__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.legal h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin: 32px 0 12px;
  letter-spacing: -0.005em;
}

.legal p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.legal ul {
  margin: 8px 0 18px 22px;
}

.legal li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.legal strong { color: var(--text); font-weight: 600; }

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal a:hover { color: var(--accent-dark); }

.legal address {
  font-style: normal;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
  margin: 8px 0 18px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #E5E7EB;
  margin-top: 64px;
  padding: 56px 24px 32px;
}

.site-footer__inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
}

.site-footer__columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.site-footer__col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}

.site-footer__col p,
.site-footer__col li {
  font-size: 14px;
  line-height: 1.65;
  color: #C5CCD6;
  font-weight: 400;
}

.site-footer__col + .site-footer__col h4:not(:first-child),
.site-footer__col p + h4 { margin-top: 24px; }

.site-footer__list { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.site-footer__list a {
  color: #C5CCD6;
  transition: color 0.15s ease;
}

.site-footer__list a:hover { color: #fff; }

.site-footer__contact-block + .site-footer__contact-block { margin-top: 16px; }

.site-footer__copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: #8A93A0;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .site-header__inner { padding: 14px 20px; }
  .site-header__logo img { height: 30px; }

  .article { padding: 36px 20px 56px; }
  .article__title { margin-bottom: 22px; }
  .article__divider { margin: 36px 0 32px; }

  .cards { gap: 44px; }

  .card__head { gap: 14px; }
  .card__number { font-size: 44px; min-width: 56px; }
  .card__title { padding-top: 2px; }

  .legal { padding: 36px 20px 56px; }

  .site-footer { padding: 44px 20px 28px; margin-top: 48px; }
  .site-footer__columns { grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }
}

@media (max-width: 420px) {
  .card__cta { width: 100%; justify-content: center; padding: 14px 18px; font-size: 13px; }
}

/* ---------- Focus visibility ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
