/* Portfolio showcases. Product artwork and marks keep their original appearance. */
.showcase {
    --showcase-accent: #b8c8ff;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-section);
    margin: 0;
}
.showcase-copy { padding: 28px; }
.showcase .showcase-eyebrow {
    margin: 0 0 12px;
    color: var(--showcase-accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.showcase h3 { font-size: 30px; line-height: 1.2; letter-spacing: -.025em; margin: 0; }
.showcase .showcase-title { font-size: 24px; line-height: 1.35; color: var(--text); margin: 20px 0 12px; }
.showcase p { color: #b7b9c2; }
.showcase .showcase-note { color: #a5a9b7; font-size: 13px; margin: 18px 0 0; }
.showcase-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 24px; }
.showcase-actions a, .showcase-actions button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--showcase-accent);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
}
.showcase-actions .showcase-primary {
    color: #111522;
    background: var(--showcase-accent);
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
}
.showcase a:hover { text-decoration: underline; text-underline-offset: 4px; }
.showcase a:focus-visible, .showcase button:focus-visible { outline: 3px solid var(--showcase-accent); outline-offset: 5px; }
.edgekin-showcase {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: center;
    background: #171c2d;
    border-color: #333b57;
    padding: 24px 0 24px 12px;
    border-radius: 12px;
}
.edgekin-sky { position: absolute; inset: 1px; border-radius: 11px; overflow: hidden; pointer-events: none; opacity: .6; z-index: 0; }
.ek-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.ek-stars-twinkle { animation: ek-twinkle 5s ease-in-out infinite alternate; }
.edgekin-moon { position: absolute; width: 80px; height: 80px; top: 18px; right: 18px; visibility: hidden; pointer-events: none; z-index: 0; }
.edgekin-moon::before { content: ''; position: absolute; inset: -20%; border-radius: 50%; background: radial-gradient(circle, #e8eeff33 25%, #d6e0ff12 55%, transparent 72%); }
.edgekin-moon img { display: block; position: relative; width: 100%; height: auto; }
.edgekin-showcase .showcase-copy, .edgekin-showcase .showcase-copy > * { position: relative; z-index: 1; }
.edgekin-showcase.ek-still .ek-stars-twinkle { animation-play-state: paused; }
@keyframes ek-twinkle { from { opacity: .15; } to { opacity: .9; } }
.edgekin-showcase .showcase-copy { padding: 24px 24px 24px 12px; }
.edgekin-scene { position: relative; min-width: 0; padding: 12px 0; z-index: 1; }
.edgekin-tower { position: relative; width: 100%; aspect-ratio: 629 / 1393; }
.edgekin-tower > img { display: block; width: 100%; height: auto; }
.edgekin-tower .edgekin-glow { position: absolute; inset: 0; animation: ek-lantern 4s ease-in-out infinite; }
.edgekin-guardian {
    position: absolute; left: 64.5%; top: 62%; width: 25.4%; aspect-ratio: 1;
    transform-origin: 54% 94.7%; animation: ek-breathe 3.2s ease-in-out infinite;
}
.edgekin-guardian img { position: absolute; display: block; width: 100%; height: 100%; }
.edgekin-guardian .ek-eyes { opacity: 0; }
.edgekin-guardian.blink .ek-eyes { opacity: 1; }
.ek-ear { position: absolute; inset: 0; animation: ek-sway 4s ease-in-out infinite; }
.ek-ear-right { animation-direction: reverse; animation-delay: -1.4s; }
.edgekin-scene.ek-still *, .edgekin-scene.ek-still { animation-play-state: paused !important; }
@keyframes ek-breathe { 50% { transform: scale(1.018, 1.012); } }
@keyframes ek-sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes ek-lantern { 0%, 100% { opacity: .4; } 50% { opacity: .85; } }
.showcase-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.showcase-status {
    display: inline-block; font-size: 12px; letter-spacing: .06em;
    padding: 2px 9px; border: 1px solid #777044; border-radius: 4px; color: #e5d29c;
}
.pactum-showcase { --showcase-accent: #ecae9d; border-color: #493830; }
.pactum-heading { display: flex; align-items: center; gap: 16px; }
.pactum-mark {
    display: block; width: 56px; height: 56px; flex-shrink: 0;
    /* The favicon's cream ring becomes a transparent gap on the showcase background.
       Keep the original P and terracotta dot; percentages scale with the mark. */
    mask-image: radial-gradient(circle at 85.4% 14.6%, #000 8.85%, transparent 9.1% 13.6%, #000 13.8%);
}
.pactum-heading .showcase-eyebrow { margin-bottom: 4px; }
.pactum-heading h3 { font-size: 28px; }
.pactum-previews { margin: 24px 0 0; }
.pactum-preview { display: block; color: #c0bcb8; text-decoration: none; }
.pactum-preview img { display: block; width: 100%; height: auto; border-radius: 5px; border: 1px solid #51463f; }
.pactum-preview span { display: block; padding: 8px 0 0; font-size: 13px; }
.pactum-diagram-preview { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 18px; align-items: center; margin-top: 20px; }
.pactum-diagram-preview span { padding: 0; }
.pactum-diagram-preview strong { display: block; font-size: 15px; color: var(--text); margin-bottom: 6px; }
@media (max-width: 480px) {
    .showcase-copy { padding: 22px 20px; }
    .showcase .showcase-title { font-size: 22px; }
    .pactum-heading { gap: 12px; }
    .pactum-heading h3 { font-size: 25px; }
    .pactum-diagram-preview { grid-template-columns: 105px minmax(0, 1fr); gap: 14px; }
    .edgekin-showcase { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); padding: 12px 0 12px 4px; }
    .edgekin-showcase .showcase-copy { padding: 16px 16px 16px 8px; }
    .edgekin-showcase .showcase-title { font-size: 20px; }
    .edgekin-showcase .showcase-eyebrow { font-size: 11px; letter-spacing: .04em; }
    .edgekin-showcase .showcase-copy > p:not(.showcase-title):not(.showcase-eyebrow):not(.showcase-note) { font-size: 15px; }
    .edgekin-showcase .showcase-actions { gap: 8px; }
    .edgekin-showcase .showcase-actions a, .edgekin-showcase .showcase-actions button { font-size: 14px; }
    .edgekin-showcase .showcase-primary { padding: 9px 12px; }
    .edgekin-showcase { padding: 20px 16px 16px 8px; gap: 0 10px; }
    .edgekin-showcase .showcase-copy { display: contents; }
    .edgekin-showcase .edgekin-scene { grid-column: 1; grid-row: 1 / 6; align-self: center; }
    .edgekin-showcase .showcase-eyebrow { grid-column: 2; grid-row: 1; }
    .edgekin-showcase .showcase-heading { grid-column: 2; grid-row: 2; gap: 8px; }
    .edgekin-showcase .showcase-heading h3 { font-size: 25px; }
    .edgekin-showcase .showcase-title { grid-column: 2; grid-row: 3; font-size: 19px; }
    .edgekin-showcase .showcase-copy > p:nth-of-type(3) { grid-column: 2; grid-row: 4; }
    .edgekin-showcase .showcase-copy > p:nth-of-type(4) { grid-column: 2; grid-row: 5; }
    .edgekin-showcase .showcase-actions { grid-column: 1 / -1; justify-content: center; margin-top: 12px; gap: 8px 20px; }
    .edgekin-showcase .showcase-note { grid-column: 1 / -1; margin: 14px 8px 0; font-size: 12px; }

}

/* A side panel beside the page, using the Edgekin landing's iframe and Escape contract. */
:root { --ek-panel-width: clamp(360px, var(--ek-panel-user-width, 37vw), min(560px, calc(100vw - 320px))); }
.ek-game-panel {
    position: fixed; z-index: 80; inset: 0 0 0 auto;
    width: var(--ek-panel-width); height: 100vh; height: 100dvh;
    display: flex; flex-direction: column; background: #171c2d; color: #e5e5e5;
    border-left: 1px solid #414a61;
    visibility: hidden; transform: translateX(100%);
    transition: transform 280ms ease, visibility 0s linear 280ms;
}
.ek-game-panel.ek-open { visibility: visible; transform: none; transition: transform 280ms ease; }
.ek-panel-bar { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 12px 8px 18px; border-bottom: 1px solid #414a61; }
.ek-panel-title { flex: 1; font-size: 18px; font-weight: 600; }
.ek-panel-title small { color: #e5d29c; font-size: 12px; margin-left: 5px; letter-spacing: .06em; }
.ek-panel-control { display: grid; place-items: center; width: 44px; height: 44px; color: #e5e5e5; background: transparent; border: 1px solid #414a61; border-radius: 6px; cursor: pointer; text-decoration: none; }
.ek-panel-control:hover { background: #28314b; }
.ek-panel-control:focus-visible, .ek-panel-resize:focus-visible { outline: 3px solid #b8c8ff; outline-offset: -3px; }
.ek-panel-control svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ek-game-frame { display: block; flex: 1; width: 100%; min-height: 0; border: 0; background: #171c2d; }
.ek-panel-resize { position: absolute; z-index: 1; top: 0; bottom: 0; left: -5px; width: 10px; cursor: col-resize; touch-action: none; }
.ek-panel-resize:hover { background: #b8c8ff33; }
.ek-panel-resizing, .ek-panel-resizing * { cursor: col-resize !important; user-select: none; }
.ek-panel-resizing .ek-game-frame { pointer-events: none; }
@media (min-width: 721px) {
    body.ek-game-open { padding-right: var(--ek-panel-width); }
    body.ek-game-open .hero::before { width: calc(100vw - var(--ek-panel-width)); }
}
@media (min-width: 721px) and (max-width: 1000px) {
    body.ek-game-open .edgekin-showcase { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
    body.ek-game-open .edgekin-showcase .showcase-copy { padding-right: 16px; }
    body.ek-game-open .edgekin-showcase .showcase-title { font-size: 20px; }
    body.ek-game-open .edgekin-showcase .showcase-copy > p { font-size: 15px; }
}
@media (max-width: 720px) {
    :root { --ek-panel-width: 100%; }
    html:has(body.ek-game-open) { overflow: hidden; }
    .ek-panel-resize { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .edgekin-scene *, .edgekin-sky *, .ek-game-panel, .ek-game-panel.ek-open { animation: none !important; transition: none !important; }
}
