:root {
    --blue: #071b75;
    --blue-2: #003fa5;
    --red: #e30620;
    --yellow: #ffc400;
    --ink: #07113b;
    --paper: #f5f7fc;
    --white: #ffffff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: #f4f6fb;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.site-header {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px clamp(22px, 6vw, 92px);
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #e9ecf4;
    box-shadow: 0 8px 35px rgba(8, 25, 88, .06);
    position: relative;
    z-index: 10;
}

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

.brand-emblem {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    flex: 0 0 auto;
}

.brand-emblem img {
    width: 52px;
    height: 52px;
    display: block;
    object-fit: cover;
    transform: scale(1.32);
}

.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font: 900 20px/.92 "Arial Black", Arial, sans-serif; letter-spacing: -.05em; white-space: nowrap; }
.brand-copy strong b { color: var(--red); }
.brand-copy small { color: #68718f; font-size: 8px; font-weight: 900; letter-spacing: .13em; white-space: nowrap; }
.brand-copy small i { color: var(--blue); font-size: 10px; font-style: normal; }

.campaign-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid #dfe4f1;
    border-radius: 999px;
    color: #4f5a7d;
    background: #f8f9fd;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
}

.campaign-label i,
.preview-toolbar i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #21b56b;
    box-shadow: 0 0 0 4px rgba(33, 181, 107, .12);
}

.hero {
    min-height: 660px;
    padding: 64px clamp(24px, 7vw, 110px) 84px;
    color: var(--white);
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(390px, .96fr);
    gap: clamp(42px, 6vw, 90px);
    align-items: center;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at 8% 0%, rgba(27, 89, 232, .45), transparent 35%),
        radial-gradient(circle at 92% 35%, rgba(0, 191, 255, .16), transparent 25%),
        linear-gradient(122deg, #020d3c 0%, #061a6e 54%, #031252 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .2;
    background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to right, black, transparent 65%);
}

.hero-copy { max-width: 680px; position: relative; z-index: 2; }

.eyebrow {
    margin: 0 0 18px;
    color: var(--red);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .19em;
}

.eyebrow span {
    width: 28px;
    height: 3px;
    display: inline-block;
    margin: 0 8px 3px 0;
    border-radius: 99px;
    background: currentColor;
}

.hero .eyebrow { color: #ffd34d; }

.hero h1 {
    margin: 0;
    font-family: Impact, "Arial Black", sans-serif;
    font-size: clamp(52px, 6.2vw, 88px);
    line-height: .96;
    letter-spacing: .005em;
    text-transform: uppercase;
    font-weight: 900;
}

.hero h1 span { color: var(--yellow); }

.hero-copy > p:not(.eyebrow) {
    max-width: 570px;
    margin: 26px 0 32px;
    color: #ccd5f1;
    font-size: 18px;
    line-height: 1.6;
}

.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.hero-cta,
.download-button {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    border: 0;
    border-radius: 10px;
    background: var(--yellow);
    color: #111b57;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(255, 196, 0, .22), inset 0 -3px 0 rgba(150, 86, 0, .2);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.hero-cta:hover,
.download-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(255, 196, 0, .28), inset 0 -3px 0 rgba(150, 86, 0, .2); }
.hero-cta b { margin-left: 14px; font-size: 20px; }
.privacy-chip { color: #b7c2e4; font-size: 12px; }
.privacy-chip::before { content: "✓"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 7px; border-radius: 50%; color: #031250; background: #60e49c; font-weight: 900; }

.number-stage {
    position: relative;
    z-index: 2;
    width: min(100%, 455px);
    min-height: 440px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    isolation: isolate;
}

.number-stage::before,
.number-stage::after {
    content: "";
    position: absolute;
    z-index: -2;
    border-radius: 50%;
}

.number-stage::before {
    width: 390px;
    height: 390px;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 0 0 38px rgba(255,255,255,.025), 0 0 0 78px rgba(255,255,255,.018);
}

.number-stage::after {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(15, 86, 230, .78), rgba(4, 18, 83, .08) 70%);
    filter: blur(10px);
}

.stage-glow {
    position: absolute;
    inset: 38px 15px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 36px;
    background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.015));
    box-shadow: 0 30px 70px rgba(0,0,0,.23), inset 0 1px 0 rgba(255,255,255,.12);
    transform: rotate(3deg);
}

.stage-content {
    display: grid;
    justify-items: center;
    position: relative;
    z-index: 3;
    text-align: center;
    transform: rotate(-2deg);
}

.stage-content > small {
    padding: 7px 15px;
    border-radius: 5px;
    color: white;
    background: var(--red);
    box-shadow: 0 7px 18px rgba(0,0,0,.2);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .16em;
}

.stage-content > strong {
    margin-top: 5px;
    color: var(--yellow);
    font: 900 clamp(102px, 13vw, 154px)/.82 Impact, "Arial Black", sans-serif;
    letter-spacing: -.055em;
    text-shadow: 8px 8px 0 var(--red), -6px -3px 0 #00b9f2, 0 18px 35px rgba(0,0,0,.3);
}

.candidate-lockup {
    display: grid;
    justify-items: center;
    gap: 5px;
    margin-top: 20px;
    padding: 10px 24px;
    color: white;
    background: rgba(2, 11, 54, .72);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.candidate-lockup b { font: 900 19px/1 "Arial Black", Arial, sans-serif; letter-spacing: -.02em; }
.candidate-lockup span { font-size: 9px; font-weight: 900; letter-spacing: .2em; }

.stage-ribbon {
    position: absolute;
    z-index: 2;
    left: -8%;
    right: -8%;
    bottom: 58px;
    height: 64px;
    transform: rotate(-7deg);
}

.stage-ribbon i {
    display: block;
    height: 15px;
    margin-bottom: 4px;
    border-radius: 50%;
    box-shadow: 0 6px 15px rgba(0,0,0,.18);
}

.stage-ribbon i:nth-child(1) { background: #11131e; }
.stage-ribbon i:nth-child(2) { background: #ffffff; }
.stage-ribbon i:nth-child(3) { background: var(--red); }
.stage-ribbon i::after { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); }

.generator-section {
    padding: 108px clamp(20px, 6vw, 90px);
    background: radial-gradient(circle at 15% 10%, #fff 0, transparent 24%), linear-gradient(180deg, #f7f8fc 0%, #edf1f9 100%);
}

.section-heading { max-width: 700px; margin: 0 auto 42px; text-align: center; }
.section-heading h2 { margin: 0; font-size: clamp(36px, 5vw, 58px); line-height: .98; text-transform: uppercase; letter-spacing: -.035em; }
.section-heading h2 em { color: var(--blue-2); font-style: normal; }
.section-intro { max-width: 580px; margin: 18px auto 0; color: #69728f; line-height: 1.55; }

.generator-grid {
    max-width: 1180px;
    margin: auto;
    display: grid;
    grid-template-columns: minmax(330px, .85fr) minmax(380px, 1.15fr);
    gap: 32px;
    align-items: start;
}

.controls-card,
.preview-card {
    background: white;
    border: 1px solid rgba(16, 37, 111, .08);
    border-radius: 22px;
    box-shadow: 0 24px 65px rgba(5, 23, 95, .1);
}

.controls-card { padding: 30px; }

.step-block {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 14px;
    padding: 0 0 26px;
    margin: 0 0 26px;
    border-bottom: 1px solid #e5e9f3;
}

.step-block h3 { margin: 2px 0 14px; font-size: 17px; }

.step-number {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #123cb8, var(--blue));
    color: white;
    font-size: 13px;
    font-weight: 900;
}

.format-options { display: grid; gap: 8px; }

.format-option {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid #e5e9f3;
    border-radius: 9px;
    color: var(--ink);
    background: white;
    cursor: pointer;
    text-align: left;
    font-weight: 800;
}

.format-option small { color: #6d7697; font-weight: 500; }
.format-option { transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.format-option:hover { transform: translateX(2px); }
.format-option.is-active { border-color: var(--blue); background: linear-gradient(90deg, #edf2ff, #f8f9ff); box-shadow: inset 4px 0 0 var(--red); }

.upload-guide {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 18px 14px 14px;
    border: 2px dashed #9aa6cf;
    border-radius: 14px;
    color: var(--ink);
    background: linear-gradient(145deg, #fbfcff, #f1f4fc);
    text-align: center;
}

.upload-visual {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    position: relative;
    margin-bottom: 3px;
    border-radius: 18px;
    color: white;
    background: linear-gradient(145deg, #1748c8, var(--blue));
    box-shadow: 0 10px 24px rgba(7, 27, 117, .2);
}

.upload-visual::before {
    content: "";
    width: 27px;
    height: 21px;
    border: 2px solid white;
    border-radius: 4px;
}

.upload-visual::after {
    content: "+";
    position: absolute;
    right: 7px;
    bottom: 7px;
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border: 2px solid white;
    border-radius: 50%;
    color: var(--blue);
    background: var(--yellow);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.upload-visual i {
    width: 8px;
    height: 8px;
    position: absolute;
    top: 20px;
    left: 20px;
    border-radius: 50%;
    background: white;
}

.upload-guide > strong { color: var(--blue); font-size: 15px; }
.upload-guide > p { max-width: 270px; margin: 0 0 7px; color: #68728f; font-size: 12px; line-height: 1.45; }
.upload-guide > small { color: #7a84a0; font-size: 10px; }

.upload-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.upload-choice {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 10px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.upload-choice.primary { color: #071445; background: var(--yellow); box-shadow: inset 0 -3px 0 rgba(150, 86, 0, .16); }
.upload-choice.secondary { color: var(--blue); background: white; border: 1px solid #cdd4e8; }
.upload-choice b { font-size: 18px; line-height: 1; }

.install-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 11px;
    border: 1px solid #dde3f2;
    border-radius: 12px;
    background: white;
}

.install-card img { width: 42px; height: 42px; border-radius: 11px; }
.install-card > div { display: grid; gap: 3px; min-width: 0; }
.install-card strong { color: var(--ink); font-size: 11px; }
.install-card span { color: #707994; font-size: 9px; line-height: 1.35; }
.install-card button { width: 100%; min-height: 38px; grid-column: 1 / -1; padding: 0 12px; border: 0; border-radius: 8px; color: white; background: var(--blue); cursor: pointer; font-size: 10px; font-weight: 900; }
.install-card.is-installed { display: none; }
.adjust-controls.is-disabled { opacity: .45; pointer-events: none; }

.range-label { display: grid; gap: 8px; color: #59617c; font-size: 13px; font-weight: 700; }
.range-label input { width: 100%; accent-color: var(--blue); }

.secondary-button {
    margin-top: 12px;
    padding: 9px 12px;
    border: 1px solid #c9d0e5;
    border-radius: 7px;
    color: var(--blue);
    background: white;
    cursor: pointer;
    font-weight: 800;
}

.privacy-note { padding: 12px; border-radius: 8px; background: #f0f4ff; font-size: 12px; line-height: 1.5; color: #536083; }
.download-button { width: 100%; margin-top: 8px; }
.download-button:disabled { filter: grayscale(1); opacity: .45; cursor: not-allowed; box-shadow: none; }
.save-hint { margin: 13px 8px 0; color: #65708f; font-size: 11px; line-height: 1.45; text-align: center; }
.save-hint strong { color: var(--blue); }
.status-message { min-height: 18px; margin: 12px 0 0; text-align: center; color: #3c4870; font-size: 12px; }

.preview-card { overflow: hidden; }
.preview-toolbar { display: flex; justify-content: space-between; gap: 12px; padding: 17px 20px; color: white; background: linear-gradient(100deg, #041458, #0b2e9b); }
.preview-toolbar span { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.preview-toolbar small { opacity: .75; }

.canvas-shell {
    width: 100%;
    min-height: 520px;
    display: grid;
    place-items: center;
    padding: 26px;
    background-color: #e4e8f2;
    background-image: linear-gradient(45deg, #d3d9e8 25%, transparent 25%), linear-gradient(-45deg, #d3d9e8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d3d9e8 75%), linear-gradient(-45deg, transparent 75%, #d3d9e8 75%);
    background-size: 22px 22px;
    background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}

#photoCanvas {
    display: block;
    max-width: 100%;
    background: white;
    box-shadow: 0 16px 38px rgba(3, 16, 78, .25);
    touch-action: none;
    cursor: grab;
}

#photoCanvas:active { cursor: grabbing; }

.how-it-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #1a2a70;
}

.how-it-works div { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 38px 22px; color: white; background: linear-gradient(135deg, #061863, #09258e); }
.how-it-works strong { color: var(--yellow); font: 900 30px Impact, sans-serif; }
.how-it-works span { font-weight: 900; text-transform: uppercase; }

footer { min-height: 110px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px clamp(22px, 6vw, 90px); color: white; background: #020d3f; }
footer strong { color: var(--yellow); }
footer span { font-size: 12px; opacity: .7; }

@media (max-width: 850px) {
    .hero { grid-template-columns: 1fr; padding-top: 68px; padding-bottom: 84px; }
    .number-stage { width: min(88%, 440px); margin-top: 4px; }
    .generator-grid { grid-template-columns: 1fr; }
    .canvas-shell { min-height: 420px; }
}

@media (max-width: 560px) {
    .site-header {
        min-height: 68px;
        padding: 7px 18px;
        position: sticky;
        top: 0;
        z-index: 30;
    }
    .campaign-label { display: none; }
    .brand { gap: 9px; }
    .brand-emblem { width: 44px; height: 44px; }
    .brand-emblem img { width: 44px; height: 44px; }
    .brand-copy strong { font-size: 17px; }
    .brand-copy small { font-size: 7px; }
    .hero {
        gap: 38px;
        min-height: auto;
        padding: 48px 22px 58px;
    }
    .hero::before { background-size: 34px 34px; }
    .hero .eyebrow { margin-bottom: 15px; font-size: 9px; line-height: 1.5; }
    .hero h1 { font-size: clamp(43px, 12.6vw, 52px); line-height: .95; letter-spacing: 0; }
    .hero-copy > p:not(.eyebrow) { font-size: 16px; }
    .hero-actions { align-items: flex-start; flex-direction: column; }
    .hero-cta { width: 100%; min-height: 58px; }
    .privacy-chip { margin-top: -5px; }
    .number-stage { width: calc(100% - 8px); min-height: 300px; margin-top: -8px; }
    .number-stage::before { width: 250px; height: 250px; box-shadow: 0 0 0 26px rgba(255,255,255,.025), 0 0 0 52px rgba(255,255,255,.018); }
    .number-stage::after { width: 220px; height: 220px; }
    .stage-glow { inset: 18px 6px; border-radius: 28px; }
    .stage-content > small { padding: 6px 12px; font-size: 10px; }
    .stage-content > strong { font-size: clamp(96px, 29vw, 116px); text-shadow: 6px 6px 0 var(--red), -4px -2px 0 #00b9f2, 0 15px 28px rgba(0,0,0,.3); }
    .candidate-lockup { margin-top: 14px; padding: 8px 18px; }
    .candidate-lockup b { font-size: 16px; }
    .stage-ribbon { bottom: 38px; height: 50px; }
    .stage-ribbon i { height: 11px; margin-bottom: 3px; }
    .generator-section { padding: 72px 14px 78px; }
    .section-heading { margin-bottom: 30px; padding: 0 10px; }
    .section-heading h2 { font-size: 39px; }
    .section-intro { font-size: 14px; }
    .generator-grid { gap: 20px; }
    .controls-card { padding: 22px 18px; border-radius: 22px; }
    .step-block { grid-template-columns: 34px 1fr; gap: 12px; margin-bottom: 22px; padding-bottom: 22px; }
    .step-number { width: 30px; height: 30px; }
    .format-option { min-height: 54px; padding: 12px; }
    .upload-guide { padding: 20px 12px 15px; }
    .upload-actions { grid-template-columns: 1fr; }
    .upload-choice { min-height: 50px; font-size: 13px; }
    .install-card { grid-template-columns: 40px 1fr; padding: 12px; }
    .install-card img { width: 40px; height: 40px; }
    .install-card button { grid-column: 1 / -1; min-height: 42px; font-size: 11px; }
    .range-label input { min-height: 32px; }
    .secondary-button { min-height: 46px; }
    .download-button { min-height: 58px; }
    .preview-card { border-radius: 22px; }
    .canvas-shell { min-height: 330px; padding: 12px; }
    #photoCanvas { border-radius: 4px; }
    .preview-toolbar small { display: none; }
    .how-it-works { grid-template-columns: repeat(3, 1fr); }
    .how-it-works div { min-height: 96px; display: grid; gap: 5px; padding: 18px 6px; text-align: center; }
    .how-it-works strong { font-size: 23px; }
    .how-it-works span { font-size: 9px; line-height: 1.35; }
    footer { min-height: 120px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

}
