/* PoseLab app-section guides
 * Layered on top of docs.css. A guide is a scrolling sequence of rows, each a
 * framed "plate" (screenshot / schematic) on the left and annotated copy on the
 * right. Plates are dressed as technical-drawing sheets — thin accent frame,
 * corner crop marks, a plate label and dimension note, a faint blueprint grid —
 * to give the docs a CAD / draftboard feel. Numbered pins on a plate tie to a
 * matching numbered legend in the copy column.
 */

.guide {
    max-width: min(1520px, 100%);
    padding: 44px clamp(40px, 4vw, 40px) 0px;
}
/* Give the guide progressively more room on wide displays. */
@media (min-width: 1680px) {
    .guide {
        max-width: 1680px;
    }
}

/* Intro block above the plates */
.guide-intro {
    max-width: 760px;
    margin-bottom: 20px;
}
.guide-intro h1 {
    margin: 0 0 14px;
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(34px, 5vw, 50px);
    line-height: 1.04;
    letter-spacing: -0.03em;
}
.guide-intro .lede {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}
/*.img-with-text {
    text-align: center;
    width: [width of img];
}

.img-with-text img {
    display: block;
    margin: 0 auto;
}*/
/* ---------- Row: plate | copy ---------- */
.detail-col-img img {
    display: block;
    max-width: 100%;
    height: auto;
}
.detail-row {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: clamp(24px, 4vw, 60px);
    align-items: start; /* Aligns both columns to the top */
    padding: 40px 0;

    text-align: left; /* Ensures text is left-aligned */
}

.plate-row {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(24px, 4vw, 60px);
    align-items: center;
    padding: 40px 0;
    border-top: 1px solid var(--line);
}
.plate-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: clamp(16px, 2vw, 28px);
    align-items: start;
    align-content: start;
    padding: 24px 0;
    border-top: 1px solid var(--line);
}
.plate-row:first-of-type {
    border-top: 0;
}

/* ---------- The draftboard plate ---------- */
.plate {
    position: sticky;
    top: 84px;
    margin: 0;
}
/* In a stacked column the plate sits below its copy, so sticky would pin it
 * over the following section. Let it flow normally there. */
.plate-col .plate {
    position: static;
}
.plate-frame {
    position: relative;
    /*padding: 30px 26px 26px;*/
    border: 1px solid var(--orange);
    background: var(--white);
    /* faint inner second rule = the CAD double line */
    box-shadow: inset 0 0 0 1px rgba(196, 82, 46, 0.14);
}
/* corner crop marks — small accent Ls that reach just outside the frame */
.plate-frame::before,
.plate-frame::after,
.plate-frame > .cm-b::before,
.plate-frame > .cm-b::after {
    content: "";
    position: absolute;
    width: 13px;
    height: 13px;
    border: 0 solid var(--orange);
    pointer-events: none;
}
.plate-frame::before {
    top: -4px;
    left: -4px;
    border-top-width: 1.5px;
    border-left-width: 1.5px;
}
.plate-frame::after {
    top: -4px;
    right: -4px;
    border-top-width: 1.5px;
    border-right-width: 1.5px;
}
.plate-frame > .cm-b::before {
    bottom: -4px;
    left: -4px;
    border-bottom-width: 1.5px;
    border-left-width: 1.5px;
}
.plate-frame > .cm-b::after {
    bottom: -4px;
    right: -4px;
    border-bottom-width: 1.5px;
    border-right-width: 1.5px;
}
.cm-b {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* plate label (top-left) + dimension note (bottom-right), monospaced */
.plate-label,
.plate-dims {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 7px;
    color: var(--orange2);
    background: var(--white);
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}
.plate-label {
    top: -8px;
    left: 18px;
}
.plate-dims {
    right: 18px;
    bottom: -8px;
    color: var(--muted);
    letter-spacing: 0.06em;
}

/* the stage that holds the schematic / screenshot + pins */
.plate-stage {
    position: relative;
    /* blueprint grid */
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(49, 86, 106, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(49, 86, 106, 0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    border: 1px solid var(--line);
}
.plate-stage svg,
.plate-stage img {
    display: block;
    width: 100%;
    height: auto;
}
.plate-stage img {
    /* a dropped-in screenshot sits flush inside the grid stage */
    border: 0;
}

/* numbered callout pin, positioned with inline left/top % */
.pin {
    position: absolute;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: #fff;
    background: var(--orange);
    box-shadow:
        0 0 0 3px var(--white),
        0 2px 6px rgba(36, 31, 24, 0.28);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

/* ---------- Copy column ---------- */
/* The column is its own container, so its contents respond to the space the
 * copy actually gets — the legend goes two-up on wide screens, independent of
 * the viewport. Type scales fluidly between comfortable min and max sizes. */
.plate-copy {
    container-type: inline-size;
}
.plate-copy .step {
    margin: 0 0 10px;
    color: var(--orange2);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.plate-copy h2 {
    margin: 0 0 12px;
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(25px, 2.4cqi + 18px, 36px);
    line-height: 1.12;
    letter-spacing: -0.02em;
    scroll-margin-top: 84px;
}
.plate-copy > p {
    max-width: 62ch;
    margin: 0 0 18px;
    color: #33342f;
    font-size: clamp(15px, 0.4cqi + 14px, 17.5px);
    line-height: 1.6;
}

/* numbered legend that mirrors the plate pins */
.legend {
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: pin;
}
/* When the copy column is wide, lay the legend out two-up. */
@container (min-width: 500px) {
    .legend {
        grid-template-columns: 1fr 1fr;
        column-gap: 28px;
    }
}
@container (min-width: 780px) {
    .plate-copy > p {
        max-width: 70ch;
    }
    .legend {
        grid-template-columns: repeat(3, 1fr);
    }
}
.legend li {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 12px;
    align-items: start;
    counter-increment: pin;
}
.legend li::before {
    content: counter(pin);
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--orange);
    border-radius: 50%;
    color: var(--orange2);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.legend li b {
    display: block;
    margin-bottom: 1px;
}
.legend li small {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
}

/* ---------- Section link (right-justified, above the divider) ---------- */
/* A full-width row item spanning both columns so it right-aligns to the section
 * edge and sits just above the next row's divider, rather than floating in the
 * copy column. */
.plate-row > .plate-link {
    grid-column: 1 / -1;
    justify-self: end;
    margin-top: 24px;
    color: var(--orange2);
    text-decoration: none;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.plate-row > .plate-link:hover {
    color: var(--orange);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .plate-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }
    .plate {
        position: static;
    }
}
