html.is-mhub-animating {
    overflow: hidden;
    overscroll-behavior: none;
    scroll-behavior: auto;
}

html.is-mhub-animating body {
    position: fixed;
    inset: 0;
    width: 100%;
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: none;
}

.mhub-scene {
    position: relative;
    display: grid;
    min-height: 100svh;
    place-items: center;
    isolation: isolate;
    overflow: hidden;
    padding: 120px 24px;
}

.home-hero {
    width: min(100%, 1100px);
    margin-inline: auto;
    font-family: "Inter", Arial, sans-serif;
    letter-spacing: normal;
    transition: opacity 500ms ease, transform 500ms ease;
}

.mhub-scene:is(.is-pending, .is-intro, .is-docking) .home-hero {
    visibility: hidden;
    opacity: 0;
    transform: translateY(16px);
}

.home-hero__text {
    display: grid;
    gap: 24px;
}

.home-hero h1 {
    max-width: 700px;
    font-size: clamp(42px, 5.3vw, 72px);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.home-hero p {
    max-width: 660px;
    margin: 0;
    color: color-mix(in srgb, var(--foreground) 72%, var(--background));
    font-size: 20px;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.home-hero__button {
    display: inline-flex;
    min-width: 112px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1;
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.home-hero__button--primary {
    background: var(--foreground);
    color: var(--background);
}

.home-hero__button--primary:hover {
    background: color-mix(in srgb, var(--foreground) 85%, var(--background));
}

.home-hero__button--secondary {
    border-color: color-mix(in srgb, var(--foreground) 28%, transparent);
    background: color-mix(in srgb, var(--background) 25%, transparent);
    color: var(--foreground);
}

.home-hero__button--secondary:hover {
    border-color: color-mix(in srgb, var(--foreground) 55%, transparent);
    background: color-mix(in srgb, var(--foreground) 12%, transparent);
}

.home-hero__button:active {
    transform: translateY(1px);
}

.home-hero__button:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 4px;
}

.mhub-stage {
    position: absolute;
    top: 50svh;
    left: 50%;
    width: min(90vw, 1320px);
    font-size: clamp(64px, 23vw, 338px);
    transform: translate(-50%, -50%);
    transform-origin: top left;
    pointer-events: none;
    user-select: none;
    visibility: hidden;
}

.mhub-scene.is-intro .mhub-stage {
    visibility: visible;
}

.mhub-flight {
    position: fixed;
    z-index: 200;
    margin: 0;
    transform-origin: top left;
    pointer-events: none;
    user-select: none;
    will-change: transform, opacity;
}

.mhub-word {
    position: relative;
    height: 1.05em;
    margin: 0;
    font-family: var(--font-sans);
    font-size: inherit;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.06em;
    filter: drop-shadow(0 8px 28px rgb(0 0 0 / 18%));
}

.mhub-letter {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    width: 25%;
    place-items: center;
    transform: translateX(calc(var(--slot) * 100%));
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mhub-letter__face {
    display: block;
    padding-right: 0.06em;
    color: #f5f7fa;
    background: linear-gradient(180deg, #ffffff 0%, #f1f4f8 65%, #dce3ec 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mhub-scene.is-pending .mhub-stage {
    opacity: 0;
}

.mhub-scene.is-pending .mhub-letter {
    transition: none;
}

.mhub-scene.is-entering .mhub-letter__face {
    animation: mhub-assemble 420ms var(--delay) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mhub-scene.is-shifting .mhub-word {
    animation: mhub-soft-shift 220ms ease-in-out both;
}

[data-theme="light"] .mhub-word {
    filter: drop-shadow(0 8px 24px rgb(32 40 60 / 8%));
}

[data-theme="light"] .mhub-letter__face {
    background-image: linear-gradient(180deg, #17202c 0%, #253142 65%, #3b485a 100%);
}

@keyframes mhub-assemble {
    from { opacity: 0; filter: blur(6px); transform: translateY(20px) scale(0.98); }
    to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

@keyframes mhub-soft-shift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.88; }
}

@media (max-width: 768px) {
    .mhub-scene { padding: 112px 24px 80px; }
    .home-hero h1 { font-size: clamp(34px, 6vw, 46px); }
    .home-hero p { max-width: 540px; font-size: 18px; }
    .home-hero__break { display: none; }
}

@media (max-width: 380px) {
    .mhub-scene { padding-inline: 20px; }
    .home-hero h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    .mhub-scene *, .mhub-scene *::before, .mhub-scene *::after {
        animation: none !important;
        transition: none !important;
    }
    .mhub-scene.is-pending .mhub-stage { opacity: 1; }
}
