/* Mea Culpa — landing. Tokens follow the app's «Фонарь» direction: one lamp, warm black, cream ink. */
:root {
  --bg: #0d0b09;
  --raised: #17130f;
  --ink: #e9dfcc;
  --ink2: #b4a790;
  --ink3: #8f826e;
  --rule: #2b251e;
  --amber: #e8a84a;
  --amber-dim: rgba(232, 168, 74, .16);
  --red: #b8392e;
  --paper: #e6dac3;
  --paper-ink: #2a2118;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --lx: 50%;
  --ly: 14%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, .5vw + 1rem, 1.1875rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: rgba(232, 168, 74, .5); text-underline-offset: .2em; }
a:hover { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--amber); color: #1a1208; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--amber); color: #1a1208; padding: .6rem 1rem; border-radius: 8px; font-family: var(--sans); font-size: .9rem; }
.skip:focus { top: 1rem; }

/* atmosphere: one lamp that follows the cursor, film grain on top */
.lamp {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(640px circle at var(--lx) var(--ly), rgba(232, 168, 74, .12), rgba(232, 168, 74, .04) 45%, transparent 72%);
}
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .055;
  background: url("../img/grain.webp") repeat; background-size: 220px;
}
.wrap { width: min(100% - var(--pad) * 2, var(--wrap)); margin-inline: auto; position: relative; }
main, .site-footer { position: relative; z-index: 1; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 11, 9, .78);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(43, 37, 30, .8);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand em { font-weight: 700; }
.brand:hover { color: var(--ink); }
.site-nav { display: none; gap: 1.6rem; font-family: var(--sans); font-size: .875rem; }
.site-nav a { text-decoration: none; color: var(--ink2); padding: .5rem 0; }
.site-nav a:hover { color: var(--amber); }
.lang { display: flex; gap: .15rem; font-family: var(--sans); font-size: .8125rem; font-weight: 600; letter-spacing: .06em; }
.lang a { text-decoration: none; color: var(--ink3); padding: .75rem .6rem; min-width: 2.75rem; text-align: center; border-radius: 6px; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { color: var(--amber); }
@media (min-width: 900px) { .site-nav { display: flex; } }

/* type */
h1.title { font-size: clamp(4rem, 16.5vw, 10.5rem); line-height: .86; letter-spacing: -.04em; font-weight: 700; margin-left: -.04em; }
h1.title em { font-weight: 700; }
h2.h2 { font-size: clamp(2rem, 1rem + 4.4vw, 3.75rem); line-height: 1.04; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; }
h3.h3 { font-size: clamp(1.3rem, 1rem + 1vw, 1.65rem); line-height: 1.2; letter-spacing: -.01em; font-weight: 700; }
.lead { color: var(--ink2); max-width: 36rem; text-wrap: pretty; }
.small { font-size: .9rem; color: var(--ink3); }
.sans { font-family: var(--sans); }

/* phone frame: real UI only */
.phone {
  --w: 280px;
  width: var(--w); max-width: 100%;
  aspect-ratio: 1206 / 2622;
  padding: calc(var(--w) * .021);
  border-radius: calc(var(--w) * .152);
  background: linear-gradient(145deg, #45392c 0%, #17130f 38%, #2a2219 100%);
  box-shadow: 0 0 0 1px rgba(255, 235, 200, .09) inset, 0 50px 90px -28px rgba(0, 0, 0, .92), 0 0 90px -20px rgba(232, 168, 74, .14);
  flex: none;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--w) * .131); background: #000; }

/* hero */
.hero { position: relative; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
.hero__tag { font-size: clamp(1.35rem, 1rem + 1.6vw, 2.15rem); line-height: 1.22; font-style: italic; max-width: 17em; margin-top: 1.5rem; text-wrap: balance; }
.hero__lead { margin-top: 1.25rem; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.soon {
  display: inline-flex; align-items: center; gap: .9rem; padding: .75rem 1.3rem .75rem 1rem;
  border: 1px solid rgba(232, 168, 74, .55); border-radius: 16px; background: rgba(232, 168, 74, .07);
  font-family: var(--sans); line-height: 1.15;
}
.soon__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px 3px rgba(232, 168, 74, .55); flex: none; }
.soon small { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); margin-bottom: .2rem; }
.soon strong { font-size: 1.12rem; font-weight: 650; letter-spacing: -.005em; }
.hero__meta { font-family: var(--sans); font-size: .875rem; color: var(--ink2); }
.hero__more { display: none; margin-top: 1.75rem; font-family: var(--sans); font-size: .9rem; color: var(--ink2); text-decoration: none; padding: .5rem 0; }
.hero__more::after { content: " \2193"; color: var(--amber); }
.hero__visual { position: relative; min-height: 540px; margin-inline: calc(var(--pad) * -1); }
.hero__villa { position: absolute; inset: 0 0 0 12%; overflow: hidden; }
.hero__villa img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero__villa { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 55%), linear-gradient(0deg, transparent 0, #000 32%), linear-gradient(180deg, transparent 0, #000 16%); mask-image: linear-gradient(90deg, transparent 0, #000 55%), linear-gradient(0deg, transparent 0, #000 32%), linear-gradient(180deg, transparent 0, #000 16%); -webkit-mask-composite: source-in; mask-composite: intersect; }
.hero__visual .phone { position: absolute; left: 50%; bottom: 0; --w: 240px; transform: translateX(-62%) rotate(-3deg); }
@media (min-width: 960px) {
  .hero__more { display: inline-block; }
  .hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 1rem; }
  .hero__visual { min-height: 760px; margin-inline: 0 calc((100vw - min(100vw - var(--pad) * 2, var(--wrap))) / -2); }
  .hero__villa { inset: -4.5rem 0 -6rem 14%; }
  .hero__visual .phone { --w: 310px; left: 0; transform: rotate(-3deg); bottom: 2rem; }
}

/* sections */
.section { padding: clamp(4.5rem, 10vw, 8.5rem) 0; position: relative; scroll-margin-top: 3rem; }
.section + .section { border-top: 1px solid rgba(43, 37, 30, .55); }
.head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.25rem, 5vw, 4rem); }
@media (min-width: 900px) { .head { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: end; gap: 3rem; } }

/* steps */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) max-content; gap: 5rem; } .split--rev { grid-template-columns: max-content minmax(0, 1fr); } }
@media (max-width: 899px) { .split--rev > :first-child { order: 2; } }
.steps { counter-reset: step; display: grid; gap: 0; }
.step { counter-increment: step; display: grid; grid-template-columns: 3.4rem 1fr; gap: 0 1rem; padding: 1.6rem 0; border-top: 1px solid var(--rule); }
.step:last-child { border-bottom: 1px solid var(--rule); }
.step::before { content: counter(step); grid-row: span 2; font-size: 3.4rem; line-height: .9; font-style: italic; font-weight: 700; color: var(--amber); }
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--ink2); max-width: 32rem; }
.visual { display: flex; justify-content: center; }

/* investigation */
.pull { font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem); line-height: 1.22; font-style: italic; margin-top: 2rem; padding-left: 1.25rem; border-left: 2px solid var(--red); max-width: 22em; text-wrap: balance; }
.stack { display: grid; gap: 1.2rem; margin-top: 1.5rem; }
.stack p { color: var(--ink2); max-width: 34rem; }
.sub { margin-top: clamp(4rem, 9vw, 7rem); }
.numeral { display: flex; align-items: baseline; gap: 1rem; margin: 1.5rem 0 .5rem; }
.numeral b { font-size: clamp(5rem, 16vw, 9rem); line-height: .8; font-weight: 700; letter-spacing: -.05em; color: var(--amber); font-style: italic; }
.numeral span { max-width: 12em; line-height: 1.25; color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; }
.chips li { font-family: var(--sans); font-size: .875rem; padding: .45rem .9rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); background: rgba(255, 240, 210, .03); }
.chips li:last-child { color: var(--amber); border-color: rgba(232, 168, 74, .4); }
.pair { position: relative; width: min(400px, 100vw - var(--pad) * 2); aspect-ratio: 400 / 600; container-type: inline-size; }
.pair .phone { position: absolute; --w: 56cqw; }
.pair .phone:first-child { left: 0; top: 0; }
.pair .phone:last-child { right: 0; bottom: 0; }

/* cast */
.cast { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; }
.cast li { position: relative; }
.cast li:nth-child(even) { margin-top: 2.5rem; }
.cast img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--rule); filter: sepia(.15) contrast(1.02); }
@media (max-width: 899px) {
  .cast { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .8rem; padding-bottom: 1rem; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scrollbar-width: none; }
  .cast::-webkit-scrollbar { display: none; }
  .cast li { flex: 0 0 46%; scroll-snap-align: start; }
  .cast li:nth-child(even) { margin-top: 1.6rem; }
}

/* seasons + board */
.board {
  --pad-p: 1.2cqw; --pad-b: 3.6cqw;
  position: relative; container-type: inline-size; aspect-ratio: 1000 / 620;
  background: #17130f url("../img/lamp-board.webp") center / cover;
  border: 1px solid var(--rule); border-radius: 6px; overflow: hidden;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, .75);
}
.board::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, transparent 0, rgba(13, 11, 9, .5) 80%); }
.board__thread { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.board__thread--m { display: none; }
.polaroid {
  position: absolute; width: 17cqw; left: calc(var(--x) * .1%); top: calc(var(--y) * .16129%);
  background: var(--paper); padding: var(--pad-p) var(--pad-p) var(--pad-b); transform: rotate(var(--r));
  box-shadow: 0 1.4cqw 2.6cqw -0.6cqw rgba(0, 0, 0, .75); color: var(--paper-ink);
}
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: sepia(.25) contrast(1.05); }
.polaroid figcaption { position: absolute; left: 0; right: 0; bottom: .55cqw; text-align: center; font-size: 1.45cqw; line-height: 1.1; font-style: italic; font-weight: 600; padding-inline: .6cqw; }
.polaroid .pin, .note .pin { position: absolute; left: 50%; top: -.55cqw; width: 1.3cqw; height: 1.3cqw; margin-left: -.65cqw; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f3cd8d, #b27a22 70%); box-shadow: 0 .3cqw .5cqw rgba(0, 0, 0, .6); }
.note {
  position: absolute; left: calc(var(--x) * .1%); top: calc(var(--y) * .16129%); width: 14cqw; padding: 1.4cqw 1cqw 1.6cqw;
  background: #d9cdb3; color: var(--paper-ink); transform: rotate(var(--r)); text-align: center;
  box-shadow: 0 1.4cqw 2.6cqw -0.6cqw rgba(0, 0, 0, .75);
}
.note b { display: block; font-size: 6.4cqw; line-height: .9; font-style: italic; color: var(--red); }
.note span { display: block; font-size: 1.45cqw; line-height: 1.15; margin-top: .6cqw; font-weight: 600; }
.board--m-only { display: none; }
@media (max-width: 719px) {
  .board { aspect-ratio: 400 / 800; --pad-p: 2.6cqw; --pad-b: 10cqw; }
  .polaroid { width: 38cqw; left: calc(var(--mx) * .25%); top: calc(var(--my) * .125%); }
  .polaroid figcaption { font-size: 3.3cqw; bottom: 1.8cqw; }
  .polaroid .pin, .note .pin { width: 3.2cqw; height: 3.2cqw; margin-left: -1.6cqw; top: -1.4cqw; }
  .note { left: calc(var(--mx) * .25%); top: calc(var(--my) * .125%); width: 34cqw; padding: 3cqw 2cqw 3.4cqw; }
  .note b { font-size: 15cqw; }
  .note span { font-size: 3.5cqw; }
  .board__thread--d { display: none; }
  .board__thread--m { display: block; }
}
.seasons { display: grid; gap: 3rem; margin-top: clamp(3rem, 7vw, 5rem); align-items: center; }
@media (min-width: 900px) { .seasons { grid-template-columns: minmax(0, 1fr) max-content; gap: 5rem; } }
.season { display: grid; grid-template-columns: 120px 1fr; gap: 1.25rem; align-items: start; padding: 1.5rem 0; border-top: 1px solid var(--rule); }
.season:last-child { border-bottom: 1px solid var(--rule); }
.season img { width: 120px; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--rule); }
.season p { color: var(--ink2); margin-top: .4rem; }
.season .tag { display: inline-block; font-family: var(--sans); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); margin-bottom: .35rem; }
.season--soon img { filter: saturate(.8) brightness(.9); }

/* arena */
.rules { display: grid; gap: 0; margin-top: 2rem; }
.rules div { padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.rules div:last-child { border-bottom: 1px solid var(--rule); }
.rules dt { margin-bottom: .35rem; }
.rules dd { color: var(--ink2); max-width: 32rem; }
.duo { position: relative; width: min(470px, 100vw - var(--pad) * 2); aspect-ratio: 470 / 600; container-type: inline-size; }
.duo .phone { position: absolute; --w: 53cqw; }
.duo .phone:first-child { left: 0; top: 0; }
.duo .phone:last-child { right: 0; bottom: 0; }

/* gallery */
.strip { display: flex; align-items: flex-start; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x proximity; padding: 1rem var(--pad) 2.5rem; margin-inline: auto; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.strip .phone { --w: 236px; scroll-snap-align: center; }
.strip .phone:nth-child(even) { margin-top: 2.2rem; }
.strip-note { margin-top: .5rem; }
@media (min-width: 1300px) { .strip { padding-inline: max(var(--pad), calc((100vw - var(--wrap)) / 2)); } }

/* faq */
@media (min-width: 900px) { .faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4rem; align-items: start; } .faq-wrap h2 { position: sticky; top: 6rem; margin-bottom: 0 !important; } }
.faq { max-width: 52rem; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 1.3rem 2.5rem 1.3rem 0; position: relative; font-size: 1.25rem; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .2rem; top: 1.05rem; font-family: var(--sans); font-weight: 300; font-size: 1.8rem; color: var(--amber); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--amber); }
.faq p { color: var(--ink2); padding: 0 2.5rem 1.5rem 0; max-width: 40rem; }

/* closing */
.finale { text-align: center; padding: clamp(5rem, 11vw, 9rem) 0; position: relative; overflow: hidden; border-top: 1px solid var(--rule); }
.finale::before { content: ""; position: absolute; inset: 0; background: url("../img/lamp-board.webp") center / cover; opacity: .55; }
.finale::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 10%, var(--bg) 85%); }
.finale .wrap { z-index: 1; display: grid; justify-items: center; gap: 1.25rem; }
.finale__icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 0 1px rgba(255, 235, 200, .12), 0 30px 60px -20px rgba(0, 0, 0, .9), 0 0 80px -10px rgba(232, 168, 74, .35); margin-bottom: .75rem; }
.finale p { color: var(--ink2); }

/* footer */
.site-footer { padding: 2.5rem 0 3rem; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: .875rem; color: var(--ink3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-footer nav a { text-decoration: none; padding: .6rem 0; color: var(--ink2); }
.site-footer nav a:hover { color: var(--amber); }

/* red thread accent, used sparingly */
.thread { height: 2px; width: 4.5rem; background: var(--red); margin-bottom: 1.25rem; box-shadow: 0 0 12px rgba(184, 57, 46, .5); }

/* motion: subtle, opt-in */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .js .hero__villa { animation: lampon 2.2s ease-out both; }
  .soon__dot { animation: pulse 2.8s ease-in-out infinite; }
  .lamp { transition: background-position .2s; }
}
@keyframes lampon { 0% { opacity: 0; } 18% { opacity: .35; } 26% { opacity: .12; } 44% { opacity: .75; } 100% { opacity: 1; } }
@keyframes pulse { 50% { box-shadow: 0 0 6px 1px rgba(232, 168, 74, .3); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* language picker (root page) */
.picker { min-height: 100svh; display: grid; place-items: center; padding: 3rem var(--pad); text-align: center; position: relative; z-index: 1; }
.picker__inner { display: grid; justify-items: center; gap: 1.5rem; }
.picker__icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 30px 60px -20px #000, 0 0 70px -10px rgba(232, 168, 74, .35); }
.picker ul { display: grid; gap: .75rem; width: min(100%, 24rem); margin-top: 1rem; }
.picker li a { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.3rem; min-height: 3.5rem; border: 1px solid var(--rule); border-radius: 14px; text-decoration: none; background: rgba(255, 240, 210, .03); font-size: 1.2rem; }
.picker li a:hover { border-color: rgba(232, 168, 74, .6); color: var(--ink); background: var(--amber-dim); }
.picker li a span { font-family: var(--sans); font-size: .8rem; letter-spacing: .08em; color: var(--ink3); }
