:root {
    --bg-color: #0b101a;
    --text-main: #f0f2f5;
    --text-muted: #a0a5b0;
    --accent-gold: #c5a059;
    --accent-gold-light: #e6c885;
    --font-serif: 'Shippori Mincho', serif;
    --easing: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-serif);
    line-height: 2.2;
    letter-spacing: 0.08em;
    line-break: strict;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    /* Move behind stars */
    background:
        radial-gradient(circle at 50% 10%, rgba(20, 30, 50, 0.4) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(197, 160, 89, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

#star-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Move in front of background gradient */
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes twinkle {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 0.8;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header & Logo */
.site-header {
    margin-top: 60px;
    margin-bottom: 20px;
    text-align: center;
}

.logo {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: 1.4rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    text-transform: uppercase;
    opacity: 0.9;
}

.section-title,
body.page .page-main h1,
body.page .page-main h2,
body.page-centered .page-main h1,
body.page-centered .page-main h2,
body.page-article .page-main h1,
body.page-article .page-main h2,
.article-main,
.hero-text {
    color: var(--accent-gold);
    text-wrap: balance;
}

.article-sub {
    color: var(--accent-gold-light);
}

.logo-image {
    width: min(1100px, 90vw);
    height: auto;
    display: block;
    margin: 0 auto;
}

body.page-article .logo-image {
    width: min(520px, 82vw);
    margin: 0 auto 1.5rem;
}

/* Navigation */
.nav-toggle {
    position: fixed;
    /* Fixed to viewport */
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    z-index: 1000;
    /* Extremely high z-index */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    /* Remove default padding */
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    /* Increased thickness */
    background-color: var(--accent-gold);
    transition: all 0.3s var(--easing);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    /* Add shadow for contrast */
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.nav-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: rgba(11, 16, 26, 0.98);
    /* Less transparent */
    backdrop-filter: blur(10px);
    z-index: 999;
    /* Below toggle but high */
    padding: 80px 40px;
    transition: right 0.4s var(--easing);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.nav-sidebar.active {
    right: 0;
}

.nav-links {
    list-style: none;
    text-align: left;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Separator */
    padding-bottom: 0.5rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s;
    display: block;
    position: relative;
    letter-spacing: 0.1em;
}

.nav-links a:hover {
    color: var(--accent-gold);
    padding-left: 5px;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5svar(--easing);
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Hero Section */
.hero {
    height: auto;
    padding: 2.5rem 0 1.5rem;
    /* Reduced height to tighten the gap under the logo */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-text {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 2;
    opacity: 0.9;
    animation: glow 4s infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
    }

    to {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    }
}

/* Concept Section */
.concept {
    text-align: center;
    margin-bottom: 120px;
    color: var(--text-main);
}

.concept p {
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    line-height: 2.4;
}

.concept-title {
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin-top: 4rem;
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.concept-list {
    list-style: none;
    /* Custom markers */
    padding: 0;
    display: inline-block;
    /* Center the block, left-align text */
    text-align: left;
    margin-bottom: 2rem;
}

.concept-list li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5em;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.concept-list li::before {
    content: '✦';
    /* Star/Sparkle marker */
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-gold);
    /* Gold accent */
    font-size: 0.8em;
    opacity: 0.8;
}

/* Tarot Section */
.tarot-card {
    width: 100%;
    margin-bottom: 120px;
    position: relative;
}

.card-inner {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 40px;
    text-align: center;
    border-radius: 4px;
    /* Slightly rapid radius for sharper look */
    backdrop-filter: blur(5px);
    transition: transform 0.6s var(--easing), box-shadow 0.6s var(--easing);
}

.tarot-card:hover .card-inner {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(197, 160, 89, 0.2);
}

.section-title {
    font-weight: 500;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--accent-gold);
}

.card-desc {
    margin-bottom: 3rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.btn-primary {
    display: inline-block;
    text-decoration: none;
    color: var(--bg-color);
    background: var(--accent-gold);
    padding: 14px 40px;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: all 0.4s var(--easing);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--accent-gold-light);
    letter-spacing: 0.2em;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
}

/* Articles Section */
.articles {
    width: 100%;
    margin-bottom: 120px;
    text-align: center;
}

.article-list {
    list-style: none;
    margin-top: 3rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    padding: 2.6rem 2.2rem;
    text-align: center;
    /* Center list items */
    background-color: #f2eadc;
    background-image:
        linear-gradient(180deg, rgba(248, 244, 236, 0.98), rgba(232, 219, 200, 0.98)),
        repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.03) 0, rgba(0, 0, 0, 0.03) 2px, transparent 2px, transparent 6px);
    border: 1px solid rgba(197, 160, 89, 0.25);
    border-radius: 14px;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.35),
        inset 0 0 40px rgba(120, 90, 50, 0.08);
}

.article-list li {
    margin-bottom: 2rem;
}

.article-list a {
    color: #2a2620;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.3s var(--easing);
}

.article-main {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
    position: relative;
    padding-bottom: 3px;
    transition: color 0.3s;
}

.article-main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #b88a3a;
    transition: width 0.4s var(--easing);
}

.article-sub {
    font-size: 0.8rem;
    color: #6a6256;
    font-weight: 400;
}

.article-list a:hover .article-main {
    color: #8d6b2e;
}

.article-list a:hover .article-main::after {
    width: 100%;
}

/* Footer */
.footer {
    margin-bottom: 60px;
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
}

/* Animations */
.fade-in {
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s var(--easing);
}

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

body.page .fade-in,
body.page .fade-in-up {
    opacity: 1;
    transform: none;
}

/* Response */
@media (max-width: 600px) {
    body {
        letter-spacing: 0.04em;
    }

    .container {
        padding: 0 20px;
    }

    .site-header {
        margin-top: 40px;
    }

    .logo-image {
        width: min(760px, 92vw);
    }

    .hero-text {
        font-size: 1rem;
        line-height: 2.4;
    }

    .card-inner {
        padding: 40px 20px;
    }

    .article-list {
        padding: 2rem 1.6rem;
    }

    .article-main {
        font-size: 1rem;
    }

    .article-sub {
        font-size: 0.75rem;
    }

    .nav-toggle {
        top: 16px;
        right: 16px;
    }

    .nav-sidebar {
        width: min(82vw, 320px);
        right: calc(-1 * min(82vw, 320px));
        padding: 70px 28px;
    }

    .nav-links a {
        font-size: 0.95rem;
    }
}

@media (max-width: 900px) {
    .container {
        max-width: 680px;
    }

    .tarot-card {
        margin-bottom: 90px;
    }

    .articles {
        margin-bottom: 90px;
    }
}

/* Floral Overlay */
.floral-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

.floral-vines {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 2px rgba(197, 160, 89, 0.5));
}

.vine-path {
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 1;
    /* Thinner for elegance */
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.7;

    stroke-dasharray: var(--length);
    stroke-dashoffset: calc(var(--length) * (1 - var(--scroll, 0)));
    transition: stroke-dashoffset 0.1s linear;
}

.flower-path {
    fill: none;
    stroke: var(--accent-gold);
    /* Same gold color for unity */
    stroke-width: 0.8;
    /* Slightly thinner than vine for detail */
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.8;

    stroke-dasharray: var(--length);
    stroke-dashoffset: var(--length);

    /* Reveal flowers along with the scroll, using the same logic */
    stroke-dashoffset: calc(var(--length) * (1 - var(--scroll, 0)));
    transition: stroke-dashoffset 0.1s linear;
}

/* Reveal flowers when drawn enough using CSS logic if possible, 
   or just rely on the scroll drawing them naturally. 
   Let's ensure they are visible. */
.flower-path {
    opacity: 0.8;
}

/* Simple content pages */
.page-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 6rem;
}

body.page .page-main h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

body.page .page-main h2 {
    font-size: 1.2rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

body.page .page-main p {
    margin: 1.2rem 0;
}

body.page .page-main a {
    color: var(--accent-gold-light);
    text-decoration: underline;
}

body.page-centered .page-main {
    max-width: 640px;
    padding: 6rem 1.5rem 5rem;
    text-align: center;
}

body.page-centered .page-main h1 {
    font-size: 1.8rem;
    letter-spacing: 0.08em;
    margin-bottom: 2.5rem;
}

body.page-centered .page-main h2 {
    font-size: 1.1rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
}

body.page-centered .page-main p {
    line-height: 2;
    font-size: 0.95rem;
    opacity: 0.9;
}

body.page-centered .page-main a {
    color: var(--accent-gold);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-gold);
    padding-bottom: 2px;
}

body.page-centered .page-main footer {
    margin-top: 5rem;
    font-size: 0.75rem;
    opacity: 0.6;
}

body.page-centered .page-main footer a {
    border: none;
    margin: 0 0.3rem;
    text-decoration: none;
}

body.page-article .page-main h1 {
    font-size: 2rem;
}

body.page-article .page-main h2 {
    font-size: 1.25rem;
}

body.page-article .page-main {
    text-align: center;
    padding: 5rem 2rem 8rem;
}

body.page-article .page-main p {
    line-height: 1.9;
    margin: 1.6rem 0;
}

body.page-article .page-main a {
    color: var(--accent-gold);
    text-decoration: underline;
}

body.page-article .page-main .link-block {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* Sitemap */
.page-main-sitemap {
    max-width: 900px;
    padding: 5rem 1.5rem 6rem;
}

@media (max-width: 900px) {
    .page-main,
    .page-main-sitemap {
        padding: 4.5rem 1.6rem 5rem;
    }
}

@media (max-width: 600px) {
    .page-main {
        padding: 4rem 1.4rem 4.5rem;
    }

    body.page-article .page-main {
        padding: 4.5rem 1.4rem 6rem;
    }

    body.page .page-main h1,
    body.page-centered .page-main h1,
    body.page-article .page-main h1 {
        font-size: 1.6rem;
    }

    body.page .page-main h2,
    body.page-centered .page-main h2,
    body.page-article .page-main h2 {
        font-size: 1.05rem;
    }

    .page-main-sitemap {
        padding: 4.5rem 1.4rem 5rem;
    }

    .sitemap-section {
        padding: 1.6rem 1.6rem;
    }

    .sitemap-link {
        font-size: 0.95rem;
    }
}

.page-main-sitemap h1 {
    text-align: center;
    margin-bottom: 2.5rem;
    letter-spacing: 0.12em;
}

.sitemap-grid {
    display: grid;
    gap: 1.6rem;
}

.sitemap-section {
    background: rgba(9, 12, 20, 0.78);
    border: 1px solid rgba(197, 160, 89, 0.18);
    border-radius: 16px;
    padding: 2rem 2.2rem;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.sitemap-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-main);
    margin-bottom: 1.4rem;
}

.sitemap-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.9rem;
}

.sitemap-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.08em;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(240, 242, 245, 0.18);
    transition: color 0.3s var(--easing), border-color 0.3s var(--easing);
}

.sitemap-link::before {
    content: '—';
    color: rgba(240, 242, 245, 0.6);
    opacity: 1;
}

.sitemap-link:hover {
    color: var(--accent-gold-light);
    border-color: var(--accent-gold-light);
}
