:root {
    --page-bg: #07090c;
    --page-fg: #edf0f5;
    --muted: #969dab;
    --accent: #7cf03d;
    --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
    --line: rgba(255, 255, 255, 0.104);
    --chip-border: rgba(255, 255, 255, 0.124);
    --surface: rgba(255, 255, 255, 0.032);
    --surface-strong: rgba(255, 255, 255, 0.054);
    --radius-lg: 24px;
    --radius-md: 16px;
    --pull: 940px;
}

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

html {
    max-width: 100vw;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--page-fg);
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    letter-spacing: -0.015em;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

h1, h2, h3, h4, ol, ul, figure, blockquote {
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    color: #fdfffa;
    letter-spacing: -0.040em;
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 3vw, 3.4rem);
}

h3 {
    font-size: clamp(1.3rem, 1.6vw, 1.7rem);
}

p,
li,
figcaption {
    color: #aeb4c2;
    font-size: 1.02rem;
}

a,
button {
    cursor: pointer;
}

.section,
.section-inner {
    position: relative;
    width: min(100% - 6vw, var(--pull));
    margin-inline: auto;
}

.section {
    padding-block: 7rem 4rem;
}

.section + .section {
    padding-top: 3rem;
}

.muted {
    color: var(--muted);
}

.centered {
    text-align: center;
}

.pill,
.btn {
    border-radius: 999px;
    border: 1px solid var(--chip-border);
    background: rgba(255, 255, 255, 0.036);
    color: #e9ecf2;
    padding: .54rem 1rem;
    font-size: .76rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    width: fit-content;
    font-family: 'IBM Plex Mono', monospace;
}

.pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.pill-ghost::before {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.btn.primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #051003;
    font-weight: 700;
}

.btn.primary:hover {
    background: color-mix(in srgb, var(--accent) 88%, #ffffff);
    border-color: color-mix(in srgb, var(--accent) 88%, #ffffff);
    transform: translateY(-1px);
}

.btn.subtle:hover {
    background: rgba(255, 255, 255, 0.09);
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    z-index: 30;
    top: 0;
    padding: .9rem 2rem;
    backdrop-filter: blur(14px);
    background: rgba(8,10,13,.78);
    border-bottom: 1px solid var(--line);
}

.site-nav,
.footer-inner {
    margin: 0 auto;
    max-width: var(--pull);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-brand,
.footer-links {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.site-brand-mark,
.footer-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--accent);
    color: #050b03;
    font-weight: 800;
    font-family: 'IBM Plex Mono', monospace;
}

.site-brand-name {
    font-weight: 700;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.site-nav-cta,
.footer-link {
    font-size: .9rem;
}

.site-nav-cta {
    border: 1px solid var(--chip-border);
    padding: .5rem .9rem;
    border-radius: 999px;
    color: var(--muted);
}

.site-nav-cta:hover {
    color: var(--page-fg);
    background: rgba(255,255,255,.06);
}

.main,
.site-main {
    flex: 1;
}

.hero {
    position: relative;
    padding: 6rem 2rem 2rem;
    overflow: hidden;
}

.hero::after,
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.hero::after {
    background: radial-gradient(720px 480px at 78% 32%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 72%);
}

.hero-inner {
    max-width: var(--pull);
    margin: 0 auto;
    display: grid;
    gap: 4rem;
    grid-template-columns: 1fr 350px;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin: 1.2rem 0 1.3rem;
    line-height: 1.05;
}

.accent {
    color: var(--accent);
}

.hero-text {
    max-width: 56ch;
}

.hero-actions {
    margin-top: 1.8rem;
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
}

.hero-card {
    position: relative;
    border: 1px solid var(--line);
    background: linear-gradient(155deg, rgba(255,255,255,.055), rgba(255,255,255,0.02));
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: 0 45px 90px rgba(0,0,0,.38);
}

.hero-card-top {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--muted);
    font-size: .8rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.dot.green {
    background: #79ff83;
}

.dot.amber {
    background: #ffd876;
}

.dot.rose {
    background: #ff7d90;
}

.dot.rose {
    background: #ff7d90;
}

.hero-card-body {
    margin-top: 1.2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: .82rem;
    line-height: 1.9;
}

.kline {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.15);
    margin-bottom: .7rem;
}

.kline.short {
    width: 60%;
}

.grid-tile {
    display: inline-flexbox;
    width: 60px;
    height: 6px;
    margin-right: 6px;
    border-radius: 4px;
    background: rgba(255,255,255,.1);
}

.grid-tile.small {
    width: 34px;
}

.hero-stats {
    max-width: var(--pull);
    margin: 3rem auto 1rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-block: 1rem;
}

.hero-stats .meta {
    display: grid;
    gap: .25rem;
    font-size: .8rem;
    color: var(--muted);
    border-right: 1px solid var(--line);
    padding-inline: 1rem;
}

.hero-stats .stat {
    color: var(--page-fg);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
}

.section-head {
    max-width: 72ch;
}

.section-head h2 + p {
    margin-top: .9rem;
}

.section-head p,
.section-head h2 {
    margin: 0;
}

.service-grid {
    margin-top: 2.4rem;
    display: grid;
    gap: 1rem;
    /* Stable 2x2 on desktop regardless of window width; the min(100%) guard
       collapses cleanly to one column on phones without overflow. */
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.service-card {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    min-height: 290px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.service-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.service-card p {
    margin: 0;
    line-height: 1.65;
    flex: 1;
}

.service-list {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.service-list li {
    border: 1px solid var(--chip-border);
    border-radius: 999px;
    padding: .34rem .7rem;
    font-size: .75rem;
    color: #d9dce4;
}

.work-grid {
    margin-top: 2.4rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.work-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
}

.work-media {
    height: 260px;
    background: linear-gradient(150deg, rgba(255,255,255,.06), rgba(255,255,255,0));
    object-fit: cover;
}

.work-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-art {
    height: 100%;
    background: linear-gradient(45deg, color-mix(in srgb, var(--project-accent, var(--accent)) 45%, transparent), rgba(255,255,255,.05));
    display: grid;
    place-items: center;
    font-family: 'IBM Plex Mono', monospace;
    color: rgba(255,255,255,.3);
}

.work-index {
    font-size: .68rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    opacity: .55;
}

.work-body {
    padding: 1.4rem;
}

.work-card h3 {
    margin: .5rem 0 .4rem;
}

.process .process-grid {
    counter-reset: b;
    list-style: none;
    margin-top: 2.4rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.process-card {
    border: 1px solid var(--line);
    padding: 1.8rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.process-card .num {
    color: var(--accent);
    font-family: 'IBM Plex Mono', monospace;
    font-size: .8rem;
    letter-spacing: .18em;
}

.process-card h3 {
    margin-top: .4rem;
}

.process-card ul {
    list-style: none;
    padding: 0;
    margin-top: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    font-size: .78rem;
    color: var(--muted);
}

.split {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1.1fr .9fr;
    align-items: start;
}

.about-visual {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* The container clip above is a paint-time effect and Android Chrome can
   skip it for lazy-loaded <img> content in an auto-height box, so round the
   image itself too. Same radius, no reliance on container clipping. */
.about-visual img {
    border-radius: inherit;
}

.about-art {
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 26%, transparent), rgba(255,255,255,.03));
    height: 380px;
    display: grid;
    place-items: center;
    font-family: 'IBM Plex Mono', monospace;
    color: rgba(255,255,255,.2);
}

.principles {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.principles div {
    border-left: 1px solid rgba(255,255,255,.14);
    padding-left: 1rem;
}

.principles h3 {
    font-size: .95rem;
    color: var(--page-fg);
}

.principles p {
    font-size: .82rem;
}

.testimonial-grid {
    margin-top: 2.2rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.testimonial-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 1.7rem;
}

.testimonial-card blockquote {
    font-size: 1rem;
    color: #dfe4ec;
    line-height: 1.65;
}

.testimonial-card figcaption {
    margin-top: 1.2rem;
    color: var(--muted);
    margin-top: 1.3rem;
    font-size: .78rem;
}

.meta-list {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

.meta-list li {
    border-top: 1px solid var(--line);
    padding: .7rem 0;
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    color: var(--muted);
}

.contact-card {
    border: 1px solid var(--line);
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    padding: 1.7rem;
}

.contact-card h3 {
    margin-bottom: .4rem;
}

.contact-card p {
    margin-bottom: 1.2rem;
    font-size: .86rem;
    color: var(--muted);
}

.contact-form .field,
.footer-inner {
    margin-bottom: .95rem;
}

.field label {
    display: block;
    margin-bottom: .3rem;
    font-size: .78rem;
    color: var(--muted);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: .8rem;
    border: 1px solid var(--chip-border);
    border-radius: 10px;
    background: rgba(6,8,11,.65);
    color: #f2f4f8;
    outline: none;
    transition: border-color .18s ease, background-color .18s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    background: rgba(8,11,16,.9);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: .95rem;
}

textarea {
    resize: vertical;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #04070a99;
    padding: 1rem 2rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-text {
    max-width: 360px;
    margin: 0;
    color: var(--muted);
    font-size: .82rem;
}

.footer-links {
    gap: 1rem;
    font-size: .82rem;
    color: var(--muted);
}

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

.footer-copyright {
    color: var(--muted);
    font-size: .72rem;
    margin: 0;
}

@media (max-width: 860px) {
    .site-header padding {
        padding-inline: 1rem;
    }

    .site-nav {
        flex-direction: row;
        align-items: center;
        gap: .8rem;
        flex-wrap: wrap;
    }

    .site-nav-links {
        order: 3;
        justify-content: center;
        width: 100%;
        font-size: .8rem;
    }

    .hero {
        padding-top: 4rem;
    }

    .hero-inner,
    .split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .site-brand,
    .site-nav-links,
    .site-nav-cta {
        font-size: .82rem;
    }

    .site-nav-cta {
        padding: .45rem .65rem;
    }

    .hero-actions {
        gap: .5rem;
    }

    .footer-inner {
        justify-content: center;
        text-align: center;
    }
}

/* ------------------------------------------------------------------ *
 * Accessibility + legal page
 * ------------------------------------------------------------------ */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--accent);
    color: #051003;
    font-weight: 700;
    padding: .7rem 1.2rem;
    border-radius: 0 0 10px 0;
}

.skip-link:focus {
    left: 0;
    top: 0;
    outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.btn.primary:focus-visible,
.site-nav-cta:focus-visible,
.btn--primary:focus-visible {
    outline-color: #fff;
}

.legal-page .section-head h1 {
    margin: .6rem 0 0;
}

.section-inner.narrow {
    max-width: 720px;
}

.legal-body p {
    color: #b9c0cb;
    margin: 0 0 1.1rem;
    line-height: 1.75;
}

.legal-updated {
    color: var(--muted);
    font-size: .82rem;
    margin-top: 2rem;
}

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

/* ---- Home: scrolling focus ticker ---------------------------------------- */

.ticker {
    overflow: hidden;
    padding-block: 3rem;
}

.ticker-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: ticker-scroll 32s linear infinite;
}

.ticker-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 1.5rem;
    padding-inline: 1.5rem;
}

.state-text {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tick {
    color: var(--accent);
}

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

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

@media (prefers-reduced-motion: reduce) {
    .ticker-track {
        animation: none !important;
        width: auto;
        flex-wrap: wrap;
        justify-content: center;
    }

    .ticker-group[aria-hidden="true"] {
        display: none;
    }
}

/* ---- Client logo wall --------------------------------------------------- */

.logo-wall {
    list-style: none;
    margin: 2.2rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2.4rem;
}

.logo-wall li {
    display: flex;
}

.logo-wall img {
    max-height: 30px;
    width: auto;
    filter: grayscale(1);
    opacity: .65;
    transition: opacity .18s ease, filter .18s ease;
}

.logo-wall a:hover img,
.logo-wall img:hover {
    filter: grayscale(0);
    opacity: 1;
}

.logo-wall span {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: .92rem;
    letter-spacing: .04em;
    color: var(--muted);
    transition: color .18s ease;
}

.logo-wall a:hover span,
.logo-wall span:hover {
    color: var(--page-fg);
}

/* ---- Writing: homepage list --------------------------------------------- */

.post-list {
    list-style: none;
    margin: 2.2rem 0 0;
    padding: 0;
}

.post-list li {
    border-top: 1px solid var(--line);
}

.post-list li:last-child {
    border-bottom: 1px solid var(--line);
}

.post-list a {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: .2rem 1.6rem;
    padding: 1.3rem 0;
    align-items: baseline;
}

.post-list .post-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .78rem;
    color: var(--muted);
    letter-spacing: .04em;
}

.post-list .post-title {
    font-weight: 700;
    font-size: 1.08rem;
    color: var(--page-fg);
    transition: color .18s ease;
}

.post-list a:hover .post-title {
    color: var(--accent);
}

.post-list .post-summary {
    grid-column: 2;
    color: var(--muted);
    font-size: .9rem;
    margin: .25rem 0 0;
    max-width: 64ch;
}

.writing .btn {
    margin-top: 1.8rem;
}

/* ---- Writing: archive page ---------------------------------------------- */

.writing-page .section-head h1 {
    margin: .6rem 0 0;
}

.post-list--full {
    margin-top: 3rem;
}

.post-list--full li {
    border: 0;
}

.post-list--full li:last-child {
    border: 0;
}

.post {
    padding-block: 2.4rem;
    border-top: 1px solid var(--line);
    scroll-margin-top: 5rem;
}

.post h2 {
    margin: .4rem 0 0;
    font-size: 1.5rem;
}

.post .post-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .78rem;
    color: var(--muted);
    letter-spacing: .04em;
}

.post .post-summary {
    margin: .8rem 0 0;
    color: #c3cbd6;
    max-width: 68ch;
    line-height: 1.65;
}

.post-body {
    margin-top: 1.1rem;
}

.post-body p {
    color: #b9c0cb;
    margin: 0 0 1.1rem;
    line-height: 1.75;
    max-width: 72ch;
}

/* ---- FAQ accordion ------------------------------------------------------ */

.faq-list {
    margin-top: 2.2rem;
    display: grid;
    gap: .8rem;
}

.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 0 1.4rem;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 0;
    font-weight: 600;
    color: var(--page-fg);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.1rem;
    color: var(--accent);
    flex-shrink: 0;
    transition: transform .18s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding-bottom: 1.2rem;
}

.faq-answer p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    max-width: 74ch;
}

@media (max-width: 700px) {
    .post-list a {
        grid-template-columns: 1fr;
    }

    .post-list .post-summary {
        grid-column: 1;
    }
}
