:root {
    --blue: #1e88e5;
    --green: #2e7d32;
    --ink: #1f2937;
    --light: #f8fafc;
    --muted: #64748b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: var(--ink);
    background: #f8fafc;
    line-height: 1.5;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.topbar {
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid #dbe3ee;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 14px 0;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 36px;
    height: 36px;
}

.brand-icon circle {
    fill: #e8f5e9;
    stroke: var(--green);
    stroke-width: 2;
}

.brand-icon path {
    fill: #f59e0b;
}

.brand-icon rect:first-of-type {
    fill: #475569;
}

.brand-icon rect:last-of-type {
    fill: #94a3b8;
}

.brand-text {
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--blue);
    font-size: 22px;
}

.brand-first {
    color: #dc2626;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
}

.site-nav a {
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    font-size: 15px;
    padding: 8px 11px;
    border-radius: 999px;
}

.site-nav a:hover {
    color: var(--blue);
    background: #e8f1fd;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.menu-toggle:focus-visible {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    gap: 4px;
    flex-direction: column;
}

.menu-toggle .bar {
    width: 18px;
    height: 2px;
    background: #0f172a;
    border-radius: 999px;
}

.hero {
    background: linear-gradient(120deg, #deecfb 0%, #e6f8ea 65%, #f0f8ff 100%);
    padding: 18px 0;
    border-bottom: 1px solid #dbe3ee;
}

.hero-inner h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 5vw, 44px);
}

.hero-inner p {
    margin: 0;
    color: #0f172a;
    max-width: 700px;
}

.hero-copy {
    margin-top: 8px;
    max-width: 980px;
    font-size: 15px;
}

.hero-copy p {
    margin: 0 0 6px;
}

.hero-copy p:last-child {
    margin-bottom: 0;
}

.section {
    padding: 56px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    margin-bottom: 16px;
}

.section h2 {
    margin-top: 0;
    margin-bottom: 0;
}

.section-alt { background: var(--light); }

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.cards article {
    background: #fff;
    border: 1px solid #dce6f2;
    padding: 14px;
    border-radius: 12px;
}

.service-card {
    background: #fff;
    border: 1px solid #dce6f2;
    border-left: 4px solid var(--blue);
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    display: grid;
    gap: 8px;
    color: inherit;
    box-shadow: 0 8px 20px rgba(30, 136, 229, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.service-card strong {
    color: var(--blue);
    font-size: 14px;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(30, 136, 229, .14);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.portfolio-card {
    background: #fff;
    border: 1px solid #dce6f2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
    width: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-media {
    border: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    display: block;
    background: #fff;
    cursor: zoom-in;
    text-align: center;
    height: 240px;
}

.portfolio-card > img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    display: block;
    background: #fff;
}

.portfolio-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #fff;
}

.portfolio-body {
    padding: 14px;
}

.portfolio-body h3 {
    margin: 0 0 6px;
}

.meta {
    color: var(--muted);
    font-size: 14px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.two-col iframe {
    width: 100%;
    min-height: 320px;
    border: 0;
    border-radius: 10px;
}

.contact-form {
    display: grid;
    gap: 12px;
    max-width: 760px;
    background: #fff;
    border: 1px solid #dce6f2;
    border-radius: 14px;
    padding: 16px;
}

.contact-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
}

.contact-form button {
    width: fit-content;
    background: var(--blue);
    color: #fff;
    border: 0;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(30, 136, 229, .2);
}

.consent {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ok { color: #166534; }
.err { color: #991b1b; }

.footer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 26px 0;
    font-size: 14px;
}

.cta-link {
    text-decoration: none;
    background: #0f172a;
    color: #fff;
    padding: 9px 13px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inline-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--blue);
    text-decoration: none;
    font-weight: 700;
}

.portfolio-page {
    display: grid;
    gap: 16px;
    width: 100%;
}

.portfolio-page .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.portfolio-page .portfolio-card {
    max-width: none;
}

.portfolio-hero-card {
    background: linear-gradient(120deg, #ffffff, #eef6ff);
    border: 1px solid #dbe7f4;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.breadcrumb {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--muted);
}

.portfolio-summary {
    margin: 6px 0 0;
    color: #334155;
}

.portfolio-filter {
    background: #f8fafc;
    border: 1px solid #dce6f2;
    border-radius: 12px;
    padding: 10px;
    width: 100%;
}

.empty-state {
    background: #fff;
    border: 1px solid #dce6f2;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
}

.empty-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.empty-state h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.empty-state p {
    margin: 0 0 14px;
    color: #475569;
}

.portfolio-bottom-cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 18px;
}

.lightbox.is-open {
    display: flex;
}

.lightbox-figure {
    margin: 0;
    width: min(980px, 92vw);
    height: min(78vh, 760px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(78vh - 44px);
    object-fit: contain;
    background: rgba(255, 255, 255, .02);
    border-radius: 12px;
}

.lightbox-caption {
    color: #e2e8f0;
    text-align: center;
    padding-top: 10px;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.lightbox-close {
    top: 14px;
    right: 14px;
}

.lightbox-nav.prev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-nav.next {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
    width: 100%;
}

.chip {
    text-decoration: none;
    color: #0f172a;
    background: #e2e8f0;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.chip-active {
    background: linear-gradient(120deg, #1e88e5, #2e7d32);
    color: #fff;
}

.footer p { margin: 4px 0; }

@media (max-width: 1100px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-page .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; }
    .section-head { align-items: start; flex-direction: column; }

    .portfolio-grid,
    .portfolio-page .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        justify-items: center;
    }

    .portfolio-page .portfolio-card {
        max-width: 420px;
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .container { width: min(1100px, 94%); }

    .topbar-wrap {
        align-items: center;
        padding: 10px 0;
        gap: 10px;
    }

    .brand {
        margin-right: auto;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-nav {
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 6px;
        padding-top: 2px;
        margin-left: 0;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        font-size: 14px;
        padding: 9px 10px;
        background: #f1f5f9;
        width: 100%;
        border-radius: 10px;
    }

    .hero {
        padding: 14px 0;
    }

    .hero-inner h1 {
        font-size: clamp(26px, 8vw, 34px);
        line-height: 1.2;
    }

    .hero-inner p {
        font-size: 15px;
    }

    .hero-copy {
        font-size: 14px;
    }

    .section {
        padding: 38px 0;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .portfolio-card > img,
    .portfolio-media img {
        height: 230px;
    }

    .contact-form {
        padding: 14px;
    }

    .contact-form button {
        width: 100%;
        text-align: center;
    }

    .chips {
        gap: 8px;
        margin-bottom: 0;
    }

    .chip {
        font-size: 13px;
        padding: 10px 12px;
        white-space: normal;
    }

    .portfolio-filter .chips {
        flex-wrap: wrap;
        overflow: visible;
        justify-content: flex-start;
    }

    .empty-state {
        text-align: left;
    }

    .lightbox {
        padding: 12px;
    }

    .lightbox-figure {
        width: 100%;
        height: 72vh;
    }

    .lightbox-close,
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 20px;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
    }

    .hero {
        padding: 12px 0;
    }

    .hero-inner p {
        font-size: 14px;
    }

    .hero-copy {
        font-size: 13px;
    }

    .section h2 {
        font-size: 24px;
    }

    .portfolio-page .portfolio-card {
        max-width: 100%;
    }

    .portfolio-card > img,
    .portfolio-media img {
        height: 210px;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 9px 10px;
    }
}
