:root {
    --paper: #f4efe7;
    --ink: #171717;
    --card: #fffdf8;
    --blue: #6d8cff;
    --coral: #ff756d;
    --lime: #c9ef68;
    --lav: #c6b8ff;
    --gold: #ffc857;
    --shadow: 8px 8px 0 var(--ink);
    --shadow-sm: 4px 4px 0 var(--ink);
    --radius: 26px;
    --sans:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    overflow-x: hidden;
}
button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}
button {
    cursor: pointer;
}
.bg-orb {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border: 2px solid var(--ink);
}
.bg-orb.one {
    width: 260px;
    height: 260px;
    background: var(--lav);
    border-radius: 50%;
    right: -80px;
    top: -70px;
}
.bg-orb.two {
    width: 170px;
    height: 170px;
    background: var(--lime);
    border-radius: 38px;
    left: -55px;
    bottom: 8vh;
    transform: rotate(18deg);
}
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.16;
    background-image:
        linear-gradient(var(--ink) 1px, transparent 1px),
        linear-gradient(90deg, var(--ink) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
.shell {
    position: relative;
    z-index: 2;
    width: min(1380px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 44px;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 950;
    letter-spacing: -0.03em;
}
.brand-badge {
    width: 50px;
    height: 50px;
    border: 2px solid var(--ink);
    border-radius: 15px;
    background: var(--gold);
    box-shadow: var(--shadow-sm);
    display: grid;
    place-items: center;
    transform: rotate(-5deg);
    font-weight: 950;
}
.brand small {
    display: block;
    font: 700 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 2px;
}
.top-pill {
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--card);
    box-shadow: 3px 3px 0 var(--ink);
    padding: 10px 14px;
    font: 700 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: end;
    margin-bottom: 30px;
}
.hero h1 {
    font-size: clamp(58px, 8.3vw, 118px);
    line-height: 0.84;
    letter-spacing: -0.07em;
    margin: 0;
    font-weight: 950;
}
.hero h1 .chipword {
    display: inline-block;
    background: var(--coral);
    border: 2px solid var(--ink);
    border-radius: 18px;
    padding: 0.04em 0.13em 0.09em;
    box-shadow: 7px 7px 0 var(--ink);
    transform: rotate(-1.5deg);
}
.hero-copy {
    justify-self: end;
    max-width: 540px;
}
.hero-copy p {
    font-size: clamp(17px, 1.6vw, 22px);
    line-height: 1.45;
    font-weight: 650;
    margin: 0 0 14px;
}
.stickers {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.sticker {
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--lime);
    box-shadow: 3px 3px 0 var(--ink);
    font: 800 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sticker:nth-child(2) {
    background: var(--blue);
    color: #fff;
}
.sticker:nth-child(3) {
    background: var(--lav);
}
.workspace {
    display: grid;
    grid-template-columns: minmax(420px, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: start;
}
.card {
    background: var(--card);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 20px;
    border-bottom: 2px solid var(--ink);
    background: var(--lime);
}
.preview-card .card-head {
    background: var(--blue);
    color: #fff;
}
.card-head strong {
    font-size: 16px;
}
.card-head span {
    font: 700 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}
.controls {
    padding: 22px;
}
.section-label {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 25px 0 13px;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.section-label:first-child {
    margin-top: 0;
}
.section-label:after {
    content: "";
    height: 2px;
    background: var(--ink);
    opacity: 0.18;
    flex: 1;
}
.field {
    margin-bottom: 16px;
}
.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-weight: 850;
    font-size: 12px;
    margin-bottom: 7px;
}
.meta {
    font: 700 9px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
input,
textarea,
select {
    width: 100%;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: #fff;
    outline: none;
    transition: 0.18s ease;
}
input,
select {
    height: 48px;
    padding: 0 12px;
}
textarea {
    min-height: 100px;
    padding: 12px;
    resize: vertical;
    line-height: 1.45;
}
input:focus,
textarea:focus,
select:focus {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--lav);
    background: #fffef6;
}
.help {
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.45;
    color: #555;
}
.color-pair {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 8px;
}
.color-pair input[type="color"] {
    padding: 3px;
    border-radius: 12px;
}
.upload {
    border: 2px dashed var(--ink);
    border-radius: 15px;
    padding: 12px;
    background: #fff;
}
.upload input {
    border: 0;
    height: auto;
    padding: 0;
}
.switch-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: #fff;
    padding: 11px 12px;
}
.switch-row strong {
    font-size: 12px;
}
.switch-row small {
    display: block;
    font-size: 9px;
    color: #666;
    margin-top: 2px;
}
.switch {
    position: relative;
    width: 46px;
    height: 28px;
    flex: 0 0 auto;
}
.switch input {
    opacity: 0;
    position: absolute;
}
.slider {
    position: absolute;
    inset: 0;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: #ddd;
}
.slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 50%;
    transition: 0.2s;
}
.switch input:checked + .slider {
    background: var(--lime);
}
.switch input:checked + .slider:before {
    transform: translateX(18px);
}
.preset-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.preset {
    border: 2px solid var(--ink);
    background: #fff;
    border-radius: 12px;
    padding: 9px 8px;
    font-weight: 850;
    font-size: 10px;
    box-shadow: 2px 2px 0 var(--ink);
}
.preset:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink);
}
.actions {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 9px;
}
.btn {
    min-height: 48px;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: #fff;
    box-shadow: 4px 4px 0 var(--ink);
    font-weight: 900;
    transition: 0.15s ease;
}
.btn:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
}
.btn:active:not(:disabled) {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--ink);
}
.btn.primary {
    background: var(--coral);
}
.btn.secondary {
    background: var(--gold);
}
.btn.full {
    width: 100%;
    margin-top: 9px;
    background: var(--lav);
}
.preview-card {
    position: sticky;
    top: 14px;
}
.preview-stage {
    padding: 28px;
    background: #e9e4db;
    overflow: hidden;
}
.frame {
    border: 2px solid var(--ink);
    border-radius: 18px;
    background: #111;
    padding: 10px;
    box-shadow: 7px 7px 0 var(--ink);
}
.preview-scale {
    width: 100%;
    aspect-ratio: 1200/630;
    overflow: hidden;
    border-radius: 10px;
    background: #111;
    position: relative;
}
#ogCanvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 1200px;
    height: 630px;
    transform-origin: top left;
    overflow: hidden;
    background: #101528;
    color: #fff;
}
.og-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.og-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.og-content {
    position: absolute;
    inset: 0;
    padding: 64px 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
}
.og-top {
    display: flex;
    align-items: center;
    gap: 18px;
}
.og-logo {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background: #fff center/contain no-repeat;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.og-site {
    font-size: 28px;
    font-weight: 850;
    letter-spacing: -0.02em;
}
.og-main {
    max-width: 940px;
}
.og-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
}
.og-kicker:before {
    content: "";
    width: 42px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent, #6d8cff);
}
.og-title {
    font-size: 82px;
    line-height: 0.98;
    letter-spacing: -0.055em;
    font-weight: 950;
    max-width: 1040px;
}
.og-desc {
    font-size: 30px;
    line-height: 1.28;
    margin-top: 22px;
    max-width: 950px;
    font-weight: 560;
}
.og-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 23px;
    font-weight: 750;
}
.og-mark {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.8;
}
.preview-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 2px solid var(--ink);
    padding: 14px 17px;
    background: var(--gold);
}
.preview-status span {
    font-size: 11px;
    font-weight: 800;
}
.preview-status code {
    font: 700 10px var(--mono);
}
.meta-box {
    margin-top: 12px;
}
.meta-box textarea {
    min-height: 170px;
    font: 11px/1.5 var(--mono);
}
.note {
    margin-top: 18px;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: var(--lime);
    padding: 13px 15px;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.5;
    box-shadow: 4px 4px 0 var(--ink);
}
.footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 25px;
    font: 700 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
@media (max-width: 1100px) {
    .workspace {
        grid-template-columns: 1fr;
    }
    .preview-card {
        position: relative;
        top: auto;
    }
    .preview-card {
        order: -1;
    }
}
@media (max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .hero-copy {
        justify-self: start;
    }
    .grid2,
    .grid3 {
        grid-template-columns: 1fr;
    }
    .preset-row {
        grid-template-columns: 1fr 1fr;
    }
    .actions {
        grid-template-columns: 1fr;
    }
    .top-pill {
        display: none;
    }
    .preview-stage {
        padding: 14px;
    }
    .controls {
        padding: 17px;
    }
    .og-content {
        padding: 64px 72px;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *:before,
    *:after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
