/* ===== Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:ital@1&display=swap');

/* ===== Tokens ===== */
:root {
    --bg: #12151B;
    --surface: #1A1F27;
    --surface-raised: #212733;
    --accent: #B08D57;
    --accent-soft: #8A7048;
    --text: #E7E3DA;
    --text-muted: #97A0AC;
    --border: #2A313C;
    --border-strong: #3A4350;
    --font-display: 'PT Serif', Georgia, serif;
    --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --container: 1120px;
    --radius: 6px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 0.5em;
}

h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
}

h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

h3 {
    font-size: 1.3rem;
}

p {
    color: var(--text-muted);
    margin: 0 0 1em;
}

a {
    color: var(--accent);
    text-decoration: none;
}

    a:hover {
        color: var(--accent-soft);
    }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Focus visibility ===== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ===== Header / Nav ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(18, 21, 27, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    max-width: var(--container);
    margin: 0 auto;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text);
    letter-spacing: 0.02em;
}

    .logo span {
        color: var(--accent);
    }

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .nav-links a {
        color: var(--text-muted);
        font-size: 0.95rem;
        font-weight: 500;
    }

        .nav-links a:hover,
        .nav-links a.active {
            color: var(--text);
        }

.nav-cta {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

    .nav-cta:hover {
        background: var(--accent);
        color: var(--bg);
    }

/* ===== Code strip (signature element) ===== */
.code-strip {
    display: flex;
    gap: 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

    .code-strip span {
        padding: 0 14px;
        border-left: 1px solid var(--border-strong);
    }

        .code-strip span:first-child {
            border-left: none;
            padding-left: 0;
        }

/* ===== Hero ===== */
.hero {
    padding: 100px 0 70px;
    border-bottom: 1px solid var(--border);
}

    .hero .code-strip {
        margin-bottom: 28px;
    }

    .hero h1 {
        max-width: 780px;
    }

    .hero .lead {
        max-width: 560px;
        font-size: 1.1rem;
        margin-top: 20px;
    }

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 36px;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 13px 26px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

    .btn-primary:hover {
        background: var(--accent-soft);
        color: var(--bg);
    }

.btn-secondary {
    border-color: var(--border-strong);
    color: var(--text);
}

    .btn-secondary:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

/* ===== Section ===== */
.section {
    padding: 80px 0;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

/* ===== Service cards ===== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 40px;
}

.service-card {
    background: var(--surface);
    padding: 32px 28px;
    transition: background 0.2s ease;
}

    .service-card:hover {
        background: var(--surface-raised);
    }

    .service-card .code-ref {
        font-family: var(--font-mono);
        font-size: 0.75rem;
        color: var(--accent);
        letter-spacing: 0.06em;
    }

    .service-card h3 {
        margin-top: 10px;
    }

    .service-card a.more {
        font-size: 0.88rem;
        font-weight: 500;
    }

/* ===== Footer ===== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 48px 0;
    margin-top: 60px;
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

    .footer-wrap p {
        margin: 0;
        font-size: 0.88rem;
    }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
    .hero {
        padding: 70px 0 50px;
    }

    .footer-wrap {
        flex-direction: column;
    }
}
/* ===== News grid ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

    .news-card:hover {
        border-color: var(--accent);
        transform: translateY(-2px);
    }

.news-card-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--surface-raised);
}

.news-card-image--empty {
    background: linear-gradient(135deg, var(--surface-raised), var(--bg));
}

.news-card-body {
    padding: 20px;
}

.news-card-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
}

.news-card-body h3 {
    margin: 8px 0;
    font-size: 1.1rem;
}

.news-card-body p {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 100;
    padding: 24px;
}

    .modal-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 36px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

    .modal-close:hover {
        color: var(--text);
    }

/* ===== Article list ===== */
.filter-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

    .filter-tab:hover {
        color: var(--text);
        border-color: var(--border-strong);
    }

    .filter-tab.active {
        background: var(--accent);
        color: var(--bg);
        border-color: var(--accent);
    }

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 32px;
    overflow: hidden;
}

.article-list-item {
    display: flex;
    gap: 20px;
    background: var(--surface);
    padding: 24px;
    align-items: center;
}

    .article-list-item:hover {
        background: var(--surface-raised);
    }

.article-list-image {
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
}

.article-list-item h3 {
    margin: 6px 0;
    color: var(--text);
}

/* ===== Article detail ===== */
.article-body,
.article-body * {
    color: var(--text);
    line-height: 1.8;
    margin-top: 16px;
    font-family: var(--font-body) !important;
}

    .article-body p {
        color: var(--text);
    }

    .article-body h2, .article-body h3 {
        margin-top: 1.4em;
    }

/* ===== Mobile ===== */
@media (max-width: 720px) {
    .article-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-list-image {
        width: 100%;
        height: 140px;
    }
}

.thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.thread-msg {
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-width: 85%;
}

.thread-msg--client {
    background: var(--surface);
    align-self: flex-start;
}

.thread-msg--lawyer {
    background: var(--surface-raised);
    align-self: flex-end;
    border-color: var(--accent);
}

.thread-msg-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.thread-msg-text {
    color: var(--text);
    white-space: pre-wrap;
}

.thread-msg-files {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thread-file {
    font-size: 0.85rem;
}

.qa-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.qa-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.qa-question {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}

.qa-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.qa-question p, .qa-answer p {
    color: var(--text);
    margin: 8px 0 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

    .hero-image::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(18,21,27,0.15), rgba(18,21,27,0.55));
        pointer-events: none;
    }

    .hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        filter: grayscale(15%) contrast(1.05);
    }

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: -1;
        max-height: 320px;
    }
}

.about-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 56px;
    align-items: start;
}

.about-photo img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    filter: grayscale(10%) contrast(1.03);
}

.about-text .lead {
    max-width: 640px;
}

@media (max-width: 720px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-photo img {
        max-width: 280px;
        margin: 0 auto;
        display: block;
    }
}

/* ===== Burger button ===== */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

    .nav-burger span {
        display: block;
        height: 2px;
        width: 100%;
        background: var(--text);
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .nav-burger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-burger.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-burger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

/* ===== Mobile dropdown ===== */
.nav-mobile {
    display: none;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

    .nav-mobile.active {
        max-height: 500px;
    }

    .nav-mobile a {
        padding: 16px 24px;
        color: var(--text-muted);
        font-size: 0.95rem;
        border-bottom: 1px solid var(--border);
    }

        .nav-mobile a:hover {
            color: var(--text);
            background: var(--surface);
        }

.nav-mobile-cta {
    color: var(--accent) !important;
    font-weight: 600;
}

/* ===== Responsive breakpoint ===== */
@media (max-width: 900px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    .nav-mobile {
        display: flex;
    }
}

.about-list {
    margin: 16px 0 28px;
    padding-left: 22px;
    max-width: 640px;
}

    .about-list li {
        color: var(--text-muted);
        margin-bottom: 10px;
        line-height: 1.6;
    }

        .about-list li strong {
            color: var(--text);
        }

.about-text h2 {
    margin-top: 32px;
}

.sample-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.sample-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

    .sample-card:hover {
        border-color: var(--accent);
        transform: translateY(-2px);
    }

.sample-preview {
    height: 160px;
    background: var(--surface-raised);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .sample-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.sample-preview-fallback span {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.sample-info {
    padding: 16px 18px;
}

    .sample-info h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .sample-info p {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

.sample-download {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
}