/* ═══════════════════════════════════════════════════════════
   MEDIALAB — CONTACT
   Loaded after medialab-home.css (shared nav, footer, buttons,
   type, marquee, CTA). Only contact-specific pieces here.
   ═══════════════════════════════════════════════════════════ */

.grain { animation: none; inset: 0; width: 100%; height: 100%; }
#heroCanvas, .contact-hero .hero-headline { will-change: transform, opacity; }

.nav-links a.is-active { color: var(--ink); background: var(--fg); }

/* ── HERO ─────────────────────────────────────────────────── */
.contact-hero { justify-content: space-between; }
.contact-hero::after {
    background: linear-gradient(to top, var(--ink) 0%, transparent 42%), linear-gradient(to bottom, rgba(2, 20, 23, .7) 0%, transparent 25%);
}
.contact-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }

.contact-hero .hero-headline { font-size: clamp(3.2rem, 11vw, 12rem); margin-top: auto; }
.contact-hero .hero-headline .indent { padding-left: 16vw; }

.contact-hero .hero-foot { grid-template-columns: 1fr auto; align-items: center; }

/* Giant email link with rolling letters */
.mail-big {
    position: relative; display: inline-flex; align-items: center; gap: clamp(12px, 2vw, 28px);
    font-size: clamp(1.6rem, 4.6vw, 4.4rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1.1;
}
.mail-big .roll { position: relative; display: inline-block; overflow: hidden; padding-bottom: .08em; }
.mail-big .roll > span { display: inline-block; transition: transform .7s var(--ease); }
.mail-big .roll > span:last-child { position: absolute; left: 0; top: 100%; color: var(--accent); }
.mail-big .roll::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .7s var(--ease); }
.mail-big .mail-arrow {
    flex: none; display: grid; place-items: center;
    width: clamp(48px, 5vw, 72px); aspect-ratio: 1; border-radius: 50%;
    border: 1px solid var(--line); transition: transform .7s var(--ease), background .4s, color .4s, border-color .4s;
}
.mail-big .mail-arrow svg { width: 40%; height: 40%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
    .mail-big:hover .roll > span { transform: translateY(-100%); }
    .mail-big:hover .roll::after { transform: scaleX(1); transform-origin: left; }
    .mail-big:hover .mail-arrow { background: var(--accent); color: var(--ink); border-color: var(--accent); transform: rotate(-45deg); }
}

/* Availability pill */
.avail {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 18px 10px 14px; border-radius: 100px;
    border: 1px solid var(--line); background: rgba(2, 20, 23, .4);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-size: .85rem; color: var(--fg-muted); white-space: nowrap;
}
.avail.is-off .pulse, .avail.is-off .pulse::after { background: #e2a64f; }

/* ── CONTACT FORM (white section) ─────────────────────────── */
.brief { background: #fff; color: var(--ink); }
.brief .eyebrow { color: rgba(2, 20, 23, .6); }
.brief .sub { color: rgba(2, 20, 23, .64); }
.brief-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.brief-aside { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 24px; }
.brief-aside .heading { font-size: clamp(2.4rem, 5vw, 4.6rem); }
.brief-aside .heading .serif { color: var(--deep); }

.quick-contact { list-style: none; border-top: 1px solid rgba(2, 20, 23, .12); }
.quick-contact li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(2, 20, 23, .12); font-size: 1rem; }
.quick-contact span { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(2, 20, 23, .5); }
.quick-contact a { font-weight: 500; color: var(--ink); }
.quick-contact a:hover { color: var(--ml-700, #086E77); }

.brief-wrap { padding: clamp(24px, 3.5vw, 48px); border-radius: 24px; background: #f6f9f8; border: 1px solid rgba(2, 20, 23, .08); }
.brief-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: .92rem; font-weight: 600; color: var(--ink); }
.form-group label b { color: #c0392b; font-weight: 600; }
.form-group label i { font-style: normal; font-weight: 400; color: rgba(2, 20, 23, .5); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px 16px;
    background: #fff; color: var(--ink);
    border: 1.5px solid rgba(2, 20, 23, .14); border-radius: 12px;
    font: inherit; font-size: 1rem;
    outline: none; transition: border-color .25s, box-shadow .25s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(2, 20, 23, .38); }
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: rgba(2, 20, 23, .28); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--ml-700, #086E77); box-shadow: 0 0 0 4px rgba(8, 110, 119, .12);
}
.form-group select {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23021417' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}
.form-group textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.form-group.is-invalid input, .form-group.is-invalid textarea { border-color: #c0392b; box-shadow: 0 0 0 4px rgba(192, 57, 43, .1); }

.brief-error { color: #c0392b; font-size: .92rem; font-weight: 500; min-height: 1.3em; margin-bottom: -8px; }
.send-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px 28px; border: 0; border-radius: 100px;
    background: var(--ink); color: #fff;
    font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: background .3s, transform .3s;
}
.send-btn:hover { background: var(--ml-700, #086E77); transform: translateY(-2px); }
.send-btn svg { transition: transform .3s; }
.send-btn:hover svg { transform: translateX(4px); }
.send-btn--ghost { width: auto; background: transparent; color: var(--ink); border: 1.5px solid rgba(2, 20, 23, .2); }
.send-btn--ghost:hover { background: var(--ink); color: #fff; }
.brief-note { text-align: center; color: rgba(2, 20, 23, .5); font-size: .86rem; }

/* Thank-you state */
.brief-done { display: none; flex-direction: column; align-items: flex-start; gap: 18px; padding: 12px 0; }
.done-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--ml-700, #086E77); color: #fff; display: grid; place-items: center; }
.done-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.brief-done h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.brief-done p { max-width: 460px; color: rgba(2, 20, 23, .7); font-size: 1rem; }
.brief-done p a { color: var(--ml-700, #086E77); font-weight: 600; }
.is-sent .brief-form { display: none; }
.is-sent .brief-done { display: flex; }

/* ── STUDIO (map + socials) ───────────────────────────────── */
.studio-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(16px, 2vw, 28px); margin-top: clamp(40px, 6vw, 72px); }
.map-frame {
    position: relative; overflow: hidden; border-radius: 28px;
    min-height: clamp(360px, 46vw, 560px); background: var(--ink-2); border: 1px solid var(--line);
}
.map-frame iframe {
    /* Taller than the frame so the scroll parallax never shows an edge */
    position: absolute; left: 0; top: -6%; width: 100%; height: 112%; border: 0;
    filter: invert(.92) hue-rotate(180deg) grayscale(.35) contrast(.92) brightness(.95);
    transition: filter .8s var(--ease);
}
.map-frame:hover iframe { filter: invert(.92) hue-rotate(180deg) grayscale(0) contrast(1) brightness(1); }
.map-tag {
    position: absolute; left: 20px; bottom: 20px; z-index: 1; pointer-events: none;
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 20px; border-radius: 18px;
    background: rgba(2, 20, 23, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--line);
}
.map-tag b { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.map-tag span { font-size: .86rem; color: var(--fg-muted); }

.socials { display: flex; flex-direction: column; gap: clamp(16px, 2vw, 28px); }
.social-card {
    position: relative; overflow: hidden; flex: 1;
    display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
    min-height: 140px; padding: 24px; border-radius: 22px;
    background: var(--ink-2); border: 1px solid var(--line);
    transition: color .5s;
}
.social-card::after { content: ''; position: absolute; width: 160%; aspect-ratio: 1; left: -30%; top: 100%; border-radius: 50%; background: var(--accent); z-index: 0; transition: top .8s var(--ease); }
.social-card > * { position: relative; z-index: 1; }
.social-card small { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 8px; transition: color .5s; }
.social-card b { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.social-card .arrow { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .6s var(--ease), background .5s, border-color .5s, color .5s; }
.social-card .arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
    .social-card:hover { color: var(--ink); }
    .social-card:hover::after { top: -30%; }
    .social-card:hover small { color: rgba(2, 20, 23, .6); }
    .social-card:hover .arrow { background: var(--ink); color: var(--accent); border-color: var(--ink); transform: rotate(45deg); }
}

.contact-cta .cta-title { font-size: clamp(3rem, 10vw, 10rem); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .contact-hero .hero-headline .indent { padding-left: 0; }
    .contact-hero .hero-foot { grid-template-columns: 1fr; gap: 20px; }

    .brief-grid, .studio-grid { grid-template-columns: 1fr; }
    .brief-aside { position: static; }

    .socials { flex-direction: row; flex-wrap: wrap; }
    .social-card { flex: 1 1 200px; }
}

@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
    .mail-big .mail-arrow { display: none; }
    .map-frame { border-radius: 22px; }
}
