/* Страница «История ремонта» (ar-story.css).
   Четвёртый формат рядом со статьёй (ar-article), услугой (ar-service) и «О компании» (ar-about).
   Концепция: kontekst/istorii-remontov/00-kontseptsiya.md — обложка, паспорт объекта,
   видео VK с пояснениями, лента решений, инфографика, честный блок, результат, отзыв, CTA. */

/* === Обложка === */
.ar-story-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    background: var(--ar-black);
    color: #fff;
    min-height: 560px;
}
.ar-story-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(40px, 5vw, 70px) clamp(20px, 4vw, 60px) clamp(40px, 5vw, 70px) max(20px, calc((100vw - var(--ar-max)) / 2 + 20px));
}
.ar-story-crumbs {
    font-size: 12.5px;
    color: #9a9a9a;
    margin-bottom: 20px;
}
.ar-story-crumbs a { color: var(--ar-yellow); text-decoration: none; }
.ar-story-tag {
    display: inline-block;
    align-self: flex-start;
    padding: 7px 13px;
    border-radius: 6px;
    background: var(--ar-yellow);
    color: #080808;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ar-story-hero h1 {
    font-family: "Oswald Local", "Arial Narrow", Arial, sans-serif !important;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
    font-size: clamp(34px, 4.6vw, 58px);
    color: #fff;
    margin: 20px 0 18px;
}
.ar-story-hero .ar-story-lead {
    font-size: clamp(16.5px, 1.6vw, 20px);
    line-height: 1.5;
    color: #e4e4e4;
    margin: 0 0 26px;
}
.ar-story-hero .ar-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ar-story-hero .ar-btn {
    display: inline-block;
    padding: 15px 26px;
    border: 2px solid var(--ar-yellow);
    border-radius: 8px;
    background: var(--ar-yellow);
    color: #080808 !important;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none !important;
}
.ar-story-hero .ar-btn-outline { background: transparent; color: #fff !important; border-color: #666; }

/* Медиа-половина обложки: фото объекта */
.ar-story-hero-media { position: relative; min-height: 320px; }
.ar-story-hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Жёлтая вертикальная метка на стыке */
.ar-story-hero-mark {
    position: absolute;
    left: 0;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -50%) rotate(180deg);
    writing-mode: vertical-rl;
    padding: 14px 8px;
    background: var(--ar-yellow);
    color: #080808;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
    border-radius: 0 6px 6px 0;
}

/* Обложка без фото: типографика + крупный адрес водяным знаком */
.ar-story-hero--text { grid-template-columns: 1fr; }
.ar-story-hero--text .ar-story-hero-copy {
    position: relative;
    max-width: 900px;
    margin-inline: auto;
    padding-inline: 20px;
    text-align: left;
}
.ar-story-hero--text:after {
    content: attr(data-watermark);
    position: absolute;
    right: 0;
    bottom: -18px;
    font: 600 clamp(90px, 16vw, 220px)/1 "Oswald Local", sans-serif;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 196, 0, .22);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}

/* === Паспорт объекта === */
.ar-story-passport {
    background: #fff;
    border-bottom: 1px solid var(--ar-line);
    padding: clamp(26px, 3.4vw, 44px) 0;
}
.ar-story-passport-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 0;
    padding: 0;
}
.ar-story-passport-list > div {
    padding: 18px;
    border: 1px solid var(--ar-line);
    border-radius: 12px;
    background: var(--ar-paper);
}
.ar-story-passport-list dt {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ar-muted);
}
.ar-story-passport-list dt:before {
    content: "";
    display: block;
    width: 22px;
    height: 4px;
    margin-bottom: 10px;
    border-radius: 2px;
    background: var(--ar-yellow);
}
.ar-story-passport-list dd { margin: 0; font-size: 14.5px; line-height: 1.45; font-weight: 600; }

/* Блок «Кому полезна эта история» (вариант 2: идентификация читателя сразу под обложкой) */
.ar-story-forwho {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    align-items: start;
    margin-bottom: 16px;
    padding: 24px 28px;
    background: var(--ar-yellow);
    border-radius: var(--ar-radius);
}
.ar-story-forwho b {
    font-family: "Oswald Local", "Arial Narrow", Arial, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 21px;
    line-height: 1.1;
    color: #080808;
}
.ar-story-forwho p {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.55;
    color: #161616;
}
@media (max-width: 860px) {
    .ar-story-forwho { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
}

/* === Контентные секции === */
.ar-story-section { padding: clamp(40px, 5.4vw, 70px) 0; }
.ar-story-section--white { background: #fff; }
.ar-story-section > .ar-wrap > h2,
.ar-story-section h2.ar-story-h2 {
    font-family: "Oswald Local", "Arial Narrow", Arial, sans-serif !important;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.05;
    font-size: clamp(27px, 3.6vw, 42px);
    margin: 0 0 20px;
    color: var(--ar-black);
}
.ar-story-section p {
    font-size: 17.5px;
    line-height: 1.7;
    color: #1c1c1c;
    margin: 0 0 20px;
    max-width: 880px;
}
.ar-story-section .ar-story-kicker {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--ar-black);
    color: var(--ar-yellow);
    font-size: 11.5px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* Цитата-врезка — как в статьях */
.ar-story-pullquote {
    margin: 30px 0 0;
    padding: 24px 28px;
    border-left: 6px solid var(--ar-yellow);
    background: #fff;
    border-radius: 0 var(--ar-radius) var(--ar-radius) 0;
    font: italic 20px/1.45 Georgia, serif;
    color: #111;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .06);
    max-width: 880px;
}
.ar-story-section--white .ar-story-pullquote { background: var(--ar-paper); }

/* === Видео VK с пояснением === */
.ar-story-video {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: clamp(22px, 3.4vw, 44px);
    align-items: center;
    margin-top: 30px;
}
.ar-story-video--flip { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
.ar-story-video--flip .ar-story-player { order: 2; }
.ar-story-player {
    position: relative;
    aspect-ratio: 9/16;
    border: 2px solid #111;
    border-radius: 18px;
    background: #050505;
    overflow: hidden;
    box-shadow: 12px 12px 0 var(--ar-yellow);
}
.ar-story-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #050505;
}
.ar-story-video-note h3 {
    font-family: "Oswald Local", "Arial Narrow", Arial, sans-serif !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: clamp(20px, 2.4vw, 27px);
    line-height: 1.1;
    margin: 0 0 12px;
}
.ar-story-video-note p { margin-bottom: 14px; }
.ar-story-vk-link {
    display: inline-block;
    font-size: 13.5px;
    font-weight: 700;
    color: #1c1c1c !important;
    text-decoration: underline !important;
    text-decoration-color: var(--ar-yellow) !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px;
}
.ar-story-vk-link:hover { background: var(--ar-yellow); }

/* === Инфографика: цепочка этапов === */
.ar-story-scheme {
    margin-top: 34px;
    padding: clamp(24px, 3.4vw, 40px);
    background: #fff;
    border: 1px solid var(--ar-line);
    border-radius: var(--ar-radius);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .06);
}
.ar-story-scheme-title {
    font-family: "Oswald Local", "Arial Narrow", Arial, sans-serif !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: clamp(19px, 2.2vw, 24px);
    margin: 0 0 22px;
}
.ar-story-track { margin-bottom: 22px; }
.ar-story-track:last-child { margin-bottom: 0; }
.ar-story-track-label {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--ar-black);
    color: var(--ar-yellow);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ar-story-steps {
    display: flex;
    align-items: stretch;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step;
}
.ar-story-steps li {
    position: relative;
    flex: 1 1 0;
    padding: 0 10px;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.35;
    font-weight: 600;
    color: #1c1c1c;
    counter-increment: step;
}
.ar-story-steps li:before {
    content: counter(step, decimal-leading-zero);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border: 3px solid var(--ar-black);
    border-radius: 50%;
    background: var(--ar-yellow);
    font: 600 16px/1 "Oswald Local", sans-serif;
    position: relative;
    z-index: 2;
}
.ar-story-steps li:after {
    content: "";
    position: absolute;
    top: 21px;
    left: calc(-50% + 26px);
    right: calc(50% + 26px);
    height: 3px;
    background: var(--ar-black);
}
.ar-story-steps li:first-child:after { display: none; }

/* === Честный блок «не по плану» (чёрный) === */
.ar-story-honest {
    background: var(--ar-black);
    color: #fff;
    padding: clamp(40px, 5.4vw, 70px) 0;
    position: relative;
    overflow: hidden;
}
.ar-story-honest:after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 140px;
    background: radial-gradient(ellipse at 75% 100%, rgba(255, 196, 0, .18), transparent 65%);
    pointer-events: none;
}
.ar-story-honest .ar-story-kicker { background: var(--ar-yellow); color: #080808; }
.ar-story-honest h2 {
    font-family: "Oswald Local", "Arial Narrow", Arial, sans-serif !important;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.05;
    font-size: clamp(27px, 3.6vw, 42px);
    color: #fff;
    margin: 0 0 18px;
}
.ar-story-honest p { color: #ddd; font-size: 17px; line-height: 1.65; max-width: 880px; }
.ar-story-honest-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(26px, 4vw, 54px);
    align-items: center;
    position: relative;
    z-index: 2;
}
.ar-story-honest-quote {
    margin: 0;
    padding-left: 24px;
    border-left: 5px solid var(--ar-yellow);
    font: italic clamp(19px, 2.2vw, 24px)/1.45 Georgia, serif;
    color: #fff;
}

/* Шкала сроков: жёлтые = работы компании, серые = ожидание */
.ar-story-timeline { margin-top: 26px; position: relative; z-index: 2; }
.ar-story-timeline-bar {
    display: flex;
    height: 54px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
}
.ar-story-timeline-bar span {
    display: grid;
    place-items: center;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
}
.ar-story-timeline-bar .is-work { background: var(--ar-yellow); color: #080808; }
.ar-story-timeline-bar .is-wait { background: #262626; color: #bdbdbd; }
.ar-story-timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 14px;
    font-size: 13px;
    color: #bdbdbd;
}
.ar-story-timeline-legend i {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 7px;
    border-radius: 3px;
    vertical-align: -1px;
    font-style: normal;
}
.ar-story-timeline-legend .is-work i { background: var(--ar-yellow); }
.ar-story-timeline-legend .is-wait i { background: #3a3a3a; }

/* Шкала этапов с паузами (чипсы со стрелками) */
.ar-story-pace {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.ar-story-pace li {
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: center;
}
.ar-story-pace li.is-work { background: var(--ar-yellow); color: #080808; }
.ar-story-pace li.is-wait { background: transparent; color: #9a9a9a; border: 1px dashed #555; }
.ar-story-pace li:not(:last-child):after { content: ""; }

/* === Карточка решения: Проблема / Что сделали / Почему так === */
.ar-story-solution {
    margin-top: 30px;
    background: #fff;
    border: 1px solid var(--ar-line);
    border-radius: var(--ar-radius);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .06);
    overflow: hidden;
    max-width: 880px;
}
.ar-story-solution > div {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 18px;
    padding: 20px 26px;
}
.ar-story-solution > div:not(:last-child) { border-bottom: 1px solid var(--ar-line); }
.ar-story-solution b {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ar-muted);
}
.ar-story-solution b:before {
    content: "";
    display: block;
    width: 22px;
    height: 4px;
    margin-bottom: 8px;
    border-radius: 2px;
    background: var(--ar-yellow);
}
.ar-story-solution p { margin: 0; font-size: 16px; max-width: none; }

/* === Мини-карточки фактов (по маякам / под правило / принцип) === */
.ar-story-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 30px;
    list-style: none;
    padding: 0;
}
.ar-story-facts li {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--ar-line);
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
}
.ar-story-facts b {
    display: block;
    margin-bottom: 10px;
    font-family: "Oswald Local", "Arial Narrow", Arial, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 17px;
    line-height: 1.15;
}
.ar-story-facts b:before {
    content: "";
    display: block;
    width: 26px;
    height: 5px;
    margin-bottom: 12px;
    border-radius: 3px;
    background: var(--ar-yellow);
}

/* === Результат: список выполненного === */
.ar-story-done {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 26px;
    max-width: 880px;
}
.ar-story-done li {
    position: relative;
    padding: 12px 16px 12px 46px;
    background: #fff;
    border: 1px solid var(--ar-line);
    border-radius: 10px;
    font-size: 15.5px;
    line-height: 1.5;
}
.ar-story-done li:before {
    content: "✓";
    position: absolute;
    left: 14px;
    top: 11px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ar-yellow);
    color: #080808;
    font-size: 13px;
    font-weight: 900;
}

/* Галерея результата поверх общей мозаики сайта */
.ar-story-gallery .ar-gallery-mosaic { margin-top: 26px; }
.ar-story-gallery .ar-gallery-mosaic figure { border-color: var(--ar-line); background: #eceae4; }

/* === Отзыв заказчика === */
.ar-story-review-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: clamp(22px, 3.4vw, 44px);
    align-items: center;
    margin-top: 30px;
}
.ar-story-theses {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ar-story-theses li {
    position: relative;
    padding: 14px 18px 14px 46px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid var(--ar-line);
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.5;
}
.ar-story-theses li:before {
    content: "";
    position: absolute;
    left: 18px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ar-yellow);
    border: 3px solid var(--ar-black);
}
.ar-story-theses li.is-minor { background: #f3f1eb; border-style: dashed; }
.ar-story-theses li.is-minor:before { background: #fff; }

/* Заглушка «видео на монтаже» */
.ar-story-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    aspect-ratio: 9/16;
    padding: 26px;
    border: 2px dashed #b9b4a4;
    border-radius: 18px;
    background: #efede6;
    text-align: center;
}
.ar-story-placeholder i {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--ar-black);
    color: var(--ar-yellow);
    font-size: 26px;
    font-style: normal;
}
.ar-story-placeholder b {
    font-family: "Oswald Local", "Arial Narrow", Arial, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 20px;
    line-height: 1.15;
}
.ar-story-placeholder span { font-size: 13.5px; color: var(--ar-muted); line-height: 1.5; }

/* Подпись-статус под видео */
.ar-story-status {
    margin-top: 12px;
    font-size: 13px;
    color: var(--ar-muted);
}

/* === Другие истории === */
.ar-story-more { background: var(--ar-black); color: #fff; }
.ar-story-more h2 {
    font-family: "Oswald Local", "Arial Narrow", Arial, sans-serif !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: clamp(26px, 3.4vw, 40px);
    color: #fff;
    margin: 0 0 26px;
}
.ar-story-more-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.ar-story-more-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 320px;
    padding: 26px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #2c2c2c;
    color: #fff !important;
    text-decoration: none !important;
    background: #111;
}
.ar-story-more-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.55);
    transition: transform .3s ease;
}
.ar-story-more-card:hover img { transform: scale(1.03); }
.ar-story-more-card > * { position: relative; z-index: 2; }
.ar-story-more-card .ar-story-tag { align-self: flex-start; margin-bottom: 14px; }
.ar-story-more-card b {
    font-family: "Oswald Local", "Arial Narrow", Arial, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: clamp(21px, 2.4vw, 28px);
    line-height: 1.08;
}
.ar-story-more-card span { display: block; margin-top: 10px; font-size: 14px; color: #d6d6d6; }
.ar-story-more-card em {
    display: inline-block;
    margin-top: 16px;
    font-style: normal;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ar-yellow);
}
.ar-story-more-card--empty {
    border: 1px dashed #4a4a4a;
    background: transparent;
    align-items: flex-start;
    justify-content: center;
}
.ar-story-more-card--empty b { color: #8a8a8a; }
.ar-story-more-card--empty span { color: #6f6f6f; }

/* === Мобильная адаптация === */
@media (max-width: 1080px) {
    .ar-story-passport-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
    .ar-story-hero { grid-template-columns: 1fr; min-height: 0; }
    .ar-story-hero-copy { padding: clamp(30px, 7vw, 46px) 20px; }
    .ar-story-hero-media { min-height: 300px; order: 2; }
    .ar-story-hero-mark {
        left: 20px;
        top: 0;
        transform: translateY(-50%);
        writing-mode: horizontal-tb;
        border-radius: 6px;
    }
    .ar-story-video,
    .ar-story-video--flip,
    .ar-story-review-grid { grid-template-columns: 1fr; }
    .ar-story-video--flip .ar-story-player { order: 0; }
    .ar-story-player { max-width: 400px; margin-inline: auto; width: 100%; }
    .ar-story-honest-grid { grid-template-columns: 1fr; }
    .ar-story-facts { grid-template-columns: 1fr; }
    .ar-story-more-grid { grid-template-columns: 1fr; }
    .ar-story-steps { flex-direction: column; gap: 0; }
    .ar-story-steps li {
        display: grid;
        grid-template-columns: 44px 1fr;
        gap: 14px;
        align-items: center;
        text-align: left;
        padding: 12px 0;
    }
    .ar-story-steps li:before { margin: 0; grid-row: 1; }
    .ar-story-steps li:after {
        top: auto;
        bottom: -6px;
        left: 21px;
        right: auto;
        width: 3px;
        height: 14px;
    }
    .ar-story-timeline-bar { flex-direction: column; height: auto; }
    .ar-story-timeline-bar span { padding: 12px; width: 100% !important; box-sizing: border-box; }
    .ar-story-hero--text:after { content: none; }
    .ar-story-solution > div { grid-template-columns: 1fr; gap: 8px; }
    .ar-story-done { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .ar-story-passport-list { grid-template-columns: 1fr 1fr; }
    .ar-story-hero .ar-actions { flex-direction: column; }
    .ar-story-hero .ar-btn { width: 100%; text-align: center; box-sizing: border-box; }
}
