/* ==========================================================================
   Heritage Minerals: Collaborate and Media (the voice pages).

   Collaborate  Every stone needs a setting. The enquiry form is held in a
                jeweller's setting: a metal bezel and four claws. Choose
                what you'd like to build and it is re-set in that stone
                (pure CSS, so a topic pre-filled from the footer works too):
                  partnership = platinum (bonds that last)
                  project     = tantalite (technology)
                  advisory    = quartz (clarity)
                  edusyms     = emerald (education, growth)
                  investment  = gold (value)
                  media       = diamond (the stylus)
                  gifting     = gold
                  other / none = gold
   Media        The diamond stylus: a record needle is diamond-tipped, and
                turns grooves into sound. Speaking topics each in the stone
                of their subject; formats as mineral slabs (podcasts take
                the diamond).

   Layers on pages.css and minerals.css (.mn-s--* tokens, chip, hallmark).
   Linked on collaborate.html and media.html by scripts/update_minerals.py,
   which also tags the topic and format cards and writes the hallmark.
   ========================================================================== */

.mn-gild--diamond { --mn-text-lustre: var(--mn-ink-diamond); }
[data-theme="dark"] .mn-gild--diamond { --mn-text-lustre: var(--mn-glow-diamond); }

/* A small cut stone before a title, in its card's stone */
.mn-cut-title::before {
    content: ""; display: inline-block; width: 0.8em; height: 0.8em; margin-right: 0.5em; vertical-align: -0.04em;
    background: var(--s-lustre); clip-path: var(--s-clip); border-radius: var(--s-radius);
}

/* ==========================================================================
   COLLABORATE: the setting
   ========================================================================== */
.contact-form-wrapper {
    --set-lustre: var(--mn-lustre-gold); --set-c: #D6A85A; --set-lo: #8A6420; --set-ink: var(--mn-gold-ink); --set-name: "Set in gold";
    position: relative; border: 2px solid transparent;
    background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box, var(--set-lustre) border-box;
    box-shadow: var(--shadow-lg), 0 24px 60px -30px color-mix(in srgb, var(--set-c) 55%, transparent);
    transition: box-shadow 0.6s ease;
}
/* Four claws hold the form at its corners */
.contact-form-wrapper::before {
    content: ""; position: absolute; inset: -9px; pointer-events: none; z-index: 1;
    --claw: radial-gradient(circle at 38% 34%, #FFFFFF 0 12%, var(--set-c) 40%, var(--set-lo) 72%, transparent 74%);
    background: var(--claw) 0 0 / 18px 18px no-repeat, var(--claw) 100% 0 / 18px 18px no-repeat,
                var(--claw) 0 100% / 18px 18px no-repeat, var(--claw) 100% 100% / 18px 18px no-repeat;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}
/* What it is set in */
.contact-form-wrapper::after {
    content: var(--set-name); position: absolute; top: 0; left: 50%; translate: -50% -55%;
    padding: 0.3rem 0.8rem; border-radius: 999px; white-space: nowrap;
    font: 600 0.62rem/1 var(--font-mono, 'JetBrains Mono', monospace); letter-spacing: 0.14em; text-transform: uppercase;
    color: #FFFFFF; background: linear-gradient(180deg, #2E2823, #1A1613); box-shadow: inset 0 0 0 1px var(--set-c), 0 6px 16px -8px rgba(0, 0, 0, 0.5);
}
.contact-form-wrapper:has(option[value="partnership"]:checked) { --set-lustre: var(--mn-lustre-platinum); --set-c: #C3C8CE; --set-lo: #6B7178; --set-ink: var(--mn-platinum-ink); --set-name: "Set in platinum"; }
.contact-form-wrapper:has(option[value="project"]:checked) { --set-lustre: var(--mn-lustre-tantalite); --set-c: #8FA3BE; --set-lo: #2A2420; --set-ink: var(--mn-tantalite-ink); --set-name: "Set in tantalite"; }
.contact-form-wrapper:has(option[value="advisory"]:checked) { --set-lustre: linear-gradient(115deg, #A79BBF, #F4F1FA 35%, #7E6FA0 60%, #CFC6E0); --set-c: #B7A9D6; --set-lo: #5E5379; --set-ink: var(--mn-quartz-ink); --set-name: "Set in quartz"; }
.contact-form-wrapper:has(option[value="edusyms"]:checked) { --set-lustre: var(--mn-lustre-emerald); --set-c: #2FB57F; --set-lo: #075E43; --set-ink: var(--mn-emerald-ink); --set-name: "Set in emerald"; }
.contact-form-wrapper:has(option[value="media"]:checked) { --set-lustre: conic-gradient(from 210deg, var(--mn-fire-stops)); --set-c: #A8E9FF; --set-lo: #2D5F8F; --set-ink: var(--mn-diamond-ink); --set-name: "Set in diamond"; }
.contact-form-wrapper :is(.form-input, .form-select, .form-textarea):focus {
    border-color: var(--set-c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--set-c) 25%, transparent);
}
[data-theme="dark"] .contact-form-wrapper::after { color: #F7F4EE; }

/* Direct contact: each address in its stone */
.direct-contact__grid .direct-contact__item { position: relative; overflow: hidden; }
.direct-contact__grid .direct-contact__item::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--s-lustre, transparent); }
.direct-contact__grid .direct-contact__item:has(a[href$="me@lvmre.com"]) { --s-lustre: var(--mn-lustre-quartz); }
.direct-contact__grid .direct-contact__item:has(a[href$="hello@lvmre.com"]) { --s-lustre: var(--mn-lustre-gold); }
.direct-contact__grid .direct-contact__item:has(a[href*="edusyms"]) { --s-lustre: var(--mn-lustre-emerald); }
.direct-contact__grid .direct-contact__item:has(a[href*="press@"]) { --s-lustre: conic-gradient(from 30deg, var(--mn-fire-stops)); }

/* ==========================================================================
   MEDIA: the diamond stylus
   ========================================================================== */
.page-header:has(.mn-hallmark--voice) { position: relative; overflow: clip; }
.mn-hallmark--voice {
    position: absolute; z-index: 1; top: 50%; translate: 0 -40%; right: max(2rem, calc((100% - 1280px) / 2 + 3rem));
    width: clamp(120px, 11vw, 168px);
    animation: mn-hm-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}
@media (max-width: 1099px) { .mn-hallmark--voice { display: none; } }

/* Speaking topics and formats: each card in its stone */
.topic-card[class*="mn-s--"], .collab-card[class*="mn-s--"] { position: relative; overflow: hidden; transition: transform 0.35s var(--ease-spring, ease), box-shadow 0.35s; }
.topic-card[class*="mn-s--"]::after, .collab-card[class*="mn-s--"]::after { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--s-lustre); }
.topic-card[class*="mn-s--"]:hover, .collab-card[class*="mn-s--"]:hover { box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--s-c) 45%, transparent); }
.collab-card.mn-s--gold .collab-card__icon { background: linear-gradient(135deg, #5E4210, #A87A28); color: #FFFFFF; }
.collab-card.mn-s--platinum .collab-card__icon { background: linear-gradient(135deg, #3F444A, #7A8088); color: #FFFFFF; }
.collab-card.mn-s--diamond .collab-card__icon { background: linear-gradient(135deg, #1F4F80, #2D6CA8 60%, #6A4FA0); color: #FFFFFF; }
.collab-card.mn-s--emerald .collab-card__icon { background: linear-gradient(135deg, #064E3B, #1F9D6E); color: #FFFFFF; }
.collab-card[class*="mn-s--"] .collab-card__icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px -10px rgba(0, 0, 0, 0.55); }

/* ==========================================================================
   Motion, forced colours, print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) { .mn-hallmark--voice { animation: none !important; } }
@media (forced-colors: active) {
    .contact-form-wrapper { border-color: CanvasText; background: Canvas; }
    .contact-form-wrapper::before, .contact-form-wrapper::after, .mn-hallmark--voice { display: none; }
}
@media print {
    .contact-form-wrapper::before, .contact-form-wrapper::after, .mn-hallmark--voice { display: none !important; }
}
