@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Onest:wght@400;500;600;700;800&family=Roboto+Condensed:wght@400;700&display=swap');

:root {
    color-scheme: dark;
    --bg: #0d0f10;
    --bg-alt: #111416;
    --surface: rgba(20, 23, 24, 0.9);
    --surface-strong: #171b1c;
    --surface-soft: rgba(255, 255, 255, 0.03);
    --text: #f4efe7;
    --muted: #a69f95;
    --accent: #d4a26a;
    --accent-strong: #efbe89;
    --border: rgba(255, 255, 255, 0.09);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    --bg-glow-one: rgba(212, 162, 106, 0.12);
    --bg-glow-two: rgba(112, 127, 130, 0.09);
    --shape-one: rgba(212, 162, 106, 0.12);
    --shape-two: rgba(126, 147, 151, 0.08);
}

[data-theme='light'] {
    color-scheme: light;
    --bg: #f7f2ea;
    --bg-alt: #efe7dc;
    --surface: rgba(255, 252, 247, 0.92);
    --surface-strong: #fffaf3;
    --surface-soft: rgba(32, 26, 18, 0.03);
    --text: #1f1a15;
    --muted: #6d6358;
    --accent: #9a6030;
    --accent-strong: #7c4c24;
    --border: rgba(32, 26, 18, 0.11);
    --shadow: 0 22px 54px rgba(55, 38, 19, 0.12);
    --bg-glow-one: rgba(184, 129, 72, 0.1);
    --bg-glow-two: rgba(164, 148, 126, 0.08);
    --shape-one: rgba(184, 129, 72, 0.08);
    --shape-two: rgba(164, 148, 126, 0.07);
}

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

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Onest', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 14%, var(--bg-glow-one), transparent 32%),
        radial-gradient(circle at 92% 10%, var(--bg-glow-two), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 22%),
        linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
    line-height: 1.6;
    min-height: 100vh;
}

.bg-shape {
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    z-index: -2;
    filter: blur(18px);
}

.bg-shape-one {
    width: 420px;
    height: 420px;
    background: var(--shape-one);
    top: -150px;
    right: -120px;
}

.bg-shape-two {
    width: 360px;
    height: 360px;
    background: var(--shape-two);
    bottom: -110px;
    left: -120px;
}

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

img,
video {
    max-width: 100%;
}

.site-header {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 18px clamp(16px, 4vw, 42px);
    display: flex;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: linear-gradient(180deg, rgba(13, 15, 16, 0.78), rgba(13, 15, 16, 0.35));
    border-bottom: 1px solid var(--border);
}

[data-theme='light'] .site-header {
    background: linear-gradient(180deg, rgba(247, 242, 234, 0.86), rgba(247, 242, 234, 0.42));
}

.logo {
    display: inline-flex;
    align-items: baseline;
    color: var(--text);
    white-space: nowrap;
}

.brand-name {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    line-height: 1;
}

.brand-primary {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-secondary {
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.main-nav a {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--text);
}

.theme-switch {
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    border-radius: 999px;
    padding: 11px 15px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-switch:hover {
    border-color: rgba(212, 162, 106, 0.35);
    background: rgba(212, 162, 106, 0.12);
    transform: translateY(-1px);
}

.section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 20px 64px;
    animation: lift 0.55s ease both;
}

.section-kicker,
.hero-tag {
    display: inline-block;
    margin: 0 0 14px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
}

.section-intro,
.section-head {
    margin-bottom: 20px;
}

.section-intro {
    max-width: 820px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
}

.section-intro p:last-child,
.section-head p:last-child {
    color: var(--muted);
    margin: 0;
}

h1,
h2,
h3 {
    margin-top: 0;
    font-family: 'Roboto Condensed', sans-serif;
    line-height: 1.08;
    letter-spacing: 0.01em;
}

h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);
    margin-bottom: 18px;
    max-width: 11ch;
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.8rem);
    margin-bottom: 14px;
}

h3 {
    font-size: 1.28rem;
    margin-bottom: 10px;
}

p {
    margin-top: 0;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.78fr);
    gap: 22px;
    align-items: start;
    padding-top: 34px;
}

.hero-content,
.hero-panel,
.card,
.post-card,
.empty-state,
.contacts,
.admin-card,
.notice,
.assistant-shell,
.post-content,
.media-item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--surface);
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

[data-theme='light'] .hero-content,
[data-theme='light'] .hero-panel,
[data-theme='light'] .card,
[data-theme='light'] .post-card,
[data-theme='light'] .empty-state,
[data-theme='light'] .contacts,
[data-theme='light'] .admin-card,
[data-theme='light'] .notice,
[data-theme='light'] .assistant-shell,
[data-theme='light'] .post-content,
[data-theme='light'] .media-item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.74));
}

.hero-content {
    padding: 36px;
    position: relative;
    overflow: hidden;
}

.hero-content::after {
    content: '';
    position: absolute;
    inset: auto -60px -90px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 162, 106, 0.22) 0%, rgba(212, 162, 106, 0) 72%);
    pointer-events: none;
}

.hero-panel {
    padding: 28px;
}

.hero-text {
    max-width: 60ch;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero-actions .btn-primary,
.hero-actions .btn-secondary {
    min-width: 242px;
}

.hero-metrics {
    display: grid;
    gap: 14px;
}

.metric {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-soft);
}

.metric span,
.process-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--bg);
    background: var(--accent);
}

.metric h2 {
    font-size: 1.24rem;
    margin-bottom: 8px;
}

.metric p {
    margin-bottom: 0;
    color: var(--muted);
}

.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #17120d;
    background: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-strong);
}

.btn-secondary {
    border-color: var(--border);
    background: var(--surface-soft);
}

.btn-secondary:hover {
    border-color: rgba(212, 162, 106, 0.35);
}

.btn-danger {
    background: #bb5a45;
    color: #fff;
}

.service-grid,
.process-grid,
.post-grid,
.seo-copy {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card,
.admin-card,
.empty-state,
.contacts,
.post-content {
    padding: 24px;
}

.card {
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(212, 162, 106, 0.45), transparent 72%);
}

.card p,
.process-card p,
.post-body p,
.assistant-head p,
.contacts-grid span,
.faq-item p {
    color: var(--muted);
}

.process-card {
    min-height: 100%;
}

.post-card {
    overflow: hidden;
}

.post-cover {
    display: block;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, rgba(212, 162, 106, 0.12), rgba(255, 255, 255, 0.02));
}

.post-cover img,
.post-cover video,
.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-cover-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 700;
}

.post-body {
    padding: 20px;
}

.post-date {
    margin: 0 0 8px;
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

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

.seo-copy {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.seo-block {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: var(--surface-soft);
}

.faq-list {
    display: grid;
    gap: 14px;
}

.faq-item {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.faq-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.assistant {
    padding-top: 6px;
}

.assistant-shell {
    overflow: hidden;
}

.assistant-head {
    padding: 24px 24px 14px;
    border-bottom: 1px solid var(--border);
}

.assistant-messages {
    max-height: 360px;
    overflow-y: auto;
    padding: 18px 24px;
    display: grid;
    gap: 10px;
}

.assistant-msg {
    max-width: min(84%, 760px);
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-strong);
}

.assistant-msg-user {
    margin-left: auto;
}

.assistant-msg-bot {
    margin-right: auto;
}

.assistant-msg-label {
    margin-bottom: 5px;
    font-size: 0.78rem;
    color: var(--muted);
}

.assistant-msg-body {
    white-space: pre-wrap;
}

.assistant-form {
    border-top: 1px solid var(--border);
    padding: 16px;
    display: grid;
    gap: 8px;
}

.assistant-form textarea,
.admin-form input[type='text'],
.admin-form input[type='password'],
.admin-form textarea,
.admin-form input[type='file'] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-strong);
    color: var(--text);
    padding: 13px 14px;
    min-height: 54px;
    font: inherit;
}

.assistant-form textarea {
    min-height: 110px;
    resize: vertical;
}

.assistant-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.assistant-status,
.hint {
    color: var(--muted);
    font-size: 0.92rem;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.contacts-grid p {
    margin: 0;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.contacts-grid strong,
.contacts-grid span {
    display: block;
}

.contacts-grid strong {
    margin-bottom: 8px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.05rem;
}

.contact-channels {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.contact-channel {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 60%),
        var(--surface-soft);
    display: grid;
    gap: 16px;
}

.contact-channel-head {
    display: flex;
    align-items: start;
    gap: 14px;
}

.contact-channel-badge {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 50px;
    background: rgba(212, 162, 106, 0.16);
    border: 1px solid rgba(212, 162, 106, 0.24);
    color: var(--accent);
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.contact-channel strong {
    display: block;
    margin-bottom: 6px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.16rem;
}

.contact-channel p {
    margin: 0;
    color: var(--muted);
}

.contact-channel-link {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--surface);
}

.contact-channel-link.is-disabled {
    color: var(--muted);
    border-style: dashed;
    cursor: default;
}

.contact-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 24;
    pointer-events: none;
}

.contact-float-shell {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.contact-float-caption {
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(17, 20, 22, 0.82);
    backdrop-filter: blur(14px);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

[data-theme='light'] .contact-float-caption {
    background: rgba(255, 250, 243, 0.88);
}

.contact-fab {
    pointer-events: auto;
    min-height: 60px;
    padding: 10px 12px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    background: rgba(17, 20, 22, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

[data-theme='light'] .contact-fab {
    background: rgba(255, 250, 243, 0.9);
}

.contact-fab:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 162, 106, 0.3);
}

.contact-fab-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    color: #fff;
}

.contact-fab-icon svg {
    width: 20px;
    height: 20px;
}

.contact-fab-telegram .contact-fab-icon {
    background: linear-gradient(135deg, #2ca6ef, #0b74c9);
}

.contact-fab-max .contact-fab-icon {
    background: linear-gradient(135deg, #2d3136, #141719);
}

[data-theme='light'] .contact-fab-max .contact-fab-icon {
    background: linear-gradient(135deg, #645646, #2d241b);
}

.contact-fab-meta {
    display: grid;
    gap: 2px;
    min-width: 108px;
}

.contact-fab-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1rem;
    line-height: 1;
}

.contact-fab-note {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.15;
}

.error-page {
    overflow-x: hidden;
}

.error-shell {
    min-height: calc(100vh - 160px);
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.85fr);
    gap: 28px;
    align-items: center;
    padding-top: 38px;
}

.error-copy,
.error-illustration {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.error-copy {
    padding: 32px;
}

.error-code {
    margin: 0 0 12px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: clamp(4rem, 10vw, 7.4rem);
    line-height: 0.9;
    letter-spacing: 0.06em;
    color: var(--accent);
}

.error-copy h1 {
    max-width: 11ch;
    margin-bottom: 14px;
}

.error-text {
    max-width: 58ch;
    color: var(--muted);
    font-size: 1.02rem;
}

.error-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.error-illustration {
    padding: 28px;
    min-height: 520px;
    display: grid;
    align-items: center;
    justify-items: center;
}

.broken-house {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 1 / 1.04;
}

.broken-house-roof {
    position: absolute;
    left: 50%;
    top: 6%;
    width: 72%;
    height: 26%;
    background: linear-gradient(180deg, #d8ab79, #af7044);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    transform: translateX(-50%) rotate(-1deg);
    border-radius: 20px 20px 6px 6px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
}

.broken-house-body {
    position: absolute;
    left: 50%;
    bottom: 11%;
    width: 68%;
    height: 54%;
    transform: translateX(-50%) rotate(-1deg);
    border-radius: 26px;
    background:
        linear-gradient(90deg, rgba(54, 35, 19, 0.16), rgba(255, 255, 255, 0) 40%),
        linear-gradient(180deg, #f1decb, #dac1aa);
    border: 1px solid rgba(124, 76, 36, 0.12);
    box-shadow: inset 0 -18px 28px rgba(95, 61, 35, 0.08);
}

.broken-house-body::before {
    content: '';
    position: absolute;
    inset: 14px;
    border-radius: 18px;
    background:
        linear-gradient(90deg, transparent 0, transparent 31%, rgba(135, 94, 58, 0.18) 31%, rgba(135, 94, 58, 0.18) 34%, transparent 34%, transparent 66%, rgba(135, 94, 58, 0.18) 66%, rgba(135, 94, 58, 0.18) 69%, transparent 69%),
        linear-gradient(180deg, transparent 0, transparent 23%, rgba(135, 94, 58, 0.18) 23%, rgba(135, 94, 58, 0.18) 26%, transparent 26%, transparent 52%, rgba(135, 94, 58, 0.18) 52%, rgba(135, 94, 58, 0.18) 55%, transparent 55%, transparent 80%, rgba(135, 94, 58, 0.18) 80%, rgba(135, 94, 58, 0.18) 83%, transparent 83%);
    opacity: 0.8;
}

.broken-house-window,
.broken-house-door,
.broken-house-crack,
.broken-brick,
.broken-dust {
    position: absolute;
}

.broken-house-window {
    top: 23%;
    width: 19%;
    height: 18%;
    border-radius: 12px;
    background: linear-gradient(180deg, #8ca9b5, #476571);
    border: 4px solid rgba(121, 82, 48, 0.34);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.broken-house-window-left {
    left: 15%;
}

.broken-house-window-right {
    right: 15%;
}

.broken-house-door {
    left: 50%;
    bottom: 0;
    width: 22%;
    height: 34%;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, #7b5334, #54331b);
    box-shadow: inset -8px 0 0 rgba(255, 255, 255, 0.08);
}

.broken-house-crack {
    background: #8a5a32;
    opacity: 0.9;
}

.broken-house-crack-main {
    left: 48%;
    top: 8%;
    width: 5px;
    height: 58%;
    transform: rotate(14deg);
    clip-path: polygon(43% 0, 66% 12%, 20% 20%, 77% 34%, 35% 44%, 69% 58%, 18% 72%, 61% 84%, 38% 100%, 0 86%, 29% 68%, 0 54%, 28% 39%, 2% 22%, 30% 10%);
}

.broken-house-crack-side {
    left: 28%;
    top: 33%;
    width: 4px;
    height: 24%;
    transform: rotate(-34deg);
    clip-path: polygon(50% 0, 100% 18%, 28% 36%, 82% 58%, 18% 80%, 54% 100%, 0 84%, 36% 64%, 0 40%, 36% 18%);
}

.broken-brick {
    width: 52px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(180deg, #cc8a58, #9c5f37);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.14);
}

.broken-brick-one {
    right: 2%;
    top: 30%;
    transform: rotate(18deg);
}

.broken-brick-two {
    left: 4%;
    bottom: 13%;
    transform: rotate(-14deg);
}

.broken-brick-three {
    right: 13%;
    bottom: 4%;
    width: 46px;
    transform: rotate(11deg);
}

.broken-dust {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(212, 162, 106, 0.3);
}

.broken-dust-one {
    left: 10%;
    top: 16%;
}

.broken-dust-two {
    right: 10%;
    top: 18%;
}

.broken-dust-three {
    right: 25%;
    bottom: 18%;
}

.error-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.96rem;
    letter-spacing: 0.04em;
}

.site-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4px 20px 34px;
    color: var(--muted);
    text-align: center;
}

.site-footer p {
    margin: 0 auto;
    max-width: 860px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.post-page h1 {
    margin-bottom: 10px;
    max-width: 16ch;
}

.post-summary {
    max-width: 70ch;
    color: var(--muted);
    margin-top: 0;
}

.media-grid {
    margin: 26px 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.media-item {
    margin: 0;
    overflow: hidden;
    min-height: 320px;
}

.post-content {
    max-width: 920px;
}

.admin-shell {
    padding-top: 8px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
    align-items: start;
}

.admin-form {
    display: grid;
    gap: 12px;
}

.admin-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.admin-form textarea {
    resize: vertical;
}

.notice {
    padding: 14px 16px;
    margin: 0 0 12px;
}

.notice.success {
    border-color: rgba(98, 176, 120, 0.45);
}

.notice.error {
    border-color: rgba(202, 107, 90, 0.55);
}

.admin-post-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.admin-post-list li {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
    background: var(--surface-soft);
}

.admin-post-list p {
    margin: 5px 0;
    color: var(--muted);
    font-size: 0.9rem;
}

code {
    font-family: Consolas, monospace;
}

@keyframes lift {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .hero,
    .service-grid,
    .process-grid,
    .post-grid,
    .seo-copy,
    .admin-grid,
    .contacts-grid,
    .contact-channels,
    .error-shell,
    .media-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 860px) {
    .main-nav {
        display: none;
    }

    .site-header {
        justify-content: space-between;
    }

    h1 {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .site-header,
    .section,
    .site-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero-content,
    .hero-panel,
    .card,
    .admin-card,
    .empty-state,
    .contacts,
    .error-copy,
    .error-illustration,
    .post-body,
    .post-content,
    .seo-block {
        padding: 18px;
    }

    .assistant-head,
    .assistant-messages {
        padding-left: 16px;
        padding-right: 16px;
    }

    .assistant-msg {
        max-width: 100%;
    }

    .assistant-form-row,
    .hero-actions,
    .error-actions,
    .contact-channel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .theme-switch,
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
    }

    .site-header {
        gap: 10px;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .logo {
        line-height: 1;
    }

    .brand-name {
        gap: 0.36rem;
    }

    .brand-primary {
        font-size: 1.56rem;
    }

    .brand-secondary {
        font-size: 0.62rem;
        letter-spacing: 0.2em;
    }

    .theme-switch {
        width: auto;
        min-width: 152px;
        padding: 10px 14px;
        min-height: 44px;
        flex: 0 0 auto;
    }

    .media-item {
        min-height: 220px;
    }

    .contact-channel {
        padding: 18px;
    }

    .contact-channel-badge {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .contact-channel-link {
        width: 100%;
    }

    .contact-float {
        right: 12px;
        bottom: 12px;
        left: auto;
    }

    .contact-float-shell {
        justify-items: end;
        gap: 8px;
    }

    .contact-float-caption {
        display: none;
    }

    .contact-fab {
        width: 54px;
        min-height: 54px;
        padding: 7px;
        border-radius: 18px;
        justify-content: center;
        gap: 0;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    }

    .contact-fab-meta {
        display: none;
    }

    .contact-fab-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 13px;
    }

    .error-shell {
        min-height: auto;
        padding-top: 26px;
    }

    .error-code {
        font-size: clamp(3.2rem, 17vw, 5rem);
    }

    .error-illustration {
        min-height: auto;
    }

    .broken-house {
        width: min(100%, 290px);
    }

    .site-footer {
        padding-top: 0;
        padding-bottom: 22px;
        text-align: left;
    }

    .site-footer p {
        max-width: none;
        padding: 12px 2px 0;
        border-top: 0;
        font-size: 0.98rem;
        line-height: 1.55;
    }
}

@media (max-width: 380px) {
    .site-header {
        gap: 8px;
    }

    .logo {
        max-width: 150px;
    }

    .brand-name {
        gap: 0.28rem;
        flex-wrap: wrap;
    }

    .brand-primary {
        font-size: 1.34rem;
    }

    .brand-secondary {
        font-size: 0.56rem;
        letter-spacing: 0.16em;
    }

    .theme-switch {
        min-width: 138px;
        padding-left: 12px;
        padding-right: 12px;
        font-size: 0.95rem;
    }

    .contact-float {
        right: 10px;
        bottom: 10px;
    }

    .contact-fab {
        width: 50px;
        min-height: 50px;
        padding: 6px;
        border-radius: 16px;
    }

    .contact-fab-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .broken-house {
        width: min(100%, 250px);
    }
}
