/*
Theme Name: Bestintop Studio
Description: Сайт и портфолио студии разработки Bestintop.
Version: 1.1.1
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: bestintop-studio
*/

@font-face {
    font-family: Inter;
    src: url("assets/fonts/InterVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --canvas: #000000;
    --ink: #fafafa;
    --muted: #ecebe8;
    --accent: #ff4000;
    --surface: rgb(0 0 0 / .9);
    --surface-hover: #1c1c1c;
    --border: #6e6e6e;
    --orbit-blue: #383dbd;
    --gutter: clamp(1.25rem, 4.7vw, 5rem);
    --frame: 90rem;
}

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

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font: 400 1rem/1.6 Inter, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

[hidden] { display: none !important; }

.skip-link {
    position: fixed;
    z-index: 10;
    inset-block-start: .75rem;
    inset-inline-start: .75rem;
    padding: .65rem 1rem;
    transform: translateY(-200%);
    background: var(--ink);
    color: var(--canvas);
}

body.admin-bar .skip-link { inset-block-start: calc(.75rem + var(--wp-admin--admin-bar--height, 32px)); }
.skip-link:focus { transform: none; }

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    min-height: 100svh;
}

body.admin-bar .hero { min-height: calc(100svh - var(--wp-admin--admin-bar--height, 32px)); }

.hero__media, .hero__media::after, .hero__media img, .hero__media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero__media {
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.hero__media img, .hero__media video {
    display: block;
    object-fit: cover;
    object-position: center;
}

.hero__media video { visibility: hidden; }
.hero__media.has-frame video { visibility: visible; }

.hero__media::after {
    content: "";
    background:
        linear-gradient(180deg, rgb(0 0 0 / .34), transparent 28%, transparent 67%, rgb(0 0 0 / .52)),
        rgb(0 0 0 / var(--shade, 42%));
}

.site-header {
    display: flex;
    align-items: center;
    width: min(100%, var(--frame));
    margin-inline: auto;
    padding: clamp(1rem, 3vw, 2.1rem) var(--gutter);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    min-height: 44px;
}

.wordmark__image {
    display: block;
    width: clamp(7.625rem, 10.5vw, 9.0625rem);
    max-width: 100%;
    height: auto;
}

.hero__content {
    width: min(100%, 72rem);
    margin-inline: auto;
    align-self: start;
    padding: clamp(2.75rem, 8svh, 6.25rem) var(--gutter) 2rem;
    text-align: center;
}

.hero__heading {
    margin: 0 auto;
    font-size: clamp(2.25rem, 6.25vw, 5.6rem);
    font-weight: 610;
    line-height: 1.01;
    letter-spacing: -.015em;
    text-wrap: balance;
    overflow-wrap: anywhere;
    text-shadow: 0 3px 30px rgb(0 0 0 / .38);
}

.hero__description {
    max-width: 38rem;
    margin: clamp(1.2rem, 3vw, 2rem) auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.55vw, 1.25rem);
    line-height: 1.53;
    text-wrap: pretty;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 14px rgb(0 0 0 / .7);
}

.contacts {
    width: min(100%, 50rem);
    margin: clamp(1.75rem, 6svh, 4.25rem) auto 0;
}

.contacts__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .375rem clamp(.75rem, 3.6vw, 3.25rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.contacts__list li { min-width: 0; max-width: 100%; }

.contacts__link {
    display: flex;
    align-items: center;
    gap: clamp(.375rem, 1.25vw, .75rem);
    min-height: 48px;
    color: var(--ink);
    font-size: clamp(.9375rem, 2.05vw, 1.375rem);
    font-weight: 610;
    line-height: 1.2;
    text-align: start;
    text-decoration: none;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 4px #000, 0 2px 14px #000;
    transition: transform .2s ease;
}

.contacts__logo {
    display: block;
    flex: 0 0 auto;
    width: clamp(1.75rem, 3vw, 2.375rem);
    height: clamp(1.75rem, 3vw, 2.375rem);
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgb(0 0 0 / .65));
}

.contacts__link--portfolio .contacts__logo {
    width: clamp(2.125rem, 3.65vw, 3rem);
    height: clamp(2.125rem, 3.65vw, 3rem);
}

.hero__controls {
    display: flex;
    justify-content: flex-end;
    width: min(100%, var(--frame));
    min-height: 4.25rem;
    margin-inline: auto;
    padding: 0 var(--gutter) clamp(.8rem, 2.7vw, 1.9rem);
}

.motion-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.motion-toggle__icon {
    width: 11px;
    height: 13px;
    border-inline: 3px solid currentColor;
}

.motion-toggle[data-playing="false"] .motion-toggle__icon {
    width: 0;
    height: 0;
    margin-inline-start: 3px;
    border: solid transparent;
    border-width: 7px 0 7px 10px;
    border-inline-start-color: currentColor;
}

@media (hover: hover) {
    .motion-toggle:hover {
        background: var(--surface-hover);
        border-color: var(--accent);
    }

    .contacts__link:hover {
        transform: translateY(-2px);
        text-decoration: underline;
        text-decoration-color: var(--accent);
        text-underline-offset: .22em;
    }
    a.wordmark:hover .wordmark__image { opacity: .85; }
}

.contacts__link:active { transform: translateY(1px); }

.page-content {
    width: min(100%, 52rem);
    padding: 2.5rem var(--gutter) 4rem;
    margin-inline: auto;
    overflow-wrap: anywhere;
}

.page-content img { max-width: 100%; height: auto; }
.page-content article + article { margin-block-start: 3rem; }

@media (max-width: 42rem) {
    .hero__content { padding-block-start: clamp(1.7rem, 6svh, 4rem); }
    .hero__heading { font-size: clamp(1.6rem, 8.15vw, 2.625rem); }
    .hero__media::after {
        background:
            linear-gradient(180deg, rgb(0 0 0 / .47), rgb(0 0 0 / .18) 58%, rgb(0 0 0 / .49)),
            rgb(0 0 0 / var(--shade, 42%));
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hero__content { animation: enter .6s ease-out both; }

    @keyframes enter {
        from { opacity: .72; transform: translateY(8px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (prefers-reduced-motion: reduce) {
    .contacts__link, .motion-toggle { transition: none; }
    .contacts__link:hover, .contacts__link:active { transform: none; }
}
