/* ══════════════════════════════════════════════════════════════
   РАССКАЗКА — Shared Design System
   ══════════════════════════════════════════════════════════════ */

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

/* ── Design Tokens ── */
:root {
  /* Colors */
  --dark: #1b1c1a;
  --light: #faf9f5;
  --cream: #f4f0e8;
  --warm-white: #fdfcf8;
  --mid-gray: #88726c;
  --soft-gray: #b5a9a3;
  --light-gray: #efeeea;
  --orange: #d97757;
  --orange-deep: #99462a;
  --orange-glow: #ffdbd0;
  --green: #006b5f;
  --blue: #6a9bcc;
  --gold: #c9a96e;
  --border: #e8e2da;
  --surface-low: #f4f4f0;
  --surface-high: #e9e8e4;
  --outline-variant: #dbc1b9;
  --primary-fixed: #ffdbd0;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-heading: 'Noto Serif', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-ui: 'Plus Jakarta Sans', Arial, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows */
  --shadow-soft: 0 2px 20px rgba(153, 70, 42, 0.06);
  --shadow-card: 0 4px 24px rgba(27, 28, 26, 0.06), 0 1px 3px rgba(27, 28, 26, 0.04);
  --shadow-hero: 0 20px 60px rgba(153, 70, 42, 0.1), 0 8px 20px rgba(27, 28, 26, 0.04);
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--light);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

a { color: var(--orange-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Layout ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ── Section Label ── */
.section-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: var(--space-md);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: var(--orange-deep);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(153, 70, 42, 0.3);
  text-decoration: none;
  color: white;
}
.btn-primary.accent { background: var(--orange); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--orange-deep);
  background: var(--primary-fixed);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-secondary:hover {
  background: var(--orange-glow);
  text-decoration: none;
}

/* ── Nav ── */
/* ── Navigation ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 245, 0.9);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}
.nav-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}
.nav-logo:hover { text-decoration: none; opacity: 0.9; }

/* Nav links — desktop */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--mid-gray);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--orange-deep); text-decoration: none; }
.nav-links a.active {
  color: var(--orange-deep);
  border-bottom: 2px solid var(--orange-deep);
  padding-bottom: 2px;
}

/* CTA button — always centered vertically */
.nav-cta {
  font-size: 14px;
  font-weight: 600;
  color: white !important;
  background: var(--orange-deep);
  padding: 8px 20px;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(153, 70, 42, 0.3);
}

/* Burger button — hidden on desktop */
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile menu overlay */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 249, 245, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 48px;
  gap: 24px;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  font-size: 18px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
}
.nav-mobile-menu a:hover { color: var(--orange-deep); }
.nav-mobile-menu .nav-cta {
  font-size: 16px;
  padding: 12px 32px;
}

/* ── Responsive nav ── */
@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-burger { display: block; }
  .nav-cta .nav-cta-full { display: none; }
  .nav-cta .nav-cta-short { display: inline; }
}
@media (min-width: 769px) {
  .nav-cta .nav-cta-short { display: none; }
  .nav-cta .nav-cta-full { display: inline; }
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: var(--space-2xl) 0;
  font-size: 12px;
  color: var(--soft-gray);
  border-top: 1px solid var(--border);
  line-height: 1.8;
}
.site-footer a {
  color: var(--orange);
  text-decoration: none;
  font-size: 13px;
}
.site-footer a:hover { text-decoration: underline; }

/* ── Badges ── */
.badge {
  display: inline-block;
  background: var(--primary-fixed);
  color: var(--orange-deep);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.badge.badge-custom {
  text-transform: none;
  font-weight: 500;
  font-size: 12px;
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0, 0, 0.2, 1), transform 0.7s cubic-bezier(0, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── Ornamental Icon (Bilibin-style) ── */
.icon-ornament {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 2px solid var(--gold);
  border-radius: 4px;
  position: relative;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, rgba(201,169,110,0.06) 0%, rgba(217,119,87,0.04) 100%);
}
.icon-ornament::before,
.icon-ornament::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--gold);
}
.icon-ornament::before {
  top: -4px; left: -4px;
  border-right: none; border-bottom: none;
}
.icon-ornament::after {
  bottom: -4px; right: -4px;
  border-left: none; border-top: none;
}
.icon-ornament img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.icon-ornament .icon-inner {
  font-size: 24px;
  line-height: 1;
}

/* ── Responsive nav ── */
@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .container { padding: 0 var(--space-lg); }
}
