/* =========================================================
   SmartBudget — Landing Page v2
   ========================================================= */

/* ---------- Reset ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  min-width: 320px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #101426;
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Variables ---------- */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --bg-purple: #f3f1ff;

  --surface: #ffffff;
  --surface-dark: #151329;

  --text: #101426;
  --text-soft: #5f6578;
  --text-faint: #8e93a5;

  --primary: #5546e8;
  --primary-dark: #4032c7;
  --primary-light: #7468f3;
  --primary-soft: #eeecff;

  --green: #10a875;
  --orange: #f59e0b;
  --red: #ef476f;

  --border: #e5e7ef;
  --border-dark: rgba(255, 255, 255, 0.14);

  --gradient-primary: linear-gradient(135deg, #5546e8 0%, #7257ee 55%, #643be3 100%);
  --gradient-dark: linear-gradient(135deg, #16142c 0%, #26204b 100%);
  --gradient-hero:
    radial-gradient(circle at 18% 18%, rgba(98, 79, 235, 0.14), transparent 31%),
    radial-gradient(circle at 84% 26%, rgba(134, 105, 255, 0.14), transparent 27%),
    linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);

  --shadow-xs: 0 1px 2px rgba(15, 18, 38, 0.04);
  --shadow-sm: 0 6px 18px rgba(38, 34, 88, 0.07);
  --shadow-md: 0 14px 38px rgba(38, 34, 88, 0.1);
  --shadow-lg: 0 26px 70px rgba(38, 34, 88, 0.16);
  --shadow-primary: 0 14px 32px rgba(85, 70, 232, 0.28);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --radius-pill: 999px;

  --container: 1180px;
  --transition: 220ms ease;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base layout ---------- */

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.container-narrow {
  width: min(100% - 40px, 760px);
}

.section-center {
  text-align: center;
}

section {
  position: relative;
}

h1,
h2,
h3 {
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
}

p {
  color: var(--text-soft);
}

.section-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-heading {
  max-width: 700px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 18px;
}

.section-heading p {
  max-width: 620px;
  margin-inline: auto;
  font-size: 1.04rem;
}

/* ---------- Accessibility ---------- */

:focus-visible {
  outline: 3px solid rgba(85, 70, 232, 0.35);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Animations ---------- */

.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);/* Elementy są widoczne nawet wtedy, gdy JavaScript się nie uruchomi */
.fade-in {
  opacity: 1;
  transform: none;
}

/* Animacja działa tylko wtedy, gdy JavaScript jest aktywny */
.js .fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
}

.js .fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 13px 24px;
  font-size: 0.96rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  box-shadow: 0 18px 38px rgba(85, 70, 232, 0.34);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  color: var(--primary);
  border-color: rgba(85, 70, 232, 0.3);
  box-shadow: var(--shadow-sm);
}

.btn-light {
  color: var(--surface-dark);
  background: #ffffff;
}

.btn-light:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.btn-large {
  min-height: 56px;
  padding: 15px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* ---------- Navbar ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(229, 231, 239, 0.78);
  backdrop-filter: blur(18px);
}

.navbar-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 850;
  text-decoration: none;
  letter-spacing: -0.025em;
}

.brand-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: white;
  background: var(--gradient-primary);
  border-radius: 11px;
  box-shadow: 0 7px 18px rgba(85, 70, 232, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-cta {
  min-height: 44px;
  padding: 10px 20px;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 740px;
  padding: 105px 0 110px;
  overflow: hidden;
  background: var(--gradient-hero);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image: radial-gradient(rgba(85, 70, 232, 0.12) 0.8px, transparent 0.8px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.hero-bg {
  position: absolute;
  width: 520px;
  height: 520px;
  right: -260px;
  top: -180px;
  background: rgba(109, 78, 246, 0.1);
  border-radius: 50%;
  filter: blur(20px);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  align-items: center;
  gap: 72px;
}

.hero-text {
  max-width: 670px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  padding: 8px 15px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(85, 70, 232, 0.17);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  font-size: 0.81rem;
  font-weight: 800;
}

.badge::before {
  width: 7px;
  height: 7px;
  content: "";
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(16, 168, 117, 0.12);
}

.hero h1 {
  margin-bottom: 25px;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.99;
}

.hero h1 span {
  display: block;
  color: var(--primary);
  background: linear-gradient(100deg, #5546e8, #7d54ec);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  max-width: 610px;
  margin-bottom: 34px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
}

.hero-trust span {
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 600;
}

/* ---------- Product preview ---------- */

.product-preview {
  position: relative;
}

.product-preview::before {
  position: absolute;
  inset: 12% 5% -10%;
  content: "";
  background: rgba(85, 70, 232, 0.22);
  border-radius: 50%;
  filter: blur(70px);
}

.preview-window {
  position: relative;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(228, 227, 240, 0.94);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
  transition: transform 450ms var(--ease);
}

.preview-window:hover {
  transform: rotate(0deg) translateY(-5px);
}

.preview-toolbar {
  display: flex;
  gap: 7px;
  padding: 4px 4px 16px;
}

.preview-toolbar span {
  width: 9px;
  height: 9px;
  background: #d8d9e2;
  border-radius: 50%;
}

.preview-main-card {
  padding: 28px;
  color: white;
  background: var(--gradient-primary);
  border-radius: 23px;
  box-shadow: 0 20px 40px rgba(85, 70, 232, 0.23);
}

.preview-main-card p {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 650;
}

.preview-main-card strong {
  display: inline-block;
  margin-right: 5px;
  font-size: clamp(2.5rem, 4vw, 3.45rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.preview-main-card > span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
}

.preview-progress {
  height: 9px;
  margin: 22px 0 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
}

.preview-progress div {
  width: 70%;
  height: 100%;
  background: #ffffff;
  border-radius: inherit;
}

.preview-main-card small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.77rem;
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.preview-stats div {
  min-width: 0;
  padding: 17px 15px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.preview-stats span {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
  color: var(--text-faint);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-stats strong {
  font-size: 0.86rem;
  white-space: nowrap;
}

/* ---------- Problem section ---------- */

.problem-section {
  padding: 100px 0;
  background: var(--surface-dark);
}

.problem-section h2 {
  margin-bottom: 22px;
  color: #ffffff;
}

.problem-section p {
  max-width: 700px;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.07rem;
}

.problem-section .section-label {
  color: #a69cff;
}

/* ---------- Benefits ---------- */

.benefits-section {
  padding: 120px 0;
  background: var(--bg-soft);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  min-height: 255px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition:
    transform 300ms var(--ease),
    box-shadow 300ms var(--ease),
    border-color 300ms ease;
}

.feature-card:hover {
  transform: translateY(-7px);
  border-color: rgba(85, 70, 232, 0.22);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 22px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 15px;
  font-size: 1.22rem;
  font-weight: 850;
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.94rem;
  line-height: 1.72;
}

/* ---------- How it works ---------- */

.how-section {
  padding: 120px 0;
  background: #ffffff;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.steps::before {
  position: absolute;
  top: 32px;
  left: 16%;
  right: 16%;
  height: 1px;
  content: "";
  background: linear-gradient(to right, transparent, #d9d5fa, transparent);
}

.step-card {
  position: relative;
  z-index: 1;
  padding: 4px 28px 28px;
  text-align: center;
}

.step-number {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin: 0 auto 22px;
  color: #ffffff;
  background: var(--gradient-primary);
  border: 7px solid #f1efff;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
  font-weight: 850;
}

.step-card h3 {
  margin-bottom: 11px;
}

.step-card p {
  font-size: 0.94rem;
}

.section-cta {
  margin-top: 42px;
  text-align: center;
}

/* ---------- Founder section ---------- */

.founder-section {
  padding: 110px 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(117, 87, 242, 0.22), transparent 25%),
    radial-gradient(circle at 85% 82%, rgba(75, 54, 206, 0.28), transparent 30%),
    var(--surface-dark);
}

.founder-card {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 60px;
  align-items: center;
  padding: 64px;
  color: white;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.founder-copy h2 {
  max-width: 720px;
  margin-bottom: 20px;
  color: #ffffff;
}

.founder-copy > p {
  max-width: 680px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.68);
}

.founder-label {
  color: #b8afff;
}

.founder-list {
  display: grid;
  gap: 13px;
  list-style: none;
}

.founder-list li {
  position: relative;
  padding-left: 29px;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 550;
}

.founder-list li::before {
  position: absolute;
  left: 0;
  top: 2px;
  content: "✓";
  color: #53dfa9;
  font-weight: 850;
}

.founder-price {
  padding: 30px;
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.2);
}

.founder-price > span {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.founder-price strong {
  display: block;
  color: var(--text);
  font-size: 3.6rem;
  line-height: 1;
  letter-spacing: -0.055em;
}

.founder-price small {
  display: block;
  margin: 7px 0 24px;
  color: var(--text-soft);
}

.founder-price .btn-light {
  color: #ffffff;
  background: var(--gradient-primary);
}

.founder-price p {
  margin-top: 15px;
  color: var(--text-faint);
  font-size: 0.73rem;
  line-height: 1.5;
}

/* ---------- FAQ ---------- */

.faq-section {
  padding: 120px 0;
  background: #ffffff;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  width: 100%;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--text);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 750;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 500;
  transition: transform var(--transition);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 350ms ease,
    padding-bottom 350ms ease;
}

.faq-item.active .faq-answer {
  max-height: 260px;
  padding-bottom: 24px;
}

.faq-answer p {
  padding-right: 54px;
}

/* ---------- Final CTA ---------- */

.final-cta {
  padding: 95px 0;
  text-align: center;
  background: var(--bg-purple);
}

.final-cta h2 {
  max-width: 680px;
  margin: 0 auto 18px;
}

.final-cta p {
  max-width: 590px;
  margin: 0 auto 30px;
  font-size: 1.04rem;
}

/* ---------- Footer ---------- */

.footer {
  padding: 48px 0;
  background: #0f0e20;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 40px;
}

.footer strong {
  color: #ffffff;
  font-size: 1rem;
}

.footer p {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-copy {
  white-space: nowrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 85px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 55px;
  }

  .hero-text {
    max-width: 760px;
    margin-inline: auto;
    text-align: center;
  }

  .subtitle {
    margin-inline: auto;
  }

  .hero-actions,
  .hero-trust {
    justify-content: center;
  }

  .product-preview {
    width: min(100%, 650px);
    margin-inline: auto;
  }

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

  .founder-card {
    grid-template-columns: 1fr;
  }

  .founder-price {
    width: min(100%, 380px);
  }
}

@media (max-width: 760px) {
  .container,
  .container-narrow {
    width: min(100% - 30px, var(--container));
  }

  .navbar-inner {
    min-height: 68px;
  }

  .nav-cta {
    padding-inline: 16px;
    font-size: 0.84rem;
  }

  .hero {
    min-height: auto;
    padding: 72px 0 80px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 12vw, 4rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-trust {
    display: grid;
    gap: 9px;
  }

  .preview-main-card {
    padding: 22px;
  }

  .preview-stats {
    grid-template-columns: 1fr;
  }

  .preview-stats span {
    white-space: normal;
  }

  .feature-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .steps::before {
    display: none;
  }

  .step-card {
    padding-inline: 15px;
  }

  .founder-card {
    gap: 38px;
    padding: 38px 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-copy {
    white-space: normal;
  }
}

@media (max-width: 440px) {
  .brand span:last-child {
    font-size: 0.95rem;
  }

  .nav-cta {
    min-height: 42px;
    padding: 9px 13px;
    font-size: 0.76rem;
  }

  .badge {
    font-size: 0.72rem;
  }

  .preview-window {
    padding: 12px;
    border-radius: 24px;
  }

  .preview-main-card strong {
    font-size: 2.25rem;
  }

  .feature-card {
    min-height: auto;
    padding: 26px;
  }

  .founder-price strong {
    font-size: 3rem;
  }

  .faq-answer p {
    padding-right: 0;
  }
}