/* Главная www.yamiko.ru. Без JavaScript: вход — ключевые кадры, появление при прокрутке — animation-timeline. */

.home-page { overflow: clip; }

/* ── Время суток (класс на body ставит сервер по московскому времени) ───── */
.tod-evening { --bg: #07070a; --bg-2: #0c0c10; }
.tod-night { --bg: #050507; --bg-2: #0a0a0e; --bg-3: #111116; }

/* ── Занавес при входе: звезда чертится по контуру, занавес уходит вверх ── */
.curtain { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); color: var(--brand-2); pointer-events: none; opacity: 0; visibility: hidden; animation: curtain 1.6s var(--ease-io) both; }
.curtain-star { width: clamp(72px, 10vw, 140px); height: auto; animation: curtain-pop 1.6s var(--ease) both; }
.curtain-star path { stroke-dasharray: 1; stroke-dashoffset: 1; fill: rgba(169, 156, 255, 0); animation: curtain-draw .85s var(--ease) .1s both, curtain-fill .35s ease .9s both; }
@keyframes curtain { 0%, 74% { opacity: 1; visibility: visible; transform: none; } 100% { opacity: 1; visibility: hidden; transform: translateY(-102%); } }
@keyframes curtain-draw { to { stroke-dashoffset: 0; } }
@keyframes curtain-fill { to { fill: rgba(169, 156, 255, 1); } }
@keyframes curtain-pop { 0%, 60% { transform: scale(1) rotate(0); opacity: 1; } 74% { transform: scale(1.12) rotate(12deg); opacity: 1; } 100% { transform: scale(.3) rotate(60deg) translateY(-60vh); opacity: 0; } }

/* ── Звезда-персонаж: при прокрутке уменьшается и садится в шапку ────────── */
.star-stage { display: none; }
@supports (animation-timeline: scroll()) {
  .star-stage { display: block; position: fixed; inset: 0 0 auto 0; z-index: 51; pointer-events: none; }
  .star-stage .wrap { position: relative; height: 0; container-type: inline-size; }
  .star-dock { position: absolute; left: var(--gutter); top: 19px; width: 22px; height: 22px; display: block; animation: star-dock linear both; animation-timeline: scroll(root); animation-range: 0 80vh; }
  .star-dock .star { width: 100%; height: 100%; color: var(--brand); animation: star-in 1.2s var(--ease) 1.5s both, yamiko-spin 40s linear 2.7s infinite; filter: drop-shadow(0 0 24px rgba(124, 115, 206, .35)); }
  .hero-mark .star { display: none; }
}
@keyframes star-dock { 0% { transform: translate(calc(100cqw - 62px - 1vw), 236px) scale(4.4); opacity: 1; } 88% { opacity: 1; } 100% { transform: translate(0, 0) scale(1); opacity: 0; } }
@media (max-width: 760px) { @keyframes star-dock { 0% { transform: translate(calc(100cqw - 28px), 128px) scale(2.1); opacity: 1; } 88% { opacity: 1; } 100% { transform: translate(0, -4px) scale(1); opacity: 0; } } }

/* ── Первый экран: имя на всю ширину, знак, два столбца, небо из людей ───── */
.hero { position: relative; isolation: isolate; padding-top: clamp(28px, 4vw, 56px); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; pointer-events: none; }
.sky-note { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.hero-top > div { display: grid; }
.hero-top { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; animation: yamiko-in .8s var(--ease) 1.2s both; }
.hero-greeting { font-size: clamp(22px, 2vw, 30px); line-height: 1; color: var(--brand-2); transform: rotate(-4deg); transform-origin: right center; white-space: nowrap; }
.hero-mark { position: relative; margin-top: clamp(16px, 3vw, 40px); }
.hero-mark h1 { overflow: hidden; margin: 0 -0.04em; padding: 0 .04em; font-size: clamp(88px, 21.6vw, 352px); font-weight: 800; letter-spacing: -.07em; line-height: .86; }
.hero-letters { display: block; }
.hero-letters span { display: inline-block; animation: hero-rise 1.1s var(--ease) 1.05s both; }
.hero-letters span:nth-child(2) { margin-left: -.035em; animation-delay: 1.11s; }
.hero-letters span:nth-child(3) { animation-delay: 1.17s; }
.hero-letters span:nth-child(4) { animation-delay: 1.23s; }
.hero-letters span:nth-child(5) { animation-delay: 1.29s; }
.hero-letters span:nth-child(6) { animation-delay: 1.35s; }
@keyframes hero-rise { from { transform: translateY(112%) rotate(4deg); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
/* Рукописная подпись поверх имени: проявляется слева направо, как будто её дописывают. */
.hero-script { position: absolute; right: calc(var(--gutter) + 2%); bottom: -3%; font-size: clamp(44px, 7.4vw, 124px); line-height: 1; color: var(--brand-2); transform: rotate(-7deg); transform-origin: left bottom; white-space: nowrap; animation: hero-write 1.5s var(--ease) 2.1s both; text-shadow: 0 0 40px rgba(124, 115, 206, .35); }
@keyframes hero-write { from { clip-path: inset(0 100% -20% 0); } to { clip-path: inset(0 -12% -20% 0); } }

/* ── Идёт мероприятие: сцена под именем, обложка в фирменном монохроме ──── */
.live-stage { position: relative; margin-top: clamp(48px, 7vw, 96px); min-height: min(78vh, 760px); display: grid; align-items: end; overflow: hidden; background: var(--bg-2); border-top: 1px solid var(--line); isolation: isolate; }
.live-stage.has-cover { background: var(--brand); }
.live-cover { position: absolute; inset: -4%; width: 108%; height: 108%; object-fit: cover; z-index: -2; filter: grayscale(1) contrast(1.1) brightness(.6); mix-blend-mode: luminosity; animation: live-drift 26s ease-in-out infinite alternate; }
.live-stage.has-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8, 8, 10, .94) 0%, rgba(8, 8, 10, .6) 48%, rgba(8, 8, 10, .15) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 42%); }
.live-inner { padding-block: clamp(56px, 8vw, 120px); display: grid; gap: 18px; }
.live-kicker { font-size: clamp(32px, 4vw, 64px); line-height: 1; color: var(--brand-2); transform: rotate(-4deg); transform-origin: left center; width: max-content; }
.live-stage h2 { font: 400 clamp(40px, 7vw, 120px)/.96 var(--display); letter-spacing: -.04em; max-width: 14ch; text-wrap: balance; }
.live-meta { font-size: 15px; color: var(--ink-2); }
.live-stage .button { justify-self: start; margin-top: 8px; }
@keyframes live-drift { from { transform: scale(1) translateX(-1%); } to { transform: scale(1.06) translateX(1%); } }

/* ── Приглашение к своей звезде: одна строка через всю ширину ────────────── */
.star-invite { margin-top: clamp(40px, 6vw, 80px); }
.star-invite-link { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: clamp(20px, 3vw, 48px); padding: clamp(24px, 3vw, 40px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); isolation: isolate; overflow: hidden; }
.star-invite-link::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 140% at 10% 50%, rgba(124, 115, 206, .22), transparent 70%); opacity: 0; transition: opacity .6s var(--ease); }
.star-invite-link:hover::before { opacity: 1; }
.star-invite-mark { position: relative; width: clamp(72px, 8vw, 120px); aspect-ratio: 1; color: var(--brand-2); }
.star-invite-mark .star { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform .9s var(--ease), opacity .6s var(--ease); }
.star-invite-mark .star:nth-child(2) { opacity: .45; transform: scale(.55) translate(-70%, 40%); }
.star-invite-mark .star:nth-child(3) { opacity: .3; transform: scale(.4) translate(90%, -60%); }
.star-invite-link:hover .star-invite-mark .star:first-child { transform: rotate(60deg) scale(1.08); }
.star-invite-link:hover .star-invite-mark .star:nth-child(2) { transform: scale(.65) translate(-90%, 60%) rotate(-40deg); opacity: .7; }
.star-invite-link:hover .star-invite-mark .star:nth-child(3) { transform: scale(.5) translate(110%, -80%) rotate(50deg); opacity: .6; }
.star-invite-text { display: grid; gap: 10px; min-width: 0; }
.star-invite-title { font: 400 clamp(28px, 3.6vw, 56px)/1 var(--display); letter-spacing: -.03em; }
.star-invite-lead { max-width: 52ch; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.star-invite-script { font-size: clamp(26px, 2.6vw, 40px); line-height: 1; color: var(--brand-2); transform: rotate(-5deg); white-space: nowrap; }
.star-invite-arrow { color: var(--ink); transition: transform var(--dur) var(--ease); }
.star-invite-link:hover .star-invite-arrow { transform: translateX(8px); }
@media (max-width: 760px) { .star-invite-link { grid-template-columns: auto minmax(0, 1fr); } .star-invite-script { grid-column: 2; justify-self: start; } .star-invite-arrow { display: none; } }
/* «Аниме дня» над звездой — та же строка; знак — доска 3×3, как в игре: при наведении все клетки «угадываются». */
.star-invite-link + .star-invite-link { border-top: 0; }
.anime-invite-mark { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9%; padding: 9%; }
.anime-invite-mark .sq { background: var(--bg-3); transition: background .5s var(--ease), box-shadow .5s var(--ease); }
.anime-invite-mark .sq.is-hit { background: var(--brand); }
.anime-invite-mark .sq.is-near { background: none; box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.anime-invite:hover .anime-invite-mark .sq { background: var(--brand); box-shadow: none; }
.anime-invite-mark .sq:nth-child(3n + 2) { transition-delay: .06s; }
.anime-invite-mark .sq:nth-child(3n) { transition-delay: .12s; }

/* ── Бегущая строка ──────────────────────────────────────────────────────── */
.ticker { margin-top: clamp(64px, 9vw, 140px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; align-items: center; width: max-content; height: 72px; animation: ticker 48s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
/* Строка чуть сдвигается в сторону прокрутки — там, где браузер умеет анимации по прокрутке. */
@supports (animation-timeline: scroll()) {
  .ticker-scroll { animation: ticker-drift linear both; animation-timeline: scroll(root); animation-range: 0 120vh; }
}
@keyframes ticker-drift { from { transform: translateX(8vw); } to { transform: translateX(-16vw); } }
.ticker-track > span { padding: 0 28px; white-space: nowrap; }
.ticker-track .caps { font: 600 13px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.ticker-track .script { font-size: 34px; line-height: 1; color: var(--brand-2); padding-bottom: 4px; }
.ticker-track .star { width: 14px; height: 14px; color: var(--ink-3); flex: none; }
@media (prefers-reduced-motion: reduce) { .ticker-track { width: auto; flex-wrap: wrap; height: auto; padding: 16px 0; row-gap: 12px; } .ticker-track > :nth-child(n + 17) { display: none; } }
.hero-mark .star { position: absolute; right: calc(var(--gutter) + 1%); top: -4%; width: clamp(40px, 6.2vw, 100px); color: var(--brand); animation: star-in 1.2s var(--ease) 1.5s both, yamiko-spin 40s linear 2.7s infinite; }
@keyframes star-in { from { opacity: 0; transform: scale(.4) rotate(-90deg); } to { opacity: 1; transform: none; } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: start; margin-top: clamp(28px, 4vw, 56px); padding-top: clamp(24px, 3vw, 40px); border-top: 1px solid var(--line); animation: yamiko-in .9s var(--ease) 1.4s both; }
.hero-intro { font: 400 clamp(32px, 4vw, 64px)/1.04 var(--display); letter-spacing: -.03em; }
.hero-intro .brush { padding-inline: .14em; }
.hero-note { display: grid; gap: 18px; max-width: 46ch; justify-self: end; }
.hero-lead { font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; color: var(--ink-2); }

/* ── Yami Anime ──────────────────────────────────────────────────────────── */
.home-showcase { margin-top: 0; padding: clamp(56px, 8vw, 120px) 0 clamp(64px, 9vw, 140px); background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.showcase-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px clamp(40px, 6vw, 96px); align-items: center; }
.showcase-text-col { min-width: 0; }
.showcase-head { display: grid; gap: 20px; }
.showcase-head h2 { font-size: clamp(52px, 10vw, 168px); font-weight: 800; letter-spacing: -.06em; line-height: .9; }
.showcase-lead { font-size: clamp(40px, 5.2vw, 84px); line-height: 1; color: var(--brand-2); margin-left: .5em; transform: rotate(-3deg); transform-origin: left center; width: max-content; max-width: 100%; }
.showcase-body { display: grid; gap: 24px; margin-top: 36px; }
.showcase-text { max-width: 44ch; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.showcase-links { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.home-showcase .poster { max-width: 520px; justify-self: end; width: 100%; }
/* Vinyl — новый релиз: без полосы фона и зеркально к Yami Anime (пластинка слева). */
.home-vinyl { background: none; border-top: 0; }
.showcase-flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.showcase-flip .record-link { order: -1; justify-self: start; max-width: 600px; }
@media (max-width: 900px) { .showcase-flip { grid-template-columns: 1fr; } .showcase-flip .record-link { order: 0; max-width: 480px; } }

/* ── Команда ─────────────────────────────────────────────────────────────── */
.people { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 64px; align-items: end; padding-block: 0 clamp(72px, 10vw, 150px); }
.people h2 { margin-top: 20px; font: 400 clamp(36px, 5.6vw, 92px)/.98 var(--display); letter-spacing: -.035em; }
.people h2 .script { display: inline-block; font-size: 1.12em; line-height: 1; color: var(--brand-2); transform: rotate(-3deg); transform-origin: left center; margin-top: .06em; }
.people-note { display: grid; gap: 22px; }
.people-note p { max-width: 40ch; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.people-links { display: flex; flex-wrap: wrap; gap: 4px 32px; }

/* ── Сообщество: один сплошной цветной блок на странице ──────────────────── */
.community { position: relative; background: var(--bg-2); color: var(--ink); padding-block: clamp(64px, 9vw, 140px); border-top: 1px solid var(--line); overflow: hidden; }
.community::before { content: ""; position: absolute; inset: auto -10% -40% auto; width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; border-radius: 50%; background: radial-gradient(closest-side, rgba(124, 115, 206, .22), transparent 70%); pointer-events: none; }
.community-grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "head data" "events events"; gap: 48px 64px; }
.community-head { grid-area: head; }
.community-data { grid-area: data; }
.events-block { grid-area: events; }
.community-grid.has-art { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-areas: "head poster" "data poster" "events events"; align-items: start; }
.poster-splash { grid-area: poster; max-width: 520px; justify-self: end; width: 100%; }
.poster-splash .poster-frame img { object-position: center; }
.community-head { display: grid; gap: 22px; align-content: start; }
.community-head h2 { font: 400 clamp(44px, 7.6vw, 128px)/.92 var(--display); letter-spacing: -.04em; }
.community-head h2 .brush { padding-inline: .08em .12em; }
.community-text { max-width: 38ch; font-size: 18px; line-height: 1.5; color: var(--ink-2); }
.community .button { justify-self: start; }
.community-grid:not(.has-art) .community-data { align-self: end; }
.facts { display: grid; margin: 0; border-top: 1px solid var(--line-2); }
.facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line-2); }
.facts dt { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.facts dd { margin: 0; font-size: clamp(36px, 4.4vw, 64px); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.data-note { margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.events-block { grid-column: 1 / -1; margin-top: 24px; }
.events-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; }
.events-heading h3 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.time-note { font-size: 12px; color: var(--ink-3); }
.events { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.event-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; height: 100%; padding: 20px 20px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background var(--dur) var(--ease); }
.event-cover { grid-column: 1 / -1; display: block; overflow: hidden; aspect-ratio: 16 / 9; margin: -20px -20px 4px; background: var(--brand); isolation: isolate; }
.event-cover img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1) brightness(.9); mix-blend-mode: luminosity; transform: scale(1.02); transition: filter 1s var(--ease), transform 1.4s var(--ease), mix-blend-mode 0s linear .3s; }
.event-link:hover .event-cover img { filter: none; mix-blend-mode: normal; transform: scale(1.06); transition: filter 1s var(--ease), transform 1.4s var(--ease), mix-blend-mode 0s linear; }
.event-link:hover { background: rgba(124, 115, 206, .1); }
.event-day { display: grid; text-align: center; min-width: 40px; }
.event-num { font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--brand-2); }
.event-month { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.event-title { font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.event-meta { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.live { font-weight: 700; color: var(--ok); }
.event-corner .icon { color: var(--ink-3); transition: transform var(--dur) var(--ease), color .3s; }
.event-link:hover .event-corner .icon { transform: translate(3px, -3px); color: var(--ink); }
.events-empty { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 22px 0; border-top: 1px solid var(--line); }
.events-empty h3 { font-size: 16px; }
.events-empty p { font-size: 14px; color: var(--ink-3); }

@media (max-width: 900px) {
  .hero-grid, .people, .showcase-grid { grid-template-columns: 1fr; }
  .community-grid, .community-grid.has-art { grid-template-columns: 1fr; grid-template-areas: "head" "poster" "data" "events"; }
  .poster-splash { justify-self: start; max-width: 440px; }
  .home-showcase .poster { justify-self: start; max-width: 440px; }
  .hero-note { justify-self: start; }
  .hero-mark .star { right: var(--gutter); top: -14%; }
}
@media (max-width: 560px) {
  .hero-mark h1 { font-size: 26vw; }
  .hero-script { font-size: 13vw; right: var(--gutter); bottom: -8%; }
  .showcase-lead { font-size: clamp(32px, 9.6vw, 40px); margin-left: 0; transform: none; width: auto; }
  .ticker-track { height: 60px; }
  .ticker-track > span { padding: 0 18px; }
  .ticker-track .script { font-size: 28px; }
  .hero-top { flex-direction: column; align-items: start; gap: 10px; }
  .hero-greeting { transform-origin: left center; }
  .events { grid-template-columns: 1fr; }
}
