
.home {
    position: relative;
    /* Use clip so sticky positioning still works. */
    overflow-x: clip;
}

/* Use :where() so class rules can override these margins. */
.home :where(h1, h2, h3, p, ul, ol, dl, dd, figure) {
    margin: 0;
}

.home-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.section {
    position: relative;
    padding-block: clamp(64px, 9vw, 120px);
    border-top: 1px solid var(--line-soft);
}

.section-alt {
    background: var(--panel-alt);
}

.home .sheet-tag {
    margin-bottom: 1.4rem;
}

.home h2 {
    font: 800 clamp(2rem, 4.6vw, 3.5rem) / 1.05 var(--font-display);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.home h3 {
    font: 700 1.2rem/1.25 var(--font-display);
}

.lede,
.section-lede {
    max-width: 36rem;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.section-lede {
    margin-top: 1.25rem;
}



.hero {
    padding-block: clamp(40px, 6vw, 88px) clamp(56px, 8vw, 112px);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(55% 60% at 75% 42%, rgba(245, 151, 9, 0.1), transparent 70%);
}

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

@media (min-width: 1080px) {
    .hero-grid {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    }
}

.hero h1 {
    margin-bottom: 1.5rem;
    font: 800 clamp(2.9rem, 7.4vw, 5.8rem) / 0.98 var(--font-display);
    letter-spacing: -0.035em;
}

.dim-underline {
    position: relative;
    display: inline-block;
    padding-bottom: 0.2em;
    color: var(--amber);
}

.dim-underline::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 12px;
    transform-origin: left center;
    background:
        linear-gradient(var(--measure), var(--measure)) 0 50% / 100% 1px no-repeat,
        linear-gradient(var(--measure), var(--measure)) 0 50% / 1px 100% no-repeat,
        linear-gradient(var(--measure), var(--measure)) 100% 50% / 1px 100% no-repeat;
}

.pro-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 28px;
    max-width: 36rem;
    margin-top: 2.5rem;
    padding: 18px 22px;
    border: 1px solid var(--amber);
    border-left-width: 4px;
    background: linear-gradient(120deg, var(--amber-tint), transparent 70%), var(--panel);
}

.pro-tag {
    display: inline-block;
    margin-bottom: 0.45rem;
    padding: 0.2rem 0.45rem;
    background: var(--amber);
    color: var(--on-accent);
    font: 700 0.65rem/1 var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pro-name {
    font: 700 clamp(1.25rem, 2.4vw, 1.6rem)/1.15 var(--font-display);
    letter-spacing: -0.02em;
}

.hero-sheet {
    position: relative;
    border: 1px solid var(--line);
    background-color: var(--sheet);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    cursor: crosshair;
}

.hero-sheet::before,
.hero-sheet::after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    pointer-events: none;
}

.hero-sheet::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--amber);
    border-left: 2px solid var(--amber);
}

.hero-sheet::after {
    right: -1px;
    bottom: -1px;
    border-right: 2px solid var(--amber);
    border-bottom: 2px solid var(--amber);
}

.drawing {
    display: block;
    width: 100%;
    height: auto;
}

.xhair {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.xhair-x {
    width: 100%;
    height: 0;
    transform: translateY(var(--y, 0px));
    border-top: 1px dashed var(--measure);
}

.xhair-y {
    width: 0;
    height: 100%;
    transform: translateX(var(--x, 0px));
    border-left: 1px dashed var(--measure);
}

.readout {
    position: absolute;
    top: 12px;
    left: 14px;
    opacity: 0;
    pointer-events: none;
    color: var(--measure);
    font: 600 0.72rem/1 var(--font-mono);
    letter-spacing: 0.12em;
    white-space: pre;
    transition: opacity 0.2s;
}

.hero-sheet.is-tracking .xhair {
    opacity: 0.55;
}

.hero-sheet.is-tracking .readout {
    opacity: 1;
}

.title-block {
    position: absolute;
    right: -1px;
    bottom: -1px;
    display: flex;
    border: 1px solid var(--line);
    background: var(--ink);
    color: var(--text);
    font: 600 0.72rem/1.2 var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.title-block span {
    padding: 0.5rem 0.8rem;
    border-left: 1px solid var(--line);
}

.title-block span:first-child {
    border-left: 0;
}

.title-block small {
    display: block;
    color: var(--muted);
    font-size: 0.68rem;
}

/* Drawing line styles: o = outline, f = framing, g = ground, m = measurement, c = callout */
.drawing .o {
    fill: none;
    stroke: var(--amber);
    stroke-width: 2;
    stroke-linejoin: round;
}

.o.roof {
    stroke-width: 4;
}

.o.win {
    fill: var(--sheet);
}

.f {
    fill: none;
    stroke: rgba(235, 231, 221, 0.22);
    stroke-width: 1;
}

.g {
    fill: none;
    stroke: #8a929d;
    stroke-width: 1.5;
}

.m {
    fill: none;
    stroke: var(--measure);
    stroke-width: 1.2;
}

.m.ext {
    stroke-dasharray: 3 4;
    opacity: 0.7;
}

.home svg text {
    fill: var(--measure);
    font: 600 15px var(--font-mono);
    letter-spacing: 0.12em;
}

.home svg .c {
    fill: none;
    stroke: var(--text);
    stroke-width: 1.2;
}

.home svg .c-dot {
    fill: var(--text);
}

.home svg .c-mark {
    fill: var(--ink);
    stroke: var(--text);
    stroke-width: 1.2;
}

.home svg text.c-num,
.home svg text.c-label {
    fill: var(--text);
}

.home svg text.c-label {
    font-size: 14px;
}

@media (max-width: 560px) {
    .hero-sheet .drawing text {
        font-size: 20px;
    }

    .hero-sheet .drawing text.c-label {
        font-size: 19px;
    }

    .title-block {
        position: static;
        width: fit-content;
        margin: 0 -1px -1px auto;
    }

    .title-block span {
        padding: 0.4rem 0.55rem;
    }
}



.services-section {
    padding-block: clamp(48px, 7vw, 88px);
}

.service-list {
    display: grid;
    gap: 20px;
}

.service-panel {
    --service-accent: var(--amber);
    --service-tint: var(--amber-tint);
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px 28px;
    padding: clamp(20px, 3vw, 36px);
    border: 1px solid var(--line);
    border-left: 4px solid var(--service-accent);
    background: linear-gradient(120deg, var(--service-tint), transparent 60%), var(--panel);
}

.crew-panel {
    --service-accent: var(--measure);
    --service-tint: var(--measure-tint);
}

.machinery-panel {
    --service-accent: var(--text);
    --service-tint: var(--surface-faint);
    background-color: var(--panel-raised);
}

.service-art {
    width: 72px;
    height: 72px;
    stroke: var(--service-accent);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-art-guide {
    stroke-width: 0.6;
    opacity: 0.45;
}

.home .service-panel .sheet-tag {
    margin-bottom: 0.9rem;
    color: var(--service-accent);
}

.service-panel .sheet-tag span {
    flex-shrink: 0;
    background: var(--service-accent);
}

.service-panel .sheet-tag::after {
    flex: 0 1 40px;
    background: var(--service-accent);
}

.service-panel h2 {
    font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.service-copy p:last-child {
    max-width: 40rem;
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 1.05rem;
}

@media (max-width: 980px) {
    .service-panel {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .service-art {
        align-self: start;
        width: 48px;
        height: 48px;
    }

    .service-button {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 560px) {
    .service-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .service-panel .sheet-tag {
        line-height: 1.4;
    }

    .service-panel .sheet-tag::after {
        display: none;
    }

    .service-button {
        width: 100%;
        padding-inline: 12px;
    }
}



.planner-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: clamp(40px, 6vw, 80px);
}

@media (min-width: 980px) {
    .planner-grid {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }
}

.planner-copy .actions {
    margin-top: 2rem;
}

.console {
    position: relative;
    border: 1px solid var(--line);
    background: var(--panel);
}

.console-steps {
    display: grid;
    gap: 2rem;
    margin: 0;
    padding: clamp(20px, 3.5vw, 36px);
    list-style: none;
}

.console-step {
    position: relative;
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: 1.1rem;
}

.console-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 1.3rem;
    top: 3rem;
    bottom: -1.9rem;
    border-left: 1px dashed var(--measure);
    opacity: 0.5;
}

.step-num {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--measure);
    color: var(--measure);
    font: 600 0.8rem/1 var(--font-mono);
}

.console h3 {
    margin-bottom: 0.5rem;
    color: var(--muted);
    font: 600 0.75rem/1.2 var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.console-text {
    color: var(--text);
    font-size: 1.05rem;
}

.caret {
    display: inline-block;
    width: 0.5em;
    height: 1.05em;
    margin-left: 0.2em;
    vertical-align: -0.2em;
    background: var(--amber);
}

.console figcaption {
    padding: 0.9rem clamp(20px, 3.5vw, 36px);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font: 0.72rem/1.4 var(--font-mono);
    letter-spacing: 0.06em;
}



/* pathLength="1" lets every shape use the same drawing animation. */
.draw {
    stroke-dasharray: 1;
}

@keyframes draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

@keyframes fade {
    from { opacity: 0; }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
}

@keyframes measure-out {
    from { transform: scaleX(0); }
}

@keyframes blink {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
    .draw {
        animation: draw 1.2s cubic-bezier(0.4, 0.1, 0.2, 1) var(--d, 0s) both;
    }

    .fade {
        animation: fade 0.8s ease var(--d, 0s) both;
    }

    .hero-copy > * {
        animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i, 0) * 110ms + 100ms) both;
    }

    .dim-underline::after {
        animation: measure-out 1.1s cubic-bezier(0.3, 0.7, 0.2, 1) 0.9s both;
    }

    .caret {
        animation: blink 1.1s steps(1) infinite;
    }

    .home-js [data-reveal] {
        opacity: 0;
        transform: translateY(26px);
        transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    }

    .home-js [data-reveal].is-in {
        opacity: 1;
        transform: none;
    }
}



.tape {
    --tape-height: min(46vh, 420px);
    display: none;
    position: fixed;
    top: 50%;
    right: 14px;
    z-index: 50;
    width: 18px;
    height: var(--tape-height);
    margin-top: calc(var(--tape-height) / -2);
    pointer-events: none;
}

@media (min-width: 1500px) {
    .tape {
        display: block;
    }
}

.tape-ruler {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(to bottom, rgba(127, 180, 214, 0.9) 0 1px, transparent 1px 50px) right top / 18px 100% no-repeat,
        repeating-linear-gradient(to bottom, rgba(127, 180, 214, 0.5) 0 1px, transparent 1px 10px) right top / 9px 100% no-repeat;
    border-right: 1px solid rgba(127, 180, 214, 0.6);
}

.tape-marker {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 2px;
    background: var(--amber);
    transform: translateY(calc(var(--p, 0) * var(--tape-height)));
}

.tape-value {
    position: absolute;
    right: 24px;
    top: -0.6em;
    color: var(--amber);
    font: 600 0.72rem/1 var(--font-mono);
    letter-spacing: 0.06em;
    white-space: nowrap;
}
