/* ============================================================
   RUNDECYL — ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ СТРАНИЦ
   Подключается на index.html, products.html, documents.html
   Содержит: переменные, reset, лоадер, reveal-анимации, nav,
   базовые кнопки, footer, модалку заказа, swal2.
   Стили, специфичные только для одной страницы (секции главной,
   карточки продуктов, карточки документов), остаются в <style>
   соответствующего файла.
   ============================================================ */

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

:root {
  --teal: #63C0AB; --teal-dark: #168C71; --dark: #0F1011;
  --dark2: #141428; --title: #0A0916; --mid: #1A1A35;
  --light: #F4F6F8; --white: #ffffff; --gray: #6B7280;
  --text: #494857; --radius: 1rem;
  --font-base: "Nunito Sans"; --font-mono: "JetBrains Mono", monospace;
}

html, body { font-size: 1.146vw; }
@media screen and (max-width: 1000px) { html, body { font-size: 3.2vw; } }
html { scroll-behavior: smooth; }
body { font-family: var(--font-base); color: var(--text); background: var(--white); overflow-x: hidden; }
.container { max-width: 80rem; margin: 0 auto; padding: 0 4rem; width: 100%; }
 .hero-bg { background-image: url(/images/hero.jpg); background-repeat: no-repeat; background-position: right top; position: relative; overflow: hidden; }
/* ── PAGE LOADER ──────────────────────────────────────────── */
#page-loader {
  position: fixed; inset: 0; z-index: 99999999;
  background-image: url(/images/hero.jpg); background-repeat: no-repeat; background-position: right top; background-size: cover;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-logo {
  font-family: var(--font-mono);
  font-size: 2.5rem; font-weight: 700; color: #fff;
  letter-spacing: 3px; margin-bottom: 2rem;
  opacity: 0; transform: translateY(12px);
  animation: loaderFadeIn 0.5s ease forwards 0.1s;
}
  .loader-logo { color: var(--black); }
  .loader-logo span { color: var(--black); }

.loader-bar-wrap { width: 14rem; height: 3px; background: #ffffff15; border-radius: 99px; overflow: hidden; }
.loader-bar {
  height: 100%; background: linear-gradient(90deg, #63C0AB, #168C71);
  border-radius: 99px; width: 0%;
  animation: loaderProgress 1.2s ease forwards 0.2s;
}
.loader-text {
  font-family: 'Nunito Sans', sans-serif; font-size: 0.75rem;
  color: #ffffff40; margin-top: 1rem; letter-spacing: 1px;
  opacity: 0; animation: loaderFadeIn 0.5s ease forwards 0.3s;
}
@keyframes loaderFadeIn { to { opacity: 1; transform: translateY(0); } }
@keyframes loaderProgress { to { width: 100%; } }

/* ── SCROLL ANIMATIONS ───────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(.4,0,.2,1), transform 0.65s cubic-bezier(.4,0,.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left {
  opacity: 0; transform: translateX(-28px);
  transition: opacity 0.65s cubic-bezier(.4,0,.2,1), transform 0.65s cubic-bezier(.4,0,.2,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0; transform: translateX(28px);
  transition: opacity 0.65s cubic-bezier(.4,0,.2,1), transform 0.65s cubic-bezier(.4,0,.2,1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── NAV ──────────────────────────────────────────────────────── */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 999; display: flex; align-items: center; height: 4rem; background: transparent; box-shadow: none; transition: background 0.3s ease, box-shadow 0.3s ease; }
nav.scrolled { background: rgba(255,255,255,0); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.05); }
nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}
nav .nav-logo {width: 13rem; height: 2.6rem;  }
nav .nav-logo img { width: 100%; height: auto; }
nav .nav-logo img {
  width: 13rem !important;
  max-width: none !important;
  height: auto !important;
}
nav.scrolled .nav-logo { color: var(--dark); }
.nav-links { display: flex; gap: 2.25rem; list-style: none.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}; }
.nav-links li {
  white-space: nowrap;
}
.nav-links li {
  list-style: none !important;
}
.nav-links a { color: #66647A; font-family: var(--font-base); text-decoration: none; font-size: 1rem; font-weight: 600; transition: color .3s ease; }
.nav-links a.active { color: #168C71 !important; }
.nav-links a:hover { color: #168C71; }
.btn-buy-nav { background: var(--teal); color: var(--white); font-weight: 700; font-size: 1rem; font-family: var(--font-base); border: none; cursor: pointer; padding: 0.625rem 1.75rem; border-radius: 0.5rem; text-decoration: none; transition: background .2s; }
.btn-buy-nav:hover { background: var(--teal-dark); }
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 4rem;
  left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-base);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--title);
  text-decoration: none;
  padding: 1rem 2rem;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}
.mobile-menu a:hover { color: var(--teal-dark); }

/* ── BASE BUTTONS ─────────────────────────────────────────────── */
.btn-primary { background: var(--teal); color: var(--white); font-weight: 700; font-family: var(--font-base); font-size: 1rem; padding: 0.875rem 2rem; border-radius: 0.625rem; text-decoration: none; border: none; cursor: pointer; transition: background .2s, transform .15s; display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: #168C71; font-weight: 600; font-size: 0.9375rem; padding: 0.875rem 2rem; border-radius: 0.625rem; text-decoration: none; border: 1.5px solid #168C711A; cursor: pointer; transition: border-color .2s, color .2s; }
.btn-secondary:hover { border-color: var(--teal-dark); color: var(--teal-dark); }

/* ── SECTION BASE ─────────────────────────────────────────────── */
section { padding: 5rem 0; }
.section-title { font-size: 2.4rem; font-weight: 900; margin-bottom: 3rem; color: var(--title); text-align: center; }

/* ── PAGE HERO (используется на products.html / documents.html) ── */
.page-hero { background: transparent; padding: 9rem 0 4rem; position: relative; overflow: hidden; }
.page-hero-bg-dots { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, rgba(64,201,181,0.18) 1.5px, transparent 1.5px); background-size: 2.375rem 2.375rem; }
.page-hero-glow { position: absolute; right: 8%; top: 50%; transform: translateY(-50%); width: 28rem; height: 28rem; border-radius: 50%; background: radial-gradient(circle, rgba(64,201,181,0.14) 0%, transparent 70%); pointer-events: none; }
.page-hero .container { position: relative; z-index: 2; }
.page-hero-inner { display: flex; align-items: center; gap: 2rem; }
.page-hero h1 { font-size: 3rem; font-weight: 900; color: var(--title); line-height: 1.1; margin-bottom: 1rem; }
.page-hero p { color: var(--text); font-size: 0.95rem; line-height: 1.8; max-width: 52rem; margin-top: 0.75rem; }

/* ── FOOTER ───────────────────────────────────────────────────── */
footer { background: var(--white); padding: 2.5rem 0 1.5rem; border-top: 1px solid #E5E7EB; }
footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; }
footer .container-flex { display: flex; align-items: center; gap: 4rem; }
.footer-brand { display: flex; flex-direction: column; gap: 0.375rem; }
.footer-logo a{ font-weight: 700; font-size: 2rem; letter-spacing: 2px; color: var(--title); font-family: var(--font-mono); text-decoration: none;}
.footer-tagline { font-family: var(--font-base); font-weight: 700; font-size: 0.8125rem; color: var(--title); }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.footer-links a { font-family: var(--font-base); font-weight: 700; font-size: 0.8125rem; color: var(--title); text-decoration: none; }
.footer-links a:hover { color: var(--teal); }
.footer-links p { font-family: var(--font-base); font-weight: 700; font-size: 0.8125rem; color: var(--title); text-decoration: none; }
.footer-links p:hover { color: var(--teal); }
.footer-copy { width: 100%; border-top: 1px solid #E5E7EB; margin-top: 1.5rem; padding-top: 1.5rem; font-size: 0.75rem; color: var(--gray); line-height: 1.9; }
.footer-copy strong { color: var(--title); }

/* ── SWEETALERT2 OVERRIDES ───────────────────────────────────── */
.swal2-confirm { background: var(--teal) !important; font-family: var(--font-base) !important; font-weight: 700 !important; border-radius: 0.5rem !important; box-shadow: none !important; }
.swal2-confirm:hover { background: var(--teal-dark) !important; }
.swal2-popup { font-family: var(--font-base) !important; border-radius: 1rem !important; }

/* ── ORDER MODAL (форма заказа, доступна на всех страницах) ─── */
.order-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.order-modal.show { display: flex; }
.order-modal-content { background: var(--white); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 26rem; position: relative; margin: 1rem; }
.order-modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); line-height: 1; }
.order-modal-content h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 1.25rem; color: var(--title); }
.order-input { width: 100%; padding: 0.75rem 1rem; border-radius: 0.5rem; border: 1.5px solid #168C711A; font-family: var(--font-base); font-size: 0.875rem; margin-bottom: 0.75rem; color: var(--text); }
.order-input:focus { outline: none; border-color: var(--teal-dark); }
#orderSubmitBtn { width: 100%; margin-top: 0.5rem; }
.btn-cart { background: var(--teal-dark); color: var(--white); font-weight: 700; font-size: 0.875rem; padding: 0.75rem 1.25rem; width: 10rem; border-radius: 0.5rem; border: none; cursor: pointer; white-space: nowrap; transition: background .2s; font-family: var(--font-base); }
.btn-cart:hover { background: var(--teal-dark); }

/* ── AGREEMENT MODAL (пользовательское соглашение, футер) ─────── */
.agreement-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.agreement-modal.show { display: flex; }
.agreement-modal-content { background: var(--white); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 40rem; max-height: 80vh; overflow-y: auto; position: relative; margin: 1rem; }
.agreement-modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); line-height: 1; }
.agreement-modal-content h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 1.25rem; color: var(--title); }
.agreement-modal-content h4 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 0.5rem; color: var(--title); }
.agreement-modal-content p, .agreement-modal-content li { font-size: 0.875rem; line-height: 1.6; color: var(--text); margin-bottom: 0.5rem; }
.agreement-modal-content ol { padding-left: 1.25rem; }

/* ── RESPONSIVE (общие блоки) ─────────────────────────────────── */
@media (max-width: 1000px) {
  .container { padding: 0 1.5rem; }
  nav { height: 4rem; }
  .nav-links { display: none; }
    .btn-buy-nav { display: none; }
  .burger { display: flex; }
  .section-title { font-size: 2rem; margin-bottom: 2rem; }
  .page-hero h1 { font-size: 2rem; }
  footer .container { flex-direction: column; align-items: center; text-align: center; }
  .footer-brand{width:100%;}
  .footer-links { flex-direction: column;  gap: 0.75rem; width:100%; text-align: center;  }
  .order-row { flex-direction: column; align-items: stretch; }
  .order-row > * { width: 100%; }
  .qty-control { justify-content: center; }
  .btn-cart { width: 100%; }
  .order-modal-content { margin: 1rem; padding: 1.5rem; max-width: calc(100vw - 2rem); }
  .order-input { font-size: 1rem; }
  .order-modal-close { font-size: 2rem; top: 0.75rem; right: 0.75rem; }
  .agreement-modal-content { margin: 1rem; padding: 1.5rem; max-width: calc(100vw - 2rem); max-height: 85vh; }
  .agreement-modal-close { font-size: 2rem; top: 0.75rem; right: 0.75rem; }
  footer .container-flex { display: flex; flex-direction:column; width:100%; align-items: center; gap: 4rem; }
}

@media (max-width: 580px) {
  .section-title { font-size: 2rem; }
}

.site-legal-footer {
padding-left: 40px;
padding-right: 24px;
box-sizing: border-box;
}

.site-legal-footer p {
margin-left: 0;
margin-right: 0;
text-align: left;
}
.btn-preorder {
    font-family: var(--font-base) !important;
}

nav .container {
    max-width: 1600px !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

.nav-links {
    gap: 1rem !important;
    flex-wrap: nowrap !important;
}

.nav-links a {
    font-size: 0.9rem !important;
}
nav .btn-buy-nav {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
    font-size: 14px !important;
    text-align: center !important;
}
/* ── ОШИБКИ ФОРМЫ ЗАКАЗА ───────────────────────────── */

.order-input-error {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 1px #e53935 !important;
}

.order-input-error:focus {
    border-color: #e53935 !important;
    box-shadow: 0 0 0 1px #e53935 !important;
}

.order-consent-error {
    outline: 2px solid #e53935;
    outline-offset: 2px;
}

/* ============================================================
   ПРАВКИ 07.10.2026 — шапка, форма заявки
   Блок дописан в конец и перекрывает прежние частные правки шапки
   (фикс. ширина кнопки 100px, лого 13rem). Размеры в rem, как в
   исходной вёрстке rundecyl.arkady.pro.
   ============================================================ */

/* Шапка: одна высота, лого внутри, ровные отступы */
nav { height: 4rem; }
nav .container {
  max-width: 80rem !important;
  height: 100%;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
nav .nav-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  width: 10rem;
  height: 4rem;
  line-height: 0;
}
nav .nav-logo img {
  display: block;
  width: 10rem !important;
  max-width: 10rem !important;
  height: auto !important;
  max-height: 3.2rem;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem !important;
  flex: 0 1 auto;
  flex-wrap: nowrap !important;
  margin: 0;
  padding: 0;
  min-width: max-content;
}
.nav-links li { list-style: none; white-space: nowrap; }
.nav-links a {
  display: inline-block;
  font-size: 0.875rem !important;
  line-height: 1.2;
  padding: 0.25rem 0;
}
/* Кнопка — пропорции исходной вёрстки, без фиксированной ширины */
nav .btn-buy-nav {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0.625rem 1.75rem !important;
  font-size: 1rem !important;
  line-height: 1.2;
  white-space: nowrap;
  box-sizing: border-box;
}
.burger { flex: 0 0 auto; }

/* 9 пунктов не помещаются — раньше уходим в бургер, чтобы меню не налезало */
@media (max-width: 1240px) {
  .nav-links { display: none !important; }
  nav .container > .btn-buy-nav { display: none !important; }
  .burger { display: flex; }
}
@media (max-width: 1000px) {
  nav .container { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
  nav .nav-logo { width: 8rem; }
  nav .nav-logo img { width: 8rem !important; max-width: 8rem !important; max-height: 2.6rem; }
}
/* Кнопка предзаказа в мобильном меню видна (общее правило прятало и её) */
.mobile-menu .btn-buy-nav { display: inline-flex !important; width: auto; border-bottom: 0; color: var(--white); }

/* Форма заявки: ошибки */
#orderModal label.order-consent-error {
  outline: none;
  color: #e53935;
}
#orderModal label.order-consent-error input[type="checkbox"] {
  outline: 2px solid #e53935;
  outline-offset: 2px;
  accent-color: #e53935;
}
.order-form-msg {
  display: none;
  margin: 0.5rem 0 0.75rem;
  color: #e53935;
  font-size: 0.875rem;
  line-height: 1.4;
}
