/*
 * Lutz Computer Services — "drafting table".
 *
 * The promise a custom-software buyer is actually buying is that somebody
 * measured before they cut. So the page is built like a technical drawing:
 * hairline rules, monospace annotation, everything on a grid, nothing
 * decorative that isn't also carrying information.
 *
 * Colour is spent in one place. --signal is a drafting-pencil red and it
 * marks exactly three kinds of thing: the current page, a primary action,
 * and a live link. Everywhere else is paper, graphite and rule.
 */

/* ---------------------------------------------------------------- tokens */

:root {
    /* A cool vellum, not cream — the ground is a drawing surface. */
    --paper: #f2f4f3;
    --paper-raised: #ffffff;
    --paper-sunk: #e9ecea;

    --ink: #131917;
    --graphite: #58635f;
    --graphite-light: #7d8783;

    --rule: #d6dbd9;
    --rule-soft: #e5e9e7;

    --signal: #c93f1d;
    --signal-hover: #a83318;
    --signal-ink: #ffffff;
    --signal-wash: rgba(201, 63, 29, 0.08);

    --blueprint: #23606e;

    --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --measure: 66ch;
    --wrap: 1180px;
    --gutter: clamp(1.25rem, 4vw, 3rem);

    --step: 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #0e1312;
        --paper-raised: #161c1a;
        --paper-sunk: #0a0e0d;

        --ink: #e9eeec;
        --graphite: #97a29e;
        --graphite-light: #77817d;

        --rule: #262f2c;
        --rule-soft: #1c2321;

        --signal: #ef6238;
        --signal-hover: #f47d59;
        --signal-ink: #10100f;
        --signal-wash: rgba(239, 98, 56, 0.12);

        --blueprint: #5ca3b4;
    }
}

:root[data-theme="dark"] {
    --paper: #0e1312;
    --paper-raised: #161c1a;
    --paper-sunk: #0a0e0d;

    --ink: #e9eeec;
    --graphite: #97a29e;
    --graphite-light: #77817d;

    --rule: #262f2c;
    --rule-soft: #1c2321;

    --signal: #ef6238;
    --signal-hover: #f47d59;
    --signal-ink: #10100f;
    --signal-wash: rgba(239, 98, 56, 0.12);

    --blueprint: #5ca3b4;
}

:root[data-theme="light"] {
    --paper: #f2f4f3;
    --paper-raised: #ffffff;
    --paper-sunk: #e9ecea;
    --ink: #131917;
    --graphite: #58635f;
    --graphite-light: #7d8783;
    --rule: #d6dbd9;
    --rule-soft: #e5e9e7;
    --signal: #c93f1d;
    --signal-hover: #a83318;
    --signal-ink: #ffffff;
    --signal-wash: rgba(201, 63, 29, 0.08);
    --blueprint: #23606e;
}

/* ------------------------------------------------------------------ base */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.65;
    font-feature-settings: "kern" 1;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.08;
    text-wrap: balance;
    margin: 0;
}

p {
    margin: 0 0 1.1em;
    max-width: var(--measure);
}

a {
    color: var(--signal);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition: color var(--step);
}

a:hover {
    color: var(--signal-hover);
}

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
    border-radius: 2px;
}

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

hr {
    border: 0;
    border-top: 1px solid var(--rule);
    margin: 0;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: var(--paper);
    padding: 0.7rem 1.1rem;
    z-index: 100;
    font-family: var(--mono);
    font-size: 0.8rem;
}

.skip:focus {
    left: 0.5rem;
    top: 0.5rem;
}

/* --------------------------------------------------------- the annotation */

/* Monospace, letterspaced, always paired with a rule. This is the site's
   one recurring device and it earns its place: every label says what the
   block below it actually is. */
.eyebrow {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--graphite);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 0 1.6rem;
}

.eyebrow::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.eyebrow--tick::before {
    content: "";
    width: 7px;
    height: 7px;
    background: var(--signal);
    flex: none;
}

/* ------------------------------------------------------------------- nav */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(1.6) blur(10px);
    border-bottom: 1px solid var(--rule);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
}

.brand__mark {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--signal-ink);
    background: var(--signal);
    padding: 0.18rem 0.4rem;
    align-self: center;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    padding-block: 0.4rem;
    border-bottom: 2px solid transparent;
    transition: border-color var(--step), color var(--step);
}

.nav__links a:hover {
    color: var(--signal);
}

.nav__links a[aria-current="page"] {
    border-bottom-color: var(--signal);
}

.nav__toggle {
    display: none;
    background: none;
    border: 1px solid var(--rule);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    padding: 0.45rem 0.7rem;
    cursor: pointer;
}

@media (max-width: 800px) {
    .nav__toggle {
        display: block;
    }

    .nav__links {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--paper-raised);
        border-bottom: 1px solid var(--rule);
        padding: 0.5rem var(--gutter) 1rem;
    }

    .nav__links.is-open {
        display: flex;
    }

    .nav__links a {
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--rule-soft);
    }

    .nav__links a[aria-current="page"] {
        color: var(--signal);
        border-bottom-color: var(--rule-soft);
    }
}

/* ------------------------------------------------------------------ hero */

.hero {
    position: relative;
    padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
    border-bottom: 1px solid var(--rule);
    overflow: hidden;
}

/* The drawing surface itself: a 32px drafting grid, barely there. It reads
   as texture at a glance and as graph paper if you look. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--rule-soft) 1px, transparent 1px),
        linear-gradient(to bottom, var(--rule-soft) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 80% 70% at 30% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 0%, #000 0%, transparent 75%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

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

.hero h1 {
    font-size: clamp(2.4rem, 6.2vw, 4.15rem);
    font-weight: 800;
    letter-spacing: -0.034em;
    margin-bottom: 1.4rem;
}

.hero h1 em {
    font-style: normal;
    color: var(--signal);
}

.hero__lede {
    font-size: clamp(1.05rem, 1.9vw, 1.24rem);
    color: var(--graphite);
    max-width: 46ch;
    margin-bottom: 2rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: center;
}

/* The spec block: the hero's evidence, not decoration. Reads like the title
   block on a drawing. */
.spec {
    border: 1px solid var(--rule);
    background: var(--paper-raised);
}

.spec__row {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--rule-soft);
    align-items: baseline;
}

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

.spec__key {
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--graphite-light);
}

.spec__val {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink);
}

/* --------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--body);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.9rem 1.4rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--step), color var(--step), border-color var(--step), transform var(--step);
}

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

.btn--primary {
    background: var(--signal);
    color: var(--signal-ink);
}

.btn--primary:hover {
    background: var(--signal-hover);
    color: var(--signal-ink);
}

.btn--ghost {
    border-color: var(--rule);
    color: var(--ink);
    background: transparent;
}

.btn--ghost:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.btn__arrow {
    font-family: var(--mono);
    transition: transform var(--step);
}

.btn:hover .btn__arrow {
    transform: translateX(3px);
}

/* -------------------------------------------------------------- sections */

.section {
    padding-block: clamp(3.25rem, 7vw, 5.5rem);
    border-bottom: 1px solid var(--rule);
}

.section--sunk {
    background: var(--paper-sunk);
}

.section__head {
    max-width: 62ch;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section__head h2 {
    font-size: clamp(1.75rem, 3.6vw, 2.5rem);
    margin-bottom: 0.9rem;
}

.section__head p {
    color: var(--graphite);
    font-size: 1.05rem;
    margin-bottom: 0;
}

/* -------------------------------------------------------------- services */

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}

.service {
    background: var(--paper);
    padding: clamp(1.5rem, 3vw, 2.1rem);
}

.service__num {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: var(--signal);
    display: block;
    margin-bottom: 1rem;
}

.service h3 {
    font-size: 1.15rem;
    margin-bottom: 0.7rem;
}

.service p {
    color: var(--graphite);
    font-size: 0.94rem;
    margin-bottom: 0;
    max-width: none;
}

/* ------------------------------------------------------------------ work */

.case {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding-block: clamp(2.5rem, 5vw, 3.75rem);
    border-bottom: 1px solid var(--rule-soft);
}

.case:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.case:nth-child(even) .case__media {
    order: -1;
}

@media (max-width: 860px) {
    .case {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .case:nth-child(even) .case__media {
        order: 0;
    }
}

.case__label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--graphite-light);
    margin-bottom: 0.9rem;
    display: block;
}

.case h3 {
    font-size: clamp(1.45rem, 3vw, 1.95rem);
    margin-bottom: 0.85rem;
}

.case p {
    color: var(--graphite);
}

.case__stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1.3rem 0 1.5rem;
    padding: 0;
    list-style: none;
}

.case__stack li {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: var(--graphite);
    border: 1px solid var(--rule);
    padding: 0.28rem 0.5rem;
    background: var(--paper-raised);
}

.case__media {
    position: relative;
}

/* Screenshots sit on the drawing surface with a hairline and a corner tick,
   so a screen reads as a plate on a drawing rather than a floating image. */
.plate {
    border: 1px solid var(--rule);
    background: var(--paper-raised);
    padding: clamp(0.75rem, 2vw, 1.25rem);
    position: relative;
}

.plate::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 14px;
    height: 14px;
    border-right: 2px solid var(--signal);
    border-bottom: 2px solid var(--signal);
}

.plate img {
    width: 100%;
}

.plate--phones {
    display: flex;
    gap: clamp(0.6rem, 2vw, 1rem);
    align-items: flex-start;
}

.plate--phones img {
    flex: 1;
    min-width: 0;
}

.plate--phones img:nth-child(3) {
    display: none;
}

@media (min-width: 640px) {
    .plate--phones img:nth-child(3) {
        display: block;
    }
}

/* --------------------------------------------------------------- process */

.process {
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

/* Numbered because it genuinely is a sequence — you cannot build before you
   scope. Nothing else on this site is numbered. */
.step {
    counter-increment: step;
    border-top: 2px solid var(--ink);
    padding-top: 1.1rem;
}

.step::before {
    content: counter(step, decimal-leading-zero);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--signal);
    display: block;
    margin-bottom: 0.7rem;
}

.step h3 {
    font-size: 1.08rem;
    margin-bottom: 0.55rem;
}

.step p {
    color: var(--graphite);
    font-size: 0.93rem;
    margin-bottom: 0;
    max-width: none;
}

/* ----------------------------------------------------------------- about */

.about {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

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

.about__lede {
    font-size: 1.14rem;
    color: var(--ink);
}

/* ------------------------------------------------------------------- cta */

.cta {
    padding-block: clamp(3.5rem, 8vw, 6rem);
    text-align: center;
    border-bottom: 1px solid var(--rule);
}

.cta h2 {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    margin-bottom: 1rem;
}

.cta p {
    color: var(--graphite);
    font-size: 1.08rem;
    margin-inline: auto;
    margin-bottom: 2rem;
    max-width: 52ch;
}

/* ----------------------------------------------------------------- forms */

.form {
    display: grid;
    gap: 1.4rem;
    max-width: 40rem;
}

.field label {
    display: block;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--graphite);
    margin-bottom: 0.5rem;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    font-family: var(--body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--paper-raised);
    border: 1px solid var(--rule);
    padding: 0.8rem 0.9rem;
    transition: border-color var(--step), box-shadow var(--step);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--signal);
    box-shadow: 0 0 0 3px var(--signal-wash);
}

.field textarea {
    min-height: 9rem;
    resize: vertical;
}

.field__error {
    display: block;
    color: var(--signal);
    font-size: 0.85rem;
    margin-top: 0.4rem;
}

.field--honey {
    position: absolute;
    left: -9999px;
}

.notice {
    border: 1px solid var(--rule);
    border-left: 3px solid var(--signal);
    background: var(--paper-raised);
    padding: 1rem 1.2rem;
    margin-bottom: 2rem;
}

.notice p {
    margin: 0;
}

/* ------------------------------------------------------------- long copy */

.prose {
    max-width: var(--measure);
}

.prose h2 {
    font-size: 1.45rem;
    margin: 2.6rem 0 0.9rem;
}

.prose h3 {
    font-size: 1.12rem;
    margin: 1.9rem 0 0.6rem;
}

.prose ul,
.prose ol {
    color: var(--graphite);
    padding-left: 1.2rem;
    margin: 0 0 1.1em;
}

.prose li {
    margin-bottom: 0.45rem;
}

.prose p {
    color: var(--graphite);
}

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

/* ---------------------------------------------------------------- footer */

.footer {
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
    font-size: 0.9rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

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

    .footer__brand {
        grid-column: 1 / -1;
    }
}

.footer h4 {
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--graphite-light);
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer li {
    margin-bottom: 0.55rem;
}

.footer a {
    color: var(--graphite);
    text-decoration: none;
}

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

.footer__brand p {
    color: var(--graphite);
    font-size: 0.9rem;
    max-width: 34ch;
    margin-top: 0.9rem;
}

.footer__base {
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    color: var(--graphite-light);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
}

/* ----------------------------------------------------------- error pages */

.fault {
    min-height: 72vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding-block: 4rem;
    position: relative;
}

.fault__code {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--signal);
    margin-bottom: 1.5rem;
}

.fault h1 {
    font-size: clamp(2rem, 6vw, 3.4rem);
    margin-bottom: 1rem;
}

.fault p {
    color: var(--graphite);
    margin-inline: auto;
    max-width: 46ch;
    margin-bottom: 2rem;
}

/* --------------------------------------------------------------- utility */

.stack > * + * {
    margin-top: 1.1rem;
}

.lede {
    font-size: 1.12rem;
    color: var(--graphite);
}

.tabular {
    font-variant-numeric: tabular-nums;
}

.page-head {
    padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--rule);
}

.page-head h1 {
    font-size: clamp(2.1rem, 5.2vw, 3.3rem);
    margin-bottom: 1rem;
}

.page-head p {
    color: var(--graphite);
    font-size: 1.08rem;
    max-width: 54ch;
    margin-bottom: 0;
}

/* ------------------------------------------------- contextual variations */

/* Centred, so the trailing rule that anchors it left would be wrong here. */
.cta .eyebrow {
    justify-content: center;
}

.cta .eyebrow::after {
    display: none;
}

.cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
}

/* The single case block on a case-study page has no sibling to divide from. */
.case--solo {
    border-bottom: 0;
    padding-top: 0;
}

.about__title {
    font-size: clamp(1.75rem, 3.6vw, 2.5rem);
    margin-bottom: 1.1rem;
}

/* A whole service card that is a link to another case study. */
.service--link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: background var(--step);
}

.service--link:hover {
    background: var(--paper-raised);
    color: inherit;
}

.service--link:hover h3 {
    color: var(--signal);
}

/* "(optional)" sits inside a monospace uppercase label and should not
   inherit either. */
.label-optional {
    text-transform: none;
    letter-spacing: 0;
    color: var(--graphite-light);
}
