/* ============================================================
   «Шабыт» 2026 — страницы
   Главная (hero, даты, номинации, манифест, призы, шаги, история,
   новости, пресса, организаторы, CTA) и внутренние страницы.
   ============================================================ */

/* ============ ОБЩЕЕ ДЛЯ ТЁМНЫХ БЛОКОВ: свет рампы ============ */
.stage { position: relative; background: var(--ink-900); color: #fff; overflow: hidden; isolation: isolate; }
.stage__lights { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.beam {
  position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%;
  filter: blur(70px); opacity: 0.5; mix-blend-mode: screen;
  animation: drift 26s var(--ease-in-out) infinite alternate;
}
.beam--1 { left: -22vmax; top: -30vmax; background: radial-gradient(closest-side, var(--violet), transparent 70%); }
.beam--2 { right: -26vmax; top: -10vmax; background: radial-gradient(closest-side, var(--magenta), transparent 70%); animation-delay: -9s; opacity: 0.4; }
.beam--3 { left: 30%; bottom: -46vmax; background: radial-gradient(closest-side, var(--amber), transparent 70%); animation-delay: -17s; opacity: 0.28; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(6vmax, 4vmax) scale(1.12); }
}
.stage__grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stage__dots {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1.2px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

/* ============ HERO ГЛАВНОЙ ============ */
.hero { min-height: 100svh; display: flex; flex-direction: column; padding-top: calc(var(--header-h) + var(--topbar-h)); }
.hero__inner { flex: 1; display: grid; align-content: center; gap: 28px; padding-top: clamp(24px, 5vh, 64px); padding-bottom: 24px; }

.hero__place { font-size: var(--fs-small); color: var(--ink-200); margin: 0; }

.hero__title { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 0 clamp(16px, 3vw, 40px); }
.hero__numeral {
  /* line-height 1.1 + padding: градиент (background-clip: text) рисуется только внутри
     блока, поэтому блок должен вмещать буквы целиком, иначе верх цифр обрезается */
  display: block; font-size: clamp(5rem, 2rem + 14vw, 13.5rem); line-height: 1.1; letter-spacing: -0.02em;
  padding: 0.04em 0.02em 0;
  background: linear-gradient(160deg, #fff 20%, var(--ink-300) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: -0.12em 0 -0.2em;
}
.hero__h1 { font-size: clamp(1.75rem, 1rem + 2.6vw, 3.5rem); font-weight: 600; max-width: 12em; }
.hero__h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__h1 .line > span { display: block; }

.hero__rotator { font-size: var(--fs-lead); color: var(--ink-200); margin: 0; }
.rotator { display: inline-grid; vertical-align: bottom; overflow: hidden; height: 1.35em; line-height: 1.35; }
.rotator__word { grid-area: 1 / 1; color: var(--c, #fff); font-weight: 500; white-space: nowrap; transition: transform 0.55s var(--ease-out), opacity 0.45s; }
.rotator__word.is-out { transform: translateY(-100%); opacity: 0; }
.rotator__word.is-in-start { transform: translateY(100%); opacity: 0; transition: none; }

.hero__bottom { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px 48px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.38); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.06); }

/* Оркестрованная последовательность появления. Один раз, при загрузке. */
.hero .hero__place, .hero .hero__numeral, .hero .hero__rotator, .hero .hero__bottom { opacity: 0; animation: hero-in 0.9s var(--ease-out) forwards; }
.hero .hero__place   { animation-delay: 0.25s; }
.hero .hero__numeral { animation-delay: 0.35s; }
.hero .hero__rotator { animation-delay: 0.95s; }
.hero .hero__bottom  { animation-delay: 1.1s; }
.hero .hero__h1 .line > span { transform: translateY(112%); animation: hero-rise 1s var(--ease-out) forwards; }
.hero .hero__h1 .line:nth-child(1) > span { animation-delay: 0.45s; }
.hero .hero__h1 .line:nth-child(2) > span { animation-delay: 0.55s; }
.hero .hero__h1 .line:nth-child(3) > span { animation-delay: 0.65s; }
.hero .beam { opacity: 0; animation: beam-in 2.4s var(--ease-out) forwards, drift 26s var(--ease-in-out) 2.4s infinite alternate; }
.hero .beam--2 { animation-delay: 0.3s, 2.7s; }
.hero .beam--3 { animation-delay: 0.6s, 3s; }
@keyframes hero-in   { to { opacity: 1; } }
@keyframes hero-rise { to { transform: none; } }
@keyframes beam-in   { to { opacity: var(--beam-o, 0.5); } }
.hero .beam--1 { --beam-o: 0.5; }
.hero .beam--2 { --beam-o: 0.4; }
.hero .beam--3 { --beam-o: 0.28; }

/* Лента номинаций: 3D-дуга, позиции считает hero-ribbon.js */
.ribbon { position: relative; height: 250px; margin-top: 8px; perspective: 1100px; perspective-origin: 50% 30%; }
.ribbon__track { position: absolute; inset: 0; transform-style: preserve-3d; }
.tile {
  position: absolute; top: 24px; left: 50%; width: 224px; height: 176px; margin-left: -112px;
  display: flex; flex-direction: column; justify-content: space-between; padding: 18px 18px 16px;
  color: #fff; background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transform-style: preserve-3d; will-change: transform, opacity;
  opacity: 0; transition: background var(--dur), border-color var(--dur);
  --accent: var(--violet);
}
.ribbon.is-ready .tile { opacity: var(--o, 1); }
.tile:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.3); }
.tile--woodwind    { --accent: var(--nom-woodwind); }
.tile--brass       { --accent: var(--nom-brass); }
.tile--singing     { --accent: var(--nom-singing); }
.tile--composition { --accent: var(--nom-composition); }
.tile--art         { --accent: var(--nom-art); }
.tile--dombyra     { --accent: var(--nom-dombyra); }
.tile__glyph { width: 44px; height: 44px; color: var(--accent); }
.tile__text { display: block; }
.tile__name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; line-height: 1.25; letter-spacing: -0.01em; }
.tile__meta { display: block; font-size: var(--fs-tiny); line-height: 1.35; color: var(--ink-300); margin-top: 6px; }
@media (max-width: 640px) {
  .ribbon { height: 200px; }
  .tile { width: 176px; height: 140px; margin-left: -88px; padding: 14px; }
  .tile__glyph { width: 36px; height: 36px; }
  .tile__name { font-size: 0.8125rem; }
}

/* Арка — портал сцены в светлую часть */
.hero__arch { position: relative; height: 72px; margin-top: 8px; }
.hero__arch::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; width: 150%; height: 100%;
  transform: translateX(-50%); background: var(--white); border-radius: 100% 100% 0 0 / 200% 200% 0 0;
}

@media (max-width: 900px) {
  .hero__title { grid-template-columns: minmax(0, 1fr); }
  .hero__numeral { font-size: clamp(5rem, 22vw, 9rem); }
  .hero__bottom { grid-template-columns: minmax(0, 1fr); }
}

/* ============ КЛЮЧЕВЫЕ ДАТЫ ============ */
.dates { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 8vw, 104px); }

/* ============ НОМИНАЦИИ ============ */
.nominations { background: var(--paper); }

/* ============ МАНИФЕСТ / О КОНКУРСЕ ============ */
.manifesto { background: var(--white); }
.manifesto__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 64px; align-items: center; }
.manifesto__p {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em;
  font-size: clamp(1.375rem, 1rem + 1.7vw, 2.375rem); line-height: 1.3; margin: 0;
}
.manifesto__p .w { opacity: clamp(0.14, calc(var(--p, 0) * var(--n, 1) - var(--i, 0) + 1), 1); transition: opacity 0.25s linear; }
.manifesto__more { margin-top: 32px; }
.manifesto .stats { margin-top: clamp(56px, 7vw, 96px); padding-top: 40px; border-top: 1px solid var(--line); }

/* Шёлковая лента (silk.js) */
.silk { position: relative; width: 100%; max-width: 480px; aspect-ratio: 4 / 5; justify-self: center; cursor: crosshair; touch-action: pan-y; }
.silk canvas { position: absolute; inset: 0; display: block; }
.silk::before { content: ""; position: absolute; inset: 12% 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(107, 91, 255, 0.12), transparent); filter: blur(30px); }
@media (max-width: 900px) {
  .manifesto__inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .silk { order: -1; max-width: 360px; justify-self: start; }
}

/* ============ ПРИЗОВОЙ ФОНД ============ */
.prizes { background: var(--ink-900); }
.prizes__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px 72px; align-items: start; }
.prizes__text p { color: var(--ink-300); font-size: var(--fs-lead); max-width: 30em; }
.prizes__text .small { font-size: var(--fs-small); margin-top: 24px; max-width: 32em; }
@media (max-width: 900px) { .prizes__inner { grid-template-columns: minmax(0, 1fr); } }

/* ============ ШАГИ ============ */
.steps-section { background: var(--white); }
.steps__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(40px, 6vw, 64px); }

/* ============ ИСТОРИЯ (тизер) ============ */
.history-teaser { background: var(--paper); overflow: hidden; }
.marquee--names { padding: 6px 0; }
.marquee--names span { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 1rem + 2.6vw, 3.25rem); line-height: 1.1; color: var(--ink-900); padding: 0 0.6em; letter-spacing: -0.015em; }
.marquee--names span::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-300); margin-left: 1.2em; vertical-align: middle; }
/* Контурные буквы: заливка цветом фона поверх двойной обводки. Внутренняя половина обводки
   и стыки контуров шрифта закрываются заливкой, снаружи остаётся чистый контур 1px. */
.marquee--names.marquee--reverse span { color: var(--paper); -webkit-text-stroke: 2px var(--ink-300); paint-order: stroke fill; }
.history-teaser__results { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 64px; align-items: start; }
.results { margin: 0; border-top: 1px solid var(--line); }
.results > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.results dt { color: var(--ink-500); }
.results dd { margin: 0; font-weight: 500; }
@media (max-width: 900px) { .history-teaser__results { grid-template-columns: minmax(0, 1fr); } }

/* ============ НОВОСТИ ============ */
.news-section { background: var(--white); }

/* ============ ПРЕССА ============ */
.press { background: var(--paper); }
.marquee--press { margin: 8px 0 clamp(32px, 5vw, 56px); }
.marquee--press span { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 1rem + 1.6vw, 2.25rem); color: var(--ink-200); padding: 0 28px; white-space: nowrap; }
.press__list { border-top: 1px solid var(--line); }
.press__list a { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.press__list a:hover .press__headline { color: var(--ink-900); }
.press__outlet { font-weight: 600; }
.press__headline { color: var(--ink-600); transition: color var(--dur-fast); }
@media (max-width: 640px) { .press__list a { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* ============ ОРГАНИЗАТОРЫ ============ */
.orgs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.orgs__role { font-size: var(--fs-tiny); color: var(--ink-500); }
.orgs__name { font-weight: 600; margin-top: 6px; line-height: 1.35; }
.orgs__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .orgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ============ CTA + КОНТАКТЫ ============ */
.cta__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px 72px; align-items: end; }
.cta__text p { color: var(--ink-300); font-size: var(--fs-lead); max-width: 28em; margin: 20px 0 32px; }
.contacts { margin: 0; }
.contacts dt { font-size: var(--fs-tiny); color: var(--ink-300); }
.contacts dd { margin: 2px 0 20px; font-size: var(--fs-lead); }
.contacts dd a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 900px) { .cta__inner { grid-template-columns: minmax(0, 1fr); } }

/* ============ ВНУТРЕННИЕ СТРАНИЦЫ: баннер ============ */
.banner { padding: calc(var(--header-h) + var(--topbar-h) + clamp(40px, 6vw, 72px)) 0 clamp(48px, 6vw, 80px); }
.banner .beam { opacity: 0.32; }
.banner .beam--2 { opacity: 0.22; }
.banner .beam--3 { display: none; }
.banner__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 48px; align-items: end; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: var(--fs-tiny); color: var(--ink-300); margin: 0 0 20px; }
.crumbs a:hover { color: #fff; }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--ink-600); }
.banner h1 { max-width: 15em; }
.banner__sub { color: var(--ink-300); font-size: var(--fs-lead); margin: 18px 0 0; max-width: 34em; }
.banner__glyph { width: clamp(110px, 16vw, 200px); height: clamp(110px, 16vw, 200px); color: var(--accent, #fff); justify-self: end; }
.banner__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.banner__meta .chip { border-color: var(--line-dark); color: var(--ink-200); }
@media (max-width: 760px) { .banner__inner { grid-template-columns: minmax(0, 1fr); } .banner__glyph { justify-self: start; width: 96px; height: 96px; } }

/* ============ ПОЛОЖЕНИЕ / документ с оглавлением ============ */
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px 72px; align-items: start; }
.doc__body > section { padding: 8px 0 40px; margin-bottom: 24px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.doc__body > section:last-child { border-bottom: 0; }
.doc__body h2 { font-size: var(--fs-h3); margin-bottom: 20px; }
.doc .facts { margin-bottom: 48px; }
@media (max-width: 1023px) { .doc { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } .toc__list { display: flex; flex-wrap: wrap; gap: 6px; } .toc a { border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 6px 12px; } .toc a.is-active { border-color: var(--ink-900); } }

/* ============ НОМИНАЦИЯ: детальная ============ */
.nom-page .doc { grid-template-columns: 260px minmax(0, 1fr); }
.round { border-top: 1px solid var(--line); padding: 20px 0 28px; }
.round__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.round__num { font-family: var(--font-numeral); font-size: 1.75rem; line-height: 1; color: var(--accent, var(--violet)); min-width: 1.6em; }
.round__title { font-weight: 600; font-size: 1.0625rem; }
.round__note { color: var(--ink-500); font-size: var(--fs-small); margin-left: auto; }
.program { padding-left: 1.3em; list-style: decimal; }
.program > li { margin-bottom: 10px; }
.program ul { padding-left: 1.1em; list-style: none; margin-top: 6px; }
.program ul li { position: relative; color: var(--ink-600); margin-bottom: 4px; font-size: var(--fs-small); padding-left: 14px; }
.program ul li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 7px; height: 1px; background: var(--ink-300); }
.program .req { font-weight: 500; }
.spec { scroll-margin-top: calc(var(--header-h) + 24px); margin-bottom: 48px; }
.spec > h2 { font-size: var(--fs-h2); margin-bottom: 24px; }
.nom-page .callout { margin-top: 48px; }
.nom-page .cta-inline { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.nom-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.nom-next a { display: block; background: var(--white); padding: 24px 28px; }
.nom-next a:hover { background: var(--paper); }
.nom-next .tiny { display: block; color: var(--ink-500); margin-bottom: 6px; }
.nom-next strong { font-weight: 600; }
@media (max-width: 640px) { .nom-next { grid-template-columns: minmax(0, 1fr); } }

/* ============ ИСТОРИЯ ============ */
.era { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px 48px; padding: 32px 0; border-top: 1px solid var(--line); }
.era__year { font-family: var(--font-numeral); font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem); line-height: 1; }
.era p { max-width: 60ch; }
.hall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.hall > div { background: var(--white); padding: 20px 22px; }
.hall .tiny { color: var(--ink-500); display: block; margin-bottom: 6px; }
.hall strong { font-weight: 600; }
@media (max-width: 640px) { .era { grid-template-columns: minmax(0, 1fr); } }

/* ============ НОВОСТИ: список и статья ============ */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.news-item { background: var(--white); display: flex; flex-direction: column; }
.news-item__cover { position: relative; display: block; height: 220px; overflow: hidden; background: var(--ink-800); }
.news-item__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.news-item:hover .news-item__cover img { transform: scale(1.04); }
.news-item__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(8, 8, 26, 0.7)); }
.news-item__cover time { position: absolute; left: 16px; bottom: 12px; z-index: 1; color: #fff; font-family: var(--font-display); font-weight: 600; }
.article__photo { margin: 0 0 32px; }
.article__photo img { width: 100%; height: auto; }
.article__photo figcaption { font-size: var(--fs-tiny); color: var(--ink-500); margin-top: 8px; }
.news-item__text { padding: 20px 24px 26px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-item__text h3 { font-size: 1.125rem; font-family: var(--font-text); font-weight: 600; letter-spacing: 0; line-height: 1.35; }
.news-item__text p { color: var(--ink-500); font-size: var(--fs-small); }
@media (max-width: 1023px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .news-grid { grid-template-columns: minmax(0, 1fr); } }

.article { max-width: 70ch; }
.article__meta { color: var(--ink-500); font-size: var(--fs-small); margin-bottom: 24px; }
.article .lead { margin-bottom: 32px; }
.article__nav { display: flex; justify-content: space-between; gap: 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }

.empty { border: 1px dashed var(--line-strong); padding: 48px 24px; text-align: center; color: var(--ink-500); }
.empty strong { display: block; color: var(--ink-900); font-weight: 600; margin-bottom: 6px; }

/* Страница номинации: на узких экранах одна колонка (перебивает .nom-page .doc) */
@media (max-width: 1023px) { .nom-page .doc { grid-template-columns: minmax(0, 1fr); } }
