/* ===========================================================
   3D Portfólió — stílus
   Paletta: mélyfekete színpad (#0B0B0C), meleg pergamen kártya-
   keretek, borostyán jelzőszín. A kártyák valódi böngésző-
   ablakként jelennek meg, 3D-ben legyezőszerűen elrendezve.
   =========================================================== */

:root {
    --stage-bg: #050713;
    --stage-bg-2: #080d20;
    --ink: #e8f7ff;
    --ink-dim: #8ca8ff;
    --neon-cyan: #3be8ff;
    --neon-lime: #c6ff4a;
    --line: rgba(59, 232, 255, 0.18);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--stage-bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
}

.stage {
    position: relative;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 24px 36px;
    background: transparent;
}

/* ---------- fejléc ---------- */

.stage-head {
    text-align: center;
    margin-bottom: 44px;
}

.eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--neon-lime);
    margin: 0 0 14px;
    text-shadow: 0 0 14px rgba(198, 255, 74, 0.45);
}

.title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(28px, 4.4vw, 48px);
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.01em;
    text-shadow: 0 0 18px rgba(59, 232, 255, 0.18);
}

.title span {
    color: var(--neon-cyan);
    font-style: italic;
    font-weight: 500;
}

/* ---------- coverflow ---------- */

.coverflow {
    position: relative;
    width: calc(100% + 160px);
    max-width: none;
    left: -80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

/* ensure no faint framing from parent styles */
.stage, .coverflow, .track {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.nav-arrow { z-index: 120; }

/* Hide only the grid overlay on this page to avoid faint framed look; keep scan-beam (top reflector) */
.grid-layer { display: none !important; }

.coverflow::before {
    /* decorative frame removed to allow full-bleed integration */
    display: none;
}

.track,
.coverflow {
    position: relative;
    width: 100%;
    touch-action: none;
}

.track {
    height: 640px;
    perspective: 1600px;
    perspective-origin: 50% 46%;
    transform: translateX(var(--drag-offset, 0));
    transition: transform 0.28s cubic-bezier(.2,.85,.25,1);
    user-select: none;
    touch-action: pan-y;
    -webkit-user-drag: none;
    overflow: visible;
}

.track.is-dragging {
    transition: none;
    cursor: grab;
}

.track.is-swipe-dragging .card-link {
    pointer-events: none;
}

.card {
    position: absolute;
    top: 0;
    left: 50%;
    width: 880px;
    height: 100%;
    margin-left: -440px;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.22, 0.68, 0.2, 1), opacity 0.45s ease, box-shadow 0.45s ease, filter 0.45s ease;
    cursor: pointer;
    will-change: transform, opacity, filter;
    filter: drop-shadow(0 40px 90px rgba(0,0,0,0.5));
    overflow: visible;
}

.card-link {
    position: absolute;
    inset: 0;
    z-index: 999;
    display: block;
    text-decoration: none;
    background: transparent;
    pointer-events: auto;
    touch-action: none;
}

.card-link:hover,
.card-link:focus-visible {
    outline: none;
}

.card.is-active {
    cursor: default;
}

.card.is-active .browser {
    transform: translateY(-5px);
}

.card:hover .browser,
.card.is-active .browser {
    box-shadow:
        0 42px 120px -24px rgba(0, 0, 0, 0.72),
        inset 0 0 0 1px rgba(59, 232, 255, 0.24),
        0 0 90px -4px rgba(59, 232, 255, 0.22);
}

.card:focus-visible .browser {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 4px;
}

.browser {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: visible;
    background: transparent;
    box-shadow: 0 18px 48px rgba(3,6,12,0.6);
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    /* removed backdrop-filter for performance */
}

.browser-bar {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 999px;
    /* removed backdrop-filter for performance */
}

.browser-bar .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 18px rgba(59, 232, 255, 0.45);
}

.browser-bar .url {
    margin-left: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    color: rgba(232, 247, 255, 0.92);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(59, 232, 255, 0.1);
    padding: 4px 10px;
    border-radius: 999px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.browser-body {
    flex: 1 1 auto;
    position: relative;
    background: var(--stage-bg);
    overflow: hidden;
    transition: background-image 300ms ease, transform 420ms cubic-bezier(.2,.9,.2,1);
}

.browser-body img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    filter: saturate(1.08) contrast(1.04) brightness(0.98);
}

.browser-body.has-bg {
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
}

/* Mobile: keep full image visible, scale to fit area under the URL bar */
@media (max-width: 760px) {
    .browser-body img {
        object-fit: cover;
        width: 100%;
        height: 100%;
        left: 0;
        transform: none;
        object-position: center top;
    }
}

/* side cards are slightly blurred and dimmed */
.card:not(.is-active) .browser-body img {
    transform: scale(0.98);
    filter: saturate(0.92) contrast(0.95) brightness(0.88);
    opacity: 0.78;
    will-change: transform, opacity;
}

/* allow cards to overflow outside the cover region */
.track, .coverflow { overflow: visible !important; }

.browser-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(59, 232, 255, 0.18), transparent 28%),
        radial-gradient(circle at 84% 18%, rgba(198, 255, 74, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%);
    pointer-events: none;
}

/* ---------- absztrakt mockup, ha nincs feltöltött screenshot ---------- */

.mock {
    width: 100%;
    height: 100%;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mock-nav {
    display: flex;
    gap: 10px;
}

.mock-nav span {
    width: 26px;
    height: 5px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-lime));
    opacity: 0.75;
}

.mock-hero {
    flex: 1;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 232, 255, 0.42), rgba(198, 255, 74, 0.26));
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 34px rgba(59, 232, 255, 0.2);
}

.mock-hero::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 18px;
    width: 55%;
    height: 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
}

.mock-row {
    display: flex;
    gap: 10px;
    height: 60px;
}

.mock-block {
    flex: 1;
    border-radius: 8px;
    background: rgba(59, 232, 255, 0.12);
    border: 1px solid rgba(59, 232, 255, 0.22);
    box-shadow: inset 0 0 16px rgba(59, 232, 255, 0.12);
}

/* ---------- subtle page edge and spin animation ---------- */
.browser::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,0.02), transparent 10%);
    mix-blend-mode: overlay;
    opacity: 0.5;
}

@keyframes spinSubtle {
    0% { transform: rotateY(-6deg); }
    50% { transform: rotateY(6deg); }
    100% { transform: rotateY(-6deg); }
}

.browser.spin {
    animation: spinSubtle 8s ease-in-out infinite;
    transform-origin: 50% 50% 0px;
    will-change: transform;
}

@keyframes pageFlip {
    0% { transform: translateY(10px) rotateY(18deg); opacity: 0.0 }
    40% { transform: translateY(-8px) rotateY(-6deg); opacity: 1 }
    100% { transform: translateY(-5px) rotateY(0deg); opacity: 1 }
}

.card.is-flip .browser {
    animation: pageFlip 0.62s cubic-bezier(.22,.9,.3,1) both;
}

/* layout-specifikus finomhangolás — kis vizuális változatosság
   projekt-típusonként (a valós tartalmat úgyis a screenshot adja) */

.mock-portrait .mock-row { height: 90px; }
.mock-portrait .mock-block:nth-child(2) { flex: 2; }

.mock-split .mock-hero { flex: 0 0 55%; }
.mock-split .mock-row { flex: 1; height: auto; }

.mock-lookbook .mock-hero { background: linear-gradient(135deg, rgba(59, 232, 255, 0.32), rgba(198, 255, 74, 0.16)); }

/* ---------- nyilak ---------- */

.nav-arrow {
    position: relative;
    z-index: 200;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(59, 232, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease;
    margin: 0 -8px;
}

.nav-arrow:hover {
    background: rgba(59, 232, 255, 0.14);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 18px rgba(59, 232, 255, 0.25);
    transform: scale(1.08);
}

.nav-arrow:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 3px;
}

/* ---------- felirat ---------- */

.caption {
    display: flex;
    align-items: baseline;
    gap: 20px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 88px;
    z-index: 80;
    padding: 12px 18px;
    background: linear-gradient(180deg, rgba(6,10,14,0.0), rgba(6,10,14,0.0));
    width: auto;
    max-width: 920px;
}

.caption-index {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--neon-lime);
    text-shadow: 0 0 10px rgba(198, 255, 74, 0.4);
}

.caption-total {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--ink-dim);
}

.caption-text {
    flex: 1;
    text-align: center;
}

.caption-text h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 2px;
    color: var(--ink);
    text-shadow: 0 0 14px rgba(59, 232, 255, 0.12);
}

.caption-text p {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--ink-dim);
    margin: 0;
}

/* ---------- dot indikátorok ---------- */

.dots {
    display: flex;
    gap: 8px;
    margin-top: 22px;
}

.dot-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid rgba(59, 232, 255, 0.24);
    background: rgba(59, 232, 255, 0.18);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dot-indicator:hover {
    background: rgba(59, 232, 255, 0.36);
}

.dot-indicator.is-active {
    background: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(59, 232, 255, 0.35);
    transform: scale(1.3);
}

@media (min-width: 1024px) {
    .dots { margin-top: 72px; }

    /* Place caption in document flow on desktop so it does not overlay the cover image */
    .caption {
        position: static !important;
        transform: none !important;
        left: auto !important;
        bottom: auto !important;
        width: 100%;
        max-width: none;
        justify-content: center;
        margin-top: 36px;
        padding: 14px 0;
        display: flex;
        gap: 20px;
        align-items: center;
    }

    .caption .caption-text { text-align: center; }
}

.dot-indicator:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
}

/* ---------- visual polish: glass, reflection, nicer controls ---------- */
.coverflow {
    background: linear-gradient(180deg, rgba(6,10,18,0.82), rgba(12,18,30,0.86));
    border: 1px solid rgba(255,255,255,0.04);
    /* removed backdrop-filter for performance */
}

.coverflow::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -40px;
    height: 140px;
    background: linear-gradient(180deg, rgba(10,14,22,0), rgba(6,8,12,0.6));
    pointer-events: none;
}

.card { border-radius: 24px; }
.browser { border-radius: 18px; overflow: hidden; position: relative; }

.browser::before {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0; height: 28%;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    transform: skewY(-2deg);
    pointer-events: none;
    mix-blend-mode: overlay;
}

.browser::after {
    content: '';
    position: absolute;
    left: 8%; right: 8%; bottom: -8%; height: 12%;
    background: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.42));
    filter: blur(10px) opacity(0.6);
    border-radius: 50%;
    pointer-events: none;
}

.nav-arrow {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 26px rgba(6,10,20,0.6);
}

.nav-arrow svg { opacity: 0.95; filter: drop-shadow(0 6px 12px rgba(20,40,80,0.35)); }

.caption { align-items: center; gap: 28px; }
.caption .caption-index, .caption .caption-total { font-size: 14px; }

/* autoplay toggle removed */

/* make dots look like tiny pills */
.dots { gap: 10px; }
.dot-indicator { width: 14px; height: 9px; border-radius: 6px; }

/* ---------- reszponzív ---------- */

@media (max-width: 1024px) {
    .coverflow { width: 100%; left: 0; padding: 0 12px; }
}

@media (max-width: 760px) {
    .coverflow { width: 100%; left: 0; padding: 0 12px; }
    .track { height: 520px; perspective: 900px; touch-action: pan-y; }
    .card { width: 90vw; margin-left: -45vw; max-width: 680px; }
    .nav-arrow { width: 38px; height: 38px; display: none !important; }
    .title { font-size: clamp(24px, 7vw, 32px); }
    .caption { position: static; transform: none; left: auto; bottom: auto; z-index: 2; display:flex; justify-content:center; width:100%; max-width:100%; padding:12px 0; margin-top:42px; gap:12px; flex-wrap: wrap; }
    .dots { justify-content: center; flex-wrap: wrap; }

    .browser-body {
        overflow: hidden;
    }
    .browser-body img {
        position: absolute;
        left: 0;
        top: var(--browser-bar-h, 0px);
        width: 100%;
        height: calc(100% - var(--browser-bar-h, 0px));
        object-fit: cover;
        object-position: 50% 12%;
        transform: none;
        opacity: 1 !important;
        pointer-events: none;
    }
}

/* Tablet: hide arrows and enlarge the carousel */
@media (max-width: 1024px) and (min-width: 761px) {
    .track { height: 620px; perspective: 1200px; }
    .card { width: 64vw; margin-left: -32vw; max-width: 760px; }
    .nav-arrow { display: none !important; }
}

@media (max-width: 540px) {
    .coverflow { padding: 0 8px; }
    .card { width: 96vw; margin-left: -48vw; }
    .caption { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .card { transition: none !important; }
}

/* desktop layout: keep original large card sizes; spacer handles text offset */
