*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #060d18;
    --surface: #0c1a2e;
    --surface-hover: #122640;
    --border: #1a3050;
    --text: #e8eef5;
    --text-muted: #7a9ab8;
    --accent: #4594d1;
    --accent-glow: rgba(69, 148, 209, 0.3);
    --accent-bright: #9fddff;
    --accent-deep: #0059c9;
    --success: #34d399;
    --error: #f87171;
    --radius: 16px;
}

html { font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.bg-glow {
    position: fixed;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(69, 148, 209, 0.07) 0%, rgba(0, 89, 201, 0.03) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 3rem 0 2.5rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(69, 148, 209, 0.12);
    border: 1px solid rgba(69, 148, 209, 0.3);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-bright);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #e8eef5 30%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    margin-top: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 300;
}

.subtitle strong {
    color: var(--accent-bright);
    font-weight: 600;
}

.powered-by {
    margin-top: 1.25rem;
}

.shelly-logo {
    height: 56px;
    opacity: 0.85;
    filter: invert(1);
    transition: opacity 0.2s;
}

.shelly-logo:hover { opacity: 1; }

/* --- Grid --- */
.content-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .content-grid { grid-template-columns: 1fr; }
}

/* --- Product Card --- */
.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.product-video {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #091a2e, #0b2240);
    overflow: hidden;
}

.product-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-sound-toggle {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 13, 24, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(69, 148, 209, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    z-index: 2;
    padding: 0;
}

.video-sound-toggle:hover {
    background: rgba(6, 13, 24, 0.85);
    border-color: var(--accent);
    transform: scale(1.1);
}

.video-sound-toggle svg {
    width: 18px;
    height: 18px;
}

.product-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.spec {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

.spec:nth-child(odd) { border-right: 1px solid var(--border); }

.spec-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.spec-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

/* --- Features Section --- */
.features-section {
    padding: 1.5rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
}

.features-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

@media (max-width: 768px) {
    .features-grid { grid-template-columns: 1fr; }
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    transition: background 0.15s;
}

.feature:hover {
    background: var(--surface-hover);
}

.feature-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(69, 148, 209, 0.1);
    color: var(--accent);
}

.feature-icon svg {
    width: 18px;
    height: 18px;
}

.feature-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.feature-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.feature-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* --- Form Card --- */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.form-card h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.price-tag {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.price-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

.form-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.form-notice {
    font-size: 0.8rem;
    color: var(--accent);
    background: rgba(69, 148, 209, 0.08);
    border: 1px solid rgba(69, 148, 209, 0.18);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 1.75rem;
    line-height: 1.45;
}

.form-notice strong {
    color: var(--accent-bright);
}

.field {
    margin-bottom: 1.25rem;
}

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field input,
.field select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.field input::placeholder { color: var(--text-muted); opacity: 0.5; }

.field input:focus,
.field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.field select option {
    background: var(--surface);
    color: var(--text);
}

/* --- Stepper --- */
.stepper {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
}

.stepper input {
    width: 4rem;
    text-align: center;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.7rem 0;
    -moz-appearance: textfield;
}

.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }

.stepper input:focus { box-shadow: none; }

.stepper-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.stepper-btn:hover { background: var(--surface-hover); }

/* --- Submit Button --- */
.btn-submit {
    width: 100%;
    padding: 0.9rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, var(--accent-deep), #146ff8);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    position: relative;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0, 89, 201, 0.4);
}

.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.spinner {
    width: 22px;
    height: 22px;
    animation: spin 0.8s linear infinite;
}

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

/* --- Messages --- */
.success-msg {
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.4s ease;
}

.success-msg svg { color: var(--success); margin-bottom: 1rem; }
.success-msg h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.success-msg p { color: var(--text-muted); font-size: 0.9rem; }

.error-msg {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: var(--error);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

.shake {
    animation: shake 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.6;
}
