:root {
    --scanner-accent: #ff7849;
    --scanner-accent-soft: rgba(255, 120, 73, 0.65);
    --scanner-surface: rgba(255, 255, 255, 0.82);
    --scanner-deep: #0f172a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(160deg, #f8fafc 25%, #eef2ff 55%, #fef3c7 100%);
    color: #0f172a;
    overflow-x: hidden;
}

#cursor-dot, #cursor-ring {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
}

#cursor-dot {
    width: 8px; height: 8px;
    background: #FF5722;
}

#cursor-ring {
    width: 40px; height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.qr-experience {
    min-height: calc(100vh - 6rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 3vw + 1.5rem, 4rem) clamp(1.5rem, 5vw, 4rem);
}

.qr-experience__body {
    width: min(1080px, 100%);
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 1vw + 1.5rem, 2.5rem);
}

.qr-experience__intro {
    text-align: center;
    color: #0f172a;
    display: grid;
    gap: 0.5rem;
}

.qr-experience__eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.55);
}

.qr-experience__intro h1 {
    margin: 0;
    font-size: clamp(2rem, 1.5rem + 2vw, 2.6rem);
    font-weight: 700;
}

.qr-experience__intro p {
    margin: 0;
    font-size: 1.05rem;
    color: rgba(15, 23, 42, 0.68);
}

.scanner-section {
    transition: opacity 0.5s ease, transform 0.6s ease;
}

.scanner-section--complete .scanner-stage__target {
    border-style: solid;
    border-color: rgba(52, 211, 153, 0.9);
    box-shadow:
        inset 0 0 40px rgba(16, 185, 129, 0.2),
        0 0 20px rgba(16, 185, 129, 0.35);
}

.scanner-section--collapse {
    opacity: 0;
    transform: translateY(-18px) scale(0.98);
    pointer-events: none;
}

.scanner-shell {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1.75rem, 1rem + 2vw, 3rem);
    padding: clamp(1.8rem, 1.6rem + 1vw, 2.6rem);
    border-radius: 28px;
    background: var(--scanner-surface);
    box-shadow:
        0 35px 80px -40px rgba(15, 23, 42, 0.4),
        0 18px 40px -30px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.scanner-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(65% 90% at 12% 20%, rgba(253, 230, 138, 0.85), transparent 70%),
        radial-gradient(90% 85% at 90% 15%, rgba(191, 219, 254, 0.7), transparent 70%),
        linear-gradient(140deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
    opacity: 0.55;
    pointer-events: none;
}

.scanner-shell__copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1rem;
    color: rgba(15, 23, 42, 0.8);
}

.scanner-shell__copy h2 {
    margin: 0;
    font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2rem);
    color: #0f172a;
}

.scanner-shell__copy p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.scan-status {
    font-weight: 600;
    color: var(--scanner-accent);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.scan-status.is-complete {
    color: #16a34a;
}

.scan-status::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--scanner-accent);
    box-shadow: 0 0 0 0 rgba(255, 120, 73, 0.4);
    animation: statusPulse 1.8s ease-in-out infinite;
}

.scan-status.is-complete::before {
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35);
}

@keyframes statusPulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 120, 73, 0.35);
    }
    50% {
        transform: scale(1.18);
        box-shadow: 0 0 0 10px rgba(255, 120, 73, 0);
    }
}

.scan-progress {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.scan-progress__fill {
    position: absolute;
    inset: 0;
    width: 6%;
    background: linear-gradient(120deg, rgba(255, 120, 73, 0.9), rgba(249, 115, 22, 0.75));
    border-radius: inherit;
    box-shadow: 0 0 18px rgba(255, 120, 73, 0.5);
    transition: width 0.25s ease, background 0.3s ease;
}

.scan-progress[data-complete="true"] .scan-progress__fill {
    background: linear-gradient(120deg, rgba(34, 197, 94, 0.9), rgba(52, 211, 153, 0.8));
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.55);
}

.scanner-stage {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.scanner-stage__frame {
    position: relative;
    width: min(460px, 90vw);
    aspect-ratio: 1;
    background: var(--scanner-deep);
    border-radius: clamp(24px, 4vw, 32px);
    overflow: hidden;
    box-shadow:
        0 35px 60px -40px rgba(15, 23, 42, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.scanner-stage__frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 2px, transparent 2px, transparent 6px),
        repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.06) 0px, rgba(15, 23, 42, 0.06) 2px, transparent 2px, transparent 6px);
    mix-blend-mode: screen;
    opacity: 0.07;
    pointer-events: none;
}

.scanner-stage__backdrop {
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(120% 160% at 15% 15%, rgba(253, 186, 116, 0.8), transparent),
        radial-gradient(120% 160% at 85% 10%, rgba(96, 165, 250, 0.75), transparent 65%),
        radial-gradient(120% 200% at 50% 95%, rgba(244, 114, 182, 0.55), transparent 70%),
        linear-gradient(115deg, rgba(15, 23, 42, 0.35), transparent 60%);
    filter: blur(22px);
    transform: scale(1.1);
    opacity: 0.9;
}

.scanner-stage__glow {
    position: absolute;
    inset: 12%;
    border-radius: clamp(18px, 3vw, 28px);
    border: 2px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 0 35px rgba(15, 23, 42, 0.45),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.scanner-stage__target {
    position: absolute;
    inset: 20%;
    border-radius: clamp(22px, 4vw, 30px);
    border: 3px dashed rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.08);
    transition: border 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.scanner-stage__target.is-complete {
    border-style: solid;
    border-color: rgba(34, 197, 94, 0.9);
    box-shadow:
        inset 0 0 40px rgba(34, 197, 94, 0.15),
        0 0 20px rgba(34, 197, 94, 0.3);
}

.scanner-stage__beam {
    position: absolute;
    inset: 18% 18%;
    border-radius: clamp(20px, 3vw, 28px);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 5%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0) 95%
    );
    animation: beamSweep 3s ease-in-out infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}

@keyframes beamSweep {
    0%,
    100% {
        transform: translateY(-60%);
        opacity: 0.2;
    }
    50% {
        transform: translateY(60%);
        opacity: 0.5;
    }
}

.qr-card {
    position: absolute;
    width: clamp(130px, 24vw, 170px);
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(229, 231, 235, 0.85));
    box-shadow:
        0 25px 55px -28px rgba(15, 23, 42, 0.75),
        0 18px 35px -24px rgba(241, 148, 64, 0.55);
    border: 3px solid rgba(15, 23, 42, 0.15);
    padding: clamp(0.65rem, 0.4rem + 1vw, 0.9rem);
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.6rem;
    cursor: grab;
    user-select: none;
    touch-action: none;
    top: calc(100% - 180px);
    left: clamp(18px, 3vw, 40px);
    transition: transform 0.35s ease, left 0.2s ease, top 0.2s ease, box-shadow 0.35s ease;
}

.qr-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
    opacity: 0.9;
    pointer-events: none;
}

.qr-card.is-dragging {
    cursor: grabbing;
    box-shadow:
        0 35px 70px -30px rgba(15, 23, 42, 0.75),
        0 18px 45px -24px rgba(255, 120, 73, 0.5);
    transition: none;
}

.qr-card.is-placed {
    box-shadow:
        0 35px 70px -28px rgba(15, 23, 42, 0.6),
        0 0 45px rgba(52, 211, 153, 0.45);
}

.qr-card__chip {
    width: 34px;
    height: 24px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(255, 159, 67, 0.95), rgba(255, 94, 58, 0.8));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.qr-card__code {
    position: relative;
    border-radius: 12px;
    border: 2px solid rgba(15, 23, 42, 0.14);
    overflow: hidden;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.qr-card__code-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(15, 23, 42, 0.7);
}

.qr-card__label {
    text-transform: uppercase;
}

.contact-form-container {
    opacity: 0;
    visibility: hidden;
    transform: translateY(32px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
}

.contact-form-container.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    max-height: 1600px;
    overflow: visible;
}

.form-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 28px;
    padding: clamp(2rem, 1.4rem + 1.8vw, 3rem);
    box-shadow:
        0 30px 80px -40px rgba(15, 23, 42, 0.35),
        0 15px 45px -30px rgba(15, 23, 42, 0.3);
    display: grid;
    gap: clamp(1.4rem, 1vw + 1rem, 2rem);
}

.form-card__header {
    display: grid;
    gap: 0.5rem;
    text-align: center;
    color: rgba(15, 23, 42, 0.8);
}

.form-card__eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(15, 23, 42, 0.5);
    font-weight: 700;
}

.form-card__header h2 {
    margin: 0;
    font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.2rem);
    color: #0f172a;
}

.form-card__header p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(15, 23, 42, 0.65);
}

.form-card__grid {
    display: grid;
    gap: clamp(1rem, 0.8rem + 0.5vw, 1.4rem);
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(15, 23, 42, 0.75);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 0.9rem 1rem;
    font-size: 1rem;
    background: rgba(248, 250, 252, 0.8);
    transition: border 0.25s ease, box-shadow 0.25s ease;
    font-family: inherit;
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(255, 120, 73, 0.65);
    box-shadow: 0 0 0 4px rgba(255, 120, 73, 0.12);
    background: #fff;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-submit,
.btn-cancel {
    flex: 1;
    min-width: 180px;
    border-radius: 999px;
    padding: 0.95rem 1.4rem;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit {
    background: linear-gradient(130deg, rgba(255, 120, 73, 0.95), rgba(236, 72, 153, 0.85));
    color: #fff;
    box-shadow: 0 18px 40px -24px rgba(236, 72, 153, 0.5);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 45px -22px rgba(236, 72, 153, 0.6);
}

.btn-cancel {
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: rgba(15, 23, 42, 0.7);
}

.btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px -30px rgba(15, 23, 42, 0.35);
}

.success-banner {
    display: none;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: rgba(15, 118, 110, 0.85);
}

.success-banner.is-visible {
    display: flex;
    animation: bannerFade 0.5s ease forwards;
}

.success-banner__icon {
    font-size: 1.8rem;
    line-height: 1;
}

.success-banner h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.success-banner p {
    margin: 0;
    font-size: 0.95rem;
}

.form-card__footer {
    text-align: center;
    font-size: 0.95rem;
    color: rgba(71, 85, 105, 0.85);
}

.form-card__footer a {
    color: var(--scanner-accent);
    font-weight: 600;
    text-decoration: none;
}

.form-card__footer a:hover {
    text-decoration: underline;
}

@keyframes bannerFade {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 960px) {
    .scanner-shell {
        padding: clamp(1.4rem, 1rem + 1vw, 2rem);
    }

    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .qr-experience {
        min-height: calc(100vh - 4rem);
        padding: 1.5rem 1.25rem 2.5rem;
    }

    .qr-card {
        width: clamp(120px, 34vw, 150px);
    }

    .scan-progress {
        height: 6px;
    }

    .form-card {
        padding: clamp(1.6rem, 1.3rem + 2vw, 2rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scanner-section,
    .contact-form-container,
    .qr-card,
    .scan-progress__fill,
    .success-banner {
        transition: none !important;
        animation: none !important;
    }
}
