/* ===================================================================
   Sebastian Talarowski — Portfolio
   Motyw: ciemny „ink", akcent elektryczny lime + ciepły amber
   =================================================================== */

:root {
  --bg: #0b0d12;
  --bg-soft: #11141c;
  --surface: #161a24;
  --surface-2: #1c2230;
  --border: #262d3d;
  --text: #e8ebf2;
  --muted: #97a0b5;
  --accent: #c6f24e;          /* elektryczny lime */
  --accent-2: #f5b54a;        /* ciepły amber */
  --accent-ink: #0b0d12;
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, .8);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: 'Space Grotesk', system-ui, sans-serif; line-height: 1.1; font-weight: 600; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 1000;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .85rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -16px var(--accent); }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.1rem; }

/* ---------- Nawigacja ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 13, 18, .72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__brand { display: flex; align-items: center; gap: .65rem; font-weight: 600; }
.nav__brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: .5px;
}
.nav__brand-text { font-size: 1rem; }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav__links a { color: var(--muted); font-size: .96rem; transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  border: 1px solid var(--border); padding: .5rem 1.1rem; border-radius: 999px; color: var(--text) !important;
}
.nav__cta:hover { border-color: var(--accent); color: var(--accent) !important; }
.nav__toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__glow {
  position: absolute; z-index: 0; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  top: -10%; right: -10%;
  background: radial-gradient(circle, rgba(198, 242, 78, .18), transparent 60%);
  filter: blur(20px); pointer-events: none;
}
.hero__inner { position: relative; z-index: 2; padding-top: 72px; }
.hero__eyebrow { color: var(--muted); font-weight: 500; margin-bottom: 1rem; }
.hero__title { font-size: clamp(2.3rem, 6.5vw, 4.6rem); font-weight: 700; letter-spacing: -.02em; }
.hero__rotator { color: var(--accent); border-bottom: 4px solid rgba(198, 242, 78, .35); white-space: nowrap; }
.hero__lead { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 46ch; margin: 1.6rem 0 2.2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero__values { list-style: none; display: flex; flex-wrap: wrap; gap: .7rem .8rem; margin-top: 2.6rem; }
.hero__values li {
  position: relative; color: var(--text); font-size: .9rem; font-weight: 500;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border);
  border-radius: 999px; padding: .5rem 1rem .5rem 2rem;
}
.hero__values li::before {
  content: ""; position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px 1px rgba(198, 242, 78, .6);
}
.hero__scroll { position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%); z-index: 2; width: 26px; height: 42px; border: 2px solid var(--border); border-radius: 14px; }
.hero__scroll span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background: var(--accent); border-radius: 2px; animation: scrolldot 1.6s infinite; }
@keyframes scrolldot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 20px; } 100% { opacity: 0; } }

/* ---------- Sekcje ogólne ---------- */
.section { padding: clamp(4rem, 9vw, 8rem) 0; }
.section__head { max-width: 60ch; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.section__eyebrow { color: var(--accent); font-weight: 600; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; }
.section__title { font-size: clamp(1.8rem, 4.2vw, 3rem); letter-spacing: -.02em; }
.section__sub { color: var(--muted); margin-top: 1rem; max-width: 52ch; }

/* ---------- Karty ogólne ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease); }

/* ---------- Jak to działa (proces) ---------- */
.process { background: var(--bg-soft); border-block: 1px solid var(--border); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.2rem; counter-reset: step; }
.step { position: relative; padding: 2rem 1.8rem 1.9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.step::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--accent), var(--accent-2)); opacity: .5; }
.step:hover { border-color: var(--accent); }
.step__num { font-family: 'Space Grotesk', sans-serif; font-size: 2.4rem; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--accent); display: block; margin-bottom: 1rem; }
.step__title { font-size: 1.25rem; margin-bottom: .55rem; }
.step__desc { color: var(--muted); font-size: .96rem; }

/* ---------- Oferta (karty) ---------- */
.projects__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.5rem; }
.project { overflow: hidden; display: flex; flex-direction: column; }
.project:hover { transform: translateY(-6px); border-color: var(--accent); }
.project__cover { position: relative; aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden; }
.project__cover-label { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); color: rgba(255, 255, 255, .92); letter-spacing: -.01em; text-align: center; padding: 1rem; z-index: 1; text-shadow: 0 2px 20px rgba(0, 0, 0, .35); }
.project__tech { position: absolute; top: 1rem; left: 1rem; z-index: 2; background: rgba(11, 13, 18, .7); backdrop-filter: blur(6px); color: var(--text); font-size: .78rem; font-weight: 600; padding: .35rem .8rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12); }
.project__status { position: absolute; top: 1rem; right: 1rem; z-index: 2; font-size: .8rem; font-weight: 600; padding: .32rem .75rem; border-radius: 999px; }
.project__status--live { background: var(--accent); color: var(--accent-ink); }
.project__status--soon { background: rgba(245, 181, 74, .18); color: var(--accent-2); border: 1px solid rgba(245, 181, 74, .35); }
.project__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.project__title { font-size: 1.3rem; margin-bottom: .5rem; }
.project__desc { color: var(--muted); font-size: .96rem; flex: 1; }
.project__link { margin-top: 1.2rem; display: inline-flex; align-items: center; gap: .5rem; color: var(--accent); font-weight: 600; font-size: .95rem; align-self: flex-start; transition: gap .2s var(--ease); }
.project__link[aria-disabled="true"] { color: var(--muted); cursor: default; pointer-events: none; }
.project:hover .project__link:not([aria-disabled="true"]) { gap: .9rem; }

/* ---------- Kontakt ---------- */
.contact__inner { text-align: center; max-width: 56ch; margin-inline: auto; }
.contact__lead { color: var(--muted); margin: 1.2rem auto 2rem; }
.contact__note { color: var(--muted); font-size: .9rem; margin-top: 1.2rem; }
.contact__links { list-style: none; display: flex; justify-content: center; gap: 1.6rem; margin-top: 2rem; }
.contact__links a { color: var(--muted); transition: color .2s var(--ease); }
.contact__links a:hover { color: var(--accent); }

/* ---------- Stopka ---------- */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; }

/* ---------- Animacje reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Filtry typów ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.filter {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  padding: .55rem 1.15rem; border-radius: 999px; font: inherit; font-size: .9rem; font-weight: 500;
  cursor: pointer; transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- Karta projektu (klikalna → modal) ---------- */
.project { position: relative; }
.project.is-hidden { display: none; }
.project__open {
  position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%;
  border: 0; background: transparent; cursor: pointer; padding: 0; font: inherit;
}
.project__open:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius); }
.project__shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.project__type {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  background: rgba(11, 13, 18, .72); backdrop-filter: blur(6px);
  color: var(--accent); font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  padding: .34rem .8rem; border-radius: 999px; border: 1px solid rgba(198, 242, 78, .3);
}
.project__meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.3rem; }
.project__price { color: var(--muted); font-size: .92rem; }
.project__price strong { font-family: 'Space Grotesk', sans-serif; color: var(--accent); font-weight: 600; }
.project__more { color: var(--accent); font-weight: 600; font-size: .9rem; transition: transform .2s var(--ease); }
.project:hover .project__more { transform: translateX(4px); }

/* ---------- Modal projektu ---------- */
.proj-modal { padding: 0; border: 0; background: transparent; width: min(920px, 94vw); margin: auto; }
.proj-modal::backdrop { background: rgba(6, 8, 12, .74); backdrop-filter: blur(4px); }
.proj-modal__inner {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden auto; max-height: 92vh; box-shadow: var(--shadow);
  color: var(--text);
}
.proj-modal__close {
  position: absolute; top: .8rem; right: .8rem; z-index: 6; width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(11, 13, 18, .7); color: var(--text); font-size: 1.05rem; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.proj-modal__close:hover { border-color: var(--accent); color: var(--accent); }

/* „inteligentna prezentacja" — ramka przeglądarki z auto-panem zrzutu */
.browser-frame { background: var(--bg-soft); }
.browser-frame__bar { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.browser-frame__dots { display: flex; gap: .42rem; flex: none; }
.browser-frame__dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.browser-frame__dots i:nth-child(1) { background: #ff5f57; }
.browser-frame__dots i:nth-child(2) { background: #febc2e; }
.browser-frame__dots i:nth-child(3) { background: #28c840; }
.browser-frame__url {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  padding: .32rem .9rem; font-size: .8rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-frame__view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.browser-frame__shot { position: absolute; top: 0; left: 0; width: 100%; height: auto; transition: transform 6s linear; will-change: transform; }
.browser-frame__placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .9); font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: clamp(1.2rem, 3vw, 1.6rem); }

.proj-modal__content { padding: clamp(1.4rem, 3vw, 2.2rem); }
.proj-modal__head { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.proj-modal__head .project__type, .proj-modal__head .project__status { position: static; }
.proj-modal__title { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .9rem; }
.proj-modal__desc { color: var(--muted); margin-bottom: 1.6rem; }
.proj-modal__price {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .15rem .8rem;
  padding: 1.1rem 1.3rem; background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 1.4rem;
}
.price__label { width: 100%; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .25rem; }
.price__net { font-size: 1.05rem; color: var(--text); }
.price__net strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.55rem; color: var(--accent); font-weight: 700; }
.price__gross { color: var(--muted); font-size: .95rem; }
.proj-modal__cta { align-self: flex-start; }
.proj-modal__cta.is-disabled { pointer-events: none; opacity: .6; }

/* „Pod maską" — dyskretny pasek technologii (nie slajdy) */
.tech-strip { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--border); display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .7rem; }
.tech-strip__label { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; opacity: .7; }
.tech-strip__list { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.tech-strip__list li { color: var(--muted); font-size: .78rem; border: 1px solid var(--border); border-radius: 999px; padding: .25rem .7rem; opacity: .82; }

@media (prefers-reduced-motion: reduce) {
  .browser-frame__view { overflow-y: auto; }
  .browser-frame__shot { position: relative; transition: none; }
}

/* ---------- Responsywność ---------- */
@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(11, 13, 18, .96); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1rem clamp(1.1rem, 4vw, 2.5rem) 1.6rem;
    transform: translateY(-130%); transition: transform .35s var(--ease); visibility: hidden;
  }
  .nav.is-open .nav__links { transform: translateY(0); visibility: visible; }
  .nav__links a { width: 100%; padding: .9rem 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav__cta { margin-top: 1rem; width: 100%; text-align: center; border-bottom: 1px solid var(--border) !important; }
  .nav__toggle { display: flex; }
}

@media (max-width: 520px) {
  .nav__brand-text { display: none; }
  .hero__socials { gap: 1rem 1.4rem; }
  .footer__inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
