/* ==========================================================================
   ANIMUS JAPONICA™ — Modular Visual Layer (v1.7 Sealed Assets)
   ========================================================================== */

/* 1. Authentic {3,6} Equilateral Kumiko Lattice (48px cell, full horizontal rails) */
.blueprint-canvas {
    background-image: url('animus_kumiko_grid_tile.svg') !important;
    background-size: 48px 83.138439px !important;
    background-repeat: repeat !important;
    background-position: 0px 0px !important;
    will-change: transform;
    left: -48px !important;
    right: -48px !important;
}

/* 2. Unified Card Surface Translucency Across ALL Sections */
.panel-card,
.about-slab,
.contact-box,
.slab,
.policy-slab {
    background: rgba(35, 34, 38, 0.78) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* 3. Interactive Peg-Locking Kumiko-AJ Hanko Seal (Click -> Page Top) */
.kumiko-hanko-seal {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 55.425626px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    z-index: 90;
    opacity: 0.14;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.42));
    will-change: transform, opacity;
    transition: opacity 0.32s ease, filter 0.25s ease;
    display: none;
}

.kumiko-hanko-seal.is-locked-edge {
    opacity: 0.72;
}

.kumiko-hanko-seal:hover,
.kumiko-hanko-seal:focus-visible {
    opacity: 0.96 !important;
    filter: drop-shadow(0 6px 16px rgba(189, 44, 30, 0.35));
    outline: none;
}

.kumiko-hanko-seal {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.kumiko-seal-graphic {
    display: block;
    width: 100%;
    height: 100%;
    background-image: url('animus_kumiko_aj_seal.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.kumiko-hanko-tooltip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    background: rgba(24, 23, 27, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-right: 2px solid #BD2C1E;
    color: #E2E2E6;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
    padding: 4px 9px;
    border-radius: 2px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.kumiko-hanko-seal:hover .kumiko-hanko-tooltip,
.kumiko-hanko-seal:focus-visible .kumiko-hanko-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (min-width: 960px) {
    .kumiko-hanko-seal {
        display: block;
    }
}

/* 4. Home Page AnchoreD Middle-Ground Crest (Exact Landscape & Portrait Balance) */
:root {
    --anchored-size: clamp(240px, 52vw, 350px);
}

/* Remove #hero's default 110px bottom margin so AnchorD spacing is exact in both orientations */
#hero {
    margin-bottom: 0 !important;
}

.anchored-hero-slot {
    width: 100%;
    height: var(--anchored-size);
    /* Portrait/mobile: optically centered between #hero chips and Principles & Praxis */
    margin: clamp(44px, 5.5vh, 72px) 0 clamp(68px, 8vh, 108px);
    pointer-events: none;
}

@media (min-width: 900px) and (orientation: landscape) {
    :root {
        /* Scales generously (~400-440px) while respecting viewport height so bottom rim never clips */
        --anchored-size: min(30vw, 42vh, 440px);
    }

    .anchored-hero-slot {
        /* Tight top gap brings full AnchorD into view; generous bottom gap keeps Principles & Praxis below fold */
        margin: clamp(20px, 3vh, 38px) 0 clamp(110px, 16vh, 200px);
    }
}

.anchored-crest-stage {
    position: fixed;
    left: 50%;
    top: 0;
    width: var(--anchored-size);
    height: var(--anchored-size);
    z-index: 1; /* Above blueprint-canvas (0) & vignette (1), BEHIND .shell & cards (2) */
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform, opacity;
    transition: opacity 0.35s ease;
    filter: drop-shadow(0 20px 38px rgba(0, 0, 0, 0.52));
}

.anchored-crest-stage {
    background-image: url('crest_anchored.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-touch-callout: none;
}

.anchored-crest-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
}

/* 5. Kobe Page: Dynamic JST Telemetry Bar, External Maps Link & Technical Breakdown */
.kobe-artwork-wrapper {
    margin-top: clamp(24px, 4vw, 40px);
    margin-bottom: clamp(28px, 5vw, 48px);
}

.kobe-artwork-wrapper .hero-artwork-frame {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.kobe-telemetry-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(24, 23, 27, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(0.66rem, 1.3vw, 0.74rem);
    letter-spacing: 0.07em;
    color: #8E8E98;
}

.kobe-telemetry-status {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.kobe-telemetry-status .jst-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #BD2C1E;
    flex-shrink: 0;
}

.kobe-telemetry-status strong {
    color: #E2E2E6;
    font-weight: 600;
}

.kobe-coord-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #D1D1D6 !important;
    border-bottom: 1px dotted rgba(226, 226, 230, 0.35);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.kobe-coord-link:hover,
.kobe-coord-link:focus-visible {
    color: #FFFFFF !important;
    border-bottom-color: #BD2C1E;
    outline: none;
}

.kobe-coord-tooltip {
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(24, 23, 27, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 2px solid #BD2C1E;
    color: #E2E2E6;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 2px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    z-index: 40;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.kobe-coord-link:hover .kobe-coord-tooltip,
.kobe-coord-link:focus-visible .kobe-coord-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.kobe-callout-toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #D1D1D6;
    font-family: inherit;
    font-size: inherit;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kobe-callout-toggle:hover,
.kobe-callout-toggle[aria-pressed="true"] {
    background: rgba(189, 44, 30, 0.22);
    border-color: #BD2C1E;
    color: #FFFFFF;
}

.kobe-callout-layer {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.28s ease;
    background: rgba(18, 17, 21, 0.30);
}

.kobe-callout-layer.is-visible {
    opacity: 1;
}

.kobe-pin {
    position: absolute;
    width: 0;
    height: 0;
}

.kobe-pin-dot {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #BD2C1E;
    border: 1.5px solid #E2E2E6;
    box-shadow: 0 0 0 3px rgba(189, 44, 30, 0.34);
}

.kobe-pin-card {
    position: absolute;
    top: 10px;
    left: 8px;
    background: rgba(24, 23, 27, 0.90);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 2px solid #BD2C1E;
    padding: 6px 9px;
    border-radius: 2px;
    width: clamp(150px, 21vw, 240px);
    color: #E2E2E6;
    font-size: clamp(0.60rem, 1.05vw, 0.72rem);
    line-height: 1.38;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

.kobe-pin.card-left .kobe-pin-card {
    left: auto;
    right: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    border-right: 2px solid #BD2C1E;
}

.kobe-pin.card-right-mid .kobe-pin-card {
    top: -12px;
    left: 14px;
}

.kobe-pin-card span {
    display: block;
    color: #9A9AA6;
    font-size: 0.88em;
    margin-top: 2px;
}

@media (max-width: 680px) {
    .kobe-pin-card span {
        display: none;
    }
}

/* 6. Stateless Contact Form Status Feedback */
.contact-status-msg {
    margin-top: 14px;
    font-size: 0.82rem;
    line-height: 1.6;
    letter-spacing: 0.04em;
    min-height: 1.2em;
}
.contact-status-msg.is-success {
    color: #2ECC71;
}
.contact-status-msg.is-error {
    color: #E74C3C;
}
