* {
    font-family: "Ubuntu", sans-serif;
    border:0;
    padding:0;
    margin:0;
    scrollbar-width: thin;
    scrollbar-color: #7040d0 #05010e;
}

/* Scrollbar - Webkit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #05010e;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #c4a84a, #7040d0);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #e8d48a, #9060f0);
}

html {
    overflow-x: hidden;
}

body {
    margin: 0px;
    padding: 0px;
    font-family:  Geneva, sans-serif, verdana, arial;
    font-size: 12pt;
    background-color: #000;
    text-align: center;
    color: #eee;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

header {
    display: block;
    padding-top: 20px;
}


header > a {
    font-size: 48pt;
}

header > a, header > a:hover, header > a:visited, header > a:focus  {
    color: #fff;
    outline: 0;
    text-decoration: none;
}

nav {
    height: 62px;
    min-width: 310px;
    display: block;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid #222;
    background-color: #000;
}

.sticky-logo {    
    visibility: hidden;
    display: block;
    width: 62px;
    height: 62px;
    opacity: 0;
    position: absolute;
    z-index: 2;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sticky-logo.is-stuck {
    opacity: 1;
    visibility: visible;
}

nav > ul {
    display: flex;
    list-style-type: none;
    justify-content: space-around; /* or space-between */
    margin: 0;
    padding: 0;
    max-width: 60%;    
    margin-left: auto;
    margin-right: auto;
    padding-top: 20px;
    padding-bottom: 20px;
}

nav > ul > li {
    display: flex;
    align-items: center;
}

nav > ul > li > a {
    font-size: 15pt;
    color: #fff;
    text-transform: uppercase;    
    text-decoration: none;
    position: relative;
    font-weight: 300;
}

nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease;
}

nav > ul > li > a:hover::after {
    opacity: 1;
    width: 100%;
}

nav > ul > li > a.active::after {
    width: 100%;
}

nav > ul > li > a.active {
    font-weight: normal;
}

nav > ul > li > a.active:hover::after {
    width: 0%;     
}

footer {
    border-top: 1px solid #222;
    background: linear-gradient(#07050f 15%,#1a0a2e 100%);
    padding-top: 50px;
    padding-bottom: 30px;
}

footer > p {
    font-size: 14pt;
    font-weight: 300;
    color: #ccc;
}

footer a, footer a:hover, footer a:active {
    font-size: 10pt;
    color: #aaa;
    text-decoration: none;
    padding-left: 10px; padding-right: 10px;
}

.main {
    flex: 1;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    background-color: #000;
    background: radial-gradient(ellipse at center, #1a0a2e 10%, #04020b 100%);
    background-attachment: fixed;
}

/* A faint scattering of fixed "stars" over the main background on every page,
   echoing the home page hero without needing per-page markup. */
.main::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(1px 1px at 8% 18%, rgba(255,255,255,0.55) 50%, transparent 51%),
        radial-gradient(1px 1px at 82% 12%, rgba(255,255,255,0.4) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 92% 68%, rgba(200,160,255,0.5) 50%, transparent 51%),
        radial-gradient(1px 1px at 65% 8%, rgba(255,255,255,0.35) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 15% 82%, rgba(200,160,255,0.4) 50%, transparent 51%),
        radial-gradient(1px 1px at 40% 92%, rgba(255,255,255,0.3) 50%, transparent 51%),
        radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.25) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 25% 35%, rgba(200,160,255,0.3) 50%, transparent 51%),
        radial-gradient(1px 1px at 72% 78%, rgba(255,255,255,0.3) 50%, transparent 51%),
        radial-gradient(1px 1px at 48% 25%, rgba(200,160,255,0.3) 50%, transparent 51%);
    background-attachment: fixed;
    animation: ambientTwinkle 6s ease-in-out infinite alternate;
}

@keyframes ambientTwinkle {
    from { opacity: 0.45; }
    to   { opacity: 1; }
}

.main > * {
    position: relative;
    z-index: 1;
}

.main-inner {
    width: calc(100% - 20px);
    max-width: 830px;
}

.main-inner a, .main-inner a:visited {
    color: #9060f0;
    text-decoration: none;
}

.main-inner a:hover, .main-inner a:active {
    color: #b080ff;
}

.byline {
    font-size: 72pt;
    height: 440px;
    line-height: 440px;
    background-color: #444;
    color: #fff;
    width: 100%;
    background: radial-gradient(ellipse at top, #1a0a2e 50%, #07050f 100%);
    cursor: default;
    user-select: none;
}

.byline h1 {
    font-size: 72pt;
    position: relative;
    top: -0.5em;
    z-index: 4;
    text-shadow: 0px 0px 5px #000, 0px 0px 90px #fff;
    opacity: 0;
    animation: heroFadeIn 1.1s ease-out 0.5s forwards;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(10px); letter-spacing: 0.02em; }
    to   { opacity: 1; transform: translateY(0); letter-spacing: normal; }
}


  /* =============================================
     MYSTICAL BACKGROUND - sits behind everything
     ============================================= */
  .mystical-bg {
    border-bottom: 1px solid #222;
    position: relative;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at 50% 30%,
      #1a0a3a 0%, #0d0520 40%, #050210 70%, #000 100%
    );
    overflow: hidden;
  }

  .stars { position: absolute; inset: 0; }

  .star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle var(--dur) ease-in-out infinite alternate;
  }

  @keyframes twinkle {
    from { opacity: var(--min-op); transform: scale(1); }
    to   { opacity: 1; transform: scale(1.4); }
  }
  .mist {
    position: absolute;
    bottom: 0;
    left: -20%;
    width: 140%;
    height: 140px;
    border-radius: 50%;
    animation: mistDrift var(--speed) ease-in-out infinite alternate;
  }

  .mist1 { background: radial-gradient(ellipse at 50% 80%, rgba(60,20,120,0.35) 0%, transparent 70%); --speed: 8s; bottom: -20px; }
  .mist2 { background: radial-gradient(ellipse at 40% 80%, rgba(30,10,80,0.25) 0%, transparent 65%); --speed: 11s; bottom: -5px; animation-direction: alternate-reverse; }
  .mist3 { background: radial-gradient(ellipse at 60% 90%, rgba(80,30,160,0.2) 0%, transparent 60%);  --speed: 14s; bottom: 0px; }

  @keyframes mistDrift {
    from { transform: translateX(-3%) scaleX(1); }
    to   { transform: translateX(3%) scaleX(1.05); }
  }

  .forest { position: absolute; bottom: 0; left: 0; width: 100%; height: 200px; }
  .forest svg { width: 100%; height: 100%; }

  .moon {
    position: absolute;
    top: 48px;
    right: 10%;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff 0%, #f4ecff 35%, #cbb8f0 70%, transparent 100%);
    box-shadow:
      0 0 20px 6px rgba(230,215,255,0.55),
      0 0 60px 24px rgba(180,150,255,0.25),
      0 0 120px 60px rgba(140,100,220,0.12);
    animation: moonGlow 5s ease-in-out infinite alternate;
    z-index: 1;
  }

  @keyframes moonGlow {
    from { opacity: 0.85; transform: scale(1); }
    to   { opacity: 1; transform: scale(1.05); }
  }

  .shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px 1px rgba(255,255,255,0.8);
    opacity: 0;
    z-index: 1;
    animation: shootingStar var(--dur, 1.4s) linear forwards;
  }

  /* Tail trails behind the direction of travel - rotated per-instance via
     --tail-angle (computed in JS from that star's own --tx/--ty vector). */
  .shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 1px;
    background: linear-gradient(to right, rgba(255,255,255,0.9), transparent);
    transform-origin: left center;
    transform: translateY(-50%) rotate(var(--tail-angle, 180deg));
  }

  @keyframes shootingStar {
    0%   { opacity: 0; transform: translate(0,0); }
    8%   { opacity: 1; }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--tx, -260px), var(--ty, 160px)); }
  }

  .orb {
    position: absolute;
    bottom: 114px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #c8a0ff 30%, #7040d0 60%, transparent 100%);
    box-shadow:
      0 0 10px 5px rgba(180,120,255,0.6),
      0 0 30px 15px rgba(140,80,220,0.3),
      0 0 80px 40px rgba(100,40,180,0.1);
    animation: orbPulse 3s ease-in-out infinite alternate;
    z-index: 2;
  }

  .orb::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 170px; height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(160,100,255,0.15) 0%, transparent 60%);
  }

  @keyframes orbPulse {
    from { transform: translateX(-50%) scale(1); opacity: 0.8; }
    to   { transform: translateX(-50%) scale(1.3); opacity: 1; }
  }

  .particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(200,160,255,0.8);
    animation: float var(--dur) ease-in-out infinite;
  }

  @keyframes float {
    0%   { transform: translate(0,0) scale(1); opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 0.8; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0.3); opacity: 0; }
  }

  .vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.75) 100%);
    pointer-events: none;
    z-index: 3;
  }



@media only screen and (max-width: 850px) {
    header {
        display: block;
        padding-top: 10px;
        padding-bottom: 10px;
    }        
    header > a {
        font-size: 24pt;
    }

    .sticky-logo {    
        width: 42px;
        height: 42px;
    }

    .sticky-logo > img {
        width: 42px;
        height: 42px;
    }

    nav {
        height: 42px;
    }

    .smallspan {
        display: none;
    }

    nav > ul {
        max-width: 100%;    
        padding-left: 42px;        
        padding-right: 42px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    nav > ul > li > a {
       font-size: 12pt;
    }

    .byline h1 {
       font-size: 56pt;
    }
}

/* =============================================
   SHARED PAGE HEADINGS
   ============================================= */
.main-inner {
    text-align: left;
    padding-top: 40px;
    padding-bottom: 60px;
}

.page-title {
    font-size: 32pt;
    font-weight: 300;
    color: #fff;
    margin-bottom: 6px;
}

.page-intro {
    color: #bba7e0;
    font-size: 12pt;
    margin-bottom: 30px;
    max-width: 700px;
}

.section-title {
    font-size: 22pt;
    font-weight: 300;
    color: #fff;
    margin-bottom: 16px;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 6px 0 30px 0;
    color: #8a6fc0;
    user-select: none;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #7040d0, transparent);
}

.section-divider span {
    font-size: 14pt;
    text-shadow: 0 0 10px rgba(180,120,255,0.7);
}

/* =============================================
   BOOKS PAGE
   ============================================= */
.series-block {
    margin-bottom: 50px;
}

.series-title {
    font-size: 22pt;
    font-weight: 400;
    color: #e8d48a;
    border-bottom: 1px solid #2a1a4a;
    padding-bottom: 10px;
    margin-bottom: 24px;
}

.series-count {
    font-size: 11pt;
    font-weight: 300;
    color: #8a6fc0;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.book-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(#140a28, #0a0518);
    border: 1px solid #2a1a4a;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.book-card:hover {
    border-color: #7040d0;
}

.book-cover-link {
    display: block;
    position: relative;
    text-align: center;
    background: #05010e;
    padding: 16px 16px 0 16px;
}

.book-cover {
    max-width: 100%;
    height: 260px;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.book-cover-link:hover .book-cover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 16px 34px rgba(0,0,0,0.65), 0 0 26px rgba(112,64,208,0.55);
}

.book-number {
    display: block;
    font-size: 9pt;
    color: #8a6fc0;
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.book-info {
    padding: 18px 20px 22px 20px;
}

.book-info h3 {
    font-size: 16pt;
    font-weight: 400;
    color: #fff;
    margin-bottom: 6px;
}

.book-date {
    font-size: 9pt;
    color: #7a68a0;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.book-info p {
    font-size: 10.5pt;
    line-height: 1.6;
    color: #d8cdf0;
    margin-bottom: 12px;
}

.buy-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 10.5pt;
    font-weight: 500;
    color: #e8d48a !important;
}

/* =============================================
   NEWS PAGE
   ============================================= */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.news-item {
    display: flex;
    gap: 26px;
    background: linear-gradient(#140a28, #0a0518);
    border: 1px solid #2a1a4a;
    border-radius: 8px;
    padding: 22px;
}

.news-cover-link {
    flex: 0 0 auto;
}

.news-cover {
    width: 130px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.news-cover-link:hover .news-cover {
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 14px 30px rgba(0,0,0,0.65), 0 0 24px rgba(112,64,208,0.55);
}

.news-info h2 {
    font-size: 17pt;
    font-weight: 400;
    color: #fff;
    margin-bottom: 8px;
}

.news-series {
    font-size: 10pt;
    font-weight: 300;
    color: #8a6fc0;
}

.news-date {
    font-size: 9pt;
    color: #7a68a0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.news-info p {
    font-size: 10.5pt;
    line-height: 1.6;
    color: #d8cdf0;
    margin-bottom: 10px;
}

.news-more {
    margin-top: 36px;
}

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-layout {
    display: flex;
    gap: 34px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.about-badge {
    width: 240px;
    height: 240px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    flex: 0 0 auto;
}

.about-text {
    flex: 1 1 380px;
}

.about-text p {
    font-size: 11pt;
    line-height: 1.7;
    color: #d8cdf0;
    margin-bottom: 16px;
}

.about-aside {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #2a1a4a;
    font-size: 10.5pt;
    color: #9a86c4;
    font-style: italic;
}

/* =============================================
   HOME - LATEST TITLES
   ============================================= */
.home-latest {
    padding: 50px 0 30px 0;
}

.home-book-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.home-book {
    display: block;
    width: 160px;
    text-align: center;
    color: #d8cdf0 !important;
    text-decoration: none !important;
}

.home-book img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.6);
    margin-bottom: 10px;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.home-book:hover img {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 16px 32px rgba(0,0,0,0.65), 0 0 26px rgba(112,64,208,0.55);
}

.home-book span {
    font-size: 10pt;
    line-height: 1.4;
    display: block;
}

.home-more {
    margin-top: 26px;
}

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-feedback {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 11pt;
    max-width: 600px;
}

.contact-feedback.ok {
    background: rgba(80,200,120,0.12);
    border: 1px solid rgba(80,200,120,0.4);
    color: #a8e8bc;
}

.contact-feedback.error {
    background: rgba(200,80,80,0.12);
    border: 1px solid rgba(200,80,80,0.4);
    color: #e8a8a8;
}

.contact-form .formTable {
    width: 100%;
    max-width: 560px;
}

.contact-form th {
    text-align: right;
    vertical-align: top;
    padding: 10px 16px 10px 0;
    font-weight: 300;
    color: #bba7e0;
    white-space: nowrap;
}

.contact-form td {
    padding: 10px 0;
}

.contact-form input[type=text],
.contact-form input[type=email],
.contact-form textarea {
    width: 100%;
    background: #0a0518;
    border: 1px solid #3a2a5a !important;
    border-radius: 4px;
    color: #eee;
    padding: 8px 10px;
    font-size: 11pt;
    box-sizing: border-box;
}

.contact-form textarea {
    height: 110px;
    resize: vertical;
}

.contact-form input[type=submit] {
    background: linear-gradient(to bottom, #7040d0, #4a2590);
    color: #fff;
    padding: 10px 26px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11pt;
}

.contact-form input[type=submit]:hover {
    background: linear-gradient(to bottom, #9060f0, #6035b0);
}

/* =============================================
   STIX - FLYING DRAGON MASCOT
   ============================================= */
.stix-flight-outer {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 120px;
    z-index: 500;
    pointer-events: none;
    transform-origin: top left;
    /* actual scale is set from JS (stixflight.js), scaled to the viewport
       so he doesn't end up tiny on large/high-res screens */
}

.stix-flight-inner {
    width: 240px;
    height: 120px;
    transition: none;
}

/* Mobile home-page mode: confined inside the hero banner (which already has
   position:relative + overflow:hidden) rather than fixed to the viewport. */
.stix-flight-outer.stix-hero-mode {
    position: absolute;
    z-index: 5;
}

@media only screen and (max-width: 850px) {
    .about-badge {
        width: 180px;
        height: 180px;
    }

    .news-item {
        flex-direction: column;
    }

    .news-cover {
        width: 110px;
    }
}

@media only screen and (max-width: 450px) {
     nav > ul > li > a {
       font-size: 10pt;
    }

    .byline h1 {
       font-size: 35pt;
    }

    .sticky-logo {    
        width: 32px;
        height: 32px;
    }

    .sticky-logo > img {
        width: 32px;
        height: 32px;
    }

    nav {
        height: 32px;
    }

     nav > ul {
        padding-left: 32px;        
    }
}
