:root {
    --cream: #F8F5F0;
    --cream-2: #F1EAE0;
    --paper: #FFFEFC;
    --espresso: #3B2313;
    --espresso-soft: #5C4432;
    --rust: #8B3A12;
    --rust-bright: #A8451A;
    --muted: #8A7A6C;
    --line: rgba(59, 35, 19, 0.13);
    --line-strong: rgba(59, 35, 19, 0.26);
    --radius: 2px;
    --disp: 'Space Grotesk', sans-serif;
    --body: 'IBM Plex Sans', sans-serif;
    --mono: 'IBM Plex Mono', monospace;
    --serif-em: 'Cormorant Garamond', serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    background: var(--cream);
    color: var(--espresso);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
}

section {
    position: relative;
}

/* ---------- AMBIENT SIGNAL LAYER (whole-page motion) ---------- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(139, 58, 18, 0.14) 1px, transparent 1.4px);
    background-size: 34px 34px;
    animation: gridDrift 26s linear infinite;
    opacity: 0.55;
}

@keyframes gridDrift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 340px 170px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        animation: none;
    }
}

.nav,
.hero,
.marquee-wrap,
.section,
footer,
.modal-overlay {
    position: relative;
    z-index: 1;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}

@media (max-width:720px) {
    .wrap {
        padding: 0 20px;
    }
}

::selection {
    background: var(--rust);
    color: var(--cream);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--rust);
    outline-offset: 3px;
}

/* ---------- CUSTOM CURSOR (fine pointers only) ---------- */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--rust);
    transition: opacity .2s ease;
}

.cursor-ring {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line-strong);
    transition: width .25s ease, height .25s ease, border-color .25s ease, opacity .2s ease, background .25s ease;
}

.cursor-ring.hover {
    width: 64px;
    height: 64px;
    border-color: var(--rust);
    background: rgba(139, 58, 18, 0.06);
}

body.has-cursor {
    cursor: none;
}

body.has-cursor a,
body.has-cursor button {
    cursor: none;
}

@media (hover:none),
(pointer:coarse) {

    .cursor-dot,
    .cursor-ring {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    .cursor-dot,
    .cursor-ring {
        display: none;
    }

    body.has-cursor {
        cursor: auto;
    }
}

/* ---------- TILT + SPOTLIGHT CARDS ---------- */
.tilt-card {
    --mx: 50%;
    --my: 50%;
    transform-style: preserve-3d;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}

.tilt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    z-index: 2;
    background: radial-gradient(320px circle at var(--mx) var(--my), rgba(139, 58, 18, 0.14), transparent 62%);
    transition: opacity .35s ease;
}

.tilt-card:hover::before {
    opacity: 1;
}

@media (hover:none),
(pointer:coarse) {
    .tilt-card {
        transform: none !important;
    }
}

/* ---------- MAGNETIC ---------- */
.magnetic {
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- SCROLL PROGRESS ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    z-index: 101;
    background: var(--rust);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

/* ---------- NAV ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    transition: background .3s ease, padding .3s ease, border-color .3s ease;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(248, 245, 240, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 12px 32px;
}

.nav-mark {
    display: flex;
    align-items: center;
}

.nav-mark img {
    height: 34px;
    width: auto;
    display: block;
    filter: drop-shadow(0 7px 16px rgba(59, 35, 19, .08));
    transition: height .3s ease, transform .35s ease;
}

.nav-mark:hover img {
    transform: translateY(-1px);
}

.nav.scrolled .nav-mark img {
    height: 29px;
}

.nav-links {
    display: flex;
    gap: 34px;
    font-size: 14px;
    color: var(--espresso-soft);
}

.nav-links a {
    transition: color .2s ease;
}

.nav-links a:hover {
    color: var(--rust);
}

.nav-cta {
    font-size: 13px;
    font-weight: 500;
    color: var(--cream);
    background: var(--espresso);
    padding: 10px 18px;
    border-radius: var(--radius);
    transition: background .2s ease;
}

.nav-cta:hover {
    background: var(--rust);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    background: rgba(248, 245, 240, .86);
    color: var(--espresso);
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

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

    .nav {
        padding: 16px 20px;
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav.mobile-open {
        background: rgba(248, 245, 240, .98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--line);
    }

    .nav.mobile-open .nav-links {
        display: flex;
        position: absolute;
        left: 0;
        right: 0;
        top: 74px;
        padding: 24px 20px 30px;
        background: rgba(248, 245, 240, .98);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        gap: 20px;
        font-size: 16px;
    }

    .nav-mark img,
    .nav.scrolled .nav-mark img {
        height: 27px;
        max-width: 190px;
    }
}

/* ---------- HERO ---------- */
.hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 140px 32px 80px;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.4s ease;
}

#hero-canvas.ready {
    opacity: 1;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 62% 55% at 16% 42%, rgba(248, 245, 240, 0.62), transparent 62%),
        linear-gradient(to bottom, rgba(248, 245, 240, 0.1) 0%, rgba(248, 245, 240, 0.02) 45%, var(--cream) 97%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--rust);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--rust);
}

.hero h1 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(1.9rem, 3.6vw, 3.15rem);
    line-height: 1.14;
    max-width: 17ch;
    color: var(--espresso);
}

.hero-sub {
    margin-top: 26px;
    max-width: 46ch;
    font-size: 18px;
    color: var(--espresso-soft);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 42px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 26px;
    font-size: 14.5px;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: transform .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
    cursor: pointer;
    font-family: var(--body);
}

.btn-primary {
    background: var(--espresso);
    color: var(--cream);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--rust);
}

.btn-ghost {
    border-color: var(--line-strong);
    color: var(--espresso);
}

.btn-ghost:hover {
    border-color: var(--rust);
    color: var(--rust);
    transform: translateY(-2px);
}

.hero-status {
    margin-top: 60px;
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    max-width: 580px;
}

.hero-status div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-status strong {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--espresso);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.hero-status span {
    font-size: 12.5px;
    color: var(--muted);
}

.pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5c8a4a;
    margin-right: 7px;
    box-shadow: 0 0 8px 1px rgba(92, 138, 74, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pulse {
        animation: none;
    }
}

/* ---------- MARQUEE ---------- */
.marquee-wrap {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--cream-2);
    overflow: hidden;
    padding: 20px 0;
}

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

.marquee.reverse {
    animation-name: scrollReverse;
    animation-duration: 38s;
}

@media (prefers-reduced-motion: reduce) {
    .marquee {
        animation-duration: 120s;
    }

    .marquee.reverse {
        animation-duration: 150s;
    }
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

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

@keyframes scrollReverse {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

.marquee span {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
    padding: 0 28px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 28px;
}

.marquee span::after {
    content: '—';
    color: var(--line-strong);
}

.marquee-wrap.dim {
    background: var(--espresso);
}

.marquee-wrap.dim .marquee span {
    color: #c9bbb0;
}

.marquee-wrap.dim .marquee span::after {
    color: rgba(255, 255, 255, 0.2);
}

/* ---------- SECTION HEADS ---------- */
.section {
    padding: 40px 0;
}

@media (max-width:720px) {
    .section {
        padding: 40px 0;
    }
}

.head {
    max-width: 640px;
    margin-bottom: 56px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.head .eyebrow {
    margin-bottom: 16px;
}

.head h2 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    line-height: 1.14;
    color: var(--espresso);
}

.head p {
    margin-top: 16px;
    color: var(--muted);
    font-size: 16.5px;
    max-width: 52ch;
}

/* ---------- PORTFOLIO ---------- */
.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    padding: 9px 16px;
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    transition: all .2s ease;
}

.filter-btn:hover {
    color: var(--espresso);
    border-color: var(--espresso);
}

.filter-btn.active {
    background: var(--espresso);
    color: var(--cream);
    border-color: var(--espresso);
}

.port-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 28px;
    perspective: 1400px;
    counter-reset: projects;
}

@media (max-width:980px) {
    .port-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:660px) {
    .port-grid {
        grid-template-columns: 1fr;
    }
}

.port-card {
    position: relative;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--line-strong);
    border-radius: 0;
    overflow: visible;
    cursor: pointer;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), border-color .3s ease;
    display: flex;
    flex-direction: column;
}

.port-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--rust);
    transition: width .65s cubic-bezier(.2, .8, .2, 1);
    z-index: 3;
}

.port-card:hover::before {
    width: 100%;
}

.port-card:hover {
    border-color: transparent;
}

.port-card:focus-visible,
.featured-case:focus-visible {
    outline: 3px solid var(--rust-bright);
    outline-offset: 4px;
}

.port-card.hide {
    display: none;
}

.port-window {
    background: #e9e1d5;
    margin-top: 14px;
    overflow: hidden;
    box-shadow: 0 18px 42px -30px rgba(31, 18, 10, .42);
    transition: box-shadow .45s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}

.port-card:hover .port-window {
    box-shadow: 0 34px 58px -30px rgba(31, 18, 10, .52);
    transform: translateY(-4px);
}

.port-window-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 13px;
    background: #e9e1d5;
    border-bottom: 1px solid rgba(59, 35, 19, .10);
}

.port-window-bar .wdot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c);
    flex: 0 0 7px;
}

.port-url {
    margin-left: 8px;
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--muted);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 3px 11px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.port-num {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted);
    margin-left: 8px;
    flex: 0 0 auto;
}

.port-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #eee8de;
    display: grid;
    place-items: center;
}

.port-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #eee8de;
    transition: transform .75s cubic-bezier(.2, .8, .2, 1), filter .45s ease;
}

.port-card:nth-child(3n+1) .port-thumb img {
    animation-delay: 0s;
}

.port-card:nth-child(3n+2) .port-thumb img {
    animation-delay: .6s;
}

.port-card:nth-child(3n+3) .port-thumb img {
    animation-delay: 1.2s;
}

.port-card:hover .port-thumb img {
    transform: scale(1.025);
    filter: saturate(1.04) contrast(1.02);
}

@media (prefers-reduced-motion: reduce) {
    .port-thumb img {
        animation: none;
    }
}

.port-thumb::before {
    content: '';
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    top: -2px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rust-bright), transparent);
    opacity: 0;
    box-shadow: 0 0 18px rgba(194, 94, 39, .55);
}

.port-card:hover .port-thumb::before {
    opacity: .8;
    animation: projectScan 1.55s cubic-bezier(.2, .7, .3, 1);
}

.port-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, .3);
    background: linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 34%);
}

@keyframes projectScan {
    0% {
        top: 0;
        opacity: 0
    }

    15% {
        opacity: .8
    }

    85% {
        opacity: .65
    }

    100% {
        top: 100%;
        opacity: 0
    }
}

.port-body {
    padding: 22px 2px 4px;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 22px;
    align-content: start;
}

.port-cat {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--rust);
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.port-cat::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--rust);
    animation: pulse 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .port-cat::before {
        animation: none;
    }
}

.port-body h3 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    margin: 10px 0 9px;
    color: var(--espresso);
    grid-column: 1;
}

.port-body p {
    font-size: 15px;
    color: var(--muted);
    max-width: 54ch;
    grid-column: 1;
}

.port-more {
    grid-column: 2;
    grid-row: 1/4;
    align-self: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line-strong);
    font-size: 0;
    color: var(--espresso);
    display: grid;
    place-items: center;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.port-more span {
    font-size: 18px;
}

.port-card:hover .port-more {
    background: var(--espresso);
    color: var(--cream);
    border-color: var(--espresso);
}

.port-more span {
    transition: transform .2s ease;
}

.port-card:hover .port-more span {
    transform: translate(2px, -2px);
}

/* ---------- MODAL ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--paper);
    z-index: 200;
    display: none;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    overflow: hidden;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--paper);
    width: 100%;
    height: 100svh;
    border-radius: 0;
    padding: 0;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
    overflow: hidden;
    animation: modalIn .55s cubic-bezier(.18, .86, .22, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(.992);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: fixed;
    top: 24px;
    right: 26px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(248, 245, 240, .9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line-strong);
    color: var(--espresso);
    cursor: pointer;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 205;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}

.modal-close:hover {
    background: var(--espresso);
    color: var(--cream);
    transform: rotate(8deg);
}

.modal-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0;
    background: #e8dfd2;
    display: grid;
    place-items: center;
    padding: clamp(38px, 6vw, 92px);
    position: relative;
}

.modal-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(149, 75, 34, .065) 1px, transparent 1px), linear-gradient(90deg, rgba(149, 75, 34, .065) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom right, black, transparent 78%);
}

.modal-image::after {
    content: '';
    position: absolute;
    width: 42vw;
    height: 42vw;
    border: 1px solid rgba(149, 75, 34, .12);
    border-radius: 50%;
    animation: caseOrbit 14s linear infinite;
}

@keyframes caseOrbit {
    to {
        transform: rotate(360deg)
    }
}

.modal-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
    object-position: center;
    background: #eee8de;
    box-shadow: 0 35px 80px -38px rgba(31, 18, 10, .64);
    border: 1px solid rgba(59, 35, 19, .13);
}

.modal-content {
    padding: clamp(82px, 9vh, 120px) clamp(42px, 6vw, 94px) 72px;
    overflow-y: auto;
    background: radial-gradient(circle at 88% 15%, rgba(194, 94, 39, .07), transparent 26%), var(--paper);
}

.modal-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.modal-meta span {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 4px 10px;
    border-radius: 20px;
}

.modal-content h3 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(2.35rem, 4.5vw, 4.5rem);
    line-height: .98;
    max-width: 9ch;
    color: var(--espresso);
    margin: 28px 0 14px;
}

.modal-type {
    font-size: 14px;
    color: var(--rust);
    margin-bottom: 20px;
}

.modal-content>p {
    font-size: 17px;
    color: var(--espresso-soft);
    margin-bottom: 16px;
    line-height: 1.72;
    max-width: 58ch;
}

.modal-content p strong {
    color: var(--espresso);
}

.modal-block {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.modal-block h4 {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--rust);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--espresso);
    background: var(--cream-2);
    padding: 6px 12px;
    border-radius: 20px;
}

.modal-actions {
    margin-top: 28px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

@media (max-width:920px) {
    .modal {
        display: block;
        overflow-y: auto;
        height: 100svh;
    }

    .modal-image {
        height: auto;
        min-height: 52svh;
        padding: 76px 24px 38px;
    }

    .modal-image img {
        max-height: 45svh;
    }

    .modal-content {
        overflow: visible;
        padding: 58px 24px 72px;
    }

    .modal-content h3 {
        font-size: clamp(2.4rem, 11vw, 4rem);
    }

    .modal-close {
        top: 16px;
        right: 16px;
        width: 46px;
        height: 46px;
    }
}

@media (prefers-reduced-motion:reduce) {

    .modal-image::after,
    .port-card:hover .port-thumb::before {
        animation: none;
    }
}

/* ---------- CAPABILITIES ---------- */
.cap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

@media (max-width:760px) {
    .cap-grid {
        grid-template-columns: 1fr;
    }
}

.cap-card {
    background: var(--cream);
    padding: 42px 38px;
    transition: background .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
    position: relative;
    overflow: hidden;
}

.cap-card:hover {
    box-shadow: 0 22px 40px -22px rgba(59, 35, 19, 0.28);
}

.cap-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rust), transparent);
    animation: capScan 5.5s linear infinite;
    animation-delay: calc(var(--d, 0) * 1.1s);
}

.cap-card:nth-child(1) {
    --d: 0;
}

.cap-card:nth-child(2) {
    --d: 1;
}

.cap-card:nth-child(3) {
    --d: 2;
}

.cap-card:nth-child(4) {
    --d: 3;
}

@keyframes capScan {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cap-card::before {
        animation: none;
        display: none;
    }
}

.cap-card:hover {
    background: var(--paper);
}

.cap-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cap-num {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--rust);
}

.cap-think {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.cap-think span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--rust);
    opacity: .35;
    animation: capThink 1.3s ease-in-out infinite;
}

.cap-think span:nth-child(2) {
    animation-delay: .18s;
}

.cap-think span:nth-child(3) {
    animation-delay: .36s;
}

@keyframes capThink {

    0%,
    60%,
    100% {
        opacity: .3;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cap-think span {
        animation: none;
        opacity: .6;
    }
}

.cap-card h3 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 22px;
    margin: 16px 0 12px;
    color: var(--espresso);
}

.cap-card p {
    color: var(--muted);
    font-size: 15px;
    max-width: 38ch;
}

.cap-card .tag {
    margin-top: 20px;
    display: inline-block;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--rust);
    border: 1px solid rgba(139, 58, 18, 0.3);
    padding: 5px 10px;
    border-radius: var(--radius);
}

.cap-card::after {
    position: absolute;
    right: 30px;
    bottom: 30px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line-strong);
    display: grid;
    place-items: center;
    color: var(--rust);
    font-size: 14px;
    transition: background .25s ease, color .25s ease, transform .3s ease;
}]

.cap-card:hover::after {
    background: var(--espresso);
    color: var(--cream);
    transform: translate(3px, -3px);
}

.cap-card:hover h3 {
    color: var(--rust);
}

.cap-card h3 {
    transition: color .25s ease;
}

.portfolio-count {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--rust);
    border-left: 1px solid var(--line-strong);
    padding-left: 18px;
    margin-bottom: 5px;
}

@media(max-width:620px) {
    .cap-card {
        padding: 34px 28px
    }

    .cap-card::after {
        right: 24px;
        bottom: 24px
    }

    .portfolio-count {
        border-left: 0;
        padding-left: 0
    }
}

/* ---------- PROCESS ---------- */
/* ---------- PROCESS ---------- */

.process-section {
    background: var(--cream-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.process-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    position: relative;
}

/* desktop connector line */
.process-row::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        var(--line-strong) 0 8px,
        transparent 8px 16px
    );
}

/* moving dot */
.process-row::after {
    content: '';
    position: absolute;
    top: 23px;
    left: 8%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rust);
    box-shadow: 0 0 10px 2px rgba(139, 58, 18, 0.55);
    animation: travel 4.5s ease-in-out infinite;
}

@keyframes travel {
    0% {
        left: 8%;
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    50% {
        left: calc(92% - 7px);
    }

    92% {
        opacity: 1;
    }

    100% {
        left: calc(92% - 7px);
        opacity: 0;
    }
}

.process-step {
    padding: 0 30px;
    position: relative;
    min-width: 0;
}

.process-step:first-child {
    padding-left: 0;
}

.process-step:last-child {
    padding-right: 0;
}

.step-marker {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: var(--mono);
    font-size: 14px;
    color: var(--rust);

    background: var(--cream-2);
    position: relative;
    z-index: 2;

    margin: 0 0 24px 0;

    animation: markerPulse 4.5s ease-in-out infinite;
}

.process-step:nth-child(1) .step-marker {
    animation-delay: 0s;
}

.process-step:nth-child(2) .step-marker {
    animation-delay: 1.7s;
}

.process-step:nth-child(3) .step-marker {
    animation-delay: 3.4s;
}

.process-step:nth-child(4) .step-marker {
    animation-delay: 5.1s;
}

@keyframes markerPulse {
    0%,
    88%,
    100% {
        box-shadow: 0 0 0 0 rgba(139, 58, 18, 0);
        border-color: var(--line-strong);
    }

    8% {
        box-shadow: 0 0 0 7px rgba(139, 58, 18, 0);
        border-color: var(--rust);
    }

    18% {
        box-shadow: 0 0 0 0 rgba(139, 58, 18, 0);
        border-color: var(--line-strong);
    }
}

.process-step h3 {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 20px;
    line-height: 1.25;
    margin: 0 0 10px;
}

.process-step p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
    max-width: 34ch;
    margin: 0;
}


/* ---------- TABLET + MOBILE ---------- */

@media (max-width: 820px) {

    .process-row {
        display: flex;
        flex-direction: column;
        gap: 34px;
    }

    .process-row::before,
    .process-row::after {
        display: none;
    }

    .process-step,
    .process-step:first-child,
    .process-step:last-child {
        width: 100%;
        padding: 0;
        margin: 0;

        display: grid !important;
        grid-template-columns: 56px minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;

        column-gap: 18px;
        row-gap: 7px;

        align-items: start;
    }

    .step-marker {
        grid-column: 1 !important;
        grid-row: 1 / 3 !important;

        width: 50px;
        height: 50px;
        min-width: 50px;

        margin: 0 !important;
        align-self: start;
    }

    .process-step h3 {
        grid-column: 2 !important;
        grid-row: 1 !important;

        margin: 2px 0 2px !important;
        padding: 0 !important;

        font-size: 20px;
        line-height: 1.25;
    }

    .process-step p {
        grid-column: 2 !important;
        grid-row: 2 !important;

        margin: 0 !important;
        padding: 0 !important;

        max-width: none !important;
        width: 100%;

        font-size: 15px;
        line-height: 1.6;
    }
}


/* ---------- SMALL MOBILE ---------- */

@media (max-width: 480px) {

    .process-row {
        gap: 30px;
    }

    .process-step,
    .process-step:first-child,
    .process-step:last-child {
        grid-template-columns: 48px minmax(0, 1fr) !important;
        column-gap: 14px;
    }

    .step-marker {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 13px;
    }

    .process-step h3 {
        font-size: 18px;
    }

    .process-step p {
        font-size: 14px;
        line-height: 1.6;
    }
}


/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
    .process-row::after,
    .step-marker {
        animation: none;
    }

    .process-row::after {
        opacity: 0;
    }
}


/* ---------- STATS ---------- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

@media (max-width: 820px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat {
    background: var(--cream);
    padding: 34px 26px;
}

.stat strong {
    font-family: var(--disp);
    font-size: 24px;
    font-weight: 600;
    display: block;
    color: var(--espresso);
}

.stat span {
    font-size: 13px;
    color: var(--muted);
    display: block;
    margin-top: 8px;
}

.stat-live {
    position: relative;
}

.stat-live::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rust);
    margin-left: 8px;
    box-shadow: 0 0 8px 1px rgba(139, 58, 18, 0.5);
    animation: pulse 1.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .stat-live::after {
        animation: none;
    }
}
/* ---------- STACK ---------- */
.stack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stack-pill {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--espresso);
    border: 1px solid var(--line-strong);
    padding: 11px 18px;
    border-radius: var(--radius);
    transition: border-color .2s ease, color .2s ease;
}

.stack-pill:hover {
    border-color: var(--rust);
    color: var(--rust);
}

/* ---------- FEATURED AI CASE ---------- */
.featured-case {
    position: relative;
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    border: 1px solid var(--line-strong);
    background: var(--espresso);
    color: var(--cream);
    overflow: hidden;
    margin-bottom: 72px;
    box-shadow: 0 28px 70px -48px rgba(59, 35, 19, .7);
}

.featured-visual {
    position: relative;
    min-height: 430px;
    background: #eae5dd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.featured-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}

.featured-case:hover .featured-visual img {
    transform: scale(1.025);
}

.featured-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--rust);
    color: #fff;
    font-family: var(--mono);
    font-size: 11px;
    padding: 8px 11px;
    letter-spacing: .04em;
}

.featured-copy {
    padding: 50px 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-copy .eyebrow {
    color: #d58a62;
    margin-bottom: 18px;
}

.featured-copy .eyebrow::before {
    background: #d58a62;
}

.featured-copy h3 {
    font-family: var(--disp);
    font-size: clamp(1.8rem, 3vw, 2.65rem);
    line-height: 1.08;
    color: #fff;
    font-weight: 600;
}

.featured-copy>p {
    margin-top: 18px;
    color: #d4c9bf;
    font-size: 16px;
    line-height: 1.7;
}

.workflow {
    margin-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .16);
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    padding: 18px 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.workflow span {
    font-family: var(--mono);
    font-size: 11px;
    color: #e6dcd4;
    position: relative;
    padding-right: 15px;
    animation: workflowStep 6s ease-in-out infinite;
}

.workflow span:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: 2px;
    color: #d58a62;
}

.workflow span:nth-child(1) {
    animation-delay: 0s;
}

.workflow span:nth-child(2) {
    animation-delay: 1.5s;
}

.workflow span:nth-child(3) {
    animation-delay: 3s;
}

.workflow span:nth-child(4) {
    animation-delay: 4.5s;
}

@keyframes workflowStep {

    0%,
    15%,
    100% {
        color: #e6dcd4;
    }

    5% {
        color: #ffb98c;
    }
}

@media (prefers-reduced-motion: reduce) {
    .workflow span {
        animation: none;
    }
}

.featured-link {
    margin-top: 26px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    align-self: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, .42);
    padding-bottom: 5px;
}

@media(max-width:860px) {
    .featured-case {
        grid-template-columns: 1fr
    }

    .featured-visual {
        min-height: 280px
    }

    .featured-copy {
        padding: 38px 26px
    }

    .workflow {
        grid-template-columns: 1fr 1fr;
        gap: 14px
    }

    .workflow span:nth-child(2)::after {
        display: none
    }
}

/* ---------- FIT CHECK ---------- */
.fit-section {
    background: var(--espresso);
    color: var(--cream);
}

.fit-section .head h2 {
    color: #fff
}

.fit-section .head p {
    color: #c9bbb0
}

.fit-section .eyebrow {
    color: #d58a62
}

.fit-section .eyebrow::before {
    background: #d58a62
}

.fit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 1px solid rgba(255, 255, 255, .15);
}

.fit-item {
    padding: 30px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.fit-item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, .15)
}

.fit-item:nth-last-child(-n+2) {
    border-bottom: 0
}

.fit-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid rgba(213, 138, 98, .55);
    display: grid;
    place-items: center;
    color: #d58a62;
    font-size: 14px
}

.fit-item h3 {
    font-family: var(--disp);
    font-size: 18px;
    color: #fff;
    margin-bottom: 5px
}

.fit-item p {
    color: #c9bbb0;
    font-size: 14.5px
}

.fit-cta {
    display: inline-flex;
    margin-top: 30px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .45);
    padding-bottom: 5px;
    gap: 8px;
}

.fit-item:nth-last-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.fit-item:last-child {
    grid-column: 1/-1;
    border-right: 0;
    border-bottom: 0;
}

@media(max-width:680px) {
    .fit-grid {
        grid-template-columns: 1fr
    }

    .fit-item,
    .fit-item:nth-child(odd) {
        grid-column: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .15)
    }

    .fit-item:last-child {
        border-bottom: 0
    }
}

/* ---------- FOUNDER ---------- */
.founder-section {
    background: var(--cream-2);
    border-top: 1px solid var(--line);
}

.founder-inner {
    display: grid;
    grid-template-columns: minmax(190px, .56fr) 1fr 1.28fr;
    gap: clamp(28px, 4vw, 60px);
    align-items: center;
}

.founder-photo {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    background: #ded3c5;
    box-shadow: 0 28px 56px -34px rgba(31, 18, 10, .58);
}

.founder-photo::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 255, 255, .52);
    z-index: 1;
    pointer-events: none;
}

.founder-photo::after {
    content: 'FOUNDER / LEAD DEVELOPER';
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    background: var(--espresso);
    color: var(--cream);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .07em;
    padding: 9px 11px;
}

.founder-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 24%;
    filter: saturate(.88) contrast(1.03);
    transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .5s ease;
}

.founder-photo:hover img {
    transform: scale(1.035);
    filter: saturate(1) contrast(1.02);
}

@media (max-width:940px) {
    .founder-inner {
        grid-template-columns: minmax(180px, .55fr) 1.35fr;
        align-items: center
    }

    .founder-facts {
        grid-column: 1/-1;
    }
}

@media (max-width:620px) {
    .founder-inner {
        grid-template-columns: 1fr;
        gap: 30px
    }

    .founder-photo {
        width: min(72vw, 280px)
    }

    .founder-facts {
        grid-column: auto;
    }
}

.founder-inner blockquote {
    font-family: var(--serif-em);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
    line-height: 1.4;
    color: var(--espresso);
}

.founder-inner blockquote::after {
    content: '|';
    margin-left: 4px;
    color: var(--rust);
    animation: pulse 1s step-start infinite;
}

@media (prefers-reduced-motion: reduce) {
    .founder-inner blockquote::after {
        animation: none;
    }
}

.founder-inner .who {
    margin-top: 20px;
    font-size: 14px;
    color: var(--muted);
    font-family: var(--mono);
    line-height: 1.55;
}

.founder-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.founder-facts div {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.founder-facts strong {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--rust);
    display: block;
    margin-bottom: 6px;
}

.founder-facts span {
    font-size: 14.5px;
    color: var(--espresso);
}

/* ---------- CTA ---------- */
.cta-section {
    padding: 140px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 520px;
    height: 520px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(139, 58, 18, 0.14), transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    animation: breathe 5s ease-in-out infinite;
}

@keyframes breathe {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.16);
        opacity: .75;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-glow {
        animation: none;
    }
}

.cta-section h2 {
    position: relative;
    font-family: var(--disp);
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3.2rem);
    max-width: 16ch;
    margin: 0 auto;
    line-height: 1.1;
    color: var(--espresso);
}

.cta-section p {
    position: relative;
    margin: 22px auto 0;
    max-width: 44ch;
    color: var(--muted);
    font-size: 16.5px;
}

.cta-actions {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 38px;
    flex-wrap: wrap;
}

.cta-note {
    position: relative;
    margin-top: 22px;
    font-size: 13px;
    color: var(--muted);
    font-family: var(--mono);
}

/* ---------- FOOTER ---------- */
footer {
    border-top: 1px solid var(--line);
    padding: 44px 0;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-row img {
    height: 34px;
    width: auto;
}

.footer-links {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--rust);
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: var(--muted);
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- reveal ---------- */
.reveal {
    opacity: 0;
    transform: perspective(900px) translateY(26px) rotateX(6deg);
    transform-origin: bottom center;
    transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1);
}

.reveal.in {
    opacity: 1;
    transform: perspective(900px) translateY(0) rotateX(0deg);
}

#proof,
#stack,
#fit,
.marquee-wrap.dim {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
/* ===== 2026 HOMEPAGE REFINEMENT: PORTFOLIO / SERVICES / CTA ===== */

/* Portfolio: three visible projects with a scalable horizontal rail */
.portfolio-rail { position: relative; }
.port-grid {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 24px !important;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 2px 2px 24px;
    margin: 0 -2px;
    perspective: 1400px;
}
.port-grid::-webkit-scrollbar { display: none; }
.port-card {
    flex: 0 0 calc((100% - 48px) / 3);
    min-width: 0;
    scroll-snap-align: start;
}
.port-card.hide { display: none !important; }
.port-body p { min-height: 3.25em; }
.portfolio-controls {
    display: grid;
    grid-template-columns: 48px minmax(120px, 240px) 48px;
    justify-content: end;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}
.portfolio-arrow {
    width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid var(--line-strong); background: rgba(255,254,252,.72);
    color: var(--espresso); cursor: pointer; font-size: 20px;
    transition: transform .25s ease, background .25s ease, color .25s ease, opacity .25s ease;
}
.portfolio-arrow:hover { background: var(--espresso); color: var(--cream); transform: translateY(-2px); }
.portfolio-arrow:disabled { opacity: .35; cursor: default; transform: none; }
.portfolio-progress { height: 2px; background: var(--line); overflow: hidden; }
.portfolio-progress span { display:block; width: 0%; height:100%; background: var(--rust); transition: width .25s ease; }

@media (max-width: 900px) {
    .port-card { flex-basis: calc((100% - 22px) / 2); }
}
@media (max-width: 620px) {
    .port-card { flex-basis: 86%; }
    .portfolio-controls { grid-template-columns: 44px 1fr 44px; }
    .portfolio-arrow { width:44px; height:44px; }
}

/* Services: premium editorial cards */
#services { background: linear-gradient(180deg, rgba(255,254,252,.72), rgba(241,234,224,.46)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#services .head { max-width: 760px; margin-bottom: 44px; }
#services .head h2 { max-width: 13ch; }
.cap-grid {
    display:grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap:16px;
    background:transparent;
    border:0;
}
.cap-card {
    min-height: 330px;
    padding: 26px 24px 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255,254,252,.95), rgba(248,245,240,.74));
    box-shadow: 0 18px 50px -44px rgba(59,35,19,.6);
    display:flex;
    flex-direction:column;
    isolation:isolate;
}
.cap-card::before {
    inset: 0; left:0; top:0; width:auto; height:auto;
    background: radial-gradient(circle at var(--mx, 75%) var(--my, 18%), rgba(168,69,26,.09), transparent 34%);
    animation:none; opacity:0; transition:opacity .35s ease; z-index:-1;
}
.cap-card:hover::before { opacity:1; }
.cap-card:hover { background:var(--paper); transform:translateY(-7px); box-shadow:0 28px 56px -36px rgba(59,35,19,.35); }
.cap-icon {
    width:54px; height:54px; margin-bottom:28px; position:relative;
    border:1px solid rgba(139,58,18,.22); border-radius:14px;
    background:linear-gradient(145deg, rgba(168,69,26,.08), rgba(255,255,255,.55));
}
.cap-icon span { position:absolute; width:13px; height:13px; border:1px solid rgba(139,58,18,.46); background:rgba(255,254,252,.85); }
.cap-icon span:nth-child(1){left:10px;top:10px}.cap-icon span:nth-child(2){right:10px;top:10px}.cap-icon span:nth-child(3){left:10px;bottom:10px}.cap-icon span:nth-child(4){right:10px;bottom:10px}
.cap-card:nth-child(2) .cap-icon { transform:rotate(45deg); }
.cap-card:nth-child(2) .cap-icon span { border-radius:50%; }
.cap-card:nth-child(3) .cap-icon span:nth-child(1), .cap-card:nth-child(3) .cap-icon span:nth-child(4) { background:rgba(139,58,18,.18); }
.cap-card:nth-child(4) .cap-icon span { width:9px; height:9px; border-radius:50%; }
.cap-top { margin-top:auto; padding-top:14px; border-top:1px solid var(--line); }
.cap-card h3 { font-size:20px; margin:16px 0 10px; }
.cap-card p { font-size:14.5px; line-height:1.65; }
.cap-card .tag { border:0; padding:0; margin-top:16px; color:var(--rust); }
@media (max-width: 980px){ .cap-grid{grid-template-columns:repeat(2,1fr)} }
@media (max-width: 620px){ .cap-grid{grid-template-columns:1fr}.cap-card{min-height:280px} }

/* CTA: animated assembling 3D cube */
.cta-section { padding: 96px 0 110px; text-align:left; overflow:visible; }
.cta-panel {
    min-height: 390px;
    border:1px solid var(--line);
    border-radius:24px;
    overflow:hidden;
    display:grid;
    grid-template-columns:minmax(0,.9fr) minmax(380px,1.1fr);
    align-items:center;
    background:
      radial-gradient(circle at 78% 44%, rgba(168,69,26,.10), transparent 28%),
      linear-gradient(135deg, rgba(255,254,252,.98), rgba(241,234,224,.62));
    box-shadow:0 36px 90px -72px rgba(59,35,19,.65);
    position:relative;
}
.cta-panel::before { content:''; position:absolute; inset:0; pointer-events:none; background-image:linear-gradient(rgba(139,58,18,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(139,58,18,.035) 1px,transparent 1px); background-size:34px 34px; mask-image:linear-gradient(90deg,transparent 35%,black 100%); }
.cta-copy { padding:64px 24px 64px 64px; position:relative; z-index:2; }
.cta-copy .eyebrow { margin-bottom:15px; }
.cta-section h2 { margin:0; max-width:10ch; font-size:clamp(2.5rem,5vw,4.25rem); letter-spacing:-.045em; }
.cta-section p { margin:20px 0 0; max-width:39ch; }
.cta-actions { justify-content:flex-start; margin-top:30px; }
.cube-scene { position:relative; height:390px; perspective:900px; transform-style:preserve-3d; }
.cube-scene::after { content:''; position:absolute; left:50%; bottom:52px; width:250px; height:48px; transform:translateX(-50%); background:radial-gradient(ellipse,rgba(59,35,19,.18),transparent 68%); filter:blur(11px); }
.assembly-cube { position:absolute; left:50%; top:50%; width:150px; height:150px; margin:-75px 0 0 -75px; transform-style:preserve-3d; animation:cubeFloat 12s ease-in-out infinite; z-index:3; }
.cube-face { position:absolute; inset:0; border:1px solid rgba(139,58,18,.54); background:linear-gradient(135deg,rgba(255,255,255,.13),rgba(168,69,26,.035)); box-shadow:inset 0 0 36px rgba(168,69,26,.025); }
.cube-front{transform:translateZ(75px)}.cube-back{transform:rotateY(180deg) translateZ(75px)}.cube-right{transform:rotateY(90deg) translateZ(75px)}.cube-left{transform:rotateY(-90deg) translateZ(75px)}.cube-top{transform:rotateX(90deg) translateZ(75px)}.cube-bottom{transform:rotateX(-90deg) translateZ(75px)}
@keyframes cubeFloat { 0%,100%{transform:rotateX(-18deg) rotateY(32deg) translateY(4px)} 50%{transform:rotateX(-12deg) rotateY(212deg) translateY(-10px)} }
.cube-orbit { position:absolute; left:50%; top:50%; border:1px solid rgba(139,58,18,.11); border-radius:50%; transform-style:preserve-3d; }
.orbit-one { width:290px;height:190px;margin:-95px 0 0 -145px; transform:rotateX(64deg); animation:orbitSpin 12s linear infinite; }
.orbit-two { width:240px;height:240px;margin:-120px 0 0 -120px; transform:rotateY(67deg); animation:orbitSpinReverse 16s linear infinite; }
@keyframes orbitSpin{to{transform:rotateX(64deg) rotateZ(360deg)}} @keyframes orbitSpinReverse{to{transform:rotateY(67deg) rotateZ(-360deg)}}
.cube-particle { position:absolute; left:50%; top:50%; width:24px; height:24px; margin:-12px; border:1px solid rgba(139,58,18,.42); background:rgba(248,245,240,.88); box-shadow:0 8px 20px rgba(59,35,19,.08); animation:assemble 5.4s cubic-bezier(.4,0,.2,1) infinite; z-index:4; }
.p1{--sx:-190px;--sy:-110px;--mx:-38px;--my:-22px;animation-delay:0s}.p2{--sx:175px;--sy:-128px;--mx:35px;--my:-26px;animation-delay:.7s}.p3{--sx:205px;--sy:82px;--mx:41px;--my:16px;animation-delay:1.4s}.p4{--sx:-210px;--sy:104px;--mx:-42px;--my:21px;animation-delay:2.1s}.p5{--sx:20px;--sy:-175px;--mx:4px;--my:-35px;animation-delay:2.8s}.p6{--sx:-25px;--sy:168px;--mx:-5px;--my:34px;animation-delay:3.5s}
@keyframes assemble { 0%{opacity:0;transform:translate(var(--sx),var(--sy)) scale(.5) rotate(0)} 13%{opacity:1} 65%{opacity:1;transform:translate(var(--mx),var(--my)) scale(.85) rotate(140deg)} 82%,100%{opacity:0;transform:translate(0,0) scale(.15) rotate(220deg)} }
@media (max-width:820px){ .cta-panel{grid-template-columns:1fr}.cta-copy{padding:48px 30px 10px}.cube-scene{height:310px}.cta-section h2{font-size:clamp(2.5rem,12vw,4rem)} }
@media (prefers-reduced-motion:reduce){ .assembly-cube,.cube-orbit,.cube-particle{animation:none}.cube-particle{display:none} }

/* ===== FINAL PREMIUM POLISH ===== */
.portfolio-head-actions{display:flex;flex-direction:column;align-items:flex-end;gap:11px;font-family:var(--mono);font-size:11px;letter-spacing:.08em;color:var(--muted)}
.portfolio-head-actions a{font-family:var(--ui);font-size:14px;font-weight:600;letter-spacing:0;color:var(--espresso);display:inline-flex;align-items:center;gap:9px;padding-bottom:5px;border-bottom:1px solid rgba(89,49,25,.26);transition:color .25s ease,border-color .25s ease,gap .25s ease}
.portfolio-head-actions a:hover{color:var(--rust);border-color:var(--rust);gap:13px}

/* services: clearer hierarchy and richer interaction */
#services .head p{max-width:58ch;font-size:15.5px}
.cap-card{cursor:default;transition:transform .4s cubic-bezier(.2,.8,.2,1),box-shadow .4s ease,border-color .3s ease,background .3s ease}
.cap-card:hover{border-color:rgba(139,58,18,.28);transform:translateY(-9px);box-shadow:0 32px 70px -42px rgba(59,35,19,.42)}
.cap-icon{transition:transform .45s cubic-bezier(.2,.8,.2,1),box-shadow .35s ease}
.cap-card:hover .cap-icon{transform:translateY(-3px) rotate(4deg);box-shadow:0 12px 30px -20px rgba(139,58,18,.55)}
.cap-card:nth-child(2):hover .cap-icon{transform:translateY(-3px) rotate(52deg)}
.cap-card::after{transition:transform .3s ease,background .3s ease,color .3s ease}
.cap-card:hover::after{transform:translate(3px,-2px);background:var(--espresso);color:var(--cream)}
.cap-card .tag{font-weight:600;letter-spacing:.02em}

/* founder: stronger trust section */
.founder-inner{grid-template-columns:minmax(250px,.78fr) minmax(280px,1fr) 1.18fr;gap:clamp(34px,5vw,72px)}
.founder-photo{min-height:390px;border-radius:2px}
.founder-photo::after{left:18px;bottom:18px;padding:10px 12px}
.founder-kicker{font-family:var(--mono);font-size:10px;letter-spacing:.12em;color:var(--rust);margin-bottom:14px}
.founder-note{max-width:40ch;margin-top:16px;color:var(--muted);font-size:14.5px;line-height:1.65}
.founder-inner blockquote{font-size:clamp(1.45rem,2.3vw,2rem);line-height:1.33}
.founder-facts{gap:28px 30px}
.founder-facts div{padding-top:16px}

/* process: make the journey visually connected */
.process-row{position:relative}
.process-row::before{content:'';position:absolute;left:27px;right:27px;top:27px;height:1px;background:linear-gradient(90deg,rgba(139,58,18,.18),rgba(139,58,18,.42),rgba(139,58,18,.18));z-index:0}
.process-row::after{content:'';position:absolute;top:23px;left:24px;width:9px;height:9px;border-radius:50%;background:var(--rust);box-shadow:0 0 0 6px rgba(168,69,26,.08);animation:processTravel 7s ease-in-out infinite;z-index:1}
.process-step{position:relative;z-index:2}
.step-marker{background:var(--paper);box-shadow:0 0 0 8px var(--cream-2)}
@keyframes processTravel{0%,8%{left:24px}31%{left:33%}58%{left:65%}84%,100%{left:calc(100% - 33px)}}

/* CTA: larger, brighter assembly sculpture */
.cta-panel{grid-template-columns:minmax(0,.84fr) minmax(420px,1.16fr);min-height:430px}
.cube-scene{height:430px;perspective:1050px}
.assembly-cube{width:188px;height:188px;margin:-94px 0 0 -94px}
.cube-front{transform:translateZ(94px)}.cube-back{transform:rotateY(180deg) translateZ(94px)}.cube-right{transform:rotateY(90deg) translateZ(94px)}.cube-left{transform:rotateY(-90deg) translateZ(94px)}.cube-top{transform:rotateX(90deg) translateZ(94px)}.cube-bottom{transform:rotateX(-90deg) translateZ(94px)}
.cube-face{border-color:rgba(139,58,18,.68);background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(168,69,26,.055));box-shadow:inset 0 0 45px rgba(168,69,26,.04)}
.orbit-one{width:350px;height:225px;margin:-112px 0 0 -175px}.orbit-two{width:295px;height:295px;margin:-148px 0 0 -148px}
.cube-particle{width:28px;height:28px;margin:-14px;border-color:rgba(139,58,18,.52);background:rgba(255,252,247,.94)}
.cube-scene::after{width:320px;height:62px;bottom:55px;opacity:.72}
.cta-copy{padding-left:70px}

/* footer: stronger, structured finish */
footer{padding:58px 0 26px;background:rgba(246,240,232,.46)}
.footer-grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:44px;padding-bottom:42px}
.footer-brand img{height:37px;width:auto;margin-bottom:18px}
.footer-brand p{max-width:31ch;color:var(--muted);font-size:14.5px;line-height:1.6}
.footer-col{display:flex;flex-direction:column;align-items:flex-start;gap:9px;font-size:13.5px;color:var(--muted)}
.footer-col strong{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--espresso);margin-bottom:6px}
.footer-col a{transition:color .2s ease,transform .2s ease}
.footer-col a:hover{color:var(--rust);transform:translateX(2px)}
.footer-bottom{margin-top:0;padding-top:22px}

/* subtle typographic/spacing refinement */
#portfolio .head,#services .head,#process .head{align-items:flex-end}
#portfolio .head p,#process .head p{max-width:58ch}
.port-body h3{letter-spacing:-.025em}
.port-card:hover .port-window{box-shadow:0 28px 55px -34px rgba(59,35,19,.48)}

@media(max-width:940px){
  .founder-inner{grid-template-columns:minmax(220px,.65fr) 1.35fr}
  .founder-photo{min-height:350px}
  .founder-facts{grid-column:1/-1}
  .footer-grid{grid-template-columns:1.5fr 1fr 1fr;gap:34px}.footer-col:last-child{grid-column:2/4}
}
@media(max-width:820px){
  .cta-panel{grid-template-columns:1fr}.cta-copy{padding:50px 34px 4px}.cube-scene{height:350px}
  .assembly-cube{width:160px;height:160px;margin:-80px 0 0 -80px}
  .cube-front{transform:translateZ(80px)}.cube-back{transform:rotateY(180deg) translateZ(80px)}.cube-right{transform:rotateY(90deg) translateZ(80px)}.cube-left{transform:rotateY(-90deg) translateZ(80px)}.cube-top{transform:rotateX(90deg) translateZ(80px)}.cube-bottom{transform:rotateX(-90deg) translateZ(80px)}
}
@media(max-width:700px){
  .portfolio-head-actions{align-items:flex-start;margin-top:14px}
  .process-row::before,.process-row::after{display:none}
  .footer-grid{grid-template-columns:1fr 1fr}.footer-brand{grid-column:1/-1}.footer-col:last-child{grid-column:auto}
}
@media(max-width:620px){
  .founder-photo{width:min(82vw,330px);min-height:0}
  .founder-inner blockquote{font-size:1.5rem}
  .footer-grid{grid-template-columns:1fr;gap:28px}.footer-brand,.footer-col:last-child{grid-column:auto}
  .cta-copy{padding:42px 24px 0}.cube-scene{height:310px}
  .portfolio-head-actions a{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.process-row::after{animation:none}}

/* Dedicated work archive */
.work-page{padding-top:72px}.work-page .nav{background:rgba(250,247,242,.94);backdrop-filter:blur(16px)}
.work-hero{padding:105px 0 72px;border-bottom:1px solid var(--line);background:radial-gradient(circle at 80% 20%,rgba(168,69,26,.08),transparent 28%)}
.work-back{display:inline-flex;margin-bottom:54px;font-family:var(--mono);font-size:11px;letter-spacing:.06em;color:var(--muted)}
.work-back:hover{color:var(--rust)}
.work-hero h1{font-family:var(--disp);font-size:clamp(3rem,6.8vw,6.2rem);line-height:.98;letter-spacing:-.055em;color:var(--espresso);max-width:14ch;margin:18px 0 24px}
.work-hero> .wrap>p:last-child{max-width:58ch;color:var(--muted);font-size:17px;line-height:1.65}
.work-archive{padding:80px 0 110px}.archive-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:56px 24px}
.archive-card{display:block;color:inherit;transition:transform .35s ease}.archive-card:hover{transform:translateY(-6px)}
.archive-img{aspect-ratio:16/10;overflow:hidden;background:#eee6dc;border:1px solid var(--line);box-shadow:0 24px 45px -36px rgba(59,35,19,.58);margin-bottom:20px}
.archive-img img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .65s cubic-bezier(.2,.8,.2,1)}.archive-card:hover .archive-img img{transform:scale(1.025)}
.archive-card>span{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--rust)}
.archive-card h2{font-family:var(--disp);font-size:24px;letter-spacing:-.035em;margin:9px 0 8px;color:var(--espresso)}
.archive-card p{font-size:14.5px;line-height:1.65;color:var(--muted);min-height:3.2em}.archive-card em{display:inline-block;margin-top:14px;font-family:var(--mono);font-style:normal;font-size:10px;color:var(--espresso);border-bottom:1px solid var(--line-strong);padding-bottom:4px}
.work-end{padding:70px 0;background:var(--cream-2);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.work-end .wrap{display:flex;align-items:end;justify-content:space-between;gap:30px}.work-end h2{font-family:var(--disp);font-size:clamp(2.4rem,5vw,4.4rem);letter-spacing:-.05em;margin:14px 0 12px}.work-end p{color:var(--muted)}
@media(max-width:900px){.archive-grid{grid-template-columns:repeat(2,1fr)}.work-nav-links{display:none}}
@media(max-width:620px){.work-page{padding-top:60px}.work-hero{padding:72px 0 50px}.work-back{margin-bottom:38px}.archive-grid{grid-template-columns:1fr;gap:44px}.archive-card p{min-height:0}.work-end .wrap{align-items:flex-start;flex-direction:column}.work-archive{padding:60px 0 80px}}


/* ===== FINAL RESPONSIVE CTA CUBE + EDITABLE HOMEPAGE OVERRIDES ===== */
#services .head h2{max-width:none;line-height:1.03;text-wrap:balance}

.cta-panel{grid-template-columns:minmax(0,.82fr) minmax(480px,1.18fr);min-height:470px;overflow:hidden}
.cube-scene{height:470px;min-width:0;perspective:1200px;isolation:isolate}
.assembly-cube{width:260px;height:260px;margin:-130px 0 0 -130px;animation:cubeFloatFinal 16s ease-in-out infinite}
.cube-front{transform:translateZ(130px)}
.cube-back{transform:rotateY(180deg) translateZ(130px)}
.cube-right{transform:rotateY(90deg) translateZ(130px)}
.cube-left{transform:rotateY(-90deg) translateZ(130px)}
.cube-top{transform:rotateX(90deg) translateZ(130px)}
.cube-bottom{transform:rotateX(-90deg) translateZ(130px)}
.cube-face{border-width:1.35px;border-color:rgba(139,58,18,.72);background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(168,69,26,.055));box-shadow:inset 0 0 55px rgba(168,69,26,.05)}
@keyframes cubeFloatFinal{0%,100%{transform:rotateX(-18deg) rotateY(28deg) translateY(5px)}50%{transform:rotateX(-11deg) rotateY(208deg) translateY(-12px)}}
.orbit-one{width:430px;height:280px;margin:-140px 0 0 -215px;border-color:rgba(139,58,18,.13)}
.orbit-two{width:365px;height:365px;margin:-183px 0 0 -183px;border-color:rgba(139,58,18,.12)}
.cube-scene::after{width:390px;height:72px;bottom:45px;opacity:.8}
.cube-particle{width:30px;height:30px;margin:-15px;border:1.2px solid rgba(139,58,18,.62);background:rgba(255,252,247,.97);box-shadow:0 10px 28px rgba(59,35,19,.12);animation:assembleFinal 6.2s cubic-bezier(.45,0,.18,1) infinite}
.p1{--sx:-250px;--sy:-145px;--tx:-88px;--ty:-74px;animation-delay:0s}
.p2{--sx:245px;--sy:-155px;--tx:88px;--ty:-72px;animation-delay:.52s}
.p3{--sx:285px;--sy:20px;--tx:98px;--ty:4px;animation-delay:1.04s}
.p4{--sx:235px;--sy:165px;--tx:82px;--ty:76px;animation-delay:1.56s}
.p5{--sx:-240px;--sy:170px;--tx:-84px;--ty:78px;animation-delay:2.08s}
.p6{--sx:-285px;--sy:20px;--tx:-98px;--ty:5px;animation-delay:2.6s}
.p7{--sx:20px;--sy:-235px;--tx:8px;--ty:-97px;animation-delay:3.12s}
.p8{--sx:-25px;--sy:235px;--tx:-7px;--ty:98px;animation-delay:3.64s}
.p9{--sx:185px;--sy:-220px;--tx:66px;--ty:-92px;animation-delay:4.16s}
.p10{--sx:-190px;--sy:220px;--tx:-68px;--ty:92px;animation-delay:4.68s}
@keyframes assembleFinal{
  0%{opacity:0;transform:translate3d(var(--sx),var(--sy),0) scale(.38) rotate(0deg)}
  10%{opacity:1}
  62%{opacity:1;transform:translate3d(var(--tx),var(--ty),60px) scale(.95) rotate(145deg)}
  78%{opacity:1;transform:translate3d(calc(var(--tx)*.28),calc(var(--ty)*.28),20px) scale(.7) rotate(205deg)}
  90%,100%{opacity:0;transform:translate3d(0,0,0) scale(.08) rotate(260deg)}
}

@media(max-width:1100px){
  .cta-panel{grid-template-columns:minmax(0,.9fr) minmax(390px,1.1fr)}
  .assembly-cube{width:220px;height:220px;margin:-110px 0 0 -110px}
  .cube-front{transform:translateZ(110px)}.cube-back{transform:rotateY(180deg) translateZ(110px)}.cube-right{transform:rotateY(90deg) translateZ(110px)}.cube-left{transform:rotateY(-90deg) translateZ(110px)}.cube-top{transform:rotateX(90deg) translateZ(110px)}.cube-bottom{transform:rotateX(-90deg) translateZ(110px)}
  .orbit-one{width:370px;height:245px;margin:-123px 0 0 -185px}.orbit-two{width:320px;height:320px;margin:-160px 0 0 -160px}
}
@media(max-width:820px){
  #services .head h2{font-size:clamp(2.15rem,8vw,3.35rem)}
  .cta-panel{grid-template-columns:1fr;min-height:0}
  .cube-scene{height:390px}
  .assembly-cube{width:200px;height:200px;margin:-100px 0 0 -100px}
  .cube-front{transform:translateZ(100px)}.cube-back{transform:rotateY(180deg) translateZ(100px)}.cube-right{transform:rotateY(90deg) translateZ(100px)}.cube-left{transform:rotateY(-90deg) translateZ(100px)}.cube-top{transform:rotateX(90deg) translateZ(100px)}.cube-bottom{transform:rotateX(-90deg) translateZ(100px)}
  .orbit-one{width:340px;height:220px;margin:-110px 0 0 -170px}.orbit-two{width:290px;height:290px;margin:-145px 0 0 -145px}
  .cube-particle{transform-origin:center}
}
@media(max-width:520px){
  .cta-copy{padding:38px 22px 0}
  .cube-scene{height:320px;transform:scale(.95)}
  .assembly-cube{width:150px;height:150px;margin:-75px 0 0 -75px}
  .cube-front{transform:translateZ(75px)}.cube-back{transform:rotateY(180deg) translateZ(75px)}.cube-right{transform:rotateY(90deg) translateZ(75px)}.cube-left{transform:rotateY(-90deg) translateZ(75px)}.cube-top{transform:rotateX(90deg) translateZ(75px)}.cube-bottom{transform:rotateX(-90deg) translateZ(75px)}
  .orbit-one{width:270px;height:180px;margin:-90px 0 0 -135px}.orbit-two{width:225px;height:225px;margin:-113px 0 0 -113px}
  .cube-particle{width:22px;height:22px;margin:-11px}
}
@media(max-width:360px){.cube-scene{height:285px;transform:scale(.88)}.cta-actions{flex-direction:column;align-items:stretch}.cta-actions .btn{text-align:center}}
@media(prefers-reduced-motion:reduce){.assembly-cube{animation:none}.cube-particle{display:none}}

/* ===== FOUNDER SECTION: FINAL RESPONSIVE FIX ===== */
/* Keep the desktop 3-column presentation, then collapse cleanly on smaller screens. */
@media (max-width: 940px) {
  .founder-inner {
    grid-template-columns: minmax(210px, .72fr) minmax(0, 1.28fr);
    gap: 34px 38px;
    align-items: center;
  }

  .founder-photo {
    width: 100%;
    max-width: 320px;
    min-height: 0;
    justify-self: start;
  }

  .founder-facts {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .founder-section {
    overflow: hidden;
  }

  .founder-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    align-items: start;
  }

  .founder-photo {
    grid-column: 1;
    width: min(100%, 360px);
    max-width: 360px;
    min-height: 0;
    aspect-ratio: 4 / 5;
    margin: 0 auto;
    justify-self: center;
  }

  .founder-inner > .reveal:not(.founder-photo):not(.founder-facts) {
    grid-column: 1;
    width: 100%;
    min-width: 0;
  }

  .founder-kicker {
    margin-top: 2px;
    margin-bottom: 12px;
  }

  .founder-inner blockquote {
    font-size: clamp(1.55rem, 7vw, 2.05rem);
    line-height: 1.22;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .founder-note {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.6;
  }

  .founder-inner .who {
    margin-top: 16px;
    font-size: 12px;
  }

  .founder-facts {
    grid-column: 1;
    grid-template-columns: 1fr 1fr;
    gap: 20px 18px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .founder-inner {
    gap: 22px;
  }

  .founder-photo {
    width: 100%;
    max-width: 100%;
  }

  .founder-photo::before {
    inset: 10px;
  }

  .founder-photo::after {
    left: 12px;
    bottom: 12px;
    padding: 8px 9px;
    font-size: 8.5px;
  }

  .founder-inner blockquote {
    font-size: clamp(1.45rem, 8vw, 1.85rem);
    line-height: 1.2;
  }

  .founder-facts {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .founder-facts div {
    padding-top: 12px;
  }

  .founder-facts strong {
    font-size: 11px;
  }

  .founder-facts span {
    font-size: 13.5px;
    line-height: 1.55;
  }
}

/* ==========================================================================\n   PREMIUM DIGITEK SOLUTION PRELOADER\n   ========================================================================== */
.site-loader {
    display: none;
}

html.js .site-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #f8f1e9;
    background:
        radial-gradient(circle at 50% 44%, rgba(168, 69, 26, 0.11), transparent 34%),
        linear-gradient(135deg, #150d08 0%, #1d110a 50%, #130b07 100%);
    isolation: isolate;
    transition: clip-path .72s cubic-bezier(.76, 0, .24, 1), opacity .5s ease, transform .72s cubic-bezier(.76, 0, .24, 1);
    clip-path: inset(0 0 0 0);
}

html.is-loading {
    overflow: hidden;
}

.site-loader.is-leaving {
    clip-path: inset(0 0 100% 0);
    transform: translateY(-1.5%);
    opacity: .98;
    pointer-events: none;
}

.loader-grid {
    position: absolute;
    inset: -15%;
    z-index: -3;
    opacity: .18;
    background-image:
        linear-gradient(rgba(248, 241, 233, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(248, 241, 233, .035) 1px, transparent 1px);
    background-size: 64px 64px;
    transform: perspective(900px) rotateX(58deg) scale(1.2) translateY(12%);
    transform-origin: center bottom;
}

.loader-grid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0 20%, #170d08 72%);
}

.loader-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(54vw, 700px);
    aspect-ratio: 1;
    border: 1px solid rgba(168, 69, 26, .18);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.loader-orbit::before,
.loader-orbit::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a8451a;
    box-shadow: 0 0 20px rgba(168, 69, 26, .75);
}

.loader-orbit::before { top: 10%; left: 26%; }
.loader-orbit::after { right: 4%; bottom: 32%; width: 4px; height: 4px; }

.loader-orbit-a {
    animation: loaderOrbitA 11s linear infinite;
}

.loader-orbit-b {
    width: min(42vw, 540px);
    opacity: .72;
    transform: translate(-50%, -50%) rotate(64deg) scaleY(.62);
    animation: loaderOrbitB 8s linear infinite reverse;
}

.loader-content {
    width: min(900px, calc(100vw - 48px));
    text-align: center;
    position: relative;
    z-index: 2;
}

.loader-kicker,
.loader-service {
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: .30em;
    color: rgba(224, 132, 78, .82);
}

.loader-kicker {
    font-size: clamp(8px, .68vw, 11px);
    margin-bottom: clamp(24px, 4vh, 48px);
    opacity: 0;
    transform: translateY(10px);
    animation: loaderTextIn .65s .08s ease forwards;
}

.loader-brand {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: .24em;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(38px, 6.2vw, 88px);
    font-weight: 400;
    line-height: .95;
    letter-spacing: .15em;
    white-space: nowrap;
    text-transform: uppercase;
    text-shadow: 0 10px 42px rgba(0, 0, 0, .28);
}

.loader-brand span {
    display: inline-block;
    opacity: 0;
    transform: translateY(18px);
    filter: blur(7px);
    animation: loaderBrandIn .75s cubic-bezier(.2,.7,.2,1) forwards;
}

.loader-brand span:first-child { animation-delay: .12s; }
.loader-brand span:last-child { animation-delay: .24s; color: #eadfd5; }

.loader-service {
    margin-top: clamp(24px, 4vh, 42px);
    font-size: clamp(8px, .72vw, 11px);
    opacity: 0;
    animation: loaderTextIn .65s .42s ease forwards;
}

.loader-progress-wrap {
    width: min(390px, 72vw);
    margin: clamp(34px, 5vh, 58px) auto 0;
    display: grid;
    grid-template-columns: 1fr 48px;
    gap: 15px;
    align-items: center;
}

.loader-progress-track {
    height: 1px;
    overflow: hidden;
    background: rgba(248, 241, 233, .13);
}

.loader-progress-bar {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, #743b09, #d16f34, #f0b184);
    box-shadow: 0 0 18px rgba(209, 111, 52, .45);
    will-change: transform;
}

.loader-percent {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .18em;
    color: rgba(248, 241, 233, .46);
    text-align: left;
}

.loader-percent::after {
    content: '%';
    margin-left: 2px;
}

.loader-corner {
    position: absolute;
    width: 42px;
    height: 42px;
    opacity: .28;
}

.loader-corner-tl {
    top: 28px;
    left: 28px;
    border-top: 1px solid #a8451a;
    border-left: 1px solid #a8451a;
}

.loader-corner-br {
    right: 28px;
    bottom: 28px;
    border-right: 1px solid #a8451a;
    border-bottom: 1px solid #a8451a;
}

@keyframes loaderTextIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes loaderBrandIn {
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes loaderOrbitA {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes loaderOrbitB {
    from { transform: translate(-50%, -50%) rotate(64deg) scaleY(.62); }
    to { transform: translate(-50%, -50%) rotate(424deg) scaleY(.62); }
}

@media (max-width: 720px) {
    .loader-content { width: calc(100vw - 36px); }
    .loader-brand {
        flex-direction: column;
        align-items: center;
        gap: 9px;
        font-size: clamp(34px, 11vw, 54px);
        letter-spacing: .11em;
        white-space: normal;
    }
    .loader-brand span:last-child { font-size: .60em; letter-spacing: .26em; margin-left: .26em; }
    .loader-kicker, .loader-service { letter-spacing: .20em; line-height: 1.8; }
    .loader-service { max-width: 330px; margin-left: auto; margin-right: auto; }
    .loader-orbit { width: 92vw; opacity: .58; }
    .loader-orbit-b { width: 72vw; }
    .loader-corner { width: 28px; height: 28px; }
    .loader-corner-tl { top: 18px; left: 18px; }
    .loader-corner-br { right: 18px; bottom: 18px; }
}

@media (max-width: 380px) {
    .loader-kicker { max-width: 260px; margin-left: auto; margin-right: auto; }
    .loader-service { max-width: 285px; }
    .loader-progress-wrap { grid-template-columns: 1fr 42px; width: 82vw; }
}

@media (prefers-reduced-motion: reduce) {
    .loader-orbit-a,
    .loader-orbit-b,
    .loader-brand span,
    .loader-kicker,
    .loader-service {
        animation: none !important;
        opacity: 1;
        transform: none;
        filter: none;
    }
    .site-loader { transition-duration: .08s; }
}
