/* =========================================================
   OptiBlend Final Website
   Plain HTML / CSS / JS so I can keep editing it myself.
   ========================================================= */

:root {
    --black: #030303;
    --panel: #0a0a0a;
    --panel-soft: #111111;
    --white: #f7f7f5;
    --soft: #aaa;
    --dim: #666;
    --line: rgba(255, 255, 255, 0.14);
    --line-strong: rgba(255, 255, 255, 0.34);
    --page: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;

    color: var(--white);
    background: var(--black);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

body::selection {
    color: black;
    background: white;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =============================
   SMALL TEXTURE OVER EVERYTHING
   ============================= */

.noise {
    position: fixed;
    inset: 0;
    z-index: 100;

    pointer-events: none;

    opacity: 0.024;

    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.36'/%3E%3C/svg%3E");
}


/* =============================
   TOP MENU
   ============================= */

.topbar {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 60;

    width: min(calc(100% - 32px), var(--page));

    transform: translateX(-50%);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 8px 9px 8px 14px;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;

    background: rgba(4, 4, 4, 0.58);

    backdrop-filter:
        blur(18px)
        saturate(130%);

    box-shadow:
        0 18px 70px rgba(0, 0, 0, 0.28);

    transition:
        background 220ms ease,
        border-color 220ms ease,
        transform 220ms ease;
}

.topbar:hover {
    border-color: rgba(255, 255, 255, 0.27);
}

.brand {
    display: flex;
    align-items: center;

    gap: 9px;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: -0.025em;
}

.brand-icon {
    display: grid;
    place-items: center;

    width: 28px;
    height: 28px;

    border: 1px solid var(--line-strong);
    border-radius: 7px;

    font-size: 11px;

    transition:
        color 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

.brand:hover .brand-icon {
    color: black;
    background: white;
    transform: rotate(-7deg) scale(1.04);
}

.menu {
    display: flex;
    align-items: center;
    gap: 3px;
}

.menu-link {
    position: relative;

    overflow: hidden;

    padding: 10px 13px;

    border-radius: 8px;

    color: #bdbdbd;

    font-size: 12px;

    transition:
        color 170ms ease,
        background 170ms ease,
        transform 170ms ease;
}

/* This makes the menu feel alive without turning it into a huge animation. */
.menu-link::before {
    content: "";

    position: absolute;
    left: 50%;
    bottom: 5px;

    width: 0;
    height: 1px;

    background: white;

    transform: translateX(-50%);

    transition:
        width 180ms cubic-bezier(.2, .8, .2, 1);
}

.menu-link:hover {
    color: white;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.025)
        );

    transform: translateY(-1px);
}

.menu-link:hover::before {
    width: calc(100% - 24px);
}

.menu-text {
    position: relative;
    z-index: 2;
}

.menu-download {
    display: flex;
    align-items: center;

    gap: 7px;

    margin-left: 4px;

    color: black;
    background: white;

    font-weight: 700;
}

.menu-download::before {
    background: black;
}

.menu-download:hover {
    color: black;
    background: #e9e9e9;
}

.menu-arrow {
    transition: transform 170ms ease;
}

.menu-download:hover .menu-arrow {
    transform: translateY(2px);
}


/* =============================
   HERO
   ============================= */

.hero {
    position: relative;

    min-height: 100svh;

    display: flex;
    align-items: flex-end;

    overflow: hidden;
    isolation: isolate;
}

.video-background {
    position: absolute;
    inset: 0;

    z-index: -5;

    overflow: hidden;

    background: black;
}

.hero-video {
    position: absolute;

    width: 100%;
    height: 100%;

    object-fit: cover;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%) scale(1.02);

    pointer-events: none;
}

.hero-video-bloom {
    z-index: -5;

    opacity: 0.42;

    filter:
        blur(30px)
        brightness(1.45)
        contrast(1.08);

    transform:
        translate(-50%, -50%)
        scale(1.095);

    mix-blend-mode: screen;
}

.hero-video-main {
    z-index: -4;

    filter:
        brightness(0.82)
        contrast(1.08)
        saturate(0.88);
}

/* Fake optical bloom over the brighter part of the shot. */
.bloom-overlay {
    position: absolute;
    inset: 0;

    z-index: -3;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 52% 38%,
            rgba(255, 255, 255, 0.16),
            rgba(255, 255, 255, 0.055) 19%,
            transparent 43%
        ),
        radial-gradient(
            circle at 72% 50%,
            rgba(170, 210, 255, 0.08),
            transparent 31%
        );

    mix-blend-mode: screen;

    animation: bloomPulse 5.5s ease-in-out infinite;
}

.hero-shade {
    position: absolute;
    inset: 0;

    z-index: -2;

    background:
        linear-gradient(
            to top,
            rgba(3, 3, 3, 0.99) 0%,
            rgba(3, 3, 3, 0.73) 27%,
            rgba(3, 3, 3, 0.24) 63%,
            rgba(3, 3, 3, 0.08) 100%
        ),
        linear-gradient(
            90deg,
            rgba(3, 3, 3, 0.74) 0%,
            rgba(3, 3, 3, 0.26) 48%,
            rgba(3, 3, 3, 0.06) 100%
        );
}

.hero-content {
    width: min(calc(100% - 36px), var(--page));

    margin: 0 auto;

    padding:
        155px
        0
        82px;
}

.hero-logo {
    width: clamp(95px, 10vw, 145px);

    margin-bottom: 26px;
}

.logo-image {
    display: block;

    width: 100%;
    height: auto;

    border-radius: 4px;

    box-shadow:
        0 16px 60px rgba(0, 0, 0, 0.34);
}

.kicker {
    margin: 0 0 16px;

    color: #b5b5b5;

    font-size: 10px;
    font-weight: 750;

    letter-spacing: 0.19em;
}

.hero h1 {
    max-width: 950px;

    margin: 0;

    font-size: clamp(62px, 9vw, 128px);
    line-height: 0.88;

    letter-spacing: -0.07em;

    font-weight: 790;
}

.typed-line {
    display: inline-flex;
    align-items: baseline;

    min-width: 5.2em;

    color: rgba(255, 255, 255, 0.49);
}

.caret {
    display: inline-block;

    width: 0.045em;
    height: 0.78em;

    margin-left: 0.065em;

    background: rgba(255, 255, 255, 0.72);

    animation: caretBlink 0.86s steps(1) infinite;
}

.hero-text {
    max-width: 610px;

    margin: 27px 0 0;

    color: #b7b7b7;

    font-size: clamp(15px, 1.8vw, 18px);
    line-height: 1.65;
}

.actions {
    display: flex;
    align-items: center;

    gap: 22px;

    margin-top: 34px;
}

.primary-button {
    display: inline-flex;
    align-items: center;

    gap: 12px;

    padding:
        11px
        17px
        11px
        11px;

    border: 1px solid white;
    border-radius: 12px;

    color: black;
    background: white;

    box-shadow:
        0 14px 46px rgba(255, 255, 255, 0.07),
        0 8px 25px rgba(0, 0, 0, 0.26);

    transition:
        transform 170ms ease,
        box-shadow 170ms ease;
}

.primary-button:hover {
    transform:
        translateY(-3px)
        scale(1.012);

    box-shadow:
        0 22px 70px rgba(255, 255, 255, 0.12),
        0 10px 35px rgba(0, 0, 0, 0.32);
}

.primary-button .arrow {
    display: grid;
    place-items: center;

    width: 40px;
    height: 40px;

    border-radius: 8px;

    color: white;
    background: black;

    font-size: 18px;

    transition:
        transform 180ms ease;
}

.primary-button:hover .arrow {
    transform: translateY(2px);
}

.primary-button > span:last-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    line-height: 1.05;
}

.primary-button strong {
    font-size: 13px;
}

.primary-button small {
    margin-top: 6px;

    color: #686868;

    font-size: 9px;
}

.quiet-link {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    color: #c0c0c0;

    font-size: 12px;

    transition: color 160ms ease;
}

.quiet-link span {
    transition: transform 160ms ease;
}

.quiet-link:hover {
    color: white;
}

.quiet-link:hover span {
    transform: translate(3px, 3px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 28px;
}

.hero-meta span {
    padding: 6px 9px;

    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;

    color: #9f9f9f;
    background: rgba(4, 4, 4, 0.56);

    backdrop-filter: blur(9px);

    font-size: 9px;
}

.scroll-note {
    position: absolute;

    right: 31px;
    bottom: 35px;

    display: flex;
    align-items: center;

    gap: 8px;

    color: #858585;

    font-size: 8px;

    letter-spacing: 0.16em;

    writing-mode: vertical-rl;
}

.scroll-note span {
    font-size: 13px;
}


/* =============================
   ABOUT
   ============================= */

.about,
.demo-section,
.final-download,
footer {
    width: min(calc(100% - 36px), var(--page));

    margin: 0 auto;
}

.about {
    padding:
        120px
        0
        130px;

    border-top: 1px solid var(--line);
}

.section-label {
    margin-bottom: 52px;

    color: #575757;

    font-size: 10px;

    letter-spacing: 0.16em;
}

.about-grid {
    display: grid;

    grid-template-columns:
        1.2fr
        0.72fr;

    gap: clamp(48px, 8vw, 120px);
}

.about-title h2,
.demo-copy h2,
.download-card h2 {
    margin: 0;

    line-height: 0.96;

    letter-spacing: -0.055em;
}

.about-title h2 {
    font-size: clamp(45px, 6vw, 80px);
}

.type-accent,
.demo-copy h2 span {
    color: #696969;
}

.about-copy {
    padding-top: 28px;

    color: var(--soft);

    font-size: 14px;
    line-height: 1.8;
}

.about-copy p {
    margin:
        0
        0
        22px;
}

.feature-row {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;

    margin-top: 80px;
}

.feature {
    position: relative;

    min-height: 240px;

    overflow: hidden;

    padding: 20px;

    border: 1px solid var(--line);
    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.04),
            rgba(255, 255, 255, 0.008)
        );

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease;
}

.feature::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    top: -100px;
    right: -100px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.10),
            transparent 67%
        );

    opacity: 0;

    transition:
        opacity 180ms ease,
        transform 300ms ease;
}

.feature:hover {
    transform: translateY(-5px);

    border-color: var(--line-strong);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.065),
            rgba(255, 255, 255, 0.012)
        );
}

.feature:hover::after {
    opacity: 1;

    transform: scale(1.15);
}

.feature-number {
    color: #535353;

    font-size: 9px;
}

.feature h3 {
    margin:
        90px
        0
        10px;

    font-size: 16px;
}

.feature p {
    margin: 0;

    color: #858585;

    font-size: 12px;
    line-height: 1.65;
}


/* =============================
   VIDEO DEMO
   ============================= */

.demo-section {
    padding:
        120px
        0
        135px;

    border-top: 1px solid var(--line);
}

.demo-copy {
    max-width: 670px;

    margin-bottom: 44px;
}

.demo-copy h2 {
    font-size: clamp(44px, 6vw, 78px);
}

.demo-copy > p:last-child {
    max-width: 555px;

    margin: 24px 0 0;

    color: var(--soft);

    font-size: 14px;
    line-height: 1.75;
}

.video-shell {
    position: relative;

    overflow: hidden;

    aspect-ratio: 16 / 9;

    border-radius: 18px;

    background: #0c0c0c;

    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.48);

    transition:
        transform 240ms ease,
        box-shadow 240ms ease;
}

.video-shell:hover {
    transform: translateY(-5px);

    box-shadow:
        0 42px 120px rgba(0, 0, 0, 0.56);
}

.video-shell video {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.video-border {
    position: absolute;
    inset: 0;

    pointer-events: none;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: inherit;
}


/* =============================
   FINAL DOWNLOAD
   ============================= */

.final-download {
    padding:
        0
        0
        100px;
}

.download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 44px;

    padding:
        clamp(28px, 5vw, 58px);

    border: 1px solid var(--line);
    border-radius: 20px;

    background:
        radial-gradient(
            circle at 84% 20%,
            rgba(255, 255, 255, 0.075),
            transparent 31%
        ),
        #090909;
}

.download-card h2 {
    font-size: clamp(43px, 6vw, 76px);
}

.download-card p:not(.kicker) {
    max-width: 530px;

    margin: 14px 0 0;

    color: var(--soft);

    font-size: 13px;
    line-height: 1.7;
}

.primary-button.large {
    min-width: 205px;
}


/* =============================
   FOOTER
   ============================= */

footer {
    display: flex;
    justify-content: space-between;

    gap: 20px;

    padding:
        24px
        0
        36px;

    border-top: 1px solid var(--line);

    color: #5a5a5a;

    font-size: 9px;
}


/* =============================
   SCROLL REVEALS
   ============================= */

.reveal {
    opacity: 0;

    transform: translateY(20px);

    transition:
        opacity 760ms cubic-bezier(.18, .75, .22, 1),
        transform 760ms cubic-bezier(.18, .75, .22, 1);
}

.reveal.visible {
    opacity: 1;

    transform: translateY(0);
}


/* =============================
   ANIMATIONS
   ============================= */

@keyframes bloomPulse {
    0%,
    100% {
        opacity: 0.78;
    }

    50% {
        opacity: 1;
    }
}

@keyframes caretBlink {
    0%,
    48% {
        opacity: 1;
    }

    49%,
    100% {
        opacity: 0;
    }
}


/* =============================
   MOBILE
   ============================= */

@media (max-width: 820px) {
    .topbar {
        top: 10px;
    }

    .menu-link:not(.menu-download) {
        display: none;
    }

    .hero-content {
        padding-bottom: 60px;
    }

    .hero-video {
        width: auto;
        min-width: 100%;
    }

    .hero h1 {
        font-size: clamp(54px, 17vw, 82px);
    }

    .typed-line {
        min-width: 0;
    }

    .actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .scroll-note {
        display: none;
    }

    .about-grid,
    .feature-row {
        grid-template-columns: 1fr;
    }

    .about-copy {
        padding-top: 0;
    }

    .feature-row {
        margin-top: 46px;
    }

    .feature {
        min-height: 190px;
    }

    .feature h3 {
        margin-top: 50px;
    }

    .download-card {
        align-items: flex-start;
        flex-direction: column;
    }

    footer {
        flex-direction: column;

        gap: 7px;
    }
}


/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

    .hero-video-bloom {
        display: none;
    }
}
