/* =====================================================================
   NEXUM LEX — Design tokens
   Palette: ink charcoal + warm ivory paper + a single muted brass accent.
   Display type: Fraunces (a serif with real editorial weight, used
   sparingly for headlines and the occasional oversized numeral).
   Body/UI type: Inter, set tight and quiet so the serif carries the
   personality instead of decoration.
   ===================================================================== */
:root {
    /* --ink is now the LIGHT text/accent tone (used on the dark canvas),
       --ivory/--paper are now the dark page & card surfaces. Keeping the
       same variable names means every section that referenced them
       automatically becomes part of one unified black-and-gold canvas. */
    --ink:        #f3ecda;
    --ink-70:     rgba(243,236,218,0.7);
    --ink-50:     rgba(243,236,218,0.5);
    --navy-900:   #0a0906;
    --navy-800:   #14110a;
    --navy-700:   #201a10;
    --gold:       #b8912f;
    --gold-soft:  #e8cb7d;
    --gold-dim:   rgba(184,145,47,0.35);
    --ivory:      #0a0906;
    --paper:      #16130c;
    --muted:      #a99a7e;
    --muted-light:#cabfa8;
    --line:       rgba(243,236,218,0.14);
    --line-dark:  rgba(243,236,218,0.08);

    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
a {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

a:hover {
    color: var(--gold);
}

body {
    background: var(--ivory);
    font-family: var(--font-body);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo, .side-logo, .footer-logo {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink);
}

/* Small tracked label used above section headings site-wide */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
}
.eyebrow::before {
    content: "";
    display: block;
    width: 28px;
    height: 1px;
    background: var(--gold);
}

.toast {
    position: fixed;
    top: 30px;
    right: 30px;

    min-width: 250px;
    max-width: 400px;

    padding: 16px 20px;

    border-radius: 4px;

    background: var(--navy-900);
    color: var(--ink);

    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;

    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(184,145,47,0.12);

    opacity: 0;
    transform: translateY(-20px);

    pointer-events: none;

    transition:
        opacity 0.4s ease,
        transform 0.4s ease;

    z-index: 999999;
    border-left: 3px solid var(--gold);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-left-color: #4caf7d;
}

.toast.error {
    border-left-color: #d16455;
}

#terms-link, #privacy-link {
    position: relative;
    z-index: 10000;
}

#terms-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10,14,18,0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#terms-popup-content {
    background: var(--paper);
    padding: 40px;
    border-radius: 4px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    color: var(--ink);
    font-family: var(--font-body);
    border-top: 3px solid var(--gold);
}
#terms-popup-content h2 {
    margin-bottom: 18px;
    font-size: 26px;
}
#terms-popup-content p, #terms-text-container {
    line-height: 1.75;
    color: var(--muted);
}

.close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 24px;
    cursor: pointer;
    color: var(--muted);
    font-family: var(--font-body);
}

.close-btn:hover {
    color: var(--ink);
}

/* 2top */
#scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.25s ease, background 0.25s ease;
}
#scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}
#scroll-to-top:hover {
  background: var(--gold-soft);
  transform: translateY(-3px);
}
#scroll-to-top .arrow-up {
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--navy-900);
  border-top: 2px solid var(--navy-900);
  transform: rotate(45deg);
  margin-top: 4px;
}
/* =========== soc btn =========== */
.social {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-left: 8px;
}
.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--line);
}
.social-link img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: grayscale(1) opacity(0.75);
    transition: filter 0.3s ease;
}
.social-link:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
}
.social-link:hover img {
    filter: none;
}
/* ================= LANGUAGE SWITCH ================= */
.lang-switch {
    position: relative;
    z-index: 20;
}
.lang-current {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 9px 16px;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.lang-current::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.25s ease;
    opacity: 0.6;
}
.lang-switch.open .lang-current::after {
    transform: rotate(225deg) translateY(2px);
}
.lang-current:hover {
    border-color: var(--gold);
}
.lang-options {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 100%;
    list-style: none;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(184,145,47,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.25s ease;
}
.lang-switch.open .lang-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-options li {
    padding: 9px 14px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ink);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.lang-options li:hover {
    background: var(--ivory);
}
.lang-options li.active {
    color: var(--gold);
}

/* ================= BUTTONS ================= */
.gold-btn {
    background: var(--ink);
    color: var(--navy-900);
    border: 1px solid var(--ink);
    padding: 16px 38px;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.35s ease;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.gold-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.35) 40%, transparent 60%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.gold-btn:hover::before {
    transform: translateX(120%);
}

.gold-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-900);
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(184,145,47,0.3);
}

/* ================= HEADER ================= */
.header {
    background-color: var(--ivory);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 26px 100px;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--line);
}
.logo {
    font-size: 22px;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.logo img {
    height: 46px;
}
.logo span {
    font-size: 21px;
}
nav a {
    margin-left: 40px;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    transition: 0.3s;
    position: relative;
}
nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}
nav a:hover {
    color: var(--ink);
}
nav a:hover::after {
    width: 100%;
}

/* ================= HAMBURGER ================= */
.hamburger {
    width: 26px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}
.hamburger span {
    height: 1px;
    background: var(--ink);
    transition: 0.3s;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* ========== Overlay ========== */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,14,18,0.55);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 8;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}


/* ================= SIDE MENU ================= */

.side-menu {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90%;
    height: 100vh;
    background: var(--navy-900);
    color: var(--ink);
    transition: right 0.45s ease;
    z-index: 999;
    padding: 44px 34px;
    box-sizing: border-box;
    overflow-y: auto;
}

.side-menu.open {
    right: 0;
}


/* ================= HEADER ================= */

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line-dark);
}

.side-logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--ink);
}

.side-logo span {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-soft);
    margin-top: 6px;
}

.side-menu .close-btn {
    font-size: 22px;
    cursor: pointer;
    transition: 0.3s ease;
    color: var(--ink);
    position: static;
}

.side-menu .close-btn:hover {
    color: var(--gold-soft);
    transform: rotate(90deg);
}


/* ================= CONTENT ================= */

.side-content h3 {
    margin-top: 28px;
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--ink);
}

.side-content p {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.75;
    color: var(--muted-light);
    margin-bottom: 10px;
}

.side-content .social-link {
    border-color: var(--line-dark);
}
.side-content .social-link img {
    filter: none;
    opacity: 0.85;
}


/* ================= FORM ================= */

.contact-form {
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.contact-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.contact-form input::placeholder {
    color: var(--muted-light);
}

.contact-form input:focus {
    border-color: var(--gold);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 2px rgba(163,130,76,0.18);
}

.contact-form button {
    width: 100%;
    padding: 15px;
    margin-top: 6px;
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy-900);
}
.contact-form button:hover {
    background: var(--gold-soft);
    border-color: var(--gold-soft);
}


/* ================= PRELOADER ================= */

.preloader {
    position: fixed;
    inset: 0;
    background: var(--navy-900);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease, filter 1s ease;
}
.preloader-text {
    font-family: var(--font-display);
    font-size: 46px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--ink);
    opacity: 0;
    animation: textReveal 1.2s ease forwards;
}
@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}
.preloader.hide {
    opacity: 0;
    filter: blur(12px);
    pointer-events: none;
}

/* ================= FOOTER ================= */

.footer {
    position: relative;
    background: var(--navy-900);
    color: var(--ink);
    padding: 110px 0 0;
    margin-top: 40px;
    overflow: hidden;
}
.footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/images/12.png") no-repeat 20% bottom;
    background-size: 400px;
    opacity: 0.04;
    pointer-events: none;
}
.footer::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    pointer-events: none;
}
.footer-container {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 60px;
    padding: 0 8%;
    position: relative;
    z-index: 2;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 22px;
    letter-spacing: 0;
}
.footer-logo img {
    height: 56px;
}
.footer-logo span {
    font-size: 20px;
    color: var(--gold-soft);
    margin-left: 6px;
    font-family: var(--font-display);
}
.footer-logo:hover {
    opacity: 0.85;
}
.footer-col h4 {
    margin-bottom: 22px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-soft);
}
.footer-col p {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.85;
    color: var(--muted-light);
}
.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col ul li {
    margin-bottom: 14px;
}
.footer-col ul li a {
    color: var(--muted-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    font-size: 15px;
}
.footer-col ul li a:hover {
    color: var(--gold-soft);
    padding-left: 6px;
}
.footer-bottom {
    border-top: 1px solid var(--line-dark);
    margin-top: 90px;
    padding: 26px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--muted-light);
    position: relative;
    z-index: 2;
}
.footer-links a {
    margin-left: 25px;
    color: var(--muted-light);
    text-decoration: none;
    transition: 0.3s;
    font-family: var(--font-body);
    font-size: 13px;
}
.footer-links a:hover {
    color: var(--gold-soft);
}


/* ======= Breadcrumbs ======= */
.breadcrumbs {
    background: var(--navy-900);
    padding: 18px 0;
    color: var(--muted-light);
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 0.04em;
}
.breadcrumbs .container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 0 4%;
}
.breadcrumbs a {
    color: var(--gold-soft);
    text-decoration: none;
}

@media (max-width: 1200px) {
    .displayNONE {
        display: none;
    }
    .header {
        padding: 20px 20px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
    }
}

@media (max-width: 700px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-links a {
        margin: 0 10px;
    }
}

/* Смартфоны (до 768px) */
@media (max-width: 768px) {
    .preloader-text {
        font-size: 26px;
        letter-spacing: 0.02em;
        padding: 0 20px;
        text-align: center;
        line-height: 1.4;
    }
    /* Скрываем обычную навигацию, оставляем бургер */
    .nav {
        display: none;
    }

    #lang-select {
        margin-right: 15px;
    }
    /* Футер */
    .footer-container {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .footer-logo img {
        height: 44px;
    }

    .footer-logo span {
        font-size: 18px;
    }
}
/* Маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .preloader-text {
        font-size: 26px;
        letter-spacing: 0.02em;
    }
}
