@font-face {
    font-family: "Zilla Slab";
    src: url("fonts/zilla-slab-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Zilla Slab";
    src: url("fonts/zilla-slab-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Work Sans";
    src: url("fonts/work-sans.woff2") format("woff2");
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}

:root {
    /* primer on new drywall, logo black, spf studs, the grey siding on half their houses, the saw in the logo, tape blade */
    --primer: #f4f4f1;
    --white: #ffffff;
    --ink: #1f1d1a;
    --ink-soft: #4a4640;
    --stud: #dcc08f;
    --stud-light: #efe3cb;
    --siding: #3c4650;
    --siding-dark: #2c343c;
    --saw: #a8263b;
    --saw-dark: #8a1d30;
    --tape: #efc02b;

    --display: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
    --body: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --max-width: 1180px;
    --gutter: clamp(20px, 4vw, 40px);
    --radius-s: 4px;
    --radius-m: 8px;
    --section: clamp(72px, 10vw, 128px);
}

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

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

html.lenis-smooth {
    scroll-behavior: auto !important;
}

body {
    margin: 0;
    background: var(--primer);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: inherit;
}

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

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

h3 {
    font-size: 1.3rem;
    line-height: 1.2;
}

p {
    margin: 0;
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--saw);
    outline-offset: 3px;
}

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

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 14px;
    background: var(--ink);
    color: var(--white);
    border-radius: var(--radius-s);
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

/* --- phone bar --- */
.phone-bar {
    background: var(--siding-dark);
    color: #d9dee2;
    font-size: 0.875rem;
}

.phone-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 40px;
}

.phone-bar-calls {
    display: flex;
    gap: 22px;
}

.phone-bar a {
    text-decoration: none;
    padding: 10px 0;
}

.phone-bar a strong {
    color: var(--white);
    font-weight: 600;
    margin-left: 4px;
}

.phone-bar a:hover strong {
    text-decoration: underline;
}

/* --- header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--white);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
    border-bottom-color: #e2e0da;
    box-shadow: 0 2px 14px rgba(31, 29, 26, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 84px;
}

.brand {
    display: block;
    text-decoration: none;
    flex: 0 0 auto;
}

.brand-logo {
    display: block;
    width: 150px;
    height: auto;
}

.brand-logo text {
    font-family: var(--display);
    font-weight: 700;
    fill: var(--ink);
}

.brand-logo-top {
    font-size: 34px;
}

.brand-logo-bottom {
    font-size: 27px;
}

.brand-name,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 500;
}

.site-nav a {
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a.is-active {
    border-bottom-color: var(--stud);
}

.site-nav .nav-call {
    background: var(--saw);
    color: var(--white);
    padding: 11px 18px;
    border-radius: var(--radius-s);
    border: 0;
}

.site-nav .nav-call:hover {
    background: var(--saw-dark);
}

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    background: var(--primer);
    border-radius: var(--radius-s);
    position: relative;
}

.nav-toggle span {
    position: absolute;
    left: 13px;
    right: 13px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.25s ease, top 0.25s ease;
}

.nav-toggle span:first-child {
    top: 19px;
}

.nav-toggle span:last-child {
    top: 27px;
}

.nav-open .nav-toggle span:first-child {
    top: 23px;
    transform: rotate(45deg);
}

.nav-open .nav-toggle span:last-child {
    top: 23px;
    transform: rotate(-45deg);
}

/* --- buttons --- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border-radius: var(--radius-s);
    font-weight: 600;
    text-decoration: none;
}

.button-saw {
    background: var(--saw);
    color: var(--white);
}

.button-saw:hover {
    background: var(--saw-dark);
}

.text-link {
    font-weight: 500;
    text-underline-offset: 4px;
    text-decoration-color: var(--stud);
    text-decoration-thickness: 2px;
    padding: 12px 0;
}

.text-link:hover {
    text-decoration-color: var(--ink);
}

/* --- hero --- */
.hero {
    padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 104px);
    background: var(--white);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.hero-title {
    font-size: clamp(2.6rem, 6.2vw, 4.6rem);
    max-width: 12ch;
}

.hero-lede {
    margin-top: 24px;
    max-width: 52ch;
    font-size: 1.15rem;
    color: var(--ink-soft);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 32px;
}

.hero-cred {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e4e1da;
    max-width: 52ch;
    font-size: 0.9375rem;
    color: var(--ink-soft);
}

.hero-photo {
    margin: 0;
    background: var(--white);
    padding: 12px 12px 0;
    box-shadow: 0 1px 0 #e4e1da, 0 18px 40px -18px rgba(31, 29, 26, 0.35);
    transform: rotate(1.2deg);
}

.hero-photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hero-photo figcaption {
    padding: 10px 2px 12px;
    font-size: 0.875rem;
    color: var(--ink-soft);
}

/* --- job log + tape --- */
.jobs {
    padding: var(--section) 0 calc(var(--section) * 0.8);
    background: var(--stud-light);
    overflow: hidden;
}

.jobs-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px 48px;
    align-items: end;
}

.jobs-head p {
    max-width: 46ch;
    color: var(--ink-soft);
}

.job-view-wrap {
    margin-top: 40px;
    display: grid;
    grid-template-columns: minmax(0, 700px) minmax(0, 1fr);
    gap: 24px clamp(32px, 5vw, 64px);
    align-items: end;
}

.job-view {
    margin: 0;
    display: grid;
    gap: 18px;
}

.job-view-side {
    display: grid;
    gap: 28px;
    align-content: end;
}

.job-photo {
    background: var(--ink);
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-s);
}

.job-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.job-caption {
    display: grid;
    gap: 6px;
    padding-bottom: 6px;
}

.job-caption strong {
    font-family: var(--display);
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    line-height: 1.15;
}

.job-caption span {
    color: var(--ink-soft);
}

.job-kind {
    justify-self: start;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--white);
    color: var(--ink) !important;
}

.job-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.job-filter {
    text-align: left;
    min-height: 44px;
    padding: 0 14px;
    border-radius: var(--radius-s);
    background: transparent;
    border: 1px solid rgba(31, 29, 26, 0.2);
    font-weight: 500;
}

.job-filter:hover {
    background: rgba(255, 255, 255, 0.6);
}

.job-filter[aria-pressed="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

.tape {
    position: relative;
    margin-top: 48px;
}

.tape-window {
    position: relative;
    height: 112px;
    overflow-x: auto;
    overflow-y: hidden;
}

.tape-blade {
    display: flex;
    width: max-content;
    height: 72px;
    margin-top: 20px;
    padding: 0 calc(var(--gutter) + 24px);
    background-color: var(--tape);
    background-image:
        repeating-linear-gradient(to right, var(--ink) 0 2px, transparent 2px 160px),
        repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 40px),
        repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 10px);
    background-size: 100% 26px, 100% 16px, 100% 9px;
    background-repeat: no-repeat;
    background-position: 0 0;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 6px 14px -8px rgba(31, 29, 26, 0.5);
    border-radius: 2px;
}

.tape-mark {
    position: relative;
    flex: 0 0 160px;
    height: 72px;
    display: flex;
    align-items: flex-end;
    padding: 0 0 8px 8px;
    text-align: left;
    background: transparent;
}

.tape-year {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--ink);
    transition: color 0.2s ease;
}

.tape-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.tape-mark:hover .tape-year {
    color: var(--saw-dark);
}

.tape-mark[aria-checked="true"] .tape-year {
    color: var(--saw);
}

.tape-mark:focus-visible {
    outline-offset: -3px;
}

.tape-case,
.tape-hook {
    display: none;
}

.tape-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

.tape-step {
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--radius-s);
    background: var(--white);
    border: 1px solid rgba(31, 29, 26, 0.18);
    font-weight: 600;
}

.tape-step:hover {
    border-color: var(--ink);
}

.tape-step:disabled {
    opacity: 0.4;
    cursor: default;
}

.tape-count {
    font-size: 0.9375rem;
    color: var(--ink-soft);
    min-width: 7ch;
    text-align: center;
}

/* with js the blade slides under a fixed hook instead of scrolling */
.js .tape-window {
    overflow: hidden;
    margin-left: calc(var(--gutter) + 50px);
    cursor: grab;
    touch-action: pan-y;
}

.js .tape-window.is-dragging {
    cursor: grabbing;
}

.js .tape-blade {
    padding: 0 50vw;
    will-change: transform;
}

.js .tape-mark {
    flex-basis: 160px;
    justify-content: center;
    padding-left: 0;
}

.js .tape-hook {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    margin-left: -1.5px;
    background: var(--saw);
    z-index: 2;
    pointer-events: none;
}

.js .tape-hook::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top: 11px solid var(--saw);
    border-bottom: 0;
}

.js .tape-case {
    display: grid;
    place-items: center;
    position: absolute;
    left: calc(var(--gutter) - 12px);
    top: -8px;
    width: 128px;
    height: 128px;
    z-index: 3;
    background: var(--ink);
    border-radius: 26px 26px 26px 8px;
    box-shadow: inset 0 0 0 10px #2c2a26, 0 12px 24px -10px rgba(0, 0, 0, 0.5);
}

.js .tape-case::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 48px;
    width: 12px;
    height: 32px;
    background: #2c2a26;
    border-radius: 0 3px 3px 0;
}

.tape-case-badge {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--saw);
    color: var(--white);
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.15rem;
}

.js .tape-controls {
    justify-content: center;
}

/* --- what we build --- */
.work {
    padding: var(--section) 0;
}

.work-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 40px clamp(40px, 6vw, 96px);
}

.work-head {
    align-self: start;
    position: sticky;
    top: 120px;
}

.work-head p {
    margin-top: 20px;
    max-width: 40ch;
    color: var(--ink-soft);
}

.work-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 40px;
}

.work-group {
    padding-top: 18px;
    border-top: 3px solid var(--stud);
}

.work-group p {
    margin-top: 10px;
    color: var(--ink-soft);
}

.badges {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 56px;
}

.badges img {
    height: 72px;
    width: auto;
    mix-blend-mode: multiply;
}

/* --- references --- */
.letters {
    padding: var(--section) 0;
    background: var(--siding);
    color: #eef1f3;
}

.letters-intro {
    margin-top: 14px;
    color: #c4ccd2;
}

.letter-list {
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 56px;
}

.letter {
    margin: 0;
    padding-left: 22px;
    border-left: 3px solid var(--stud);
}

.letter p {
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.22rem;
    line-height: 1.45;
}

.letter footer {
    margin-top: 14px;
    font-size: 0.9375rem;
    color: #c4ccd2;
}

/* --- faq --- */
.faq {
    padding: var(--section) 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 32px clamp(40px, 6vw, 96px);
}

.faq-list {
    border-top: 1px solid #d8d5ce;
}

.faq-item {
    border-bottom: 1px solid #d8d5ce;
}

.faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 22px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

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

.faq-item summary::after {
    content: "";
    flex: 0 0 14px;
    height: 14px;
    background:
        linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
        linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat;
    transition: transform 0.3s ease;
}

.faq-item.is-open summary {
    color: var(--saw);
}

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

.faq-answer {
    overflow: hidden;
    padding-bottom: 24px;
    max-width: 62ch;
    color: var(--ink-soft);
}

/* --- footer --- */
.site-footer {
    background: var(--ink);
    color: #d8d4cc;
    padding: 72px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 32px;
    align-items: end;
}

.footer-lead {
    font-family: var(--display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--white);
    margin-bottom: 18px;
}

.footer-phone {
    display: block;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
    padding: 4px 0;
}

.footer-phone-small {
    font-size: 1.1rem;
    font-weight: 500;
    color: #d8d4cc;
}

.footer-phone:hover {
    text-decoration: underline;
}

.site-footer address {
    font-style: normal;
    line-height: 1.8;
}

.footer-base {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 56px;
    padding-top: 20px;
    border-top: 1px solid #3a3732;
    font-size: 0.875rem;
}

/* --- simple pages --- */
.page-simple main {
    padding: var(--section) 0;
}

.page-simple h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    margin-bottom: 20px;
}

.policy h2 {
    font-size: 1.5rem;
    margin: 40px 0 12px;
}

.policy p,
.policy li {
    max-width: 68ch;
    color: var(--ink-soft);
}

.policy p + p {
    margin-top: 12px;
}

/* --- small screens --- */
@media (max-width: 960px) {
    .hero-grid,
    .work-grid,
    .faq-grid,
    .jobs-head {
        grid-template-columns: 1fr;
    }

    .work-head {
        position: static;
    }

    .job-view-wrap {
        grid-template-columns: 1fr;
    }

    .job-view {
        grid-template-columns: 1fr;
    }

    .job-filters {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hero-photo {
        max-width: 560px;
    }
}

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

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px var(--gutter) 20px;
        background: var(--white);
        border-bottom: 1px solid #e2e0da;
    }

    .nav-open .site-nav {
        display: flex;
    }

    .site-nav a {
        padding: 14px 0;
        border-bottom: 1px solid #efede8;
    }

    .site-nav .nav-call {
        margin-top: 12px;
        text-align: center;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 1rem;
    }

    .phone-bar-inner > p:first-child {
        display: none;
    }

    .phone-bar-calls {
        width: 100%;
        justify-content: space-between;
    }

    .header-inner {
        min-height: 72px;
    }

    .brand-logo {
        width: 120px;
    }

    .work-lists,
    .letter-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-photo {
        transform: none;
    }

    .js .tape-case {
        width: 92px;
        height: 92px;
        top: 10px;
        border-radius: 20px 20px 20px 6px;
    }

    .js .tape-case::after {
        top: 32px;
        height: 28px;
    }

    .tape-case-badge {
        width: 46px;
        height: 46px;
        font-size: 0.9rem;
    }

    .js .tape-mark {
        flex-basis: 120px;
    }

    .js .tape-window {
        margin-left: calc(var(--gutter) + 34px);
    }

    .tape-year {
        font-size: 1.5rem;
    }

    .badges img {
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

.tape-mark[hidden] {
    display: none;
}
