/*
Theme Name: Иван Сацкий — жизнь на флоте
Theme URI: https://lotovo.ru/
Author: КАПИТАН WEB
Description: Жизнь на речном флоте, биография и семейный архив Ивана Сацкого.
Version: 1.4.0
Requires at least: 6.3
Requires PHP: 8.2
License: GPL-2.0-or-later
Text Domain: satsky-memory
*/

:root {
    --paper: #f6f3ed;
    --white: #fffdf9;
    --ink: #18333c;
    --muted: #52656b;
    --gold: #8c6a3b;
    --line: #d9d5ca;
    --radius: 6px;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.7;
}
body > main {
    flex: 1 0 auto;
}
body.dialog-open {
    overflow: hidden;
}
a {
    color: inherit;
}
button, input, textarea {
    font: inherit;
}
button, a {
    -webkit-tap-highlight-color: transparent;
}
button {
    color: inherit;
    cursor: pointer;
}
img {
    display: block;
    max-width: 100%;
    height: auto;
}
figure {
    margin: 0;
}
h1, h2, h3, p {
    margin-top: 0;
}
h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.16;
}
h2 {
    font-size: clamp(32px, 4vw, 46px);
    margin-bottom: 28px;
}
h3 {
    font-size: 25px;
}
button:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 3px solid #aa7835;
    outline-offset: 5px;
}
[hidden] {
    display: none !important;
}
.wrap {
    width: min(1160px, calc(100% - 80px));
    margin-inline: auto;
}
.sr-only, .skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip-link:focus {
    position: fixed;
    z-index: 1000;
    left: 20px;
    top: 15px;
    padding: 12px 18px;
    background: white;
}
.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}
.header-inner {
    min-height: 90px;
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    line-height: 1.2;
}
.site-brand__icon {
    width: 44px;
    height: 44px;
}
.site-brand__name {
    display: block;
    font-family: var(--serif);
    font-size: 22px;
}
.navigation {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 26px;
}
.navigation a {
    font-size: 13px;
    text-decoration: none;
    padding-block: 12px;
}
.navigation a:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
}
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    padding: 10px 15px;
    border-radius: var(--radius);
}
.hero {
    display: grid;
    grid-template-columns: 1fr .88fr;
    align-items: center;
    gap: 74px;
    padding-block: 68px 76px;
}
.eyebrow {
    color: var(--gold);
    letter-spacing: .17em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 25px;
}
.hero h1 {
    font-size: clamp(44px, 5.1vw, 68px);
    letter-spacing: -.035em;
    margin-bottom: 23px;
    max-width: 8.8em;
    overflow-wrap: break-word;
}
.hero__headline {
    font-family: var(--serif);
    font-size: clamp(27px, 2.3vw, 33px);
    line-height: 1.35;
    max-width: 24ch;
    margin-bottom: 22px;
}
.hero__role {
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-line;
    color: var(--muted);
    margin-bottom: 17px;
}
.life-dates {
    font-size: 12px;
    letter-spacing: .03em;
    color: var(--muted);
    margin-bottom: 24px;
}
.hero__intro {
    color: var(--muted);
    max-width: 43ch;
    font-size: 15px;
}
.hero__links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    margin-top: 35px;
}
.text-link {
    text-underline-offset: 7px;
    text-decoration-thickness: 1px;
    font-size: 13px;
}
.hero__portrait {
    position: relative;
}
.hero__portrait img {
    width: 100%;
    height: auto;
    box-shadow: 0 18px 38px #18333c1a;
    border: 7px solid var(--white);
}
.hero__portrait figcaption {
    margin-top: 16px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.65;
    padding-inline: 4px;
}
.section {
    padding-block: 85px;
    border-top: 1px solid var(--line);
}
.section__heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 25px;
    margin-bottom: 34px;
}
.section__heading h2 {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    hyphens: auto;
}
.section__number {
    flex-shrink: 0;
    font-size: 11px;
    letter-spacing: .18em;
    color: var(--gold);
}
.section__intro {
    max-width: 76ch;
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 34px;
    white-space: pre-line;
}
.biography-grid {
    display: grid;
    grid-template-columns: .5fr 1fr;
    gap: 72px;
}
.biography__label {
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1.45;
}
.entry-content {
    font-size: 16px;
}
.entry-content p {
    margin-bottom: 22px;
}
.entry-content h2, .entry-content h3 {
    margin-top: 38px;
}
.entry-content li {
    margin-bottom: 7px;
}
.entry-content > :last-child {
    margin-bottom: 0;
}
.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 68px;
}
.timeline__item {
    break-inside: avoid;
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 19px;
    padding-block: 0 31px;
}
.timeline__date {
    color: var(--gold);
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1.3;
    padding-top: 3px;
}
.timeline__body {
    border-left: 1px solid var(--line);
    padding-left: 21px;
    position: relative;
}
.timeline__body::before {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    left: -4px;
    top: 12px;
}
.timeline h3 {
    font-size: 22px;
    margin-bottom: 8px;
}
.timeline__body p {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 0;
}
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}
.archive-card {
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.archive-card__link {
    display: block;
    text-decoration: none;
    transition: background .15s;
}
.archive-card__link:hover {
    background: #eee9de;
}
.archive-card__image {
    height: 240px;
    width: 100%;
    object-fit: contain;
    background: #e9e5db;
    padding: 14px;
}
.archive-card__body {
    padding: 23px;
}
.archive-card__date {
    font-size: 10px;
    color: var(--gold);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 11px;
}
.archive-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
}
.archive-card__excerpt {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 18px;
}
.archive-card__open {
    font-size: 11px;
    text-decoration: underline;
    text-underline-offset: 5px;
}
.press-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}
.press-grid .archive-card__image {
    height: 340px;
}
.record-details {
    border-top: 1px solid var(--line);
    padding: 16px 23px;
    font-size: 13px;
}
.record-details summary {
    cursor: pointer;
    min-height: 26px;
    font-size: 12px;
}
.record-details__content {
    padding-top: 15px;
    color: var(--muted);
}
.record-details__content > :last-child {
    margin-bottom: 0;
}
.additional-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 14px;
}
.archive-card__views {
    border-top: 1px solid var(--line);
    padding: 16px 23px;
}
.archive-card__views-label {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}
.additional-images a {
    width: 80px;
    min-width: 0;
    font-size: 10px;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.additional-images span {
    display: block;
    margin-top: 7px;
}
.additional-images img {
    width: 80px;
    height: 85px;
    object-fit: contain;
    background: #e9e5db;
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}
.photo-grid .archive-card__image {
    height: 330px;
    padding: 8px;
}
.closing {
    padding-block: 66px 77px;
    text-align: center;
}
.closing__line {
    width: 50px;
    height: 1px;
    background: var(--gold);
    margin: 0 auto 27px;
}
.closing__text {
    font-family: var(--serif);
    font-size: clamp(25px, 3vw, 34px);
    max-width: 26ch;
    margin: 0 auto;
    line-height: 1.5;
}
.site-footer {
    background: var(--ink);
    color: #fffdf9;
    padding-block: 34px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}
.footer-name {
    font-family: var(--serif);
    font-size: 22px;
    margin: 0 0 7px;
}
.footer-note {
    font-size: 11px;
    color: #d3d9d8;
    max-width: 60ch;
    margin: 0;
}
.site-footer .kw-credit {
    flex-shrink: 1;
    min-width: 0;
}
.site-footer .kw-credit__link {
    color: white;
}
.lightbox {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    width: min(1120px, 96vw);
    max-height: 95vh;
    padding: 20px;
}
.lightbox::backdrop {
    background: #101d22e8;
}
.lightbox__header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
}
.lightbox__title {
    margin: 0;
    font-size: 19px;
    font-family: var(--serif);
}
.lightbox button {
    background: transparent;
    border: 1px solid var(--line);
    padding: 10px 15px;
    border-radius: var(--radius);
    min-height: 44px;
}
.lightbox__image {
    max-height: 71vh;
    max-width: 100%;
    width: auto;
    margin-inline: auto;
    object-fit: contain;
}
.lightbox__footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 20px;
    font-size: 12px;
}
.lightbox__controls {
    display: flex;
    gap: 10px;
}
.simple-page {
    padding-block: 70px;
    min-height: 65vh;
    max-width: 850px;
}
.simple-page h1 {
    font-size: clamp(38px, 5vw, 60px);
}

@media (max-width: 1000px) {
    .wrap {
        width: min(1160px, calc(100% - 48px));
    }
    .hero {
        gap: 40px;
    }
    .navigation {
        gap: 18px;
    }
    .biography-grid {
        gap: 40px;
    }
    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    html {
        scroll-padding-top: 25px;
    }
    .wrap {
        width: calc(100% - 36px);
    }
    .header-inner {
        min-height: 78px;
        flex-wrap: wrap;
        gap: 0;
        padding-block: 16px;
    }
    .site-brand__name {
        font-size: 18px;
    }
    .site-brand__icon {
        width: 38px;
        height: 38px;
    }
    .menu-toggle {
        display: block;
        font-size: 12px;
    }
    .navigation {
        width: 100%;
        gap: 5px 24px;
        padding-top: 20px;
    }
    .js .navigation:not(.is-open) {
        display: none;
    }
    .hero {
        grid-template-columns: 1fr;
        padding-block: 34px 45px;
        gap: 28px;
    }
    .hero .eyebrow {
        margin-bottom: 18px;
    }
    .hero h1 {
        font-size: clamp(43px, 12vw, 66px);
        max-width: 9em;
        margin-bottom: 18px;
    }
    .hero__headline {
        font-size: 27px;
        max-width: 24ch;
        margin-bottom: 16px;
    }
    .hero__role {
        font-size: 14px;
        margin-bottom: 12px;
    }
    .life-dates {
        font-size: 11px;
        margin-bottom: 18px;
    }
    .hero__intro {
        max-width: none;
    }
    .hero__links {
        margin-top: 25px;
    }
    .hero__portrait {
        width: min(100%, 480px);
        margin-inline: auto;
    }
    .hero__portrait figcaption {
        font-size: 11px;
    }
    .section {
        padding-block: 50px;
    }
    .section__heading {
        margin-bottom: 28px;
    }
    .biography-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .biography__label {
        font-size: 22px;
    }
    .entry-content {
        font-size: 15px;
    }
    .timeline {
        columns: 1;
    }
    .timeline__item {
        grid-template-columns: 60px 1fr;
        gap: 13px;
    }
    .timeline__body {
        padding-left: 17px;
    }
    .press-grid, .photo-grid {
        grid-template-columns: 1fr;
    }
    .archive-card__body {
        padding: 19px;
    }
    .archive-card__image {
        height: 220px;
    }
    .press-grid .archive-card__image {
        height: 320px;
    }
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }
    .closing {
        padding-block: 45px;
    }
    .lightbox {
        padding: 12px;
    }
    .lightbox__title {
        font-size: 16px;
    }
    .lightbox__image {
        max-height: 65vh;
    }
}

@media (max-width: 480px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }
    .archive-card__image {
        height: 270px;
    }
    .hero h1 {
        font-size: 43px;
    }
    .hero__links {
        gap: 20px;
    }
    h2 {
        font-size: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        transition: none !important;
    }
}
