/* ===========================
   PARADOX INDEX — Contact System
   contact.css
   =========================== */

/* ===========================
   IBM PLEX MONO IMPORT
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ===========================
   CONTACT PAGE — BASE
   =========================== */

.contact-page body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.mono {
    font-family: 'IBM Plex Mono', 'Consolas', 'SF Mono', monospace;
}

/* ===========================
   CONTACT HERO
   =========================== */

.contact-hero {
    min-height: 40vh;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 4rem 5rem;
    position: relative;
    overflow: hidden;
}

.contact-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #B87333;
}

.contact-hero-inner {
    max-width: 760px;
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.contact-hero-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: #B87333;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    display: block;
}

.contact-hero-headline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}

.contact-hero-sub {
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    color: #666666;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
    font-weight: 400;
}

/* ===========================
   CHANNELS GRID SECTION
   =========================== */

.contact-channels-section {
    background: #ffffff;
    padding: 5rem 4rem;
}

.contact-section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-channels-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 3rem;
}

/* Channel Card */
.channel-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

/* Fully clickable link card variant */
.channel-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.channel-card-link:hover,
.channel-card-link:focus-visible {
    border-color: #111111;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    outline: none;
}

.channel-card-link:focus-visible {
    outline: 2px solid #B87333;
    outline-offset: 2px;
}

.channel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #B87333;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.channel-card:hover::before {
    width: 100%;
}

.channel-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.channel-icon svg {
    width: 32px;
    height: 32px;
}

.channel-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #666666;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.channel-data {
    font-family: 'IBM Plex Mono', 'Consolas', 'SF Mono', monospace;
    font-size: 1.05rem;
    color: #111111;
    font-weight: 400;
    word-break: break-all;
    margin-bottom: 14px;
    line-height: 1.3;
}

.channel-context {
    font-size: 0.85rem;
    color: #666666;
    line-height: 1.65;
    margin-bottom: 24px;
    flex: 1;
}

.channel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.channel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 20px;
    background: transparent;
    border: 1px solid #111111;
    color: #111111;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

.channel-btn:hover,
.channel-btn:focus-visible {
    background: #111111;
    color: #ffffff;
}

.channel-btn:focus-visible {
    outline: 2px solid #B87333;
    outline-offset: 2px;
}

.channel-btn svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

/* Channels security note */
.channels-security-note {
    font-size: 0.82rem;
    font-style: italic;
    color: #888888;
    text-align: center;
    margin-top: 1rem;
    line-height: 1.6;
}

/* ===========================
   ENGAGEMENT PROTOCOL
   =========================== */

.engagement-protocol-section {
    background: #f5f5f5;
    padding: 5rem 4rem;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}

.protocol-section-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: #666666;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 3.5rem;
    display: block;
}

.protocol-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

/* Horizontal connector line behind the steps */
.protocol-steps::before {
    content: '';
    position: absolute;
    top: 20px; /* center of the number circle */
    left: calc(12.5% + 20px);
    right: calc(12.5% + 20px);
    height: 1px;
    background: #cccccc;
    z-index: 0;
}

.protocol-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border: 1px solid #111111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    color: #111111;
    background: #f5f5f5;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.protocol-step:hover .step-number {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

.step-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #111111;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.step-desc {
    font-size: 0.82rem;
    color: #666666;
    line-height: 1.65;
    max-width: 230px;
    margin: 0 auto;
}

/* ===========================
   OPERATIONAL SECURITY (FAQ)
   =========================== */

.opsec-section {
    background: #ffffff;
    padding: 5rem 4rem;
}

.opsec-inner {
    max-width: 800px;
    margin: 0 auto;
}

.opsec-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: #666666;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    display: block;
}

.accordion-item {
    border-top: 1px solid #e5e5e5;
}

.accordion-item:last-child {
    border-bottom: 1px solid #e5e5e5;
}

.accordion-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s ease;
}

.accordion-trigger:focus-visible {
    outline: 2px solid #B87333;
    outline-offset: 2px;
}

.accordion-question {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.88rem;
    font-weight: 500;
    color: #111111;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.accordion-trigger:hover .accordion-question {
    color: #B87333;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    position: relative;
}

.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    background: #666666;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.accordion-icon::before {
    width: 12px;
    height: 1px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.accordion-icon::after {
    width: 1px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.accordion-item.open .accordion-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.accordion-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.open .accordion-body {
    max-height: 300px;
}

.accordion-answer {
    font-size: 0.9rem;
    color: #555555;
    line-height: 1.75;
    padding: 0 0 1.25rem 0;
    max-width: 680px;
}

/* ===========================
   FOOTER CTA (PAGE-SPECIFIC)
   =========================== */

.contact-footer-cta {
    background: #111111;
    padding: 5rem 4rem;
    text-align: center;
    border-top: 2px solid #B87333;
}

.contact-footer-cta p {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 2rem;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.contact-footer-cta p em {
    color: #B87333;
    font-style: normal;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    background: #ffffff;
    color: #111111;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-btn:hover,
.cta-btn:focus-visible {
    transform: scale(1.02);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    background: #f5f5f5;
}

.cta-btn:focus-visible {
    outline: 2px solid #B87333;
    outline-offset: 3px;
}

/* ===========================
   COPY TO CLIPBOARD FEEDBACK
   =========================== */

.copy-feedback {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #111111;
    color: #ffffff;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    padding: 10px 20px;
    border: 1px solid #333333;
    border-left: 2px solid #B87333;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9998;
    white-space: nowrap;
}

.copy-feedback.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===========================
   FLOATER COMPONENT
   =========================== */

.contact-floater {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, sans-serif;
    /* Extend the hover hit area upward so the cursor doesn't
       leave the element while moving from trigger to panel.
       The panel sits 10px above; we bridge that gap + the panel
       height with a transparent pseudo-element. */
    padding-top: 320px;
    margin-top: -320px;
}

/* Trigger Button */
.floater-trigger {
    height: 44px;
    padding: 0 18px;
    background: #0a0a0a;
    border: 1px solid #444444;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    white-space: nowrap;
}

.floater-trigger:hover {
    border-color: #B87333;
    background: #111111;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
}

.floater-trigger:hover .floater-icon {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.floater-trigger:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.floater-icon {
    width: 14px;
    height: 14px;
    color: #B87333;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.floater-label {
    font-family: 'IBM Plex Mono', 'Consolas', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1;
}

.floater-trigger[aria-expanded="true"] .floater-label {
    color: #B87333;
}

/* Panel */
.floater-panel {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom right;
    will-change: opacity, transform;
}

.floater-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Panel Header */
.floater-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid #222222;
    position: relative;
}

.floater-panel-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: #666666;
    text-transform: uppercase;
}

.floater-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    transition: color 0.15s ease;
    border-radius: 2px;
    flex-shrink: 0;
    min-width: 24px;
    min-height: 24px;
}

.floater-close:hover {
    color: #ffffff;
}

.floater-close:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Channels */
.floater-channels {
    list-style: none;
    padding: 0;
    margin: 0;
}

.floater-channel {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #1a1a1a;
}

.floater-channel:last-child {
    border-bottom: none;
}

.floater-channel-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #888888;
}

.floater-channel-icon svg {
    width: 16px;
    height: 16px;
}

.floater-channel-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.floater-channel-primary {
    font-family: 'IBM Plex Mono', 'Consolas', 'SF Mono', monospace;
    font-size: 0.76rem;
    color: #ffffff;
    font-weight: 400;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: text-decoration-color 0.15s ease;
}

.floater-channel-primary:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

.floater-channel-primary:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    border-radius: 1px;
}

.floater-channel-secondary {
    font-size: 0.65rem;
    color: #666666;
    font-family: 'Inter', sans-serif;
    line-height: 1.3;
}

/* Live region for screen reader announcements */
.floater-live {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ===========================
   BOTTOM SHEET (mobile < 480px)
   =========================== */

@media (max-width: 480px) {
    .contact-floater {
        bottom: 20px;
        right: 20px;
    }

    .floater-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 8px 8px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        transform: translateY(100%);
        transform-origin: bottom center;
        max-height: 85vh;
        overflow-y: auto;
        padding: 24px 20px 32px;
    }

    .floater-panel.open {
        transform: translateY(0);
    }

    .floater-panel::before {
        content: '';
        display: block;
        width: 36px;
        height: 3px;
        background: #444444;
        border-radius: 2px;
        margin: 0 auto 20px;
    }

    .contact-channels-grid {
        grid-template-columns: 1fr;
    }

    .protocol-steps {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .protocol-steps::before {
        display: none;
    }

    .protocol-step {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 0 0 2rem 0;
        gap: 1.25rem;
    }

    .protocol-step:last-child {
        padding-bottom: 0;
    }

    .step-number {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .step-desc {
        margin: 0;
        text-align: left;
    }

    /* Vertical connector */
    .protocol-step:not(:last-child)::after {
        display: none;
    }
}

/* ===========================
   RESPONSIVE — TABLET
   =========================== */

@media (max-width: 768px) {
    .contact-hero {
        padding: 7rem 2rem 4rem;
    }

    .contact-channels-section {
        padding: 4rem 2rem;
    }

    .contact-channels-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .engagement-protocol-section {
        padding: 4rem 2rem;
    }

    .protocol-steps {
        grid-template-columns: 1fr;
        max-width: 500px;
        gap: 0;
    }

    .protocol-steps::before {
        display: none;
    }

    .protocol-step {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 0 0 2rem 0;
        gap: 1.25rem;
    }

    .protocol-step:last-child {
        padding-bottom: 0;
    }

    .step-number {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .step-desc,
    .step-title {
        text-align: left;
    }

    .step-desc {
        margin: 0;
    }

    .opsec-section {
        padding: 4rem 2rem;
    }

    .contact-footer-cta {
        padding: 4rem 2rem;
    }
}

@media (max-width: 480px) {
    .contact-hero {
        padding: 6rem 1.5rem 3.5rem;
        min-height: unset;
    }

    .contact-hero-headline {
        font-size: 1.7rem;
    }

    .channel-card {
        padding: 24px;
    }

    .channel-btn {
        padding: 10px 16px;
        font-size: 0.65rem;
    }
}
