/* ================================================================
   BASE.CSS — Reset, переменные, zoom-система, scroll stack
================================================================ */

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

/* :root {
  --gold:       #c9a96e;
  --gold-light: #e8c98a;
  --gold-dim:   #a07840;
  --cream:      #f5f0e8;
  --dark-brown: #1a0d05;
  --text-dark:  #2a1f14;
  --text-mid:   #4a3828;
} */

:root {
  --gold:       #c9a96e;
  --gold-light: #e8c98a;
  --gold-dim:   #a07840;
  --cream:      #FFF5EF;
  --dark-brown: #1a0d05;
  --text-dark:  #332000;
  --text-mid:   #4a3828;
  --accent:     #DE8B23;
}

/* ── Zoom system ── */
html {
  overflow-x: hidden;
  overflow-y: auto;
/*   height: auto; */
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
	background-color: black;
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  overflow-x: hidden;
  position: relative;
  background-color: rgba(255, 250, 245, 0.15);
	
  font-family: 'Raleway', sans-serif;
}

#page-wrapper {
  width: 1440px;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* @media (max-width: 980px) { #page-wrapper { width: 744px; } } */
@media (max-width: 768px) { #page-wrapper { width: 375px; } }

/* ── Scroll stack ── */
.stack-wrapper {
  position: relative;
  background: #d3b9aa;
	display: flex;
	flex-direction: column;
	gap: 0;
	
}

.scroll-budget {
  background: transparent !important;
  pointer-events: none;
  display: none;
}

.panel {
   position: relative;
 /* top: 0; */
  width: 100%;
/*   height: 700px; */
/*   overflow: hidden; */
/*   background: transparent; */
}

/* @media (max-width: 480px) { 
  .panel {
    height: unset;
    min-height: 700px;
  }
} */

/* .panel:nth-child(1)  { z-index: 1;  }
.panel:nth-child(2)  { z-index: 2;  }
.panel:nth-child(3)  { z-index: 3;  }
.panel:nth-child(4)  { z-index: 4;  }
.panel:nth-child(5)  { z-index: 5;  }
.panel:nth-child(6)  { z-index: 6;  }
.panel:nth-child(7)  { z-index: 7;  }
.panel:nth-child(8)  { z-index: 8;  }
.panel:nth-child(9)  { z-index: 9;  }
.panel:nth-child(10) { z-index: 10; }
.panel:nth-child(11) { z-index: 11; }
.panel:nth-child(12) { z-index: 12; } */

/* ── Panel inner fade-in ── */
.panel-inner {
  width: 100%;
  height: 100%;
/*   opacity: 0; */
/*   transform: translateY(30px); */
/*   transition: opacity 0.7s ease, transform 0.7s ease; */
  position: relative;
}
.panel-inner.visible {
/*   opacity: 1; */
/*   transform: translateY(0); */
}

/* ── Background layer ── */
.bg {
  position: absolute;
top: -1px;
  inset: 0;
  background-size: cover;
/*   background-position: center; */
/*   background-repeat: no-repeat; */
  height: calc(100% + 1px);
/*   min-height: 700px; */
}

/* тёмная тема — лёгкий оверлей */
/* .theme-dark { color: var(--cream); } */
/* .theme-dark .bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 5, 0, 0.35);
} */

/* светлая тема */
/* .theme-light { color: var(--text-dark); }
.theme-light .bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 250, 245, 0.15);
} */

/* Контент поверх фона */
.panel-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ── Overrides: корректный :root и высота панелей от JS-переменной --vh ── */


/* .panel {
  height: var(--vh, 100vh);
}

.scroll-budget {
  height: var(--vh, 100vh);
} */

.btn {
  background: var(--cream);
  border: 1.5px solid rgba(245,240,232,0.85);
  color: var(--dark-brown);
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  padding: 12px 30px;
  cursor: pointer;
  transition: background .25s;
  white-space: nowrap;
  letter-spacing: .5px;
  border-radius: 10px;
}
.btn:hover { background: transparent; 
  color: var(--cream);
}

a {
	color: unset;
	text-decoration: unset;
}

/* ─── Попап ────────────────────────────────────── */
.auth-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.auth-popup.is-open { display: flex; }

.auth-popup__overlay {
    position: absolute;
    inset: 0;
}

.auth-popup__box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    margin: 16px;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 20px;
    padding: 58px 28px 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.2);
    animation: authFlipIn .55s cubic-bezier(.23,1,.32,1) both;
}

@keyframes authFlipIn {
    0%   { opacity:0; transform:perspective(800px) rotateX(22deg) scale(.93); filter:blur(8px); }
    100% { opacity:1; transform:perspective(800px) rotateX(0) scale(1); filter:blur(0); }
}

/* ─── Закрытие ─────────────────────────────────── */
.auth-popup__close {
    position: absolute;
    top: 14px; right: 16px;
    width: 28px; height: 28px;
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 50%;
    color: rgba(255,255,255,.6);
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s;
}
.auth-popup__close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ─── Табы ─────────────────────────────────────── */
.auth-tabs {
    display: flex;
    background: rgba(0,0,0,.25);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 22px;
}
.auth-tab {
    flex: 1;
    padding: 9px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,.45);
    font-size: .9rem;
    font-weight: 500;
    border-radius: 9px;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.auth-tab.active {
    background: rgba(255,255,255,.12);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* ─── Формы ────────────────────────────────────── */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 13px;
    animation: authFadeUp .3s ease both;
}
.auth-form.active { display: flex; }

@keyframes authFadeUp {
    from { opacity:0; transform:translateY(6px); }
    to   { opacity:1; transform:translateY(0); }
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.auth-form input {
    padding: 11px 14px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    font-size: .95rem;
    color: #fff;
    outline: none;
    transition: border-color .2s, background .2s;
    width: 100%;
}
.auth-form input::placeholder { color: rgba(255,255,255,.22); }
.auth-form input:focus {
    border-color: rgba(222,139,35,.6);
    background: rgba(255,255,255,.11);
}

/* ─── Ошибка ───────────────────────────────────── */
.auth-popup__error {
    color: #ffaaaa;
    font-size: .875rem;
    margin-bottom: 4px;
    padding: 8px 12px;
    background: rgba(255,80,80,.12);
    border: 1px solid rgba(255,80,80,.2);
    border-radius: 8px;
}

/* ─── Кнопка ───────────────────────────────────── */
.auth-popup__submit {
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #f0a93a 0%, #DE8B23 55%, #c4720f 100%);
    box-shadow: 0 4px 20px rgba(222,139,35,.4);
    position: relative;
    overflow: hidden;
    transition: transform .15s, box-shadow .15s, filter .15s;
    margin-top: 2px;
}
.auth-popup__submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,.15) 0%, transparent 60%);
}
.auth-popup__submit:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(222,139,35,.55); filter: brightness(1.07); }
.auth-popup__submit:active { transform: translateY(1px); }
.auth-popup__submit:disabled { opacity: .6; cursor: default; transform: none; }

/* ─── Подсказка-ссылка ─────────────────────────── */
.auth-hint {
    text-align: center;
    font-size: .8rem;
    color: rgba(255,255,255,.35);
}
.auth-hint a {
    color: rgba(222,139,35,.85);
    text-decoration: none;
    transition: color .15s;
}
.auth-hint a:hover { color: #DE8B23; }

@media (max-width: 768px) {
    .auth-popup__box { padding: 54px 18px 28px; }
}

.auth-open-popup {
	background: none;
    border: unset;
    font-size: 16px;
    color: #bbb;
    font-weight: 300;
    padding-right: 20px;
}

.auth-welcome {
	color: #bbb;
	
}

/* ─── Адаптив ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .auth-popup__box { padding: 28px 20px; }
}