/*
 * Premium metal finishes for builder cards (templates metal-silver / metal-gold).
 * Loaded only on those templates. The card itself is a sheet of brushed metal:
 * layered gradients give the light falling across it, a sideways-stretched
 * noise texture gives the brushing, lettering is engraved (dark with a light
 * lower edge), buttons are raised metal and sections are recessed plates.
 */
.mat-metal {
    --metal-ink: #22252a;
    --metal-ink-soft: #4a4f58;
    --metal-hi: rgb(255 255 255 / .8);
    --metal-lo: rgb(0 0 0 / .3);
    --metal-sheet: linear-gradient(118deg, #7b7f86 0%, #c2c6cc 13%, #eceef1 25%, #b0b4ba 37%, #dde0e4 50%, #f8f9fa 59%, #a4a8af 73%, #d2d5da 87%, #8d9198 100%);
    --metal-plate: linear-gradient(172deg, #f3f4f6 0%, #dcdfe3 42%, #c8ccd2 100%);
    --metal-button: linear-gradient(160deg, #fdfdfe 0%, #d7dade 38%, #a8acb2 74%, #d0d3d7 100%);
    --metal-button-press: linear-gradient(340deg, #fdfdfe 0%, #d7dade 38%, #a8acb2 74%, #d0d3d7 100%);
    --metal-dark: linear-gradient(160deg, #50555d 0%, #2c3036 55%, #1c1f23 100%);
    --metal-dark-text: #eef0f3;
    --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.95' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='600' height='600' filter='url(%23b)'/%3E%3C/svg%3E");
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.2 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)'/%3E%3C/svg%3E");
}
.mat-metal.tone-gold {
    --metal-ink: #362604;
    --metal-ink-soft: #664c12;
    --metal-hi: rgb(255 249 225 / .85);
    --metal-lo: rgb(60 35 0 / .32);
    --metal-sheet: linear-gradient(118deg, #765612 0%, #c4972b 13%, #f1d985 25%, #b6892a 37%, #e6c565 50%, #fff2c2 59%, #a47a20 73%, #d9b14f 87%, #8b6619 100%);
    --metal-plate: linear-gradient(172deg, #fcf1c9 0%, #eed58f 42%, #d7b461 100%);
    --metal-button: linear-gradient(160deg, #fff7da 0%, #edd189 38%, #c09838 74%, #e2c26c 100%);
    --metal-button-press: linear-gradient(340deg, #fff7da 0%, #edd189 38%, #c09838 74%, #e2c26c 100%);
    --metal-dark: linear-gradient(160deg, #46340d 0%, #2a1d05 60%, #1b1303 100%);
    --metal-dark-text: #f7e7b2;
}

/* More metals: copper, bronze, rose gold, gunmetal (dark) and mirror chrome */
.mat-metal.tone-copper {
    --metal-ink: #3a1606; --metal-ink-soft: #6e3215; --metal-hi: rgb(255 228 205 / .8); --metal-lo: rgb(70 25 5 / .35);
    --metal-sheet: linear-gradient(118deg, #6b2c0e 0%, #b8622e 13%, #f0a877 25%, #a45224 37%, #d98652 50%, #ffd2b0 59%, #94461d 73%, #c97342 87%, #7a3613 100%);
    --metal-plate: linear-gradient(172deg, #fbe0cc 0%, #eab493 42%, #d38c63 100%);
    --metal-button: linear-gradient(160deg, #ffe6d4 0%, #eda67c 38%, #b2582a 74%, #dc8f61 100%);
    --metal-button-press: linear-gradient(340deg, #ffe6d4 0%, #eda67c 38%, #b2582a 74%, #dc8f61 100%);
    --metal-dark: linear-gradient(160deg, #4e200a 0%, #2e1205 60%, #1e0b03 100%); --metal-dark-text: #ffd7bb;
}
.mat-metal.tone-bronze {
    --metal-ink: #2c1d08; --metal-ink-soft: #5a4220; --metal-hi: rgb(250 230 190 / .7); --metal-lo: rgb(40 25 5 / .4);
    --metal-sheet: linear-gradient(118deg, #4f3812 0%, #8c6a33 13%, #c9a66b 25%, #7d5c2a 37%, #b08a4e 50%, #e0c48f 59%, #6e5023 73%, #a07c43 87%, #563d15 100%);
    --metal-plate: linear-gradient(172deg, #efdcb4 0%, #d6b984 42%, #b8955c 100%);
    --metal-button: linear-gradient(160deg, #f5e3bd 0%, #cfae74 38%, #8e6c36 74%, #bb9a62 100%);
    --metal-button-press: linear-gradient(340deg, #f5e3bd 0%, #cfae74 38%, #8e6c36 74%, #bb9a62 100%);
    --metal-dark: linear-gradient(160deg, #3d2c10 0%, #241906 60%, #160f03 100%); --metal-dark-text: #ecd6a6;
}
.mat-metal.tone-rose {
    --metal-ink: #3d1c17; --metal-ink-soft: #74413a; --metal-hi: rgb(255 238 233 / .85); --metal-lo: rgb(80 35 28 / .3);
    --metal-sheet: linear-gradient(118deg, #8e5a50 0%, #c99083 13%, #f3cfc4 25%, #b7796b 37%, #e3b2a5 50%, #fff0ea 59%, #a86b5e 73%, #d6a092 87%, #94604f 100%);
    --metal-plate: linear-gradient(172deg, #fff1ec 0%, #f2d1c7 42%, #e0ab9d 100%);
    --metal-button: linear-gradient(160deg, #fff4f0 0%, #efc3b6 38%, #be8576 74%, #e2ad9f 100%);
    --metal-button-press: linear-gradient(340deg, #fff4f0 0%, #efc3b6 38%, #be8576 74%, #e2ad9f 100%);
    --metal-dark: linear-gradient(160deg, #5c312a 0%, #3c1d18 60%, #28120e 100%); --metal-dark-text: #ffe1d8;
}
.mat-metal.tone-chrome {
    --metal-ink: #0e1a26; --metal-ink-soft: #33465a; --metal-hi: rgb(255 255 255 / .95); --metal-lo: rgb(0 15 35 / .35);
    --metal-sheet: linear-gradient(180deg, #f7fbff 0%, #dbe6f0 18%, #8fa3b6 38%, #2c3a48 49%, #6f8599 52%, #c9d6e2 70%, #ffffff 86%, #a9b9c8 100%);
    --metal-plate: linear-gradient(180deg, #ffffff 0%, #e8eef4 50%, #d2dce6 100%);
    --metal-button: linear-gradient(180deg, #ffffff 0%, #dfe7ef 45%, #7d90a3 52%, #c4d1dd 100%);
    --metal-button-press: linear-gradient(0deg, #ffffff 0%, #dfe7ef 45%, #7d90a3 52%, #c4d1dd 100%);
    --metal-dark: linear-gradient(180deg, #4a5d70 0%, #1d2935 55%, #0d141c 100%); --metal-dark-text: #eaf2fa;
}
.mat-metal.tone-gunmetal {
    --metal-ink: #e9edf2; --metal-ink-soft: #aab3bd; --metal-hi: rgb(0 0 0 / .55); --metal-lo: rgb(0 0 0 / .55);
    --metal-sheet: linear-gradient(118deg, #1c2026 0%, #3b424b 13%, #6b737d 25%, #2f353c 37%, #4f565f 50%, #858d97 59%, #2a2f35 73%, #474e57 87%, #1f2328 100%);
    --metal-plate: linear-gradient(172deg, #4a5059 0%, #363b42 42%, #272b30 100%);
    --metal-button: linear-gradient(160deg, #7c848e 0%, #4c535c 38%, #262a30 74%, #3e444c 100%);
    --metal-button-press: linear-gradient(340deg, #7c848e 0%, #4c535c 38%, #262a30 74%, #3e444c 100%);
    --metal-dark: linear-gradient(160deg, #c9ced4 0%, #9aa1a9 55%, #6f767e 100%); --metal-dark-text: #15181c;
}
.mat-metal.tone-gunmetal .action .ic, .mat-metal.tone-gunmetal .social, .mat-metal.tone-gunmetal .bar .btn.share { box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), inset 0 -2px 4px rgb(0 0 0 / .4), 0 3px 8px var(--metal-lo); }
.mat-metal.tone-gunmetal .section { box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 10px 26px var(--metal-lo); }
.mat-metal.tone-gunmetal .contact-row, .mat-metal.tone-gunmetal .row, .mat-metal.tone-gunmetal .item { border-bottom-color: rgb(255 255 255 / .1); box-shadow: none; }
.mat-metal.tone-gunmetal .form input, .mat-metal.tone-gunmetal .form textarea { background: rgb(255 255 255 / .92); }

/* The sheet: light across the metal, brushing, fine grain */
body.mat-metal {
    background: var(--brush), var(--grain), var(--metal-sheet);
    background-size: 600px 600px, 220px 220px, 100% 100%;
    background-attachment: fixed;
    background-blend-mode: overlay, soft-light, normal;
    color: var(--metal-ink);
}
/* A soft band of reflected light that slowly travels across the metal */
body.mat-metal::before {
    content: ''; position: fixed; inset: -50%; z-index: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / .24) 48%, rgb(255 255 255 / .06) 52%, transparent 60%);
}
@media (prefers-reduced-motion: no-preference) {
    body.mat-metal::before { animation: metal-sheen 9s ease-in-out infinite; }
    @keyframes metal-sheen { 0%, 15% { transform: translateX(-35%); } 60%, 100% { transform: translateX(35%); } }
}
.mat-metal .page { position: relative; z-index: 1; }

/* Engraved lettering */
.mat-metal .company, .mat-metal .person, .mat-metal .position, .mat-metal .section > h2, .mat-metal .action .lbl,
.mat-metal .section, .mat-metal .contact-row, .mat-metal .row, .mat-metal .item h3, .mat-metal .share-row {
    color: var(--metal-ink);
    text-shadow: 0 1px 0 var(--metal-hi), 0 -1px 0 rgb(0 0 0 / .12);
}
.mat-metal .company { font-size: 27px; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; }
.mat-metal .person { letter-spacing: .04em; }
.mat-metal .position { color: var(--metal-ink-soft); opacity: 1; letter-spacing: .16em; text-transform: uppercase; font-size: 12px; }
.mat-metal .muted, .mat-metal .contact-row small { color: var(--metal-ink-soft); opacity: 1; }

/* Engraved rule under the name */
.mat-metal .header > div::after {
    content: ''; display: block; width: 120px; height: 2px; margin: 16px auto 0;
    background: linear-gradient(90deg, transparent, var(--metal-lo), transparent);
    box-shadow: 0 1px 0 var(--metal-hi);
}
.mat-metal.hdr-split .header > div::after { margin-left: 0; }



/* Raised metal buttons and icons */
.mat-metal .action .ic, .mat-metal .contact-row .ic, .mat-metal .social {
    background: var(--metal-button);
    color: var(--metal-ink);
    border: 1px solid rgb(0 0 0 / .22);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), inset 0 -2px 4px rgb(0 0 0 / .18), 0 3px 8px var(--metal-lo);
    text-shadow: 0 1px 0 var(--metal-hi);
}
.mat-metal .action:active .ic { background: var(--metal-button-press); box-shadow: inset 0 2px 5px rgb(0 0 0 / .3); }
.mat-metal .social { color: var(--metal-ink) !important; }
.mat-metal .action .lbl { font-weight: 600; letter-spacing: .03em; }
.mat-metal.btn-pills .action, .mat-metal.btn-list .action, .mat-metal.btn-tiles .action {
    background: var(--metal-button); color: var(--metal-ink); border: 1px solid rgb(0 0 0 / .2);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), 0 3px 8px var(--metal-lo); text-shadow: 0 1px 0 var(--metal-hi);
}
.mat-metal.btn-pills .action .ic, .mat-metal.btn-list .action .ic, .mat-metal.btn-tiles .action .ic { border: 0; box-shadow: none; background: transparent; }

/* Solid action buttons: dark polished metal with light lettering */
.mat-metal .btn, .mat-metal .link-btn, .mat-metal .product .btn {
    background: var(--metal-dark);
    color: var(--metal-dark-text);
    border: 1px solid rgb(0 0 0 / .4);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 4px 12px var(--metal-lo);
    text-shadow: 0 -1px 0 rgb(0 0 0 / .5);
    letter-spacing: .04em;
}
.mat-metal .btn-outline {
    background: var(--metal-button); color: var(--metal-ink);
    border: 1px solid rgb(0 0 0 / .25); box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), 0 3px 8px var(--metal-lo);
    text-shadow: 0 1px 0 var(--metal-hi);
}
.mat-metal .bar { background: linear-gradient(to top, rgb(0 0 0 / .2), transparent); }
.mat-metal .bar .btn.share { background: var(--metal-button); color: var(--metal-ink); border: 1px solid rgb(0 0 0 / .22); text-shadow: none; }

/* Sections: plates set into the sheet */
.mat-metal .section {
    background: var(--grain), var(--metal-plate);
    background-blend-mode: soft-light, normal;
    border: 1px solid rgb(0 0 0 / .14);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), inset 0 -1px 0 rgb(0 0 0 / .1), 0 10px 26px var(--metal-lo);
    backdrop-filter: none; -webkit-backdrop-filter: none;
}
.mat-metal .section > h2 { font-size: 14px; letter-spacing: .18em; text-transform: uppercase; }
.mat-metal .contact-row, .mat-metal .row, .mat-metal .item { border-bottom: 1px solid rgb(0 0 0 / .12); box-shadow: 0 1px 0 rgb(255 255 255 / .5); }
.mat-metal .contact-row:last-child, .mat-metal .row:last-child, .mat-metal .item:last-child { border-bottom: 0; box-shadow: none; }
.mat-metal .rich a, .mat-metal .item a.more, .mat-metal .product .price { color: var(--metal-ink); text-decoration: underline; }
.mat-metal .quote, .mat-metal .product { background: rgb(255 255 255 / .35); box-shadow: inset 0 1px 2px rgb(0 0 0 / .12); }
.mat-metal .gallery img, .mat-metal .item img, .mat-metal .product img, .mat-metal .video { box-shadow: 0 0 0 3px rgb(255 255 255 / .6), 0 4px 10px var(--metal-lo); }
.mat-metal .form input, .mat-metal .form textarea { background: rgb(255 255 255 / .85); border-color: rgb(0 0 0 / .2); box-shadow: inset 0 2px 4px rgb(0 0 0 / .12); }
.mat-metal .qr { box-shadow: 0 0 0 4px rgb(255 255 255 / .7), 0 6px 16px var(--metal-lo); }
.mat-metal .views { background: rgb(0 0 0 / .22); }
