/* 
  HVOSTATAYA STRANA — SHARED COMPONENT STYLES 
  Editorial Strategy: "The Organic Curator" (Stitch-Driven)
*/

:root {
  /* Core Palette */
  --bg: #fff8f6; /* Warm Paper */
  --text: #2C1609; /* Deep Espresso */
  --accent: #FDC010; /* Brand Gold */
  --on-accent: #2C1609;
  
  /* Surface Hierarchy (Tonal Layering Instead of Borders) */
  --surface: #fff8f6;
  --surface-low: #FFF1EB;   /* Sectioning layer */
  --surface-high: #FFE2D6;  /* Deep inset */
  --surface-card: #FFFFFF;  /* High contrast pop */
  
  /* Radii */
  --radius-sm: 0.5rem;
  --radius-lg: 1.5rem;
  --radius-xl: clamp(1.5rem, 4vw, 3rem); /* Responsive rounding */
  --radius-pill: 9999px;
  
  /* Spacing */
  --spacing-section: clamp(60px, 10vw, 120px);
  --spacing-container: clamp(20px, 5vw, 80px);

  /* Transitions */
  --transition-smooth: 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  --shadow-ambient: 0 20px 50px rgba(44, 22, 9, 0.08); /* Premium soft shadow */
  --shadow-hover: 0 30px 70px rgba(44, 22, 9, 0.12);
}

/* ─── BASE RESET ─────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: transparent; /* Handled by #site-bg */
  color: var(--text);
  font-family: 'Be+Vietnam+Pro', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── DYNAMIC SITE BACKGROUND ────────────────── */
#site-bg {
  position: fixed;
  top: 0; left: 0; 
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
  background-color: #FFF8F6; /* Base Cream */
  overflow: hidden;
}

#sticker-bomb-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 150%;
  background-image: url('images/sticker_bomb_bg.png');
  background-repeat: repeat;
  background-size: 320px;
  opacity: 0.35; /* Увеличил непрозрачность, чтобы было "бомбой" */
  pointer-events: none;
  will-change: transform;
  z-index: 1;
}

h1, h2, h3, .nav-logo { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; letter-spacing: -0.02em; }
/* Typography clamps for premium scaling */
h1 { font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.1; }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.2; }
h3 { font-size: clamp(1.5rem, 4vw, 2.5rem); line-height: 1.3; }
p { font-size: clamp(1rem, 1.5vw, 1.125rem); }

img { max-width: 100%; display: block; border-radius: var(--radius-xl); }
a { color: inherit; text-decoration: none; transition: var(--transition-smooth); }

/* ─── NAVBAR (Glassmorphism) ────────────────────────── */
#navbar {
  position: fixed;
  top: 20px; left: 20px; right: 20px;
  background: rgba(255, 248, 246, 0.7);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-ambient);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.nav-logo { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--text); text-transform: uppercase; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-link { 
  font-size: 13px; font-weight: 800; text-transform: uppercase; 
  letter-spacing: 0.08em; opacity: 0.6; transition: 0.3s;
}
.nav-link:hover, .nav-link.active-link { opacity: 1; color: var(--text); }



/* ─── BUTTONS (Designer primitives) ───────────────── */
.btn-pill-master {
  padding: 18px 40px;
  background: var(--text);
  color: white;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(44, 22, 9, 0.15);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center; justify-content: center;
}
.btn-pill-master:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); background: #452410; }

.btn-accent { background: var(--accent); color: var(--text); }
.btn-accent:hover { background: #eab10e; }

/* ─── SHARED LAYOUT ────────────────────────────────── */
.p-offset { padding-top: var(--spacing-section); }
.section-gap { margin-bottom: var(--spacing-section); }

/* ─── MODAL OVERLAY ────────────────────────────────── */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(44, 22, 9, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 20000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: 0.6s var(--transition-smooth);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content {
  background: var(--surface-low);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: var(--radius-xl); 
  padding: clamp(30px, 5vw, 60px);
  width: calc(100% - 40px); max-width: 540px; 
  position: relative;
  transform: translateY(40px) scale(0.95); 
  transition: 0.8s var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-ambient);
}
.active .modal-content { transform: translateY(0) scale(1); }

/* ─── FORM GROUP (MODAL INPUTS) ────────────────────── */
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 10px; opacity: 0.4; }
.form-group input {
  width: 100%; padding: 18px 20px; background: rgba(44,22,9,0.03);
  border: 2px solid transparent; border-radius: 1.25rem;
  font-family: inherit; font-size: 16px; font-weight: 700; color: var(--text);
  transition: all 0.3s;
}
.form-group input:focus { outline: none; border-color: var(--accent); background: white; box-shadow: 0 10px 30px rgba(44,22,9,0.05); }

/* ─── SIDE MENU ─────────────────────────────────────── */
#side-menu {
  position: fixed;
  top: 0; right: 0;
  width: 100%; max-width: 440px; height: 100vh;
  background: rgba(255, 248, 246, 0.88);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  z-index: 10001;
  padding: clamp(40px, 8vw, 80px) clamp(25px, 5vw, 40px);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow: -20px 0 80px rgba(44, 22, 9, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.6);
  overflow-y: auto;
  touch-action: pan-y;
  transform: translateX(100%);
  will-change: transform;
}
#side-menu.active {
  transform: translateX(0) !important;
}
#menu-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(44, 22, 9, 0.2);
  backdrop-filter: blur(5px);
  z-index: 10000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s;
}
#menu-overlay.active {
  opacity: 1 !important;
  pointer-events: all;
}

.side-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: clamp(30px, 6vw, 60px); }
#menu-close { 
  width: 44px; height: 44px; border: 1.5px solid rgba(44, 22, 9, 0.1); 
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.4s; font-size: 16px; 
}
#menu-close:hover { background: var(--text); color: white; transform: rotate(90deg); }

.menu-group { margin-bottom: 50px; }
.menu-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.4; margin-bottom: 25px; font-weight: 900; }
.nav-item { display: block; margin-bottom: 30px; text-decoration: none; transition: 0.4s; }
.nav-item:hover { transform: translateX(10px); color: var(--accent); }
.nav-item-text-main { display: block; font-size: clamp(20px, 4vw, 24px); font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 8px; letter-spacing: -0.02em; }
.nav-item-text-sub { font-size: 13px; opacity: 0.5; font-weight: 500; }

.cabinet-card { 
  background: var(--surface-low);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: clamp(25px, 5vw, 35px); 
  border-radius: var(--radius-xl); 
  margin-bottom: 25px; 
  box-shadow: var(--shadow-ambient); 
}
.card-pill-tag { font-size: 11px; font-weight: 900; text-transform: uppercase; opacity: 0.4; margin-bottom: 15px; display: block; letter-spacing: 0.1em; }
.bonus-val { font-size: clamp(32px, 6vw, 38px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.bonus-val span { font-size: 18px; margin-left: 6px; opacity: 0.4; }

/* ─── FOOTER ────────────────────────────────────────── */
#footer {
  padding: clamp(60px, 10vw, 120px) var(--spacing-container); 
  background: rgba(44, 22, 9, 0.85); /* Glass espresso */
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  color: white;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: clamp(40px, 6vw, 60px);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
}
.footer-logo { font-size: clamp(20px, 4vw, 24px); font-weight: 800; margin-bottom: 30px; display: block; color: white; }
.footer-heading { font-size: 12px; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.4; margin-bottom: 30px; font-weight: 900; }
.footer-link { display: block; margin-bottom: 15px; opacity: 0.5; font-size: 15px; font-weight: 500; transition: 0.3s; }
.footer-link:hover { opacity: 1; color: var(--accent); transform: translateX(5px); }

/* ─── ARTICLE FIX ───────────────────────────────────── */
body main.article-body, body div.article-content {
  background: var(--surface-low) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-radius: var(--radius-xl) !important;
  padding: clamp(30px, 5vw, 60px) clamp(20px, 5vw, 80px) !important;
  box-shadow: var(--shadow-ambient) !important;
  position: relative;
  z-index: 10;
  margin-top: -60px !important; /* Pull up slightly over hero */
}
@media (max-width: 768px) {
  body main.article-body, body div.article-content {
    margin-top: -30px !important;
  }
}

/* ─── MOBILE ADAPTATION ───────────────────────────── */
@media (max-width: 1024px) {
  #footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  #navbar { padding: 12px 20px; top: 10px; left: 10px; right: 10px; border-radius: 2rem; }
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
  #footer { grid-template-columns: 1fr; text-align: center; }
  .footer-link:hover { transform: none; }
}

/* ─── UTILITIES ────────────────────────────────────── */
.avatar { width: 40px; height: 40px; background: var(--text); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; }
#user-profile { display: flex; align-items: center; gap: 12px; cursor: pointer; }

#kitten-follower {
  position: fixed;
  width: 20px; height: 20px;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  opacity: 0.9;
  left: 0; top: 0;
  background-image: url('kitten_sprite_sheet.webp');
  background-size: 500% auto;
  background-position: 0% 50%;
  background-repeat: no-repeat;
  will-change: transform;
}
