/* Root Variables */
:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #0d0d10;
    --text-primary: #e8e8e8;
    --text-secondary: #6a6a72;
    --accent: #7a8599;
    --accent-glow: rgba(122, 133, 153, 0.15);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    max-width: 100%;
    overflow: hidden;
}

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

.sigil-container {
    margin-bottom: 4rem;
    animation: fadeIn 2s ease-out;
}

.sigil {
    width: 120px;
    height: 180px;
    color: var(--accent);
    filter: drop-shadow(0 0 20px var(--accent-glow));
    animation: drift 8s ease-in-out infinite;
}

.sigil .pendulum {
    transform-origin: 98px 85px;
    animation: tick 4s ease-in-out infinite;
}

.sigil .weight {
    animation: tick 4s ease-in-out infinite;
    transform-origin: 98px 85px;
}

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

@keyframes tick {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(2deg);
    }
    75% {
        transform: rotate(-1deg);
    }
}

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

.site-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    animation: fadeIn 2s ease-out 0.5s both;
}

.tagline {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    animation: fadeIn 2s ease-out 1s both;
}

/* Essence Section */
.essence {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
}

.fragments {
    max-width: 600px;
    text-align: center;
}

.fragment {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.fragment:last-child {
    margin-bottom: 0;
    color: var(--accent);
}

/* The Break Section */
.the-break {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.disruption {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.break-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--text-secondary), transparent);
    opacity: 0.4;
}

.break-line.short {
    width: 30px;
}

.break-mark {
    width: 6px;
    height: 6px;
    border: 1px solid var(--accent);
    transform: rotate(45deg);
    opacity: 0.6;
}

.break-text {
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease-out;
}

.break-text.visible {
    opacity: 0.7;
}

/* Closing Signal */
.signal {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.recognition {
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0.2em;
    text-align: center;
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

.recognition.visible {
    opacity: 1;
}

/* Ambient Background Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(122, 133, 153, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(122, 133, 153, 0.02) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* Subtle noise texture overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.015;
    pointer-events: none;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Selection styling */
::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .hero {
        padding: 1.5rem;
    }

    .sigil {
        width: 100px;
        height: 150px;
    }

    .sigil-container {
        margin-bottom: 3rem;
    }

    .site-title {
        letter-spacing: 0.2em;
    }

    .essence {
        padding: 4rem 1.5rem;
    }

    .fragment {
        margin-bottom: 2rem;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .sigil,
    .sigil .pendulum,
    .sigil .weight {
        animation: none;
    }

    .fragment,
    .break-text,
    .recognition {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .sigil-container,
    .site-title,
    .tagline {
        animation: none;
        opacity: 1;
    }
}
