/* Хаб гороскопов «сегодня / завтра / неделя» — редизайн 18.10.2026 по макету Ивана.
   Префикс td-. Анимации — только transform/opacity, с учётом prefers-reduced-motion. */

.td {
  --td-gold: #d9c39a;
  --td-gold-dim: rgba(217, 195, 154, .28);
  --td-lav: #b89cf6;
  --td-lav-lt: #c9b3ff;
  --td-txt: #efeaf7;
  --td-txt2: #b8acd6;
  --td-txt3: #8a80a3;
  --td-line: rgba(255, 255, 255, .08);
  --td-ease: cubic-bezier(.22, .8, .24, 1);
  --td-serif: var(--font-serif, 'Playfair Display', Georgia, serif);
  color: var(--td-txt);
  overflow-x: clip;
}
.td-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; position: relative; }
.td a { text-decoration: none; }

/* ── Шапка ─────────────────────────────────────────────────── */
.td-hero { position: relative; padding: 18px 0 34px; isolation: isolate; }
.td-hero__in { z-index: 1; }
.td-hero__wheel {
  position: absolute; z-index: 0; pointer-events: none;
  top: -40px; right: -170px; width: 380px; height: 380px; opacity: .55;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 71%);
          mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 71%);
}
.td-hero__wheel img {
  width: 100%; height: 100%; display: block; mix-blend-mode: screen;
  filter: sepia(.55) saturate(1.35) hue-rotate(-12deg) brightness(1.05);
  animation: td-spin 240s linear infinite;
}
.td-hero__wheel::after {
  content: ""; position: absolute; inset: 10%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(123, 80, 210, .32), transparent 65%);
}
@keyframes td-spin { to { transform: rotate(360deg); } }

.td-crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--td-txt2); margin-bottom: 22px; }
.td-crumbs a { color: var(--td-txt2); }
.td-crumbs a:hover { color: var(--td-txt); }
.td-crumbs span[aria-hidden] { color: var(--td-txt3); }
.td-crumbs [aria-current] { color: var(--td-txt); }

.td-eyebrow {
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--td-txt2);
  display: flex; align-items: center; gap: 14px; margin: 0 0 12px;
}
.td-eyebrow::after { content: ""; flex: 0 0 56px; height: 1px; background: linear-gradient(90deg, var(--td-gold-dim), transparent); }
@media (max-width: 420px) { .td-eyebrow { letter-spacing: .22em; } .td-cta .td-eyebrow::after { display: none; } }

.td-h1 {
  font-family: var(--td-serif); font-weight: 500; letter-spacing: -.015em;
  font-size: clamp(46px, 11vw, 76px); line-height: .98; margin: 0; color: #f8f4ff;
}
.td-h1 em { display: inline-block; font-style: italic; color: var(--td-lav); }
.td-sub { margin: 12px 0 0; font-size: 19px; color: var(--td-txt2); }

.td-tabs { display: flex; gap: 6px; margin-top: 26px; border-bottom: 1px solid var(--td-line); max-width: 330px; }
.td-tab { position: relative; padding: 12px 12px 14px; font-size: 16px; color: var(--td-txt2); transition: color .2s; }
.td-tab:first-child { padding-left: 10px; }
.td-tab:hover { color: var(--td-txt); }
.td-tab.is-active { color: var(--td-txt); font-weight: 600; }
.td-tab.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--td-lav); box-shadow: 0 0 12px rgba(184, 156, 246, .6);
}

.td-pick__t { margin: 30px 0 14px; font-size: 16px; color: var(--td-txt2); }
.td-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 6px; }
.td-pick__i {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px;
  border: 1px solid transparent; border-radius: 14px; color: var(--td-txt2); font-size: 14px;
  transition: border-color .25s, background-color .25s, color .25s, transform .25s var(--td-ease);
}
.td-pick__i:hover { color: var(--td-txt); background: rgba(184, 156, 246, .06); transform: translateY(-2px); }
.td-pick__i.is-mine {
  color: var(--td-txt); border-color: rgba(184, 156, 246, .75);
  background: rgba(123, 80, 210, .14); box-shadow: 0 0 22px rgba(123, 80, 210, .32), inset 0 0 14px rgba(184, 156, 246, .12);
}
.td-glyph { width: 40px; height: 40px; fill: none; stroke: var(--td-gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.td-pick__i:hover .td-glyph, .td-pick__i.is-mine .td-glyph { filter: drop-shadow(0 0 6px rgba(217, 195, 154, .45)); }

/* ── Список прогнозов ──────────────────────────────────────── */
.td-list { padding: 26px 0 30px; }
.td-h2 {
  font-family: var(--td-serif); font-weight: 500; font-size: clamp(30px, 7.6vw, 44px); line-height: 1.1;
  margin: 0 0 8px; display: flex; align-items: center; gap: 18px;
}
.td-h2::after { content: ""; flex: 0 0 56px; height: 1px; background: linear-gradient(90deg, var(--td-gold-dim), transparent); }

.td-grid { display: grid; grid-template-columns: 1fr; }
.td-card {
  display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 26px 0 24px;
  border-bottom: 1px solid var(--td-line); scroll-margin-top: 90px; position: relative;
}
.td-card:last-child { border-bottom: 0; }
.td-card__g { width: 50px; height: 50px; margin-top: 2px; transition: transform .5s var(--td-ease), filter .3s; }
.td-card:hover .td-card__g { transform: rotate(-8deg) scale(1.06); filter: drop-shadow(0 0 8px rgba(217, 195, 154, .5)); }
.td-card__t { font-family: var(--td-serif); font-weight: 500; font-size: 24px; line-height: 1.15; margin: 0; }
.td-card__t a { color: var(--td-txt); }
.td-card__t a:hover { color: var(--td-lav-lt); }
.td-card__d { margin: 6px 0 0; font-size: 15px; color: var(--td-txt2); }
.td-card__x { margin: 12px 0 0; font-size: 17px; line-height: 1.5; color: var(--td-txt);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.td-card.is-mine::before {
  content: ""; position: absolute; left: -20px; right: -20px; top: 0; bottom: 0; z-index: -1; border-radius: 16px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(123, 80, 210, .18), transparent 70%);
}
.td-card.is-flash::before { animation: td-flash 1.6s ease-out; }
@keyframes td-flash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: .6; } }

.td-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 16px; font-weight: 600; color: var(--td-lav-lt); }
.td-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--td-ease); }
.td-more:hover svg { transform: translateX(4px); }
.td-more--u { font-weight: 500; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(201, 179, 255, .5); }

/* ── Блок матрицы ──────────────────────────────────────────── */
.td-cta { position: relative; padding: 34px 0 56px; border-top: 1px solid var(--td-line); isolation: isolate; }
.td-cta::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 30%; width: 900px; height: 600px; transform: translateX(-30%);
  background: radial-gradient(closest-side, rgba(110, 70, 200, .22), transparent);
}
.td-cta__t { font-family: var(--td-serif); font-weight: 500; font-size: clamp(36px, 9vw, 52px); line-height: 1.05; margin: 4px 0 0; color: #f8f4ff; }
.td-cta__lead { margin: 10px 0 0; font-size: 20px; line-height: 1.4; color: var(--td-txt2); }
.td-cta__note { margin: 18px 0 0; font-size: 17px; color: var(--td-txt); }
.td-cta__media img { display: block; width: 100%; height: auto; }
.td-cta__media--d img { -webkit-mask-image: radial-gradient(ellipse 70% 72% at 52% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 70% 72% at 52% 50%, #000 55%, transparent 100%); }
.td-cta__media--m { margin: 18px -20px 0; }
.td-cta__media--m img { -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 80%, transparent); mask-image: linear-gradient(180deg, transparent, #000 12%, #000 80%, transparent); }
.td-cta__media--d { display: none; }

.td-form { margin-top: 18px; max-width: 520px; }
.td-form__l { display: block; font-size: 15px; color: var(--td-txt); margin: 0 0 8px; }
.td-form__row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.td-form__f { position: relative; }
.td-in {
  width: 100%; height: 56px; padding: 0 48px 0 18px; border-radius: 12px; font: inherit; font-size: 17px; color: var(--td-txt);
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .16); outline: 0; transition: border-color .2s, box-shadow .2s;
}
.td-in::placeholder { color: var(--td-txt3); letter-spacing: .04em; }
.td-in:focus { border-color: rgba(184, 156, 246, .8); box-shadow: 0 0 0 3px rgba(184, 156, 246, .15); }
.td-in__ic { position: absolute; right: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; fill: none; stroke: var(--td-txt2); stroke-width: 1.5; pointer-events: none; }
.td-btn {
  height: 56px; padding: 0 26px; border: 0; border-radius: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 18px/1 var(--font, sans-serif); color: #160f2a; background: var(--td-lav);
  box-shadow: 0 8px 30px rgba(184, 156, 246, .28); transition: transform .2s var(--td-ease), box-shadow .2s, background-color .2s;
}
.td-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--td-ease); }
.td-btn:hover { background: #c4adf9; box-shadow: 0 10px 36px rgba(184, 156, 246, .4); }
.td-btn:hover svg { transform: translateX(4px); }
.td-btn:active { transform: scale(.98); }
.td-form__step2 { margin-top: 14px; }
.td-js .td-form__step2 { display: none; }
.td-js .td-form.is-step2 .td-form__step2 { display: block; animation: td-in .45s var(--td-ease) both; }
.td-form__fine { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--td-txt3); }
.td-form__fine a { color: var(--td-txt2); text-decoration: underline; }
.td-form__err { margin: 10px 0 0; font-size: 14px; color: #fb923c; }
.td-form__hint { margin: 12px 0 0; font-size: 15px; color: var(--td-txt2); }
.td-form.is-step2 + .td-form__hint { display: none; }
@keyframes td-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Появление при прокрутке ───────────────────────────────── */
.td-js .td-rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s var(--td-ease); transition-delay: calc(var(--i, 0) * 70ms); }
.td-js .td-rv.is-in { opacity: 1; transform: none; }
.td-js .td-pick__i.td-rv { transform: translateY(10px) scale(.94); transition-delay: calc(var(--i, 0) * 40ms); }
.td-js .td-pick__i.td-rv.is-in { transform: none; }

/* ── Компьютер ─────────────────────────────────────────────── */
@media (min-width: 760px) {
  .td-wrap { padding: 0 32px; }
  .td-hero { padding: 26px 0 40px; }
  .td-hero__wheel { top: -70px; right: -60px; width: 600px; height: 600px; opacity: .8; }
  .td-pick { grid-template-columns: repeat(12, 1fr); gap: 4px; }
  .td-pick__i { font-size: 13px; padding: 12px 2px 10px; }
  .td-glyph { width: 34px; height: 34px; }
  .td-list { padding-top: 40px; }
  .td-grid { grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
  .td-card { grid-template-columns: 52px 1fr; gap: 14px; padding: 26px 26px 26px 0; border-bottom: 1px solid var(--td-line); }
  .td-card:nth-child(3n+2), .td-card:nth-child(3n) { padding-left: 26px; border-left: 1px solid var(--td-line); }
  .td-card:nth-last-child(-n+3) { border-bottom: 0; }
  .td-card__g { width: 40px; height: 40px; }
  .td-card__t { font-size: 21px; }
  .td-card__d { font-size: 13px; }
  .td-card__x { font-size: 15px; }
  .td-more { font-size: 14px; }
  .td-cta { padding: 56px 0 72px; }
  .td-cta__in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
  .td-cta__lead { font-size: 19px; }
  .td-cta__media--m { display: none; }
  .td-cta__media--d { display: block; }
  .td-form__row { grid-template-columns: 1fr auto; }
}
@media (min-width: 1100px) {
  .td-hero__wheel { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .td-hero__wheel img { animation: none; }
  .td-js .td-rv, .td-js .td-pick__i.td-rv { opacity: 1; transform: none; transition: none; }
  .td-card.is-flash::before { animation: none; }
}
