/* AFTERHOURS — модернистская шелкография: четыре краски, плоские формы, зерно */

:root {
  --ink: #0D0C0B;
  --concrete: #212126;
  --concrete-2: #18181B;
  --concrete-3: #2A2A30;
  --paper: #DCCCB2;
  --paper-2: rgba(220, 204, 178, 0.7);
  --paper-3: rgba(220, 204, 178, 0.45);
  --rule: rgba(220, 204, 178, 0.12);
  --light: #F77726;
  --up: #5BEA8C;
  --down: #FF5C8A;

  --f-sans: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --wrap: 1240px;
  --gut: clamp(20px, 5vw, 64px);
  --strip-h: clamp(96px, 12vw, 200px);
  --sec-pt: clamp(96px, 12vw, 176px);
  --sec-pb: clamp(72px, 8vw, 128px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink);
  color: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

body {
  margin: 0;
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(16px, 0.5vw + 13px, 19px);
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Статичное зерно трафаретной печати поверх всего */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background: url(../img/grain.png) repeat;
  background-size: 256px 256px;
}

::selection { background: var(--light); color: var(--ink); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gut));
  margin: 0 auto;
  padding-inline: var(--gut);
}

:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

/* ---------- Типографика ---------- */
.h1, .h2, .h3, .display {
  margin: 0;
  font-family: var(--f-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 0.98;
  font-kerning: normal;
  text-wrap: balance;
}
.h1 { font-size: clamp(36px, min(6.2vw, 10.4svh), 108px); }
.h2 { font-size: clamp(30px, 4.4vw, 68px); }
.h3 { font-size: clamp(24px, 2.7vw, 42px); line-height: 1.04; }
.display { font-size: clamp(76px, 15vw, 224px); line-height: 0.84; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-2);
}
.eyebrow::before {
  content: '';
  flex: none;
  width: 9px;
  height: 11px;
  background: var(--concrete-3);
}
.eyebrow--center { justify-content: center; }

/* «Приводка»: оранжевый слой со сдвигом, совмещается при появлении */
.reg { position: relative; }
.reg__ink {
  position: absolute;
  inset: 0;
  color: var(--light);
  transform: translate(3px, 2px);
  pointer-events: none;
  user-select: none;
}
.reg__key { position: relative; }

/* ---------- Плашки и кнопки с неровным краем ---------- */
.plate { position: relative; isolation: isolate; }
.plate::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--concrete);
  -webkit-mask: url(../img/rough-plate.svg) 0 0 / 100% 100% no-repeat;
  mask: url(../img/rough-plate.svg) 0 0 / 100% 100% no-repeat;
}

.btn {
  --plate: var(--paper);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  background: none;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn::before, .btn::after {
  content: '';
  position: absolute;
  inset: 0;
  -webkit-mask: url(../img/rough-btn.svg) 0 0 / 100% 100% no-repeat;
  mask: url(../img/rough-btn.svg) 0 0 / 100% 100% no-repeat;
  transition: transform 0.28s var(--ease), opacity 0.28s var(--ease);
}
.btn::before { z-index: -1; background: var(--plate); }
.btn::after {
  z-index: -2;
  background: var(--concrete-3);
  -webkit-mask-image: url(../img/rough-btn-2.svg);
  mask-image: url(../img/rough-btn-2.svg);
  opacity: 0;
}
.btn:hover::before { transform: translate(-2px, -2px); }
.btn:hover::after { opacity: 1; transform: translate(3px, 3px); }
.btn:active::before { transform: translate(1px, 1px); }
.btn--concrete { --plate: var(--concrete); color: var(--paper); }
.btn--concrete::after { background: #000; }
.btn--light { --plate: var(--light); color: var(--ink); }
.btn--ink { --plate: var(--ink); color: var(--paper); }

/* ---------- Шапка ---------- */
.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(16px, 2.4vw, 28px) var(--gut);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
}
.brand__mark { width: 36px; height: 36px; }
.brand__word { font-weight: 600; font-size: 14px; letter-spacing: 0.2em; }
.top__nav { display: flex; gap: clamp(18px, 2.4vw, 34px); }
.top__nav a {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper-2);
  transition: color 0.2s;
}
.top__nav a:hover { color: var(--paper); }
@media (max-width: 860px) { .top__nav { display: none; } }

/* ---------- 1. Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: var(--ink);
}
.hero__sky {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  container-type: size;
}
.hero__banner {
  --ov: clamp(40px, 8svh, 96px);
  --top: clamp(56px, 8svh, 96px);
  --bh: calc(100cqh + var(--ov) - var(--top));
  position: absolute;
  left: 50%;
  bottom: calc(-1 * var(--ov));
  height: var(--bh);
  width: calc(var(--bh) * var(--banner-ratio));
  translate: -50% 0;
}
.hero__zoom {
  position: absolute;
  inset: 0;
  container-type: inline-size;
  transform-origin: calc(var(--win-x) + var(--win-w) / 2) var(--win-y);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 4.5%, #000 74%, transparent 99%), linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, transparent 0, #000 4.5%, #000 74%, transparent 99%), linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-composite: intersect;
}
.hero__zoom img { width: 100%; height: 100%; }

/* Горизонтальные экраны: баннер на весь первый экран (как background-size: cover),
   текст лежит поверх нижней трети на мягком затемнении */
@media (min-aspect-ratio: 1/1) {
  .hero { justify-content: flex-end; }
  .hero__sky { position: absolute; inset: 0; }
  .hero__banner {
    --bw: max(100cqw, calc(100cqh * var(--banner-ratio)));
    bottom: 0;
    width: var(--bw);
    height: calc(var(--bw) / var(--banner-ratio));
  }
  .hero__zoom {
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 4.5%);
    mask-image: linear-gradient(180deg, transparent 0, #000 4.5%);
  }
  .hero__sky::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(13, 12, 11, 0) 46%, rgba(13, 12, 11, 0.38) 64%, rgba(13, 12, 11, 0.72) 84%, var(--ink) 100%);
  }
}

/* Окно центральной башни: отдельный слой поверх баннера */
.hero__win {
  position: absolute;
  left: var(--win-x);
  top: var(--win-y);
  width: var(--win-w);
  height: var(--win-h);
}
.hero__win-off, .hero__win-on, .hero__win-halo { position: absolute; }
.hero__win-off { inset: -12%; background: var(--win-wall); opacity: 0; }
.hero__win-on {
  inset: 0;
  background: var(--light);
  box-shadow: 0 0 0.35cqw 0.04cqw rgba(247, 119, 38, 0.7), 0 0 1.2cqw 0 rgba(247, 119, 38, 0.28);
}
.hero__win-halo {
  left: 50%;
  top: 50%;
  width: 11cqw;
  height: 11cqw;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(247, 119, 38, 0.2), rgba(247, 119, 38, 0.06) 45%, transparent);
  pointer-events: none;
}
.js .hero__win-off { opacity: 1; }
.js .hero__win-on, .js .hero__win-halo { opacity: 0; }

.hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--gut) clamp(28px, 6svh, 72px);
  text-align: center;
}
.hero__copy .h1 { max-width: 15em; }
.hero__sub {
  max-width: 31em;
  margin-top: clamp(14px, 2.2svh, 24px);
  font-size: clamp(16px, 0.7vw + 11px, 21px);
  color: var(--paper-2);
  text-wrap: balance;
}
.hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(22px, 3.6svh, 40px);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 560px) {
  .hero__row, .hero__actions { width: 100%; flex-direction: column; align-items: stretch; gap: 10px; }
  .hero__actions .btn { width: 100%; }
}

/* ---------- Секции ---------- */
.sec {
  position: relative;
  background: var(--ink);
  padding: var(--sec-pt) 0 calc(var(--strip-h) + var(--sec-pb));
}
.foot { position: relative; background: var(--ink); }

/* Полоса силуэтов внизу секции: при скролле уходит под следующую */
.skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--strip-h);
  pointer-events: none;
}
.skyline svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
.skyline .far { fill: var(--concrete); }
.skyline .near { fill: #121214; }
.skyline .slits { fill: var(--ink); opacity: 0.55; }

.js [data-ink] { visibility: hidden; }
.js [data-hero] { visibility: hidden; }

/* ---------- 2. The Bell ---------- */
.bell__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.temple {
  position: relative;
  width: min(100%, 1000px);
  container-type: inline-size;
}
.temple__art { width: 100%; height: auto; overflow: visible; }
.temple .oculus-on { opacity: 0; transition: opacity 0.6s var(--ease); }
.temple.is-closed .oculus-on { opacity: 1; }
.clock {
  position: absolute;
  left: 9.4%;
  top: 34.3%;
  width: 81.2%;
  height: 20.4%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.2cqw;
  font-family: var(--f-mono);
  font-weight: 500;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.clock__time { font-size: 10.4cqw; line-height: 1; letter-spacing: -0.01em; }
.clock__meta {
  display: flex;
  flex-direction: column;
  gap: 0.6cqw;
  font-size: 2.3cqw;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--paper-2);
  text-align: left;
}
.bell__status {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin-top: clamp(28px, 4vw, 48px);
  font-family: var(--f-mono);
  font-size: clamp(14px, 1.2vw, 17px);
  letter-spacing: 0.08em;
}
.bell__state { font-weight: 500; letter-spacing: 0.14em; }
.bell__sep { color: var(--paper-3); }
.bell__count { color: var(--paper-2); }
.bell__date {
  margin-top: 8px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-3);
}
.bell__line { max-width: 17em; margin-top: clamp(56px, 7vw, 96px); }

/* ---------- 3. Night Mood ---------- */
.night__head { margin-bottom: clamp(40px, 5vw, 72px); }
.night__title { max-width: 16em; }
.live__dot {
  flex: none;
  width: 9px;
  height: 11px;
  background: var(--concrete-3);
  transition: background-color 0.4s;
}
.live.is-live .live__dot { background: var(--light); }
.live::before { display: none; }
.live__asof { color: var(--paper-3); }
.live__asof::before { content: '·'; margin-right: 12px; }

.night__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 104px);
  align-items: start;
}
@media (max-width: 900px) { .night__grid { grid-template-columns: 1fr; } }

.tower { position: relative; max-width: 520px; margin: 0 auto; }
.tower__crown { width: 100%; height: auto; margin-bottom: -2px; }
.tower__body {
  position: relative;
  padding: clamp(18px, 2.6vw, 34px) clamp(18px, 2.6vw, 34px) clamp(22px, 3vw, 40px);
  isolation: isolate;
}
.tower__body::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--concrete);
  -webkit-mask: url(../img/rough-plate.svg) 0 0 / 100% 100% no-repeat;
  mask: url(../img/rough-plate.svg) 0 0 / 100% 100% no-repeat;
}
.tower__base {
  height: clamp(14px, 1.6vw, 20px);
  margin: 0 -3%;
  background: var(--concrete-3);
  -webkit-mask: url(../img/rough-btn.svg) 0 0 / 100% 100% no-repeat;
  mask: url(../img/rough-btn.svg) 0 0 / 100% 100% no-repeat;
}
.facade {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 26px) clamp(12px, 2.2vw, 28px);
}
@media (max-width: 640px) { .facade { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.win {
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.win::before, .win::after {
  content: '';
  position: absolute;
  inset: 0;
  -webkit-mask: url(../img/rough-win.svg) 0 0 / 100% 100% no-repeat;
  mask: url(../img/rough-win.svg) 0 0 / 100% 100% no-repeat;
}
.win::before { background: var(--ink); transition: background-color 0.2s; }
.win::after { background: var(--light); opacity: 0; transition: opacity 0.4s ease; }
.win.is-lit::after { opacity: 1; }
.win[data-t]:hover::before, .win.is-active::before { background: #050505; }
.win.is-lit:hover::after, .win.is-lit.is-active::after { opacity: 0.86; }
.win:not([data-t]) { cursor: default; }
.win:focus-visible { outline-offset: 2px; }

.tip {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px 11px;
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  color: var(--paper);
  pointer-events: none;
  isolation: isolate;
  translate: -50% calc(-100% - 10px);
}
.tip::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  -webkit-mask: url(../img/rough-btn.svg) 0 0 / 100% 100% no-repeat;
  mask: url(../img/rough-btn.svg) 0 0 / 100% 100% no-repeat;
}
.tip__t { font-family: var(--f-sans); font-weight: 600; letter-spacing: 0.06em; font-size: 15px; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--paper-2); }

.mood { margin-top: clamp(28px, 3.4vw, 44px); text-align: center; min-height: 7.5em; }
.mood__word {
  font-weight: 600;
  font-size: clamp(42px, 5.4vw, 84px);
  line-height: 0.96;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mood__count, .mood__quiet {
  margin-top: 12px;
  font-family: var(--f-mono);
  font-size: clamp(14px, 1.1vw, 16px);
  letter-spacing: 0.06em;
  color: var(--paper-2);
}
.mood__quiet { margin-top: 0; font-family: var(--f-sans); font-size: clamp(20px, 2vw, 28px); letter-spacing: 0.02em; color: var(--paper); }

.movers { padding-top: clamp(0px, 2vw, 24px); }
.movers__list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.movers__list li {
  display: grid;
  grid-template-columns: 2.2em minmax(0, 1fr) auto 6.4em;
  align-items: baseline;
  gap: 14px;
  padding: 18px 0 17px;
  border-top: 1px solid var(--rule);
}
.mv__n { font-family: var(--f-mono); font-size: 12.5px; color: var(--paper-3); }
.mv__t { font-weight: 600; font-size: clamp(19px, 1.6vw, 24px); letter-spacing: 0.05em; line-height: 1; overflow: hidden; text-overflow: ellipsis; }
.mv__p { font-family: var(--f-mono); font-size: 13.5px; color: var(--paper-3); font-variant-numeric: tabular-nums; }
.mv__c { font-family: var(--f-mono); font-size: clamp(15px, 1.2vw, 17px); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.movers.is-empty { display: none; }

/* ---------- 4. The Shift ---------- */
.shift__title { margin-bottom: clamp(48px, 7vw, 112px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(72px, 12vw, 168px); }
.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.step:nth-child(even) .step__text { order: 2; }
.step__time {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: clamp(44px, 6.4vw, 104px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.step__line { max-width: 13em; margin-top: clamp(18px, 2.4vw, 32px); }
.step__art { margin: 0; position: relative; isolation: isolate; }
.step__art svg {
  width: 100%;
  height: auto;
  -webkit-mask: url(../img/rough-plate.svg) 0 0 / 100% 100% no-repeat;
  mask: url(../img/rough-plate.svg) 0 0 / 100% 100% no-repeat;
}
.step .lamp-on { opacity: 0; transition: opacity 0.7s var(--ease); }
.step.is-lit .lamp-on { opacity: 1; }
@media (max-width: 760px) {
  .step { grid-template-columns: 1fr; }
  .step:nth-child(even) .step__text { order: 0; }
}

/* ---------- Футер ---------- */
.foot__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 3vw, 36px);
  padding-block: clamp(96px, 12vw, 176px) clamp(64px, 8vw, 112px);
  text-align: center;
}
.foot__mark { width: 64px; height: 64px; }
.foot__line { font-size: clamp(44px, 7vw, 112px); }
.foot__x {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper-2);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--paper-3);
  transition: color 0.2s, border-color 0.2s;
}
.foot__x:hover { color: var(--paper); border-color: var(--paper); }

/* ---------- Меньше движения ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn::before, .btn::after { transition: none; }
  .btn:hover::before, .btn:hover::after, .btn:active::before { transform: none; }
}
