/* Shadows of Cardonia — V2.7: the whole site is the manifesto of Cardonia and, at the same time, the explanation of
   the game. Loaded after styles.css (V2.2: the entrance, the hero, the nav) and world.css (V2.6 components). */

/* ---------------- two languages: every text is written twice ---------------- */
html:not([data-lang="ru"]) [data-l="ru"], html[data-lang="ru"] [data-l="en"] { display: none !important; }
.lang { display: flex; gap: 2px; }
.lang button { min-height: 32px; min-width: 34px; padding: 4px 6px; font-size: 10.5px; letter-spacing: .18em; color: var(--bone-3); border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.lang button:hover { color: var(--bone-2); }
.lang button[aria-pressed="true"] { color: var(--bone); border-color: var(--ember-hot); }
.menu__lang { font-size: 14px; color: var(--bone-3); }
.menu__lang button { padding: 10px 4px; color: var(--bone-2); }
.eyebrow b.numeral { margin-right: 4px; }
.eyebrow--center { justify-content: center; }
.eyebrow--center::before { display: none; }

/* ---------------- hero (V2.2 entrance and reveal; the words are the owner's) ---------------- */
.v27 .hero__lead { font-size: clamp(22px, 2.3vw, 34px); }
.v27 .hero__stat { margin-top: 16px; font-family: var(--serif); font-weight: 400; font-size: clamp(18px, 1.55vw, 24px); letter-spacing: .01em; text-transform: none; color: var(--bone); text-shadow: 0 0 26px rgba(0, 0, 0, .85); }
.v27 .hero__cta { flex-direction: column; align-items: center; gap: 18px; }
.hero__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.hero__kind { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--bone-3); }

/* ---------------- I · the manifesto, plate by plate ---------------- */
.mplates { position: relative; background: #000; }
.mplates__head { position: relative; z-index: 3; padding: clamp(70px, 10vh, 120px) var(--gutter) 0; display: flex; justify-content: center; }
.mplates__head .eyebrow { margin: 0; }
.plate { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 14vh var(--gutter); overflow: hidden; isolation: isolate; }
.plate__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .55; filter: brightness(.82); transform: scale(1.04); transition: opacity 2s var(--ease-out), transform 12s linear; }
.plate.is-in .plate__bg { opacity: .78; transform: scale(1); }
.plate::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .35) 52%, rgba(0, 0, 0, .12)), linear-gradient(#000, transparent 18%, transparent 82%, #000); }
.plate--right::after { background: linear-gradient(270deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, .35) 52%, rgba(0, 0, 0, .12)), linear-gradient(#000, transparent 18%, transparent 82%, #000); }
.plate--center::after { background: radial-gradient(ellipse at 50% 55%, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25) 60%), linear-gradient(#000, transparent 18%, transparent 82%, #000); }
.plate__text { width: 100%; max-width: 1240px; margin: 0 auto; display: grid; gap: .28em; }
.plate--right .plate__text { justify-items: end; text-align: right; }
.plate--center .plate__text { justify-items: center; text-align: center; }
.plate__line { max-width: 22em; font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3.5vw, 58px); line-height: 1.14; color: var(--bone); text-shadow: 0 0 34px rgba(0, 0, 0, .9); opacity: 0; filter: blur(10px); transform: translateY(.25em); transition: opacity 1.4s var(--ease-out), filter 1.6s var(--ease-out), transform 1.8s var(--ease-out); transition-delay: calc(var(--k) * .55s + .2s); }
.plate.is-in .plate__line { opacity: 1; filter: none; transform: none; }
.plate__line.is-fire { color: var(--ember-hot); text-shadow: 0 0 36px rgba(240, 130, 60, .45), 0 0 4px rgba(0, 0, 0, .9); }
.plate--center .plate__line:last-child { margin-top: .4em; font-size: clamp(34px, 4.6vw, 76px); text-transform: uppercase; letter-spacing: .04em; }
.mplates__cta { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; padding: 0 var(--gutter) clamp(90px, 13vh, 150px); text-align: center; }
.mplates__cta .note { flex-basis: 100%; margin: 0 auto; }

/* ---------------- chapters ---------------- */
.chapter { position: relative; padding: clamp(96px, 13vh, 170px) 0; background: var(--ink); overflow: hidden; }
.chapter__head { max-width: 980px; }
.chapter__head .display { text-wrap: balance; }
.feature-name { font-family: var(--serif); font-weight: 500; font-size: 1.12em; color: var(--bone); }

/* II · the world: an observation window */
.window { position: relative; margin: clamp(40px, 6vh, 70px) auto 0; width: min(100% - 2 * var(--gutter), 1520px); aspect-ratio: 21 / 9; min-height: 340px; overflow: hidden; border: 1px solid var(--hair); background: #000; }
.window__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.window::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, .2) 55%, transparent), linear-gradient(transparent 60%, rgba(0, 0, 0, .6)); }
.window__theses { position: absolute; z-index: 2; left: clamp(20px, 4vw, 64px); top: 50%; transform: translateY(-50%); display: grid; gap: clamp(10px, 1.6vh, 18px); }
.window__theses li { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 2.6vw, 42px); line-height: 1.1; color: var(--bone); text-shadow: 0 0 24px rgba(0, 0, 0, .9); opacity: 0; transform: translateY(8px); transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out); }
.window.is-in .window__theses li { opacity: 1; transform: none; }
.window.is-in .window__theses li:nth-child(2) { transition-delay: .7s; }
.window.is-in .window__theses li:nth-child(3) { transition-delay: 1.4s; color: var(--ember-hot); }
.window__label { position: absolute; z-index: 2; right: 16px; bottom: 12px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--bone-3); text-shadow: 0 0 8px #000; }
.chapter__body { margin-top: clamp(50px, 8vh, 90px); }
.pair { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 90px); align-items: start; }
.pair__big { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3.2vw, 52px); line-height: 1.08; color: var(--bone); }
.pair__text { display: grid; gap: 22px; justify-items: start; }
.pair__text p { font-size: clamp(16px, 1.15vw, 18px); line-height: 1.66; color: var(--bone-2); max-width: 60ch; }
.pair__feature { font-size: clamp(16px, 1.15vw, 18px); line-height: 1.66; color: var(--bone-2); max-width: 62ch; padding-left: 18px; border-left: 1px solid rgba(240, 176, 122, .55); }
.pair__feature b { font-family: var(--serif); font-weight: 500; font-size: 1.15em; color: var(--bone); }
.beyond { margin-top: clamp(56px, 9vh, 100px); text-align: center; font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.25; color: var(--bone); max-width: 30em; margin-left: auto; margin-right: auto; }

/* III · grey morality: the scene */
.states { margin-top: 22px; font-family: var(--serif); font-size: clamp(20px, 1.9vw, 30px); letter-spacing: .02em; color: var(--bone-2); }
.states em { display: block; margin-top: 4px; color: var(--bone); }
.scene { position: relative; margin: clamp(40px, 6vh, 70px) auto 0; width: min(100% - 2 * var(--gutter), 1520px); min-height: min(86vh, 820px); display: grid; align-items: end; overflow: hidden; border: 1px solid var(--hair); background: #000; isolation: isolate; }
.scene__bg { position: absolute; inset: 0; z-index: -2; }
.scene__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: grayscale(.82) brightness(.42) contrast(1.15); transform: scale(1.03); transition: opacity 1.6s var(--ease-out), transform 9s linear; }
.scene__bg img.is-on { opacity: 1; transform: scale(1.08); }
.scene.is-kill .scene__bg img[data-choice-bg="war"].is-on { filter: grayscale(.55) sepia(.25) brightness(.42) contrast(1.15); }
.scene::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .86), rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .1)), linear-gradient(transparent 40%, rgba(0, 0, 0, .7)); }
.scene__copy { padding: clamp(24px, 4vw, 64px); max-width: 780px; display: grid; gap: 22px; justify-items: start; }
.scene__ask { font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3.4vw, 56px); line-height: 1.08; color: var(--bone); }
.scene__buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.scene__log { display: grid; gap: 12px; }
.scene__log li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: baseline; opacity: 0; transform: translateY(8px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.scene__log li.is-on { opacity: 1; transform: none; }
.scene__log time { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ember-hot); }
.scene__log li > span { font-family: var(--serif); font-size: clamp(20px, 1.8vw, 28px); line-height: 1.2; color: var(--bone); }
.scene__end { display: grid; gap: 14px; justify-items: start; padding-top: 10px; border-top: 1px solid var(--hair); opacity: 0; transition: opacity 1.4s var(--ease-out); }
.scene__end.is-on { opacity: 1; }
.scene__verdict { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.1vw, 32px); line-height: 1.22; color: var(--ember-hot); }
.scene__price { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--bone-2); }
.scene__after { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.chapter--choice .note { margin-top: 14px; }

/* IV · the price of every mistake: a band of the duel */
.chapter--combat { padding: 0; }
.band { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.band__video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: saturate(.55) brightness(.62) contrast(1.12); }
.band::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .45) 50%, rgba(0, 0, 0, .15)), linear-gradient(#050506, transparent 16%, transparent 84%, #050506); }
.band__copy { max-width: 1240px; }
.band__copy .lead { max-width: 52ch; }
.band__copy .display { max-width: 14ch; }

/* V · philosophy: numerals only on the tabs */
.v27 .shadows__tab { padding: 8px 4px; }
.v27 .shadows__tab b { font-size: 24px; }

/* VI · the one who struggles */
.chapter--struggle { min-height: 100vh; display: grid; align-items: center; isolation: isolate; }
.struggle-bg { position: absolute; inset: 0; z-index: -2; }
.struggle-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; filter: grayscale(.8) brightness(.36) contrast(1.15); }
.chapter--struggle::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 5, 6, .92), rgba(5, 5, 6, .6) 55%, rgba(5, 5, 6, .3)), linear-gradient(var(--ink), transparent 14%, transparent 86%, var(--ink)); }
.struggle-v27 .chapter__head .display { max-width: 20ch; }
.rules { margin-top: clamp(40px, 6vh, 64px); max-width: 860px; border-bottom: 1px solid var(--hair); }
.rules li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 24px 0; border-top: 1px solid var(--hair); }
.rules__n { font-family: var(--serif); font-weight: 300; font-size: 46px; line-height: .9; color: var(--ember-hot); }
.rules p { font-size: 16.5px; line-height: 1.62; color: var(--bone-2); }
.rules b { display: block; margin-bottom: 6px; font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2vw, 31px); line-height: 1.14; color: var(--bone); }
.struggle-v27 .pair__feature { margin-top: 36px; }

/* VII · Cardonians */
.chapter--creed { background: radial-gradient(ellipse at 50% 30%, rgba(208, 138, 78, .08), transparent 55%), #030304; text-align: center; }
.creed { display: grid; justify-items: center; max-width: 980px; }
.creed__sign { width: clamp(84px, 9vw, 120px); height: auto; color: var(--bone); margin-bottom: 26px; }
.creed__ember { fill: var(--ember-hot); filter: drop-shadow(0 0 10px rgba(240, 150, 80, .7)); animation: v27-ember 3.6s ease-in-out infinite; transform-origin: 60px 60px; }
@keyframes v27-ember { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
.creed__title { margin-bottom: clamp(30px, 5vh, 54px); }
.creed__lines { display: grid; gap: clamp(10px, 1.6vh, 18px); }
.creed__lines li { font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.7vw, 42px); line-height: 1.16; color: var(--bone); }
.creed__lines li:nth-child(4) { color: var(--ember-hot); }
.creed__you { margin: clamp(40px, 7vh, 70px) 0 30px; font-family: var(--serif); font-style: italic; font-size: clamp(21px, 2vw, 30px); line-height: 1.3; color: var(--bone-2); }
.creed__you b { display: inline-block; margin-top: 10px; font-style: normal; font-weight: 400; font-size: clamp(34px, 4.4vw, 70px); letter-spacing: .06em; text-transform: uppercase; color: var(--bone); }

/* VIII · the struggler's diary */
.diary .chron__era span { margin-left: 4px; }
.diary__note { font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.3vw, 20px) !important; line-height: 1.45 !important; color: var(--bone-2); }

/* final, by the fire */
.final__ask { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--bone-2); }
.v27 .final__copy { gap: 14px; }
.v27 .final__sub { margin-bottom: 4px; }

/* the living world page */
.v27-sub .sub { padding-top: var(--nav-h); }
.sub__head { padding-top: clamp(70px, 11vh, 130px); padding-bottom: clamp(20px, 4vh, 40px); }
.sub__head .display { max-width: 18ch; }
.sub__back { padding: 40px var(--gutter) 90px; }

/* ---------------- smaller screens ---------------- */
@media (max-width: 1100px) {
  .pair { grid-template-columns: 1fr; }
  .lang button { min-height: 44px; }
}
@media (max-width: 700px) {
  .nav .lang { display: none; }
  .plate { padding: 12vh var(--gutter); align-items: end; }
  .plate::after, .plate--right::after, .plate--center::after { background: linear-gradient(#000, rgba(0, 0, 0, .25) 30%, rgba(0, 0, 0, .55) 60%, #000); }
  .plate--right .plate__text { justify-items: start; text-align: left; }
  .plate__line { font-size: clamp(25px, 7vw, 32px); }
  .window { aspect-ratio: auto; height: 74vh; min-height: 460px; }
  .window::after { background: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, .75)); }
  .window__theses { top: auto; bottom: 48px; transform: none; right: 18px; }
  .scene { min-height: 0; }
  .scene__copy { padding: 22px 18px 26px; }
  .scene__log li { grid-template-columns: 74px 1fr; gap: 10px; }
  .band { min-height: 0; padding: 110px 0 90px; }
  .rules li { grid-template-columns: 40px 1fr; gap: 12px; }
  .rules__n { font-size: 36px; }
  .creed__lines li { font-size: clamp(22px, 6.4vw, 28px); }
}

/* ---------------- V2.8: the manifesto as the culmination ---------------- */
.mplates__head--big { display: grid; justify-items: center; text-align: center; gap: 4px; padding: clamp(110px, 16vh, 190px) var(--gutter) clamp(10px, 3vh, 30px); }
.mplates__title { font-size: clamp(44px, 6.4vw, 108px); line-height: 1; letter-spacing: .03em; }
.mplates__head--big + .plate { margin-top: -4vh; }
.lead--who { max-width: 58ch; color: var(--bone); }
.mplates__cta .note { flex-basis: 100%; max-width: none; text-align: center; }
/* V2.8: the four shadows are single strong statements now */
.v27 .shadow__text { font-family: var(--serif); font-size: clamp(22px, 2.1vw, 34px); line-height: 1.24; color: var(--bone); max-width: 24em; }
