/* ══════════════════════════════════════════════════════════════
   ibelek.ru — Shared Styles
   ══════════════════════════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --bg: #06040f;
  --accent: #c9a96e;
  --accent2: #9b7fe8;
  --accent3: #e8a0bf;
  --text: #f0e8e0;
  --muted: #9e96b0;
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --danger: #e87a7a;
  --success: #7ae8b0;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom cursor only on devices with hover (not touch) */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  .lang-btn, .btn-logout { cursor: none; }
}

/* ── FOCUS VISIBLE ── */
*:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── SKIP TO CONTENT (accessibility) ── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  padding: 12px 24px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.3s;
}
.skip-to-content:focus {
  top: 12px;
}

/* ── NOISE GRAIN ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ── CUSTOM CURSOR ── */
#cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s, opacity 0.3s;
  mix-blend-mode: difference;
}

#cursor-ring {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(201,169,110,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease, border-color 0.3s;
}

body:has(a:hover) #cursor,
body:has(button:hover) #cursor { width: 20px; height: 20px; }
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring { width: 60px; height: 60px; border-color: var(--accent); }

/* ── PARTICLES CANVAS ── */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── GRADIENT ORBS ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(155,127,232,0.12) 0%, transparent 70%);
  top: -200px; left: -200px;
  animation-duration: 25s;
}

.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,169,110,0.08) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation-duration: 30s;
  animation-delay: -10s;
}

.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232,160,191,0.08) 0%, transparent 70%);
  top: 50%; left: 50%;
  animation-duration: 20s;
  animation-delay: -5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -60px) scale(1.05); }
  50% { transform: translate(-30px, 40px) scale(0.95); }
  75% { transform: translate(50px, 30px) scale(1.02); }
}

/* ── NAV BASE ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 60px;
  transition: background 0.5s, backdrop-filter 0.5s, padding 0.5s;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav-back:hover { color: var(--accent); }
.nav-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }

/* ── LANG SWITCHER ── */
.lang-switcher { display: flex; gap: 2px; }

.lang-btn {
  background: none;
  border: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 500;
}

.lang-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* ── BUTTONS ── */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  overflow: hidden;
  transition: transform 0.3s;
  border: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}

.btn-primary:hover::before { transform: translateX(0); }
.btn-primary:hover { color: var(--bg); }
.btn-primary span { position: relative; z-index: 1; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  border: 1px solid var(--glass-border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--glass);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  font-family: 'Inter', sans-serif;
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: rgba(201,169,110,0.05); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes lineUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}

.reveal.visible { opacity: 1; transform: translateY(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; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px;
  border-top: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
}

/* ── RESPONSIVE: disable heavy effects on small/slow devices ── */
@media (max-width: 768px) {
  nav { padding: 16px 24px; }

  .orb { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .orb { display: none; }
  #particles-canvas { display: none; }
  #cursor, #cursor-ring { display: none; }
  body { cursor: auto; }
}
