/* ── Custom Fonts ── */
@font-face {
  font-family: 'Sveva';
  src: url('fonts/Sveva-Versal.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sveva';
  src: url('fonts/Sveva-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Dark Crystal — Parchment & Fantasy Theme */
:root {
  /* Parchment palette */
  --parchment:      #f0e9d6;
  --parchment-mid:  #e4d9c0;
  --parchment-dark: #cfc3a0;
  --parchment-deep: #b8a97a;
  --stone:          #d6cdb0;

  /* Ink palette (text) */
  --ink:            #1e1a12;
  --ink-mid:        #3d3525;
  --ink-light:      #6b5e45;
  --ink-faint:      #9a8c72;

  /* Ornament palette — muted blue-gray like Dark Crystal motifs */
  --ornament:       #6b7494;
  --ornament-mid:   #8a90a8;
  --ornament-light: #adb3c8;
  --ornament-dark:  #4a5070;

  /* Warm gold for interactive accents */
  --gold:           #8b6914;
  --gold-mid:       #a07c20;
  --gold-light:     #b89030;
  --gold-bright:    #c9a227;

  /* Legacy aliases so existing code doesn't break */
  --deep-night:     #f0e9d6;
  --void:           #f0e9d6;
  --pearl:          #1e1a12;
  --silver:         #6b5e45;
  --cream:          #f5f0e6;
  --amethyst-bright:#6b7494;
  --amethyst-glow:  #8a90a8;
  --emerald-glow:   #5a7060;
  --gold-pale:      #e8d898;
  --bronze:         #8b6914;
  --copper:         #a07c20;
}

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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--parchment);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ============================================
   MAGICAL LAYERED BACKGROUND - MAXIMALIST
   ============================================ */
.magical-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    /* Fine surface grain — paper texture */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)' opacity='0.10'/%3E%3C/svg%3E"),
    /* Directional fiber — old book paper grain */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='fiber'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.3%200.08' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23fiber)' opacity='0.06'/%3E%3C/svg%3E"),
    /* Faint age spots — scattered foxing */
    radial-gradient(ellipse 90px 70px at 12% 22%, rgba(130, 95, 40, 0.045) 0%, transparent 100%),
    radial-gradient(ellipse 60px 45px at 78% 12%, rgba(115, 85, 35, 0.035) 0%, transparent 100%),
    radial-gradient(ellipse 75px 55px at 58% 72%, rgba(125, 92, 38, 0.04)  0%, transparent 100%),
    radial-gradient(ellipse 100px 80px at 88% 82%, rgba(135, 100, 45, 0.045) 0%, transparent 100%),
    radial-gradient(ellipse 50px 40px at 35% 55%, rgba(120, 88, 36, 0.03)  0%, transparent 100%),
    /* Warm vignette edges — aged parchment feel */
    radial-gradient(ellipse at 0% 0%,   rgba(160, 120, 60, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%,  rgba(140, 100, 50, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 0% 100%,  rgba(140, 100, 50, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%,rgba(160, 120, 60, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%,  rgba(255, 248, 220, 0.6)  0%, transparent 70%),
    var(--parchment);
}

/* Animated floating particles layer */
.magical-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    /* Gold dust particles */
    radial-gradient(1px 1px at 10% 10%, var(--gold-bright), transparent),
    radial-gradient(1px 1px at 20% 35%, var(--gold-light), transparent),
    radial-gradient(2px 2px at 30% 15%, var(--gold), transparent),
    radial-gradient(1px 1px at 40% 60%, var(--gold-pale), transparent),
    radial-gradient(1.5px 1.5px at 50% 25%, var(--gold-bright), transparent),
    radial-gradient(1px 1px at 60% 80%, var(--gold-light), transparent),
    radial-gradient(2px 2px at 70% 45%, var(--gold), transparent),
    radial-gradient(1px 1px at 80% 70%, var(--gold-pale), transparent),
    radial-gradient(1.5px 1.5px at 90% 30%, var(--gold-bright), transparent),
    radial-gradient(1px 1px at 15% 55%, var(--pearl), transparent),
    radial-gradient(1px 1px at 25% 85%, var(--gold-light), transparent),
    radial-gradient(2px 2px at 35% 40%, var(--gold), transparent),
    radial-gradient(1px 1px at 45% 90%, var(--gold-pale), transparent),
    radial-gradient(1.5px 1.5px at 55% 20%, var(--pearl), transparent),
    radial-gradient(1px 1px at 65% 65%, var(--gold-bright), transparent),
    radial-gradient(1px 1px at 75% 95%, var(--gold-light), transparent),
    radial-gradient(2px 2px at 85% 50%, var(--gold), transparent),
    radial-gradient(1px 1px at 95% 75%, var(--gold-pale), transparent),
    radial-gradient(1.5px 1.5px at 5% 45%, var(--pearl), transparent);
  animation: floatParticles 30s linear infinite;
  opacity: 0.8;
}

/* ============================================
   TWINKLING STARS LAYER
   ============================================ */
.stars-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  color: var(--gold-pale);
  font-size: 0.6rem;
  animation: twinkle 3s ease-in-out infinite;
  text-shadow: 0 0 10px currentColor;
}

.star:nth-child(1) { top: 8%; left: 5%; animation-delay: 0s; color: var(--pearl); }
.star:nth-child(2) { top: 12%; left: 15%; animation-delay: 0.5s; font-size: 0.4rem; }
.star:nth-child(3) { top: 5%; left: 25%; animation-delay: 1s; color: var(--gold-light); }
.star:nth-child(4) { top: 18%; left: 35%; animation-delay: 1.5s; font-size: 0.5rem; }
.star:nth-child(5) { top: 8%; left: 45%; animation-delay: 2s; }
.star:nth-child(6) { top: 15%; left: 55%; animation-delay: 0.3s; font-size: 0.7rem; color: var(--pearl); }
.star:nth-child(7) { top: 6%; left: 65%; animation-delay: 0.8s; }
.star:nth-child(8) { top: 20%; left: 75%; animation-delay: 1.3s; font-size: 0.4rem; }
.star:nth-child(9) { top: 10%; left: 85%; animation-delay: 1.8s; color: var(--gold-light); }
.star:nth-child(10) { top: 14%; left: 92%; animation-delay: 2.3s; font-size: 0.5rem; }
.star:nth-child(11) { top: 25%; left: 8%; animation-delay: 0.2s; font-size: 0.5rem; }
.star:nth-child(12) { top: 35%; left: 3%; animation-delay: 0.7s; }
.star:nth-child(13) { top: 45%; left: 6%; animation-delay: 1.2s; color: var(--pearl); font-size: 0.4rem; }
.star:nth-child(14) { top: 55%; left: 4%; animation-delay: 1.7s; }
.star:nth-child(15) { top: 65%; left: 7%; animation-delay: 2.2s; font-size: 0.6rem; }
.star:nth-child(16) { top: 30%; left: 95%; animation-delay: 0.4s; }
.star:nth-child(17) { top: 40%; left: 93%; animation-delay: 0.9s; font-size: 0.5rem; color: var(--gold-light); }
.star:nth-child(18) { top: 50%; left: 96%; animation-delay: 1.4s; }
.star:nth-child(19) { top: 60%; left: 94%; animation-delay: 1.9s; font-size: 0.4rem; }
.star:nth-child(20) { top: 70%; left: 92%; animation-delay: 2.4s; color: var(--pearl); }
.star:nth-child(21) { top: 75%; left: 10%; animation-delay: 0.6s; font-size: 0.5rem; }
.star:nth-child(22) { top: 82%; left: 20%; animation-delay: 1.1s; }
.star:nth-child(23) { top: 88%; left: 30%; animation-delay: 1.6s; font-size: 0.4rem; color: var(--gold-light); }
.star:nth-child(24) { top: 78%; left: 40%; animation-delay: 2.1s; }
.star:nth-child(25) { top: 85%; left: 50%; animation-delay: 0.1s; font-size: 0.6rem; }
.star:nth-child(26) { top: 90%; left: 60%; animation-delay: 0.55s; color: var(--pearl); }
.star:nth-child(27) { top: 80%; left: 70%; animation-delay: 1.05s; font-size: 0.5rem; }
.star:nth-child(28) { top: 87%; left: 80%; animation-delay: 1.55s; }
.star:nth-child(29) { top: 92%; left: 88%; animation-delay: 2.05s; font-size: 0.4rem; color: var(--gold-light); }
.star:nth-child(30) { top: 76%; left: 95%; animation-delay: 2.5s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ============================================
   FLOATING JEWELS & POTIONS
   ============================================ */
.jewel {
  position: fixed;
  pointer-events: none;
  z-index: 2;
  font-size: 1.5rem;
  animation: floatJewel 6s ease-in-out infinite;
  filter: drop-shadow(0 0 15px currentColor);
}

/* Ruby jewels */
.jewel.ruby {
  color: #8b1a3d;
  text-shadow:
    0 0 20px #c41e4a,
    0 0 40px #8b1a3d,
    inset 0 0 10px #ff6b8a;
}

/* Emerald jewels */
.jewel.emerald {
  color: #1a5c3a;
  text-shadow:
    0 0 20px #2ecc71,
    0 0 40px #1a5c3a,
    inset 0 0 10px #5dfc8d;
}

/* Sapphire jewels */
.jewel.sapphire {
  color: #1a4a7a;
  text-shadow:
    0 0 20px #3498db,
    0 0 40px #1a4a7a,
    inset 0 0 10px #7ec8f7;
}

/* Amethyst jewels */
.jewel.amethyst {
  color: #5c3d6e;
  text-shadow:
    0 0 20px #9b59b6,
    0 0 40px #5c3d6e,
    inset 0 0 10px #c39bd3;
}

/* Position jewels */
.jewel:nth-of-type(1) { top: 15%; left: 3%; animation-delay: 0s; font-size: 1.2rem; }
.jewel:nth-of-type(2) { top: 35%; right: 4%; animation-delay: 1s; font-size: 1.4rem; }
.jewel:nth-of-type(3) { top: 60%; left: 2%; animation-delay: 2s; font-size: 1rem; }
.jewel:nth-of-type(4) { top: 80%; right: 3%; animation-delay: 3s; font-size: 1.3rem; }
.jewel:nth-of-type(5) { top: 25%; right: 2%; animation-delay: 0.5s; font-size: 1.1rem; }
.jewel:nth-of-type(6) { top: 70%; left: 4%; animation-delay: 1.5s; font-size: 1.5rem; }
.jewel:nth-of-type(7) { top: 45%; left: 2%; animation-delay: 2.5s; font-size: 0.9rem; }
.jewel:nth-of-type(8) { top: 50%; right: 2%; animation-delay: 3.5s; font-size: 1.2rem; }

@keyframes floatJewel {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
}

/* ============================================
   MEDIEVAL POTION BOTTLES - Howl's Style
   ============================================ */
.potions-shelf {
  position: fixed;
  bottom: 30px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 60px;
  pointer-events: none;
  z-index: 3;
}

.potion-bottle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: gentleBob 4s ease-in-out infinite;
}

/* Bottle neck/cork */
.potion-bottle::before {
  content: '';
  width: 8px;
  height: 12px;
  background: linear-gradient(90deg, #8b6914, #a67c00, #8b6914);
  border-radius: 2px 2px 0 0;
  margin-bottom: -2px;
  box-shadow: 0 0 5px rgba(139, 105, 20, 0.5);
}

/* Round flask body */
.flask {
  width: 28px;
  height: 35px;
  border-radius: 4px 4px 14px 14px;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset -3px -3px 8px rgba(255, 255, 255, 0.1),
    inset 3px 3px 8px rgba(0, 0, 0, 0.3),
    0 0 20px var(--glow-color);
}

/* Glass highlight */
.flask::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 4px;
  width: 6px;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: rotate(-20deg);
}

/* Liquid inside with bubble animation */
.flask::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 75%;
  background: var(--liquid-color);
  animation: liquidBubble 3s ease-in-out infinite;
}

/* Ruby red potion */
.potion-bottle.ruby {
  --liquid-color: linear-gradient(180deg, #c41e4a 0%, #8b1a3d 50%, #5c1129 100%);
  --glow-color: rgba(196, 30, 74, 0.4);
  animation-delay: 0s;
}

/* Emerald green potion */
.potion-bottle.emerald {
  --liquid-color: linear-gradient(180deg, #2ecc71 0%, #1a5c3a 50%, #0d2818 100%);
  --glow-color: rgba(46, 204, 113, 0.4);
  animation-delay: 0.5s;
}

/* Sapphire blue potion */
.potion-bottle.sapphire {
  --liquid-color: linear-gradient(180deg, #3498db 0%, #1a4a7a 50%, #0f2744 100%);
  --glow-color: rgba(52, 152, 219, 0.4);
  animation-delay: 1s;
}

/* Amethyst purple potion */
.potion-bottle.amethyst {
  --liquid-color: linear-gradient(180deg, #9b59b6 0%, #5c3d6e 50%, #2d1b3d 100%);
  --glow-color: rgba(155, 89, 182, 0.4);
  animation-delay: 1.5s;
}

/* Gold potion */
.potion-bottle.gold {
  --liquid-color: linear-gradient(180deg, #f5d76e 0%, #c9a227 50%, #8b6914 100%);
  --glow-color: rgba(201, 162, 39, 0.4);
  animation-delay: 2s;
}

/* Different bottle shapes */
.potion-bottle:nth-child(2) .flask {
  width: 22px;
  height: 40px;
  border-radius: 6px 6px 11px 11px;
}

.potion-bottle:nth-child(3) .flask {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.potion-bottle:nth-child(4) .flask {
  width: 24px;
  height: 38px;
  border-radius: 3px 3px 12px 12px;
}

.potion-bottle:nth-child(5) .flask {
  width: 26px;
  height: 30px;
  border-radius: 8px 8px 13px 13px;
}

.potion-bottle:nth-child(6) .flask {
  width: 20px;
  height: 36px;
  border-radius: 4px 4px 10px 10px;
}

.potion-bottle:nth-child(7) .flask {
  width: 30px;
  height: 28px;
  border-radius: 50% 50% 40% 40%;
}

@keyframes gentleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes liquidBubble {
  0%, 100% { height: 75%; }
  50% { height: 78%; }
}

/* Secondary shimmer layer */
.magical-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    /* Diagonal light beams */
    linear-gradient(45deg, transparent 40%, rgba(201, 162, 39, 0.03) 45%, transparent 50%),
    linear-gradient(-45deg, transparent 40%, rgba(92, 61, 110, 0.03) 45%, transparent 50%),
    linear-gradient(135deg, transparent 60%, rgba(26, 74, 122, 0.03) 65%, transparent 70%);
  animation: shimmerBeams 15s ease-in-out infinite alternate;
}

@keyframes floatParticles {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-20px) rotate(1deg); }
}

@keyframes shimmerBeams {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* ============================================
   ORNATE DECORATIVE ELEMENTS
   ============================================ */

/* ============================================
   ORNATE BAROQUE PICTURE FRAME
   ============================================ */

/* Simple elegant frame */
.simple-frame {
  position: fixed;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  pointer-events: none;
  z-index: 1000;
  border: 1px solid rgba(107, 116, 148, 0.35);
}

/* Main ornate frame around entire page */
.ornate-frame {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  pointer-events: none;
  z-index: 1000;
  border: 4px solid;
  border-image: linear-gradient(
    135deg,
    var(--bronze) 0%,
    var(--gold-light) 15%,
    var(--gold) 30%,
    var(--gold-bright) 50%,
    var(--gold) 70%,
    var(--gold-light) 85%,
    var(--bronze) 100%
  ) 1;
  box-shadow:
    inset 0 0 30px rgba(201, 162, 39, 0.1),
    0 0 20px rgba(201, 162, 39, 0.2);
}

/* Second frame layer */
.ornate-frame::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 2px solid;
  border-image: linear-gradient(
    45deg,
    var(--gold) 0%,
    var(--gold-bright) 50%,
    var(--gold) 100%
  ) 1;
  opacity: 0.5;
}

/* Third frame layer - inner */
.ornate-frame::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  bottom: 14px;
  border: 1px solid var(--gold);
  opacity: 0.3;
}

/* Additional decorative frame layers */
.frame-layer-2 {
  position: fixed;
  top: 22px;
  left: 22px;
  right: 22px;
  bottom: 22px;
  border: 1px solid rgba(201, 162, 39, 0.2);
  pointer-events: none;
  z-index: 999;
}

.frame-layer-3 {
  position: fixed;
  top: 28px;
  left: 28px;
  right: 28px;
  bottom: 28px;
  pointer-events: none;
  z-index: 999;
  border: 1px solid rgba(201, 162, 39, 0.1);
}

/* Swirly corner flourishes */
.corner-flourish {
  position: fixed;
  pointer-events: none;
  z-index: 1002;
  font-size: 3rem;
  color: var(--gold);
  text-shadow:
    0 0 10px var(--gold),
    0 0 20px rgba(201, 162, 39, 0.6),
    0 0 40px rgba(201, 162, 39, 0.3);
  opacity: 0.7;
  animation: flourishGlow 5s ease-in-out infinite;
}

.corner-flourish.tl { top: 8px; left: 8px; }
.corner-flourish.tr { top: 8px; right: 8px; transform: scaleX(-1); }
.corner-flourish.bl { bottom: 8px; left: 8px; transform: scaleY(-1); }
.corner-flourish.br { bottom: 8px; right: 8px; transform: scale(-1, -1); }

@keyframes flourishGlow {
  0%, 100% { opacity: 0.6; filter: brightness(1); }
  50% { opacity: 0.9; filter: brightness(1.2); }
}

.corner-flourish.tr { animation-delay: 1.25s; }
.corner-flourish.bl { animation-delay: 2.5s; }
.corner-flourish.br { animation-delay: 3.75s; }

/* Decorative side scrollwork */
.side-scroll {
  position: fixed;
  pointer-events: none;
  z-index: 1001;
  color: var(--gold);
  font-size: 1.8rem;
  opacity: 0.5;
  text-shadow: 0 0 15px var(--gold);
  letter-spacing: 8px;
}

.side-scroll.top {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.side-scroll.bottom {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.side-scroll.left {
  left: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  letter-spacing: 12px;
}

.side-scroll.right {
  right: 10px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  letter-spacing: 12px;
}

/* Quarter position decorations */
.frame-accent {
  position: fixed;
  pointer-events: none;
  z-index: 1001;
  color: var(--gold);
  font-size: 1.2rem;
  opacity: 0.45;
  text-shadow: 0 0 10px var(--gold);
}

.frame-accent.top-left-q { top: 10px; left: 20%; }
.frame-accent.top-right-q { top: 10px; right: 20%; }
.frame-accent.bottom-left-q { bottom: 10px; left: 20%; }
.frame-accent.bottom-right-q { bottom: 10px; right: 20%; }
.frame-accent.left-top-q { left: 10px; top: 20%; transform: rotate(-90deg); }
.frame-accent.left-bottom-q { left: 10px; bottom: 20%; transform: rotate(-90deg); }
.frame-accent.right-top-q { right: 10px; top: 20%; transform: rotate(90deg); }
.frame-accent.right-bottom-q { right: 10px; bottom: 20%; transform: rotate(90deg); }

/* Additional mid-side flourishes */
.frame-accent.top-mid { top: 10px; left: 50%; transform: translateX(-50%); font-size: 1.4rem; }
.frame-accent.bottom-mid { bottom: 10px; left: 50%; transform: translateX(-50%); font-size: 1.4rem; }
.frame-accent.left-mid { left: 10px; top: 50%; transform: translateY(-50%) rotate(-90deg); font-size: 1.4rem; }
.frame-accent.right-mid { right: 10px; top: 50%; transform: translateY(-50%) rotate(90deg); font-size: 1.4rem; }

/* Decorative gold lines along frame edges */
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 998;
}

body::before {
  top: 35px;
  left: 80px;
  right: 80px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201, 162, 39, 0.15) 15%,
    rgba(201, 162, 39, 0.4) 40%,
    var(--gold) 50%,
    rgba(201, 162, 39, 0.4) 60%,
    rgba(201, 162, 39, 0.15) 85%,
    transparent 100%);
}

body::after {
  bottom: 35px;
  left: 80px;
  right: 80px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201, 162, 39, 0.15) 15%,
    rgba(201, 162, 39, 0.4) 40%,
    var(--gold) 50%,
    rgba(201, 162, 39, 0.4) 60%,
    rgba(201, 162, 39, 0.15) 85%,
    transparent 100%);
}

/* Hide old corner elements - replaced by flourishes */
.corner-ornament,
.corner-symbol {
  display: none;
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 4rem;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid rgba(107, 116, 148, 0.25);
  background: rgba(240, 233, 214, 0.92);
  backdrop-filter: blur(4px);
}

nav::before {
  display: none;
}

.logo {
  font-family: 'Sveva', 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 4px;
  text-shadow: none;
  position: relative;
}

.logo::before,
.logo::after {
  content: '·';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ornament);
  opacity: 0.6;
}

.logo::before { left: -16px; }
.logo::after  { right: -16px; }

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--ink-light);
  text-decoration: none;
  font-family: 'Sveva', 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.2s ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::before { display: none; }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--ornament);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--ink);
  text-shadow: none;
}

.nav-links a:hover::after { width: 100%; }

/* ============================================
   HOMEPAGE BACKGROUND IMAGE
   ============================================ */
.homepage .magical-bg {
  display: none;
}

.hero-bg-image {
  width: 100%;
  position: relative;
  z-index: 0;
}

.hero-bg-image img {
  width: 125%;
  height: auto;
  display: block;
  margin-left: -25%;
}

.homepage .hero {
  position: relative;
  min-height: auto;
  padding: 0;
}

.homepage .hero .hero-bg-image {
  position: relative;
}

.homepage .hero-content {
  position: absolute;
  top: 100px;
  left: 0;
  right: 0;
  max-width: none;
  margin-left: 0;
  display: flex;
  justify-content: center;
  padding-left: 5%;
}

.homepage .subtitle {
  position: relative;
  left: -2rem;
  color: #2ecc71;
  font-size: 1rem;
}

.homepage {
  background: var(--deep-night);
  position: relative;
}

/* ============================================
   HERO SECTION - MAXIMALIST
   ============================================ */
.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 4rem;
  position: relative;
}

.homepage .hero-text {
  background: radial-gradient(ellipse at center, rgba(45, 27, 61, 0.85) 0%, rgba(45, 27, 61, 0.6) 30%, rgba(15, 39, 68, 0.4) 60%, transparent 80%);
  padding: 3rem;
  border: none;
  backdrop-filter: none;
  text-align: center;
  border-radius: 50%;
  max-width: 450px;
}

/* Decorative border frame around hero */
.hero::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 60px;
  right: 60px;
  bottom: 40px;
  border: 1px solid rgba(201, 162, 39, 0.08);
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 5rem;
  max-width: 1100px;
  position: relative;
}

/* ============================================
   PORTRAIT - ORNATE FRAME
   ============================================ */
.portrait-container {
  position: relative;
}

/* Soft jewel-toned outer glow around entire border */
.portrait-container::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  background:
    /* Sapphire glow - top */
    radial-gradient(ellipse at 50% 0%, rgba(26, 74, 122, 0.15) 0%, transparent 50%),
    /* Amethyst glow - right */
    radial-gradient(ellipse at 100% 50%, rgba(92, 61, 110, 0.12) 0%, transparent 50%),
    /* Emerald glow - bottom */
    radial-gradient(ellipse at 50% 100%, rgba(26, 92, 58, 0.15) 0%, transparent 50%),
    /* Ruby glow - left */
    radial-gradient(ellipse at 0% 50%, rgba(139, 26, 61, 0.12) 0%, transparent 50%),
    /* Soft gold center glow */
    radial-gradient(ellipse at 50% 50%, rgba(201, 162, 39, 0.05) 0%, transparent 60%);
  pointer-events: none;
  animation: softJewelGlow 8s ease-in-out infinite;
}

/* Secondary glow layer for more depth */
.portrait-container::after {
  content: '';
  position: absolute;
  top: -35px;
  left: -35px;
  right: -35px;
  bottom: -35px;
  background:
    /* Corner jewel accents - very faded */
    radial-gradient(circle at 0% 0%, rgba(26, 74, 122, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(92, 61, 110, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(26, 92, 58, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(139, 26, 61, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

@keyframes softJewelGlow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.portrait-frame {
  width: 300px;
  height: 380px;
  position: relative;
  padding: 12px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--bronze) 50%, var(--gold-light) 100%);
  box-shadow:
    /* Soft diffused jewel glow around entire border */
    0 -20px 40px -10px rgba(26, 74, 122, 0.2),
    0 20px 40px -10px rgba(26, 92, 58, 0.2),
    -20px 0 40px -10px rgba(139, 26, 61, 0.15),
    20px 0 40px -10px rgba(92, 61, 110, 0.15),
    /* Subtle gold outline glow */
    0 0 20px rgba(201, 162, 39, 0.15),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Inner border */
.portrait-frame::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 2px solid var(--gold-bright);
  pointer-events: none;
  opacity: 0.7;
}

/* Subtle inner jewel reflections */
.portrait-frame::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    /* Very subtle corner color hints */
    radial-gradient(circle at 0% 0%, rgba(26, 74, 122, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 100% 0%, rgba(92, 61, 110, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 0% 100%, rgba(26, 92, 58, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 100% 100%, rgba(139, 26, 61, 0.1) 0%, transparent 20%);
  pointer-events: none;
}

.portrait-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(15, 39, 68, 0.9) 0%, rgba(45, 27, 61, 0.9) 50%, rgba(13, 40, 24, 0.9) 100%),
    repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(201, 162, 39, 0.03) 10px, rgba(201, 162, 39, 0.03) 20px);
  color: var(--silver);
  font-style: italic;
  border: 1px solid rgba(201, 162, 39, 0.3);
}

.portrait-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Animated sparkles around portrait */
.sparkles {
  position: absolute;
  top: -40px;
  left: -40px;
  right: -40px;
  bottom: -40px;
  pointer-events: none;
}

.sparkles::before,
.sparkles::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.sparkles::before {
  background-image:
    radial-gradient(2px 2px at 10% 20%, var(--gold-bright), transparent),
    radial-gradient(2px 2px at 90% 15%, var(--gold-light), transparent),
    radial-gradient(3px 3px at 85% 80%, var(--gold), transparent),
    radial-gradient(2px 2px at 15% 85%, var(--gold-bright), transparent),
    radial-gradient(2px 2px at 50% 5%, var(--pearl), transparent),
    radial-gradient(2px 2px at 5% 50%, var(--gold-light), transparent),
    radial-gradient(3px 3px at 95% 50%, var(--gold), transparent),
    radial-gradient(2px 2px at 50% 95%, var(--gold-bright), transparent);
  animation: sparkleRotate 8s linear infinite;
}

.sparkles::after {
  background-image:
    radial-gradient(1.5px 1.5px at 25% 10%, var(--gold-pale), transparent),
    radial-gradient(1.5px 1.5px at 75% 25%, var(--pearl), transparent),
    radial-gradient(2px 2px at 80% 70%, var(--gold-light), transparent),
    radial-gradient(1.5px 1.5px at 20% 75%, var(--gold-pale), transparent),
    radial-gradient(1.5px 1.5px at 40% 15%, var(--pearl), transparent),
    radial-gradient(1.5px 1.5px at 60% 90%, var(--gold-light), transparent);
  animation: sparkleRotate 12s linear infinite reverse;
}

@keyframes sparkleRotate {
  0% { transform: rotate(0deg); opacity: 0.6; }
  50% { opacity: 1; }
  100% { transform: rotate(360deg); opacity: 0.6; }
}

/* ============================================
   HERO TEXT - ORNATE TYPOGRAPHY
   ============================================ */
.hero-text {
  max-width: 500px;
  text-align: center;
}

.hero-text h1 {
  /* FONT OPTIONS - uncomment one to try:
   * font-family: 'Sveva', 'Cinzel', serif;          -- Regal, ancient Roman
   * font-family: 'Cormorant', serif;       -- Elegant fantasy
   * font-family: 'MedievalSharp', cursive; -- Medieval manuscript
   * font-family: 'Tangerine', cursive;     -- Flowing elvish script
   * font-family: 'Uncial Antiqua', cursive;-- Celtic/medieval
   */
  font-family: 'Sveva', 'Cinzel', serif;
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
  text-shadow:
    0 0 40px rgba(201, 162, 39, 0.6),
    0 0 80px rgba(201, 162, 39, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 6px;
  position: relative;
  display: inline-block;
}

.hero-text h1::before,
.hero-text h1::after {
  display: none;
}

.big-initial {
  font-size: 1.3em;
  line-height: 1;
  vertical-align: middle;
}

.subtitle {
  font-size: 1.3rem;
  color: var(--amethyst-bright);
  font-style: italic;
  margin-bottom: 1.5rem;
  letter-spacing: 3px;
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(122, 82, 153, 0.5);
}

.subtitle-star {
  color: var(--gold);
  font-style: normal;
  font-size: 0.8rem;
  text-shadow: 0 0 10px rgba(201, 162, 39, 0.6);
  margin: 0 0.3rem;
  vertical-align: middle;
}

.intro {
  font-size: 0.9rem;
  color: var(--silver);
  margin-bottom: 2.5rem;
  line-height: 1.7;
  font-style: italic;
  opacity: 0.8;
}

/* ============================================
   BUTTONS - ORNATE GOLD FRAME STYLE
   ============================================ */
.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.btn {
  padding: 0.85rem 2.2rem;
  text-decoration: none;
  font-family: 'Georgia', serif;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
  position: relative;
  display: inline-block;
}

.btn::before, .btn::after { display: none; }

.btn.primary {
  background: var(--ink);
  color: var(--parchment);
  border: 1px solid var(--ink);
}

.btn.primary:hover {
  background: var(--ink-mid);
  border-color: var(--ink-mid);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(30, 26, 18, 0.2);
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ornament);
}

.btn.secondary:hover {
  background: rgba(107, 116, 148, 0.08);
  border-color: var(--ornament-dark);
  transform: translateY(-2px);
}

/* ============================================
   QUICK LINKS CARDS - JEWEL BOXES
   ============================================ */
.quick-links {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  padding: 4rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.homepage nav {
  position: relative;
  z-index: 20;
}

.homepage footer {
  position: relative;
  z-index: 10;
}

/* Section divider */
.quick-links::before {
  content: '◦ ─── ○ ─── ◦ ─── ○ ─── ◦';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  opacity: 0.4;
  letter-spacing: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
}

.card {
  width: 230px;
  padding: 2.25rem 1.75rem;
  background: rgba(224, 216, 196, 0.5);
  border: 1px solid rgba(107, 116, 148, 0.25);
  text-decoration: none;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Inner glow */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(201, 162, 39, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Corner accents */
.card::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid rgba(201, 162, 39, 0.1);
  pointer-events: none;
  transition: border-color 0.4s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--ornament);
  box-shadow: 0 12px 40px rgba(107, 116, 148, 0.15);
}

.card:hover::before {
  opacity: 1;
}

.card:hover::after {
  border-color: rgba(201, 162, 39, 0.3);
}

.card-icon {
  font-size: 2rem;
  color: var(--ornament);
  margin-bottom: 1.25rem;
  transition: transform 0.4s ease;
}

.card:hover .card-icon { transform: scale(1.1); }

.card h3 {
  color: var(--ink);
  font-family: 'Georgia', serif;
  font-weight: normal;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.card p {
  color: var(--ink-light);
  font-size: 0.85rem;
  font-style: italic;
}

.card.external {
  background: rgba(210, 220, 210, 0.4);
}

.card.external:hover {
  border-color: var(--ornament-dark);
}

/* ============================================
   FOOTER - ORNATE
   ============================================ */
footer {
  text-align: center;
  padding: 3rem;
  color: var(--ink-light);
  font-size: 0.82rem;
  position: relative;
  border-top: 1px solid rgba(107, 116, 148, 0.2);
  background: rgba(224, 216, 196, 0.4);
}

footer::before { display: none; }

footer a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--ornament-dark); }

.footer-quote {
  font-size: 0.7rem;
  font-style: italic;
  opacity: 0.6;
  margin-top: 0.5rem;
  color: var(--silver);
}

/* Social Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--ornament);
  transition: all 0.25s ease;
}

.social-link svg { width: 20px; height: 20px; }

.social-link:hover {
  color: var(--ornament-dark);
  transform: translateY(-2px);
}

/* ============================================
   FLOATING MAGICAL ELEMENTS
   ============================================ */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
/* ============================================
   INTERACTIVE MAGIC EFFECTS
   ============================================ */

/* Floating orbs container */
.orb-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

/* Individual floating orbs */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  animation: orbFloat linear infinite;
  opacity: 0.7;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  50% {
    transform: translate(calc(-50px + 100px * var(--random, 0.5)), -50vh) scale(1.2);
    opacity: 0.9;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translate(calc(50px - 100px * var(--random, 0.5)), -100vh) scale(0.8);
    opacity: 0;
  }
}

/* Make each orb drift differently */
.floating-orb:nth-child(odd) {
  animation-name: orbFloatAlt;
}

@keyframes orbFloatAlt {
  0% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  50% {
    transform: translate(80px, -40vh) scale(1.1);
    opacity: 1;
  }
  85% {
    opacity: 0.6;
  }
  100% {
    transform: translate(-30px, -100vh) scale(1);
    opacity: 0;
  }
}

.floating-orb:nth-child(3n) {
  animation-name: orbFloatWide;
}

@keyframes orbFloatWide {
  0% {
    transform: translate(0, 100vh) scale(1);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  50% {
    transform: translate(-100px, 50vh) scale(1.3);
  }
  80% {
    opacity: 0.7;
  }
  100% {
    transform: translate(50px, 0) scale(0.9);
    opacity: 0;
  }
}

/* Click burst particles */
.click-burst {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1004;
  animation: burstOut 0.8s ease-out forwards;
  transform: translate(-50%, -50%);
}

@keyframes burstOut {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0);
    opacity: 0;
  }
}

/* Cursor glow - soft jewel light */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(201, 162, 39, 0.15) 0%,
    rgba(92, 61, 110, 0.08) 25%,
    rgba(26, 74, 122, 0.05) 50%,
    transparent 70%
  );
  mix-blend-mode: screen;
}

/* Sparkle particles */
.magic-sparkle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1003;
  animation: sparkleFloat 1s ease-out forwards;
}

@keyframes sparkleFloat {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0) translateY(-30px);
  }
}

/* Smooth star movement */
.star {
  transition: transform 0.3s ease-out;
}

/* Smooth jewel movement */
.jewel {
  transition: transform 0.4s ease-out;
}

/* Scroll fade-in animations */
.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered fade for cards */
.fade-in-visible:nth-child(1) { transition-delay: 0s; }
.fade-in-visible:nth-child(2) { transition-delay: 0.1s; }
.fade-in-visible:nth-child(3) { transition-delay: 0.2s; }
.fade-in-visible:nth-child(4) { transition-delay: 0.3s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 2rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .hero {
    padding: 2rem;
  }

  .hero::before {
    display: none;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .hero-text h1 {
    font-size: 2.75rem;
  }

  .hero-text h1::before,
  .hero-text h1::after {
    display: none;
  }

  .intro {
    border-left: none;
    padding-left: 0;
    border-top: 2px solid rgba(201, 162, 39, 0.3);
    padding-top: 1rem;
  }

  .cta-buttons {
    justify-content: center;
  }

  .quick-links {
    padding: 2rem;
  }

  .portrait-frame {
    width: 250px;
    height: 320px;
  }

  body::before,
  body::after {
    font-size: 2rem;
    opacity: 0.1;
  }
}
