/* ==========================================================================
   Elevation, style własne motywu (bez utility Tailwind, te są w tw.css)
   ========================================================================== */

/* --- Fonty: Inter (variable, self-hosted) ------------------------------ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Bazowe ------------------------------------------------------------ */
html {
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
}
html.eg-lock,
html.eg-lock body {
  overflow: hidden;
}
:focus-visible {
  outline: 2px solid rgba(129, 140, 248, 0.9);
  outline-offset: 2px;
}
::selection {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.eg-skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.eg-skip:focus {
  top: 12px;
}
img {
  max-width: 100%;
  height: auto;
}

/* --- Pasek postępu scrolla --------------------------------------------- */
.eg-progress {
  background: rgba(255, 255, 255, 0.04);
}
.eg-progress__bar {
  transform: scaleX(0);
  opacity: 0;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.55), 0 0 12px rgba(99, 102, 241, 0.35);
  transition: opacity 200ms ease-out;
  will-change: transform;
}

/* --- Nawigacja ----------------------------------------------------------- */
.eg-nav {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.eg-nav.is-scrolled {
  background-color: rgba(0, 0, 0, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.6);
}
.eg-dd-panel:not(.is-open) {
  display: none !important;
}
.eg-dd-panel.is-open {
  animation: eg-dd-in 0.2s ease-out both;
}
@keyframes eg-dd-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.eg-dd-trigger[aria-expanded="true"] {
  color: #fff;
}
.eg-dd-trigger[aria-expanded="true"] .eg-dd-chevron {
  transform: rotate(180deg);
}
.eg-mobile:not(.is-open) {
  display: none !important;
}
.eg-mobile.is-open {
  animation: eg-fade 0.25s ease-out both;
}
.eg-burger .eg-burger__close { display: none; }
.eg-burger[aria-expanded="true"] .eg-burger__open { display: none; }
.eg-burger[aria-expanded="true"] .eg-burger__close { display: block; }
@keyframes eg-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* --- RippleButton -------------------------------------------------------- */
.eg-ripple {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
  text-decoration: none;
}
.eg-ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  pointer-events: none;
  animation: ripple-expand 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Karty ---------------------------------------------------------------- */
.eg-card {
  transition: transform 0.3s ease;
}
.eg-card:hover {
  transform: translateY(-3px);
}
.eg-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
}
.eg-card__link:focus-visible {
  outline: none;
}
.eg-card:has(.eg-card__link:focus-visible) {
  outline: 2px solid rgba(129, 140, 248, 0.9);
  outline-offset: 6px;
}
.eg-card-hover {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
  text-decoration: none;
}

/* --- Paginacja ------------------------------------------------------------ */
.eg-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.eg-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.eg-pagination a.page-numbers:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}
.eg-pagination .page-numbers.current {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.eg-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
}
.eg-pagination .screen-reader-text {
  display: none;
}

/* --- Formularz ------------------------------------------------------------ */
.eg-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.eg-input {
  color-scheme: dark;
}
.eg-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
.eg-select option {
  background: #0c0c14;
  color: #fff;
}
.eg-checkbox {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 2px;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.eg-checkbox::before {
  content: '';
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform 0.15s ease;
  background: #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.eg-checkbox:checked {
  background: #6366f1;
  border-color: #6366f1;
}
.eg-checkbox:checked::before {
  transform: scale(1);
}
.eg-checkbox[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.7);
}
.eg-shimmer {
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.8) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.eg-form[data-state="sending"] .eg-submit {
  opacity: 0.7;
  cursor: progress;
}
.eg-form[data-state="success"] > :not(.eg-form__success) {
  display: none;
}
.eg-form[data-state="success"] .eg-form__success {
  display: block;
  animation: eg-fade-up 0.35s ease-out both;
}
.eg-form__msg:not([hidden]) {
  animation: eg-fade 0.2s ease-out both;
}
@keyframes eg-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Modal ------------------------------------------------------------------ */
.eg-modal[hidden] {
  display: none;
}
.eg-modal__overlay {
  animation: eg-fade 0.25s ease-out both;
}
.eg-modal__panel {
  animation: eg-modal-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  outline: none;
  overflow-x: hidden;
}
.eg-modal.is-closing .eg-modal__overlay {
  animation: eg-fade 0.2s ease-in reverse both;
}
.eg-modal.is-closing .eg-modal__panel {
  animation: eg-modal-out 0.2s ease-in both;
}
@keyframes eg-modal-in {
  from { opacity: 0; transform: translateY(32px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes eg-modal-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(24px) scale(0.98); }
}
@media (min-width: 640px) {
  @keyframes eg-modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
}
.eg-modal__panel::-webkit-scrollbar {
  width: 6px;
}
.eg-modal__panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}

/* --- Cookie banner ----------------------------------------------------------- */
.eg-cookie[hidden] {
  display: none;
}
.eg-cookie:not([hidden]) {
  animation: eg-fade 0.3s ease-out both;
}
.eg-cookie__panel {
  animation: eg-cookie-in 0.4s ease-out both;
}
@keyframes eg-cookie-in {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.eg-cookie__settings:not([hidden]) {
  animation: eg-fade-up 0.25s ease-out both;
}
.eg-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.eg-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.eg-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  transition: background-color 0.2s ease;
}
.eg-switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.eg-switch input:checked + .eg-switch__track {
  background: #6366f1;
}
.eg-switch input:checked + .eg-switch__track::after {
  transform: translateX(20px);
}
.eg-switch input:focus-visible + .eg-switch__track {
  outline: 2px solid rgba(129, 140, 248, 0.9);
  outline-offset: 2px;
}

/* --- Akordeon ------------------------------------------------------------------ */
[data-eg-acc] {
  cursor: pointer;
}
[data-eg-panel] {
  overflow: hidden;
  transition: height 0.3s ease-out, opacity 0.3s ease;
}
[data-eg-panel][hidden] {
  display: none;
}
[data-eg-panel].is-animating {
  opacity: 1;
}
[data-eg-acc] .eg-acc-icon {
  transition: transform 0.3s ease;
}
[data-eg-acc][aria-expanded="true"] .eg-acc-icon {
  transform: rotate(45deg);
}

/* --- Sekcje: reveal (fallback, gdy JS się nie załaduje) ------------------------ */
html.no-js .section-reveal {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* --- Artykuł: .eg-prose ------------------------------------------------------------ */
.eg-prose {
  color: #cbd5e1;
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.75;
}
.eg-prose > * + * {
  margin-top: 1.5rem;
}
.eg-prose p {
  margin-bottom: 1.5rem;
}
.eg-prose > p:first-child {
  font-size: 1.125rem;
}
.eg-prose h2 {
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
}
.eg-prose h3 {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.015em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.eg-prose h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.eg-prose h2:first-child,
.eg-prose h3:first-child {
  margin-top: 0;
}
@media (min-width: 768px) {
  .eg-prose h2 {
    font-size: 2.25rem;
  }
}
.eg-prose strong,
.eg-prose b {
  color: #fff;
  font-weight: 600;
}
.eg-prose em {
  color: #e2e8f0;
}
.eg-prose a:not(.eg-btn) {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.eg-prose a:not(.eg-btn):hover {
  color: #a5b4fc;
}
.eg-prose ul,
.eg-prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.eg-prose ul {
  list-style: disc;
}
.eg-prose ol {
  list-style: decimal;
}
.eg-prose li {
  margin-top: 0.5rem;
  padding-left: 0.25rem;
}
.eg-prose li::marker {
  color: #64748b;
}
.eg-prose li > ul,
.eg-prose li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.eg-prose blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.05);
  color: #cbd5e1;
  font-style: italic;
}
.eg-prose blockquote p:last-child {
  margin-bottom: 0;
}
.eg-prose blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-style: normal;
  color: #94a3b8;
}
.eg-prose hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 3rem 0;
}
.eg-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.eg-prose figure {
  margin: 2.5rem 0;
}
.eg-prose figure img {
  margin: 0;
}
.eg-prose figcaption {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
}
.eg-prose .wp-block-image.alignwide,
.eg-prose .wp-block-image.alignfull {
  margin-left: 0;
  margin-right: 0;
}
.eg-prose .wp-block-table,
.eg-prose table {
  width: 100%;
  margin: 2rem 0;
  overflow-x: auto;
}
.eg-prose table {
  border-collapse: collapse;
  font-size: 0.9375rem;
  display: table;
  width: 100%;
}
.eg-prose .wp-block-table table {
  display: table;
  margin: 0;
}
.eg-prose th,
.eg-prose td {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}
.eg-prose th {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.eg-prose tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}
.eg-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
.eg-prose pre {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  background: #0c0c14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.875rem;
  line-height: 1.6;
}
.eg-prose pre code {
  padding: 0;
  border: 0;
  background: transparent;
}
.eg-prose .wp-block-quote,
.eg-prose .wp-block-pullquote {
  border-left: 2px solid rgba(99, 102, 241, 0.5);
}
.eg-prose .wp-block-pullquote {
  padding: 1.5rem;
  text-align: left;
}
.eg-prose .wp-block-pullquote p {
  font-size: 1.25rem;
  color: #fff;
}
.eg-prose .wp-block-separator {
  border-color: rgba(255, 255, 255, 0.08);
}
.eg-prose .wp-block-buttons .wp-block-button__link,
.eg-prose .eg-btn {
  display: inline-flex;
  padding: 1rem 2rem;
  background: #fff;
  color: #000;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0;
  transition: background-color 0.2s ease;
}
.eg-prose .wp-block-buttons .wp-block-button__link:hover,
.eg-prose .eg-btn:hover {
  background: #f1f5f9;
}
.eg-prose .eg-callout,
.eg-prose .wp-block-group.is-style-callout {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.05);
}
.eg-prose [data-eg-accordion] {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.eg-prose [data-eg-accordion] > * + * {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 0;
}
.eg-prose [data-eg-acc] {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem 0;
  text-align: left;
  color: #fff;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.4;
  background: none;
  border: 0;
}
.eg-prose [data-eg-panel] {
  padding-bottom: 1.5rem;
  color: #94a3b8;
  font-size: 1rem;
}
.eg-prose [data-eg-panel] p:last-child {
  margin-bottom: 0;
}
.eg-prose .wp-block-embed iframe {
  max-width: 100%;
}
.eg-prose .has-text-align-center {
  text-align: center;
}

/* --- Ogólne przejścia „premium” ----------------------------------------------------- */
a,
button {
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.eg-breadcrumbs a {
  text-decoration: none;
}

/* --- Reduced motion --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .eg-progress__bar {
    transition: none;
  }
}

/* --- Druk -------------------------------------------------------------------------------- */
@media print {
  .eg-nav,
  .eg-mobile,
  .eg-progress,
  .eg-cookie,
  .eg-modal,
  footer {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .eg-prose,
  .eg-prose * {
    color: #000 !important;
  }
}
