/* Rigor Line Systems — Design Hierarchy v3.1 */
:root {
    --bg: #0F1720;
    --text: #EDEFF2;
    --text-muted: #8A94A3;
    --accent: #9F7F4F;
    --accent-hover: #B08F5F;
    --baseline: 8px;
    --headline-text-gap: 56px;
    --text-text-gap: 24px;
    --text-list-gap: 32px;
}

/* Light theme — Palette D */
[data-theme="light"] {
    --bg: #F1F1F1;
    --text: #111214;
    --text-muted: #A3A8AB;
    --accent: #9F7F4F;
    --accent-hover: #B08F5F;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-weight: 400;
    font-size: 16px;
}

/* Container */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 80px;
}

/* Grid System */
.block-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
}

/* Hero — offset for fixed header */
.hero {
    padding-top: 120px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
}

.hero-left {
    grid-column: 1 / span 7;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
}

.hero-grid .hero-text {
    padding-top: 40px;
}

.hero-grid .hero-photo {
    grid-column: 8 / span 5;
    padding-left: 24px;
    align-self: stretch;
}


.hero-cta {
    margin-top: auto;
    align-self: flex-start;
}

.hero-name {
    font-family: 'Marcellus', serif;
    font-size: 72px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.005em;
    margin-bottom: var(--headline-text-gap);
    color: var(--text);
}

.hero-role {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 32px;
}

.hero-desc {
    max-width: 600px;
}

.hero-desc p {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 32px;
    color: var(--text);
}

.hero-desc p:last-child {
    margin-bottom: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 14px 32px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1px solid var(--accent);
    transition: background 0.25s ease, color 0.25s ease;
}

.btn:hover {
    background: var(--accent);
    color: #fff;
}

[data-theme="light"] .btn:hover {
    color: #111214;
}

/* Site header — top menu */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 80px;
    padding-top: max(16px, env(safe-area-inset-top));
    background: rgba(15, 23, 32, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(138, 148, 163, 0.15);
}

[data-theme="light"] .site-header {
    background: rgba(241, 241, 241, 0.9);
    border-bottom-color: rgba(163, 168, 171, 0.2);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none !important;
    border-bottom: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.nav-link:link,
.nav-link:visited,
.nav-link:active,
.nav-link:hover {
    color: var(--text-muted);
    text-decoration: none !important;
    border-bottom: none;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link-active {
    color: var(--accent);
}

.nav-link-active:hover {
    color: var(--accent-hover);
}

/* Theme toggle — moon (dark) / sun (light) */
.theme-toggle {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(159, 127, 79, 0.12);
    border-color: var(--accent);
}

.theme-toggle:active {
    transform: scale(0.96);
}

.theme-toggle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    color: var(--accent);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle-icon svg {
    width: 100%;
    height: 100%;
}

/* Dark mode: show sun (click to switch to light) */
.theme-toggle-sun {
    opacity: 1;
}

.theme-toggle-moon {
    opacity: 0;
    pointer-events: none;
}

/* Light mode: show moon (click to switch to dark) */
[data-theme="light"] .theme-toggle-sun {
    opacity: 0;
    pointer-events: none;
}

[data-theme="light"] .theme-toggle-moon {
    opacity: 1;
}

[data-theme="light"] .theme-toggle {
    border-color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(159, 127, 79, 0.1);
    border-color: var(--accent);
}

[data-theme="light"] .theme-toggle-icon {
    color: var(--accent);
}

.hero-photo {
    position: relative;
    max-width: 495px;
    display: flex;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
    max-width: 528px;
}

/* Sections */
section {
    padding: 140px 0;
}

/* Grid spans */
.block-content.grid-span-8,
.block-header.grid-span-8 {
    grid-column: 1 / span 8;
}

.expertise-list.grid-span-9 {
    grid-column: 1 / span 9;
}

/* Watermark — fullscreen, centered */
.watermark-block {
    position: relative;
    overflow: hidden;
}

.watermark-container {
    position: relative;
    z-index: 1;
}

.watermark {
    position: absolute;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    width: 211%;
    max-width: 2275px;
    opacity: 0;
    transition: opacity 200ms ease-out;
    pointer-events: none;
}

.watermark-sign {
    width: 100%;
    height: auto;
}

.watermark.visible {
    opacity: 0.035;
}

/* Block 2–3 — Rigor Line / Legal Grade */
.block-title {
    font-family: 'Marcellus', serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: var(--headline-text-gap);
    color: var(--text);
}

.block-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: var(--text-text-gap);
    color: var(--text);
    max-width: 640px;
}

.block-intro {
    margin-bottom: var(--text-text-gap);
}

.block-intro:has(+ .block-list) {
    margin-bottom: 0;
}

.block-list {
    list-style: none;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
    margin-top: var(--text-list-gap);
    margin-bottom: var(--text-list-gap);
}


.block-list li {
    color: var(--text);
    margin-bottom: 0;
}

.block-accent {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 500;
    margin-top: var(--text-text-gap);
    letter-spacing: 0.01em;
    color: var(--text);
}

.block-text-spaced {
    margin-top: var(--text-text-gap);
}

/* Legal Grade — пункты с разделителями */
.legal-points-list {
    list-style: none;
    padding-left: 0;
    margin-top: var(--text-list-gap);
    margin-bottom: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--text);
}

.legal-points-list li {
    padding: 0 0 var(--text-text-gap) 0;
    margin-bottom: var(--text-text-gap);
    border-bottom: 1px solid rgba(237, 239, 242, 0.1);
}

.legal-points-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

[data-theme="light"] .legal-points-list li {
    border-bottom-color: rgba(17, 18, 20, 0.12);
}

/* Block 4–6 — Главки (подзаголовки) */
.block-label {
    font-family: 'Marcellus', serif;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--text);
    margin-top: 0;
    margin-bottom: var(--headline-text-gap);
    letter-spacing: 0.02em;
}

.block-label::before {
    content: "";
    display: block;
    width: 72px;
    height: 2px;
    background: var(--accent);
    margin-top: 56px;
    margin-bottom: 24px;
}

/* Экспертиза */
.block-expertise-inner {
    grid-column: 1 / span 8;
}

.expertise-intro {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: var(--text-list-gap);
    color: var(--text);
    max-width: 640px;
}

.expertise-list {
    list-style: none;
    padding-left: 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
}

.expertise-list li {
    padding: 0 0 var(--text-text-gap) 0;
    margin-bottom: var(--text-text-gap);
    color: var(--text);
    border-bottom: 1px solid rgba(237, 239, 242, 0.1);
}

.expertise-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.expertise-certificate {
    margin-top: var(--headline-text-gap);
}

.expertise-certificate img {
    max-width: 200px;
    width: auto;
    height: auto;
    display: block;
}

/* Block 5 — Кому это нужно */
.audience-intro {
    font-size: 20px;
    line-height: 1.8;
    max-width: 640px;
    margin-bottom: var(--text-list-gap);
    color: var(--text);
}

.audience-list {
    list-style: none;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
}

.audience-list li {
    padding: 0 0 var(--text-text-gap) 0;
    margin-bottom: var(--text-text-gap);
    color: var(--text);
    border-bottom: 1px solid rgba(237, 239, 242, 0.1);
}

.audience-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Block 6 — Процесс */
.process-line {
    font-size: 20px;
    line-height: 1.8;
    color: var(--text);
    padding-bottom: var(--text-text-gap);
    margin-bottom: var(--text-text-gap);
    border-bottom: 1px solid rgba(237, 239, 242, 0.1);
}

.process-line.process-line-desc,
.process-line:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.process-line-desc {
    margin-top: 4px;
    margin-bottom: var(--headline-text-gap);
    font-size: 20px;
    line-height: 1.8;
    color: var(--text);
}

.block-accent-process {
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Final block — brand seal */
.block-final-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.final-logo {
    margin-bottom: 24px;
}

.final-logo img {
    width: min(640px, 90vw);
    height: auto;
    display: block;
}

.final-brand-accent {
    font-family: 'Marcellus', serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: var(--text-text-gap);
    color: var(--accent);
    width: 100%;
}

.final-tagline {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--accent);
    margin-bottom: var(--headline-text-gap);
    width: 100%;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    width: 100%;
}

.contact-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    padding: 8px 0;
    transition: color 0.25s ease, text-decoration 0.25s ease;
}

.contact-links a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.contact-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.contact-buttons .btn {
    flex: 1 1 0;
    min-width: 180px;
    max-width: 280px;
    width: 100%;
}

.btn-outline {
    background: transparent;
    border-color: var(--text-muted);
}

.btn-outline:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

[data-theme="light"] .btn-outline:hover {
    color: #111214;
}

/* Ankete page */
.ankete-page {
    min-height: 60vh;
    padding: 140px 0;
}

.ankete-content {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.ankete-back {
    display: inline-block;
    margin-bottom: 32px;
    align-self: flex-start;
}

.ankete-back:link,
.ankete-back:visited,
.ankete-back:active {
    color: var(--text);
    text-decoration: none;
}

.ankete-title {
    font-family: 'Marcellus', serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: var(--headline-text-gap);
}

.ankete-intro {
    font-size: 20px;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 32px;
}

.ankete-submit {
    margin-top: 40px;
}

.ankete-alt {
    margin-top: 24px;
    margin-bottom: 0;
}

.ankete-alt-link {
    color: var(--text-muted);
    font-size: 15px;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.ankete-alt-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* LG-Builder Form */
.lg-form {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.lg-question {
    border: none;
    padding: 0;
    margin: 0;
}

.lg-legend {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 20px;
    display: block;
}

.lg-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    margin-right: 12px;
    flex-shrink: 0;
}

.lg-hint {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.lg-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border: 1px solid rgba(138, 148, 163, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
}

.lg-option:hover {
    border-color: var(--accent);
    background: rgba(159, 127, 79, 0.06);
}

.lg-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(159, 127, 79, 0.1);
}

.lg-option input[type="checkbox"],
.lg-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--text-muted);
    background: transparent;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.lg-option input[type="radio"] {
    border-radius: 50%;
}

.lg-option input[type="checkbox"] {
    border-radius: 4px;
}

.lg-option input[type="checkbox"]:checked,
.lg-option input[type="radio"]:checked {
    border-color: var(--accent);
    background: var(--accent);
}

.lg-option input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.lg-option input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.lg-option span {
    flex: 1;
}

.lg-option-other {
    flex-wrap: wrap;
}

.lg-other-input {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid rgba(138, 148, 163, 0.3);
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.lg-other-input:focus {
    outline: none;
    border-color: var(--accent);
}

.lg-other-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.lg-form-error {
    display: none;
    margin-top: 24px;
    padding: 14px 18px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: rgba(159, 127, 79, 0.12);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
}

.lg-form-error.visible {
    display: block;
}

.lg-question.invalid .lg-legend {
    color: var(--accent);
}

@media (max-width: 767px) {
    .ankete-page {
        padding: 80px 0;
    }

    .ankete-title {
        font-size: 32px;
    }

    .ankete-intro {
        font-size: 20px;
    }
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid rgba(138, 148, 163, 0.2);
}

.footer .container {
    text-align: center;
}

.footer p {
    font-size: 16px;
    color: var(--text-muted);
}

/* Fade-in */
.fade-in {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.fade-in.visible {
    opacity: 1;
}

/* Tablet (768–1199px) */
@media (max-width: 1199px) {
    .site-header {
        padding: 14px 48px;
    }

    .nav-menu {
        gap: 24px;
    }

    .nav-link {
        font-size: 13px;
    }
    .container {
        padding: 0 48px;
    }

    .block-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 24px;
    }

    section {
        padding: 96px 0;
    }

    .hero-left {
        grid-column: 1 / -1;
    }

    .hero-grid .hero-photo {
        grid-column: 1 / span 6;
        padding-left: 0;
    }

    .hero-grid {
        display: grid;
    }

    .block-content.grid-span-8,
    .block-header.grid-span-8 {
        grid-column: 1 / span 8;
    }

    .expertise-list.grid-span-9 {
        grid-column: 1 / span 8;
    }
}

/* Hamburger — hidden on desktop */
.hamburger {
    display: none;
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
    .site-header {
        position: static;
        padding: 12px 20px;
        flex-wrap: wrap;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        order: 1;
        width: 44px;
        height: 44px;
        padding: 10px;
        background: transparent;
        border: 1px solid var(--text-muted);
        border-radius: 4px;
        cursor: pointer;
        margin-right: 8px;
        transition: background 0.25s ease, border-color 0.25s ease;
    }

    .hamburger:hover {
        background: rgba(159, 127, 79, 0.12);
        border-color: var(--accent);
    }

    .hamburger-line {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--accent);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 24px 0 16px;
        order: 3;
        border-top: 1px solid rgba(138, 148, 163, 0.2);
        margin-top: 12px;
    }

    .site-header.menu-open .nav-menu {
        display: flex;
    }

    .nav-link {
        font-size: 14px;
        padding: 12px 0;
        white-space: normal;
        border-bottom: 1px solid rgba(138, 148, 163, 0.1);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .theme-toggle {
        flex-shrink: 0;
        margin-left: auto;
        order: 2;
    }
    :root {
        --headline-text-gap: 40px;
        --text-text-gap: 20px;
    }

    .container {
        padding: 0 20px;
    }

    .block-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    section {
        padding: 64px 0;
    }

    .hero {
        min-height: auto;
        padding: 40px 0 48px;
        padding-top: 40px;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 0;
    }

    .hero-left {
        grid-column: 1 / -1;
        order: 1;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
    }

    .hero-grid .hero-text {
        padding-top: 0;
    }

    .hero-grid .hero-photo {
        grid-column: 1 / -1;
        order: 2;
        max-width: 100%;
        padding: 40px 0 32px;
        justify-content: center;
    }

    .hero-photo img {
        max-width: 100%;
        width: 100%;
    }

    .hero-cta {
        margin-top: 40px;
        align-self: center;
        width: 100%;
        max-width: 320px;
    }

    .hero-desc {
        max-width: none;
    }

    .hero-name {
        font-size: 40px;
        line-height: 1.1;
    }

    .hero-role {
        font-size: 13px;
        letter-spacing: 0.08em;
    }

    .hero-title {
        font-size: 16px;
        margin-bottom: 24px;
    }

    .hero-desc p {
        font-size: 17px;
        line-height: 1.7;
        margin-bottom: 20px;
    }

    .block-title {
        font-size: 28px;
    }

    .block-label {
        font-size: 24px;
    }

    .block-label::before {
        margin-top: 32px;
        margin-bottom: 20px;
        width: 48px;
        height: 2px;
    }

    .block-text,
    .expertise-intro,
    .audience-intro,
    .expertise-list li,
    .audience-list li,
    .legal-points-list li,
    .process-line {
        font-size: 20px;
    }

    .block-accent {
        font-size: 20px;
    }

    .watermark {
        width: 180%;
        max-width: 1200px;
    }

    .final-logo img {
        width: min(360px, 85vw);
    }

    .final-logo {
        margin-bottom: 20px;
    }

    .final-brand-accent {
        font-size: 28px;
    }

    .final-tagline {
        font-size: 20px;
    }

    .block-content.grid-span-8,
    .block-header.grid-span-8 {
        grid-column: 1 / -1;
    }

    .block-expertise-inner {
        grid-column: 1 / -1;
    }

    .expertise-list.grid-span-9 {
        grid-column: 1 / -1;
    }

    .btn {
        width: 100%;
        max-width: 320px;
        min-height: 48px;
        padding: 14px 24px;
    }

    .block-final-inner .btn {
        max-width: 280px;
    }

    .contact-buttons {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .contact-buttons .btn {
        flex: 1 1 auto;
        min-width: 0;
    }

    .contact-links {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 28px;
    }

    .contact-links a {
        padding: 12px 0;
        font-size: 17px;
    }

    .footer {
        padding: 32px 0;
    }

    .footer p {
        font-size: 14px;
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
    }

    .theme-toggle-icon {
        width: 20px;
        height: 20px;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: var(--accent-hover);
}

.expertise-certificate[role="button"] {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.expertise-certificate[role="button"]:hover {
    opacity: 0.8;
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    section {
        padding: 48px 0;
    }

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

    .hero-name {
        font-size: 32px;
    }

    .hero-desc p {
        font-size: 16px;
    }

    .block-title {
        font-size: 24px;
    }

    .block-label {
        font-size: 22px;
    }

    .block-text,
    .expertise-intro,
    .audience-intro,
    .expertise-list li,
    .audience-list li,
    .legal-points-list li,
    .process-line,
    .block-accent {
        font-size: 20px;
    }

    .final-logo img {
        width: min(300px, 90vw);
    }

    .final-brand-accent {
        font-size: 24px;
    }

    .final-tagline {
        font-size: 20px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .theme-toggle-icon {
        width: 18px;
        height: 18px;
    }
}
