/* Nowa oprawa strony: typografia, głębia i ruch przy zachowaniu treści. */
:root {
  --bg-deep: #0a1124;
  --bg-navy: #111d3b;
  --bg-navy-2: #0d1730;
  --accent: #3a67b6;
  --accent-soft: #8ab9ff;
  --ink-light: #f7fbff;
  --ink-dim: #b4c0d6;
  --card-line: rgba(174, 202, 244, 0.16);
  --maxw: 1200px;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(1, 6, 22, 0.34);
}

html { scroll-padding-top: 96px; }

body {
  background: radial-gradient(ellipse at 78% 2%, rgba(47, 201, 168, 0.09), transparent 34%),
              radial-gradient(ellipse at 12% 38%, rgba(74, 99, 168, 0.11), transparent 35%),
              linear-gradient(165deg, #0a1124, #101b36 48%, #0a1124);
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

::selection { background: rgba(47, 201, 168, 0.35); color: #fff; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 4px; }
.page-texture { z-index: 0; opacity: 0.055; background-image: url("../assets/backgrounds/circuit.jpg"); background-position: center top; }
.site-header, .hero, .section, .site-footer, .legal { position: relative; z-index: 1; }
.container { padding-inline: clamp(22px, 4vw, 36px); }

/* Nagłówek ma niewielki kontrast względem treści i pozostaje czytelny nad grafikami. */
.site-header {
  background: rgba(9, 17, 35, 0.87);
  border-bottom-color: rgba(174, 202, 244, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav-bar { height: 78px; }
.brand { gap: 12px; }
.brand-logo { height: 44px; }
.brand-name { font-size: 0.85rem; letter-spacing: 0.24em; }
.nav-links { gap: clamp(16px, 2.3vw, 34px); }
.nav-links a, .nav-links-simple a { color: #c2cce0; font-size: 0.89rem; font-weight: 600; }
.nav-links a:hover, .nav-links-simple a:hover { color: var(--teal-bright); }
.nav-actions { gap: 18px; }
.lang-switch { border-color: rgba(174, 202, 244, 0.24); background: rgba(255, 255, 255, 0.035); }
.lang-btn { min-width: 42px; padding: 7px 12px; color: #d9e1ef; }
.lang-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }
.lang-btn.active { background: var(--teal); color: #071f22; }

/* Główna grafika łączy ekran aplikacji z dyskretnymi spiralami marki. */
.hero { min-height: min(780px, 94vh); padding: 34px 0 100px; text-align: left; }
.hero::before {
  content: "";
  position: absolute;
  width: min(800px, 75vw);
  aspect-ratio: 1;
  top: -18%;
  right: -20%;
  background: radial-gradient(circle, rgba(47, 201, 168, 0.14), rgba(58, 103, 182, 0.06) 40%, transparent 70%);
  pointer-events: none;
}
.hero-glisz {
  inset: 0 auto 0 0;
  height: 100%;
  width: 58%;
  background-image: url("../assets/backgrounds/glisz-hero.jpg");
  background-position: left center;
  opacity: 0.14;
  -webkit-mask-image: linear-gradient(to right, #000, transparent 90%);
          mask-image: linear-gradient(to right, #000, transparent 90%);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: clamp(44px, 6vw, 100px); }
.hero-copy { position: relative; z-index: 2; }
.hero-logo { width: clamp(155px, 20vw, 220px); margin: 0 0 26px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.22)); }
.hero-title { max-width: 11ch; margin: 0 0 26px; font-size: clamp(3.4rem, 6.4vw, 6.5rem); line-height: 0.99; letter-spacing: -0.055em; font-weight: 800; }
.hero-title::first-line { color: #fff; }
.hero-subtitle { max-width: 54ch; margin: 0 0 36px; color: #d1dcf0; font-size: clamp(1.02rem, 1.4vw, 1.18rem); line-height: 1.75; }
.hero-cta { justify-content: flex-start; gap: 20px; }
.btn { min-height: 48px; transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-ghost { border-color: rgba(174, 202, 244, 0.35); background: rgba(255, 255, 255, 0.035); }
.btn-ghost:hover { border-color: var(--teal); background: rgba(47, 201, 168, 0.08); }
.play-badge { transition: transform 0.25s ease, filter 0.25s ease; }
.play-badge:hover { transform: translateY(-2px); filter: brightness(1.08); }
.hero-visual { min-height: 610px; display: grid; place-items: center; position: relative; isolation: isolate; }
.hero-visual::before {
  content: "";
  width: 82%;
  aspect-ratio: 1;
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42, 211, 179, 0.19), rgba(42, 100, 175, 0.15) 44%, transparent 70%);
  filter: blur(18px);
}
.hero-orbit { position: absolute; border: 1px solid rgba(101, 205, 202, 0.16); border-radius: 50%; pointer-events: none; }
.hero-orbit-one { width: 96%; aspect-ratio: 1; transform: rotate(-20deg) scaleY(0.79); }
.hero-orbit-two { width: 120%; aspect-ratio: 1; transform: rotate(24deg) scaleY(0.76); border-color: rgba(124, 161, 225, 0.1); }
.phone-frame {
  width: min(350px, 72%);
  padding: 8px;
  border: 1px solid rgba(196, 221, 255, 0.5);
  border-radius: 44px;
  background: linear-gradient(135deg, #344566, #0a1024 46%, #4c6684);
  box-shadow: 0 40px 75px rgba(0, 0, 0, 0.53), 0 0 60px rgba(47, 201, 168, 0.11);
  transform: rotate(5deg);
  animation: phone-float 8s ease-in-out infinite;
}
.phone-frame img { width: 100%; height: auto; border-radius: 36px; }

/* Sekcje mają różne rytmy, lecz wszystkie korzystają z jednej palety. */
.section { padding: clamp(80px, 9vw, 132px) 0; scroll-margin-top: 76px; }
.section-tint { background: linear-gradient(180deg, rgba(61, 92, 158, 0.07), rgba(15, 32, 63, 0.18) 55%, rgba(61, 92, 158, 0.07)); }
.section-title { margin-bottom: 18px; font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.12; letter-spacing: -0.035em; }
.section-subtitle { max-width: 60ch; margin-bottom: 54px; font-size: 1.07rem; }
.what-grid { max-width: 1050px; gap: clamp(32px, 6vw, 100px); margin-top: 42px; align-items: start; }
.what-grid .lead { font-size: clamp(1.34rem, 2vw, 1.85rem); line-height: 1.5; font-weight: 600; }
.what-grid p:last-child { font-size: 1.08rem; line-height: 1.85; }

.cards { gap: 20px; margin-top: 56px; }
.card {
  min-height: 290px;
  padding: clamp(28px, 3vw, 42px);
  background: linear-gradient(150deg, rgba(35, 54, 98, 0.67), rgba(13, 25, 51, 0.94) 78%);
  border: 1px solid rgba(174, 202, 244, 0.18);
  box-shadow: 0 18px 48px rgba(0, 5, 20, 0.16);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(95, 217, 184, 0.46); box-shadow: var(--shadow); }
.card::after { opacity: 0.15; background-image: url("../assets/backgrounds/glisz-card.jpg"); background-position: right -80px center; }
.card-icon { width: 58px; height: 58px; margin-bottom: 28px; background: rgba(47, 201, 168, 0.1); border: 1px solid rgba(95, 217, 184, 0.2); }
.card-icon svg { width: 29px; height: 29px; }
.card-title { font-size: clamp(1.35rem, 2vw, 1.65rem); letter-spacing: -0.025em; }
.card-text { color: #c1cbe0; }

.gallery { align-items: start; gap: 22px; }
.shot {
  position: relative;
  padding: 10px 10px 18px;
  border: 1px solid var(--card-line);
  border-radius: 28px;
  background: rgba(28, 45, 82, 0.38);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.shot:hover { transform: translateY(-8px); border-color: rgba(95, 217, 184, 0.45); }
.shot img { border: 0; border-radius: 19px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25); }
.shot figcaption { margin: 18px 8px 0; color: #d1dbed; line-height: 1.55; }

.section-security { background: linear-gradient(100deg, rgba(3, 13, 27, 0.65), rgba(13, 29, 58, 0.58)); }
.circuit-bg { background-image: url("../assets/backgrounds/circuit.jpg"); background-position: center; opacity: 0.11; }
.sec-list { max-width: 1050px; gap: 18px; margin-top: 52px; }
.sec-item { padding: 26px 30px; border: 1px solid var(--card-line); border-left: 3px solid var(--teal); border-radius: 0 20px 20px 0; background: rgba(10, 25, 48, 0.72); }
.sec-item h3 { font-size: 1.25rem; }
.sec-item p { color: #c3cee2; }

.glossary { max-width: 900px; gap: 14px; }
.gloss-item { border-radius: 18px; background: rgba(29, 48, 83, 0.47); }
.gloss-item[open] { background: rgba(28, 53, 85, 0.76); }
.gloss-item summary { padding: 20px 25px; font-size: 1.08rem; }
.gloss-item p { padding: 0 25px 24px; color: #c8d3e5; line-height: 1.75; }
.gloss-item { scroll-margin-top: 102px; }
/* Odnośnik do pytania FAQ / hasła słownika (do udostępnienia) — dodawany przez js/main.js na końcu rozwiniętej treści. */
.share-row { margin-top: -10px; padding: 0 25px 18px; }
.share-link { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; color: var(--ink-dim); font-size: 0.86rem; font-weight: 600; text-decoration: none; }
.share-link:hover, .share-link:focus-visible { color: var(--teal-bright); }
.share-link svg { width: 15px; height: 15px; flex: none; }
.share-link .share-done { display: none; color: var(--teal-bright); }
.share-link.is-copied .share-label { display: none; }
.share-link.is-copied .share-done { display: inline; }
.gloss-link { text-decoration-color: rgba(95, 217, 184, 0.75); }

/* FAQ: pytania rozwijane jak hasła słownika; odpowiedź składa się z wielu bloków (akapity, listy, ramki, zrzuty). */
.faq-answer { padding: 0 25px 24px; color: #c8d3e5; line-height: 1.75; }
.faq-item .faq-answer > * { margin: 0 0 14px; padding: 0; }
.faq-item .faq-answer > :last-child { margin-bottom: 0; }
.faq-answer ol, .faq-answer ul { padding-left: 1.5em; }
.faq-answer li + li { margin-top: 6px; }
.faq-answer b { color: var(--ink-light); }
.faq-note { padding: 14px 18px; border: 1px solid var(--card-line); border-left: 3px solid var(--accent-soft); border-radius: 0 14px 14px 0; background: rgba(10, 25, 48, 0.6); }
/* Ramka „zasada sieci Bitcoin” — jasny panel informacyjny wyróżniony kolorem teal */
.faq-note.faq-rule { border-left-color: var(--teal); background: rgba(47, 201, 168, 0.1); }
.faq-quote { padding: 4px 0 4px 18px; border-left: 3px solid var(--card-line); color: var(--ink-light); font-style: italic; }
/* Klucz zpub łamany w dowolnym miejscu, aby nie powodował poziomego przewijania na telefonie */
.faq-code { display: block; padding: 12px 16px; border: 1px solid var(--card-line); border-radius: 12px; background: rgba(3, 10, 22, 0.6); color: var(--teal-bright); font-family: Consolas, "Courier New", monospace; font-size: 0.86rem; line-height: 1.5; word-break: break-all; user-select: all; }
.faq-item .faq-answer > .faq-shot { max-width: 280px; margin: 6px auto 20px; }
.faq-shot img { width: 100%; height: auto; border-radius: 19px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25); }
.faq-shot figcaption { margin-top: 12px; color: var(--ink-dim); font-size: 0.92rem; line-height: 1.55; text-align: center; }
.site-footer { padding: 55px 0; background: rgba(3, 10, 22, 0.72); }
.footer-inner { justify-content: space-between; text-align: left; }
.footer-logo { height: 62px; }
.footer-text { color: #b5c1d6; }

/* Dokumenty prawne zachowują treść i korzystają z tej samej oprawy marki. */
.legal {
  max-width: 90ch;
  padding: 72px clamp(22px, 5vw, 70px) 100px;
  margin: 56px auto 90px;
  border: 1px solid var(--card-line);
  border-radius: 28px;
  background: rgba(11, 24, 47, 0.76);
  box-shadow: var(--shadow);
}
.legal-title { font-size: clamp(2.2rem, 4vw, 3.5rem); letter-spacing: -0.04em; }
.legal-toc, .legal-block { border-radius: 18px; }

/* Ukrycie przed animacją następuje dopiero po uruchomieniu obserwatora. */
.motion-ready .section-title, .motion-ready .section-subtitle, .motion-ready .what-grid,
.motion-ready .card, .motion-ready .shot, .motion-ready .sec-item, .motion-ready .gloss-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.motion-ready .is-visible { opacity: 1; transform: translateY(0); }
.motion-ready .card.is-visible:hover, .motion-ready .shot.is-visible:hover { transform: translateY(-6px); }

@keyframes phone-float {
  0%, 100% { transform: translateY(0) rotate(5deg); }
  50% { transform: translateY(-15px) rotate(3deg); }
}

@media (max-width: 980px) {
  .hero { min-height: 0; }
  .hero-inner { gap: 28px; }
  .hero-visual { min-height: 500px; }
  .hero-title { font-size: clamp(3.2rem, 7vw, 5.2rem); }
  .nav-links { gap: 14px; }
}

@media (max-width: 720px) {
  .nav-bar { height: 70px; }
  .nav-links { top: 70px; }
  .nav-links.open { max-height: 400px; }
  .nav-links a { font-size: 1rem; }
  /* Mniejszy odstęp nad logo podnosi tekst i odsłania górę animacji telefonu. */
  .hero { padding: 34px 0 86px; text-align: center; }
  .hero-inner { grid-template-columns: 1fr; gap: 50px; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-logo { margin-bottom: 22px; }
  .hero-title { margin-bottom: 24px; font-size: clamp(3.3rem, 11vw, 5.5rem); }
  .hero-subtitle { margin-bottom: 28px; }
  .hero-cta { justify-content: center; }
  .hero-visual { min-height: 530px; }
  .phone-frame { width: min(300px, 66vw); }
  .hero-glisz { width: 100%; opacity: 0.12; }
  .section { padding: 82px 0; }
  .what-grid { gap: 28px; }
  .cards { margin-top: 40px; }
  .card { min-height: 0; }
  .gallery {
    grid-template-columns: none;
    grid-auto-columns: minmax(250px, 72vw);
    grid-auto-flow: column;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    padding: 6px 22px 28px;
    margin-inline: -22px;
  }
  .shot { scroll-snap-align: center; }
  .shot:hover { transform: none; }
  .footer-inner { justify-content: center; text-align: center; }
  .legal { margin: 20px 14px 50px; padding: 42px 22px 70px; }
}

@media (max-width: 460px) {
  .gallery { grid-template-columns: none; }
  .hero-visual { min-height: 440px; }
  .phone-frame { width: min(270px, 69vw); }
  .hero-title { font-size: clamp(3.05rem, 12vw, 4rem); }
  .hero-cta { flex-direction: column; gap: 8px; }
  .section-title { font-size: 2.2rem; }
  .sec-item { padding: 22px 23px; }
  .legal { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .phone-frame { animation: none; transform: rotate(3deg); }
  .motion-ready .section-title, .motion-ready .section-subtitle, .motion-ready .what-grid,
  .motion-ready .card, .motion-ready .shot, .motion-ready .sec-item, .motion-ready .gloss-item { opacity: 1; transform: none; transition: none; }
  .gallery { scroll-behavior: auto; }
}

@media print {
  .legal { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; background: none; }
}
