/*
Theme Name: RMF Solutions
Description: Тема сайта RMF Solutions.
Version: 0.1.1
Text Domain: rmf-solutions
*/

@font-face {
    font-family: Manrope;
    src: url("assets/manrope-cyrillic-ext.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
    font-family: Manrope;
    src: url("assets/manrope-cyrillic.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: Manrope;
    src: url("assets/manrope-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;
    --ink: #141c27;
    --paper: #f5f4f0;
    --secondary: #505863;
    --steel: #e8e9e7;
    --line: #c9cac7;
    --accent: #fb645b;
    --accent-hover: #ff847b;
    --night: #151e2a;
    --light: #fffaf5;
    --page-gutter: clamp(20px, 5vw, 78px);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    font-family: Manrope, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.65; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .26em; }
button { font: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.038em; font-weight: 800; }
h2 { font-size: clamp(2rem, 5.2vw, 4.65rem); text-wrap: balance; }
h3 { font-size: clamp(1.3rem, 2.45vw, 2.25rem); }

::selection { color: var(--ink); background: #ffb6b0; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

.shell { width: min(100% - var(--page-gutter) * 2, 1340px); margin-inline: auto; }
.page-section { padding-block: clamp(64px, 8.5vw, 125px); }
.skip-link { position: absolute; z-index: 4; left: 18px; top: 16px; padding: 8px 14px; background: var(--paper); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

.site-header { background: var(--paper); }
.site-header-inner { min-height: 77px; display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(16px, 3vw, 42px); align-items: center; }
.brand { display: inline-flex; gap: 9px; align-items: center; justify-self: start; font-size: 1.21rem; font-weight: 800; letter-spacing: -.035em; white-space: nowrap; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; position: relative; flex: none; overflow: hidden; }
.brand-mark img { height: 34px; width: auto; max-width: none; }
.brand-name-end { font-weight: 650; }
.site-nav { display: flex; gap: clamp(20px, 3vw, 46px); }
.site-nav a, .header-cta { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 750; white-space: nowrap; font-size: .9rem; }
.site-nav a:hover, .footer-inner a:hover { text-decoration: underline; }
.header-cta { gap: 12px; justify-self: end; padding-inline: 16px; border: 1px solid var(--ink); }
.header-cta:hover { color: var(--light); background: var(--ink); }

.arrow { position: relative; display: inline-block; flex: 0 0 auto; width: 13px; height: 13px; margin-inline: 1px; color: inherit; }
.arrow::before, .arrow::after { position: absolute; content: ""; }
.arrow::before { width: 9px; height: 9px; top: 1px; right: 1px; border-top: 1.6px solid; border-right: 1.6px solid; }
.arrow::after { top: 10px; left: 1px; width: 14px; height: 1.6px; background: currentColor; transform: rotate(-45deg); transform-origin: 0 50%; }

.hero { position: relative; isolation: isolate; overflow: hidden; color: var(--light); background: var(--night); }
.hero-picture, .hero::after { position: absolute; inset: 0; z-index: -1; }
.hero-picture { z-index: -2; }
.hero-picture img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.hero::after {
    content: "";
    background: linear-gradient(90deg, #121b26 0%, #121b26ed 23%, #121b26a6 48%, #121b2626 83%), linear-gradient(0deg, #111923d9 0%, transparent 58%);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) clamp(215px, 20vw, 288px); column-gap: 28px; align-items: end; min-height: clamp(560px, 47vw, 690px); padding-block: clamp(76px, 9.5vw, 147px) 57px; }
.hero-copy { align-self: center; max-width: 820px; }
.hero h1 { font-size: clamp(2.9rem, 6.05vw, 6rem); font-weight: 800; line-height: 1.02; text-wrap: balance; }
.hero-copy p { margin-top: 24px; max-width: 40ch; color: #e8edf2; font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.65; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 23px; min-height: 54px; padding: 11px 22px; text-decoration: none; font-size: .95rem; font-weight: 800; }
.button-primary { background: var(--accent); color: var(--ink); }
.button-primary:hover { background: var(--accent-hover); }
.hero .button { margin-top: 29px; }
.button:focus-visible { outline-color: var(--ink); }
.hero .button:focus-visible, .contact .button:focus-visible { outline-color: var(--light); }
.hero-case { display: grid; gap: 4px; padding-top: 15px; border-top: 1px solid #fff9; text-decoration: none; min-width: 0; }
.hero-case-label { font-size: .86rem; font-weight: 700; }
.hero-case-metric { color: #ff8178; font-size: clamp(3.35rem, 5vw, 4.55rem); line-height: 1.08; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hero-case-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .9rem; }
.hero-case:hover .hero-case-action { text-decoration: underline; }

.audience { border-bottom: 1px solid var(--line); }
.audience-inner { display: grid; grid-template-columns: 1fr 2.1fr; gap: 24px; align-items: center; padding-block: 22px; }
.audience strong { font-size: .9rem; }
.audience ul { list-style: none; display: flex; flex-wrap: wrap; column-gap: clamp(22px, 4vw, 62px); row-gap: 4px; padding: 0; margin: 0; }
.audience li { color: var(--secondary); font-weight: 650; }

.services { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(32px, 6.8vw, 112px); }
.section-intro p { margin-top: 16px; max-width: 32ch; color: var(--secondary); }
.service-list { padding: 0; list-style: none; margin: 3px 0 0; border-top: 1px solid var(--line); }
.service-list li { padding-block: 21px; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: clamp(15px, 2.4vw, 35px); border-bottom: 1px solid var(--line); }
.service-list h3 { font-size: clamp(1.1rem, 1.7vw, 1.5rem); line-height: 1.3; letter-spacing: -.024em; }
.service-list p { color: var(--secondary); line-height: 1.55; }

.cases { background: var(--steel); }
.cases h2 { margin-bottom: clamp(26px, 4.5vw, 62px); }
.case-feature { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(0, 1.25fr); background: var(--paper); }
.case-feature-proof { display: grid; align-content: space-between; gap: 22px; min-height: 277px; padding: clamp(22px, 4vw, 54px); background: var(--night); color: var(--light); }
.case-feature-proof span { font-weight: 700; }
.case-feature-proof strong { color: #ff8178; font-weight: 800; font-size: clamp(4.05rem, 8vw, 7rem); line-height: .96; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.case-feature-copy { align-self: center; padding: clamp(23px, 4.7vw, 68px); }
.case-feature-copy p { max-width: 48ch; color: var(--secondary); margin-top: 15px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 16px; font-weight: 800; }
.text-link:hover { text-decoration-thickness: 2px; }

.case-dialog {
    width: min(720px, 100% - 32px);
    max-height: 85dvh;
    padding: 0;
    border: 0;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 20px 70px #080e1a55;
    overscroll-behavior: contain;
}
.case-dialog::backdrop { background: #131b27b8; }
.case-dialog:target:not([open]) { display: block; position: relative; width: 100%; max-height: none; margin-top: 28px; box-shadow: none; }
.case-dialog[open] { animation: reveal-case .32s var(--ease-out) both; }
html:has(.case-dialog[open]) { overflow: hidden; }
@keyframes reveal-case {
    from { opacity: .65; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.dialog-inner { padding: clamp(22px, 4.1vw, 55px); }
.dialog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 15px; margin-bottom: 22px; color: var(--secondary); font-size: .88rem; font-weight: 700; }
.dialog-close { min-height: 44px; display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.dialog-close:hover { text-decoration: underline; }
.close-icon { position: relative; width: 14px; height: 14px; }
.close-icon::before, .close-icon::after { position: absolute; top: 6px; left: 0; width: 14px; height: 1.5px; content: ""; background: currentColor; transform: rotate(45deg); }
.close-icon::after { transform: rotate(-45deg); }
.case-dialog h2 { margin: 0 0 14px; font-size: clamp(1.95rem, 5vw, 3.2rem); text-wrap: initial; }
.case-dialog h3 { margin: 23px 0 7px; font-size: 1.23rem; }
.case-result { font-size: 1.15rem; font-weight: 800; }
.case-dialog .button { margin-top: 24px; }

.about { display: grid; grid-template-columns: 1fr 1.25fr; gap: 28px; align-items: start; }
.about p { max-width: 49ch; color: var(--secondary); font-size: clamp(1rem, 1.65vw, 1.23rem); }
.about p + p { margin-top: 13px; }
.contact { background: var(--night); color: var(--light); }
.contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.contact h2 { font-size: clamp(2rem, 5.5vw, 4.55rem); }
.contact p { color: #e8edf2; margin-top: 12px; }
.contact-actions { flex: 0 0 auto; display: grid; gap: 8px; justify-items: start; }
.contact-phone { display: inline-flex; align-items: center; min-height: 44px; font-weight: 750; }
.footer-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: .9rem; }
.footer-inner a { text-decoration: none; font-weight: 800; }
.footer-inner span { color: var(--secondary); }
.entry { min-height: 50vh; }
.entry article { margin-bottom: 25px; max-width: 70ch; }
.entry h1, .entry h2 { margin-bottom: 18px; }

@media (max-width: 960px) {
    .hero-inner { min-height: 560px; grid-template-columns: minmax(0, 1fr) 215px; }
    .hero h1 { font-size: clamp(2.6rem, 6.6vw, 4rem); }
    .services { gap: 38px; }
    .service-list li { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 720px) {
    .site-header-inner { grid-template-columns: 1fr auto; min-height: auto; gap: 0 10px; padding-top: 8px; }
    .brand { min-height: 48px; font-size: 1.05rem; gap: 6px; }
    .brand-mark, .brand-mark img { height: 28px; }
    .brand-mark { width: 28px; }
    .site-nav { grid-row: 2; grid-column: 1 / -1; justify-content: start; gap: 26px; border-top: 1px solid var(--line); }
    .site-nav a { min-height: 43px; }
    .header-cta { font-size: .79rem; min-height: 40px; padding-inline: 9px; gap: 7px; }
    .hero-inner { grid-template-columns: 1fr; min-height: auto; gap: 43px; padding-block: 72px 28px; }
    .hero h1 { font-size: clamp(2.35rem, 8.9vw, 3.6rem); line-height: 1.05; text-wrap: initial; }
    .hero-picture img { object-position: 63% center; }
    .hero::after { background: linear-gradient(90deg, #121b26ef, #121b26a1 62%, #121b266e), linear-gradient(0deg, #111923e6, transparent 62%); }
    .hero-copy p { margin-top: 17px; }
    .hero .button { margin-top: 22px; }
    .hero-case { max-width: 290px; }
    .hero-case-metric { font-size: 3rem; }
    .audience-inner { grid-template-columns: 1fr; gap: 7px; padding-block: 15px; }
    .audience ul { font-size: .91rem; gap: 2px 15px; }
    .services, .case-feature, .about { grid-template-columns: 1fr; }
    .case-feature-proof { min-height: 202px; gap: 14px; }
    .contact-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 365px) {
    .site-header-inner { column-gap: 8px; }
    .brand { font-size: .96rem; gap: 4px; }
    .brand-mark, .brand-mark img { height: 24px; }
    .brand-mark { width: 24px; }
    .header-cta { padding-inline: 7px; gap: 5px; font-size: .73rem; }
}

@media (prefers-reduced-motion: reduce) {
    .case-dialog[open] { animation: none; }
}
