:root {
    --brand: #3c8fb6;
    --brand-dark: #2d6e8e;
    --brand-soft: #e8f4fa;
    --ink: #111827;
    --muted: #5f6b7c;
    --line: #e6edf3;
    --soft: #f8fbff;
    --panel: #ffffff;
    --shadow: 0 20px 52px rgba(17, 24, 39, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    overflow-x: clip;
}

img,
svg {
    display: block;
    max-width: 100%;
}

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

button,
input,
textarea {
    font: inherit;
}

.wrap {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 100;
    transform: translateY(-110%);
    padding: 12px 18px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}

.skip-link:focus {
    transform: translateY(0);
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 50;
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(60, 143, 182, 0.08);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo img {
    width: auto;
    height: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #364152;
    font-size: 14px;
    font-weight: 700;
}

.nav-links a:not(.nav-cta),
.mobile-menu a:not(.nav-cta) {
    position: relative;
}

.nav-links a:not(.nav-cta)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--brand);
    transition: width 0.24s ease;
}

.nav-links a:not(.nav-cta):hover,
.mobile-menu a:not(.nav-cta):hover {
    color: var(--brand);
}

.nav-links a:not(.nav-cta):hover::after {
    width: 100%;
}

.nav-cta,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    font-weight: 800;
}

.nav-cta {
    padding: 10px 18px;
    color: #fff;
    background: var(--brand);
}

.button {
    gap: 8px;
    padding: 15px 26px;
    border: 1px solid transparent;
}

.button.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 14px 32px rgba(60, 143, 182, 0.24);
}

.button.primary:hover {
    filter: brightness(0.96);
}

.button.secondary {
    color: var(--brand-dark);
    background: #fff;
    border-color: var(--brand);
}

.button.full {
    width: 100%;
}

.button svg,
.project-card a svg,
.map-loader span svg {
    width: 16px;
    height: 16px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: #eef7fb;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
}

.mobile-menu {
    display: none;
}

.hero {
    position: relative;
    min-height: 760px;
    display: flex;
    align-items: center;
    padding: 132px 0 88px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fdff 0%, #fff 78%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(110deg, rgba(60, 143, 182, 0.06), transparent 42%),
        repeating-linear-gradient(135deg, rgba(60, 143, 182, 0.04) 0 1px, transparent 1px 24px);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
    gap: 64px;
    align-items: center;
}

.section-label {
    display: inline-flex;
    margin: 0 0 18px;
    padding: 6px 13px;
    border: 1px solid rgba(60, 143, 182, 0.2);
    border-radius: 999px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 700px;
    margin: 0;
    font-size: 64px;
    line-height: 1.08;
    letter-spacing: 0;
}

.hero h1 span,
.stat strong {
    color: var(--brand);
}

.hero-text {
    max-width: 650px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 34px;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 28px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.trust-row span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--brand);
}

.hero-media {
    position: relative;
}

.hero-media > img {
    width: 100%;
    height: 540px;
    object-fit: cover;
    border-radius: 40px 40px 40px 80px;
    box-shadow: 0 26px 70px rgba(17, 24, 39, 0.16);
}

.hero-card {
    position: absolute;
    left: -28px;
    bottom: -34px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    width: min(340px, calc(100% - 20px));
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 52px rgba(60, 143, 182, 0.22);
}

.hero-card p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-card strong {
    display: block;
    color: var(--brand);
    font-size: 28px;
}

.hero-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.section {
    position: relative;
    padding: 104px 0;
}

.section-head {
    max-width: 700px;
    margin: 0 auto 56px;
    text-align: center;
}

.section-head h2 {
    margin: 0;
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: 0;
}

.section-head p:last-child {
    margin: 16px auto 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.project-card,
.portfolio-card,
.contact-card,
.map-card,
.case-cover,
.case-meta {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.project-card {
    min-height: 470px;
    display: flex;
    flex-direction: column;
    padding: 26px;
    border-top: 4px solid var(--brand);
    border-radius: 26px;
}

.project-badge {
    align-self: flex-start;
    margin: 0 0 22px;
    padding: 6px 10px;
    border: 1px solid rgba(60, 143, 182, 0.16);
    border-radius: 999px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: var(--brand);
}

.icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon.small {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #eef7fb;
}

.project-card h3 {
    margin: 22px 0 12px;
    font-size: 22px;
    line-height: 1.2;
}

.project-card p:not(.project-badge) {
    margin: 0;
    color: var(--muted);
    line-height: 1.62;
}

.project-card ul {
    list-style: none;
    display: grid;
    gap: 11px;
    padding: 0;
    margin: 24px 0;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.project-card li,
.case-meta li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.project-card li svg,
.case-meta li svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    padding: 3px;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 50%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-card a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 900;
}

.project-card a svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stats {
    padding: 52px 0;
    border-block: 1px solid var(--line);
    background: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat {
    text-align: center;
    padding: 18px;
    border-right: 1px solid var(--line);
}

.stat:last-child {
    border-right: 0;
}

.stat strong {
    display: block;
    font-size: 40px;
    line-height: 1;
}

.stat span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.portfolio-section,
.contact-section,
.case-page {
    background: var(--soft);
}

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

.portfolio-link {
    display: block;
    color: inherit;
}

.portfolio-card {
    overflow: hidden;
    border-radius: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portfolio-link:hover .portfolio-card {
    transform: translateY(-6px);
    box-shadow: 0 24px 62px rgba(17, 24, 39, 0.13);
}

.window-bar {
    min-height: 46px;
    display: grid;
    grid-template-columns: repeat(3, 12px) 1fr;
    align-items: center;
    gap: 7px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.window-bar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.window-bar span:nth-child(1) {
    background: #ff5f56;
}

.window-bar span:nth-child(2) {
    background: #ffbd2e;
}

.window-bar span:nth-child(3) {
    background: #27c93f;
}

.window-bar em {
    justify-self: center;
    color: #95a1b2;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.portfolio-image {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    padding: 32px;
    overflow: hidden;
    background: #fff;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.portfolio-link:hover .portfolio-image img {
    transform: scale(1.06);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    padding: 24px;
    color: #fff;
    text-align: center;
    background: rgba(60, 143, 182, 0.72);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.portfolio-overlay span {
    display: inline-flex;
    padding: 8px 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 900;
}

.portfolio-link:hover .portfolio-overlay {
    opacity: 1;
}

.refs-section {
    overflow: hidden;
    background: #fff;
}

.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
    width: max-content;
    display: flex;
    animation: marquee 34s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-item {
    width: 288px;
    height: 144px;
    display: grid;
    place-items: center;
    padding: 20px;
}

.marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(1) opacity(0.68);
    transition: filter 0.25s ease, transform 0.25s ease;
}

.marquee-item img:hover {
    filter: grayscale(0) opacity(1);
    transform: scale(1.04);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-bottom: 56px;
}

.contact-card {
    display: grid;
    gap: 30px;
    padding: 34px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.contact-card h3 {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.contact-card p,
.contact-card a {
    display: block;
    margin: 2px 0;
    font-weight: 900;
    line-height: 1.45;
}

.map-card {
    height: 420px;
    overflow: hidden;
    border-radius: 32px;
}

.map-loader {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: var(--ink);
    background: #e8eef4;
}

.map-loader img,
.map-card iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    filter: grayscale(1) contrast(1.12);
}

.map-loader::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.32);
}

.map-loader span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 999px;
    background: #fff;
    box-shadow: var(--shadow);
    font-weight: 900;
}

.map-loader span svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-footer {
    padding: 48px 0;
    color: #d1d5db;
    background: var(--ink);
}

.footer-wrap {
    display: grid;
    justify-items: center;
    gap: 22px;
    text-align: center;
}

.footer-wrap img {
    width: auto;
    height: 40px;
}

.footer-wrap nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    font-size: 14px;
    font-weight: 800;
}

.footer-wrap p {
    margin: 0;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.footer-wrap small {
    max-width: 860px;
    color: #9ca3af;
    line-height: 1.7;
}

.case-shell {
    position: relative;
    padding: 132px 0 104px;
    overflow: clip;
    background: #fff;
}

.case-back {
    margin-bottom: 28px;
}

.case-back a {
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 900;
}

.case-header {
    margin-bottom: 44px;
}

.case-header h1 {
    margin: 0;
    font-size: 56px;
    line-height: 1.08;
    letter-spacing: 0;
}

.case-header p:last-child {
    max-width: 780px;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.7;
}

.case-cover {
    overflow: hidden;
    margin-bottom: 64px;
    border-radius: 32px;
}

.case-cover-image {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    padding: 54px;
    background: #fff;
}

.case-cover-image img {
    width: 100%;
    max-height: 430px;
    object-fit: contain;
}

.case-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 56px;
    align-items: start;
}

.case-content h2 {
    position: relative;
    margin: 48px 0 18px;
    padding-left: 20px;
    font-size: 30px;
    line-height: 1.2;
}

.case-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 28px;
    border-radius: 999px;
    background: var(--brand);
}

.case-content h2:first-child {
    margin-top: 0;
}

.case-content p,
.case-content li {
    color: #4b5563;
    font-size: 18px;
    line-height: 1.75;
}

.case-content ul {
    display: grid;
    gap: 10px;
    padding-left: 24px;
}

.case-content strong {
    color: var(--ink);
}

.case-meta {
    position: sticky;
    top: 104px;
    display: grid;
    gap: 24px;
    padding: 28px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.84);
}

.case-meta p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.case-meta strong {
    line-height: 1.45;
}

.case-meta ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal {
    transform: translateY(24px);
}

.reveal-left {
    transform: translateX(-24px);
}

.reveal-right {
    transform: translateX(24px);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: none;
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 1060px) {
    .hero-grid,
    .project-grid,
    .case-layout {
        grid-template-columns: 1fr 1fr;
    }

    .portfolio-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        max-width: 760px;
        margin-inline: auto;
    }
}

@media (max-width: 760px) {
    .wrap {
        width: min(100% - 28px, 1180px);
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-menu.open {
        display: grid;
        gap: 10px;
        padding: 10px 20px 18px;
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid var(--line);
        font-weight: 800;
    }

    .mobile-menu .nav-cta {
        color: #fff;
    }

    .hero {
        min-height: auto;
        padding: 112px 0 70px;
    }

    .hero-grid,
    .project-grid,
    .stats-grid,
    .case-layout {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-text,
    .case-header p:last-child {
        font-size: 18px;
    }

    .hero-media > img {
        height: 390px;
        border-radius: 28px 28px 28px 56px;
    }

    .hero-card {
        position: static;
        width: 100%;
        margin: 16px auto 0;
    }

    .section {
        padding: 74px 0;
    }

    .section-head {
        margin-bottom: 40px;
    }

    .section-head h2,
    .case-header h1 {
        font-size: 36px;
    }

    .stats-grid {
        gap: 0;
    }

    .stat {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .stat:last-child {
        border-bottom: 0;
    }

    .contact-card {
        padding: 26px;
    }

    .contact-item {
        gap: 14px;
    }

    .map-card {
        height: 320px;
        border-radius: 24px;
    }

    .case-shell {
        padding-top: 112px;
    }

    .case-cover {
        margin-bottom: 44px;
    }

    .case-cover-image {
        padding: 24px;
    }

    .case-meta {
        position: static;
    }
}
