/* style.css */

:root {
  --font-family-sans: "system-ui", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  --font-family-serif: "Georgia", "Times New Roman", serif;

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem; /* 16px */
  --font-size-md: 1.125rem; /* 18px */
  --font-size-lg: 1.25rem; /* 20px */
  --font-size-xl: 1.5rem; /* 24px */
  --font-size-xxl: 2rem; /* 32px */
  --font-size-xxxl: 2.75rem; /* 44px */
  --font-size-display: 3.5rem; /* 56px */

  --spacing-xs: 0.25rem; /* 4px */
  --spacing-sm: 0.5rem; /* 8px */
  --spacing-md: 1rem; /* 16px */
  --spacing-lg: 1.5rem; /* 24px */
  --spacing-xl: 2rem; /* 32px */
  --spacing-xxl: 3rem; /* 48px */
  --spacing-xxxl: 4rem; /* 64px */

  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;

  --transition-fast: 0.2s ease-in-out;
  --transition-medium: 0.4s ease-in-out;
  --transition-slow: 0.6s ease-in-out;

  /* Light Theme Palette */
  --color-primary: #005a9c;
  --color-primary-dark: #003d6b;
  --color-primary-light: #e6f0f9;
  --color-secondary: #4caf50;
  --color-accent: #ffc107;
  --color-background: #ffffff;
  --color-surface: #f8f9fa;
  --color-surface-raised: #ffffff;
  --color-text-primary: #212529;
  --color-text-secondary: #495057;
  --color-text-muted: #6c757d;
  --color-border: #dee2e6;
  --color-link: var(--color-primary);
  --color-link-hover: var(--color-primary-dark);
  --color-success: #28a745;
  --color-error: #dc3545;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark Theme Palette */
    --color-primary: #4d9de0;
    --color-primary-dark: #7bc6ff;
    --color-primary-light: #2a3b4d;
    --color-secondary: #58a65c;
    --color-accent: #ffca28;
    --color-background: #121212;
    --color-surface: #1e1e1e;
    --color-surface-raised: #252525;
    --color-text-primary: #e0e0e0;
    --color-text-secondary: #b0b0b0;
    --color-text-muted: #888888;
    --color-border: #3a3a3a;
    --color-link: var(--color-primary);
    --color-link-hover: var(--color-primary-dark);
    --color-success: #4caf50;
    --color-error: #ef5350;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  line-height: 1.65;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  transition: background-color var(--transition-fast),
    color var(--transition-fast);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
  }
}

section {
  padding-top: var(--spacing-xxxl);
  padding-bottom: var(--spacing-xxxl);
}

.section-divider {
  border: 0;
  height: 1px;
  background-color: var(--color-border);
  margin: 0 auto;
  width: 90%;
  max-width: 1200px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-display);
}

h2 {
  font-size: var(--font-size-xxxl);
}

h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
}

h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-secondary);
  max-width: 75ch;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

ul,
ol {
  padding-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

li {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-secondary);
}

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

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xxl);
}

.section-header h2 {
  margin-bottom: var(--spacing-sm);
}

.section-header p {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-fast),
    border-color var(--transition-fast);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background-color: rgba(18, 18, 18, 0.8);
  }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-decoration: none;
}

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

.main-nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav li {
  margin: 0 var(--spacing-md);
}

.main-nav a {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
  padding: var(--spacing-sm) 0;
  position: relative;
  text-decoration: none;
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-fast);
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--color-text-primary);
}

.main-nav a:hover::after,
.main-nav a:focus::after {
  transform: scaleX(1);
}

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

/* Call to Action Buttons */
.cta-button {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border-radius: var(--border-radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color var(--transition-fast),
    color var(--transition-fast), border-color var(--transition-fast),
    transform var(--transition-fast);
  text-align: center;
}

.cta-button.primary,
.cta-button {
  background-color: var(--color-primary);
  color: var(--color-background);
  border-color: var(--color-primary);
}

.cta-button.primary:hover,
.cta-button:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.cta-button.secondary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.cta-button.secondary:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.cta-button-small {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: var(--font-size-sm);
  border-radius: var(--border-radius-sm);
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.cta-button-small:hover {
  background-color: var(--color-primary);
  color: var(--color-background);
  text-decoration: none;
}

/* Hero Section */
.hero-section {
  padding-top: var(--spacing-xxxl);
  padding-bottom: var(--spacing-xxxl);
  background-color: var(--color-surface);
}

.hero-section .container {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--spacing-xxl);
}

@media (min-width: 768px) {
  .hero-section .container {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
  }
}

.hero-text h1 {
  margin-bottom: var(--spacing-lg);
}

.hero-text p {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xl);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

@media (max-width: 767px) {
  .hero-text {
    text-align: center;
  }
  .hero-cta {
    justify-content: center;
  }
}

.hero-image img {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Features Section */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

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

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  background-color: var(--color-surface);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  text-align: center;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

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

.feature-card svg {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  margin-bottom: var(--spacing-lg);
}

.feature-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
}

.feature-card p {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
}

/* Content Section (Budżet) */
.content-section {
  background-color: var(--color-surface);
}

.step-by-step-content .step-article {
  margin-bottom: var(--spacing-xxl);
  padding: var(--spacing-xl);
  background-color: var(--color-background);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

.step-article h3 {
  margin-bottom: var(--spacing-lg);
  position: relative;
  padding-left: var(--spacing-xl);
}

.step-article h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 80%;
  background-color: var(--color-primary);
  border-radius: 2px;
}

.step-article ul {
  list-style: none;
  padding-left: 0;
}

.step-article li {
  position: relative;
  padding-left: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

.step-article li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: var(--font-weight-bold);
}

.two-column-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
  .two-column-layout {
    grid-template-columns: repeat(2, 1fr);
  }
}

.two-column-layout div {
  background-color: var(--color-surface);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-sm);
}

/* Tips Section */
.tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

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

.tip-card {
  background-color: var(--color-surface-raised);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast);
}

.tip-card:hover {
  transform: scale(1.02);
}

.tip-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.tip-content {
  padding: var(--spacing-lg);
  flex-grow: 1;
}

.tip-content h4 {
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary);
}

/* Accordion Section */
.accordion-section {
  background-color: var(--color-surface);
}

.accordion {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

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

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  background-color: var(--color-background);
  border: none;
  padding: var(--spacing-lg);
  text-align: left;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-fast);
}

.accordion-header:hover {
  background-color: var(--color-surface);
}

.accordion-header svg {
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
  transition: transform var(--transition-medium);
  flex-shrink: 0;
  margin-left: var(--spacing-md);
}

.accordion-item.active .accordion-header svg {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium),
    padding var(--transition-medium);
  background-color: var(--color-background);
}

.accordion-item.active .accordion-content {
  max-height: 500px; /* Adjust as needed */
}

.accordion-content p {
  padding: 0 var(--spacing-lg) var(--spacing-lg);
  margin: 0;
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

/* Tools Section */
.tools-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  max-width: 900px;
  margin: 0 auto;
}

.tool-item {
  display: flex;
  align-items: center;
  background-color: var(--color-surface);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  gap: var(--spacing-lg);
}

.tool-icon {
  flex-shrink: 0;
  background-color: var(--color-primary-light);
  padding: var(--spacing-md);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.tool-description {
  flex-grow: 1;
}

.tool-description h4 {
  margin: 0 0 var(--spacing-xs) 0;
}

.tool-description p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.tool-item .cta-button-small {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .tool-item {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* Testimonials Section */
.testimonials-section {
  background-color: var(--color-surface);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

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

@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial-card {
  background-color: var(--color-background);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-md);
  border-left: 5px solid var(--color-secondary);
  box-shadow: var(--shadow-md);
}

.testimonial-card blockquote {
  margin: 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

.testimonial-card blockquote p::before {
  content: "“";
  font-size: 3rem;
  color: var(--color-secondary);
  opacity: 0.5;
  font-weight: var(--font-weight-bold);
  line-height: 0;
  display: inline-block;
  margin-right: var(--spacing-sm);
  transform: translateY(10px);
}

.testimonial-card footer {
  margin-top: var(--spacing-lg);
  text-align: right;
}

.testimonial-card cite {
  display: block;
  font-style: normal;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.testimonial-card footer span {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Final CTA and Registration Form */
.final-cta-section {
  background: var(--color-primary);
  color: var(--color-background);
  text-align: center;
}

.final-cta-section h2 {
  color: inherit;
  font-size: var(--font-size-xxxl);
}

.final-cta-section p {
  color: var(--color-primary-light);
  opacity: 0.9;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-xl);
}

.registration-form-container {
  max-width: 600px;
  margin: 0 auto;
}

#quick-register-form .form-row {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

#quick-register-form input[type="email"] {
  flex-grow: 1;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: var(--font-size-base);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  background-color: var(--color-background);
  color: var(--color-text-primary);
}

#quick-register-form .cta-button {
  background-color: var(--color-accent);
  color: #333;
  border-color: var(--color-accent);
}

#quick-register-form .cta-button:hover {
  background-color: #ffb300;
  border-color: #ffb300;
  color: #000;
}

#form-thank-you-message {
  background-color: var(--color-surface);
  color: var(--color-text-primary);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-md);
  border: 2px solid var(--color-success);
}

.form-terms {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.form-terms label {
  text-align: left;
}

.form-terms input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
}

.form-terms a {
  color: var(--color-background);
  text-decoration: underline;
}

.form-terms a:hover {
  color: var(--color-accent);
}

/* Footer */
.site-footer {
  background-color: var(--color-surface);
  padding-top: var(--spacing-xxxl);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xxl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-column h4 {
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column li {
  margin-bottom: var(--spacing-sm);
}

.footer-column a {
  color: var(--color-text-secondary);
}

.footer-column a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.footer-column address {
  font-style: normal;
  line-height: 1.8;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-lg) 0;
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--border-radius-sm);
}

/* Animation utilities */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

/* Responsive adjustments */
@media (max-width: 767px) {
  h1 {
    font-size: var(--font-size-xxxl);
  }
  h2 {
    font-size: var(--font-size-xxl);
  }
  .section-header p {
    font-size: var(--font-size-base);
  }

  #quick-register-form .form-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  body {
    font-size: var(--font-size-sm);
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .container {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-text-muted);
  border-radius: 20px;
  border: 3px solid var(--color-surface);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-text-secondary);
}
