/* layer-2.id — dark mode neon crypto split-screen identity dashboard */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --void: #0a0a14;
    --deep: #141422;
    --dim: #2a2a3a;
    --text: #c8d0d8;
    --neon: #00ff88;
    --alert: #ff4466;
    --glow: rgba(0, 255, 136, 0.15);
    --glow-strong: rgba(0, 255, 136, 0.4);
    --glow-soft: rgba(0, 255, 136, 0.2);
}

html { scroll-behavior: smooth; }

body {
    background: var(--void);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--glow); color: var(--neon); }

.neon { color: var(--neon); }

/* ───────────── Dashboard split layout ───────────── */
.dashboard {
    display: grid;
    grid-template-columns: 40% 60%;
    min-height: 100vh;
    width: 100%;
}

/* ───────────── Identity panel (left, sticky) ───────────── */
.identity-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--void);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid var(--dim);
}

.identity-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(0, 255, 136, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 0;
}

.mesh-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.9;
}

.mesh-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.identity-card {
    position: relative;
    z-index: 2;
    width: min(85%, 360px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem;
}

/* ───────────── Hex node + rings ───────────── */
.hex-stack {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hex-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: ring-spin 32s linear infinite;
}

.hex-ring-2 { animation-direction: reverse; animation-duration: 24s; }
.hex-ring-3 { animation-duration: 48s; }

.hex-node {
    position: relative;
    width: 130px;
    height: 150px;
    filter: drop-shadow(0 0 8px var(--glow-strong));
    animation: hex-glow 3s ease-in-out infinite;
}

.hex-core {
    transform-origin: center;
    animation: core-pulse 2s ease-in-out infinite;
}

@keyframes ring-spin {
    to { transform: rotate(360deg); }
}

@keyframes hex-glow {
    0%, 100% { filter: drop-shadow(0 0 4px var(--glow-soft)); }
    50%      { filter: drop-shadow(0 0 12px rgba(0, 255, 136, 0.6)); }
}

@keyframes core-pulse {
    0%, 100% { opacity: 0.6; r: 2.5; }
    50%      { opacity: 1;   r: 3.5; }
}

/* ───────────── Identity meta ───────────── */
.identity-meta {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.domain-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.1;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: var(--neon);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px var(--neon), 0 0 16px var(--glow-strong);
    animation: dot-blink 2s ease-in-out infinite;
}

@keyframes dot-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.45; }
}

.hash-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.4rem 0.85rem;
    background: rgba(20, 20, 34, 0.6);
    border: 1px solid var(--dim);
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.hash-label {
    color: var(--text);
    opacity: 0.5;
    letter-spacing: 0.12em;
    font-size: 0.65rem;
    text-transform: uppercase;
}

.hash-value {
    color: var(--neon);
    font-weight: 500;
    font-size: 0.78rem;
}

/* ───────────── Content panel (right, scroll) ───────────── */
.content-panel {
    background: var(--void);
    padding: 5rem 4rem 6rem;
    max-width: 100%;
    position: relative;
}

.content-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(10, 10, 20, 0.95), transparent);
    pointer-events: none;
    z-index: 5;
}

.content-header {
    margin-bottom: 4rem;
    max-width: 640px;
}

.kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    color: var(--neon);
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1.25rem;
    opacity: 0.85;
}

.content-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.content-lead {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    opacity: 0.78;
    max-width: 560px;
}

/* ───────────── Verification stack blocks ───────────── */
.block-wrap {
    --offset: 0px;
    margin: 0 auto;
    display: block;
    width: calc(100% + var(--offset));
    transform: translateX(calc(var(--offset) / -2));
}

/* progressive widening — each block 4px wider than previous */
.block-wrap[data-block="1"] { --offset: 0px; }
.block-wrap[data-block="2"] { --offset: 8px; }
.block-wrap[data-block="3"] { --offset: 16px; }
.block-wrap[data-block="4"] { --offset: 24px; }
.block-wrap[data-block="5"] { --offset: 32px; }

.block {
    background: var(--deep);
    border-left: 3px solid var(--neon);
    padding: 2rem 2.25rem;
    position: relative;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.block.visible {
    opacity: 1;
    transform: translateY(0);
}

.block::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--neon);
    box-shadow: 0 0 12px var(--glow-strong);
    transition: height 0.8s ease 0.2s;
}

.block.visible::after { height: 100%; }

.block-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--dim);
    padding-bottom: 0.85rem;
}

.block-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: var(--neon);
    background: var(--glow);
    padding: 0.25rem 0.55rem;
    border-radius: 2px;
    text-transform: uppercase;
}

.block-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.6vw, 1.55rem);
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.block-body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    opacity: 0.82;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

/* ───────────── Hex bullet list ───────────── */
.hex-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0;
}

.hex-list li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.92rem;
    color: var(--text);
    opacity: 0.88;
}

.hex-bullet {
    width: 14px;
    height: 16px;
    flex-shrink: 0;
    background-color: transparent;
    /* hexagon via clip-path */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background-image: linear-gradient(180deg, var(--neon), var(--neon));
    position: relative;
    /* stroked hex */
    background:
        linear-gradient(var(--deep), var(--deep)) padding-box,
        var(--neon) border-box;
    /* fallback: small filled diamond rotated */
}

/* simpler approach — render as inline svg block */
.hex-bullet {
    width: 14px;
    height: 16px;
    flex-shrink: 0;
    background: transparent;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--neon);
    opacity: 0.85;
    position: relative;
}

.hex-bullet::after {
    content: "";
    position: absolute;
    inset: 1.5px;
    background: var(--deep);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* ───────────── Code block ───────────── */
.code-block {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--void);
    border: 1px solid var(--dim);
    border-left: 2px solid var(--neon);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    white-space: pre;
}

.code-comment { color: var(--dim); }
.code-comment, .code-block .code-comment { color: #6a6a82; font-style: italic; }
.code-key { color: var(--neon); }
.code-str { color: #ffb27a; }
.code-ok { color: var(--neon); font-weight: 500; }

/* ───────────── Chain chips ───────────── */
.chain-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
}

.chain-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--dim);
    background: rgba(10, 10, 20, 0.5);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--text);
    border-radius: 2px;
    transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.chain-chip:hover {
    border-color: var(--neon);
    background: var(--glow);
    color: var(--neon);
}

.chip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 6px var(--glow-strong);
}

/* ───────────── Protocol cells ───────────── */
.proto-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0;
    border: 1px solid var(--dim);
}

.proto-cell {
    padding: 1rem 1.1rem;
    border-right: 1px solid var(--dim);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: rgba(10, 10, 20, 0.4);
}

.proto-cell:last-child { border-right: none; }

.proto-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    color: var(--text);
    opacity: 0.55;
    text-transform: uppercase;
}

.proto-value {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--neon);
    letter-spacing: -0.01em;
}

/* ───────────── Chain link between blocks ───────────── */
.chain-link {
    height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 0 auto;
    width: 100%;
}

.chain-line {
    width: 1px;
    height: 12px;
    background: var(--neon);
    opacity: 0.25;
}

.chain-diamond {
    width: 6px;
    height: 6px;
    background: var(--void);
    border: 1px solid var(--neon);
    transform: rotate(45deg);
    box-shadow: 0 0 6px var(--glow-soft);
}

/* ───────────── Footer ───────────── */
.content-footer {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--dim);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
}

.footer-mark {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.25rem;
}

.footer-hex {
    width: 22px;
    height: 26px;
    filter: drop-shadow(0 0 4px var(--glow-soft));
}

.footer-domain {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--text);
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.footer-tag {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    opacity: 0.65;
    font-size: 0.85rem;
}

.footer-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text);
    opacity: 0.55;
    margin-top: 0.5rem;
}

/* ───────────── Verification toast ───────────── */
.verify-toast {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    background: rgba(10, 10, 20, 0.92);
    border: 1px solid var(--neon);
    box-shadow: 0 0 20px var(--glow);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    color: var(--neon);
    backdrop-filter: blur(8px);
    z-index: 50;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
    pointer-events: none;
}

.verify-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.verify-svg {
    width: 18px;
    height: 18px;
}

.verify-path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    transition: stroke-dashoffset 0.6s ease 0.05s;
}

.verify-toast.show .verify-path { stroke-dashoffset: 0; }

/* ───────────── Responsive ───────────── */
@media (max-width: 980px) {
    .content-panel { padding: 4rem 2.25rem 5rem; }
    .block { padding: 1.75rem 1.75rem; }
}

@media (max-width: 760px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .identity-panel {
        position: relative;
        height: 60vh;
        min-height: 480px;
        border-right: none;
        border-bottom: 1px solid var(--dim);
    }

    .identity-card { width: min(90%, 320px); gap: 1.75rem; }

    .hex-stack { width: 180px; height: 180px; }
    .hex-node { width: 110px; height: 127px; }

    .content-panel { padding: 3rem 1.5rem 4rem; }

    .content-header { margin-bottom: 2.5rem; }

    .block { padding: 1.5rem 1.5rem; }

    .block-wrap { width: 100% !important; transform: none !important; }

    .verify-toast { right: 1rem; bottom: 1rem; padding: 0.5rem 0.85rem; }

    .proto-row { grid-template-columns: repeat(2, 1fr); }
    .proto-cell { border-right: 1px solid var(--dim); border-bottom: 1px solid var(--dim); }
    .proto-cell:nth-child(2n) { border-right: none; }
    .proto-cell:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 420px) {
    .content-title { font-size: 1.5rem; }
    .block-title { font-size: 1.1rem; }
    .hex-stack { width: 150px; height: 150px; }
    .hex-node { width: 90px; height: 104px; }
    .domain-name { font-size: 1.4rem; }
}
