* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    background: #0d102d;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

.logo-studio {
    min-height: 100vh;
    padding: clamp(3rem, 7vw, 7rem) max(1.25rem, calc((100vw - 82rem) / 2));
    color: #f5f1e8;
    background:
        radial-gradient(circle at 90% 4%, rgba(255, 101, 110, .15), transparent 30rem),
        radial-gradient(circle at 8% 52%, rgba(47, 240, 232, .08), transparent 28rem),
        #0d102d;
}

.studio-intro {
    max-width: 58rem;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.studio-kicker {
    margin-bottom: 1rem;
    color: #ff656e;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.studio-intro h1 {
    margin: 0;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(2.6rem, 8vw, 6.5rem);
    letter-spacing: -.08em;
    line-height: .95;
}

.studio-intro > p:not(.studio-kicker) {
    max-width: 47rem;
    margin: 1.5rem 0;
    color: #b9bed8;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.studio-private {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: .5rem .8rem;
    color: #9299bd;
    font-size: .72rem;
}

.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 1rem;
    gap: 1.25rem;
    color: #9299bd;
    font-size: .72rem;
    font-weight: 700;
}

.background-control,
.size-control {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.size-control input {
    width: clamp(7rem, 14vw, 11rem);
    accent-color: #ff656e;
}

.size-control output {
    min-width: 2.6rem;
    color: #b9bed8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.background-switcher {
    display: flex;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: .2rem;
    gap: .15rem;
    background: rgba(255, 255, 255, .04);
}

.background-switcher button {
    border: 0;
    border-radius: 999px;
    padding: .45rem .7rem;
    color: #9299bd;
    background: transparent;
    font: inherit;
    font-size: .7rem;
    cursor: pointer;
}

.background-switcher button:hover {
    color: #fff;
}

.background-switcher button[aria-pressed="true"] {
    color: #111536;
    background: #f5f1e8;
}

.logo-grid {
    --logo-scale: .82;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.logo-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .055);
    box-shadow: 0 22px 70px rgba(0, 0, 0, .18);
}

.logo-preview {
    display: grid;
    min-height: clamp(13rem, 25vw, 20rem);
    padding: clamp(1.4rem, 4vw, 3.2rem);
    place-items: center;
    background:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
        #111536;
    background-size: 24px 24px;
}

.logo-grid[data-preview-background="black"] .logo-preview {
    background: #050505;
}

.logo-grid[data-preview-background="white"] .logo-preview {
    background: #fff;
}

.logo-grid[data-preview-background="orange"] .logo-preview {
    background: #f36b24;
}

.logo-preview img {
    display: block;
    width: min(calc(100% * var(--logo-scale)), calc(34rem * var(--logo-scale)));
    height: auto;
    transition: width .18s ease;
}

.logo-card-copy {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 1.3rem 1.4rem 1.5rem;
    gap: 1rem;
}

.logo-card h2 {
    margin: 0 0 .35rem;
    color: #fff;
    font-size: 1rem;
}

.logo-card p {
    max-width: 28rem;
    margin: 0;
    color: #9299bd;
    font-size: .8rem;
}

.color-control {
    display: flex;
    align-items: center;
    width: fit-content;
    margin-top: .9rem;
    gap: .55rem;
    color: #b9bed8;
    font-size: .72rem;
    font-weight: 700;
}

.color-control input {
    width: 2.1rem;
    height: 1.6rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .35rem;
    padding: .12rem;
    background: transparent;
    cursor: pointer;
}

.color-control output {
    color: #71799e;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.split-controls {
    display: grid;
    margin-top: .9rem;
    gap: .45rem;
}

.split-controls label {
    display: grid;
    align-items: center;
    grid-template-columns: 4.6rem minmax(6rem, 10rem) 1.8rem;
    gap: .5rem;
    color: #b9bed8;
    font-size: .7rem;
    font-weight: 700;
}

.split-controls input {
    width: 100%;
    accent-color: #ff656e;
}

.split-controls output {
    color: #71799e;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-align: right;
}

.primary-control {
    display: flex;
    align-items: center;
    width: fit-content;
    margin-top: .8rem;
    gap: .55rem;
    color: #b9bed8;
    font-size: .7rem;
    font-weight: 700;
    cursor: pointer;
}

.primary-control input {
    width: 2.1rem;
    height: 1.15rem;
    margin: 0;
    accent-color: #ff656e;
}

.download-actions {
    display: flex;
    flex-shrink: 0;
    gap: .45rem;
}

.logo-download {
    flex-shrink: 0;
    border-radius: 999px;
    padding: .65rem .9rem;
    color: #111536;
    background: #f5f1e8;
    font-size: .75rem;
    font-weight: 800;
    text-decoration: none;
}

.logo-download-secondary {
    border: 1px solid rgba(255, 255, 255, .22);
    color: #f5f1e8;
    background: transparent;
    font: inherit;
    font-size: .75rem;
    cursor: pointer;
}

.logo-download:hover {
    color: #111536;
    background: #ffcc70;
    text-decoration: none;
}

.logo-download:disabled {
    opacity: .5;
    cursor: wait;
}

.studio-footnote {
    margin: 2rem 0 0;
    color: #71799e;
    font-size: .75rem;
}

@media (max-width: 760px) {
    .preview-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

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

    .background-switcher {
        overflow-x: auto;
        max-width: 100%;
    }

    .logo-grid {
        grid-template-columns: 1fr;
    }

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