/* Ordanio для строительства · одна светлая тема. */
:root {
  --page: #f7f7f7;
  --card: #ffffff;
  --ink: #0a0a09;
  --mute: #61615b;
  --line: #e0e0e0;
  --tile: #f0f0f0;
  --success: #166534;
  --font-display: Onest, system-ui, sans-serif;
  --font-body: "Inter Tight", system-ui, sans-serif;
  --gutter: 16px;
  --top: 60px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 8px); background: var(--card); }
body {
  margin: 0; background: var(--card); color: var(--ink);
  font: 400 16.5px/1.55 var(--font-body);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.13; margin: 0; text-wrap: balance;
}
p { margin: 0; }
h1, h2, h3, p, a, li { overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, .lane:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Шапка */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20; height: var(--top);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 var(--gutter); background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 700 20px/1 var(--font-display); letter-spacing: -1px; text-decoration: none; white-space: nowrap;
}
.top-nav { display: flex; gap: 0; font-size: 15px; }
.top-nav a:not(:last-child) { display: none; }
.top-nav a { text-decoration: none; }
.top-nav a:hover { color: var(--mute); }
.top-nav a:last-child {
  display: inline-flex; align-items: center; min-height: 44px;
  border: 1px solid var(--line); padding: 0 18px; border-radius: 99px; font-size: 16px;
}

/* Общие элементы и текст истории */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase;
  color: var(--mute); margin-bottom: 14px;
}
.num {
  display: inline-grid; place-items: center; flex-shrink: 0;
  min-width: 30px; height: 22px; padding: 0 8px; white-space: nowrap;
  border-radius: 99px; background: var(--ink); color: var(--card);
  font-size: 11px; letter-spacing: .04em;
}
.wrap { max-width: 1192px; margin: 0 auto; padding: 0 var(--gutter); }
.story { position: relative; }
.stage { display: none; }
.steps { position: relative; z-index: 1; min-width: 0; padding-top: var(--top); }
.scene { padding: 8px 0 20px; min-width: 0; }
.scene + .scene { border-top: 1px solid var(--line); }
.step { min-width: 0; padding: 28px var(--gutter) 12px; }
.step-card { width: 100%; min-width: 0; }
.step-card h1 { font-size: 32px; line-height: 1.05; letter-spacing: -.05em; margin-bottom: 14px; }
.step-card h2 { font-size: 28px; line-height: 1.1; letter-spacing: -.045em; margin-bottom: 12px; }
.step-card h3 { font-size: 21px; line-height: 1.2; margin-bottom: 8px; }
.step-card h2 + h3 { margin-top: 14px; }
.step-card p { color: var(--mute); font-size: 17px; line-height: 1.55; }
.step-card p + p { margin-top: 10px; }
.step-card .lead { color: var(--ink); }
.note { color: var(--mute); font-size: 14px; line-height: 1.5; }
.step-card .note { font-size: 16px; }
.scroll-hint { display: none; margin-top: 14px; font-size: 13px; color: var(--mute); align-items: center; gap: 8px; }
.scroll-hint::before { content: ""; width: 18px; height: 1px; background: currentColor; }

.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  max-width: 100%; min-height: 44px; padding: 12px 18px;
  border: 1px solid var(--ink); border-radius: 99px;
  background: var(--ink); color: var(--card); font-size: 15px; line-height: 1;
  text-decoration: none; text-align: center;
}
.btn::after { content: "\00a0↗"; flex-shrink: 0; white-space: pre; }
.btn:hover { background: #222; }
.btn-line { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-line:hover { background: transparent; border-color: var(--ink); }

/* Кадр в тексте; размеры сохраняются и без файла изображения. */
.shot {
  display: block; min-width: 0; margin: 22px 0 8px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px; background: var(--tile);
  box-shadow: 0 20px 40px -26px rgba(10, 10, 9, .35), 0 8px 20px -16px rgba(10, 10, 9, .25);
}
.shot::before {
  content: ""; display: block; height: 22px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 12px 10px, #bdbdb8 3px, transparent 3.5px),
    radial-gradient(circle at 24px 10px, #bdbdb8 3px, transparent 3.5px),
    radial-gradient(circle at 36px 10px, #bdbdb8 3px, transparent 3.5px), var(--card);
}
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--tile); }
img.is-missing { opacity: 0; }

/* Вторая часть */
.next { position: relative; z-index: 2; background: var(--page); padding: 64px 0 56px; border-top: 1px solid var(--line); }
.next-head { margin-bottom: 28px; }
.next h2, .start h2, .contact h2 { font-size: 36px; line-height: 1.09; letter-spacing: -.045em; }
.next-lead { max-width: 640px; margin-top: 18px; font-size: 17px; color: var(--mute); }
.tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tile {
  min-width: 0; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px;
}
.tile h3 { font-size: 21px; margin-bottom: 12px; }
.tile p { color: var(--mute); font-size: 15.5px; }
.tile .basis { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink); font-size: 14.5px; }
.tile > p:not(.basis) { margin-bottom: 16px; }
.basis span { display: block; margin-bottom: 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--mute); }
.basis a { text-decoration: underline; text-underline-offset: 3px; }

/* Как начать */
.start { position: relative; z-index: 2; background: var(--card); padding: 64px 0; }
.start-box { min-width: 0; }
.start-head { min-width: 0; }
.start-list { list-style: none; margin: 14px 0 12px; padding: 0; counter-reset: s; display: grid; gap: 12px; font-size: 16px; }
.start-list li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; }
.start-list li::before {
  content: counter(s); grid-row: span 2; width: 26px; height: 26px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--page); font: 600 13px/1 var(--font-display);
}
.start-list strong { font-weight: 600; font-family: var(--font-display); letter-spacing: -.015em; }
.start-list span { color: var(--mute); font-size: 16px; }
.start-box > .note { font-size: 15px; }
.start-box > .note + .note { margin-top: 8px; }

/* Контакт и подвал */
.contact { position: relative; z-index: 2; background: var(--card); padding: 8px 0 32px; }
.contact-box { background: var(--tile); padding: 40px var(--gutter); margin: 0 calc(var(--gutter) * -1); }
.contact-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.contact-list li {
  min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 6px 16px; border-radius: 16px; background: var(--card);
}
.contact-list span { color: var(--mute); font-size: 15px; flex-shrink: 0; }
.contact-list a {
  min-width: 0; display: inline-flex; align-items: center; min-height: 44px;
  font: 600 18px/1.2 var(--font-display); letter-spacing: -.02em; text-decoration: none; text-align: right;
}
.contact-list a:hover { text-decoration: underline; text-underline-offset: 5px; }
.foot { position: relative; z-index: 2; background: var(--card); padding: 0 0 calc(28px + env(safe-area-inset-bottom)); font-size: 15px; color: var(--mute); }
.foot .wrap > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.foot-credit { width: 100%; font-size: 14px; }

/* Ленты подшагов: высоту определяет содержимое. */
@media (max-width: 899px) {
  .lane-wrap { min-width: 0; margin: 18px 0 6px; scroll-margin-top: var(--top); }
  .lane {
    position: relative; display: flex; gap: 12px; align-items: flex-start; width: 100%;
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
    padding: 4px 16px 18px; scrollbar-width: none;
  }
  .lane::-webkit-scrollbar { display: none; }
  .lane::after { content: ""; flex: 0 0 4px; }
  .lane.is-hinting { scroll-snap-type: none; }
  .lane-card {
    flex: 0 0 calc(100vw - 56px); min-width: 0; scroll-snap-align: start;
    display: flex; flex-direction: column; padding: 16px 10px 10px;
    background: var(--card); border: 1px solid var(--line); border-radius: 22px;
    box-shadow: 0 14px 30px -24px rgba(10, 10, 9, .35);
  }
  .lane-card h3 { font-size: 20px; line-height: 1.2; margin: 0 6px 6px; }
  .lane-card p { font-size: 16px; line-height: 1.5; color: var(--mute); margin: 0 6px; }
  .lane-card p + p { margin-top: 10px; }
  .lane-card .shot { margin: 16px 0 0; }
  .lane-dots { display: flex; justify-content: center; margin-top: -8px; }
  .lane-dots button { width: 44px; height: 44px; border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; }
  .lane-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c9c9c4; transition: width .2s ease, background .2s ease; }
  .lane-dots button[aria-current="true"]::before { width: 22px; border-radius: 4px; background: var(--ink); }
}

@media (min-width: 700px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Компьютер: окно справа, рассказ слева. */
@media (min-width: 900px) {
  :root { --top: 72px; --gutter: 32px; }
  .wordmark { font-size: 21px; }
  .top-nav { align-items: center; gap: 30px; }
  .top-nav a:not(:last-child) { display: inline; }
  .top-nav a:last-child { padding: 9px 18px; font-size: 15px; }
  .story {
    display: grid; grid-template-columns: minmax(0, .68fr) minmax(0, 1fr);
    max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter); column-gap: 42px;
  }
  .steps { grid-column: 1; grid-row: 1; }
  .scene { padding: 0; }
  .scene + .scene { border: 0; }
  .stage {
    position: sticky; top: var(--top); z-index: 0; grid-column: 2; grid-row: 1; align-self: start;
    height: calc(100svh - var(--top)); min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    padding: calc(3vh + 18px) 4%; pointer-events: none;
  }
  .stage-tile { position: absolute; z-index: -1; inset: 3vh 0; border-radius: 32px; background: var(--tile); }
  .win {
    flex-shrink: 0; width: 100%; max-width: max(0px, calc((100svh - var(--top) - 6vh - 138px) * 1.6));
    overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
    box-shadow: 0 40px 80px -30px rgba(10, 10, 9, .35), 0 12px 30px -18px rgba(10, 10, 9, .25);
  }
  .win-bar { position: relative; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line); }
  .win-bar i { flex: 0 0 10px; height: 10px; border-radius: 50%; background: #c9c9c4; }
  .win-addr {
    position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 136px);
    padding: 3px 14px; border-radius: 99px; background: var(--page); color: var(--mute);
    font-size: 12.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .win-addr:empty { display: none; }
  .win-view { aspect-ratio: 16 / 10; overflow: hidden; background: var(--tile); }
  .win-img { width: 100%; height: 100%; object-fit: cover; transition: opacity 180ms ease; }
  .win-img.is-swapping { opacity: 0; }
  .stage-caption { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; font-size: 13px; line-height: 1.45; text-align: center; }
  .stage-caption-dot { flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--success); }
  .stage-caption-text { min-width: 0; }
  .step { min-height: 78svh; display: flex; align-items: center; padding: 8svh 0; }
  .step:first-child { min-height: calc(100svh - var(--top)); }
  .step-head, .step-part { min-height: 92svh; }
  .step-card { max-width: 540px; }
  .step-card h1 { font-size: clamp(44px, 5vw, 68px); line-height: 1.02; letter-spacing: -.055em; margin-bottom: 26px; }
  .step-card h2 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.07; margin-bottom: 18px; }
  .step-card h3 { font-size: 26px; margin-bottom: 12px; }
  .step-card p { font-size: 18px; line-height: 1.6; }
  .step-card .lead { font-size: 20px; line-height: 1.5; }
  .step-card .note { font-size: 14px; }
  .step-card .scroll-hint { display: flex; font-size: 13px; }
  .step:not(.step-head):not(.step-hero) .step-card { border-top: 1px solid var(--line); padding-top: 20px; }
  .step-card .shot { display: none; }
  .next { padding: 100px 0 88px; }
  .next h2, .start h2, .contact h2 { font-size: clamp(34px, 4vw, 52px); }
  .next-lead { font-size: 18px; }
  .tiles { gap: 16px; }
  .tile { padding: 26px; }
  .tile h3 { font-size: 23px; }
  .tile p { font-size: 16px; }
  .start { padding: 88px 0; }
  .start-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; row-gap: 16px; }
  .start-head { grid-row: span 3; }
  .start-list { margin: 0; font-size: 17px; }
  .start-list span { font-size: 16.5px; }
  .start-box > .note { grid-column: 2; font-size: 14px; }
  .start-box > .note + .note { margin-top: -6px; }
  .contact { padding: 0 0 72px; }
  .contact-box { border-radius: 24px; padding: 48px; margin: 0; }
  .contact-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .contact-list li { flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px; }
  .contact-list span { font-size: 14px; }
  .contact-list a { text-align: left; font-size: 21px; }
  .foot { font-size: 13px; }
  .foot-credit { font-size: 12px; }
}

@media (min-width: 1000px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .step-card h1 { font-size: 29px; }
  .step-card h2 { font-size: 25px; }
}

/* Без JS: все кадры остаются в тексте, включая широкие экраны. */
html:not(.js) .story { display: block; }
html:not(.js) .stage { display: none; }
html:not(.js) .step { min-height: 0; display: block; padding-top: 28px; padding-bottom: 28px; }
html:not(.js) .step-card { max-width: 900px; margin: 0 auto; }
html:not(.js) .shot { display: block; }
html:not(.js) .scroll-hint { display: none; }

@media (prefers-reduced-motion: reduce) {
  .win-img, .lane-dots button::before { transition: none; }
}
