:root {
    --accent: #d4af37;
    --gold: #d4af37;
    --muted: #6b7280;
    --bg: #f7f5ef;
    --card: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #fbf8ef 0%, #ffffff 25%, #ffffff 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 0 18px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border);
}

.topbar__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand--link {
    color: inherit;
    text-decoration: none;
}

.brand__logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.12);
}

.brand__badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.18);
    border: 1px solid rgba(212, 175, 55, 0.35);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--accent);
}

.brand__name {
    font-weight: 800;
    font-size: 18px;
}

.brand__tagline {
    color: var(--muted);
    font-size: 14px;
}

.nav {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav__item {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}

.nav__item:hover {
    color: var(--text);
    border-color: rgba(17, 24, 39, 0.08);
    background: rgba(212, 175, 55, 0.08);
}

.topbar .pill {
    justify-self: end;
    white-space: nowrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--accent);
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
}

.pill--muted {
    background: rgba(17, 24, 39, 0.04);
    border-color: rgba(17, 24, 39, 0.08);
    color: var(--text);
}

.hero {
    padding: 48px 0 30px;
}

.hero__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    align-items: center;
}

.hero h1 {
    margin: 14px 0 10px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
}

.hero__highlights {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.highlight {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.06);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.02);
}

.highlight__icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(212, 175, 55, 0.18);
    color: var(--accent);
    font-weight: 800;
    font-size: 14px;
}

.highlight__title {
    font-weight: 800;
}

.muted {
    color: var(--muted);
}

.hero__actions {
    display: flex;
    gap: 12px;
    margin: 18px 0;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.btn--ghost {
    background: transparent;
    color: var(--accent);
}

.btn--full {
    width: 100%;
}

.badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero__card {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.hero__visual {
    position: relative;
    display: grid;
    width: min(640px, 100%);
    justify-self: end;
}

.hero__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 500px;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-left: none;
    background: linear-gradient(100deg, #f7f5ef 0%, rgba(247, 245, 239, 0.88) 26%, rgba(247, 245, 239, 0.36) 60%, rgba(247, 245, 239, 0) 80%);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.07);
}

.hero__frame .hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.05);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(247, 245, 239, 0.96) 0%, rgba(247, 245, 239, 0.82) 38%, rgba(247, 245, 239, 0.35) 58%, rgba(247, 245, 239, 0) 78%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(12px, 2.4vw, 22px) clamp(16px, 3vw, 28px);
}

.hero__overlay-content {
    max-width: 420px;
    display: grid;
    gap: 10px;
    pointer-events: none;
    margin-left: clamp(-10px, -1.4vw, -6px);
}

.hero__label {
    width: fit-content;
    margin-bottom: 6px;
    backdrop-filter: blur(8px);
}

.hero__overlay-title {
    display: grid;
    gap: 4px;
    font-weight: 800;
    font-size: clamp(18px, 3.4vw, 26px);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--accent);
}

.hero__overlay-text {
    margin: 0;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
}

.hero__overlay-text strong {
    color: var(--accent);
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    border: 2px solid rgba(212, 175, 55, 0.25);
    object-fit: cover;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.04);
}

.card__title {
    font-weight: 700;
    margin-bottom: 10px;
}

.card__list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    color: var(--muted);
}

.card__list li + li {
    margin-top: 6px;
}

.section {
    padding: 48px 0;
}

.section--muted {
    background: #faf7ef;
}

.section-divider {
    width: min(1180px, 100%);
    margin: 0 auto;
    border-top: 2px solid #e9dfc7;
}

.page {
    display: grid;
    gap: 14px;
}

.page h1 {
    margin: 6px 0 0;
    line-height: 1.2;
}

.page__content {
    display: grid;
    gap: 12px;
}

.page__content h3 {
    margin: 10px 0 4px;
}

.page__content p {
    margin: 0;
}

.section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

#agents .section__head {
    margin-bottom: 12px;
}

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 18px;
}

.tile {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    background: var(--card);
}

.tile__head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    column-gap: 10px;
    row-gap: 4px;
}

.tile__head h3 {
    margin: 0;
    line-height: 1.2;
    flex: 1;
    min-width: 0;
}

.tile__head .pill {
    white-space: nowrap;
    align-self: start;
}

.tile__meta {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    color: var(--muted);
    font-weight: 600;
}

.link {
    color: var(--accent);
    font-weight: 700;
}

.two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    align-items: start;
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    color: var(--text);
}

.list--bullets li {
    position: relative;
    padding-left: 14px;
}

.list--bullets li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.licenses-wrap {
    align-items: start;
    gap: 24px;
}

.docs-wrap {
    align-items: center;
    gap: 24px;
}

.doc-visual {
    display: grid;
    gap: 12px;
    background: linear-gradient(150deg, #fffdf7 0%, #ffffff 45%, #fbf6e5 100%);
    border: 1px solid rgba(212, 175, 55, 0.28);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.05);
}

.doc-visual__illustration {
    position: relative;
    height: 140px;
    display: grid;
    place-items: center;
}

.doc-sheet {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    z-index: 1;
}

.doc-sheet--back { transform: translate(14px, -10px) scale(0.92); opacity: 0.7; z-index: 1; }
.doc-sheet--middle { transform: translate(-10px, 6px) scale(0.96); opacity: 0.85; z-index: 2; }
.doc-sheet--front {
    transform: translate(0, 0) scale(1);
    z-index: 3;
    position: relative;
    display: grid;
    place-items: center;
    overflow: visible;
}

.doc-envelope {
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: 12%;
    right: 12%;
    max-width: 280px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    z-index: 4;
}

.doc-envelope__body {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(145deg, #fffaf2 0%, #fff 40%, #f7edd4 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.6), 0 10px 20px rgba(0, 0, 0, 0.05);
}

.doc-envelope__flap {
    position: absolute;
    top: 0;
    left: 6%;
    right: 6%;
    height: 52%;
    background: linear-gradient(160deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.06));
    clip-path: polygon(0 0, 50% 62%, 100% 0, 100% 100%, 0 100%);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: inset 0 -1px 4px rgba(0, 0, 0, 0.04);
}

.doc-envelope__paper {
    position: absolute;
    top: 12%;
    left: 14%;
    right: 14%;
    height: 62%;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.04);
    padding: 10px 12px;
    display: grid;
    gap: 6px;
    align-content: start;
}

.doc-envelope__line {
    display: block;
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.55), rgba(212, 175, 55, 0.25));
}

.doc-envelope__line + .doc-envelope__line {
    opacity: 0.9;
}

.doc-envelope__line--short {
    width: 60%;
}

.doc-envelope__stamp {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.4);
    display: grid;
    place-items: center;
    color: var(--accent);
    font-weight: 800;
    font-size: 13px;
}

.doc-stamp {
    position: absolute;
    right: 18%;
    bottom: 18%;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(212, 175, 55, 0.14);
    border: 2px dashed rgba(212, 175, 55, 0.6);
    color: var(--accent);
    font-weight: 800;
    z-index: 5;
}

.doc-visual__body h3 {
    margin: 0;
}

.doc-visual__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.license-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.license-card {
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #fffdf7 0%, #ffffff 45%, #fbf6e5 100%);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 12px;
}

.license-card__image-wrap {
    position: relative;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    display: grid;
    align-items: stretch;
    justify-items: stretch;
    width: 100%;
    height: 100%;
    min-height: 260px;
    aspect-ratio: auto;
}

.license-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.license-card__meta {
    display: grid;
    gap: 4px;
    align-items: start;
}

.license-card__label {
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
}

.license-card__caption {
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}

.license-notes {
    margin-top: 12px;
}

.form {
    display: grid;
    gap: 12px;
    width: 100%;
}

.form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    width: 100%;
}

.form input {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 15px;
    width: 100%;
}

.form__agreements {
    display: grid;
    gap: 8px;
    padding: 4px 0;
}

.form__errors {
    display: none;
    margin: 4px 0 4px;
    padding: 10px 12px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    background: rgba(248, 113, 113, 0.08);
    border-radius: 10px;
    color: #991b1b;
    font-weight: 600;
    line-height: 1.4;
}

.form__errors.is-visible {
    display: block;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 0;
    align-self: center;
    vertical-align: middle;
    accent-color: var(--accent);
}

.checkbox__text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.35;
}

.checkbox a {
    color: var(--accent);
    font-weight: 700;
}

.agent-step {
    display: none;
    gap: 14px;
}

.agent-step.is-visible {
    display: grid;
}

.agent-step__head h3 {
    margin: 6px 0 4px;
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

#agents .agent-grid {
    margin-top: 6px;
}

.agent-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    display: grid;
    gap: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.agent-card:hover {
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.agent-card.is-active {
    border-color: var(--accent);
    box-shadow: 0 16px 36px rgba(212, 175, 55, 0.18);
}

.agent-card__top {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
}

.agent-card__photo-wrap {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.08);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.06);
}

.agent-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.agent-card__name {
    font-weight: 800;
    font-size: 17px;
}

.agent-card__role {
    color: var(--muted);
    font-weight: 700;
    margin-top: 2px;
}

.agent-card__desc {
    margin: 6px 0 0;
}

.agent-card__tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.agent-card__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.agent-card__select {
    min-width: 120px;
}

.agent-card__chat {
    margin-left: auto;
}

.agent-step__footer {
    font-weight: 700;
    color: var(--text);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.calc-result {
    margin-top: 8px;
    color: var(--text);
    font-weight: 600;
}

.contact-card {
    display: grid;
    gap: 8px;
}

.footer {
    padding: 20px 0 26px;
    border-top: 1px solid var(--border);
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.footer__contacts {
    display: grid;
    gap: 4px;
    text-align: right;
}

@media (max-width: 720px) {
    .topbar__inner {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        padding: 12px 0;
    }

    .nav {
        display: none;
    }

    .brand {
        gap: 8px;
        margin-left: 8px;
    }

    .topbar .pill {
        margin-left: 0;
    }

    .form__agreements {
        gap: 6px;
    }

    .checkbox__text {
        font-size: 14px;
        gap: 4px;
        white-space: normal;
        word-break: break-word;
    }

    .hero__inner {
        text-align: center;
    }

    .hero__card {
        justify-items: center;
    }

    .footer__contacts {
        text-align: left;
    }

    #agents.section {
        padding-top: 52px;
        padding-bottom: 80px;
    }

    #agents .section__head {
        margin-bottom: 18px;
        align-items: flex-start;
    }

    #agents .section__head .link {
        margin-top: 6px;
    }

    .footer {
        padding-bottom: 40px;
    }
}