.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--theme-background);
    color: var(--theme-text);
    font-family: 'Instrument Sans', system-ui, sans-serif;
}

.landing h1,
.landing h2,
.landing h3 {
    font-family: inherit;
}

.landing-shell,
.landing .navbar > .container {
    width: min(1120px, calc(100% - 64px));
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
}

.landing .navbar {
    padding: 18px 0;
    background: var(--theme-background) !important;
    border-bottom: 1px solid var(--theme-raised);
}

.landing .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--theme-text) !important;
    font-weight: 700;
    letter-spacing: -.025em;
}

.landing .nav-actions {
    --nav-control-height: 38px;
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 6px;
    white-space: nowrap;
}

.landing .nav-actions :is(.theme-toggle, .dropdown-toggle) {
    height: var(--nav-control-height);
}

.landing .theme-toggle {
    width: var(--nav-control-height);
    padding: 0;
}

.theme-toggle .fa-sun,
:root[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .fa-sun {
    display: inline-block;
}

.landing .navbar .btn,
.landing .modal .btn {
    border: 1px solid var(--theme-border) !important;
    border-radius: 8px;
    background: var(--theme-surface);
    color: var(--theme-text);
    font-size: .875rem;
    font-weight: 600;
}

.landing .navbar .nav-register,
.landing .modal .btn-primary,
.shorten-control button {
    background: var(--theme-text);
    color: var(--theme-background);
}

.landing .navbar .btn:hover,
.landing .modal .btn:hover,
.shorten-control button:hover {
    background: var(--theme-muted);
    color: var(--theme-background);
}

.landing-hero {
    display: grid;
    grid-template-columns: 1.16fr 1fr;
    align-items: center;
    gap: clamp(32px, 6vw, 88px);
    padding-block: clamp(56px, 8vw, 108px);
}

.landing-intro h1 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(2.75rem, 6vw, 5rem);
    line-height: .99;
    letter-spacing: -.065em;
    text-wrap: balance;
}

.landing-intro p {
    max-width: 42ch;
    margin: 24px 0 32px;
    color: var(--theme-muted);
    font-size: 1.0625rem;
    line-height: 1.65;
}

.shorten-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: .875rem;
}

.shorten-control {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 6px 6px 6px 16px;
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    background: var(--theme-surface);
}

.shorten-control i {
    color: var(--theme-muted);
}

.shorten-control input {
    width: 100%;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--theme-text);
}

.shorten-control input::placeholder {
    color: var(--theme-muted);
}

.shorten-control button {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 44px;
    padding-inline: 16px;
    border: 0;
    border-radius: 7px;
    font-weight: 700;
    white-space: nowrap;
}

.landing :focus-visible {
    outline: 2px solid var(--theme-muted);
    outline-offset: 3px;
}

.shorten-control:focus-within {
    border-color: var(--theme-muted);
}

.shorten-control input:focus-visible {
    outline: none;
}

.landing-preview {
    display: grid;
    gap: 26px;
    min-width: 0;
    padding: clamp(20px, 3vw, 40px);
    border: 1px solid var(--theme-border);
    border-radius: 24px;
    background:
        radial-gradient(ellipse at 65% 10%, var(--theme-raised), transparent 70%),
        var(--theme-surface);
}

.preview-label {
    color: var(--theme-muted);
    font-size: .8125rem;
    font-weight: 600;
}

.preview-flow {
    display: grid;
}

.preview-url {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    background: var(--theme-background);
    font: 500 clamp(.72rem, 1.05vw, .875rem) / 1.4 'IBM Plex Mono', monospace;
}

.preview-url > span:nth-child(2) {
    overflow-wrap: anywhere;
}

.preview-url-source {
    color: var(--theme-muted);
}

.preview-connector {
    display: grid;
    justify-items: center;
}

.preview-connector span {
    width: 1px;
    height: 18px;
    background: var(--theme-border);
}

.preview-connector img,
.landing .navbar-brand img {
    object-fit: contain;
}

.preview-url-result {
    background: var(--theme-raised);
    color: var(--theme-text);
}

.preview-arrow {
    margin-left: auto;
    font-size: 1rem;
}

.landing-features {
    padding-block: 30px 60px;
    border-top: 1px solid var(--theme-raised);
}

.landing-features h2 {
    margin: 0 0 24px;
    font-size: 1.5rem;
    letter-spacing: -.035em;
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.landing-feature-grid article {
    padding: 23px;
    border: 1px solid var(--theme-raised);
    border-radius: 14px;
    background: var(--theme-surface);
}

.landing-feature-grid i {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 18px;
    border-radius: 9px;
    background: var(--theme-raised);
}

.landing-feature-grid h3 {
    margin: 0 0 8px;
    font-size: 1.125rem;
}

.landing-feature-grid p {
    margin: 0;
    color: var(--theme-muted);
    line-height: 1.5;
}

.landing-footer {
    margin-top: auto;
    border-top: 1px solid var(--theme-raised);
    color: var(--theme-muted);
}

.landing-footer .landing-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 22px;
}

.landing-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-text);
    font-weight: 700;
}

.landing .modal-content,
.landing .dropdown-menu {
    border: 1px solid var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
}

.landing .modal-header,
.landing .modal-footer,
.landing .dropdown-divider {
    border-color: var(--theme-raised);
}

.landing .modal .close,
.landing .dropdown-item {
    color: var(--theme-text) !important;
}

.landing .modal .close {
    opacity: 1;
    text-shadow: none;
}

.landing .dropdown-item:hover,
.landing .dropdown-item:focus {
    background: var(--theme-raised);
}

@media (max-width: 780px) {
    .landing-shell,
    .landing .navbar > .container {
        width: calc(100% - 40px);
    }

    .landing-hero {
        grid-template-columns: 1fr;
    }

    .landing-intro h1 {
        max-width: 14ch;
    }

    .landing-preview {
        max-width: 560px;
    }

    .landing-feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 410px) {
    .landing .navbar-brand {
        font-size: 1rem;
        margin-right: 8px;
    }

    .landing .navbar-brand img {
        width: 28px;
        height: 28px;
    }

    .shorten-control {
        gap: 8px;
        padding-left: 10px;
    }

    .shorten-control button {
        gap: 6px;
        padding-inline: 10px;
    }
}
