@font-face {
    font-family: 'Trail';
    src: url('https://cdn.getforge.com/pensieve.getforge.io/1760396658/fonts/Trail.woff2') format('woff2'),
         url('https://cdn.getforge.com/pensieve.getforge.io/1760396658/fonts/Trail.woff') format('woff'),
         url('https://cdn.getforge.com/pensieve.getforge.io/1760396658/fonts/Trail.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #6366f1;
    --text-color: #ffffff;
    --background-overlay: rgba(0, 0, 0, 0.5);
    --title-font: 'Hahmlet', serif;
    --body-font: 'IBM Plex Sans', sans-serif;
}

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

body {
    font-family: var(--body-font);
    color: var(--text-color);
    overflow-x: hidden;
    background: #000;
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000;
    opacity: 0;
    transition: opacity 3s ease-out;
}

.background-video video {
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-video::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-overlay);
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    z-index: 1000;
    pointer-events: none;
    transition: background-color 3s ease-out;
}

.logo-text {
    font-family: 'Trail', 'Hahmlet', serif;
    font-size: 3rem;
    font-weight: normal;
    opacity: 1;
    transition: opacity 3s ease-out;
}

.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: opacity 2s ease-out;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.cta-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease;
    font-family: var(--body-font);
}

.cta-button:hover {
    transform: scale(1.05);
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    padding-top: 80px;
    padding-bottom: 120px;
    gap: 2rem;
}

.hero h1 {
    font-family: var(--title-font);
    font-size: 3.2rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 500px;
    opacity: 0.9;
    line-height: 1.4;
}

.demo-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: 55vh;
    margin: 2rem auto;
    aspect-ratio: 16/9;
}

.pre-roll {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    visibility: hidden;
}

.pre-roll.visible {
    visibility: visible;
    animation: fadeOut 1s ease-out 9s forwards;
}

.photo-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.pre-roll.visible .photo-frame {
    animation: frameToOrb 2.5s ease-in-out 5s forwards;
}

.photo {
    width: 100%;
    height: 100%;
    position: relative;
    opacity: 0;
}

.pre-roll.visible .photo {
    animation: fadeInPhoto 1.5s ease-in forwards;
}

.photo img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.pre-roll:not(.visible) .photo-frame .photo img {
    opacity: 1;
}

.photo-original {
    opacity: 1;
}

.photo-upscaled {
    opacity: 0;
}

.pre-roll.visible .photo-upscaled {
    animation: fadeInUpscaled 1.5s ease-in 2s forwards;
}

.photo-depth {
    opacity: 0;
}

.pre-roll.visible .photo-depth {
    animation: fadeInDepth 1.5s ease-in 4s forwards;
}

.animation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(100, 149, 237, 0.3);
}

.pre-roll.visible .animation-overlay {
    animation: overlayReveal 2.5s ease-in-out 2.5s forwards;
}

.memory-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    mix-blend-mode: screen;
    opacity: 0;
    overflow: hidden;
}

.pre-roll.visible .memory-orb {
    animation: orbReveal 2s ease-in-out 6s forwards;
}

.memory-orb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0;
}

.pre-roll.visible .memory-orb video {
    animation: fadeInOrbVideo 1s ease-in 7s forwards;
}

.demo-video {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-out;
}

.demo-video.visible {
    opacity: 1;
}

.demo-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

@keyframes fadeInPhoto {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes overlayReveal {
    from { height: 0%; }
    to { height: 100%; }
}

@keyframes frameToOrb {
    to {
        width: 300px;
        height: 300px;
        border-radius: 50%;
        padding: 0;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
}

@keyframes orbReveal {
    from {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes fadeInVideo {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUpscaled {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDepth {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInOrbVideo {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    font-family: var(--body-font);
}

.form-container {
    color: var(--text-color);
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.signup-form h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.signup-form input,
.signup-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
}

.signup-form input:focus,
.signup-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.signup-form input::placeholder,
.signup-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.signup-form button[type="submit"] {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-family: var(--body-font);
}

.medium-link {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
}

.medium-link:hover {
    opacity: 1;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    z-index: 90;
    transition: opacity 2s ease-out;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.copyright {
    opacity: 0.8;
}

.copyright a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.copyright a:hover {
    opacity: 1;
    text-decoration: underline;
}

.cta-button.primary {
    margin-top: 1rem;
    font-size: 1.1rem;
    padding: 0.85rem 2rem;
}

@media screen and (min-height: 900px) {
    .demo-container {
        max-height: 45vh;
    }
    
    .hero {
        gap: 2.5rem;
    }
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    margin: 5px 0;
    transition: 0.3s ease-out;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(8px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: 0.3s ease-out;
        z-index: 100;
    }

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

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    nav a {
        font-size: 1.5rem;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .nav-header .cta-button {
        font-size: 1.1rem;
        padding: 1rem 2rem;
    }
}

/* Prevent iOS from showing video controls even when they're disabled */
video::-webkit-media-controls {
    display: none !important;
}

/* Ensure videos work properly on iOS */
video {
    pointer-events: none;
}

/* Add specific iOS fixes */
@supports (-webkit-touch-callout: none) {
    .background-video,
    .memory-orb,
    .demo-video {
        will-change: transform;
    }
}

.video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #000428, #004e92);
    opacity: 0.8;
    display: none; /* Only show when video fails */
}

/* Ensure video remains hardware accelerated */
video {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
    will-change: transform;
}

.footer-divider {
    opacity: 0.4;
    margin: 0 1rem;
}

.powered-by {
    opacity: 0.8;
    font-size: 0.9rem;
}

.powered-by a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.powered-by a:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-divider {
        margin: 0 0.5rem;
    }
}

/* Add transitions for content */
main, .nav-header, .footer {
    transition: opacity 2s ease-out;
} 