:root {
    --bg: #ffffff;
    --bg-muted: #f0f0f0;
    --surface: #ffffff;
    --text: #000000;
    --text-muted: #666666;
    --text-soft: #969696;
    --border: #d9d9d9;
    --max-width: 1760px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-pill: 999px;
    --space-1: 0.4rem;
    --space-2: 0.75rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 3rem;
    --space-7: 5rem;
}

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

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

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

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

.container {
    width: min(var(--max-width), calc(100% - 10rem));
    margin-inline: auto;
}

.section {
    padding: 5rem 0;
}

.section-tight {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.section-muted {
    background: var(--bg-muted);
}

h1,
h2,
h3 {
    margin: 0 0 var(--space-3);
    line-height: 1.12;
}

h1 {
    font-size: clamp(2.3rem, 4.4vw, 4rem);
    letter-spacing: 0;
    font-weight: 500;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.65rem, 2.8vw, 2.5rem);
    letter-spacing: 0;
    font-weight: 500;
    line-height: 1.4;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
}

.eyebrow {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 22.4px;
    letter-spacing: 0;
}

.lead {
    margin: 0;
    color: var(--text-muted);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    max-width: 62ch;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 64px;
    min-height: 57.2px;
    padding: 0.95rem 2rem;
    border: 1px solid transparent;
    background: var(--text);
    color: #fff;
    font-weight: 500;
    font-size: 18px;
    line-height: 25.2px;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

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

.btn-with-icon::after {
    content: "↗";
    font-size: 16px;
    line-height: 1;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 999;
    background: #fff;
    border: 1px solid var(--text);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
}

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 90px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    justify-self: start;
    font-size: 18px;
    font-weight: 600;
    line-height: 25.2px;
    text-transform: lowercase;
}

.main-nav {
    justify-self: center;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2.45rem;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 18px;
    line-height: 25.2px;
}

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

.remix-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 41.2px;
    padding: 0.45rem 1rem;
    border-radius: 64px;
    font-size: 16px;
    line-height: 22.4px;
    font-weight: 500;
    background: var(--text);
    color: #fff;
}

.remix-desktop {
    justify-self: end;
    display: inline-flex;
}

.remix-mobile {
    display: none;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: #fff;
    padding: 0.45rem 0.9rem;
    font-weight: 700;
}

.hero-copy {
    max-width: 1200px;
    min-height: 470px;
}

.hero-copy h1 {
    margin-top: 1.55rem;
    margin-bottom: 0;
    max-width: 1110px;
    font-size: clamp(2.5rem, 4.7vw, 64px);
    line-height: 1.2;
}

.tone-muted {
    color: var(--text-soft);
}

.hero-actions {
    margin-top: 4.75rem;
    display: flex;
    gap: var(--space-2);
}

.hero-actions .btn {
    min-width: 184.13px;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
}

.featured-project {
    display: grid;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-project.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.featured-project-media {
    display: block;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #c8cbd1;
}

.featured-project--large {
    grid-column: 1 / -1;
}

.featured-project--large .featured-project-media {
    aspect-ratio: 1760 / 709.2;
}

.featured-project--half .featured-project-media {
    aspect-ratio: 860 / 509.2;
}

.featured-project-media::before {
    content: "↗";
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    width: 2rem;
    height: 3rem;
    border-radius: 200px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.featured-project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid transparent;
    border-radius: 24px;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-project:hover .featured-project-media img {
    transform: scale(1.015);
}

.featured-project-meta p {
    margin: 0;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 25.2px;
}

.featured-project-meta h3 {
    margin: 0.25rem 0 0;
    font-size: 24px;
    line-height: 33.6px;
    font-weight: 500;
}

.split-head {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 5.5rem;
    row-gap: 1.4rem;
}

.split-head h2 {
    max-width: 1170px;
    margin-bottom: 0;
    font-size: clamp(1.7rem, 2.9vw, 40px);
    line-height: 56px;
}

.split-head .btn {
    min-width: 165.11px;
}

.section-head h1 {
    max-width: 13ch;
}

.section-head {
    margin-bottom: var(--space-5);
}

.services-list {
    margin-top: -0.5rem;
}

.services-list .eyebrow {
    margin-bottom: 1.35rem;
}

.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 96px;
    border-bottom: 1px solid var(--border);
}

.service-row h3 {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 40px);
    line-height: 56px;
}

.service-row span {
    font-size: 24px;
    line-height: 1;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.logo-cell {
    min-height: 200px;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    color: var(--text);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cta {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
}

.cta-story h2 {
    max-width: 900px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.project-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
}

.project-media-link {
    display: block;
}

.project-media {
    width: 100%;
    transition: transform 0.22s ease;
}

.project-card:hover .project-media {
    transform: scale(1.02);
}

.project-meta {
    padding: var(--space-3);
}

.project-overline {
    margin: 0 0 0.45rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.project-meta p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}

.prose {
    max-width: 74ch;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
}

.stats-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 1.2rem;
}

.stats-card p {
    margin: 0;
    color: var(--text-muted);
}

.steps {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
    display: grid;
    gap: 0.6rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.contact-form {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: grid;
    gap: 0.9rem;
}

.contact-form label {
    display: grid;
    gap: 0.45rem;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.8rem;
    font: inherit;
}

.form-status {
    margin: 0;
    color: var(--text-muted);
}

.project-detail-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 1.3rem;
    align-items: start;
}

.project-detail-grid img {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.bullet-list {
    margin: 0 0 1.1rem;
    padding-left: 1.1rem;
    color: var(--text-muted);
}

.site-footer {
    margin-top: 6rem;
    background: #000;
    color: #fff;
    padding: 5rem 0;
}

.footer-cta-copy h2 {
    margin-top: 1rem;
    margin-bottom: 3.4rem;
    max-width: 560px;
    color: #fff;
    font-size: clamp(2.1rem, 4.6vw, 64px);
    line-height: 1.2;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    min-height: 700px;
}

.footer-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 440px;
}

.footer-eyebrow {
    margin: 0;
    color: #fff;
    font-size: 16px;
    line-height: 22.4px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.footer-links a {
    color: #fff;
    font-size: 18px;
    line-height: 25.2px;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.footer-legal {
    opacity: 0.5;
    color: #fff;
    font-size: 16px;
    line-height: 22.4px;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.page-home .home-hero {
    padding-top: 4.4rem;
    padding-bottom: 0;
}

.page-home .home-projects,
.page-home .home-success,
.page-home .home-services,
.page-home .home-story,
.page-home .home-logos {
    padding-top: 0;
}

.page-home .home-projects {
    margin-top: 15rem;
}

.page-home .home-success,
.page-home .home-services,
.page-home .home-story,
.page-home .home-logos {
    margin-top: 15rem;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.card-pad {
    padding: 1.1rem;
}

.stack-sm > * + * {
    margin-top: var(--space-2);
}

.stack-md > * + * {
    margin-top: var(--space-3);
}

.styleguide-main {
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 24%);
}

.sg-layout {
    display: grid;
    gap: var(--space-5);
}

.sg-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    padding: var(--space-5);
}

.sg-grid {
    display: grid;
    gap: var(--space-3);
}

.sg-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sg-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sg-swatch {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.sg-swatch-color {
    height: 74px;
}

.sg-swatch-bg {
    background: var(--bg);
}

.sg-swatch-bg-muted {
    background: var(--bg-muted);
}

.sg-swatch-text {
    background: var(--text);
}

.sg-swatch-meta {
    padding: var(--space-3);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sg-code {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
    background: #fafafa;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.83rem;
    white-space: nowrap;
    overflow-x: auto;
}

.sg-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: var(--space-5) 0;
}

.sg-demo-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.sg-list {
    margin: 0;
    padding-left: 1rem;
    color: var(--text-muted);
}

.motion-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.motion-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.motion-delay-1 {
    transition-delay: 0.06s;
}

.motion-delay-2 {
    transition-delay: 0.12s;
}

.motion-delay-3 {
    transition-delay: 0.18s;
}

@media (max-width: 1024px) {
    .container {
        width: min(var(--max-width), calc(100% - 4rem));
    }

    .split-head {
        grid-template-columns: 1fr;
        row-gap: 1.2rem;
    }

    .project-list {
        grid-template-columns: 1fr;
    }

    .featured-project--large {
        grid-column: auto;
    }

    .logo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-home .home-projects,
    .page-home .home-success,
    .page-home .home-services,
    .page-home .home-story,
    .page-home .home-logos {
        margin-top: 8rem;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        top: 5.4rem;
        left: 0;
        right: 0;
        padding: 0 1.5rem 1rem;
        border-bottom: 1px solid var(--border);
        background: #fff;
        display: none;
    }

    .main-nav.is-open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
    }

    .remix-desktop {
        display: none;
    }

    .remix-mobile {
        display: inline-flex;
        margin-top: var(--space-3);
    }

    .project-grid,
    .contact-grid,
    .project-detail-grid,
    .stats-grid,
    .footer-right,
    .sg-grid-2,
    .sg-grid-3 {
        grid-template-columns: 1fr;
    }

    .footer-top {
        min-height: auto;
        flex-direction: column;
    }

    .footer-right {
        width: 100%;
    }

    .service-row h3 {
        font-size: 30px;
        line-height: 1.3;
    }

    .hero-copy {
        min-height: auto;
    }

    .hero-actions .btn,
    .split-head .btn {
        min-width: 0;
    }

    .sg-section {
        padding: var(--space-4);
    }

    .container {
        width: min(var(--max-width), calc(100% - 2rem));
    }

    .hero-copy h1 {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .motion-reveal,
    .featured-project,
    .project-media,
    .featured-project-media img,
    .btn {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}
