/*
Theme Name: Scarlet Whisper
Theme URI: https://scarletwhisper.ru/
Author: Codex
Description: Private portal theme for Scarlet Whisper.
Version: 1.3.9
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: scarlet-whisper
*/

@font-face {
    font-family: "Inter";
    src: url('fonts/ec229b2cc8e8-inter-cyrillic.woff2') format("woff2");
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Inter";
    src: url('fonts/277a84ac5afd-inter-latin.woff2') format("woff2");
    font-style: normal;
    font-weight: 400 900;
    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;
}
@font-face {
    font-family: "Cormorant Garamond";
    src: url('fonts/dd25c760cfdb-cormorant-garamond-cyrillic.woff2') format("woff2");
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Cormorant Garamond";
    src: url('fonts/d43149375c0a-cormorant-garamond-latin.woff2') format("woff2");
    font-style: normal;
    font-weight: 500 700;
    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 {
    --black: #030303;
    --ink: #070707;
    --ink-2: #0c0d0d;
    --red: #bd0028;
    --red-2: #e00032;
    --red-dark: #620013;
    --white: #ffffff;
    --soft: #c8c8c8;
    --muted: #8d8d8d;
    --line: rgba(189, 0, 40, .72);
    --line-soft: rgba(189, 0, 40, .34);
    --container: 1310px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--black);
    color: var(--white);
    font-family: Inter, Arial, sans-serif;
    overflow-x: hidden;
}
body::selection {
    background: var(--red);
    color: var(--white);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    min-height: 60px;
    padding: 0 max(18px, calc((100vw - var(--container)) / 2));
    background: rgba(0, 0, 0, .96);
    border-bottom: 1px solid rgba(255, 255, 255, .03);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: max-content;
}
.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: var(--white);
    font-size: 37px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
}
.brand-mark::before {
    content: "";
    position: absolute;
    inset: 5px 7px 5px 0;
    border: 5px solid var(--red);
    border-right-color: transparent;
    border-radius: 50%;
}
.brand-mark::after {
    content: "";
    position: absolute;
    top: 0;
    left: 7px;
    width: 18px;
    height: 16px;
    background: var(--red);
    clip-path: polygon(50% 0, 64% 34%, 100% 26%, 76% 55%, 96% 90%, 54% 73%, 18% 100%, 25% 58%, 0 35%, 37% 35%);
}
.brand-text {
    display: grid;
    line-height: .86;
}
.brand b,
.brand strong {
    display: block;
    color: var(--white);
    font-size: 31px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: lowercase;
}
.brand b::first-letter,
.brand strong::first-letter { text-transform: uppercase; }
.brand small {
    display: block;
    margin-top: 3px;
    color: var(--red-2);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    text-align: right;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2vw, 32px);
    min-width: 0;
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
}
.main-nav a {
    white-space: nowrap;
    transition: color .2s ease;
}
.main-nav a:hover,
.main-nav a:focus-visible { color: var(--red-2); }

.header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
    font-size: 14px;
    font-weight: 900;
}
.header-meta span {
    max-width: 84px;
    line-height: 1.05;
}
.header-meta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid transparent;
    color: var(--muted);
}
.header-meta a.is-active {
    border-color: var(--red);
    color: var(--red-2);
}
.menu-toggle { display: none; }

.hero {
    position: relative;
    min-height: calc(100vh - 60px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(560px, 760px);
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.52) 43%, rgba(0,0,0,.78) 100%),
        radial-gradient(circle at 78% 50%, rgba(224, 0, 50, .35), transparent 28%),
        url('images/e4309f662d4e-scarlethero-1280.webp') center / cover no-repeat;
}
.hero-photo-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
}
.hero-copy {
    position: relative;
    z-index: 2;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    padding: clamp(56px, 7vw, 118px) max(18px, calc((100vw - var(--container)) / 2)) clamp(48px, 6vw, 86px) 28px;
}
.hero-kicker {
    color: var(--soft);
    font-size: 15px;
    font-weight: 800;
}
.hero h1 {
    max-width: 820px;
    margin: 0;
    color: var(--red);
    font-size: clamp(58px, 6.4vw, 104px);
    font-weight: 900;
    line-height: .98;
    letter-spacing: 0;
}
.hero-subtitle {
    max-width: 640px;
    margin: 0;
    color: var(--soft);
    font-size: clamp(18px, 1.5vw, 22px);
    line-height: 1.45;
}
.hero-note {
    margin-top: 12px;
    padding: 22px 0 22px 32px;
    border-left: 3px solid var(--red);
}
.hero-note b {
    display: block;
    margin-bottom: 14px;
    font-size: clamp(18px, 1.6vw, 23px);
}
.hero-note span {
    display: block;
    color: var(--soft);
    font-size: 16px;
}
.city-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.city-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    min-width: 166px;
    padding: 12px 22px;
    border: 1px solid var(--red);
    color: var(--white);
    font-weight: 900;
}
.city-switch a.is-active {
    background: var(--red);
    box-shadow: 0 18px 46px rgba(189, 0, 40, .35);
}
.hero-figure {
    display: none;
}
.hero-figure::after {
    content: none;
}

.benefits-section,
.masters-section,
.programs-section,
.about-section {
    padding: clamp(76px, 8vw, 132px) max(18px, calc((100vw - var(--container)) / 2));
}
.section-title {
    margin-bottom: 52px;
}
.section-title span {
    display: block;
    margin-bottom: 12px;
    color: var(--red);
    font-size: 17px;
    font-weight: 900;
}
.section-title h2 {
    position: relative;
    margin: 0;
    color: var(--red);
    font-size: clamp(44px, 4.6vw, 66px);
    font-weight: 900;
    line-height: 1.05;
}
.section-title h2::after {
    content: "";
    display: block;
    width: 100px;
    height: 1px;
    margin-top: 26px;
    background: var(--red);
}
.section-title p {
    max-width: 760px;
    margin: 26px 0 0;
    color: var(--soft);
    font-size: 20px;
    line-height: 1.52;
}
.section-title-wide {
    max-width: 860px;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.benefit-grid article {
    min-height: 278px;
    padding: 50px 40px;
    border: 1px dashed var(--line);
    background: rgba(255, 255, 255, .01);
}
.benefit-grid article:nth-child(even) {
    border-style: solid;
}
.benefit-grid h3 {
    margin: 0;
    font-size: 26px;
    line-height: 1.15;
}
.benefit-grid span,
.about-section span,
.desire-panel span {
    display: block;
    width: 52px;
    height: 1px;
    margin: 34px 0 30px;
    background: var(--red);
}
.benefit-grid p {
    margin: 0;
    color: var(--soft);
    font-size: 16px;
    line-height: 1.45;
}

.masters-section {
    background: var(--ink);
}
.masters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
}
.master-card {
    position: relative;
    min-width: 0;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(189,0,40,.09), transparent 34%),
        #050505;
    transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.master-card:hover {
    transform: translateY(-5px);
    border-color: var(--red-2);
    box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 0 0 1px rgba(224,0,50,.18);
}
.master-photo {
    position: relative;
    height: clamp(320px, 26vw, 420px);
    overflow: hidden;
    background: #111;
}
.master-photo-link {
    display: block;
    height: 100%;
}
.master-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.16) 48%, rgba(0,0,0,.72));
    pointer-events: none;
}
.master-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.master-card:hover .master-photo img {
    transform: scale(1.035);
}
.card-number {
    position: absolute;
    left: 18px;
    top: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--red);
    background: rgba(0, 0, 0, .72);
    color: var(--red-2);
    font-weight: 900;
    pointer-events: none;
}
.master-body {
    padding: 26px 24px 24px;
}
.master-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.master-title h3 {
    margin: 0;
    font-size: clamp(21px, 1.8vw, 28px);
    line-height: 1.08;
}
.master-title span {
    flex: 0 0 auto;
    color: var(--red);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.master-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin: 0 0 20px;
    background: rgba(189, 0, 40, .35);
}
.master-stats div {
    min-width: 0;
    padding: 12px 8px;
    background: #080808;
    text-align: center;
}
.master-stats dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.master-stats dd {
    margin: 0;
    color: var(--white);
    font-size: 14px;
    font-weight: 900;
}
.contact-button,
.program-card a,
.desire-panel a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 25px;
    border: 1px solid var(--red);
    background: transparent;
    color: var(--red-2);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.contact-button {
    width: 100%;
}
.contact-button:hover,
.contact-button:focus-visible,
.program-card a:hover,
.program-card a:focus-visible,
.desire-panel a:hover,
.desire-panel a:focus-visible {
    background: var(--red);
    color: var(--white);
    box-shadow: 0 14px 34px rgba(189,0,40,.34);
}
.contact-button.is-revealed {
    color: var(--white);
    font-size: 13px;
}

.desire-panel {
    min-height: 580px;
    display: grid;
    place-items: center;
    padding: clamp(72px, 8vw, 128px) 18px;
    background:
        linear-gradient(rgba(0,0,0,.48), rgba(0,0,0,.72)),
        url('images/c3a4c3fab9e9-mood.webp') center / cover no-repeat;
}
.desire-panel > div {
    width: min(100%, 1300px);
    padding: clamp(34px, 5vw, 64px);
    background: rgba(0, 0, 0, .62);
    text-align: center;
}
.desire-panel h2 {
    max-width: 980px;
    margin: 0 auto;
    font-size: clamp(36px, 4.2vw, 60px);
    line-height: 1.13;
}
.desire-panel span {
    margin-inline: auto;
}
.desire-panel p {
    max-width: 780px;
    margin: 0 auto 32px;
    color: var(--white);
    font-size: 18px;
    line-height: 1.55;
}

.programs-section {
    background: var(--black);
}
.program-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.program-card {
    position: relative;
    min-height: 470px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 14px;
    padding: 26px 24px 28px;
    overflow: hidden;
    background:
        linear-gradient(0deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.72) 40%, rgba(0,0,0,.22) 100%),
        var(--program-image) center / cover no-repeat;
}
.program-photo-link {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
}
.program-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,.05);
    pointer-events: none;
}
.program-card > * {
    position: relative;
    z-index: 1;
}
.program-card > .program-photo-link {
    position: absolute;
    z-index: 0;
}
.program-card span {
    font-size: 14px;
    font-weight: 900;
}
.program-card h3 {
    margin: 0;
    font-size: clamp(29px, 2.5vw, 40px);
    line-height: 1.08;
}
.program-card p {
    margin: 0;
    color: var(--soft);
    font-size: 15px;
    line-height: 1.45;
}
.program-card b {
    color: var(--white);
    font-size: 16px;
}
.program-card a {
    margin-top: 4px;
    border-radius: 999px;
    background: var(--red);
    color: var(--white);
}

.about-section {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background:
        linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.9)),
        url('images/1b2bf863b712-hero.webp') center / cover fixed no-repeat;
}
.about-photo-link {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
}
.about-section article {
    position: relative;
    z-index: 1;
    min-height: 465px;
    padding: clamp(34px, 5vw, 74px);
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, .46);
}
.about-section article:first-child {
    border-style: dashed;
}
.about-section h2 {
    max-width: 600px;
    margin: 0;
    font-size: clamp(34px, 3.8vw, 52px);
    line-height: 1.08;
}
.about-section p {
    max-width: 630px;
    margin: 0;
    color: var(--soft);
    font-size: 17px;
    line-height: 1.72;
}

.site-footer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 28px max(18px, calc((100vw - var(--container)) / 2));
    background: #000;
    border-top: 1px solid rgba(255,255,255,.08);
}
.site-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--soft);
    font-size: 14px;
    font-weight: 800;
}
.site-footer a:hover { color: var(--red-2); }

@media (max-width: 1180px) {
    .site-header {
        grid-template-columns: auto auto 1fr;
        padding-inline: 18px;
    }
    .menu-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 48px;
        height: 48px;
        margin-left: auto;
        border: 1px solid var(--red);
        background: transparent;
        order: 3;
    }
    .menu-toggle span {
        width: 23px;
        height: 2px;
        margin-inline: auto;
        background: var(--white);
    }
    .main-nav {
        position: fixed;
        inset: 60px 0 auto 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 18px;
        background: rgba(0,0,0,.98);
        border-bottom: 1px solid var(--line-soft);
    }
    .main-nav.is-open { display: flex; }
    .main-nav a {
        padding: 14px 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
        text-align: center;
    }
    .header-meta {
        justify-self: end;
        order: 2;
    }
    .hero-copy {
        padding-left: 28px;
    }
    .benefits-section,
    .masters-section,
    .programs-section,
    .about-section {
        padding-inline: 28px;
    }
    .benefit-grid,
    .program-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .masters-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .site-header {
        min-height: 66px;
        grid-template-columns: auto auto;
    }
    .brand-mark {
        width: 46px;
        height: 46px;
        font-size: 30px;
    }
    .brand b,
    .brand strong {
        font-size: 24px;
    }
    .brand small {
        font-size: 8px;
    }
    .header-meta {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: center;
        padding-bottom: 10px;
    }
    .menu-toggle {
        order: 1;
    }
    .main-nav {
        inset-block-start: 66px;
    }
    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        background:
            linear-gradient(180deg, rgba(0,0,0,.48), rgba(0,0,0,.96)),
            url('images/a99f68b25562-scarlethero-720.webp') center top / cover no-repeat;
    }
    .hero-copy {
        grid-column: 1;
        min-height: calc(100vh - 66px);
        padding: 64px 18px 58px;
        text-align: left;
    }
    .hero h1 {
        font-size: clamp(48px, 16vw, 76px);
    }
    .hero-note {
        margin-top: 10px;
        padding-left: 22px;
    }
    .hero-figure {
        display: none;
    }
    .city-switch {
        width: 100%;
    }
    .city-switch a {
        flex: 1 1 100%;
    }
    .benefits-section,
    .masters-section,
    .programs-section,
    .about-section {
        padding: 68px 18px;
    }
    .benefit-grid,
    .masters-grid,
    .program-grid,
    .about-section,
    .site-footer {
        grid-template-columns: 1fr;
    }
    .benefit-grid article {
        min-height: 220px;
        padding: 34px 28px;
    }
    .master-photo {
        height: min(112vw, 520px);
    }
    .program-card {
        min-height: 430px;
    }
    .about-section {
        background-attachment: scroll;
    }
    .about-section article {
        min-height: auto;
    }
    .site-footer {
        align-items: start;
    }
}

@media (max-width: 460px) {
    .brand {
        gap: 5px;
    }
    .brand-mark {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
    .brand b,
    .brand strong {
        font-size: 20px;
    }
    .header-meta {
        gap: 8px;
        font-size: 12px;
    }
    .header-meta span {
        max-width: 70px;
    }
    .section-title h2 {
        font-size: 40px;
    }
    .section-title p {
        font-size: 17px;
    }
    .master-body {
        padding: 22px 18px;
    }
    .master-title {
        display: block;
    }
    .master-title span {
        display: inline-block;
        margin-top: 8px;
    }
    .master-stats {
        grid-template-columns: 1fr;
    }
    .desire-panel {
        min-height: 480px;
        padding-inline: 14px;
    }
    .desire-panel > div {
        padding: 30px 18px;
    }
}
