.calc-section { margin-top: 100px; padding: 20px; }
        .file-list { margin: 20px 0; }
        .file-item {
            background: white; padding: 15px; border-radius: 10px;
            margin-bottom: 10px; display: flex; justify-content: space-between;
            align-items: center; box-shadow: var(--shadow);
            animation: slideIn 0.4s ease;
        }
        .client-info-section {
            max-height: 0; overflow: hidden;
            transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            background: white; border-radius: 15px; padding: 0 20px;
        }
        .client-info-section.active { max-height: 1000px; padding: 20px; margin-top: 20px; border: 1px solid var(--border); }
        .input-group { margin-bottom: 15px; text-align: left; }
        .input-group label { display: block; font-weight: 600; margin-bottom: 5px; }
        .input-group input { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }

        /* STL Preview Canvas */
        .stl-canvas-container {
            width: 100%; height: 200px;
            background: #f1f5f9; border-radius: 8px;
            overflow: hidden; position: relative;
            cursor: grab;
        }
        .stl-canvas-container:active { cursor: grabbing; }
        .stl-canvas-container canvas { display: block; }
        .stl-card{
            padding: 10px;
            border-radius: 10px;
            background-color: #ffffff;
            box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
        }
        
        @keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
        @media (max-width: 768px) { .file-item { flex-direction: column; text-align: center; gap: 10px; } }



/* Styling for the new address textarea and general input focus states */
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit; /* Ensures it uses Segoe UI */
    font-size: 1rem;
    resize: vertical; /* Allows user to scale height but not width */
    transition: border-color var(--transition);
}

.input-group input:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(29, 205, 159, 0.1);
}

/* Adjusting the section height for the animation */
.client-info-section.active {
    max-height: 1200px; /* Increased from 1000px to accommodate the extra field */
}

/* ============================================================
   FDM BUILD HERO — sticky 3D scene driven by scroll
   ============================================================ */
.p3d-hero-section { padding: 0; background: var(--hero-bg, #07101f); }
.p3d-hero-outer   { height: 220vh; position: relative; }

.p3d-hero {
    position: sticky;
    top: var(--nav-height, 76px);
    height: calc(100vh - var(--nav-height, 76px));
    width: 100%;
    overflow: hidden;
    background: linear-gradient(170deg, #07101f 0%, #0a1426 55%, #050a14 100%);
    isolation: isolate;
}

/* Tech grid backdrop — same teal grid + nodes used elsewhere */
.p3d-hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(29, 205, 159, 0.4) 1.3px, transparent 2.5px),
        linear-gradient(to right,  rgba(29, 205, 159, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(29, 205, 159, 0.06) 1px, transparent 1px);
    background-size: 240px 240px, 60px 60px, 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at center, black 30%, transparent 92%);
            mask-image: radial-gradient(ellipse 80% 70% at center, black 30%, transparent 92%);
    pointer-events: none;
    z-index: 0;
}

.p3d-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 36px 5%;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 48px;
    align-items: center;
    box-sizing: border-box;
}

/* Left text column */
.p3d-hero-text { color: #fff; max-width: 560px; }

.p3d-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #aff5dd;
    background: rgba(29, 205, 159, 0.14);
    border: 1px solid rgba(29, 205, 159, 0.32);
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 1.3rem;
}
.p3d-eyebrow i { color: var(--accent); font-size: 0.85rem; }

.p3d-hero-title {
    font-size: clamp(2rem, 4.8vw, 3.4rem);
    font-weight: 800;
    line-height: 1.08;
    color: #fff;
    margin: 0 0 1.1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
}

.p3d-hero-sub {
    font-size: clamp(0.92rem, 1.15vw, 1.05rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.75;
    margin: 0 0 2rem;
    max-width: 520px;
}

.p3d-hero-stats {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
}
.p3d-stat { display: flex; flex-direction: column; }
.p3d-stat strong {
    font-size: clamp(1.4rem, 2vw, 1.85rem);
    color: var(--accent);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
    font-feature-settings: "tnum";
}
.p3d-stat strong small {
    font-size: 0.65em;
    color: #7df3d4;
    font-weight: 700;
    margin-left: 2px;
}
.p3d-stat span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Right 3D stage */
.p3d-hero-stage {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 580px;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(29, 205, 159, 0.08), transparent 60%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#p3d-print-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;     /* allow pointer drag on touch without page scroll */
}

.p3d-stage-hint {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(7, 16, 31, 0.55);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 5;
    letter-spacing: 0.02em;
}
.p3d-stage-hint i { margin-right: 6px; color: var(--accent); }

/* Progress overlay at the bottom of the stage */
.p3d-progress {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(7, 16, 31, 0.6);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 5;
    letter-spacing: 0.04em;
}
.p3d-layer-info #p3d-layer-cur { color: var(--accent); font-feature-settings: "tnum"; }
.p3d-layer-sep                  { color: rgba(255, 255, 255, 0.28); margin: 0 4px; }

.p3d-bar {
    position: relative;
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}
.p3d-bar-fill {
    position: absolute;
    inset: 0;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #7df3d4);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(29, 205, 159, 0.55);
    transition: width 0.15s linear;
}

/* ── Calc section sits right under the hero — no extra top gap */
.p3d-hero-section + .calc-section { margin-top: 60px; }

/* Responsive */
@media (max-width: 960px) {
    .p3d-hero-outer { height: 200vh; }
    .p3d-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 5%;
    }
    .p3d-hero-text   { max-width: 100%; text-align: center; }
    .p3d-eyebrow     { margin: 0 auto 1rem; }
    .p3d-hero-sub    { margin: 0 auto 1.4rem; }
    .p3d-hero-stats  { justify-content: center; gap: 24px; }
    .p3d-hero-stage  { max-height: 360px; }
}
@media (max-width: 600px) {
    .p3d-hero-stats  { gap: 18px; }
    .p3d-stat strong { font-size: 1.3rem; }
    .p3d-hero-stage  { max-height: 280px; }
    .p3d-hero-title  { font-size: 1.7rem; }
    .p3d-hero-sub    { font-size: 0.86rem; }
    .p3d-progress    { font-size: 0.7rem; padding: 8px 12px; }
}

/* ============================================================
   QUOTE AREA — interactive surface
   ============================================================ */
.calc-section {
    position: relative;
    background:
        radial-gradient(ellipse 80% 50% at center top, rgba(29, 205, 159, 0.05), transparent 60%),
        linear-gradient(to right,  rgba(29, 205, 159, 0.025) 1px, transparent 1px) 0 0 / 60px 60px,
        linear-gradient(to bottom, rgba(29, 205, 159, 0.025) 1px, transparent 1px) 0 0 / 60px 60px,
        var(--bg-primary, #f8fafc);
}

.p3d-quote-wrap {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

/* ── Heading ─────────────────────────────────────────────── */
.p3d-quote-head { margin-bottom: 38px; }
.p3d-quote-title {
    font-weight: 800;
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    line-height: 1.15;
    margin: 8px 0 14px;
    color: var(--text-dark);
}
.p3d-quote-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}

/* Title scramble word spans — same pattern as the About page */
.p3d-word {
    display: inline-block;
    transition:
        opacity   0.5s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.p3d-word--hidden { opacity: 0; transform: translateY(6px); }

/* ── Previews grid ───────────────────────────────────────── */
.p3d-previews-grid {
    margin-top: 32px;
    gap: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Drop zone ───────────────────────────────────────────── */
.p3d-drop-zone {
    position: relative;
    margin: 32px auto 0;
    padding: 48px 24px 44px;
    background: linear-gradient(135deg, rgba(29, 205, 159, 0.03), rgba(255, 255, 255, 0.65));
    border: 2px dashed rgba(29, 205, 159, 0.4);
    border-radius: 18px;
    cursor: pointer;
    transition:
        border-color 0.3s ease,
        background   0.3s ease,
        transform    0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow   0.3s ease;
    overflow: hidden;
}
.p3d-drop-zone:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(29, 205, 159, 0.08), rgba(255, 255, 255, 0.85));
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(29, 205, 159, 0.15);
}
.p3d-drop-zone.is-dragover {
    border-color: var(--accent);
    border-style: solid;
    background: linear-gradient(135deg, rgba(29, 205, 159, 0.18), rgba(94, 234, 212, 0.08));
    transform: scale(1.02);
    box-shadow: 0 20px 52px rgba(29, 205, 159, 0.28);
}

/* Tech-y corner brackets */
.p3d-drop-corners span {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent);
    opacity: 0.55;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.p3d-drop-corners span:nth-child(1) { top: 10px; left: 10px;     border-right: none; border-bottom: none; border-radius: 3px 0 0 0; }
.p3d-drop-corners span:nth-child(2) { top: 10px; right: 10px;    border-left: none;  border-bottom: none; border-radius: 0 3px 0 0; }
.p3d-drop-corners span:nth-child(3) { bottom: 10px; left: 10px;  border-right: none; border-top: none;    border-radius: 0 0 0 3px; }
.p3d-drop-corners span:nth-child(4) { bottom: 10px; right: 10px; border-left: none;  border-top: none;    border-radius: 0 0 3px 0; }
.p3d-drop-zone.is-dragover .p3d-drop-corners span {
    opacity: 1;
    transform: scale(1.4);
}

/* Upload icon with pulsing ring */
.p3d-drop-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 14px;
}
.p3d-drop-icon {
    font-size: 2.5rem;
    color: var(--accent);
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.p3d-drop-zone:hover .p3d-drop-icon {
    transform: translateY(-3px) scale(1.08);
}
.p3d-drop-zone.is-dragover .p3d-drop-icon {
    transform: translateY(-8px) scale(1.2);
    animation: p3dDropBounce 0.7s ease-in-out infinite;
}
@keyframes p3dDropBounce {
    0%, 100% { transform: translateY(-8px) scale(1.2); }
    50%      { transform: translateY(-14px) scale(1.24); }
}
.p3d-drop-pulse {
    position: absolute;
    top: 50%; left: 50%;
    width: 60px; height: 60px;
    transform: translate(-50%, -50%);
    border: 2px solid var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: p3dDropPulse 2.4s ease-out infinite;
    pointer-events: none;
}
.p3d-drop-zone.is-dragover .p3d-drop-pulse {
    animation-duration: 1.1s;
}
@keyframes p3dDropPulse {
    0%   { opacity: 0.55; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 0;    transform: translate(-50%, -50%) scale(2.6); }
}

/* Text */
.p3d-drop-text strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    letter-spacing: -0.005em;
}
.p3d-drop-text span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.p3d-drop-text u {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    font-weight: 600;
}

/* ── Client info section ─────────────────────────────────── */
.p3d-client-section {
    text-align: left;
    background: white !important;
    border-radius: 16px !important;
}
.p3d-client-section.active {
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.06);
    padding: 28px !important;
}
.p3d-client-head {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px !important;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}
.p3d-client-head i { color: var(--accent); }

/* Floating-label fields */
.p3d-field {
    position: relative;
    margin-bottom: 16px;
}
.p3d-field input,
.p3d-field textarea {
    width: 100%;
    padding: 22px 16px 8px 46px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--text-dark);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    line-height: 1.5;
}
.p3d-field textarea {
    resize: vertical;
    min-height: 90px;
    padding-top: 28px;
}
.p3d-field input:focus,
.p3d-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(29, 205, 159, 0.14);
}
.p3d-field label {
    position: absolute;
    left: 46px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    background: linear-gradient(180deg, white 50%, transparent 50%);
    padding: 0 4px;
}
.p3d-field--area label {
    top: 22px;
    transform: none;
}
.p3d-field input:focus + label,
.p3d-field input:not(:placeholder-shown) + label,
.p3d-field textarea:focus + label,
.p3d-field textarea:not(:placeholder-shown) + label {
    top: 0;
    left: 14px;
    transform: translateY(-50%) scale(0.85);
    color: var(--accent);
    font-weight: 600;
    background: white;
}
.p3d-field-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 1;
}
.p3d-field--area .p3d-field-icon {
    top: 26px;
    transform: none;
}
.p3d-field input:focus ~ .p3d-field-icon,
.p3d-field textarea:focus ~ .p3d-field-icon {
    color: var(--accent);
}

/* Note box */
.p3d-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(29, 205, 159, 0.06), rgba(29, 205, 159, 0.02));
    border: 1px solid rgba(29, 205, 159, 0.18);
    border-left: 3px solid var(--accent);
    padding: 14px 16px;
    border-radius: 10px;
    margin: 24px 0 22px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
}
.p3d-note i {
    color: var(--accent);
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.p3d-note strong { color: var(--text-dark); }

/* Total display */
.p3d-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0a1626 0%, #0d1f30 100%);
    color: white;
    padding: 16px 22px;
    border-radius: 12px;
    margin: 0 0 20px;
    border: 1px solid rgba(29, 205, 159, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.p3d-total::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 50%, rgba(29, 205, 159, 0.22), transparent 60%);
    pointer-events: none;
}
.p3d-total--bump {
    transform: scale(1.015);
    box-shadow: 0 14px 36px rgba(29, 205, 159, 0.3);
}
.p3d-total-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    position: relative;
    z-index: 1;
}
.p3d-total-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 18px rgba(29, 205, 159, 0.4);
    font-feature-settings: "tnum";
    position: relative;
    z-index: 1;
}

/* Submit button */
.p3d-submit-btn {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 0.95rem 1.4rem !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

/* Responsive */
@media (max-width: 600px) {
    .p3d-drop-zone        { padding: 36px 16px 34px; }
    .p3d-drop-text strong { font-size: 0.95rem; }
    .p3d-drop-text span   { font-size: 0.78rem; }
    .p3d-total            { flex-direction: column; align-items: flex-start; gap: 6px; }
    .p3d-total-value      { font-size: 1.35rem; }
    .p3d-client-section.active { padding: 20px !important; }
}