/* ==========================================================================
   המיסטיקון™ | היכל הגילוי — Design Tokens & Base Foundation
   פלטת צבעים רשמית:
   - סגול לילה:    #1B102D / #130B21
   - סגול מלכותי:  #42235F
   - זהב עתיק:     #C5A15D / #DFC286
   - שנהב:         #F5EFE6
   - לבנדר:        #A98BC3 / #E8DFF3
   ========================================================================== */

:root {
  --night-purple: #1B102D;
  --night-purple-deep: #130B21;
  --night-purple-card: rgba(27, 16, 45, 0.84);
  --royal-purple: #42235F;
  --royal-purple-soft: rgba(66, 35, 95, 0.48);
  --antique-gold: #C5A15D;
  --antique-gold-light: #DFC286;
  --antique-gold-border: rgba(197, 161, 93, 0.34);
  --antique-gold-glow: rgba(197, 161, 93, 0.16);
  --ivory: #F5EFE6;
  --ivory-muted: rgba(245, 239, 230, 0.88);
  --ivory-lavender: #E8DFF3;
  --lavender: #A98BC3;
  --lavender-soft: rgba(169, 139, 195, 0.22);

  --font-serif: 'Frank Ruhl Libre', 'David Libre', Georgia, serif;
  --font-sans: 'Assistant', 'Heebo', -apple-system, BlinkMacSystemFont, sans-serif;

  --container-max: 1200px;
  --header-height: 88px;
  --radius-arch: 180px 180px 22px 22px;
  --radius-card: 22px;
  --transition-gentle: 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  direction: rtl;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 28px);
  background-color: var(--night-purple);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100vw;
}

main[id],
section[id],
h1,
h2,
h3,
h4,
input,
select,
textarea {
  scroll-margin-top: calc(var(--header-height) + 28px);
}

body {
  background-color: var(--night-purple);
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(66, 35, 95, 0.62) 0%, rgba(27, 16, 45, 0) 75%),
    radial-gradient(circle at 18% 28%, rgba(197, 161, 93, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 82% 65%, rgba(66, 35, 95, 0.42) 0%, transparent 50%);
  color: var(--ivory);
  overflow-x: clip;
  max-width: 100vw;
  min-height: 100vh;
}

/* נגישות — מיקוד מקלדת גלוי וברור לכל רכיב אינטראקטיבי ושדה טופס */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 2.5px solid var(--antique-gold-light) !important;
  outline-offset: 3px !important;
}

.section-side-nav__link:focus-visible {
  outline: none !important;
}

.section-side-nav__link:focus-visible .section-side-nav__node {
  outline: 2px solid var(--antique-gold-light);
  outline-offset: 3px;
}

/* נגישות — קישור דילוג לתוכן */
.skip-link {
  position: fixed;
  top: -100px;
  right: 24px;
  z-index: 2000;
  background: var(--antique-gold);
  color: var(--night-purple);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--ivory);
}

/* נגישות — העדפת תנועה מופחתת */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
