/* ============================================
   КРАТКО СЛЪНЦЕ - Base Styles
   Variables, Reset, Typography
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Color Palette - Cinematic warm tones */
  --bg-deep: #1a1510;
  --bg-warm: #2c2416;
  --earth-deep: #2C2416;
  --earth-mid: #4A3C2A;
  --ochre-dust: #C9A66B;
  --ochre-light: #D4B87A;
  --sun-gold: #E8B830;
  --sun-bright: #F5C842;
  --gold-glow: #ffd54f;
  --cream-heat: #F5EBD7;
  --cream-light: #FAF6ED;
  --text-dark: #1A1A1A;
  --text-body: #2D2A26;
  --accent-rust: #8B5A2B;
  --accent-terracotta: #A0522D;

  /* Glassmorphism surfaces */
  --surface: rgba(44, 36, 22, 0.85);
  --surface-glass: rgba(44, 36, 22, 0.6);
  --surface-light: rgba(245, 235, 215, 0.9);

  /* Functional colors - Dark cinematic theme */
  --bg-primary: var(--bg-deep);
  --bg-section: var(--bg-warm);
  --bg-dark: var(--earth-deep);
  --text-primary: var(--cream-heat);
  --text-secondary: rgba(245, 235, 215, 0.7);
  --text-muted: rgba(245, 235, 215, 0.5);
  --text-inverse: var(--earth-deep);
  --accent-primary: var(--sun-gold);
  --accent-secondary: var(--ochre-dust);
  --border-light: rgba(232, 184, 48, 0.2);
  --border-dark: rgba(44, 36, 22, 0.2);
  --border-gold: rgba(232, 184, 48, 0.3);

  /* Shadows - Enhanced for dark theme */
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(232, 184, 48, 0.4);
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.4);

  /* Typography scale (fluid) - 25px base (+25% from 20px) */
  --font-size-xs: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);      /* ~17-20px */
  --font-size-sm: clamp(1.25rem, 1.2rem + 0.4vw, 1.4rem);       /* ~20-22px */
  --font-size-base: clamp(1.5625rem, 1.4rem + 0.6vw, 1.72rem);  /* ~25-27px */
  --font-size-md: clamp(1.72rem, 1.5rem + 0.75vw, 1.875rem);    /* ~27-30px */
  --font-size-lg: clamp(1.875rem, 1.6rem + 1vw, 2.2rem);        /* ~30-35px */
  --font-size-xl: clamp(2.2rem, 1.75rem + 1.9vw, 2.8rem);       /* ~35-45px */
  --font-size-2xl: clamp(2.8rem, 2.2rem + 3.1vw, 4.4rem);       /* ~45-70px */
  --font-size-3xl: clamp(3.75rem, 3.1rem + 3.75vw, 5.6rem);     /* ~60-90px */
  --font-size-hero: clamp(4.4rem, 3.75rem + 5vw, 7.5rem);       /* ~70-120px */

  /* Line heights */
  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Letter spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;
  --tracking-widest: 0.2em;

  /* Spacing scale */
  --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --space-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  --space-xl: clamp(2rem, 1.5rem + 2.5vw, 4rem);
  --space-2xl: clamp(3rem, 2rem + 5vw, 6rem);
  --space-3xl: clamp(4rem, 3rem + 6vw, 8rem);
  --space-section: clamp(4rem, 3rem + 8vw, 10rem);

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;

  /* Z-index scale */
  --z-base: 0;
  --z-above: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-overlay: 400;
  --z-modal: 500;
  --z-toast: 600;

  /* Layout */
  --header-height: 60px;
  --nav-dots-width: 40px;
  --container-max: 1200px;
  --content-max: 800px;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  height: 100%;
  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}


body {
  min-height: 100%;
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

/* Remove default focus styles, we'll add our own */
:focus {
  outline: none;
}

/* Custom focus visible styles for accessibility */
:focus-visible {
  outline: 2px solid var(--sun-gold);
  outline-offset: 2px;
}


/* ---------- Typography ---------- */

/* Font stacks with Cyrillic priority - Times New Roman */
body {
  font-family:
    "Times New Roman",
    Times,
    "Noto Serif",
    Georgia,
    serif;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

/* Serif display font - Times New Roman */
.font-display {
  font-family:
    "Times New Roman",
    Times,
    "Noto Serif",
    Georgia,
    serif;
}

/* All headings use display font */
h1, h2, h3, h4, h5, h6,
.heading {
  font-family:
    "Times New Roman",
    Times,
    "Noto Serif",
    Georgia,
    serif;
  font-weight: 400;
  line-height: var(--line-height-tight);
  color: var(--cream-heat);
}

/* Heading sizes */
h1, .h1 {
  font-size: var(--font-size-3xl);
  letter-spacing: var(--tracking-tight);
}

h2, .h2 {
  font-size: var(--font-size-2xl);
  letter-spacing: var(--tracking-tight);
}

h3, .h3 {
  font-size: var(--font-size-xl);
}

h4, .h4 {
  font-size: var(--font-size-lg);
}

h5, .h5 {
  font-size: var(--font-size-md);
}

h6, .h6 {
  font-size: var(--font-size-base);
  font-weight: 600;
}

/* Body text */
p {
  line-height: var(--line-height-relaxed);
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

/* Small text */
small, .text-sm {
  font-size: var(--font-size-sm);
}

.text-xs {
  font-size: var(--font-size-xs);
}

/* Lead text */
.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
}

/* Labels and caps */
.label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.small-caps {
  font-variant: small-caps;
  letter-spacing: var(--tracking-wide);
}

/* Links */
.link {
  color: var(--accent-rust);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--duration-fast) var(--ease-out);
}

.link:hover {
  color: var(--sun-gold);
}

/* Emphasis */
strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

/* Lists with content */
.list-styled {
  padding-left: var(--space-md);
}

.list-styled li {
  position: relative;
  padding-left: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.list-styled li::before {
  content: "•";
  position: absolute;
  left: calc(-1 * var(--space-sm));
  color: var(--ochre-dust);
}

/* Blockquote */
blockquote {
  font-family: "Georgia", serif;
  font-style: italic;
  font-size: var(--font-size-lg);
  padding-left: var(--space-lg);
  border-left: 3px solid var(--ochre-dust);
  color: var(--text-secondary);
}

/* Horizontal rule */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-light) 20%,
    var(--border-light) 80%,
    transparent
  );
  margin: var(--space-xl) 0;
}

/* Selection */
::selection {
  background-color: var(--sun-gold);
  color: var(--earth-deep);
}

/* ---------- Utility Classes ---------- */

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text colors */
.text-gold { color: var(--sun-gold); }
.text-ochre { color: var(--ochre-dust); }
.text-rust { color: var(--accent-rust); }
.text-muted { color: var(--text-secondary); }
.text-inverse { color: var(--text-inverse); }

/* Font weights */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: var(--z-toast);
  padding: var(--space-sm) var(--space-md);
  background: var(--earth-deep);
  color: var(--cream-heat);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-md);
}

/* ---------- Custom Cursor ---------- */
.custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid var(--sun-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  mix-blend-mode: difference;
}

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--sun-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}

.custom-cursor.is-hovering {
  width: 60px;
  height: 60px;
  border-color: var(--gold-glow);
  background: rgba(232, 184, 48, 0.1);
}

.custom-cursor.is-clicking {
  transform: translate(-50%, -50%) scale(0.9);
}

/* Hide cursor on elements with custom cursor */
body.has-custom-cursor * {
  cursor: none !important;
}

/* Show default cursor on mobile/touch */
@media (hover: none) {
  .custom-cursor,
  .cursor-dot {
    display: none !important;
  }

  body.has-custom-cursor * {
    cursor: auto !important;
  }
}

/* ---------- Ken Burns Background ---------- */
.ken-burns-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.ken-burns-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Position to left per user request (21% left from center) */
  object-position: 29% center;
  transform-origin: center center;
  transform:
    translate(calc(var(--scroll-progress, 0) * -3%), calc(var(--scroll-progress, 0) * -2%))
    scale(calc(1.05 - var(--scroll-progress, 0) * 0.02));
  transition: transform 0.15s ease-out;
  filter: saturate(1.1) contrast(1.05);
}

.ken-burns-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  /* Enhanced vignette - 25% darker for better text readability */
  background:
    /* Strong vignette - darker edges focusing attention center */
    radial-gradient(ellipse at center,
      rgba(0, 0, 0, 0.25) 0%,
      rgba(0, 0, 0, 0.35) 30%,
      rgba(26, 21, 16, 0.65) 60%,
      rgba(26, 21, 16, 0.9) 90%,
      rgba(0, 0, 0, 1) 100%
    ),
    /* Top-bottom gradient for depth */
    linear-gradient(to bottom,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.35) 30%,
      rgba(0, 0, 0, 0.35) 70%,
      rgba(0, 0, 0, 0.75) 100%
    );
  pointer-events: none;
}

/* ---------- Floating Dust Particles ---------- */
.dust-particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Multiple radial gradients create dust motes */
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(245, 235, 215, 0.3), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(232, 184, 48, 0.2), transparent),
    radial-gradient(1.5px 1.5px at 60% 20%, rgba(245, 235, 215, 0.25), transparent),
    radial-gradient(1px 1px at 80% 50%, rgba(232, 184, 48, 0.15), transparent),
    radial-gradient(1.5px 1.5px at 10% 80%, rgba(245, 235, 215, 0.2), transparent),
    radial-gradient(1px 1px at 90% 10%, rgba(232, 184, 48, 0.2), transparent),
    radial-gradient(1px 1px at 50% 45%, rgba(245, 235, 215, 0.18), transparent),
    radial-gradient(1.5px 1.5px at 75% 85%, rgba(232, 184, 48, 0.22), transparent);
  background-size: 200px 200px, 150px 150px, 180px 180px, 220px 220px, 170px 170px, 190px 190px, 160px 160px, 210px 210px;
  animation: dust-float 60s linear infinite;
  opacity: 0.6;
}

@keyframes dust-float {
  0% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-5%) translateX(2%); }
  50% { transform: translateY(-3%) translateX(-1%); }
  75% { transform: translateY(-7%) translateX(1%); }
  100% { transform: translateY(0) translateX(0); }
}

/* ---------- God Rays / Light Beams ---------- */
.god-rays {
  position: fixed;
  top: -50%;
  left: 0;
  width: 100%;
  height: 200%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.15;
  mix-blend-mode: overlay;
}

.god-ray {
  position: absolute;
  top: -20%;
  width: 150px;
  height: 150%;
  background: linear-gradient(
    180deg,
    rgba(232, 184, 48, 0) 0%,
    rgba(232, 184, 48, 0.3) 20%,
    rgba(255, 213, 79, 0.5) 50%,
    rgba(232, 184, 48, 0.3) 80%,
    rgba(232, 184, 48, 0) 100%
  );
  filter: blur(30px);
  transform-origin: top center;
}

/* Position rays across viewport */
.god-ray:nth-child(1) {
  left: 10%;
  animation: ray-sway 20s ease-in-out infinite;
}

.god-ray:nth-child(2) {
  left: 35%;
  animation: ray-sway 25s ease-in-out infinite;
  animation-delay: -5s;
}

.god-ray:nth-child(3) {
  left: 60%;
  animation: ray-sway 22s ease-in-out infinite;
  animation-delay: -10s;
}

.god-ray:nth-child(4) {
  left: 85%;
  animation: ray-sway 28s ease-in-out infinite;
  animation-delay: -15s;
}

@keyframes ray-sway {
  0%, 100% {
    transform: rotate(-8deg) translateX(0);
    opacity: 0.3;
  }
  50% {
    transform: rotate(8deg) translateX(50px);
    opacity: 0.5;
  }
}


/* ---------- Print Styles ---------- */
@media print {
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .no-print,
  .ken-burns-bg,
  .ken-burns-overlay,
  .custom-cursor,
  .cursor-dot {
    display: none !important;
  }
}
