* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #dbe4f0;
    --primary: #005eb8;
    --primary-dark: #003f7d;
    --accent: #00a3e0;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(0, 163, 224, 0.16), transparent 30rem),
        radial-gradient(circle at bottom left, rgba(0, 94, 184, 0.15), transparent 28rem),
        var(--bg);
    color: var(--text);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(219, 228, 240, 0.85);
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
}

.brand-logo {
    height: 42px;
    max-width: 150px;
    object-fit: contain;
}

.brand-divider {
    width: 1px;
    height: 34px;
    background: var(--line);
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.main-nav {
    display: flex;
    gap: 18px;
    align-items: center;
}

.main-nav a {
    color: #334155;
    text-decoration: none;
    font-weight: 650;
    font-size: 0.95rem;
}

.main-nav a:hover {
    color: var(--primary);
}

.hero {
    padding: 58px 22px 24px;
}

.hero-content,
.shell {
    max-width: 1180px;
    margin: 0 auto;
}

.hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 44px;
    align-items: center;
}

.eyebrow {
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.hero-text {
    margin-top: 24px;
    max-width: 680px;
    color: #475569;
    font-size: 1.13rem;
    line-height: 1.65;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-badges span {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
    color: #1e293b;
    font-weight: 700;
}

.hero-visual {
    min-height: 360px;
    display: grid;
    place-items: center;
}

.qr-illustration {
    position: relative;
    width: min(430px, 100%);
    aspect-ratio: 1;
    border-radius: 36px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(236, 247, 255, 0.92)),
        repeating-linear-gradient(90deg, rgba(0,94,184,0.06) 0 16px, transparent 16px 32px);
    border: 1px solid rgba(219, 228, 240, 0.95);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.qr-illustration::before {
    content: "";
    position: absolute;
    inset: 34px;
    background-image:
        linear-gradient(90deg, rgba(0,94,184,0.17) 14px, transparent 14px),
        linear-gradient(rgba(0,94,184,0.17) 14px, transparent 14px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle, black 40%, transparent 76%);
}

.qr-card-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 190px;
    min-height: 110px;
    padding: 20px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: white;
    box-shadow: 0 20px 45px rgba(0, 94, 184, 0.22);
}

.qr-card-logo img {
    max-width: 145px;
    max-height: 70px;
}

.qr-corner,
.qr-dot {
    position: absolute;
    background: var(--primary);
    opacity: 0.14;
    border-radius: 12px;
}

.qr-corner {
    width: 86px;
    height: 86px;
    border: 18px solid var(--primary);
    background: transparent;
}

.c1 { left: 36px; top: 36px; }
.c2 { right: 36px; top: 36px; }
.c3 { left: 36px; bottom: 36px; }

.qr-dot {
    width: 26px;
    height: 26px;
}

.d1 { right: 128px; top: 152px; }
.d2 { right: 78px; top: 154px; }
.d3 { right: 132px; bottom: 104px; }
.d4 { right: 72px; bottom: 76px; }
.d5 { left: 160px; bottom: 130px; }
.d6 { left: 220px; top: 78px; }

.generator-section {
    padding: 24px 22px 24px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(219, 228, 240, 0.95);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.card-heading h2 {
    margin: 0;
    font-size: 1.65rem;
    letter-spacing: -0.04em;
}

.card-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

.mobile-select {
    display: none;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-soft);
}

.qr-tab {
    border: 0;
    background: transparent;
    border-radius: 14px;
    padding: 14px 8px;
    color: #334155;
    font-weight: 750;
    cursor: pointer;
    display: grid;
    gap: 6px;
    justify-items: center;
}

.qr-tab.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 10px 24px rgba(0, 94, 184, 0.28);
}

.tab-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(285px, 0.65fr);
    gap: 24px;
    margin-top: 24px;
}

.form-main {
    min-width: 0;
}

label {
    display: block;
    font-weight: 750;
    margin-top: 18px;
    margin-bottom: 7px;
    color: #1e293b;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 13px;
    font-size: 1rem;
    background: white;
    color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(0, 94, 184, 0.16);
    border-color: var(--primary);
}

textarea {
    resize: vertical;
}

.payload-section {
    display: none;
    padding: 18px;
    border: 1px solid #e5edf7;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.checkbox {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 600;
}

.checkbox input {
    width: auto;
}

.settings-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr);
    gap: 16px;
    margin-top: 4px;
}

.buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

button,
.button {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 13px 22px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 12px 28px rgba(0, 94, 184, 0.25);
}

button.secondary {
    background: #0f172a;
}

.hint {
    font-size: 0.92rem;
    color: var(--muted);
}

.message {
    padding: 12px 14px;
    border-radius: 12px;
    margin: 10px 0;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
}

.preview-panel {
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(0, 163, 224, 0.16), transparent 12rem),
        #f8fbff;
    border: 1px solid #e5edf7;
    padding: 20px;
    align-self: stretch;
}

.preview-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-top h3 {
    margin: 0;
}

.preview-top span {
    padding: 6px 10px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--line);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.82rem;
}

.preview-placeholder {
    margin: 20px auto;
    width: min(260px, 100%);
    aspect-ratio: 1;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: white;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.11);
}

.mini-qr {
    position: relative;
    width: 168px;
    aspect-ratio: 1;
    background-image:
        linear-gradient(90deg, #0f172a 12px, transparent 12px),
        linear-gradient(#0f172a 12px, transparent 12px);
    background-size: 28px 28px;
    opacity: 0.88;
}

.mini-qr span {
    position: absolute;
    width: 46px;
    height: 46px;
    border: 10px solid #0f172a;
    background: white;
}

.mini-qr span:nth-child(1) { left: 0; top: 0; }
.mini-qr span:nth-child(2) { right: 0; top: 0; }
.mini-qr span:nth-child(3) { left: 0; bottom: 0; }

.preview-panel p {
    color: var(--muted);
    line-height: 1.55;
}

.features-section {
    padding: 2px 22px 34px;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.features article {
    border-radius: 20px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(219, 228, 240, 0.9);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.features strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.features p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.footer-note {
    padding: 0 22px 40px;
    color: var(--muted);
    text-align: center;
}

.result-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 38px 16px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 16px;
}

.result {
    text-align: center;
}

.result h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.result-subtitle {
    color: var(--muted);
}

.qr {
    max-width: 360px;
    width: 100%;
    image-rendering: pixelated;
    margin: 24px auto;
    padding: 18px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.11);
}

.center {
    justify-content: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

@media (max-width: 920px) {
    .hero-content,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 280px;
    }

    .qr-illustration {
        width: min(360px, 100%);
    }

    .tabs {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 680px) {
    .main-nav {
        display: none;
    }

    .brand-logo {
        height: 36px;
        max-width: 120px;
    }

    .brand-name {
        font-size: 1.15rem;
    }

    .hero {
        padding-top: 34px;
    }

    .card {
        padding: 20px;
    }

    .tabs {
        display: none;
    }

    .mobile-select {
        display: block;
        margin-bottom: 18px;
    }

    .buttons {
        flex-direction: column;
    }

    button,
    .button {
        width: 100%;
        text-align: center;
    }
}
