/* 4gaHub - strona główna. Kolory pochodzą z logo: żółć dzioba, grafit jako tło, biel piór. */

@font-face { font-family: "Hub Display"; src: url("../fonts/hub-display-black-italic.woff") format("woff");
  font-weight: 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Hub Display"; src: url("../fonts/hub-display-extrabold-italic.woff") format("woff");
  font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Hub Text"; src: url("../fonts/hub-text-regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Hub Text"; src: url("../fonts/hub-text-bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --slate: #2c3340;          /* tło nagłówka i hero: czarny kruk i biały napis HUB są na nim czytelne */
  --slate-deep: #1e242e;
  --slate-line: #465062;
  --yellow: #f0b000;         /* dokładnie kolor dzioba z logo */
  --yellow-hover: #ffc21f;
  --crow: #0e1014;
  --feather: #f3f3f1;
  --paper: #e9edf1;
  --white: #ffffff;
  --ink: #1d232c;
  --muted: #566070;          /* tekst drugorzędny na jasnym tle (kontrast >= 4,9:1) */
  --muted-dark: #b3bcc9;     /* tekst drugorzędny na ciemnym tle */

  --font-display: "Hub Display", "Arial Black", "Segoe UI", Arial, sans-serif;
  --font-text: "Hub Text", Calibri, "Segoe UI", system-ui, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --space-section: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; font-family: var(--font-text); font-size: 1.1875rem; line-height: 1.55; color: var(--ink); background: var(--white); }
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-style: italic; text-wrap: balance; word-spacing: .08em; }
h2 { font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.08; letter-spacing: -0.015em; }
h3 { font-weight: 800; font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 3px; }
.on-light :focus-visible { outline-color: var(--ink); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--yellow); color: var(--crow); font-weight: 700; border-radius: 6px; }
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- przyciski ---------- */
.btn { display: inline-block; padding: .8em 1.5em; font: 700 1.0625rem/1.2 var(--font-text); text-decoration: none; border: 2px solid transparent; border-radius: 6px; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--yellow); color: var(--crow); }
.btn-primary:hover { background: var(--yellow-hover); }
.btn-ghost { border-color: var(--slate-line); color: var(--feather); }
.btn-ghost:hover { border-color: var(--feather); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--slate); }

/* ---------- nagłówek ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--slate); border-bottom: 1px solid var(--slate-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.brand img { width: 116px; height: 46px; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a:not(.btn) { color: var(--feather); text-decoration: none; font-weight: 700; font-size: 1.0625rem; }
.nav a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.nav .btn { padding: .55em 1.1em; }
.nav-toggle { display: none; width: 2.75rem; height: 2.75rem; padding: 0; border: 2px solid var(--slate-line); border-radius: 6px; background: transparent; cursor: pointer; }
.nav-toggle span { display: block; width: 1.2rem; height: 2px; margin: 4px auto; background: var(--feather); }

@media (max-width: 860px) {
  .js .nav-toggle { display: block; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.25rem; background: var(--slate); border-bottom: 1px solid var(--slate-line); }
  .js .nav.is-open { display: flex; }
  .js .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--slate-line); }
  .js .nav .btn { margin-top: 1rem; text-align: center; }
  .nav { gap: .9rem 1.25rem; flex-wrap: wrap; justify-content: flex-end; }
  .no-js .site-header .wrap { flex-wrap: wrap; padding-bottom: .75rem; }
}

/* ---------- hero ---------- */
.hero { background: var(--slate); color: var(--feather); padding: clamp(2.75rem, 7vw, 5.5rem) 0 clamp(3.5rem, 8vw, 6.5rem); overflow: hidden; }
.hero .wrap { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); align-items: center; }
@media (min-width: 920px) { .hero .wrap { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); } }
.hero h1 { font-weight: 900; font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: 1; letter-spacing: -0.015em; word-spacing: .12em; color: var(--white); }
.hero-lead { max-width: 33rem; margin-top: 1.5rem; font-size: clamp(1.2rem, 2vw, 1.375rem); line-height: 1.5; color: var(--muted-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.25rem; }
.hero-note { margin-top: 1.25rem; font-size: 1rem; color: var(--muted-dark); }

/* cykl umowy: rysuje się jednorazowo przy wejściu na stronę */
.cycle { position: relative; margin: 0; padding: 0 0 0 3.25rem; counter-reset: none; }
.cycle::before, .cycle::after { content: ""; position: absolute; left: 1.05rem; top: .9rem; bottom: 4.6rem; width: 3px; border-radius: 2px; }
.cycle::before { background: var(--slate-line); }
.cycle::after { background: var(--yellow); transform-origin: top; animation: draw 2.8s cubic-bezier(.4, 0, .2, 1) .5s both; }
.cycle li { position: relative; padding-bottom: 1.55rem; }
.cycle li::before { content: ""; position: absolute; left: -2.65rem; top: .3rem; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--slate); border: 3px solid var(--slate-line); animation: light .35s ease-out both; }
.cycle li:nth-child(1)::before { animation-delay: .5s; }
.cycle li:nth-child(2)::before { animation-delay: 1.0s; }
.cycle li:nth-child(3)::before { animation-delay: 1.5s; }
.cycle li:nth-child(4)::before { animation-delay: 2.0s; }
.cycle li:nth-child(5)::before { animation-delay: 2.5s; }
.cycle li:nth-child(6)::before { animation-delay: 3.0s; }
.cycle strong { display: block; font: italic 800 1.35rem/1.2 var(--font-display); color: var(--white); }
.cycle span { display: block; margin-top: .15rem; font-size: 1.0625rem; line-height: 1.4; color: var(--muted-dark); }
.cycle .again { padding-bottom: 0; }
.cycle .again::before { display: none; }
.cycle .again svg { position: absolute; left: -2.85rem; top: .05rem; width: 1.6rem; height: 1.6rem; color: var(--yellow); }
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes light { from { background: var(--slate); border-color: var(--slate-line); } to { background: var(--yellow); border-color: var(--yellow); } }
@media (prefers-reduced-motion: reduce) {
  .cycle::after { animation: none; }
  .cycle li::before { animation: none; background: var(--yellow); border-color: var(--yellow); }
}

/* ---------- sekcje ---------- */
.section { padding: var(--space-section) 0; }
.on-light { color: var(--ink); }
.bg-paper { background: var(--paper); }
.bg-white { background: var(--white); }
.bg-deep { background: var(--slate-deep); color: var(--feather); }
.section-head { max-width: 42rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { margin-top: 1rem; color: var(--muted); }
.bg-deep .section-head p { color: var(--muted-dark); }

/* dla kogo */
.who { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 760px) { .who { grid-template-columns: 1fr 1fr; } }
.who h3 { padding-bottom: .75rem; margin-bottom: 1.25rem; border-bottom: 4px solid var(--yellow); }
.who li { padding: .7rem 0; border-bottom: 1px solid rgba(29, 35, 44, .14); }
.who li strong { display: block; }
.who li span { color: var(--muted); font-size: 1.0625rem; }
.who p { color: var(--muted); }
.who .who-b p + p { margin-top: 1rem; }

/* funkcje: zakładki */
.features { display: grid; gap: 1.5rem 3rem; }
.no-js .features { display: block; }   /* bez JS nie ma listy zakładek, więc panele zajmują całą szerokość */
@media (min-width: 900px) { .features { grid-template-columns: 17rem minmax(0, 1fr); align-items: start; } }
.tablist { display: flex; flex-direction: column; gap: .35rem; }
.js .tablist { display: flex; }
.no-js .tablist { display: none; }
.tab { display: block; width: 100%; padding: .85rem 1rem; text-align: left; font: 700 1.0625rem/1.25 var(--font-text); color: var(--ink); background: transparent; border: 0; border-left: 4px solid transparent; cursor: pointer; }
.tab:hover { background: var(--paper); }
.tab[aria-selected="true"] { background: var(--paper); border-left-color: var(--yellow); }
@media (max-width: 899px) {
  .tablist { flex-direction: row; overflow-x: auto; gap: .5rem; padding-bottom: .5rem; margin: 0 calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: thin; }
  .tab { flex: none; width: auto; border-left: 0; border-bottom: 4px solid transparent; padding: .7rem .9rem; }
  .tab[aria-selected="true"] { border-bottom-color: var(--yellow); }
}
.panel { padding: .25rem 0 0; }
@media (min-width: 900px) { .js .panels { min-height: 27rem; } }   /* wysokość nie skacze przy zmianie zakładki */
.no-js .panel + .panel { margin-top: 3rem; }
.panel[hidden] { display: none; }
.panel h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.panel > p { max-width: 38rem; margin-top: .9rem; }
.panel h4 { margin: 1.75rem 0 .6rem; font: 700 1.0625rem/1.3 var(--font-text); color: var(--muted); }
.gains { display: grid; gap: .65rem; max-width: 38rem; }
.gains li { position: relative; padding-left: 1.6rem; }
.gains li::before { content: ""; position: absolute; left: 0; top: .5em; width: .7rem; height: .7rem; background: var(--yellow); border-radius: 2px; }

/* jak to działa: prawdziwa sekwencja */
.steps { display: grid; gap: 2rem; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 1.75rem; } }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.9rem; height: 2.9rem; margin-bottom: 1rem; font: italic 900 1.4rem/1 var(--font-display); color: var(--crow); background: var(--yellow); border-radius: 50%; }
.steps h3 { font-size: 1.25rem; }
.steps p { margin-top: .5rem; color: var(--muted); font-size: 1.0625rem; }

/* bezpieczeństwo */
.trust { display: grid; gap: 2rem; }
@media (min-width: 820px) { .trust { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.trust li { padding-top: 1.1rem; border-top: 4px solid var(--yellow); }
.trust h3 { color: var(--white); font-size: 1.25rem; }
.trust p { margin-top: .6rem; color: var(--muted-dark); font-size: 1.0625rem; }

/* moduły */
.modules { display: grid; gap: 0 3rem; max-width: 52rem; }
@media (min-width: 760px) { .modules { grid-template-columns: 1fr 1fr; } }
.modules li { padding: 1rem 0; border-bottom: 1px solid rgba(29, 35, 44, .14); }
.modules strong { display: block; font: italic 800 1.2rem/1.25 var(--font-display); }
.modules span { color: var(--muted); font-size: 1.0625rem; }
.pricing-note { max-width: 40rem; margin-top: 2rem; color: var(--muted); }
.pricing-actions { margin-top: 1.5rem; }

/* FAQ */
.faq { max-width: 48rem; }
.faq details { border-bottom: 1px solid rgba(29, 35, 44, .18); }
.faq details:first-child { border-top: 1px solid rgba(29, 35, 44, .18); }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; font: 700 1.3rem/1 var(--font-text); color: var(--crow); background: var(--yellow); border-radius: 50%; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 2.6rem 1.25rem 0; color: var(--muted); }

/* kontakt */
.contact { background: var(--slate); color: var(--feather); padding: var(--space-section) 0; }
.contact h2 { color: var(--white); font-weight: 900; font-size: clamp(2rem, 5vw, 3.4rem); max-width: 36rem; }
.contact p { max-width: 34rem; margin-top: 1.25rem; color: var(--muted-dark); }
.contact-mail { display: inline-block; margin-top: 1.75rem; font: italic 800 clamp(1.4rem, 3.4vw, 2.1rem)/1.2 var(--font-display); color: var(--yellow); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.contact-mail:hover { color: var(--yellow-hover); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

/* stopka */
.site-footer { background: var(--slate-deep); color: var(--muted-dark); padding: 2.5rem 0; font-size: 1rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.site-footer img { width: 100px; height: 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer a { color: var(--feather); text-decoration: underline; text-decoration-color: var(--slate-line); text-underline-offset: 4px; }
.site-footer a:hover { text-decoration-color: var(--yellow); }

/* strony tekstowe (prywatność, 404) */
.page { padding: clamp(2.5rem, 6vw, 4.5rem) 0 var(--space-section); }
.page .wrap { max-width: calc(46rem + 2 * var(--gutter)); }
.page h1 { font-weight: 900; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; letter-spacing: -0.02em; }
.page h2 { margin: 2.5rem 0 .75rem; font-size: 1.5rem; }
.page p, .page li { margin-top: .85rem; }
.page ul { margin-top: .85rem; padding-left: 1.25rem; list-style: disc; }
.page .todo { padding: 0 .3em; background: rgba(240, 176, 0, .35); border-radius: 3px; }
.page .meta { color: var(--muted); }
.notfound { text-align: left; }
.notfound .btn { margin-top: 1.75rem; }

/* ---------- formularz kontaktowy ---------- */
.contact-page .lead { max-width: 36rem; margin-top: 1rem; color: var(--muted); }
.contact-form { max-width: 36rem; margin-top: 2rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: .4rem; font-weight: 700; }
.field input, .field textarea { display: block; width: 100%; padding: .75rem .9rem; font: 400 1.0625rem/1.4 var(--font-text); color: var(--ink); background: var(--white); border: 2px solid #aab3c0; border-radius: 6px; }
.field textarea { min-height: 10rem; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: 3px solid var(--yellow); outline-offset: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { max-width: 36rem; margin-top: 1.5rem; padding: .9rem 1.1rem; font-weight: 700; color: #8a1c13; background: #fdeeec; border-left: 5px solid #b42318; border-radius: 4px; }
.form-ok { max-width: 36rem; }
.form-ok p { margin-bottom: 1.5rem; }
.form-note { margin-top: 1.25rem; font-size: 1rem; color: var(--muted); }
.form-note a { color: var(--ink); }
