/* ============================================================
   MÓJ KRAM — futurystyczna metropolia (produkcyjny silnik CSS)
   Wyodrębnione z zaakceptowanego konceptu (design.md #8): styl
   cyberpunk-biznesowy, wieżowce jak Canary Wharf, HUD-owe panele
   treści z nitami, jeden wspólny system do wykorzystania na
   wszystkich podstronach (index, portfolio, blog, regulamin,
   polityka). Silnik canvas w js/metropolis-city.js.
   ============================================================ */

:root {
    --night: #05070d;
    --night-2: #0a0e1c;
    --cyan: #17e6ff;
    --cyan-glow: rgba(23, 230, 255, .5);
    --magenta: #ff2fd0;
    --magenta-glow: rgba(255, 47, 208, .45);
    --brass: #c9862f;
    --brass-lt: #eec27a;
    --iron: #241d16;
    --text: #dfe8f5;
    --text-dim: #8592ad;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--night);
    color: var(--text);
    font-family: "Exo 2", "Segoe UI", system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .display {
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .01em;
    text-wrap: balance;
    margin: 0;
}

p {
    text-wrap: pretty;
}

a {
    color: inherit;
}

::selection {
    background: var(--cyan);
    color: var(--night);
}

.eyebrow {
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    font-size: .68rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan-glow);
}

/* ---------------- canvas city (fixed, drawn by js/metropolis-city.js) ---------------- */

#city {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.scanlines {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 3px);
    mix-blend-mode: overlay;
}

.vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 70% at 50% 40%, transparent 40%, rgba(5, 7, 13, .75) 100%);
}

/* ---------------- shared scaffolding ---------------- */

main {
    position: relative;
    z-index: 2;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.section {
    padding: clamp(3rem, 7vw, 5rem) 0;
}

.section-head {
    max-width: 40rem;
    margin-bottom: 2.25rem;
}

.section-head h2 {
    margin-top: .5rem;
    font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 2.5rem);
    background: rgba(5, 7, 13, .55);
    backdrop-filter: blur(12px) saturate(140%);
    border-bottom: 1px solid rgba(23, 230, 255, .18);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: clamp(.75rem, 2vw, 1.75rem);
    flex-wrap: wrap;
}

.topbar-nav a:not(.btn) {
    font-family: "Orbitron", sans-serif;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-dim);
    white-space: nowrap;
}

.topbar-nav a:not(.btn):hover,
.topbar-nav a.active {
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan-glow);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 1rem;
    color: var(--text);
    text-shadow: 0 0 12px var(--cyan-glow);
    text-decoration: none;
    white-space: nowrap;
}

.wordmark-logo {
    display: block;
    height: 28px;
    width: auto;
}

.wordmark span {
    color: var(--cyan);
}

.social-row {
    display: flex;
    gap: .6rem;
}

.social-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid rgba(23, 230, 255, .3);
    color: var(--cyan);
    text-decoration: none;
    font-size: .95rem;
    border-radius: 2px;
}

.social-row a:hover {
    background: rgba(23, 230, 255, .12);
    box-shadow: 0 0 14px var(--cyan-glow);
}

/* ---------------- buttons ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--night);
    background: linear-gradient(120deg, var(--cyan), var(--magenta));
    padding: .7rem 1.3rem;
    border-radius: 2px;
    box-shadow: 0 0 22px var(--cyan-glow);
    border: none;
    cursor: pointer;
}

.btn.ghost {
    color: var(--cyan);
    background: transparent;
    border: 1.5px solid var(--cyan);
    box-shadow: none;
}

/* ---------------- HUD panel (shared): glass + brass rivets ---------------- */

.hud {
    position: relative;
    background: linear-gradient(160deg, rgba(10, 14, 28, .72), rgba(10, 14, 28, .5));
    backdrop-filter: blur(10px) saturate(140%);
    border: 1px solid rgba(23, 230, 255, .28);
    box-shadow: 0 0 0 1px rgba(255, 47, 208, .08), 0 30px 70px -25px rgba(0, 0, 0, .7);
    padding: clamp(1.75rem, 4vw, 3rem);
}

.rivet-tl, .rivet-tr, .rivet-bl, .rivet-br {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, var(--brass-lt), var(--brass) 60%, #7a531c 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

.rivet-tl { top: 8px; left: 8px; }
.rivet-tr { top: 8px; right: 8px; }
.rivet-bl { bottom: 8px; left: 8px; }
.rivet-br { bottom: 8px; right: 8px; }

/* ---------------- status strip ---------------- */

.hud-status {
    font-family: "Orbitron", sans-serif;
    font-size: .78rem;
    letter-spacing: .05em;
    color: var(--text-dim);
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.hud-status b {
    color: var(--magenta);
    text-shadow: 0 0 10px var(--magenta-glow);
}

.hud-status .cursor {
    display: inline-block;
    width: .5em;
    background: var(--cyan);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .hud-status .cursor { animation: none; }
}

/* ---------------- gauge — steampunk decorative dial ---------------- */

.gauge-wrap {
    display: flex;
    justify-content: center;
}

.gauge {
    position: relative;
    width: clamp(9rem, 20vw, 13rem);
    height: clamp(9rem, 20vw, 13rem);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, var(--iron) 0 62%, transparent 63%),
        conic-gradient(from -120deg, var(--brass) 0deg, var(--brass-lt) 240deg, var(--iron) 241deg 360deg);
    border: 6px solid var(--iron);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, .7), 0 0 30px rgba(201, 134, 47, .25);
}

.gauge .needle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3px;
    height: 38%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan-glow);
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(35deg);
    animation: needle-sweep 6s ease-in-out infinite;
}

.gauge .hub {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brass-lt);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(201, 134, 47, .6);
}

@keyframes needle-sweep {
    0%, 100% { transform: translate(-50%, -100%) rotate(-40deg); }
    50% { transform: translate(-50%, -100%) rotate(70deg); }
}

@media (prefers-reduced-motion: reduce) {
    .gauge .needle { animation: none; transform: translate(-50%, -100%) rotate(20deg); }
}

/* ---------------- hero ---------------- */

.hero {
    padding: clamp(4rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem);
    min-height: 92vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    width: 100%;
}

@media (min-width: 900px) {
    .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; }
}

.hero h1 {
    margin-top: .9rem;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    color: var(--text);
    text-shadow: 0 0 26px var(--cyan-glow), 0 0 60px var(--magenta-glow);
}

.hero h1 span { color: var(--cyan); }

.hero-tagline {
    margin-top: 1.1rem;
    max-width: 32rem;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 600;
    color: var(--text);
}

.hero-sub {
    margin-top: .9rem;
    max-width: 42ch;
    color: var(--text-dim);
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ---------------- page header (non-hero pages: portfolio/blog/legal) ---------------- */

.page-header {
    padding: clamp(5.5rem, 12vw, 8.5rem) 0 clamp(2rem, 5vw, 3rem);
}

.page-header .eyebrow { display: block; margin-bottom: .6rem; }

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    text-shadow: 0 0 26px var(--cyan-glow);
}

.page-header p {
    margin-top: 1rem;
    max-width: 46ch;
    color: var(--text-dim);
    font-weight: 500;
}

/* ---------------- grids ---------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
}

.card-grid .hud h3 {
    font-size: 1.1rem;
    color: var(--cyan);
    margin-bottom: .5rem;
    text-shadow: 0 0 10px var(--cyan-glow);
}

.card-grid .hud p {
    margin: 0;
    font-size: .95rem;
    color: var(--text-dim);
    text-transform: none;
}

.card-grid .idx {
    font-family: "Orbitron", sans-serif;
    font-size: .72rem;
    letter-spacing: .1em;
    color: var(--magenta);
    margin-bottom: .5rem;
    display: block;
}

/* ---------------- portfolio ---------------- */

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

.project-card .thumb {
    aspect-ratio: 16 / 10;
    width: 100%;
    object-fit: cover;
    border: 1px solid rgba(23, 230, 255, .2);
    margin-bottom: 1.1rem;
    background: var(--night-2);
}

.project-card .thumb-placeholder {
    aspect-ratio: 16 / 10;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(23, 230, 255, .2);
    margin-bottom: 1.1rem;
    background:
        radial-gradient(circle at 30% 20%, rgba(23, 230, 255, .12), transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(255, 47, 208, .1), transparent 60%),
        var(--night-2);
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: rgba(223, 232, 245, .25);
    text-align: center;
    padding: 1rem;
}

.project-card .cat {
    font-family: "Orbitron", sans-serif;
    font-size: .66rem;
    letter-spacing: .12em;
    color: var(--magenta);
    text-transform: uppercase;
}

.project-card h3 {
    margin-top: .4rem;
    font-size: 1.05rem;
    color: var(--text);
}

.project-card p {
    margin-top: .4rem;
    font-size: .92rem;
    color: var(--text-dim);
    text-transform: none;
    flex: 1;
}

.project-card .visit {
    margin-top: .9rem;
    font-family: "Orbitron", sans-serif;
    font-size: .72rem;
    letter-spacing: .06em;
    color: var(--cyan);
}

/* ---------------- blog ---------------- */

.post-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.post-card .cat {
    font-family: "Orbitron", sans-serif;
    font-size: .66rem;
    letter-spacing: .12em;
    color: var(--magenta);
    text-transform: uppercase;
}

.post-card h3 {
    margin-top: .5rem;
    font-size: 1.15rem;
    color: var(--text);
}

.post-card p {
    margin-top: .6rem;
    font-size: .94rem;
    color: var(--text-dim);
    text-transform: none;
}

.post-card .read-more {
    margin-top: 1rem;
    font-family: "Orbitron", sans-serif;
    font-size: .72rem;
    letter-spacing: .06em;
    color: var(--cyan);
}

/* article / long-form document mode (blog posts, regulamin, polityka) */

.article {
    max-width: 46rem;
    margin: 0 auto;
}

.article .eyebrow { display: block; margin-bottom: .7rem; }

.article h1 {
    font-size: clamp(1.9rem, 4.4vw, 2.8rem);
    text-shadow: 0 0 20px var(--cyan-glow);
}

.article .meta {
    margin-top: .9rem;
    font-family: "Orbitron", sans-serif;
    font-size: .72rem;
    letter-spacing: .06em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.article .lede {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.article-body {
    margin-top: 1.75rem;
    color: var(--text);
    font-size: 1.02rem;
}

.article-body p { margin: 0 0 1.2rem; }

.article-body h2 {
    margin: 2.2rem 0 1rem;
    font-size: 1.35rem;
    color: var(--cyan);
    text-transform: none;
    letter-spacing: 0;
}

.article-body ul, .article-body ol {
    margin: 0 0 1.2rem;
    padding-left: 1.4rem;
    color: var(--text-dim);
}

.article-body li { margin-bottom: .5rem; }

.article-body a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body strong { color: var(--text); }

.article-back {
    display: inline-block;
    margin-bottom: 2rem;
    font-family: "Orbitron", sans-serif;
    font-size: .72rem;
    letter-spacing: .06em;
    color: var(--text-dim);
    text-decoration: none;
}

.article-back:hover { color: var(--cyan); }

/* ---------------- pricing: manifest terminal ---------------- */

.price-section { display: flex; justify-content: center; }

.manifest { width: 100%; max-width: 28rem; text-align: left; }

.manifest .top {
    display: flex;
    justify-content: space-between;
    font-family: "Orbitron", sans-serif;
    font-size: .68rem;
    letter-spacing: .08em;
    color: var(--text-dim);
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(133, 146, 173, .35);
}

.manifest .line {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    color: var(--text-dim);
}

.manifest .total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 1.3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(23, 230, 255, .3);
    font-family: "Orbitron", sans-serif;
    font-size: 1.7rem;
    color: var(--cyan);
    text-shadow: 0 0 16px var(--cyan-glow);
}

.manifest p.note { margin-top: 1.2rem; color: var(--text-dim); font-size: .92rem; }
.manifest .btn { margin-top: 1.5rem; width: 100%; justify-content: center; }

/* ---------------- contact ---------------- */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.contact-grid .hud {
    text-align: center;
    padding: 1.75rem 1.25rem;
}

.contact-grid .eyebrow { display: block; margin-bottom: .5rem; }

.contact-grid a.value {
    display: block;
    margin-top: .3rem;
    font-family: "Orbitron", sans-serif;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
}

.contact-grid a.value:hover { color: var(--cyan); }

.contact-map {
    margin-top: 2rem;
    border: 1px solid rgba(23, 230, 255, .25);
    overflow: hidden;
    height: 320px;
}

.contact-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.3) invert(.92) hue-rotate(180deg); }

/* ---------------- footer ---------------- */

footer.site-footer {
    padding: clamp(2.5rem, 6vw, 4rem) 0 2.5rem;
}

footer.site-footer .hud {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
}

footer.site-footer .foot-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-family: "Orbitron", sans-serif;
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

footer.site-footer .foot-links a { color: var(--text-dim); text-decoration: none; }
footer.site-footer .foot-links a:hover { color: var(--cyan); }

footer.site-footer a.mail { color: var(--cyan); text-decoration: none; font-weight: 700; }

/* --------------------------------------------------------------------
   Wejście paneli na scrollu — natywny CSS Scroll-Driven Animation
   (modern-web-guidance): panel "materializuje się" jak projekcja
   hologramu. JS-owy fallback (dla przeglądarek bez wsparcia) w
   js/metropolis-city.js.
   -------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view()) and (animation-range: entry)) {
        @keyframes hologram-in {
            from { opacity: 0; transform: perspective(800px) rotateX(8deg) translateY(30px); }
        }
        .hud {
            animation: hologram-in .6s ease-out both;
            animation-timeline: view();
            animation-range: entry 0% entry 50%;
        }
    }
}

@media (max-width: 640px) {
    .hero { min-height: auto; }
}
