:root {
    --bg: #f4efe6;
    --bg-soft: #fffaf2;
    --surface: #fffdf8;
    --ink: #1e2936;
    --ink-soft: #46515c;
    --ink-strong: #0f1d2e;
    --line: rgba(15, 29, 46, 0.12);
    --accent: #bc8b3b;
    --accent-strong: #9c6f2a;
    --accent-soft: #f3e2c8;
    --shadow: 0 22px 50px rgba(15, 29, 46, 0.12);
}

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

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    line-height: 1.65;
    color: var(--ink);
    background:
        radial-gradient(circle at 90% 10%, rgba(188, 139, 59, 0.2), transparent 35%),
        radial-gradient(circle at 8% 28%, rgba(40, 62, 92, 0.13), transparent 33%),
        linear-gradient(165deg, var(--bg) 0%, var(--bg-soft) 60%, #fdf7ee 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: -1;
}

body::before {
    inset: 0;
    background-image: linear-gradient(rgba(15, 29, 46, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 29, 46, 0.06) 1px, transparent 1px);
    background-size: 130px 130px;
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.45) 25%, rgba(0, 0, 0, 0.2) 75%, transparent 100%);
    opacity: 0.17;
}

body::after {
    width: 460px;
    height: 460px;
    right: -180px;
    bottom: -180px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(188, 139, 59, 0.4), rgba(188, 139, 59, 0.06) 55%, transparent 70%);
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(253, 248, 239, 0.78);
    backdrop-filter: blur(12px);
    will-change: transform;
    transition: transform 0.34s ease;
}

header.header-hidden {
    transform: translateY(calc(-100% - 10px));
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

header h1 {
    margin: 0;
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: clamp(1.8rem, 2.3vw, 2.7rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.05;
    color: var(--ink-strong);
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.52rem 1.02rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

nav a:hover {
    color: var(--ink-strong);
    border-color: rgba(156, 111, 42, 0.5);
    background: var(--accent-soft);
    transform: translateY(-2px);
}


section {
    position: relative;
    padding: clamp(3.2rem, 8vw, 5.8rem) 0;
}

section[id] {
    scroll-margin-top: 110px;
}

section h2 {
    margin-top: 0;
    margin-bottom: 1.9rem;
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    color: var(--ink-strong);
    text-align: center;
    letter-spacing: 0.02em;
}

section h2::after {
    content: "";
    display: block;
    width: min(170px, 45vw);
    height: 2px;
    margin: 0.7rem auto 0;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

#hero {
    padding-top: clamp(4.3rem, 9.5vw, 7.6rem);
}

#hero .container {
    position: relative;
    overflow: hidden;
    padding: clamp(2.1rem, 6vw, 4rem);
    border-radius: 32px;
    color: #fff6e8;
    text-align: center;
    background: linear-gradient(145deg, #10263d 0%, #153657 52%, #2f5378 100%);
    box-shadow: 0 26px 70px rgba(8, 19, 32, 0.35);
    isolation: isolate;
    animation: rise-in 0.7s ease both;
}

#hero .container::before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    top: -160px;
    left: -120px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(188, 139, 59, 0.48), transparent 72%);
    z-index: -1;
}

#hero .container::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.14);
    pointer-events: none;
}

#hero h2 {
    color: #fff8ef;
    font-size: clamp(2.3rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

#hero p {
    max-width: 860px;
    margin: 0 auto 1.8rem;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: rgba(255, 244, 228, 0.92);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.55rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #13263e;
    background: linear-gradient(130deg, #f7e7c8 0%, #e5bf7d 100%);
    border: 1px solid rgba(255, 244, 222, 0.7);
    box-shadow: 0 10px 28px rgba(231, 193, 127, 0.32);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(231, 193, 127, 0.43);
    filter: saturate(1.05);
}

#services .services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.3rem;
    counter-reset: service;
}

.service {
    position: relative;
    overflow: hidden;
    padding: 1.65rem 1.35rem 1.35rem;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fffdf8 0%, #fffaf3 100%);
    box-shadow: 0 12px 28px rgba(15, 29, 46, 0.08);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service::before {
    counter-increment: service;
    content: counter(service, decimal-leading-zero);
    position: absolute;
    top: 0.85rem;
    right: 1rem;
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(17, 33, 53, 0.2);
}

.service::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(188, 139, 59, 0), rgba(188, 139, 59, 0.75), rgba(188, 139, 59, 0));
}

.service:hover {
    transform: translateY(-8px);
    border-color: rgba(156, 111, 42, 0.32);
    box-shadow: 0 24px 45px rgba(15, 29, 46, 0.15);
}

.service i {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 0.9rem;
    border-radius: 15px;
    color: var(--accent-strong);
    background: radial-gradient(circle at 30% 30%, #fff8e8 0%, #f3dfbe 100%);
    font-size: 1.3rem;
    box-shadow: inset 0 0 0 1px rgba(188, 139, 59, 0.34);
}

.service h3 {
    margin: 0 0 0.65rem;
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--ink-strong);
}

.service p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.96rem;
}

#lawyers .lawyers-grid {
    display: grid;
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
    gap: 1.35rem;
}

.lawyer-card {
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 14px 34px rgba(15, 29, 46, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lawyer-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 46px rgba(15, 29, 46, 0.17);
}

.lawyer-photo {
    padding: 1rem 1rem 0;
    background: linear-gradient(180deg, rgba(188, 139, 59, 0.12), rgba(188, 139, 59, 0));
}

.lawyer-photo img {
    width: 100%;
    display: block;
    height: auto;
    object-fit: contain;
    border-radius: 17px;
    border: 1px solid rgba(15, 29, 46, 0.12);
    box-shadow: 0 12px 22px rgba(15, 29, 46, 0.12);
}

.lawyer-info {
    padding: 1.3rem 1.3rem 1.5rem;
    text-align: left;
}

.lawyer-info h3 {
    margin: 0 0 0.95rem;
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: clamp(1.8rem, 2.1vw, 2.25rem);
    line-height: 1;
    color: var(--ink-strong);
    text-align: center;
}

.lawyer-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.lawyer-info li {
    position: relative;
    margin: 0;
    padding-left: 1rem;
    color: var(--ink-soft);
    font-size: 0.96rem;
}

.lawyer-info li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-strong);
    transform: translateY(-50%);
}

#contact .container {
    padding: clamp(2rem, 5vw, 3.4rem);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(8, 19, 32, 0.32);
    background: linear-gradient(145deg, #0f243a 0%, #16314e 55%, #274a6b 100%);
    color: #fbf3e7;
}

#contact h2 {
    color: #fff8ef;
}

#contact h2::after {
    background: linear-gradient(90deg, transparent, #e4c084, transparent);
}

.contact-info {
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    gap: 0.72rem;
}

.contact-info p {
    margin: 0;
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 1rem;
    color: rgba(255, 246, 233, 0.96);
}

.contact-info i {
    width: 1.2rem;
    margin-right: 0.45rem;
    color: #eacb94;
}

.contact-info a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.45);
    transition: border-color 0.25s ease, color 0.25s ease;
}

.contact-info a:hover {
    color: #ffe2b2;
    border-color: rgba(255, 226, 178, 0.85);
}

body.quiz-modal-open {
    overflow: hidden;
}

.quiz-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(76px, 10vh, 112px) clamp(0.75rem, 2vw, 1.1rem) 0.75rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.26s ease, visibility 0.26s ease;
}

.quiz-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.quiz-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 19, 32, 0.44);
    backdrop-filter: blur(7px);
}

.quiz-modal-dialog {
    position: relative;
    width: min(660px, 94vw);
    max-height: min(82vh, 820px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, #fffdf8 0%, #f8f3eb 100%);
    box-shadow: 0 34px 76px rgba(8, 19, 32, 0.45);
    overflow: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: transform 0.3s ease;
    z-index: 1;
}

.quiz-modal.is-open .quiz-modal-dialog {
    transform: translateY(0) scale(1);
}

.quiz-modal-close {
    position: absolute;
    top: 0.68rem;
    right: 0.68rem;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 1.7rem;
    line-height: 1;
    color: var(--ink-strong);
    background: rgba(15, 29, 46, 0.07);
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
    z-index: 2;
}

.quiz-modal-close:hover {
    color: #9c6f2a;
    background: rgba(156, 111, 42, 0.16);
    transform: rotate(90deg);
}

.quiz-modal-close:focus-visible {
    outline: 3px solid rgba(156, 111, 42, 0.28);
    outline-offset: 2px;
}

.quiz-modal-scroll {
    max-height: min(82vh, 820px);
    overflow-y: auto;
    padding: clamp(0.85rem, 1.8vw, 1.1rem);
    padding-top: clamp(2.1rem, 3vw, 2.2rem);
}

@supports not ((backdrop-filter: blur(1px))) {
    .quiz-modal-backdrop {
        background: rgba(8, 19, 32, 0.68);
    }
}

.quiz-intro-card {
    border-radius: 20px;
    border: 1px solid rgba(15, 29, 46, 0.18);
    background: linear-gradient(180deg, #fffdf8 0%, #f8f3eb 100%);
    color: var(--ink-strong);
    box-shadow: 0 12px 28px rgba(15, 29, 46, 0.14);
    padding: clamp(1rem, 2.2vw, 1.4rem);
    text-align: center;
}

.quiz-intro-card--modal {
    border-radius: 16px;
    padding: clamp(0.85rem, 1.8vw, 1rem);
    box-shadow: 0 10px 20px rgba(15, 29, 46, 0.12);
}

.quiz-intro-card--modal h2 {
    font-size: clamp(1.45rem, 3.4vw, 2rem);
    margin-top: 0.3rem;
}

.quiz-intro-card--modal .quiz-intro-text {
    margin-top: 0.35rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.quiz-intro-label {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.quiz-intro-card h2 {
    margin: 0.4rem 0 0;
    color: var(--ink-strong);
    font-size: clamp(1.75rem, 4vw, 2.45rem);
}

.quiz-intro-card h2::after {
    background: linear-gradient(90deg, transparent, #e4c084, transparent);
}

.quiz-intro-text {
    margin: 0.55rem auto 0;
    max-width: 560px;
    color: var(--ink-soft);
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

.quiz-inline-wrap {
    margin-top: 0.9rem;
}

.quiz-card-head {
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.quiz-card-title {
    margin: 0;
    color: var(--ink-strong);
    font-weight: 800;
    font-size: clamp(0.94rem, 1.6vw, 1.1rem);
}

.quiz-card {
    border-radius: 20px;
    border: 1px solid rgba(15, 29, 46, 0.17);
    background: linear-gradient(180deg, #fffdf8 0%, #f7f2e9 100%);
    box-shadow: 0 12px 28px rgba(15, 29, 46, 0.14);
    padding: clamp(0.95rem, 1.8vw, 1.2rem);
}

.quiz-progress {
    height: 5px;
    border-radius: 999px;
    background: rgba(15, 29, 46, 0.12);
    overflow: hidden;
    margin-bottom: 1rem;
}

.quiz-progress-bar {
    display: block;
    width: 20%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #bc8b3b 0%, #9c6f2a 100%);
    transition: width 0.3s ease;
}

.quiz-form {
    min-height: 0;
}

.quiz-step {
    display: none;
    animation: quiz-step-in 0.25s ease;
}

.quiz-step.is-active {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.quiz-step h3 {
    margin: 0;
    max-width: 640px;
    color: var(--ink-strong);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: clamp(1.25rem, 2.3vw, 1.75rem);
    line-height: 1.15;
}

.quiz-step-note {
    margin: 0.25rem 0 0;
    color: var(--ink-soft);
    font-size: clamp(0.9rem, 1.2vw, 0.98rem);
}

.quiz-options {
    margin-top: 0.4rem;
    display: grid;
    gap: 0.62rem;
}

.quiz-option {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--ink-soft);
    font-size: clamp(0.95rem, 1.4vw, 1.14rem);
    line-height: 1.25;
    cursor: pointer;
}

.quiz-option input[type="radio"] {
    appearance: none;
    width: clamp(23px, 2vw, 30px);
    height: clamp(23px, 2vw, 30px);
    margin: 0;
    border: 2px solid rgba(21, 54, 87, 0.56);
    border-radius: 50%;
    display: inline-grid;
    place-content: center;
    flex-shrink: 0;
    transition: border-color 0.22s ease, transform 0.22s ease;
}

.quiz-option input[type="radio"]::before {
    content: "";
    width: clamp(9px, 1vw, 12px);
    height: clamp(9px, 1vw, 12px);
    border-radius: 50%;
    background: #9c6f2a;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.quiz-option input[type="radio"]:checked {
    border-color: #9c6f2a;
    transform: scale(1.03);
}

.quiz-option input[type="radio"]:checked::before {
    transform: scale(1);
}

.quiz-option input[type="radio"]:focus-visible {
    outline: 3px solid rgba(156, 111, 42, 0.22);
    outline-offset: 2px;
}

.quiz-actions {
    margin-top: 0.45rem;
    padding-top: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.quiz-back {
    border: none;
    background: transparent;
    color: var(--ink-strong);
    font-size: clamp(0.86rem, 1.05vw, 0.95rem);
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0;
    letter-spacing: 0.02em;
}

.quiz-back:hover {
    color: #9c6f2a;
}

.quiz-back.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

.quiz-next {
    border: 1px solid rgba(11, 29, 46, 0.18);
    border-radius: 999px;
    min-width: min(100%, 230px);
    padding: 0.72rem 1.35rem;
    color: #fff9ef;
    background: linear-gradient(135deg, #153657 0%, #244c72 100%);
    font-size: clamp(0.82rem, 1vw, 0.9rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

.quiz-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(12, 31, 48, 0.34);
}

.quiz-next:disabled {
    cursor: not-allowed;
    opacity: 0.54;
    transform: none;
    box-shadow: none;
}

.quiz-contact-fields {
    margin-top: 0.35rem;
    display: grid;
    gap: 0.8rem;
}

.quiz-field {
    display: grid;
    gap: 0.4rem;
}

.quiz-field > span {
    color: var(--ink-strong);
    font-size: clamp(0.95rem, 1.3vw, 1.08rem);
    line-height: 1.2;
    font-weight: 700;
}

.quiz-field input {
    border: none;
    border-bottom: 1px solid rgba(15, 29, 46, 0.2);
    background: transparent;
    color: var(--ink);
    padding: 0.25rem 0 0.66rem;
    font-size: clamp(0.95rem, 1.1vw, 1rem);
    line-height: 1.15;
}

.quiz-field input::placeholder {
    color: #8f98a1;
}

.quiz-field input:focus {
    outline: none;
    border-bottom-color: #9c6f2a;
}

.quiz-status {
    min-height: 1.4em;
    margin: 0.45rem 0 0;
    color: var(--ink);
    font-size: 0.9rem;
}

.quiz-status.is-error {
    color: #b43b35;
}

.quiz-status.is-success {
    color: #2f7f3a;
}

.quiz-result {
    min-height: 220px;
    display: grid;
    align-content: center;
    gap: 0.65rem;
    text-align: center;
    justify-items: center;
}

.quiz-result h3 {
    margin: 0;
    color: var(--ink-strong);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: clamp(1.25rem, 2.3vw, 1.7rem);
    line-height: 1.15;
}

.quiz-result-main {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1rem, 1.35vw, 1.15rem);
}

.quiz-result-main strong {
    color: #9c6f2a;
    font-weight: 800;
}

.quiz-result-text {
    margin: 0;
    max-width: 670px;
    color: var(--ink-soft);
    font-size: clamp(0.86rem, 1.02vw, 0.95rem);
}

.quiz-restart {
    width: fit-content;
    border: 1px solid rgba(15, 29, 46, 0.25);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-strong);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.52rem 0.95rem;
    transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.quiz-restart:hover {
    color: #153657;
    border-color: rgba(21, 54, 87, 0.38);
    background: rgba(21, 54, 87, 0.06);
}

footer {
    padding: 2rem 0 2.5rem;
}

footer .container {
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

footer p {
    margin: 0;
    text-align: center;
    color: #6d747c;
    font-size: 0.93rem;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.services-grid .service.reveal:nth-child(2),
.services-grid .service.reveal:nth-child(5),
.services-grid .service.reveal:nth-child(8),
.lawyers-grid .lawyer-card.reveal:nth-child(2) {
    transition-delay: 0.08s;
}

.services-grid .service.reveal:nth-child(3),
.services-grid .service.reveal:nth-child(6),
.services-grid .service.reveal:nth-child(9) {
    transition-delay: 0.14s;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes quiz-step-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1000px) {
    #services .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quiz-option {
        font-size: clamp(0.95rem, 2.2vw, 1.08rem);
    }
}

@media (max-width: 820px) {
    header .container {
        flex-direction: column;
        align-items: stretch;
        padding: 0.85rem 0;
    }

    header h1 {
        text-align: center;
    }

    nav ul {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    body::after {
        display: none;
    }

    section {
        padding: 3.3rem 0;
    }

    #hero .container,
    #contact .container {
        border-radius: 22px;
    }

    #hero .container {
        padding: 1.85rem 1.2rem;
    }

    #hero h2 {
        font-size: clamp(1.8rem, 9vw, 2.35rem);
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    #services .services-grid {
        grid-template-columns: 1fr;
    }

    .service h3 {
        font-size: 1.55rem;
    }

    .lawyer-info h3 {
        font-size: 1.9rem;
    }

    .quiz-modal {
        align-items: flex-start;
        padding: 68px 0.5rem 0.5rem;
    }

    .quiz-modal-dialog {
        width: min(680px, 96vw);
        height: auto;
        max-height: calc(100dvh - 74px);
        border-radius: 16px;
    }

    .quiz-modal-scroll {
        display: block;
        height: auto;
        max-height: calc(100dvh - 74px);
        overflow-y: auto;
        padding: 1.9rem 0.7rem 0.7rem;
    }

    .quiz-modal-close {
        top: 0.42rem;
        right: 0.42rem;
        width: 34px;
        height: 34px;
        font-size: 1.4rem;
    }

    .quiz-intro-card--modal {
        display: none;
    }

    .quiz-inline-wrap {
        margin-top: 0;
        display: block;
        min-height: auto;
    }

    .quiz-card-head {
        margin-bottom: 0.35rem;
    }

    .quiz-card {
        display: block;
        min-height: auto;
        padding: 0.8rem;
    }

    .quiz-form {
        display: block;
        min-height: auto;
    }

    .quiz-result {
        min-height: 0;
    }

    .quiz-step {
        min-height: 0;
    }

    .quiz-step.is-active {
        min-height: auto;
        gap: 0.35rem;
    }

    .quiz-step h3,
    .quiz-result h3 {
        font-size: clamp(1.1rem, 4.8vw, 1.35rem);
    }

    .quiz-options {
        min-height: auto;
        overflow-y: visible;
        gap: 0.5rem;
        padding-right: 0;
    }

    .quiz-option {
        align-items: flex-start;
        font-size: clamp(0.96rem, 3.6vw, 1.08rem);
    }

    .quiz-actions {
        margin-top: 0.45rem;
        border-top: 1px solid rgba(15, 29, 46, 0.12);
        padding-top: 0.7rem;
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 0.8rem;
    }

    .quiz-back {
        text-align: left;
        font-size: 1rem;
    }

    .quiz-next {
        width: 100%;
        min-width: 0;
        font-size: 0.98rem;
    }

    .quiz-field > span {
        font-size: clamp(0.98rem, 4.3vw, 1.12rem);
    }

    .quiz-field input {
        font-size: 1rem;
    }

    .quiz-consent {
        font-size: 0.9rem;
    }

    .quiz-result-main {
        font-size: 1.05rem;
    }

    .quiz-restart {
        width: 100%;
    }

    .quiz-card-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 450px) {
    nav ul {
        width: 100%;
        gap: 0.45rem;
    }

    nav li {
        flex: 1 1 calc(50% - 0.45rem);
    }

    nav a {
        width: 100%;
        padding-inline: 0.7rem;
        font-size: 0.9rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
