:root {
    --brand-primary: #0036a3; /* fallback на випадок відсутності змінних теми */
    --surface: #F1EFEF;
    --text-muted: #66758a;
    --radius: 14px;
    --gap: 16px;
    --gap-lg: 24px;
    --gap-xl: 40px;
    --shadow: 0 6px 24px rgba(0, 0, 0, .06);
    --border: 1px solid rgba(0, 0, 0, .08);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    color: inherit;
    background: inherit;
    font: inherit;
    line-height: 1.45;
}

img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    object-position: center;

}

.rent-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 32px);
}

.rent-wrap {
    display: grid;
    gap: var(--gap-xl);
}

/* Hero */
.rent-hero {
    display: grid;
    gap: var(--gap-lg);
    align-items: center;
    grid-template-columns: 1fr 1.2fr;
}

.rent-hero h1 {
    margin: 15px 0;
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 42px);
}

.rent-hero p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: clamp(16px, 2vw, 18px);
}

.rent-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: color-mix(in oklab, var(--brand-primary), white 75%);
    border: var(--border);
}

.rent-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: var(--border);
    padding: clamp(16px, 3vw, 24px);
}

/* Form */
#rent-form {
    scroll-margin-top: 100px;
    overflow: hidden;
}

#rent-form.success .rent-form {
    opacity: 0;
    pointer-events: none;
}

#rent-form .rent-success {
    display: none;
    position: absolute;
    inset: 0;
    text-align: center;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

#rent-form.success .rent-success {
    display: flex;
}

#rent-form:target {
    animation: bounce 500ms 1 750ms ease-in-out;
}

@keyframes bounce {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.rent-form {
    display: grid;
    gap: var(--gap);
}

.rent-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(2, 1fr);
}

.rent-grid_row {
    grid-column: 1 / 3;
}

label {
    font-size: 14px;
    color: var(--text-muted);
    display: block;
    margin: 0 0 6px;
}

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: var(--border);
    background: #fff;
    color: inherit;
    font: inherit;
    resize: none;
}

.rent-btns {
    display: flex;
    gap: var(--gap);
    align-items: center;
    flex-wrap: wrap;
    margin-top: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    font-weight: 600;
}

.btn-primary {
    background: var(--brand-primary);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-ghost {
    background: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    transition: 250ms;
}

.btn-ghost:hover {
    color: #FFF;
    background-color: var(--brand-primary);
}

/* Sections */
.rent-section {
    display: grid;
    gap: var(--gap-lg);
}

.rent-section h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
}

.rent-section p.lead {
    color: var(--text-muted);
    margin: 6px 0 0;
}

/* Cards grid */
.cards {
    display: grid;
    gap: var(--gap-lg);
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: #fff;
    border-radius: var(--radius);
    border: var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-title {
    margin: 15px 0;
    font-weight: bolder;
}

.card-subtle {
    color: var(--text-muted);
}

.card-img {
    display: none;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, color-mix(in oklab, var(--brand-primary), #fff 80%), #fff);
}

.card-img img {
    mix-blend-mode: darken;
    width: 100%;
    height: 100%;
    object-position: center;
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: color-mix(in oklab, var(--brand-primary), #fff 85%);
    font-size: 12px;
}

/* Steps */
.steps {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(4, 1fr);
}

.step {
    background: #fff;
    border: var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--brand-primary);
    font-weight: 700;
    color: #fff;
}

.step-title {
    margin: 15px 0;
}

/* FAQ */
details {
    background: #fff;
    border: var(--border);
    border-radius: 12px;
    padding: 12px 16px;
}

details + details {
    margin-top: 12px;
}

summary {
    cursor: pointer;
    font-weight: 600;
}

summary::-webkit-details-marker {
    display: none;
}

/* CTA */
.cta {
    display: grid;
    gap: 12px;
    align-items: center;
    grid-template-columns: 1fr auto;
    padding: clamp(16px, 3vw, 24px);
    border-radius: var(--radius);
    background: linear-gradient(90deg, color-mix(in oklab, var(--brand-primary), #fff 85%), #fff);
    border: var(--border);
}

/* Responsive */
@media (max-width: 960px) {
    .rent-hero {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(360px, 70vh) auto;
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .rent-hero {
        min-height: 50vh;
        align-self: center;
    }

    .rent-grid_col, .rent-grid_row {
        grid-column: 1/ 3;
    }


    .steps {
        grid-template-columns: 1fr;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .card-img {
        max-height: 120px;
    }

    .cta {
        grid-template-columns: 1fr;
    }

}

/* A11y: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
