/* ==========================================================================
   myafghans.ru — design system
   Light/dark themes, bronze accent, masonry gallery, tasteful motion
   ========================================================================== */

:root {
    --container: 1560px;
    --gap: clamp(10px, 1.2vw, 18px);
    --radius: 3px;

    --bg: #ffffff;
    --bg-soft: #f6f5f3;
    --surface: #ffffff;
    --text: #1e1e1e;
    --text-muted: #6a6a6a;
    --border: rgba(30, 30, 30, 0.12);
    --accent: #b08d57;
    --accent-contrast: #ffffff;
    --header-bg: rgba(19, 19, 21, 0.72);
    --header-panel: #131315;
    --header-text: #ffffff;
    --shadow: 0 18px 50px rgba(20, 20, 20, 0.09);
    --veil: rgba(12, 12, 13, 0.42);

    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #151517;
    --bg-soft: #1b1b1e;
    --surface: #1b1b1e;
    --text: #f1efec;
    --text-muted: #9c9c9f;
    --border: rgba(255, 255, 255, 0.14);
    --accent: #d3ae79;
    --accent-contrast: #1a1a1a;
    --header-bg: rgba(13, 13, 15, 0.72);
    --header-panel: #0d0d0f;
    --header-text: #ffffff;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    --veil: rgba(8, 8, 9, 0.5);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@view-transition {
    navigation: auto;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Ubuntu, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: "Exo 2", Ubuntu, sans-serif;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
}

p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--text);
    color: var(--bg);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
}

/* ----------------------------------------------------------------- header */

/* The header itself stays transparent: only the glass bar fades in
   on scroll (and is always present on pages without a hero). The tint is
   plain alpha — deliberately no backdrop-filter, its blur is what made
   the bar flicker and smear while scrolling or hovering photos. */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    view-transition-name: site-header;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--header-bg);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

html.is-scrolled .site-header::before,
body:not(.has-hero) .site-header::before {
    opacity: 1;
}

.site-header__inner {
    position: relative;
    z-index: 1;
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px clamp(16px, 4vw, 44px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
}

.site-header__logo {
    justify-self: start;
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    transition: opacity 0.3s ease, transform 0.3s var(--ease);
}

.site-header__logo:hover {
    transform: translateY(-1px);
}

.site-header__logo img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.site-nav {
    justify-self: center;
    display: flex;
    gap: clamp(14px, 2.2vw, 34px);
    transform: translateX(0);
    transition: transform 0.5s var(--ease);
}

/* At the very top the menu sits on the right, exactly where it always was. */
html:not(.is-scrolled) .site-nav {
    transform: translateX(var(--nav-shift, 0px));
}

/* Hamburger (mobile only) — the icon turns into a cross when the menu opens. */
.nav-toggle {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--header-text);
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.nav-toggle:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.14);
}

.nav-toggle__bars {
    display: block;
    width: 20px;
    height: 14px;
    position: relative;
}

.nav-toggle__bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.35s var(--ease), opacity 0.2s ease, top 0.35s var(--ease);
}

.nav-toggle__bars span:nth-child(1) {
    top: 0;
}

.nav-toggle__bars span:nth-child(2) {
    top: 6px;
}

.nav-toggle__bars span:nth-child(3) {
    top: 12px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}

/* On phones the menu becomes a drop-down panel behind the hamburger. */
@media (max-width: 560px) {
    .site-header__inner {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
    }

    .site-header__logo {
        margin-right: auto;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav,
    html:not(.is-scrolled) .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        transform: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 6px 12px 14px;
        background: var(--header-panel);
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .site-header.nav-open .site-nav {
        display: flex;
    }

    .site-nav__link {
        padding: 13px 4px;
        font-size: 12.5px;
        letter-spacing: 0.16em;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .site-nav__link:last-child {
        border-bottom: 0;
    }

    .site-nav__link::after {
        display: none;
    }
}

.site-nav__link {
    position: relative;
    padding-bottom: 5px;
    font-size: 11.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--header-text);
    transition: color 0.3s ease;
}

.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.site-nav__link:hover::after,
.site-nav__link.is-active::after {
    transform: scaleX(1);
}

.theme-toggle {
    justify-self: end;
    position: relative;
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--header-text);
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s var(--ease);
}

.theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.theme-toggle__icon {
    position: absolute;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: opacity 0.35s ease, transform 0.45s var(--ease);
}

.theme-toggle__icon--moon {
    fill: currentColor;
    stroke: none;
    opacity: 0;
    transform: rotate(-45deg) scale(0.6);
}

[data-theme="dark"] .theme-toggle__icon--sun {
    opacity: 0;
    transform: rotate(45deg) scale(0.6);
}

[data-theme="dark"] .theme-toggle__icon--moon {
    opacity: 1;
    transform: none;
}

/* The menu keeps the same white look on every page and in both themes. */
.site-nav__link:hover::after,
.site-nav__link.is-active::after {
    transform: scaleX(1);
}

/* ------------------------------------------------------------------- hero */

.hero {
    position: relative;
    height: 94svh;
    min-height: 520px;
    overflow: hidden;
    background: var(--bg-soft);
}

.hero__picture {
    position: absolute;
    inset: 0;
    display: block;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1.1s ease, transform 2.4s var(--ease);
}

.js .hero__img {
    opacity: 0;
    transform: scale(1.06);
}

.js .hero__img.is-loaded {
    opacity: 1;
    transform: scale(1);
}

.hero__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        var(--veil) 0%,
        rgba(0, 0, 0, 0.05) 34%,
        rgba(0, 0, 0, 0) 62%,
        rgba(0, 0, 0, 0.22) 100%
    );
    pointer-events: none;
}

.hero__cue {
    position: absolute;
    left: clamp(16px, 4vw, 44px);
    bottom: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    font-size: 15px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.hero__cue:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: #fff;
}

.hero__cue-arrow {
    animation: cue-bounce 2.4s var(--ease) infinite;
}

@keyframes cue-bounce {
    0%,
    100% {
        transform: translateY(-2px);
    }
    50% {
        transform: translateY(3px);
    }
}

/* ------------------------------------------------------------------ intro */

.intro {
    padding: clamp(72px, 14vh, 160px) clamp(16px, 4vw, 44px) clamp(24px, 6vh, 60px);
    display: flex;
    justify-content: center;
}

.intro__inner {
    max-width: 780px;
    text-align: center;
}

.intro__title {
    font-size: clamp(26px, 4.2vw, 50px);
    margin-bottom: clamp(18px, 3vh, 32px);
}

.intro__text {
    color: var(--text-muted);
    font-size: clamp(15px, 1.4vw, 17.5px);
    line-height: 1.85;
}

/* --------------------------------------------------------------- sections */

.section {
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(36px, 7vh, 90px) clamp(16px, 4vw, 44px) 0;
}

.section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 22px;
    margin-bottom: clamp(20px, 3.4vh, 40px);
}

.section__eyebrow,
.page-head .section__eyebrow {
    width: 100%;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}

.section__title {
    font-size: clamp(22px, 2.8vw, 34px);
}

.section__link {
    margin-left: auto;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 3px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.section__link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.page-head {
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(128px, 18vh, 200px) clamp(16px, 4vw, 44px) clamp(24px, 4vh, 44px);
}

.page-head__title {
    font-size: clamp(30px, 5vw, 58px);
    margin: 6px 0 10px;
}

/* Legal documents (privacy policy): one narrow column for the heading and the
   text alike, so long lines stay readable. */

.legal {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(118px, 17vh, 190px) clamp(16px, 4vw, 44px) clamp(60px, 9vh, 110px);
}

.legal__title {
    font-size: clamp(26px, 4vw, 44px);
    margin: 8px 0 14px;
}

.legal__meta {
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.06em;
}

.legal .prose {
    margin-top: clamp(22px, 4vh, 38px);
}

.page-head__meta,
.album-page__meta {
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.06em;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}

/* -------------------------------------------------------------- photo grid */

/* Even tiles everywhere: the same square ratio keeps every edge aligned. */
.photo-grid {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 44px);
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 700px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1100px) {
    .photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* The home page strip lives inside .section, which already pads the page. */
.section .photo-grid {
    max-width: none;
    padding: 0;
}

.photo-grid .photo-card {
    margin: 0;
}

.photo-grid .photo-card__trigger {
    aspect-ratio: 1;
}

.photo-card {
    position: relative;
    margin: 0 0 var(--gap);
    break-inside: avoid;
}

.photo-card__trigger {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: var(--ratio, 1.5);
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background-color: var(--photo-color, #8a8a8a);
    overflow: hidden;
    cursor: zoom-in;
    transition: box-shadow 0.5s var(--ease);
}

.photo-card__trigger::before {
    content: "";
    position: absolute;
    inset: -8%;
    background-image: var(--photo-lqip, none);
    background-size: cover;
    background-position: center;
    filter: blur(16px);
    transform: scale(1.04);
    opacity: 1;
    transition: opacity 0.6s ease;
}

.photo-card.is-loaded .photo-card__trigger::before {
    opacity: 0;
}

.photo-card__trigger picture {
    display: contents;
}

.photo-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.75s ease, transform 1.1s var(--ease);
}

.js .photo-card__img {
    opacity: 0;
}

.js .photo-card.is-loaded .photo-card__img {
    opacity: 1;
}

@media (hover: hover) {
    .photo-card__trigger:hover .photo-card__img {
        transform: scale(1.035);
    }

    .photo-card__trigger:hover {
        box-shadow: var(--shadow);
    }
}

.photo-card__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 16px 14px;
    color: #fff;
    font-size: 13px;
    text-align: left;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s var(--ease);
}

@media (hover: hover) {
    .photo-card__trigger:hover .photo-card__caption {
        opacity: 1;
        transform: none;
    }
}

/* ----------------------------------------------------------------- albums */

.album-grid {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 44px);
    display: grid;
    gap: calc(var(--gap) * 1.9) var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(clamp(230px, 26vw, 360px), 1fr));
}

.album-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.album-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background-color: var(--photo-color, #8a8a8a);
}

.album-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--ease);
}

@media (hover: hover) {
    .album-card:hover .album-card__media img {
        transform: scale(1.045);
    }
}

.album-card__title {
    font-size: clamp(16px, 1.5vw, 20px);
    transition: color 0.3s ease;
}

.album-card:hover .album-card__title {
    color: var(--accent);
}

.album-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12.5px;
    letter-spacing: 0.05em;
}

/* ------------------------------------------------------------ album page */

.album-page {
    padding-bottom: clamp(40px, 8vh, 90px);
}

.album-page__head {
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(126px, 17vh, 190px) clamp(16px, 4vw, 44px) clamp(28px, 5vh, 56px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.album-page__title {
    font-size: clamp(26px, 4.4vw, 54px);
    font-weight: 400;
}

.album-page__meta {
    justify-content: center;
}

.album-page__description {
    max-width: 720px;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
}

.empty {
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(40px, 8vh, 90px) clamp(16px, 4vw, 44px);
    color: var(--text-muted);
}

/* --------------------------------------------------------------- contacts */

.contacts {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 44px) clamp(60px, 12vh, 140px);
    display: grid;
    gap: clamp(32px, 6vw, 90px);
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .contacts {
        grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
    }
}

.contacts__row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.contacts__label {
    min-width: 96px;
    color: var(--text-muted);
    font-size: 11.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 2;
}

.contacts__row a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.contacts__row a:hover {
    border-color: var(--accent);
}

.contacts__form-title {
    font-size: clamp(20px, 2.2vw, 26px);
    margin-bottom: 8px;
}

.contacts__form-hint {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 26px;
}

/* ------------------------------------------------------------------- form */

.form {
    display: grid;
    gap: 22px;
}

.form__field {
    display: block;
}

.form__label {
    display: block;
    margin-bottom: 8px;
    font-size: 11.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form__input {
    width: 100%;
    padding: 12px 2px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font: inherit;
    transition: border-color 0.3s ease;
}

.form__input:focus {
    outline: none;
    border-color: var(--accent);
}

.form__input.is-invalid {
    border-color: #c0392b;
}

.form__error {
    display: block;
    margin-top: 7px;
    color: #c0392b;
    font-size: 13px;
}

[data-theme="dark"] .form__error,
[data-theme="dark"] .form__input.is-invalid {
    color: #e88c7d;
    border-color: #e88c7d;
}

.form__input--area {
    resize: vertical;
    min-height: 120px;
}

.form__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* 152-ФЗ: consent to personal data processing, right above the submit button. */

.form__consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.form__checkbox {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.form__checkbox.is-invalid {
    outline: 1px solid #c0392b;
    outline-offset: 2px;
}

.form__consent-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
}

.form__consent-text a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.form-success,
.form-errors {
    margin-bottom: 22px;
    padding: 12px 16px;
    font-size: 14px;
    border-left: 2px solid var(--accent);
    background: var(--bg-soft);
}

.form-errors {
    border-color: #c0392b;
}

.button {
    justify-self: start;
    padding: 13px 34px;
    border: 1px solid var(--text);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-size: 11.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, transform 0.35s var(--ease);
}

.button:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
    transform: translateY(-1px);
}

/* ----------------------------------------------------------------- footer */

.site-footer {
    margin-top: clamp(50px, 10vh, 120px);
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}

.site-footer__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(40px, 7vh, 72px) clamp(16px, 4vw, 44px) clamp(34px, 5vh, 56px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(22px, 3vh, 32px);
}

.social-links {
    display: flex;
    align-items: center;
    gap: clamp(26px, 3vw, 44px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.social-links__link {
    display: inline-flex;
    width: 28px;
    height: 28px;
    color: var(--text);
    transition: color 0.3s ease, transform 0.3s var(--ease);
}

.social-links__link svg {
    width: 100%;
    height: 100%;
}

.social-links__link:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.site-footer__legal {
    font-size: 13px;
    color: var(--text-muted);
}

.site-footer__legal a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.site-footer__legal a:hover {
    color: var(--accent);
}

.site-footer__credit {
    font-size: 14px;
    color: var(--text-muted);
}

.site-footer__credit a {
    color: var(--text);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.site-footer__credit a:hover {
    color: var(--accent);
}

/* ------------------------------------------------------------ motion util */

.reveal {
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    transition-delay: calc(var(--reveal-delay, 0) * 55ms);
}

/* Hidden only when JavaScript can bring the element back. */
.js .reveal {
    opacity: 0;
    transform: translateY(20px);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal,
    .hero__img,
    .photo-card__img {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero__cue-arrow {
        animation: none;
    }

    .site-nav {
        transition: none;
    }
}

/* --------------------------------------------------------------- lightbox */

.pswp {
    --pswp-bg: rgba(10, 10, 11, 0.96);
    --pswp-icon-color: #fff;
    --pswp-icon-color-secondary: #b08d57;
}

.pswp__counter {
    font-family: Ubuntu, sans-serif;
    font-size: 12px;
    letter-spacing: 0.18em;
    opacity: 0.75;
}

.pswp__caption__center {
    font-family: Ubuntu, sans-serif;
    font-size: 13.5px;
    line-height: 1.6;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
}

/* ---------------------------------------------------------------- sorting */

.sort-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    margin-top: 18px;
    font-size: 13px;
}

.sort-switch__label {
    color: var(--text-muted);
}

.sort-switch__link {
    color: var(--text-muted);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.sort-switch__link:hover {
    color: var(--accent);
}

.sort-switch__link.is-active {
    color: var(--text);
    border-color: var(--accent);
}

/* ------------------------------------------------------------------- news */

.news-list {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 44px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(18px, 2.4vh, 28px) clamp(18px, 2.4vw, 30px);
}

/* Phones read the news as a plain list, one card under another. */
@media (max-width: 560px) {
    .news-list {
        grid-template-columns: 1fr;
    }
}

.article-card {
    display: flex;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    background: var(--surface);
    transition: border-color 0.3s ease, box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.article-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.article-card__link {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    width: 100%;
    padding: clamp(16px, 1.6vw, 22px);
}

@media (min-width: 640px) {
    .article-card__link {
        grid-template-columns: clamp(120px, 13vw, 190px) 1fr;
        gap: clamp(16px, 1.6vw, 24px);
    }
}

.article-card__body {
    display: flex;
    flex-direction: column;
}

.article-card__media {
    position: relative;
    align-self: start;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background-color: var(--photo-color, #8a8a8a);
}

.article-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--ease);
}

@media (hover: hover) {
    .article-card:hover .article-card__media img {
        transform: scale(1.04);
    }
}

.article-card__date {
    display: flex;
    gap: 12px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.article-card__reading::before {
    content: "·";
    margin-right: 12px;
}

.article-card__title {
    margin-top: 10px;
    font-size: clamp(18px, 1.6vw, 24px);
    transition: color 0.3s ease;
}

.article-card:hover .article-card__title {
    color: var(--accent);
}

.article-card__excerpt {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.75;
}

.article-card__more {
    display: inline-block;
    margin-top: auto;
    padding-top: clamp(14px, 1.6vh, 20px);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

/* --------------------------------------------------------------- article */

.article__head {
    max-width: var(--container);
    margin: 0 auto;
    padding: clamp(118px, 17vh, 190px) clamp(16px, 4vw, 44px) clamp(24px, 4vh, 44px);
    text-align: left;
}

.article__title {
    margin: 8px 0 16px;
    font-size: clamp(26px, 4vw, 48px);
}

.article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.05em;
}

.article__body {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 44px);
}

.article__nav {
    max-width: var(--container);
    margin: clamp(48px, 8vh, 96px) auto 0;
    padding: clamp(28px, 4vh, 44px) clamp(16px, 4vw, 44px) clamp(40px, 8vh, 90px);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
}

.article__nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 44px;
}

.article__nav-link {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 330px;
}

.article__nav-link--right {
    text-align: right;
}

.article__nav-hint {
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.article__nav-title {
    font-family: "Exo 2", sans-serif;
    font-size: 16px;
    transition: color 0.3s ease;
}

.article__nav-link:hover .article__nav-title {
    color: var(--accent);
}

.article__all {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    border-bottom: 1px solid transparent;
    padding-bottom: 3px;
    transition: border-color 0.3s ease;
}

.article__all:hover {
    border-color: var(--accent);
}

/* ------------------------------------------------------- article text */

.prose {
    font-size: clamp(16px, 1.1vw + 13px, 18px);
    line-height: 1.85;
    color: var(--text);
}

.prose > * + * {
    margin-top: 1.1em;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    margin-top: 1.9em;
}

.prose h2 {
    font-size: clamp(21px, 1.5vw + 14px, 28px);
}

.prose h3 {
    font-size: clamp(18px, 1vw + 14px, 22px);
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.prose a:hover {
    text-decoration-thickness: 2px;
}

.prose strong,
.prose b {
    font-weight: 700;
}

.prose ul,
.prose ol {
    padding-left: 1.3em;
}

.prose li + li {
    margin-top: 0.4em;
}

.prose blockquote {
    margin-left: 0;
    padding: 4px 0 4px 22px;
    border-left: 2px solid var(--accent);
    color: var(--text-muted);
    font-style: italic;
}

/* Full image, never cropped: it scales down to fit a comfortable box. */
.prose img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 920px);
    max-height: 68vh;
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--radius);
    background: var(--bg-soft);
}

.prose figure {
    margin: 0;
}

.prose figcaption {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13.5px;
    text-align: center;
}

.prose hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2.4em 0;
}

.prose code {
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--bg-soft);
    font-size: 0.92em;
}

.prose pre {
    padding: 16px 18px;
    overflow-x: auto;
    border-radius: var(--radius);
    background: var(--bg-soft);
}

.prose pre code {
    padding: 0;
    background: none;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.prose th,
.prose td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

/* ----------------------------------------------------------- back to top */

.to-top {
    position: fixed;
    right: clamp(14px, 2.4vw, 28px);
    bottom: clamp(14px, 2.4vw, 28px);
    z-index: 40;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s var(--ease), visibility 0.35s ease,
        background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
}

.to-top svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------------------------------------------------------------- toast */

.toast {
    position: fixed;
    left: 50%;
    bottom: clamp(18px, 4vh, 40px);
    /* Above the lightbox overlay (PhotoSwipe sits at 100000). */
    z-index: 100020;
    max-width: min(90vw, 520px);
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--header-panel);
    color: #fff;
    font-size: 13.5px;
    text-align: center;
    word-break: break-word;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: opacity 0.3s ease, transform 0.3s var(--ease), visibility 0.3s ease;
    pointer-events: none;
}

.toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* --------------------------------------------- lightbox “share” button */

.pswp__button--share {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.pswp__button--share svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
}

.pswp__button--share:hover {
    color: var(--accent);
}

/* ----------------------------------------------------------- share modal */

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 100010;
    display: grid;
    place-items: center;
    padding: clamp(16px, 4vw, 40px);
}

.share-modal[hidden] {
    display: none;
}

.share-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 13, 0.72);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.share-modal.is-open .share-modal__backdrop {
    opacity: 1;
}

.share-modal__dialog {
    position: relative;
    width: min(100%, 560px);
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 10px);
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.3s ease, transform 0.36s var(--ease);
}

.share-modal.is-open .share-modal__dialog {
    opacity: 1;
    transform: none;
}

.share-modal__title {
    margin: 0 0 clamp(16px, 2.4vh, 24px);
    font-size: clamp(18px, 2vw, 23px);
}

.share-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.share-modal__close:hover {
    color: var(--text);
    background: var(--bg-soft);
}

.share-modal__close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.share-modal__field {
    display: flex;
    gap: 10px;
    margin-bottom: clamp(18px, 2.8vh, 28px);
}

.share-modal__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-soft);
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.share-modal__input:focus {
    outline: none;
    border-color: var(--accent);
}

.share-modal__copy {
    flex: 0 0 auto;
    padding: 12px 18px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-contrast);
    font: inherit;
    font-size: 13px;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s var(--ease);
}

.share-modal__copy:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.share-modal__channels {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-modal__channel {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}

.share-modal__channel:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.share-modal__channel svg {
    width: 21px;
    height: 21px;
}

.share-modal__channel-text {
    font-family: "Exo 2", Ubuntu, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

body.is-locked {
    overflow: hidden;
}

@media (max-width: 520px) {
    .share-modal__field {
        flex-wrap: wrap;
    }

    .share-modal__copy {
        width: 100%;
    }
}
