:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--brand-background, #11151b);
    color: var(--brand-text, #f5f7fa);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(ellipse at 15% 15%, color-mix(in srgb, var(--brand-primary) 12%, transparent), transparent 35%), var(--brand-background);
    color: var(--brand-text);
}
a { color: inherit; }
.page-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.site-header { height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--brand-text); text-decoration: none; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: var(--brand-primary); color: #11151b; font-weight: 700; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -.03em; }
.brand-logo { display: block; max-width: 180px; max-height: 52px; object-fit: contain; }
.platform-label, .eyebrow { color: var(--brand-primary); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.main-content { min-height: calc(100vh - 150px); display: grid; align-items: center; padding: 52px 0; }
.registration-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 470px); gap: clamp(42px, 8vw, 110px); align-items: center; }
.intro-panel { position: relative; padding: 32px 0; }
.hero-image { position: absolute; inset: -40px -50px; z-index: -1; width: calc(100% + 100px); height: calc(100% + 80px); object-fit: cover; object-position: center; opacity: .18; mask-image: linear-gradient(90deg, #000, transparent 90%); }
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: -.05em; }
.intro-panel h1 { max-width: 620px; margin: 18px 0; font-size: clamp(42px, 6vw, 72px); line-height: .99; }
.intro-panel > p { max-width: 470px; color: rgba(245,247,250,.72); font-size: 17px; line-height: 1.7; }
.step-indicator { display: flex; align-items: center; gap: 11px; margin-top: 42px; color: rgba(245,247,250,.58); font-size: 12px; }
.step-indicator span:first-child, .step-indicator span:nth-of-type(2) { color: var(--brand-primary); font-weight: 700; }
.step-indicator i { width: 42px; height: 1px; margin: 0 5px; background: rgba(255,255,255,.22); }
.form-card, .qr-card, .message-card { border: 1px solid rgba(255,255,255,.1); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025)), var(--brand-secondary); box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.form-card { padding: 32px; }
.card-heading { margin-bottom: 25px; }
.card-heading h2 { margin: 9px 0 5px; font-size: 28px; }
.card-heading p, .privacy-note { margin-bottom: 0; color: rgba(245,247,250,.58); font-size: 12px; line-height: 1.6; }
.registration-form fieldset { display: grid; gap: 17px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field { display: grid; gap: 8px; color: rgba(245,247,250,.84); font-size: 13px; font-weight: 600; }
.field b, .terms-field b { color: var(--brand-primary); }
.field b, .product-field b { color: var(--brand-primary); }
.field input, .field textarea, .field select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; outline: none; background: rgba(5,8,12,.36); color: var(--brand-text); font: inherit; font-weight: 400; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 18%, transparent); }
.field select option { color: #11151b; }
.field small, .field-error { color: #ff9c8b; font-size: 12px; }
.terms-field { display: flex; align-items: flex-start; gap: 10px; color: rgba(245,247,250,.72); font-size: 12px; line-height: 1.5; }
.product-field {
    display: flex;
    align-items: flex-start; gap: 10px; color: rgba(245,247,250,.72);
    font-size: 12px; line-height: 1.5;
}
.product-field p {
    display: flex;
    flex-direction: column;
}
.product-field p .name {
    font-weight: 700;
    font-size: 15px;
}
.terms-field input, .inline-checkbox input { width: 17px; height: 17px; accent-color: var(--brand-primary); }
.product-field input, .inline-checkbox input { width: 17px; height: 17px; accent-color: var(--brand-primary); }
.inline-checkbox { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 11px; font: inherit; font-weight: 700; text-decoration: none; }
.button-primary { padding: 0 20px; background: var(--brand-primary); color: #10140c; cursor: pointer; transition: transform .15s ease, filter .15s ease; }
.button-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.button-primary:disabled { cursor: not-allowed; opacity: .45; }
.privacy-note { margin-top: 17px; }
.notice { display: grid; gap: 5px; margin-bottom: 19px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; color: rgba(245,247,250,.75); font-size: 12px; line-height: 1.5; }
.notice strong { color: var(--brand-text); }
.notice-warning { border-color: rgba(255,190,87,.3); background: rgba(255,190,87,.08); }
.notice-error { border-color: rgba(255,110,99,.32); background: rgba(255,110,99,.08); }
.notice ul { margin: 3px 0 0; padding-left: 18px; }
.message-card { width: min(600px, 100%); justify-self: center; padding: clamp(28px, 6vw, 52px); text-align: center; }
.message-card h1 { margin: 12px 0; font-size: clamp(34px, 5vw, 50px); }
.message-card > p { color: rgba(245,247,250,.72); line-height: 1.7; }
.success-icon { display: grid; width: 58px; height: 58px; place-items: center; margin: 0 auto 24px; border-radius: 50%; background: var(--brand-primary); color: #11151b; font-size: 30px; font-weight: 700; }
.qr-frame { display: grid; width: 300px; height: 300px; max-width: 100%; place-items: center; margin: 0 auto; border-radius: 16px; background: #fff; border-radius: 8px; }
.qr-frame img { max-width: 100%; border-radius: 8px; }
.ticket-qr { width: 260px; height: 260px; margin: 25px auto; }
.fallback-link { display: inline-block; margin-top: 13px; color: var(--brand-primary); font-size: 13px; }
.onscreen-layout { display: grid; grid-template-columns: 1fr minmax(330px, 430px); gap: clamp(40px, 9vw, 120px); align-items: center; }
.onscreen-copy h1 { margin: 18px 0; font-size: clamp(42px, 6vw, 68px); line-height: 1.02; }
.onscreen-copy p { max-width: 500px; color: rgba(245,247,250,.7); font-size: 17px; line-height: 1.7; }
.qr-card { padding: 30px; text-align: center; }
.qr-card > p { margin: 20px 0 0; color: rgba(245,247,250,.8); font-size: 13px; }
.status-pill { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: rgba(245,247,250,.8); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #ffc857; box-shadow: 0 0 12px currentColor; }
.status-pill.is-ready { border-color: color-mix(in srgb, var(--brand-primary) 55%, transparent); color: var(--brand-primary); }
.status-pill.is-ready .status-dot { background: var(--brand-primary); }
.site-footer { display: flex; min-height: 58px; align-items: center; justify-content: center; border-top: 1px solid rgba(255,255,255,.08); color: rgba(245,247,250,.4); font-size: 11px; }

@media (max-width: 860px) {
    .registration-layout, .onscreen-layout { grid-template-columns: 1fr; gap: 28px; }
    .intro-panel { padding: 8px 0; }
    .intro-panel h1, .onscreen-copy h1 { max-width: 650px; font-size: clamp(40px, 11vw, 62px); }
    .form-card { width: min(600px, 100%); justify-self: center; }
}

@media (max-width: 520px) {
    .page-shell { width: min(100% - 30px, 1180px); }
    .site-header { height: 72px; }
    .platform-label { font-size: 9px; }
    .main-content { min-height: calc(100vh - 130px); padding: 30px 0; }
    .form-card, .qr-card { padding: 22px; border-radius: 18px; }
    .card-heading h2 { font-size: 25px; }
    .qr-frame { width: 260px; height: 260px; }
    .ticket-qr { width: 240px; height: 240px; }
}

#status-mark {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 20px auto;
}

#spinner {
    width: 120px;
    height: 120px;
    border: 4px solid rgba(255,255,255,.1);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.success-check {
    display: none;
    width: 120px;
    height: 120px;
}

#status-mark.is-success .success-check {
    display: block;
}

.success-check-circle,
.success-check-tick {
    fill: none;
    stroke: var(--brand-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.success-check-circle {
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
}

.success-check-tick {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
}

#status-mark.is-success .success-check-circle {
    animation: draw-circle .45s ease-out forwards;
}

#status-mark.is-success .success-check-tick {
    animation: draw-tick .4s ease-out .28s forwards;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes draw-circle {
    to { stroke-dashoffset: 0; }
}

@keyframes draw-tick {
    to { stroke-dashoffset: 0; }
}
