/* Сайт студии Lucky Star — luckystar-games.ru.
   Одна форма на всё: звезда из пяти изломанных штрихов (логотип). Отсюда гигантская звезда, маски картинок и срезанные углы.
   Красный — игра, синий — студия. Шрифты как в игре: Russo One (заголовки) и Rubik (текст). */
:root {
  --ground: #0b0d12;
  --coal: #181c25;
  --ink: #eceff4;
  --muted: #a5abb5;
  --dark: #0b0d12;
  --red: #c4262f;            /* заливки: сцена, кнопка, плитки */
  --red-text: #ff5f5a;       /* красный текст на тёмном */
  --red-tile: #3a1216;
  --blue: #2b8cff;
  --blue-deep: #0d2240;
  --m: clamp(16px, 3.2vw, 44px);         /* внешние поля страницы */
  --gap-section: clamp(110px, 13vw, 200px);
  --cut: 18px;                            /* срез угла кнопки — как торец штриха звезды */
  --display: "Russo One", Rubik, system-ui, sans-serif;
  --text: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --star: polygon(50% 0%, 61.2% 34.5%, 97.6% 34.5%, 68.2% 55.9%, 79.4% 90.5%, 50% 69.1%, 20.6% 90.5%, 31.8% 55.9%, 2.4% 34.5%, 38.8% 34.5%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.55 var(--text); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--red); color: var(--ink); }

/* звезда из логотипа как маска: один файл, любой цвет */
.brand-star, .stage-star, .run-star, .cell-star, .mark-star {
  display: block; background: currentColor;
  -webkit-mask: url(img/star-blue.png) center / contain no-repeat;
  mask: url(img/star-blue.png) center / contain no-repeat;
}

/* кнопка: срезанные углы как у штрихов звезды */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 30px;
  background: var(--red); color: var(--ink); text-decoration: none;
  font: 400 17px/1 var(--display); letter-spacing: .01em;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: transform .25s var(--ease), background-color .25s var(--ease);
}
.btn:hover { background: #d8303a; transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-small { min-height: 44px; padding: 0 22px; font-size: 15px; --cut: 12px; }

/* шапка */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px var(--m); position: relative; z-index: 3; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--blue); }
.brand-star { width: 34px; height: 34px; transition: transform .6s var(--ease); }
.brand:hover .brand-star { transform: rotate(72deg); }
.brand-word { width: 150px; }
.bar nav { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.bar nav a { text-decoration: none; font-size: 16px; color: var(--ink); padding: 6px 0; position: relative; }
.bar nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.bar nav a:hover::after, .bar nav a:focus-visible::after { transform: scaleX(1); }

/* первый экран */
.hero { position: relative; min-height: calc(100svh - 92px); min-height: max(640px, calc(100svh - 92px)); padding: 0 var(--m); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; }
.hero-copy { grid-column: 1 / 7; align-self: start; padding-top: clamp(40px, 9vh, 110px); position: relative; z-index: 2; }
.hero h1 { font-size: clamp(54px, 7vw, 116px); line-height: .94; max-width: 7.2em; }
.hero-lead { font-size: 20px; max-width: 30em; margin-top: 36px; }
.hero-act { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 40px; }
.hero-meta { color: var(--muted); font-size: 15px; }
.stage {
  position: absolute; left: 53%; right: 0; top: 4%; bottom: 0; background: var(--red); overflow: hidden;
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%, 0 22%);   /* торец штриха */
}
.stage-star { position: absolute; width: 96%; aspect-ratio: 1; right: -30%; top: 12%; color: #8e1720; }
.stage-shot { position: absolute; margin: 0; left: 26%; top: 12%; width: min(330px, 46%); }
.stage-shot video { display: block; width: 100%; height: auto; background: #12151c; }

/* таймлайн забега */
.run { overflow-x: clip; margin-top: var(--gap-section); padding: 0 var(--m); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-items: end; min-height: 100svh; }
.run-list { grid-column: 1 / 5; padding-bottom: 6vh; }
.run h2 { font-size: clamp(36px, 3.6vw, 58px); line-height: 1; }
.run-intro { margin-top: 20px; max-width: 26em; }
.moments { list-style: none; margin: 34px 0 0; padding: 0; }
.moments button {
  display: flex; align-items: baseline; gap: 16px; width: 100%; text-align: left; background: none; border: 0; padding: 8px 0; cursor: pointer;
  font: 400 clamp(22px, 2.1vw, 32px)/1.2 var(--display); color: var(--muted); letter-spacing: -0.01em; transition: color .25s var(--ease), transform .25s var(--ease);
}
.moments time { font-size: 17px; color: var(--muted); min-width: 3.6em; font-variant-numeric: tabular-nums; }
.moments button:hover { color: var(--ink); transform: translateX(6px); }
.moments button[aria-selected="true"] { color: var(--ink); }
.moments button[aria-selected="true"] time { color: var(--red-text); }
.run-view { grid-column: 5 / 10; position: relative; height: min(92svh, 920px); display: grid; place-items: end center; }
.run-star { position: absolute; width: min(80svh, 128%); aspect-ratio: 1; left: 50%; top: 52%; translate: -50% -50%; color: var(--red); }
.run-frames { position: relative; height: 88%; aspect-ratio: 720 / 1767; }
.run-frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.run-frames img.on { opacity: 1; }
.run-frames img.enter { opacity: 1; z-index: 2; animation: wipe .75s var(--ease) both; }
@keyframes wipe { from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); } to { clip-path: polygon(0 0, 130% 0, 100% 100%, 0 100%); } }
.run-fact { grid-column: 10 / 13; align-self: center; display: grid; }
.fact { grid-area: 1 / 1; font-size: 20px; opacity: 0; transform: translateY(12px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.fact.on { opacity: 1; transform: none; }

/* что в игре */
.inside { margin-top: var(--gap-section); padding: 0 var(--m); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; }
.inside-head { grid-column: 1 / 4; }
.inside h2 { font-size: clamp(36px, 3.6vw, 58px); line-height: 1; }
.inside-head p { margin-top: 20px; max-width: 30ch; }
.tiles { grid-column: 4 / 13; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; row-gap: 34px; }
.tile.wide { grid-column: span 2; }
.tile-pic { aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden; }
.tile.wide .tile-pic { aspect-ratio: 8 / 5; }
.tile-pic img { max-width: 84%; max-height: 84%; width: auto; height: auto; object-fit: contain; transition: transform .6s var(--ease); }
.tile:hover .tile-pic img { transform: scale(1.04); }
.t-red .tile-pic { background: var(--red-tile); }
.t-blue .tile-pic { background: var(--blue-deep); }
.t-coal .tile-pic { background: var(--coal); }
.tile h3 { font-size: 22px; margin-top: 16px; letter-spacing: 0; }
.tile p { color: var(--muted); font-size: 16px; margin-top: 6px; }

/* цифры */
.numbers { margin-top: var(--gap-section); padding: 0 8px; }
.wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cell { aspect-ratio: 1; position: relative; display: grid; place-items: center; overflow: hidden; transition: transform .4s var(--ease); }
.cell-big { font: 400 clamp(52px, 8.6vw, 150px)/1 var(--display); letter-spacing: -0.03em; text-align: center; }
.cell > span:last-child:not(.cell-star) { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font-size: 16px; }
.cell h2.cell-big { font-size: clamp(40px, 4.6vw, 80px); line-height: .95; padding: 0 8%; }
.c-red { background: var(--red); color: var(--ink); }
.c-blue { background: var(--blue); color: var(--dark); }
.c-coal { background: var(--coal); color: var(--ink); }
.c-ink { background: var(--ink); color: var(--dark); }
.c-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transition: transform .8s var(--ease); }
.c-pic:hover img { transform: scale(1.06); }
.cell-star { width: 52%; aspect-ratio: 1; color: var(--blue); }
.cell:has(.cell-big) .cell-big { margin-bottom: 8%; }
.wall li:nth-child(2) .cell-big, .wall li:nth-child(12) .cell-big { font-size: clamp(36px, 5.6vw, 100px); }

/* студия */
.studio { margin-top: var(--gap-section); padding: 0 20px; }
.panel {
  background: var(--blue-deep); position: relative; overflow: hidden; display: grid; grid-template-columns: 1.1fr 1fr;
  clip-path: polygon(110px 0, 100% 0, 100% 100%, 0 100%, 0 110px);
}
.panel-left { padding: 72px 56px 0; position: relative; }
.panel h2 { font-size: clamp(40px, 4.4vw, 68px); line-height: 1; max-width: 8.5em; }
.star-shot { width: min(40vw, 640px); aspect-ratio: 1; margin: 48px 0 -18%; clip-path: var(--star); }
.star-shot img { width: 100%; height: 100%; object-fit: cover; }
.panel-right { padding: 140px 56px 72px 8%; display: flex; flex-direction: column; gap: 52px; align-items: flex-start; justify-content: flex-start; }
.panel-right > div { max-width: 360px; }
.panel h3 { font-size: 22px; letter-spacing: 0; }
.panel-right p { margin-top: 12px; }

/* подвал: знак, собранный крупно */
.foot { margin-top: var(--gap-section); padding: 0 var(--m) 36px; }
.mark { display: flex; align-items: flex-end; gap: clamp(16px, 2.5vw, 40px); color: var(--blue); }
.mark-star { height: clamp(140px, 30svh, 320px); aspect-ratio: 1; flex: none; }
.mark-word { flex: 1; min-width: 0; width: 100%; padding-bottom: 1.2%; }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin-top: 56px; font-size: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px 36px; align-content: start; }
.foot-links a, .foot-legal a { text-decoration: none; transition: color .2s; }
.foot-links a:hover, .foot-legal a:hover { color: var(--blue); }
.foot-legal { color: var(--muted); }
.foot-legal p + p { margin-top: 4px; }
.foot-last { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; color: var(--muted); font-size: 16px; }

/* текстовая страница (политика) */
.doc { padding: clamp(40px, 8vh, 96px) var(--m) 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; }
.doc-head { grid-column: 1 / 6; align-self: start; position: sticky; top: 32px; }
.doc-head h1 { font-size: clamp(30px, 3.3vw, 52px); line-height: 1.05; hyphens: auto; overflow-wrap: anywhere; }
.doc-head p { color: var(--muted); margin-top: 20px; max-width: 30em; }
.doc-body { grid-column: 7 / 13; max-width: 40em; }
.doc-body h2 { font-size: 24px; letter-spacing: 0; margin: 44px 0 12px; }
.doc-body p + p, .doc-body ul + p { margin-top: 12px; }
.doc-body ul { margin: 12px 0 0; padding-left: 1.2em; }
.doc-body li { margin-bottom: 8px; }
.doc-body li::marker { color: var(--red); }
.doc-body a { color: var(--blue); }

/* движение: появление частей раздела; без скрипта всё видно сразу */
.js .rise { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .rise.in { opacity: 1; transform: none; }
.js .shutter { clip-path: inset(100% 0 0 0); transition: clip-path 1.1s var(--ease); }
.js .shutter img, .js .shutter video { transform: scale(1.12); transition: transform 1.3s var(--ease); }
.js .shutter.in { clip-path: inset(0 0 0 0); }
.js .star-shot.shutter.in { clip-path: var(--star); }
.js .shutter.in img, .js .shutter.in video { transform: none; }
.js .star-shot.shutter { clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%); }
.js .tile, .js .cell { opacity: 0; transform: translateY(26px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .tile.in, .js .cell.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise, .js .tile, .js .cell { opacity: 1; transform: none; transition: none; }
  .js .shutter, .js .shutter img { transition: none; }
  .run-frames img.enter { animation: none; }
  .fact { transition: none; }
}

/* планшет */
@media (max-width: 1000px) {
  .run { grid-template-columns: 1fr 1fr; align-items: center; row-gap: 32px; min-height: 0; }
  .run-list { grid-column: 1 / 2; padding-bottom: 0; }
  .run-view { grid-column: 2 / 3; grid-row: 1 / 3; height: 80svh; }
  .run-fact { grid-column: 1 / 2; align-self: start; }
  .inside-head { grid-column: 1 / -1; margin-bottom: 32px; }
  .tiles { grid-column: 1 / -1; }
  /* первый экран и панель студии — столбиком */
  .hero { display: block; min-height: 0; padding: 0; }
  .hero-copy { padding: 26px var(--m) 0; }
  .stage { position: relative; left: auto; top: auto; margin-top: 48px; height: min(118vw, 900px); clip-path: polygon(96px 0, 100% 0, 100% 100%, 0 100%, 0 96px); }
  .stage-star { width: 120%; right: -44%; top: 4%; }
  .stage-shot { left: 50%; translate: -50% 0; top: 9%; width: min(58%, 340px); }
  .panel { display: flex; flex-direction: column; }
  .panel-left { display: contents; }
  .panel h2 { padding: 72px 40px 0; }
  .panel-right { padding: 36px 40px 48px; gap: 36px; }
  .star-shot { width: min(86vw, 620px); align-self: center; margin: 0 0 -18%; order: 3; }
  .doc { display: block; }
  .doc-head { position: static; }
  .doc-head h1 { font-size: clamp(30px, 5.6vw, 52px); }
  .doc-body { margin-top: 12px; }
}

/* телефон: своя композиция */
@media (max-width: 700px) {
  body { font-size: 16px; }
  .bar { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 20px; padding-bottom: 8px; }
  .bar nav { gap: 18px; }
  .bar nav a { font-size: 15px; }
  .hero h1 { font-size: 13.4vw; }
  .hero-lead { margin-top: 22px; font-size: 18px; }
  .hero-act { margin-top: 28px; gap: 16px; }
  .stage { margin-top: 40px; height: 118vw; clip-path: polygon(72px 0, 100% 0, 100% 100%, 0 100%, 0 72px); }
  .stage-shot { width: 58%; }
  .run { display: block; }
  .run-list { padding-bottom: 0; }
  .moments { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-top: 24px; }
  .moments button { flex-direction: column; gap: 0; font-size: 20px; padding: 6px 0; }
  .moments time { font-size: 15px; }
  .run-view { height: 132vw; margin-top: 24px; }
  .run-star { width: 92vw; top: 50%; }
  .run-fact { margin-top: 20px; }
  .fact { font-size: 16px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; row-gap: 26px; }
  .tile.wide { grid-column: 1 / -1; order: -1; }
  .tile:last-child { grid-column: 1 / -1; }
  .tile:last-child .tile-pic { aspect-ratio: 8 / 5; }
  .tile h3 { font-size: 17px; margin-top: 10px; }
  .tile p { font-size: 15px; }
  .wall { grid-template-columns: 1fr 1fr; gap: 6px; }
  .numbers { padding: 0 6px; }
  .cell-big { font-size: 22vw; }
  .wall li:nth-child(2) .cell-big, .wall li:nth-child(12) .cell-big { font-size: 13vw; }
  .cell h2.cell-big { font-size: 10vw; }
  .cell > span:last-child:not(.cell-star) { font-size: 14px; bottom: 12px; }
  .studio { padding: 0 10px; }
  .panel { clip-path: polygon(64px 0, 100% 0, 100% 100%, 0 100%, 0 64px); }
  .panel h2 { font-size: 9vw; padding: 56px 24px 0; }
  .panel-right { padding: 32px 24px 40px; gap: 32px; }
  .doc-head h1 { font-size: 7.8vw; }
  .mark { flex-direction: column; align-items: flex-start; }
  .mark-star { height: 40vw; }
  .foot-cols { grid-template-columns: 1fr; }
  .foot-links { gap: 12px 24px; }
}
