:root {
    --haunted-green: #dbffd4;
    --background: #000000;
    --background-light: #ffffff;
    --text: #e0e0e0;
    --text-light: #f0f0f4;
    --header: #fff;
    --header-light: #111111;
    --accent: #ffffff;
    --accent-dark: #000000;
    --accent-light: #00cc55;
    --border: #333;
    --border-light: #e0e0e0;
    --code-bg: #222;
    --code-bg-light: #f5f5f5;
    --quote-text: #ccc;
    --quote-text-light: #666;
    --footer-text: #777;
    --footer-text-light: #999;
    --focus-outline: 2px solid var(--accent);
    --focus-outline-offset: 2px;
}

* {
    box-sizing: border-box;
}

#slime {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    filter: brightness(0.4);
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

#slime.fade-in {
    opacity: 1;
}

#ghostOverlay {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

#ghostOverlay.fade-in {
    opacity: 1;
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif,
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Segoe UI Symbol";
    line-height: 1.6;
    font-size: 18px;
    padding: 0;
    margin: 0;

    background-color: var(--background);
    color: var(--text);
    min-height: 100vh;
}

section,
footer,
header {
    width: 100%;
}

section {
    padding: 40px 0;
}

.section-width {
    max-width: 800px;
    margin: 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
    color: var(--header);
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: 2.8em;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2em;
    margin-top: 2em;
    margin-bottom: 1rem;
    font-weight: bold;
}

h3 {
    font-size: 1.5em;
    margin-bottom: 0.8rem;
}

p {
    margin-bottom: 1.2em;
    text-wrap: balance;
}

strong,
b {
    font-weight: 800;
    color: var(--accent);
}

a {
    color: var(--accent);
    text-decoration: underline;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: none;
}

a:focus {
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-offset);
    border-radius: 2px;
}

header {
    /* height: 100vh; */
    padding-bottom: 100px;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0px;
    margin-top: 64px;
}

@media (max-width: 768px) {
    .intro-grid {
        grid-template-columns: 1fr;
    }
}

header p {
    margin-top: 0;
}

header h1 {
    padding-top: 72px;
}

.vibe-busters {
    font-weight: 800;
    letter-spacing: 4px;
}

.haunted-text {
    filter: url(#hauntedFilter) url(#hauntedGlow);
    display: inline-block;
    color: var(--haunted-green);
    animation: hauntedFlicker 8s ease-in-out infinite;
}

/* Safari-specific styles to remove SVG filter animation for performance */
.safari-browser .haunted-text {
    filter: none;
    animation: none;
}

/* Safari: Split text into individual letters for animation */
.safari-browser .haunted-text .letter {
    display: inline-block;
    filter: url(#hauntedFilterStatic) url(#hauntedGlow);
    animation: hauntedLetterFloat 5s ease-in-out infinite;
    animation-delay: calc(var(--letter-index) * 0.1s);
    will-change: transform;
    transform-style: preserve-3d;
}

@keyframes hauntedFlickerSafari {
    0%,
    100% {
        opacity: 1;
        transform: translateY(0px);
    }
    25% {
        opacity: 0.95;
        transform: translateY(-0.5px) rotate(0.2deg);
    }
    50% {
        opacity: 0.98;
        transform: translateY(0.5px) rotate(-0.1deg);
    }
    75% {
        opacity: 0.96;
        transform: translateY(-0.25px) rotate(0.1deg);
    }
}

@keyframes hauntedLetterFloat {
    0%,
    100% {
        transform: translate3d(0px, 0px, 0px) rotate(0deg) scale(1);
    }
    16% {
        transform: translate3d(0px, -0.5px, 0px) rotate(0.15deg) scale(1.01);
    }
    33% {
        transform: translate3d(0px, 0.3px, 0px) rotate(-0.1deg) scale(0.99);
    }
    50% {
        transform: translate3d(0px, -0.4px, 0px) rotate(0.05deg) scale(1.005);
    }
    66% {
        transform: translate3d(0px, 0.2px, 0px) rotate(-0.08deg) scale(0.995);
    }
    83% {
        transform: translate3d(0px, -0.2px, 0px) rotate(0.12deg) scale(1.002);
    }
}

@keyframes hauntedFlicker {
    0%,
    100% {
        opacity: 1;
        transform: translateY(0px);
    }
    25% {
        opacity: 0.95;
        transform: translateY(-0.5px);
    }
    50% {
        opacity: 0.98;
        transform: translateY(0.5px);
    }
    75% {
        opacity: 0.96;
        transform: translateY(-0.25px);
    }
}

.cta-button {
    display: inline-block;
    color: #000;
    background: var(--accent);
    padding: 12px 20px;
    font-size: 1em;
    text-decoration: none;
    border-radius: 32px;
    margin: 1.5em 0;
    transition: all 0.3s ease;
    border: 1px solid var(--accent);
    font-family: "Inter", sans-serif;
    cursor: pointer;
}

.cta-button:hover {
    background: var(--accent-dark);
    text-decoration: none;
    color: var(--accent);
    transform: translateY(-2px);
}

.cta-button:focus {
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-offset);
}

.cta-button-large {
    display: block;
    width: fit-content;
    margin: 2em auto;
    padding: 25px 50px;
    font-size: 1.5em;
    text-align: center;
}

ul {
    padding-left: 1.5em;
}

li {
    margin-bottom: 1em;
}

blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.5em;
    margin-left: 0;
    font-style: italic;
    color: var(--quote-text);
    margin: 2em 0;
}

code {
    background-color: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
    font-size: 0.9em;
}

hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 3em 0;
}

.text-center {
    text-align: center;
}

.does-this-sound-like-you-section {
    color: #fff;
}

.truth-section {
    color: #fff;
}

.salvage-section {
    color: #fff;
}

.offer-section {
    color: #fff;
}

.final-cta-section {
    color: #fff;
}

footer {
    text-align: center;
    margin-top: 4em;
    color: var(--footer-text);
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent);
    color: #000;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

.is-mobile {
    display: none;
}

@media (prefers-contrast: high) {
    strong,
    b {
        text-shadow: none;
    }

    .cta-button {
        box-shadow: none;
        border: 3px solid var(--accent);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }

    .cta-button:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
        margin: 20px auto;
    }

    header,
    section,
    footer {
        padding: 0 15px;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        text-align: center;
    }

    h1 {
        font-size: 2.3em;
        letter-spacing: 1px;
    }

    h2 {
        font-size: 1.6em;
    }

    .cta-button {
        padding: 15px 30px;
        font-size: 1.1em;
    }

    .cta-button-large {
        padding: 20px 40px;
        font-size: 1.3em;
    }

    #ghostOverlay {
        filter: brightness(0.6);
    }

    .is-mobile {
        display: inline-block;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }

    .cta-button {
        display: block;
        text-align: center;
        margin: 1em auto;
    }
}
