/* ============================================================
   RESUMO — style.css
   Mobile-first, custom properties, dark/light theme, no frameworks
   ============================================================ */

/* ============================================================
   DESIGN TOKENS — Light mode (default)
   Original palette preserved; semantic aliases added for theming
   ============================================================ */
:root {
  /* ── Original palette (keep as source-of-truth) ── */
  --color-bg:          #ffffff;
  --color-bg-subtle:   #f8f8fc;
  --color-bg-muted:    #f1f1f7;
  --color-text:        #0f0f0f;
  --color-text-muted:  #6b7280;
  --color-text-light:  #9ca3af;
  --color-accent:      #6366f1;
  --color-accent-dark: #4f46e5;
  --color-accent-soft: #eef2ff;
  --color-border:      #e5e7eb;
  --color-white:       #ffffff;

  /* ── Semantic theme aliases (used throughout CSS) ── */
  --bg:            var(--color-bg);
  --bg-secondary:  var(--color-bg-subtle);
  --bg-muted:      var(--color-bg-muted);
  --text:          var(--color-text);
  --text-muted:    var(--color-text-muted);
  --text-light:    var(--color-text-light);
  --accent:        var(--color-accent);
  --accent-hover:  var(--color-accent-dark);
  --accent-soft:   var(--color-accent-soft);
  --border:        var(--color-border);
  --card-bg:       var(--color-white);
  --shadow:        rgba(0, 0, 0, 0.08);
  --nav-bg:        rgba(255, 255, 255, 0.92);

  /* ── Typography ── */
  --font-base: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-md:   1.125rem;
  --font-size-lg:   1.25rem;
  --font-size-xl:   1.5rem;
  --font-size-2xl:  2rem;
  --font-size-3xl:  2.75rem;
  --font-size-4xl:  3.5rem;

  /* ── Spacing ── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ── Borders & Radius ── */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 2px var(--shadow);
  --shadow-sm: 0 2px 8px var(--shadow);
  --shadow-md: 0 4px 20px var(--shadow);
  --shadow-lg: 0 8px 40px var(--shadow);

  /* ── Transitions ── */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;

  /* ── Layout ── */
  --navbar-height: 64px;
  --container-max: 1160px;
  --container-pad: var(--space-5);
}

/* ============================================================
   NAVBAR — atrakcyjny, biały motyw na stałe
   ============================================================ */

/* Usunięto dark mode — tylko biały motyw */

/* ── Navbar greeting (zalogowany user) ── */
.navbar__greeting {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 500;
  padding: 0 var(--space-2);
}

.navbar__greeting svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.navbar__greeting strong {
  color: var(--text);
  font-weight: 700;
}

/* ── Navbar separator ── */
.navbar__sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Small button variant ── */
.btn--sm {
  padding: 0.4rem 0.9rem;
  font-size: var(--font-size-xs);
  border-radius: var(--radius-md);
}

/* ── Signup button — gradient przyciągający wzrok ── */
.btn--signup {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.btn--signup:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.55);
  transform: translateY(-1px);
}

.btn--signup:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ── Navbar scrolled — delikatny border-bottom glow ── */
.navbar.scrolled {
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(99, 102, 241, 0.06);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Smooth theme transition */
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.text-accent {
  color: var(--accent);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn:active {
  transform: translateY(1px);
}

/* Ghost / Outline */
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
}

/* Accent / Filled */
.btn--accent {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}

.btn--accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* White (for dark-background sections) */
.btn--white {
  background: #ffffff;
  color: var(--accent);
  border: 1px solid #ffffff;
}

.btn--white:hover {
  background: var(--accent-soft);
}

/* Large */
.btn--lg {
  padding: 0.8rem 1.6rem;
  font-size: var(--font-size-base);
  border-radius: var(--radius-lg);
}

/* Full width */
.btn--full {
  width: 100%;
  justify-content: center;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================================
   SECTION SHARED STYLES
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.section-subtitle {
  font-size: var(--font-size-md);
  color: var(--text-muted);
  max-width: 480px;
  margin-inline: auto;
}

/* ============================================================
   IMAGE PLACEHOLDERS
   ============================================================ */
.img-placeholder {
  background: var(--bg-muted);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--text-light);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-align: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.img-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.4;
}

.img-placeholder small {
  font-size: var(--font-size-xs);
  opacity: 0.7;
  font-weight: 400;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--navbar-height);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition:
    box-shadow var(--transition-base),
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar__inner {
  display: flex;
  align-items: center;
  height: var(--navbar-height);
  gap: var(--space-4);
}

/* Logo */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: var(--font-size-lg);
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-sm);
  transition: background-color 0.3s ease;
}

.logo-icon svg {
  width: 18px;
  height: 18px;
}

.logo-text {
  letter-spacing: -0.03em;
}

/* Desktop nav links */
.navbar__links {
  display: none;
  align-items: center;
  gap: var(--space-6);
  margin-left: auto;
}

.nav-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
}

/* Right-side controls wrapper */
.navbar__controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
}

/* CTA buttons (inside controls, desktop only) */
.navbar__actions {
  display: none;
  align-items: center;
  gap: var(--space-3);
}

/* Hamburger */
.navbar__hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.navbar__hamburger:hover {
  background: var(--bg-muted);
}

.navbar__hamburger svg {
  width: 22px;
  height: 22px;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: var(--space-5);
  z-index: 99;
  transition: background-color 0.3s ease;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.mobile-link {
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text);
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
}

.mobile-link:hover {
  color: var(--accent);
}

.mobile-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-2) 0;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: calc(var(--navbar-height) + var(--space-16));
  padding-bottom: var(--space-20);
  background: var(--bg);
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 640px;
}

/* Badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-6);
  transition: background-color 0.3s ease;
}

.hero__badge svg {
  width: 14px;
  height: 14px;
}

/* Headline */
.hero__headline {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: var(--space-5);
}

/* Subline */
.hero__subline {
  font-size: var(--font-size-md);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 520px;
}

/* CTA group */
.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-6);
}

/* Social proof */
.hero__social-proof {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.hero__social-proof svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

/* Hero image */
.hero__image-wrap {
  width: 100%;
  max-width: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating wrapper — animacja unoszenia */
.hero__mockup-float {
  width: 100%;
  animation: hero-float 7s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
  transform-origin: center center;
  filter: drop-shadow(0 40px 60px rgba(99, 102, 241, 0.22))
          drop-shadow(0 12px 28px rgba(0, 0, 0, 0.10));
  will-change: transform;
}

.hero__mockup-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  user-select: none;
  pointer-events: none;
}

/* Keyframes: płynne unoszenie bez rotacji */
@keyframes hero-float {
  0%   { transform: translateY(0px);   }
  50%  { transform: translateY(-20px); }
  100% { transform: translateY(0px);   }
}

/* Placeholder — zostaje dla innych miejsc gdzie jest używany */
.img-placeholder--hero {
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 240px;
}


/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
  padding-block: var(--space-20);
  background: var(--bg-secondary);
  transition: background-color 0.3s ease;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.step-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base),
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.step-number {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: var(--space-4);
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  transition: background-color 0.3s ease;
}

.step-icon svg {
  width: 22px;
  height: 22px;
}

.step-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.step-desc {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  padding-block: var(--space-20);
  background: var(--bg);
  transition: background-color 0.3s ease;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition:
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-base),
    background-color 0.3s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--text-light);
  transform: translateY(-2px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  transition: background-color 0.3s ease;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   TEMPLATES
   ============================================================ */
.templates {
  padding-block: var(--space-20);
  background: var(--bg-secondary);
  transition: background-color 0.3s ease;
}

.templates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.template-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    box-shadow var(--transition-base),
    transform var(--transition-base),
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.template-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.img-placeholder--template {
  width: 100%;
  aspect-ratio: 5 / 7;
}

.template-card__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
}

.template-name {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text);
}

.template-tag {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.templates__cta {
  display: flex;
  justify-content: center;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  padding-block: var(--space-20);
  background: var(--accent);
  transition: background-color 0.3s ease;
}

.cta-banner__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
}

.cta-banner__title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.cta-banner__sub {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.8);
  max-width: 400px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: var(--space-10);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.footer__tagline {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--text);
}

.footer-link--icon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.footer-link--icon svg {
  width: 15px;
  height: 15px;
}

.footer__copy {
  font-size: var(--font-size-xs);
  color: var(--text-light);
}

/* ============================================================
   RESPONSIVE — TABLET (≥ 640px)
   ============================================================ */
@media (min-width: 640px) {
  :root {
    --container-pad: var(--space-8);
  }

  .section-title {
    font-size: var(--font-size-2xl);
  }

  .hero__headline {
    font-size: var(--font-size-3xl);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .templates-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    align-items: center;
  }

  .footer__brand {
    align-items: flex-start;
  }
}

/* ============================================================
   RESPONSIVE — DESKTOP (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  :root {
    --container-pad: var(--space-10);
  }

  /* Show desktop nav links */
  .navbar__links {
    display: flex;
    margin-left: auto;
  }

  /* Show CTA buttons inside controls */
  .navbar__actions {
    display: flex;
  }

  /* Override controls margin — links already push right */
  .navbar__controls {
    margin-left: 0;
  }

  /* Hide hamburger */
  .navbar__hamburger {
    display: none;
  }

  /* Hero: side-by-side */
  .hero__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-16);
  }

  .hero__content {
    align-items: flex-start;
    text-align: left;
    flex: 0 0 auto;
    max-width: 520px;
  }

  .hero__cta-group {
    justify-content: flex-start;
  }

  .hero__social-proof {
    justify-content: flex-start;
  }

  .hero__image-wrap {
    flex: 1;
    max-width: 580px;
  }

  .hero__headline {
    font-size: var(--font-size-4xl);
  }

  .section-title {
    font-size: var(--font-size-3xl);
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta-banner__title {
    font-size: var(--font-size-3xl);
  }
}

/* ============================================================
   ACCESSIBILITY — Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   FOCUS STYLES (keyboard navigation)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   AUTH PAGES — login, register, verify_email
   ============================================================ */

.required-star {
  color: #e53e3e;
  font-weight: 700;
  margin-left: 2px;
}

.auth-section {
  min-height: calc(100vh - var(--navbar-height));
  padding-top: calc(var(--navbar-height) + var(--space-12));
  padding-bottom: var(--space-16);
  background: var(--bg);
  display: flex;
  align-items: flex-start;
}

.auth-section--centered {
  align-items: center;
}

/* Two-column layout: card + aside */
.auth-container {
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: start;
  width: 550px;
}

/* ── Auth Card ── */
.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  width: 100%;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.auth-card--narrow {
  max-width: 480px;
  margin-inline: auto;
}

.auth-card__header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.auth-card__icon svg {
  width: 26px;
  height: 26px;
}

.auth-card__title {
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.auth-card__sub {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

.auth-card__footer {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: var(--space-5);
}

/* ── Messages (Django) ── */
.auth-messages {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  list-style: none;
}

.auth-message {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.auth-message svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.auth-message--error,
.auth-message--danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.auth-message--success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.auth-message--info,
.auth-message--warning {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
}

html.dark .auth-message--error,
html.dark .auth-message--danger {
  background: #2d0a0a;
  color: #f87171;
  border-color: #7f1d1d;
}

html.dark .auth-message--success {
  background: #052e16;
  color: #4ade80;
  border-color: #14532d;
}

/* ── Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group--inline {
  flex-direction: row;
  align-items: center;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text);
}

.form-label svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.form-input-wrap {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-family: var(--font-base);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color 0.3s ease;
  outline: none;
}

.form-input-wrap .form-input {
  padding-right: 2.8rem; /* space for eye toggle */
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.form-input--error {
  border-color: #dc2626;
}

.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* Password show/hide toggle */
.form-input__toggle-pw {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.form-input__toggle-pw:hover {
  color: var(--text);
}

.form-input__toggle-pw svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Error text */
.form-error {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  color: #dc2626;
  font-weight: 500;
}

.form-error svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Links */
.form-link {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.form-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.form-link--small {
  font-size: var(--font-size-xs);
}

/* Checkbox */
.form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.form-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.form-checkbox__box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.form-checkbox input:checked + .form-checkbox__box {
  background: var(--accent);
  border-color: var(--accent);
}

.form-checkbox input:checked + .form-checkbox__box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.form-checkbox input:focus-visible + .form-checkbox__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Password Strength Bar ── */
.password-strength {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.password-strength__bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.password-strength__fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength__label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  min-width: 60px;
  text-align: right;
}

/* ── Auth Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-block: var(--space-5);
  color: var(--text-light);
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Auth Aside (desktop only) ── */
.auth-aside {
  display: none;
}

.auth-aside__inner {
  background: var(--accent);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  color: #ffffff;
  position: sticky;
  top: calc(var(--navbar-height) + var(--space-8));
}

.auth-aside__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,0.15);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.auth-aside__badge svg {
  width: 13px;
  height: 13px;
}

.auth-aside__quote {
  font-size: var(--font-size-md);
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: var(--space-3);
  font-style: italic;
  opacity: 0.95;
}

.auth-aside__author {
  font-size: var(--font-size-sm);
  opacity: 0.7;
  margin-bottom: var(--space-8);
}

.auth-aside__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
}

.auth-aside__features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: 500;
  opacity: 0.9;
}

.auth-aside__features svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  padding: 2px;
}

/* ── Verify Email Page ── */
.verify-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  color: var(--accent);
}

.verify-icon svg {
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1;
}

.verify-icon__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  animation: pulse-ring 2.5s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1);   opacity: 1;   }
  50%       { transform: scale(1.1); opacity: 0.6; }
}

.verify-email-address {
  display: inline-block;
  margin-top: var(--space-1);
  color: var(--accent);
  word-break: break-all;
}

.verify-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-block: var(--space-8);
  list-style: none;
}

.verify-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.verify-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  font-size: var(--font-size-xs);
  font-weight: 800;
}

.verify-step__text {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  padding-top: 4px;
  line-height: 1.5;
}

.verify-step__text strong {
  color: var(--text);
}

.verify-step__hint {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-light);
  margin-top: 2px;
}

.verify-resend {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.verify-resend__label {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.verify-resend__cooldown {
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* ============================================================
   AUTH RESPONSIVE — DESKTOP (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .auth-container {
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
  }

  .auth-aside {
    display: block;
  }

  .auth-card {
    padding: var(--space-10);
  }
}

/* ============================================================
   AUTH RESPONSIVE — MOBILE (< 480px)
   ============================================================ */
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: var(--space-6);
    border-radius: var(--radius-lg);
  }
}

/* Logo jako obrazek — skalowanie proporcjonalne */
.nav__logo-img,
.sidebar__logo-img,
.footer__logo-img {
  height: 28px;          /* wysokość stała */
  width: auto;           /* szerokość proporcjonalna */
  display: block;
  object-fit: contain;
}

/* Navbar może potrzebować trochę więcej wysokości */
.nav__logo-img {
  height: 32px;
}

/* ── CV Grid ── */
.cv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  align-items: start;
}

/* ── Karta CV ── */
.cv-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

/* ── Miniatura karty ── */
.cv-card__preview {
  height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  color: rgba(255,255,255,0.5);
}

.cv-card__preview i {
  width: 32px;
  height: 32px;
  opacity: 0.6;
}

.cv-card__preview-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.5;
}

/* Kolory miniatur per szablon */
.cv-card__preview--classic {
  background: linear-gradient(135deg, #2a2640, #3b3560);
  color: #a89fff;
}
.cv-card__preview--modern {
  background: linear-gradient(135deg, #1a2e26, #1e3a2e);
  color: #6ee7b7;
}
.cv-card__preview--minimal {
  background: linear-gradient(135deg, #2e2510, #3a2e14);
  color: #fcd34d;
}

/* ── Treść karty ── */
.cv-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.cv-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.cv-card__title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin: 0;
}

.cv-card__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--color-text-muted);
  margin: 0;
}

.cv-card__meta i {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ── Pasek postępu ── */
.cv-card__progress {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cv-card__progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-muted);
}

.progress {
  height: 4px;
  background: var(--color-surface-2, #2a2a3e);
  border-radius: 99px;
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* ── Akcje ── */
.cv-card__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

/* ── Karta "Dodaj nowe" ── */
.cv-card--add {
  min-height: 220px;
  border: 2px dashed var(--color-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  cursor: pointer;
}

.cv-card--add:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-glow);
  transform: translateY(-2px);
}

.cv-card--add__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.cv-card--add__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
}

.cv-card--add:hover .cv-card--add__icon {
  background: var(--color-accent);
  color: #fff;
}

.cv-card--add__icon i { width: 22px; height: 22px; }

.cv-card--add__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.cv-card--add__sub {
  font-size: 12px;
  color: var(--color-text-muted);
  opacity: 0.6;
}

/* ── Empty state ── */
.cv-card--empty {
  grid-column: 1 / -1;       /* rozciąga się na całą szerokość gridu */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 20px;
  color: var(--color-text-muted);
  text-align: center;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-xl);
}

.cv-card--empty i    { width: 44px; height: 44px; opacity: 0.4; }
.cv-card--empty h3   { color: var(--color-text); margin: 0; font-size: 16px; }
.cv-card--empty p    { margin: 0; font-size: 13px; }

a.cv-card__preview {
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

a.cv-card__preview:hover {
    opacity: 0.85;
}

/* ============================================================
   LEGAL PAGES — terms.html & privacy.html
   ============================================================ */

.legal-section {
  padding-top: calc(var(--navbar-height) + var(--space-12));
  padding-bottom: var(--space-20);
  background: var(--bg);
  min-height: 100vh;
}

/* ── Two-column layout: sidebar + content ── */
.legal-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: start;
}

@media (min-width: 1024px) {
  .legal-container {
    grid-template-columns: 220px 1fr;
    gap: var(--space-12);
  }
}

/* ── Sticky sidebar ── */
.legal-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .legal-sidebar {
    display: block;
    position: sticky;
    top: calc(var(--navbar-height) + var(--space-8));
  }
}

.legal-sidebar__inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.legal-sidebar__label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: var(--space-3);
}

.legal-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legal-sidebar__link {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.legal-sidebar__link:hover {
  background: var(--bg-muted);
  color: var(--text);
}

/* ── Main content area ── */
.legal-content {
  max-width: 720px;
}

/* ── Page header ── */
.legal-header {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border);
}

.legal-header__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-lg);
}

.legal-header__icon--green {
  background: #f0fdf4;
  color: #16a34a;
}

html.dark .legal-header__icon--green {
  background: #052e16;
  color: #4ade80;
}

.legal-header__icon svg {
  width: 26px;
  height: 26px;
}

.legal-header__title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.legal-header__meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.legal-header__meta svg {
  width: 14px;
  height: 14px;
}

/* ── Section blocks ── */
.legal-section-block {
  margin-bottom: var(--space-8);
  scroll-margin-top: calc(var(--navbar-height) + var(--space-6));
}

.legal-section-block__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-5);
  letter-spacing: -0.01em;
}

.legal-section-block__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 var(--space-2);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.legal-subsection-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: var(--space-5) 0 var(--space-3);
}

.legal-lead {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.legal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

/* ── Ordered list ── */
.legal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  counter-reset: legal-counter;
}

.legal-list > li {
  counter-increment: legal-counter;
  display: flex;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

.legal-list > li::before {
  content: counter(legal-counter) ".";
  font-weight: 700;
  color: var(--accent);
  min-width: 20px;
  flex-shrink: 0;
  padding-top: 1px;
}

.legal-list__highlight {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-3) var(--space-4);
}

/* ── Sub-list (inside li) ── */
.legal-sublist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-left: var(--space-4);
}

.legal-sublist li {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.65;
  padding-left: var(--space-3);
  border-left: 2px solid var(--border);
}

/* ── Checklist ── */
.legal-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.legal-checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.65;
}

.legal-checklist svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #16a34a;
}

.legal-checklist .icon--danger {
  color: #dc2626;
}

/* ── Tag list (data types) ── */
.legal-tag-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.legal-tag-list li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  width: fit-content;
}

.legal-tag-list svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Notice boxes ── */
.legal-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  font-size: var(--font-size-sm);
  line-height: 1.65;
}

.legal-notice svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.legal-notice p,
.legal-notice div {
  color: inherit;
}

.legal-notice strong {
  display: block;
  margin-bottom: var(--space-1);
}

.legal-notice--info {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.legal-notice--warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

html.dark .legal-notice--warning {
  background: #1c1400;
  color: #fcd34d;
  border-color: #78350f;
}

.legal-notice--success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

html.dark .legal-notice--success {
  background: #052e16;
  color: #4ade80;
  border-color: #14532d;
}

/* ── Tables ── */
.legal-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.legal-table thead {
  background: var(--bg-muted);
}

.legal-table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-weight: 700;
  color: var(--text);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.legal-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
  vertical-align: top;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table tr:hover td {
  background: var(--bg-secondary);
}

.legal-table code {
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-xs);
  background: var(--bg-muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent);
}

/* ── Rights grid ── */
.legal-rights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .legal-rights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.legal-right-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.legal-right-card:hover {
  border-color: var(--accent);
}

.legal-right-card svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.legal-right-card strong {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text);
  margin-bottom: var(--space-1);
}

.legal-right-card p {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ── Contact card ── */
.legal-contact-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.legal-contact-card svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.legal-contact-card strong {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text);
  margin-bottom: 2px;
}

/* ── Inline link ── */
.legal-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.legal-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ── Footer nav ── */
.legal-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ============================================================
   ERROR PAGES — 404 & 500
   ============================================================ */

.error-section {
  min-height: calc(100vh - var(--navbar-height));
  padding-top: calc(var(--navbar-height) + var(--space-16));
  padding-bottom: var(--space-20);
  background: var(--bg);
  display: flex;
  align-items: center;
}

.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
  text-align: center;
}

@media (min-width: 1024px) {
  .error-container {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--space-20);
  }
}

/* ── Wielka liczba po lewej ── */
.error-visual {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 220px;
}

@media (min-width: 1024px) {
  .error-visual {
    width: 280px;
    height: 280px;
  }
}

.error-visual__code {
  position: relative;
  z-index: 1;
  font-size: 7rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, transparent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
}

@media (min-width: 1024px) {
  .error-visual__code {
    font-size: 9rem;
  }
}

.error-visual--red .error-visual__code {
  background: linear-gradient(135deg, #ef4444, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-visual__glow {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  filter: blur(40px);
  opacity: 0.6;
  animation: error-pulse 3s ease-in-out infinite;
}

.error-visual__glow--red {
  background: rgba(239, 68, 68, 0.15);
}

html.dark .error-visual__glow {
  opacity: 0.3;
}

@keyframes error-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.6; }
  50%       { transform: scale(1.1); opacity: 0.3; }
}

/* ── Prawa strona — treść ── */
.error-content {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

@media (min-width: 1024px) {
  .error-content {
    align-items: flex-start;
  }
}

/* Badge */
.error-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.error-badge svg {
  width: 14px;
  height: 14px;
}

.error-badge--red {
  background: #fef2f2;
  color: #dc2626;
}

html.dark .error-badge--red {
  background: #2d0a0a;
  color: #f87171;
}

/* Tytuł */
.error-title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin: 0;
}

@media (max-width: 640px) {
  .error-title {
    font-size: var(--font-size-2xl);
  }
}

/* Opis */
.error-desc {
  font-size: var(--font-size-md);
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* Info notice (500 only) */
.error-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.6;
  text-align: left;
}

.error-notice svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.error-notice p {
  margin: 0;
}

/* Przyciski */
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

@media (min-width: 1024px) {
  .error-actions {
    justify-content: flex-start;
  }
}

/* Quick links */
.error-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.error-links__label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
}

.error-links__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

@media (min-width: 1024px) {
  .error-links__grid {
    justify-content: flex-start;
  }
}

.error-quicklink {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.error-quicklink:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.error-quicklink svg {
  width: 14px;
  height: 14px;
}

/* ============================================================
   LANDING PAGE — Animations & Effects
   ============================================================ */

/* ── Hero background orbs ── */
.hero {
  position: relative;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: orb-drift 12s ease-in-out infinite;
}

html.dark .hero__orb {
  opacity: 0.18;
}

.hero__orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.6), transparent 70%);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.hero__orb--2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139,92,246,0.5), transparent 70%);
  bottom: -50px;
  left: 10%;
  animation-delay: -4s;
  animation-duration: 15s;
}

.hero__orb--3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(99,102,241,0.4), transparent 70%);
  top: 40%;
  left: 40%;
  animation-delay: -8s;
  animation-duration: 10s;
}

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1);     }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Gradient accent text ── */
.hero__headline--gradient {
  background: linear-gradient(135deg, var(--accent), #a78bfa, var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s linear infinite;
}

@keyframes gradient-shift {
  0%   { background-position: 0% center;   }
  100% { background-position: 200% center; }
}

/* ── Hero stats ── */
.hero__stats {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__stat-num {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero__stat-suffix {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--accent);
}

.hero__stat-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.hero__stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Shine button effect ── */
.btn--shine {
  position: relative;
  overflow: hidden;
}

.btn--shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-20deg);
  transition: none;
}

.btn--shine:hover::after {
  animation: btn-shine 0.6s ease forwards;
}

@keyframes btn-shine {
  to { left: 150%; }
}

/* ── Floating mockup — updated keyframes with 3D rotation ── */
@keyframes hero-float {
  0%   { transform: translateY(0px)    rotate3d(0, 1, 0, 0deg);  }
  25%  { transform: translateY(-10px)  rotate3d(0, 1, 0, 4deg);  }
  50%  { transform: translateY(-20px)  rotate3d(0, 1, 0, 0deg);  }
  75%  { transform: translateY(-10px)  rotate3d(0, 1, 0, -4deg); }
  100% { transform: translateY(0px)    rotate3d(0, 1, 0, 0deg);  }
}

/* ── Hero entry animations ── */
.animate-fade-up {
  opacity: 0;
  transform: translateY(32px);
  animation: fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.animate-fade-left {
  opacity: 0;
  transform: translateX(40px);
  animation: fade-left 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-left {
  to { opacity: 1; transform: translateX(0); }
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }

/* ── Section badge ── */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.section-badge svg {
  width: 12px;
  height: 12px;
}

/* ── Step card glow on hover ── */
.step-card {
  overflow: hidden;
}

.step-card__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle at 50% 0%, rgba(99,102,241,0.12), transparent 70%);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.step-card:hover .step-card__glow {
  opacity: 1;
}

.step-card:hover .step-icon {
  background: var(--accent);
  color: #ffffff;
  transform: scale(1.1) rotate(-5deg);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Feature card hover glow ── */
.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 20%, rgba(99,102,241,0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover .feature-icon {
  background: var(--accent);
  color: #ffffff;
  transform: scale(1.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Template card hover overlay ── */
.template-card {
  position: relative;
  overflow: hidden;
}

.template-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(99, 102, 241, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.template-card:hover .template-card__overlay {
  opacity: 1;
}

/* ── CTA Banner particles ── */
.cta-banner {
  position: relative;
  overflow: hidden;
}

.cta-banner__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta-banner__particles span {
  position: absolute;
  display: block;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: particle-float 6s ease-in-out infinite;
}

.cta-banner__particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s;    animation-duration: 7s;  }
.cta-banner__particles span:nth-child(2) { left: 25%; top: 70%; animation-delay: -1s;   animation-duration: 5s;  }
.cta-banner__particles span:nth-child(3) { left: 50%; top: 30%; animation-delay: -2s;   animation-duration: 8s;  }
.cta-banner__particles span:nth-child(4) { left: 70%; top: 60%; animation-delay: -3s;   animation-duration: 6s;  }
.cta-banner__particles span:nth-child(5) { left: 85%; top: 25%; animation-delay: -1.5s; animation-duration: 9s;  }
.cta-banner__particles span:nth-child(6) { left: 90%; top: 75%; animation-delay: -4s;   animation-duration: 7s;  }

@keyframes particle-float {
  0%, 100% { transform: translateY(0) scale(1);   opacity: 0.3; }
  50%       { transform: translateY(-30px) scale(1.5); opacity: 0.7; }
}

/* ── Reduced motion override ── */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-up,
  .animate-fade-left {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero__orb,
  .hero__headline--gradient,
  .cta-banner__particles span {
    animation: none !important;
  }
}
