:root {
    --abyss: #0a0a0f;
    --shadow: #151520;
    --mist: #8a8a9f;
    --blood: #a01a1a;
    --ethereal: #4a5a7f;
}

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

body {
    font-family: 'Crimson Pro', serif;
    background: var(--abyss);
    color: var(--mist);
    overflow-x: hidden;
    position: relative;
}

/* Atmospheric fog effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    z-index: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(74, 90, 127, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(160, 26, 26, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(74, 90, 127, 0.15) 0%, transparent 50%);
    animation: shimmer 15s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.015;
    z-index: 0;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(138, 138, 159, 0.05) 3px,
        rgba(138, 138, 159, 0.05) 4px
    );
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.03;
    }
    50% {
        opacity: 0.06;
    }
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
}

/* Decorative gothic corner elements */
.corner {
    position: absolute;
    width: 150px;
    height: 150px;
    opacity: 0;
    animation: fadeInCorner 2s ease-out forwards;
    filter: drop-shadow(0 0 10px rgba(74, 90, 127, 0.3));
}

.corner::before,
.corner::after {
    content: '';
    position: absolute;
    background: linear-gradient(135deg, var(--ethereal), var(--blood));
    box-shadow: 0 0 20px rgba(74, 90, 127, 0.5);
}

.corner::before {
    width: 100%;
    height: 2px;
}

.corner::after {
    width: 2px;
    height: 100%;
}

.corner.top-left {
    top: 2rem;
    left: 2rem;
    animation-delay: 0.8s;
}

.corner.top-left::before {
    top: 0;
    left: 0;
}

.corner.top-left::after {
    top: 0;
    left: 0;
}

/* Additional gothic decorations */
.corner.top-left .rune,
.corner.bottom-right .rune {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--blood);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(160, 26, 26, 0.8);
}

.corner.top-left .rune:nth-child(1) {
    top: -4px;
    left: -4px;
}

.corner.bottom-right {
    bottom: 2rem;
    right: 2rem;
    animation-delay: 1s;
}

.corner.bottom-right::before {
    bottom: 0;
    right: 0;
}

.corner.bottom-right::after {
    bottom: 0;
    right: 0;
}

.corner.bottom-right .rune:nth-child(1) {
    bottom: -4px;
    right: -4px;
}

main {
    text-align: center;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--ethereal);
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 0.3s forwards;
    font-weight: 400;
    text-shadow: 0 0 20px rgba(74, 90, 127, 0.5);
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(4.5rem, 16vw, 10rem);
    font-weight: 600;
    line-height: 0.9;
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 0.6s forwards, glow 3s ease-in-out 2s infinite;
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, var(--mist) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(74, 90, 127, 0.6));
}

h1::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blood), transparent);
    opacity: 0;
    animation: expandWidth 1.5s ease-out 1.8s forwards;
    box-shadow: 0 0 15px rgba(160, 26, 26, 0.8);
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 30px rgba(74, 90, 127, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(74, 90, 127, 0.9)) drop-shadow(0 0 20px rgba(160, 26, 26, 0.4));
    }
}

.description {
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--mist);
    margin: 4rem 0;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 0.9s forwards;
    font-style: italic;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.cta-container {
    margin-top: 4rem;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 1.2s forwards;
}

.btn {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    border: 2px solid var(--ethereal);
    background: rgba(21, 21, 32, 0.6);
    color: var(--mist);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    cursor: pointer;
    box-shadow: 
        0 0 20px rgba(74, 90, 127, 0.3),
        inset 0 0 20px rgba(74, 90, 127, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--blood), var(--ethereal));
    transition: width 0.6s ease, height 0.6s ease, top 0.6s ease, left 0.6s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn:hover {
    color: #ffffff;
    border-color: var(--blood);
    box-shadow: 
        0 0 30px rgba(160, 26, 26, 0.6),
        0 0 50px rgba(74, 90, 127, 0.4),
        inset 0 0 30px rgba(160, 26, 26, 0.2);
    transform: translateY(-2px);
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

/* Floating mystical elements */
.page-element {
    position: absolute;
    opacity: 0.08;
    animation: float 25s ease-in-out infinite;
    pointer-events: none;
    color: var(--ethereal);
    filter: blur(1px);
    text-shadow: 0 0 20px rgba(74, 90, 127, 0.8);
}

.page-element:nth-child(1) {
    top: 12%;
    left: 8%;
    font-size: 10rem;
    animation-delay: 0s;
    animation-duration: 30s;
}

.page-element:nth-child(2) {
    bottom: 15%;
    right: 10%;
    font-size: 7rem;
    animation-delay: 5s;
    animation-duration: 25s;
}

.page-element:nth-child(3) {
    top: 55%;
    left: 6%;
    font-size: 5rem;
    animation-delay: 10s;
    animation-duration: 35s;
}

.page-element:nth-child(4) {
    top: 25%;
    right: 12%;
    font-size: 6rem;
    animation-delay: 15s;
    animation-duration: 28s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInCorner {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes expandWidth {
    from {
        opacity: 0;
        width: 0;
    }
    to {
        opacity: 1;
        width: 100px;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.08;
    }
    25% {
        transform: translateY(-30px) translateX(10px) rotate(5deg);
        opacity: 0.12;
    }
    50% {
        transform: translateY(-15px) translateX(-10px) rotate(-5deg);
        opacity: 0.06;
    }
    75% {
        transform: translateY(-40px) translateX(5px) rotate(3deg);
        opacity: 0.10;
    }
}

/* Mystical particles */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--ethereal);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(74, 90, 127, 0.8);
}

.particle:nth-child(5) {
    left: 20%;
    top: 30%;
    animation-delay: 0s;
}

.particle:nth-child(6) {
    left: 70%;
    top: 50%;
    animation-delay: 2s;
}

.particle:nth-child(7) {
    left: 40%;
    top: 70%;
    animation-delay: 4s;
}

.particle:nth-child(8) {
    left: 85%;
    top: 25%;
    animation-delay: 6s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) scale(0.5);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .corner {
        width: 100px;
        height: 100px;
    }
    
    .corner.top-left,
    .corner.bottom-right {
        margin: 1rem;
    }
    
    .subtitle {
        font-size: 0.65rem;
        letter-spacing: 0.3em;
    }
    
    .description {
        font-size: 1.05rem;
        margin: 2.5rem 0;
    }
    
    .btn {
        padding: 1rem 2.5rem;
        font-size: 0.8rem;
    }
    
    .page-element {
        opacity: 0.04;
    }
    
    .particle {
        display: none;
    }
}
