/* ---------------------------------------------------------
   VelvetNest Style System — Namespace: vn-
   Pure CSS, no external URLs, fully local
--------------------------------------------------------- */

/* ------------------------------
   Color and Motion Tokens
------------------------------ */
:root {
  --vn-primary: #5b2a5d;
  --vn-surface: #1b1a1d;
  --vn-surface-soft: #262429;
  --vn-ink: #f2f1f4;
  --vn-muted: rgba(255, 255, 255, 0.35);

  --vn-shadow-soft: rgba(0, 0, 0, 0.28);
  --vn-shadow-plush: rgba(0, 0, 0, 0.45);

  --vn-edge: rgba(255,255,255,0.08);
  --vn-edge-strong: rgba(255,255,255,0.18);

  --vn-radius: 14px;

  --vn-motion-fast: 150ms;
  --vn-motion-med: 260ms;
  --vn-motion-slow: 420ms;
  --vn-easing: cubic-bezier(.22,.61,.36,1);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ------------------------------
   Reset + Body
------------------------------ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--vn-surface);
  color: var(--vn-ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Velvet animated wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  z-index: -1;
  background:
    radial-gradient(120% 60% at 80% 20%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(120deg, rgba(0,0,0,.02), rgba(255,255,255,.02));
  animation: vn-wash 24s ease-in-out infinite alternate;
}

@keyframes vn-wash {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(0,-2%,0) scale(1.02); }
}

/* ------------------------------
   Forced Paragraph Justification
------------------------------ */
article p,
section p,
main p,
p {
  text-align: justify !important;
  text-justify: inter-word !important;
  -webkit-hyphens: auto !important;
  -ms-hyphens: auto !important;
  hyphens: auto !important;
}

/* ------------------------------
   Container Layout
------------------------------ */
.vn-container {
  max-width: 840px;
  margin: 0 auto;
  padding: 28px;
}

/* ------------------------------
   Header + Logo
------------------------------ */
.vn-header {
  padding: 24px 0;
  text-align: center;
}

.vn-logo {
  width: 170px;
  margin-bottom: 18px;
  user-select: none;
}

/* ------------------------------
   NAVIGATION — VELVET LUNAR BAR
------------------------------ */
.vn-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 34px;
  position: relative;
  padding: 10px 0;
}

.vn-nav a {
  color: var(--vn-ink);
  text-decoration: none;
  padding: 8px 6px;
  font-weight: 600;
  position: relative;
  z-index: 1;
  transition:
    color var(--vn-motion-fast) var(--vn-easing),
    transform var(--vn-motion-fast) var(--vn-easing);
}

/* Hover lift */
.vn-nav a:hover { transform: translateY(-2px); }

/* LUNAR DISC (background circle) */
.vn-nav a::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  border-radius: 999px;
  opacity: 0;
  background: var(--vn-surface-soft);
  transform: translate(-50%, -50%) scale(0.4);
  transition:
    opacity var(--vn-motion-med) var(--vn-easing),
    width var(--vn-motion-med) var(--vn-easing),
    height var(--vn-motion-med) var(--vn-easing),
    transform var(--vn-motion-med) var(--vn-easing);
  z-index: -1;
}

.vn-nav a:hover::before {
  width: 42px;
  height: 42px;
  opacity: 0.7;
  transform: translate(-50%, -50%) scale(1);
  background: radial-gradient(circle, var(--vn-primary) 0%, var(--vn-surface-soft) 70%);
}

/* ORBITAL GLOW RING */
.vn-nav a::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px 6px var(--vn-primary);
  transition:
    opacity var(--vn-motion-slow) var(--vn-easing),
    width var(--vn-motion-slow) var(--vn-easing),
    height var(--vn-motion-slow) var(--vn-easing);
  z-index: -2;
}

.vn-nav a:hover::after {
  width: 38px;
  height: 38px;
  opacity: .25;
}

/* Underline grow (kept) */
.vn-link,
.vn-nav a {
  border-bottom: none;
}

.vn-link::after,
.vn-nav a::after {
  bottom: -2px;
}

/* ------------------------------
   H1 + Dek
------------------------------ */
.vn-h1 {
  font-size: 2.2rem;
  margin: 20px 0 14px;
  font-weight: 700;
}

.vn-dek {
  font-size: 1.12rem;
  color: var(--vn-muted);
  margin-bottom: 26px;
  line-height: 1.7;
}

/* ------------------------------
   Figure / Image
------------------------------ */
.vn-figure {
  margin: 0 0 34px;
}

.vn-figure img {
  width: 100%;
  border-radius: var(--vn-radius);
  border: 1px solid var(--vn-edge);
  box-shadow: 0 8px 22px var(--vn-shadow-soft);
}

@media (max-width: 600px) {
  .vn-figure img { border-radius: 10px; }
}

/* ------------------------------
   Sections + Capsule Header Line
------------------------------ */
.vn-section {
  margin-bottom: 46px;
  padding-top: 10px;
  position: relative;
}

.vn-section::before {
  content: "";
  position: absolute;
  top: -8px; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--vn-primary), transparent);
  transition: width var(--vn-motion-slow) var(--vn-easing);
}

.vn-section.is-seen::before {
  width: 100%;
}

.vn-section h2 {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

/* ------------------------------
   Card Hover Lift
------------------------------ */
.vn-card {
  background: var(--vn-surface-soft);
  border: 1px solid var(--vn-edge);
  border-radius: var(--vn-radius);
  padding: 20px;
  transition:
    transform var(--vn-motion-fast) var(--vn-easing),
    box-shadow var(--vn-motion-fast) var(--vn-easing),
    border-color var(--vn-motion-fast) var(--vn-easing);
}

.vn-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--vn-shadow-soft);
  border-color: var(--vn-edge-strong);
}

/* ------------------------------
   Footer — Velvet Tab Shape
------------------------------ */
.vn-footer {
  margin-top: 46px;
  padding: 28px 20px;
  text-align: center;
  color: var(--vn-muted);
  background: var(--vn-surface-soft);

  border-top-left-radius: 38px;
  border-top-right-radius: 38px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;

  border: 1px solid var(--vn-edge);

  box-shadow:
    0 -6px 18px rgba(0,0,0,0.22) inset,
    0 4px 18px rgba(0,0,0,0.28);
}

/* ------------------------------
   Back-to-Top — Diamond Tilt Shape
------------------------------ */
.vn-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;

  width: 54px;
  height: 54px;

  background: var(--vn-primary);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;

  transform: rotate(45deg) translateY(10px) !important;

  color: #111;
  font: 700 18px/54px system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  text-align: center;
  cursor: pointer;

  opacity: 0 !important;
  pointer-events: none !important;

  transition:
    opacity .25s ease,
    transform var(--vn-motion-fast) var(--vn-easing),
    background .2s ease;

  z-index: 9999 !important;
  overflow: hidden;
}

.vn-to-top:hover {
  background: #fff;
  transform: rotate(0deg) !important;
}

.vn-to-top.vn-show {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: rotate(45deg) translateY(0) !important;
}

/* Ripple */
.vn-to-top .ripple {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  opacity: .35;
  transform: translate(-50%,-50%) scale(0);
  background: #fff;
  animation: vn-ripple .6s ease-out forwards;
}

@keyframes vn-ripple {
  to {
    transform: translate(-50%, -50%) scale(8);
    opacity: 0;
  }
}

/* ------------------------------
   Reading Progress Bar
------------------------------ */
.vn-progress {
  position: fixed;
  left: 0; top: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--vn-primary), transparent);
  z-index: 9998;
  transition: width var(--vn-motion-fast) linear;
}
