/* ── Sufler landing ── spokojna czerń w duchu obsidian.md ─────────────
   Płaski, niemal czarny grunt, gruby sans w nagłówkach, jeden akcent:
   brandowy teal N3O (#4CF7EA → #12C6BE). Ruch oszczędny: wejście hero,
   odsłanianie sekcji przy scrollu, zoom zrzutów na hover. */

:root {
  --bg: #0b0c0f;           /* grunt strony                            */
  --panel: #16171b;        /* karty bento, kafel, mock terminala      */
  --panel-2: #1d1e24;      /* wnętrza wizuali                         */
  --border: rgba(255, 255, 255, 0.09);
  --text: #ecedef;
  --muted: #9ba0a8;
  --accent: #2fd8cb;       /* linki, drobne akcenty                   */
  --grad-a: #4cf7ea;       /* gradient marki: start                   */
  --grad-b: #12c6be;       /* gradient marki: koniec                  */

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", ui-monospace, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Nawigacja ──────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 12, 15, 0.7);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease,
              box-shadow 0.25s ease;
}

.nav.scrolled {
  background: rgba(11, 12, 15, 0.88);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem clamp(1.2rem, 4vw, 2.5rem);
}

.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); }
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 27px;
  height: 27px;
  flex: none;
  transition: filter 0.25s ease, transform 0.25s ease;
}
.brand:hover .brand-mark {
  filter: drop-shadow(0 0 10px rgba(76, 247, 234, 0.45));
  transform: rotate(-4deg);
}

.brand-mark.small { width: 20px; height: 20px; }

.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }

.nav-links { display: flex; gap: 1.8rem; margin-left: auto; }

.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-tools { display: flex; align-items: center; gap: 1rem; }

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.lang-switch button {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.32rem 0.72rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.lang-switch button.active {
  background: linear-gradient(135deg, rgba(76, 247, 234, 0.18), rgba(18, 198, 190, 0.18));
  color: var(--grad-a);
}

.gh-link { color: var(--muted); display: flex; transition: color 0.2s ease, transform 0.2s ease; }
.gh-link:hover { color: var(--text); transform: translateY(-1px); }

/* ── Hero ───────────────────────────────────────────────────────── */

.hero {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) clamp(1.2rem, 4vw, 2.5rem) 0;
}

.hero-glow {
  position: absolute;
  top: -18%;
  left: -12%;
  width: 58%;
  height: 75%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(18, 198, 190, 0.16), transparent 70%);
  filter: blur(48px);
  pointer-events: none;
}

.hero-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 0.38rem 0.95rem;
  margin-bottom: 1.6rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
}

.hero h1 {
  position: relative;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 18ch;
}

.grad, .grad-w {
  background: linear-gradient(100deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* słowa nagłówka — animowane pojedynczo przez JS */
.w { display: inline-block; }

.hero-sub {
  max-width: 36rem;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 2.2rem;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.78rem 1.45rem;
  border-radius: 10px;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #06211f;
}
.btn-primary:hover { box-shadow: 0 10px 34px rgba(18, 198, 190, 0.4); }

/* przesuwający się połysk na hover */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-130%);
}
.btn-primary:hover::after { transform: translateX(130%); transition: transform 0.65s ease; }

/* pokaz slajdów w ramie okna — „filmik" z aplikacji */

.hero-shot {
  margin-top: clamp(2.5rem, 6vh, 4rem);
}

.showcase {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.showcase-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.showcase-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.showcase-bar i:first-child { background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); }

.showcase-title {
  margin: 0 auto;
  transform: translateX(-24px);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.tour {
  display: block;
  width: 100%;
  height: auto;
  background: var(--panel-2);
}

/* ── Sekcje ─────────────────────────────────────────────────────── */

.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 4vw, 2.5rem) 0;
}

.section-head { text-align: center; max-width: 44rem; margin: 0 auto; }

.section h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

.section-lead {
  color: var(--muted);
  margin-top: 0.9rem;
  font-size: 1.08rem;
}

/* ── Wartości + kafel ───────────────────────────────────────────── */

.values-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.values-copy { display: flex; flex-direction: column; gap: 2.2rem; }

.value h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }

.value p { color: var(--muted); margin-top: 0.45rem; max-width: 32rem; }

.values-tile {
  position: relative;
  border-radius: 22px;
  padding: 3.2rem 2rem 2.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(160deg, rgba(76, 247, 234, 0.45), rgba(255, 255, 255, 0.08) 35%,
                    rgba(18, 198, 190, 0.25)) border-box;
  border: 1px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.values-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(18, 198, 190, 0.14);
}

.tile-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 75%;
  background: radial-gradient(55% 60% at 50% 55%, rgba(76, 247, 234, 0.22), transparent 70%);
  pointer-events: none;
}

.tile-icon {
  position: relative;
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 14px 34px rgba(18, 198, 190, 0.4));
  transition: transform 0.3s ease;
}
.values-tile:hover .tile-icon { transform: translateY(-3px) scale(1.03); }

.tile-name {
  position: relative;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 1.3rem;
}

.tile-tag { position: relative; color: var(--muted); font-size: 0.93rem; margin-top: 0.3rem; }

.tile-cta {
  position: relative;
  margin-top: 1.3rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: #06211f;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  transition: filter 0.15s ease, box-shadow 0.2s ease;
}
.tile-cta:hover { text-decoration: none; filter: brightness(1.08); box-shadow: 0 6px 22px rgba(18, 198, 190, 0.35); }

.tile-meta {
  position: relative;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  width: 100%;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* ── Bento ──────────────────────────────────────────────────────── */

.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 3rem;
}

.bento-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.bento-card:hover {
  border-color: rgba(76, 247, 234, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.bento-copy { padding: 1.7rem 1.7rem 1.4rem; }

.bento-copy h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; }

.bento-copy p { color: var(--muted); margin-top: 0.55rem; font-size: 0.95rem; }

.bento-visual {
  margin: 0 1.7rem 1.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2);
  flex: 1;
}

.bento-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.bento-card:hover .bento-visual img { transform: scale(1.05); }

/* szeroka karta — kopia po lewej, wizual po prawej */

.bento-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
}

.bento-wide .bento-copy {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.9rem;
}

.bento-wide .bento-visual {
  flex: 3;
  margin: 1.7rem 1.7rem 1.7rem 0;
  max-height: 22rem;
}

.bento-wide .bento-visual img { object-position: center 32%; }

/* mock terminala — jedyny „żywy" wizual, rysowany w CSS */

.term-mock {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.9;
  padding: 1.1rem 1.2rem;
  background: #0e1013;
  color: var(--text);
}

#term-screen { min-height: 11.5em; }

.t-prompt { color: var(--accent); }
.t-accent { color: var(--grad-a); }
.t-dim { color: var(--muted); }

.t-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--accent);
}

/* ── Akty ───────────────────────────────────────────────────────── */

.acts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 3rem;
}

.act-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.act h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }

.act p { color: var(--muted); margin-top: 0.5rem; font-size: 0.95rem; }

/* ── Zamknięcie: karta GitHuba ──────────────────────────────────── */

.closing { text-align: center; padding-bottom: clamp(4rem, 10vh, 7rem); }

.closing .section-lead { max-width: 34rem; margin-left: auto; margin-right: auto; }

.gh-card {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: 2.4rem;
  padding: 1.3rem 1.9rem;
  border-radius: 16px;
  text-align: left;
  color: var(--text);
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(140deg, rgba(76, 247, 234, 0.4), rgba(255, 255, 255, 0.08) 40%,
                    rgba(18, 198, 190, 0.3)) border-box;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gh-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 18px 50px rgba(18, 198, 190, 0.16);
}

.gh-card > svg { flex: none; color: var(--text); }

.gh-card-text { display: flex; flex-direction: column; }

.gh-card-label { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }

.gh-card-repo {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-top: 0.15rem;
}

.gh-card-arrow {
  font-size: 1.25rem;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}
.gh-card:hover .gh-card-arrow { transform: translateX(4px); color: var(--grad-a); }

/* ── Stopka ─────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--border); margin-top: 0; }

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.8rem clamp(1.2rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-brand { display: flex; align-items: center; gap: 0.5rem; color: var(--text); font-weight: 600; }

.footer-inner > a { margin-left: auto; }

/* ── Animacje ───────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes rise-shot {
    from { opacity: 0; transform: translateY(28px) scale(0.985); }
    to { opacity: 1; transform: none; }
  }

  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76, 247, 234, 0.45); }
    60% { box-shadow: 0 0 0 6px rgba(76, 247, 234, 0); }
  }

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

  @keyframes rise-focus {
    from { opacity: 0; transform: translateY(14px); filter: blur(8px); }
    to { opacity: 1; transform: none; filter: blur(0); }
  }

  @keyframes word-in {
    from { opacity: 0; transform: translateY(0.38em); filter: blur(7px); }
    to { opacity: 1; transform: none; filter: blur(0); }
  }

  .nav { animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
  .hero-badge { animation: rise-focus 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s backwards; }
  .w { animation: word-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
  .hero-sub { animation: rise-focus 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.55s backwards; }
  .cta-row { animation: rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.7s backwards; }
  .hero-shot { animation: rise-shot 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.85s backwards; }

  /* powtórka kaskady przy zmianie języka */
  .hero-badge.replay { animation: rise-focus 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
  .hero-sub.replay { animation: rise-focus 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.35s backwards; }

  .badge-dot { animation: pulse 2.4s ease-out 1.2s infinite; }
  .t-caret { animation: blink 1.1s steps(1) infinite; }

  /* oddychający zoom mocka terminala */
  @keyframes breath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
  }
  .term-mock { animation: breath 7s ease-in-out infinite; }

  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal.visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Wąskie ekrany ──────────────────────────────────────────────── */

@media (max-width: 900px) {
  .nav-links { display: none; }
  .values-grid { grid-template-columns: 1fr; }
  .values-tile { max-width: 24rem; margin: 0 auto; width: 100%; }
  .bento { grid-template-columns: 1fr; }
  .acts { grid-template-columns: 1fr; }
  .bento-wide { flex-direction: column; align-items: initial; }
  .bento-wide .bento-copy { padding: 1.7rem 1.7rem 1.4rem; }
  .bento-wide .bento-visual { margin: 0 1.7rem 1.7rem; max-height: none; }
}

@media (max-width: 540px) {
  .hero h1 { max-width: none; }
  .footer-inner > a { margin-left: 0; }
  .gh-card { width: 100%; justify-content: center; }
}
