/* «1736» — раскладка сайта. Цвета, шрифт и кнопки — brand.css (общий с лаунчером и документами). */

html { scroll-behavior: smooth; }
body { background: var(--night); color: var(--fog); }
section[id] { scroll-margin-top: 64px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: .6em 1em; background: var(--torch); color: var(--ink); font-weight: 700; text-decoration: none; border-radius: var(--radius); }
.skip:focus { top: 12px; }

.wrap { width: min(1200px, 100% - 2 * clamp(20px, 5vw, 48px)); margin-inline: auto; }
.section { padding-block: clamp(72px, 10vw, 128px); }
.section h2 { font-size: var(--step-3); margin-bottom: .45em; }
.intro { font-size: var(--step-1); line-height: 1.55; max-width: 38em; margin: 0; }

.paper { background: var(--paper); color: var(--ink); }
.paper .intro { color: var(--ink-2); }
.paper a { color: var(--river-ink); }
.night { background: var(--night); color: var(--fog); }
.night .intro { color: var(--fog-2); }

/* ---------- шапка ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 20; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: clamp(20px, 5vw, 48px); color: var(--fog);
  transition: background-color 240ms ease, box-shadow 240ms ease;
}
.topbar.solid { background: rgba(23, 34, 33, .94); box-shadow: 0 1px 0 var(--night-line); backdrop-filter: blur(8px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.6rem; font-weight: 700; letter-spacing: .04em; text-decoration: none; color: var(--fog); }
.brand-mark { width: 24px; height: 24px; fill: none; stroke: var(--carmine-2); stroke-width: 4; stroke-linejoin: round; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--fog-2); text-decoration: none; padding-block: 10px; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 6px) / 0 1px no-repeat; transition: color 180ms ease, background-size 220ms var(--ease-out); }
.nav a:not(.btn):hover { color: var(--fog); background-size: 100% 1px; }
.nav-cta { min-height: 40px; padding: .55em 1.1em; font-size: var(--step--1); }
.menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; color: var(--fog); cursor: pointer; }

/* ---------- главный экран ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(23, 34, 33, .88) 0%, rgba(23, 34, 33, .42) 52%, rgba(23, 34, 33, .05) 100%),
    linear-gradient(0deg, var(--night) 0%, rgba(23, 34, 33, .0) 42%),
    url("img/market.jpg") center 38% / cover no-repeat;
}
.hero-inner { position: relative; width: min(1200px, 100% - 2 * clamp(20px, 5vw, 48px)); margin: 0 auto; padding-bottom: clamp(56px, 11vh, 120px); }
.hero h1 { display: flex; flex-direction: column; }
.h1-year { font-size: var(--step-4); line-height: .86; letter-spacing: -.02em; font-variant-numeric: oldstyle-nums; }
.h1-line { font-size: var(--step-2); font-style: italic; font-weight: 400; letter-spacing: 0; margin-top: .5em; color: var(--fog); }
.lead { max-width: 33em; margin: 1.1em 0 0; font-size: var(--step-1); line-height: 1.55; color: var(--fog); text-shadow: 0 1px 12px rgba(10, 16, 15, .6); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.btn-ghost { color: var(--fog); border-color: rgba(235, 233, 220, .5); background: rgba(23, 34, 33, .25); }
.btn-ghost:hover { border-color: var(--fog); background: rgba(23, 34, 33, .5); }

/* план 1736 года — единственное «событие» страницы: прорисовывается один раз при загрузке */
.hero-plan { position: absolute; right: clamp(16px, 6vw, 96px); top: clamp(92px, 13vh, 132px); width: clamp(200px, 21vw, 300px); height: auto; overflow: visible; filter: drop-shadow(0 14px 28px rgba(10, 16, 15, .45)); }
.p-sheet { fill: var(--paper); stroke: rgba(35, 32, 27, .35); stroke-width: .6; }
.p-title { font: italic 400 8.4px var(--serif); fill: var(--ink-2); letter-spacing: .02em; }
.hero-plan path { fill: none; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.p-wall { stroke: var(--carmine); stroke-width: 1.6; }
.p-ditch { stroke: var(--carmine); stroke-width: .7; opacity: .7; }
.p-fence { stroke: var(--ink); stroke-width: .6; opacity: .55; stroke-dasharray: .006 .008 !important; }
.p-gate { stroke: var(--carmine); stroke-width: 1; fill: rgba(163, 54, 58, .25) !important; }
.p-river { stroke: var(--river-ink); stroke-width: 2.4; opacity: .75; }
@media (prefers-reduced-motion: no-preference) {
  .hero-plan .p-wall, .hero-plan .p-ditch, .hero-plan .p-gate, .hero-plan .p-river { stroke-dashoffset: 1; animation: draw 2.2s var(--ease-out) .35s forwards; }
  .hero-plan .p-ditch { animation-delay: .9s; }
  .hero-plan .p-gate { animation-delay: 1.5s; }
  .hero-plan .p-river { animation-delay: 1.1s; animation-duration: 2.6s; }
  .hero-plan .p-fence { opacity: 0; animation: fade 1.2s ease 1.6s forwards; }
  .hero-plan { opacity: 0; transform: translateY(10px); animation: sheet 700ms var(--ease-out) .1s forwards; }
  .hero-inner { animation: rise 900ms var(--ease-out) both; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: .55; } }
@keyframes sheet { to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- об игре ---------- */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px) clamp(32px, 6vw, 88px); align-items: start; }
.about-head { padding-top: .2em; }
.about-pic { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 10; }
.about-pic img { width: 100%; height: 100%; object-fit: cover; }
.facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(24px, 4vw, 56px); margin: 0; }
.facts > div { border-top: 1px solid var(--paper-line); padding: 1.1em 0 1.6em; }
.facts dt { font-weight: 700; font-size: var(--step-1); margin-bottom: .35em; }
.facts dd { margin: 0; color: var(--ink-2); }

/* ---------- кадры ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: clamp(28px, 4vw, 48px); }
.shot { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--night-2); aspect-ratio: 16 / 9; }
.shot.wide { grid-column: span 2; grid-row: span 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out), filter 300ms ease; }
.shot:hover img { transform: scale(1.03); filter: brightness(1.06); }
.trailer { margin-top: 24px; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; }

/* ---------- история ---------- */
.history { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0 clamp(32px, 6vw, 96px); }
.history h2 { grid-column: 1 / -1; }
.chronicle p { margin: 0 0 1.1em; max-width: 36em; font-size: 1.1rem; line-height: 1.7; }
.dropcap::first-letter { float: left; font-size: 4.6rem; line-height: .82; font-weight: 700; color: var(--carmine); padding: .06em .1em 0 0; }
.timeline { list-style: none; margin: .4em 0 0; padding: 0; border-left: 1px solid var(--paper-line); }
.timeline li { position: relative; padding: 0 0 1.4em 1.4em; color: var(--ink-2); }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 1px solid var(--carmine); }
.timeline .year { display: block; font-size: var(--step-2); font-weight: 700; color: var(--ink); line-height: 1.1; }

/* ---------- новости ---------- */
.news { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.field-label { display: block; font-size: var(--step--1); color: var(--fog-2); margin-bottom: .45em; }
.subscribe-row { display: flex; gap: 10px; }
.subscribe input[type="email"] {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; font: inherit; color: var(--fog);
  background: var(--night-2); border: 1px solid var(--night-3); border-radius: var(--radius); caret-color: var(--torch);
  transition: border-color 180ms ease;
}
.subscribe input::placeholder { color: #8d9487; }
.subscribe input:focus { border-color: var(--river); outline: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: var(--step--1); line-height: 1.5; color: var(--fog-2); cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--carmine); }
.night .consent a, .night .legal a, .footer a { color: var(--fog); }
.form-note { min-height: 1.5em; margin: 12px 0 0; font-size: var(--step--1); color: var(--river); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.social { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--night-3); border-radius: var(--radius); color: var(--fog-2); text-decoration: none; }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.soon { font-size: var(--step--1); font-style: italic; color: #8d9487; }

/* ---------- где купить ---------- */
.stores { list-style: none; padding: 0; margin: clamp(28px, 4vw, 44px) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.store {
  display: flex; flex-direction: column; gap: .25em; height: 100%; padding: 22px 24px; text-decoration: none; color: var(--ink) !important;
  border: 1px solid var(--paper-line); border-radius: var(--radius); background: rgba(255, 255, 255, .22);
}
.store-name { font-size: var(--step-2); font-weight: 700; }
.store-state { color: var(--ink-2); font-style: italic; }
.store[aria-disabled="true"] { cursor: default; }

/* ---------- подвал ---------- */
.footer { background: var(--night); color: var(--fog-2); border-top: 1px solid var(--night-line); padding: 48px 0 56px; font-size: var(--step--1); }
.footer-in { display: grid; gap: 10px; }
.footer .brand { font-size: 1.8rem; margin: 0 0 4px; }
.footer-note, .footer-small { margin: 0; }
.footer-small { color: #8d9487; }
.legal { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 6px 0; }

/* ---------- просмотр кадра ---------- */
.lightbox { max-width: none; max-height: none; width: 100vw; height: 100vh; margin: 0; padding: clamp(12px, 3vw, 40px); border: 0; background: rgba(12, 18, 17, .96); place-items: center; }
.lightbox[open] { display: grid; animation: lb-in 220ms var(--ease-out); }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lb-close { position: fixed; top: 12px; right: 12px; width: 48px; height: 48px; display: grid; place-items: center; background: none; border: 0; color: var(--fog); cursor: pointer; }
@keyframes lb-in { from { opacity: 0; } }

/* ---------- планшеты и телефоны ---------- */
@media (max-width: 960px) {
  .about, .history, .news { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .nav { position: fixed; inset: 64px 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: 8px clamp(20px, 5vw, 48px) 20px; background: rgba(23, 34, 33, .98); border-bottom: 1px solid var(--night-line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s 200ms; }
  .nav.open { opacity: 1; transform: none; visibility: visible; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--night-line); background: none; }
  .nav-cta { margin-top: 14px; min-height: 46px; }
  .topbar.menu-open { background: rgba(23, 34, 33, .98); }
  .hero { background-position: 58% 40%; }
  .hero-plan { width: 34vw; max-width: 150px; top: 80px; right: 16px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .facts, .gallery, .stores { grid-template-columns: 1fr; }
  .shot.wide { grid-column: auto; grid-row: auto; }
  .subscribe-row { flex-direction: column; }
}
