/* NightParadise — страница правил (композиция референса, стиль Night Oasis) */

body:has(.rp) .container {
    max-width: none;
    width: 100%;
    padding: 0;
    margin: 0;
}

body:has(.rp) #three-bg,
body:has(.rp) .particles {
    opacity: 0.06;
}

.rp {
    --ink: #eef4f7;
    --muted: #8b97a8;
    --accent: #3ecfbe;
    --warm: #e4a14a;
    --deep: #05080c;
    --line: rgba(140, 180, 200, 0.14);
    --warn: #e85d5d;
    --display: "Syne", "Segoe UI", sans-serif;
    --body: "Figtree", "Segoe UI", sans-serif;
    color: var(--ink);
    font-family: var(--body);
    background: var(--deep);
}

.rp-wrap {
    width: min(980px, calc(100% - 2.5rem));
    margin: 0 auto;
}

/* Hero */
.rp-hero {
    position: relative;
    min-height: min(38vh, 420px);
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.rp-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url("home-ref/header-background.jpg") center / cover no-repeat;
}

.rp-hero__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(5, 8, 12, 0.72) 0%, rgba(5, 8, 12, 0.88) 100%),
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(62, 207, 190, 0.12), transparent 65%);
}

.rp-hero__inner {
    position: relative;
    z-index: 2;
    width: min(980px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 5.5rem 0 3rem;
    text-align: center;
}

.rp-hero__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--warm);
}

.rp-hero__title {
    margin: 0 0 0.85rem;
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    letter-spacing: -0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.rp-hero__title span {
    color: var(--accent);
}

.rp-hero__desc {
    margin: 0 auto;
    max-width: 36rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Mode tabs */
.rp-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: -1.25rem auto 0;
    position: relative;
    z-index: 3;
    width: fit-content;
    max-width: calc(100% - 2rem);
    padding: 0.35rem;
    background: rgba(12, 18, 24, 0.92);
    border: 1px solid var(--line);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.rp-modes a {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.15rem;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 650;
    font-size: 0.92rem;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.rp-modes a:hover {
    color: var(--ink);
    background: rgba(62, 207, 190, 0.08);
}

.rp-modes a.is-active {
    color: #06201c;
    background: var(--accent);
}

/* Body */
.rp-body {
    padding: 3.5rem 0 2rem;
}

.rp-warning {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    margin-bottom: 2.5rem;
    border-radius: 10px;
    background: rgba(232, 93, 93, 0.12);
    border: 1px solid rgba(232, 93, 93, 0.28);
}

.rp-warning p {
    margin: 0;
    color: #f0a0a0;
    font-size: 1rem;
    line-height: 1.5;
}

.rp-warning__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(232, 93, 93, 0.35);
    color: #fff;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.rp-warning:hover .rp-warning__icon {
    transform: scale(1.08);
}

.rp-block {
    margin-bottom: 2.75rem;
}

.rp-block__title {
    margin: 0 0 1.35rem;
    font-family: var(--display);
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--ink);
    position: relative;
    padding-bottom: 0.7rem;
}

.rp-block__title::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 150px;
    height: 1px;
    background: rgba(140, 180, 200, 0.3);
}

.rp-block__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
}

.rp-block__title span {
    color: var(--accent);
}

.rp-list {
    margin: 0;
    padding: 0 0 0 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.rp-list li {
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.rp-list li strong,
.rp-list li span {
    color: var(--accent);
    font-weight: 650;
}

.rp-sub {
    margin: 1.35rem 0 0.55rem;
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.rp-lead {
    margin: 0 0 0.85rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.rp-table-wrap {
    overflow-x: auto;
    margin: 0.75rem 0 1.25rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(12, 18, 24, 0.65);
}

.rp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.rp-table th,
.rp-table td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.rp-table th {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.02);
}

.rp-table td {
    color: var(--ink);
}

.rp-table tr:last-child td {
    border-bottom: none;
}

.rp-table td:first-child {
    color: var(--muted);
    white-space: nowrap;
}

.rp-outro {
    margin: 1rem 0 0;
    color: var(--warm);
    font-weight: 650;
}

.rp-links {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.rp-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 650;
}

.rp-links a:hover {
    text-decoration: underline;
}

/* CTA */
.rp-join {
    padding: 4rem 0 5rem;
    background: linear-gradient(180deg, #081018 0%, var(--deep) 100%);
    border-top: 1px solid var(--line);
}

.rp-join__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.rp-join__title {
    margin: 0;
    max-width: 40rem;
    font-family: var(--display);
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.rp-join__title span {
    color: var(--accent);
}

.rp-join__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.35rem;
    border-radius: 8px;
    font-family: var(--body);
    font-size: 0.95rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, opacity 0.2s;
}

.rp-btn--primary {
    border: 1px solid rgba(62, 207, 190, 0.55);
    background: rgba(62, 207, 190, 0.16);
    color: #dffcf7;
}

.rp-btn--primary:hover,
.rp-btn--primary.is-copied {
    background: rgba(62, 207, 190, 0.28);
    transform: translateY(-2px);
}

.rp-btn--ghost {
    border: 1px solid rgba(140, 180, 200, 0.28);
    background: transparent;
    color: var(--muted);
}

.rp-btn--ghost:hover {
    color: var(--ink);
    border-color: rgba(140, 180, 200, 0.5);
}

.rp-copied {
    margin: 0;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    background: rgba(93, 206, 122, 0.15);
    color: #8fe0a4;
    font-size: 0.9rem;
    font-weight: 600;
}

@media (max-width: 640px) {
    .rp-hero__inner {
        padding: 4.5rem 0 2.5rem;
        text-align: left;
    }

    .rp-modes {
        justify-content: flex-start;
        margin-left: 1.25rem;
        margin-right: 1.25rem;
        width: auto;
    }

    .rp-warning {
        flex-direction: column;
        text-align: center;
    }

    .rp-join__actions {
        flex-direction: column;
        width: 100%;
    }

    .rp-btn {
        width: 100%;
    }
}
