/* ==========================================================================
   3D printing, explained - cinematic scroll page (/3d-printing-explained)
   Editorial, not commercial. Self-contained and theme-aware; every rule is
   isolated behind the page body/class namespace.
   ========================================================================== */

/* --- full bleed: break out of the shared _Layout .container wrapper ------- */
body.home-threedprintingexplained .page-content-wrapper > .container {
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

body.home-threedprintingexplained .page-content-wrapper > .container > main.pb-3 {
    padding-bottom: 0 !important;
}

body.home-threedprintingexplained {
    background: #f4f8fb;
    overflow-x: hidden;
}

[data-theme="dark"] body.home-threedprintingexplained {
    background: #05080d;
}

/* --- page shell ----------------------------------------------------------- */
.ps-page {
    --ps-chamber: #e9f1f7;
    --ps-void: #f4f8fb;
    --ps-panel: #ffffff;
    --ps-panel-hover: #edf4f8;
    --ps-ink: #0a1726;
    --ps-ink-dim: #40566b;
    --ps-ink-faint: #6b7f91;
    --ps-blue: #176bd6;
    --ps-cyan: #008c9b;
    --ps-line: rgba(10, 31, 50, 0.16);
    --ps-line-soft: rgba(10, 31, 50, 0.08);
    --ps-hero-bg:
        radial-gradient(ellipse 90% 65% at 78% 62%, rgba(60, 145, 185, 0.22), rgba(226, 238, 246, 0) 70%),
        linear-gradient(180deg, #edf4f8 0%, #e4eef5 62%, var(--ps-void) 100%);
    --ps-grid-line: rgba(16, 51, 76, 0.05);
    --ps-readout-bg: rgba(247, 251, 253, 0.78);
    --ps-cta-bg: #0a1726;
    --ps-cta-text: #f5fbff;
    --ps-cta-hover: #112b42;
    --ps-shadow: 0 24px 70px rgba(35, 72, 96, 0.14);
    --ps-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    --ps-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --ps-gutter: clamp(1.25rem, 5vw, 5.5rem);

    position: relative;
    display: block;
    background: var(--ps-void);
    color: var(--ps-ink);
    font-family: var(--ps-sans);
}

[data-theme="dark"] .ps-page {
    --ps-chamber: #05080d;
    --ps-void: #04070b;
    --ps-panel: #070b12;
    --ps-panel-hover: #0a111c;
    --ps-ink: #eaf3ff;
    --ps-ink-dim: #93a6bd;
    --ps-ink-faint: #5d6f86;
    --ps-blue: #2f7df6;
    --ps-cyan: #37b7d8;
    --ps-line: rgba(234, 243, 255, 0.11);
    --ps-line-soft: rgba(234, 243, 255, 0.06);
    --ps-hero-bg:
        radial-gradient(ellipse 90% 60% at 78% 62%, rgba(23, 47, 82, 0.55), rgba(4, 7, 11, 0) 70%),
        linear-gradient(180deg, #070c14 0%, #05080e 62%, var(--ps-void) 100%);
    --ps-grid-line: rgba(234, 243, 255, 0.028);
    --ps-readout-bg: rgba(5, 9, 15, 0.62);
    --ps-cta-bg: #eaf3ff;
    --ps-cta-text: #04070b;
    --ps-cta-hover: #ffffff;
    --ps-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.ps-page *,
.ps-page *::before,
.ps-page *::after {
    box-sizing: border-box;
}

.ps-shell {
    width: min(1240px, 100%);
    margin-inline: auto;
    padding-inline: var(--ps-gutter);
}

.ps-kicker {
    font-family: var(--ps-mono);
    font-size: 0.68rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--ps-ink-faint);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.ps-kicker::before {
    content: "";
    width: 1.6rem;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
}

/* ==========================================================================
   THE PRINT - the single pinned cinematic scene
   ========================================================================== */
.ps-print {
    position: relative;
    height: 100svh;
    min-height: 620px;
    width: 100%;
    overflow: hidden;
    background: var(--ps-hero-bg);
}

/* faint chamber wall texture so the dark is not flat */
.ps-print::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--ps-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--ps-grid-line) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 10%, transparent 84%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 10%, transparent 84%);
    pointer-events: none;
}

.ps-print-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

/* --- headline: readable before a single pixel of scroll ------------------ */
.ps-print-copy {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    will-change: transform, opacity;
}

.ps-print-copy .ps-shell {
    max-width: 1240px;
}

.ps-print-copy h1 {
    margin: 1.1rem 0 0;
    max-width: 17ch;
    font-size: clamp(2.1rem, 4.6vw, 3.9rem);
    line-height: 1.03;
    letter-spacing: -0.045em;
    font-weight: 800;
    color: var(--ps-ink);
    animation: ps-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ps-print-copy p {
    margin: 1.2rem 0 0;
    max-width: 44ch;
    font-size: clamp(0.97rem, 1.1vw, 1.08rem);
    line-height: 1.66;
    color: var(--ps-ink-dim);
    animation: ps-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.ps-print-copy .ps-kicker {
    animation: ps-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ps-print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    margin-top: 2rem;
    animation: ps-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

@keyframes ps-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ps-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.95rem 1.4rem;
    border: 1px solid var(--ps-line);
    border-radius: 999px;
    color: var(--ps-ink-dim);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.ps-ghost:hover {
    color: var(--ps-ink);
    border-color: var(--ps-ink-faint);
}

.ps-ghost:focus-visible,
.ps-print-actions .ps-cta:focus-visible {
    outline: 2px solid var(--ps-cyan);
    outline-offset: 3px;
}

.ps-print-actions .ps-cta {
    margin-top: 0;
}

/* On desktop the part occupies the right of the frame, so the copy column is
   capped rather than left to run under it. */
@media (min-width: 901px) {
    .ps-print-copy h1 {
        max-width: 31rem;
    }

    .ps-print-copy p {
        max-width: 27rem;
    }
}

/* --- slicer readout ------------------------------------------------------ */
.ps-readout {
    position: absolute;
    right: var(--ps-gutter);
    bottom: clamp(1.8rem, 6vh, 4rem);
    z-index: 3;
    width: min(15.5rem, 46vw);
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid var(--ps-line);
    border-radius: 8px;
    background: var(--ps-readout-bg);
    backdrop-filter: blur(6px);
    font-family: var(--ps-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    pointer-events: none;
}

.ps-readout-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    padding-block: 0.42rem;
    border-bottom: 1px solid var(--ps-line-soft);
}

.ps-readout-row:last-of-type {
    border-bottom: 0;
}

.ps-readout-row span {
    color: var(--ps-ink-faint);
}

.ps-readout-row b {
    color: var(--ps-ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ps-readout-bar {
    margin-top: 0.8rem;
    height: 2px;
    background: var(--ps-line);
    border-radius: 2px;
    overflow: hidden;
}

.ps-readout-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--ps-blue), var(--ps-cyan));
}

/* ==========================================================================
   USE-CASE GRID - line art, no photography required
   ========================================================================== */
.ps-make {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-top: 2.8rem;
    background: var(--ps-line-soft);
    border: 1px solid var(--ps-line-soft);
}

.ps-make-item {
    background: var(--ps-panel);
    padding: 1.8rem 1.5rem 1.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    transition: background 0.22s ease;
}

.ps-make-item:hover {
    background: var(--ps-panel-hover);
}

.ps-make-item svg {
    width: 3.4rem;
    height: 3.4rem;
    margin-bottom: 0.6rem;
    fill: none;
    stroke: var(--ps-ink-faint);
    stroke-width: 3.2;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: stroke 0.22s ease;
}

.ps-make-item:hover svg {
    stroke: var(--ps-cyan);
}

.ps-make-item h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ps-ink);
}

.ps-make-item p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ps-ink-dim);
}

/* ==========================================================================
   FUNCTIONAL REGISTER - near-black document surface
   ========================================================================== */
.ps-doc {
    position: relative;
    z-index: 2;
    background: var(--ps-void);
    border-top: 1px solid var(--ps-line-soft);
}

.ps-section {
    padding-block: clamp(4.5rem, 11vh, 9rem);
    border-bottom: 1px solid var(--ps-line-soft);
}

.ps-section:last-child {
    border-bottom: 0;
}

.ps-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem 3rem;
    align-items: end;
    padding-bottom: 2.6rem;
    border-bottom: 1px solid var(--ps-line);
}

.ps-head h2 {
    grid-column: 1 / -1;
    margin: 1rem 0 0;
    max-width: 22ch;
    font-size: clamp(1.65rem, 3.4vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.038em;
    font-weight: 800;
    color: var(--ps-ink);
}

.ps-head p {
    grid-column: 1 / -1;
    margin: 1.1rem 0 0;
    max-width: 58ch;
    font-size: 1rem;
    line-height: 1.68;
    color: var(--ps-ink-dim);
}

/* --- numbered rows ------------------------------------------------------ */
.ps-rows {
    display: block;
    margin-top: 0;
}

.ps-row {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 20ch) minmax(0, 1fr);
    gap: 1rem 2.5rem;
    align-items: start;
    padding-block: 2rem;
    border-bottom: 1px solid var(--ps-line-soft);
}

.ps-row:last-child {
    border-bottom: 0;
}

.ps-row-index {
    font-family: var(--ps-mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--ps-ink-faint);
    padding-top: 0.35rem;
}

.ps-row h3 {
    margin: 0;
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--ps-ink);
}

.ps-row p {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.68;
    color: var(--ps-ink-dim);
    max-width: 62ch;
}

/* --- spec list ------------------------------------------------------------ */
.ps-spec {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 3.5rem;
}

.ps-spec-item {
    display: grid;
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
    gap: 0.4rem 1.5rem;
    padding-block: 1.35rem;
    border-bottom: 1px solid var(--ps-line-soft);
    align-items: baseline;
}

.ps-spec-item dt {
    font-family: var(--ps-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ps-ink-faint);
    margin: 0;
}

.ps-spec-item dd {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.55;
    color: var(--ps-ink);
}

.ps-note {
    margin-top: 2.2rem;
    font-family: var(--ps-mono);
    font-size: 0.72rem;
    line-height: 1.9;
    letter-spacing: 0.06em;
    color: var(--ps-ink-faint);
    max-width: 70ch;
}

/* --- future outlook: a visual pause after the dense reality check -------- */
.ps-section-future {
    background:
        radial-gradient(circle at 12% 16%, color-mix(in srgb, var(--ps-cyan) 10%, transparent), transparent 34%),
        var(--ps-void);
}

.ps-future-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.8rem;
}

.ps-future-card {
    min-height: 15rem;
    padding: clamp(1.5rem, 3vw, 2.3rem);
    border: 1px solid var(--ps-line-soft);
    border-radius: 18px;
    background: color-mix(in srgb, var(--ps-panel) 88%, transparent);
    box-shadow: var(--ps-shadow);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.ps-future-card:hover {
    transform: translateY(-3px);
    border-color: var(--ps-line);
}

.ps-future-card > span {
    display: block;
    margin-bottom: 2.4rem;
    font-family: var(--ps-mono);
    font-size: 0.67rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ps-cyan);
}

.ps-future-card h3 {
    margin: 0;
    max-width: 19ch;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    line-height: 1.16;
    letter-spacing: -0.03em;
    color: var(--ps-ink);
}

.ps-future-card p {
    margin: 1rem 0 0;
    max-width: 48ch;
    color: var(--ps-ink-dim);
    font-size: 0.94rem;
    line-height: 1.65;
}

.ps-future-statement {
    margin: clamp(3rem, 8vw, 6rem) 0 0;
    max-width: 28ch;
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    line-height: 1.22;
    letter-spacing: -0.035em;
    color: var(--ps-ink-dim);
}

.ps-future-statement strong {
    color: var(--ps-ink);
}

.ps-future-statement em {
    font-style: normal;
    color: var(--ps-cyan);
}

/* --- editorial invitation, deliberately not a sales/quote surface -------- */
.ps-contact-panel {
    position: relative;
    overflow: hidden;
    margin-top: clamp(3rem, 8vw, 6rem);
    padding: clamp(1.7rem, 5vw, 3.8rem);
    border: 1px solid var(--ps-line);
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--ps-blue) 18%, transparent), transparent 38%),
        var(--ps-panel);
    box-shadow: var(--ps-shadow);
}

.ps-contact-panel::after {
    content: "?";
    position: absolute;
    right: clamp(1rem, 5vw, 4rem);
    top: 50%;
    transform: translateY(-53%);
    font-family: var(--ps-mono);
    font-size: clamp(7rem, 18vw, 15rem);
    line-height: 1;
    color: var(--ps-line-soft);
    pointer-events: none;
}

.ps-contact-panel > * {
    position: relative;
    z-index: 1;
}

.ps-contact-panel h3 {
    margin: 1.1rem 0 0;
    max-width: 22ch;
    font-size: clamp(1.55rem, 3.4vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--ps-ink);
}

.ps-contact-panel p {
    margin: 1.2rem 0 0;
    max-width: 55ch;
    color: var(--ps-ink-dim);
    line-height: 1.7;
}

.ps-contact-panel small {
    display: block;
    margin-top: 1rem;
    max-width: 58ch;
    font-family: var(--ps-mono);
    font-size: 0.66rem;
    line-height: 1.6;
    letter-spacing: 0.08em;
    color: var(--ps-ink-faint);
}

/* --- inline calls to action ---------------------------------------------- */
.ps-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.6rem;
    padding: 0.95rem 1.5rem;
    border-radius: 999px;
    background: var(--ps-cta-bg);
    color: var(--ps-cta-text);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease;
}

.ps-cta:hover {
    color: var(--ps-cta-text);
    background: var(--ps-cta-hover);
    transform: translateY(-1px);
}

.ps-cta:focus-visible {
    outline: 2px solid var(--ps-cyan);
    outline-offset: 3px;
}

.ps-cta-hint {
    display: block;
    margin-top: 0.9rem;
    font-family: var(--ps-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ps-ink-faint);
}

/* --- closing links -------------------------------------------------------- */
.ps-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 2rem;
    margin-top: 2.4rem;
}

.ps-links a {
    font-family: var(--ps-mono);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ps-ink-dim);
    text-decoration: none;
    border-bottom: 1px solid var(--ps-line);
    padding-bottom: 0.35rem;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.ps-links a:hover {
    color: var(--ps-ink);
    border-color: var(--ps-ink-faint);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
    .ps-make {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .ps-spec {
        gap: 0 2.5rem;
    }
}

@media (max-width: 900px) {
    /* the copy takes the top of the frame, the part gets the lower band and
       the readout collapses to a strip along the bottom */
    .ps-print-copy {
        top: clamp(4.5rem, 10vh, 6.5rem);
        bottom: auto;
        transform: none;
    }

    .ps-print-copy h1 {
        font-size: clamp(1.75rem, 7.4vw, 2.4rem);
    }

    .ps-print-copy p {
        max-width: 34ch;
        font-size: 0.9rem;
        line-height: 1.58;
    }

    .ps-print-actions {
        margin-top: 1.4rem;
    }

    .ps-readout {
        left: var(--ps-gutter);
        right: var(--ps-gutter);
        width: auto;
        bottom: 1rem;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0.3rem 1.3rem;
        padding: 0.7rem 0.9rem 0.8rem;
        font-size: 0.62rem;
    }

    .ps-readout-row {
        padding-block: 0;
        gap: 0.45rem;
        border-bottom: 0;
    }

    /* material and nozzle are in the capability table anyway */
    .ps-readout-row:nth-of-type(4),
    .ps-readout-row:nth-of-type(5) {
        display: none;
    }

    .ps-readout-bar {
        flex: 1 1 100%;
        margin-top: 0.3rem;
    }

    .ps-make {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ps-row {
        grid-template-columns: 3.2rem minmax(0, 1fr);
        gap: 0.6rem 1.4rem;
        padding-block: 1.7rem;
    }

    .ps-row p {
        grid-column: 2 / -1;
    }

    .ps-spec {
        grid-template-columns: minmax(0, 1fr);
    }

    .ps-future-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .ps-spec-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .ps-print-actions {
        margin-top: 1.5rem;
    }

    .ps-print-actions .ps-cta,
    .ps-ghost {
        padding: 0.85rem 1.15rem;
        font-size: 0.86rem;
    }
}

@media (max-width: 600px) {
    .ps-make {
        grid-template-columns: minmax(0, 1fr);
    }

    .ps-readout {
        bottom: 1.1rem;
    }

    .ps-future-card {
        min-height: 0;
    }

    .ps-contact-panel::after {
        opacity: 0.55;
    }
}

/* ==========================================================================
   REDUCED MOTION / NO-JS - static, readable fallback
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .ps-print {
        height: auto;
        min-height: 0;
        padding-block: clamp(4rem, 12vh, 8rem);
    }

    .ps-print-canvas,
    .ps-readout {
        display: none;
    }

    .ps-print-copy {
        position: relative;
        top: auto;
        bottom: auto;
        transform: none;
    }

    .ps-print-copy h1,
    .ps-print-copy p,
    .ps-print-copy .ps-kicker,
    .ps-print-actions {
        animation: none;
    }
}

/* set by printing-explained.js when gsap is unavailable */
.ps-page.ps-static .ps-print {
    height: auto;
    min-height: 0;
    padding-block: clamp(4rem, 12vh, 8rem);
}

.ps-page.ps-static .ps-print-copy {
    position: relative;
    top: auto;
    bottom: auto;
    transform: none;
}

.ps-page.ps-static .ps-print-canvas,
.ps-page.ps-static .ps-readout {
    display: none;
}

/* Shared header, newsletter and footer deliberately keep their global theme
   behavior. Only the full-bleed editorial surface above is page-scoped. */
