@font-face {
    font-family: "Futura";
    src: url("../fonts/FuturaCyrillicBook.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Futura";
    src: url("../fonts/FuturaCyrillicMedium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Futura";
    src: url("../fonts/FuturaCyrillicDemi.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Futura";
    src: url("../fonts/FuturaCyrillicBold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --c-primary: #577361;
    --c-primary-dark: #3f5447;
    --c-primary-soft: #6b8775;
    --c-accent: #9a7b52;
    --c-accent-light: #c4a574;
    --c-green: #577361;
    --c-green-dark: #3f5447;
    --c-sand: #d4c8b4;
    --c-sand-light: #ebe6dc;
    --c-secondary: #12110f;
    --c-surface: #f7f4ef;
    --c-surface-light: #f7f4ef;
    --c-surface-elevated: #ffffff;
    --c-ink: #1a1a18;
    --c-muted: #6b6a64;
    --c-line: rgba(87, 115, 97, 0.14);
    --c-white: #ffffff;
    --c-black: #000000;
    --f-sans: "Figtree", "Futura", Arial, sans-serif;
    --f-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --text-scale: 1;
    --scroll-offset: 110px;
    --container: min(1180px, calc(100% - clamp(2rem, 5vw, 4rem)));
    --section-space: clamp(5.5rem, 11vw, 9.5rem);
    --section-space-sm: clamp(3.5rem, 7vw, 5.5rem);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --radius-sm: 0.25rem;
    --shadow-soft: 0 20px 50px rgba(87, 115, 97, 0.08);
}

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

html {
    scroll-behavior: smooth;
    font-size: calc(16px * var(--text-scale));
}

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

body {
    margin: 0;
    font-family: var(--f-sans);
    color: var(--c-ink);
    background: var(--c-surface);
    position: relative;
    line-height: 1.7;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
}

* {
    scroll-margin-top: var(--scroll-offset);
}

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

a,
button {
    cursor: pointer;
    transition: color 0.25s var(--ease-out), background-color 0.25s var(--ease-out),
        border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out),
        box-shadow 0.25s var(--ease-out);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 3px;
}

.container {
    width: var(--container);
    margin-inline: auto;
}

.section-pad {
    padding-block: var(--section-space);
}

.section-pad--sm {
    padding-block: var(--section-space-sm);
}

.font-display {
    font-family: var(--f-display);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 1.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-accent);
}

.section-heading {
    margin: 0;
    font-family: var(--f-display);
    font-weight: 500;
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    letter-spacing: -0.3px;
    line-height: 1.1;
    color: var(--c-primary);
}

.section-heading--light {
    color: var(--c-white);
}

.lead {
    margin: 0;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    line-height: 1.75;
    color: var(--c-muted);
    max-width: 36rem;
}

.hairline {
    border: 0;
    border-top: 1px solid var(--c-line);
    margin: 0;
}

.btn {
    --btn-bg: var(--c-primary);
    --btn-fg: var(--c-white);
    --btn-border: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    min-height: 3.15rem;
    padding: 0.9rem 1.75rem;
    border: 1px solid var(--btn-border);
    border-radius: 9999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--f-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    line-height: 1;
}

.btn__arrow {
    display: inline-flex;
    transition: transform 0.3s var(--ease-out);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(87, 115, 97, 0.2);
}

.btn:hover .btn__arrow {
    transform: translateX(4px);
}

.btn:active {
    transform: translateY(0);
}

.btn--accent {
    --btn-bg: var(--c-accent);
}

.btn--accent:hover {
    box-shadow: 0 14px 32px rgba(154, 123, 82, 0.28);
}

.btn--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--c-white);
    --btn-border: rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover {
    --btn-bg: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.btn--light {
    --btn-bg: var(--c-white);
    --btn-fg: var(--c-primary);
}

.btn--light:hover {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.btn--outline {
    --btn-bg: transparent;
    --btn-fg: var(--c-primary);
    --btn-border: rgba(87, 115, 97, 0.28);
}

.btn--outline:hover {
    --btn-bg: var(--c-primary);
    --btn-fg: var(--c-white);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-link:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--c-accent);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
}

body.a11y-high-contrast {
    /* Avoid filter on body — it breaks position:fixed (a11y sidebar). */
    --c-primary: #000000;
    --c-primary-dark: #000000;
    --c-primary-soft: #222222;
    --c-accent: #7a4f1d;
    --c-accent-light: #9a6b2e;
    --c-ink: #000000;
    --c-muted: #222222;
    --c-surface: #ffffff;
    --c-surface-light: #ffffff;
    --c-surface-elevated: #ffffff;
    --c-line: rgba(0, 0, 0, 0.35);
    --c-white: #ffffff;
}

body.a11y-high-contrast .a11y-toolbar__panel,
body.a11y-high-contrast .a11y-toolbar__tile,
body.a11y-high-contrast .a11y-toolbar__toggle {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

body.a11y-high-contrast .a11y-toolbar__header {
    background: #000000 !important;
    border-bottom-color: #000000 !important;
}

body.a11y-high-contrast .a11y-toolbar__header-title {
    background: transparent !important;
    color: #ffffff !important;
}

body.a11y-high-contrast .a11y-toolbar__close {
    color: #ffffff !important;
}

body.a11y-high-contrast .a11y-toolbar__grid {
    background: #ffffff !important;
}

body.a11y-high-contrast .a11y-toolbar__tile-icon {
    background: #f0f0f0 !important;
    color: #000000 !important;
    border: 1px solid #000000;
}

body.a11y-high-contrast .a11y-toolbar__tile.is-active {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25) !important;
}

body.a11y-high-contrast .a11y-toolbar__tile.is-active .a11y-toolbar__tile-icon {
    background: #ffffff !important;
    color: #000000 !important;
}

body.a11y-high-contrast .a11y-toolbar__tile.is-active .a11y-toolbar__tile-label {
    color: #ffffff !important;
}

body.a11y-high-contrast .a11y-toolbar__backdrop.is-open {
    background: rgba(0, 0, 0, 0.55) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.a11y-dyslexia {
    font-family: "Comic Sans MS", "OpenDyslexic", var(--f-sans);
    letter-spacing: 0.05em;
    word-spacing: 0.1em;
}

body.a11y-highlight-links a {
    text-decoration: underline !important;
    text-underline-offset: 3px;
    outline: 2px dashed var(--c-accent);
    outline-offset: 2px;
}

body.a11y-pause-animations *:not(.a11y-toolbar__panel):not(.a11y-toolbar__backdrop),
body.a11y-pause-animations *:not(.a11y-toolbar__panel):not(.a11y-toolbar__backdrop)::before,
body.a11y-pause-animations *:not(.a11y-toolbar__panel):not(.a11y-toolbar__backdrop)::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@supports (animation-timeline: view()) {
    .reveal-view {
        animation: reveal-up linear both;
        animation-timeline: view();
        animation-range: entry 5% cover 22%;
    }

    @keyframes reveal-up {
        from {
            opacity: 0;
            transform: translateY(24px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@supports not (animation-timeline: view()) {
    .reveal-view {
        opacity: 1;
        transform: none;
    }
}

.btn-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 40;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--c-primary);
    color: white;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 4px 20px rgba(87, 115, 97, 0.3);
}

.btn-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-scroll-top:hover {
    background: var(--c-accent);
    transform: translateY(-2px);
}

.sqbtn {
    background: var(--c-primary);
    padding: 12px 6px;
    text-align: center;
    font-weight: 500;
    color: #fff;
    font-size: 14px;
    border: none;
    cursor: pointer;
    position: fixed;
    top: calc(50% - 60px);
    right: 0;
    z-index: 21;
    writing-mode: vertical-rl;
    border-radius: 10px 0 0 10px;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.25);
}

.sqbtn:hover {
    background: var(--c-accent);
}

.footer-bg {
    background: var(--c-primary-dark);
}

body.theme-dark {
    background: var(--c-secondary);
    color: #f5f5f4;
}

body.theme-light {
    background: var(--c-surface);
    color: var(--c-ink);
}

/* Image copyright strip — parent must be position: relative */
.aa-image-credit {
    position: absolute;
    right: clamp(0.75rem, 2vw, 1.15rem);
    bottom: clamp(0.75rem, 2vw, 1.15rem);
    z-index: 10;
    width: fit-content;
    max-width: calc(100% - 1.5rem);
    margin: 0;
    padding: 0.35rem 0.65rem;
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.35;
    text-align: right;
    white-space: nowrap;
}
