/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=UnifrakturCook:wght@700&family=EB+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  /* Color palette inspired by dark fantasy */
  --bg-color: #1f1a19;
  --text-color: #e0d4c1;
  --text-box-color: rgba(214, 186, 155, 0.7);
  --heading-color: #f3dab4;
  --heading-title: rgba(173, 153, 108, 0.7);
  --accent-color: #7e6647;
  --card-bg: rgba(46, 41, 37, 0.692);
  --card-border: #333333;
  --card-box-border: rgba(61, 52, 46, 0.6);
  --hover-glow: rgba(172, 123, 60, 0.5);
  --link-color: #977b51;
  --link-hover: #573b18;
}

* {
  box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    font-family: 'EB Garamond', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    scroll-snap-type: mandatory;
}

section {
    scroll-snap-align: start;
}

/* Header & Navigation */
header {
    background-color: #1f1a18;
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--card-border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-family: 'UnifrakturCook', cursive;
    font-size: 2rem;
    color: var(--heading-color);
    margin: 0;
}

nav {
  margin-top: 0.5rem;

    ul {
        list-style: none;
        padding: 0;
        display: flex;
        gap: 1.5rem;

        li {
            position: relative;
            font-weight: 600;
            color: var(--link-color);
            cursor: pointer;
            transition: color 0.2s ease;

            &:hover {
                color: var(--link-hover);
            }
        }
    }
}

nav ul li::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--link-hover);
    transition: width 0.4s ease, left 0.4s ease;
}

nav ul li:hover::after {
    width: 100%;
    left: 0;
}

nav ul li a {
    text-decoration: none;
    color: inherit;
    font-family: "Cinzel Decorative", serif;
    font-weight: 700;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: radial-gradient(circle at center, #352e2b 0%, #29221e 100%);
    border-bottom: 1px solid var(--card-border);
}

.hero h2 {
    font-family: 'UnifrakturCook', cursive;
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.hero p {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    color: var(--text-color);
}



/* Codex Preview Section */
.codex-preview {
    padding: 0;
}

.codex-box {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    max-width: 1000px;
    margin: 3rem auto;
    padding: 2.5rem 2rem;
}

.codex-box .category-grid {
    margin-top: 2rem;
    gap: 1.5rem;
}

.codex-preview h3 {
    font-family: 'UnifrakturCook', cursive;
    font-size: 2rem;
    color: var(--heading-color);
    text-align: center;
    margin-bottom: 3rem;
}

.category-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(2, minmax(350px, 1fr));

     @media(max-width: 600px) {
        grid-template-columns: repeat(1, minmax(350px, 1fr));
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    padding: 3rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-box-border);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    transition: box-shadow 0.3s linear, border-color 0.4s linear;
}

.character-card,
.races-card {
    position: relative;
    overflow: hidden;
}

/* Background blur effect */
.character-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%;
    background: url("../Images/character test.png") no-repeat center center / cover;
    transition: filter 0.4s ease;
    z-index: 1;
    filter: blur(0px) brightness(0.4);
}

.races-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%;
    background: url("../Images/races test.png") no-repeat center center / cover;
    transition: filter 0.4s ease;
    z-index: 1;
    filter: blur(0px) brightness(0.4);
}

.category-card .card-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.category-card h4 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    margin: 0;
    font-family: 'cinzel decorative', serif;
    font-size: 1.4rem;
    color: var(--heading-title);
    transition: opacity 0.5s linear;
}

.category-card p {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    margin: 0;
    color: var(--text-box-color);
    font-size: 1.08rem;
    opacity: 0;
    transition: opacity 0.3s linear;
    text-align: center;
    font-family: "IM Fell DW Pica", serif;
}

.character-card:hover::before,
.races-card:hover::before {
    filter: blur(4px) brightness(0.6);
}

.character-card:hover h4,
.races-card:hover h4 {
    opacity: 0;
}

.character-card:hover p,
.races-card:hover p {
    opacity: 1;
}

/* Hover effect: slight glow/illumination */
.category-card:hover {
    border-color: var(--link-hover);
    box-shadow: 0 0 15px var(--hover-glow);
}

/* Quick Links Section */
.quick-links {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.quick-links h3 {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
}

.quick-links .link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 400px;
    min-height: 250px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-box-border);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    transition: box-shadow 0.3s linear, border-color 0.4s linear;
    margin-bottom: 0;
}

/* Responsive for mobile */
@media (max-width: 800px) {
    .quick-links {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    .quick-links .link-card {
        min-width: 0;
        width: 100%;
    }
}

/* Quick Links Blur transition */
.link-card {
    position: relative;
    overflow: hidden;
}

.novel-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%;
    background: url("../Images/novel test.png"); 
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 65%;
    transition: filter 0.4s ease;
    z-index: 1;
    filter: blur(0px) brightness(0.4);
}

.quick-links .link-card h4 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    margin: 0;
    font-family: 'cinzel decorative', serif;
    font-size: 1.4rem;
    color: var(--heading-title);
    transition: opacity 0.5s linear;
    z-index: 2;
}

.link-card p {
    color: var(--text-box-colorcolor);
    font-size: 0.95rem;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.quick-links a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
}


.link-card:hover h4 {
  opacity: 0;
}
.link-card:hover p {
  opacity: 1;
}

.quick-links:hover::before {
    filter: blur(4px) brightness(0.6);
}

.quick-links h3 {
    font-family: 'UnifrakturCook', cursive;
    font-size: 2rem;
    color: var(--heading-color);
    text-align: center;
    margin-bottom: 2rem;
}

/* Hover effect for link cards */
.quick-links .link-card:hover {
    border-color: var(--link-hover);
    box-shadow: 0 0 15px var(--hover-glow);
}

/* Recent Articles Section */
.recent-articles {
    padding: 3rem 2rem;
}

.recent-articles h3 {
    font-family: 'UnifrakturCook', cursive;
    font-size: 2rem;
    color: var(--heading-color);
    text-align: center;
    margin-bottom: 1.5rem;
}

.recent-articles ul {
    list-style: none;
    padding-left: 0;
    max-width: 700px;
    margin: 0 auto;
}

.recent-articles li {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.recent-articles li:hover {
    background-color: #1f1f1f;
    border-color: var(--link-hover);
}

.recent-articles li a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 600;
}

.recent-articles li a:hover {
    color: var(--link-hover);
}

/* Footer Section */
footer {
    text-align: center;
    padding: 2rem;
    background-color: #121212;
    border-top: 2px solid var(--card-border);
}

footer p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.9rem;
}
