:root {
    --primary: #0c48a1;
    --secondary: #f5b400;
    --accent: #0e1a3a;
    --bg: #f2f6ff;
    --text: #0b1633;
    --radius: 20px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Montserrat','Segoe UI',sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: var(--primary); text-decoration: underline; }

/* hero */
.hero {
    height: 36vh;
    max-height: 312px;
    min-height: 156px;
    background:
        linear-gradient(135deg, rgba(12,72,161,.85), rgba(14,26,58,.9)),
        url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=1600&q=80')
        center/cover;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    text-align:center;
    padding:4rem 2rem 1.5rem;
    color:#fff;
}

.hero__text {
    max-width: 700px;
    animation: float 6s ease-in-out infinite;
}

.hero h1 {
    margin:0;
    font-size: clamp(2rem, 6vw, 3.8rem);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero p {
    margin-top: 1rem;
    font-size: clamp(1rem, 2vw, 1.3rem);
}

@media (max-width: 768px) {
    .hero { height: 30vh; padding-top:3rem; }
}

@keyframes float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* layout */
.container {
    max-width: 1100px;
    margin: -40px auto 40px;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    .container { margin: -60px auto 30px; }
}

.card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(12,72,161,.18);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(245,180,0,.2), transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
}

.card:hover::before { opacity: 1; }

.step { display: none; animation: fade .35s ease forwards; }
.step--active { display: block; }

@keyframes fade {
    from { opacity:0; transform: translateY(20px); }
    to { opacity:1; transform: translateY(0); }
}

h2 {
    margin-top: 0;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* calculator */
.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    margin-bottom: 1.5rem;
}

.grid--calc { align-items: stretch; }
.grid--actions {
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    margin-top: 1.5rem;
}

.calc-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.field { display: flex; flex-direction: column; gap: .5rem; }
.label { font-weight: 600; }

input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg,var(--secondary),var(--primary));
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    background: #fff;
    border: 5px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(12,72,161,.35);
    transition: transform .2s ease;
}

input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.05); }

.price-box {
    background: linear-gradient(130deg,var(--primary),var(--accent));
    color: #fff;
    border-radius: 18px;
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    align-content: center;
    min-height: 160px;
    box-shadow: 0 15px 35px rgba(12,72,161,.35);
}

.price { font-size: 1.7rem; margin: .3rem 0 0; }

.options {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
}

.option {
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    background: #eef4ff;
    text-align: center;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border .2s ease;
    border: 2px solid transparent;
}

.option input { display: none; }

.option--active {
    background: #fff;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(245,180,0,.4);
    transform: translateY(-2px);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 600;
}

.checkbox--design {
    margin-top: auto;
    padding-top: 0.2rem;
}

input[type="text"],
input[type="tel"] {
    padding: .9rem 1rem;
    border: 2px solid #dfe5f7;
    border-radius: 14px;
    font-size: 1rem;
    transition: border-color .2s ease, box-shadow .2s ease;
    width: 100%;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(12,72,161,.15);
    outline: none;
}

.btn {
    padding: 1rem;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-primary {
    background: linear-gradient(130deg,var(--secondary),#ffd86b);
    color: #1c1402;
    box-shadow: 0 14px 35px rgba(245,180,0,.35);
}

.btn-primary:hover { transform: translateY(-3px); }
.btn-outline {
    border: 2px dashed var(--primary);
    background: transparent;
    color: var(--primary);
}

/* gallery */
.gallery {
    margin-top: 2.5rem;
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 12px 40px rgba(12,72,161,.15);
}

.gallery h3 {
    margin: 0 0 1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery__viewport {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
}

.gallery__viewport::-webkit-scrollbar { height: 6px; }
.gallery__viewport::-webkit-scrollbar-thumb {
    background: rgba(12,72,161,.4);
    border-radius: 999px;
}

.gallery__slide {
    flex: 0 0 430px;
    height: 270px;
    border-radius: 18px;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 12px 30px rgba(12,72,161,.2);
}

.gallery__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.gallery__slide:hover img { transform: scale(1.05); }

@media (max-width: 768px) {
    .grid--calc { grid-template-columns: 1fr; }
    .calc-left { order: 1; }
    .price-box { order: 2; margin-top: 1rem; }
    .gallery__slide {
        flex-basis: 75%;
        height: 220px;
    }
}

@media (max-width: 540px) {
    .gallery__slide { flex-basis: calc(100% - 24px); }
}