html {
    scroll-behavior: smooth;
}

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

.header__nav {
     display: flex;
     align-items: center;
      gap: 32px;
}

.header__nav a {
     text-decoration: none;
      color: #fff;
       font-weight: 500;
        font-size: 22px;
         font-family: 'Roboto Mono', monospace;
}

.search-btn {
    background: none; border: 1px solid rgba(255,255,255,0.2);
    color: #fff; padding: 10px; border-radius: 12px;
    transition: background 0.3s;
}
.search-btn:hover { background: rgba(255,255,255,0.1); }

.preview-wrap {
    grid-area: page;
    padding: 0 32px;
    position: relative;
    z-index: 100;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.preview {
    height: 90vh;
    padding: 5rem 0 0;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: 100%;
    will-change: transform;
    box-sizing: border-box;
}

@media screen and (min-width: 53em) {
    .preview {
        height: 90vh;
        padding: 8rem 0 0;
    }
}

.preview-header {
    display: flex;
    border-radius: 32px;
    box-sizing: border-box;
}

.content-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
}

.image-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.preview__visual {
    position: absolute;
    border-radius: 32px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.preview__visual canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.preview__heading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    color: white;
    text-align: center;
    text-wrap: auto;
    font-family: 'Roboto Mono', monospace;
    font-size: clamp(0rem, 28vw, 9rem);
    font-weight: 700;
    pointer-events: none;
}

.preview__visual {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#webGLCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: all;
}

@media (max-width: 800px) {
    .preview-wrap {
        padding: 12px;
    }
}

@media (max-width: 550px) {
    .search-btn {
        display: none;
    }
    .back-link {
        display: none;
    }
    .header__container {
        justify-content: center;
    }
}

canvas {
    display: block;
}