/* ==========================================================================
   SEO Freelancer Landing Page - Style.css
   Kompletny system stylów: custom properties, komponenty, animacje, responsive
   ========================================================================== */

/* ==========================================================================
   1. Custom Properties (Design Tokens)
   ========================================================================== */
:root {
  /* Kolory */
  --color-primary: #F97316;
  --color-primary-dark: #EA580C;
  --color-primary-light: #FFF7ED;
  --color-text: #1F2937;
  --color-text-light: #6B7280;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F9FAFB;
  --color-border: #E5E7EB;

  /* Layout */
  --container-max: 1200px;
  --border-radius: 0.75rem;
  --border-radius-lg: 1rem;

  /* Cienie */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Przejścia */
  --transition: 0.3s ease;
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

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

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

ul {
  list-style: none;
}

/* ==========================================================================
   3. Utility Classes
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.section-label--light {
  color: rgba(255, 255, 255, 0.8);
}

.section-title {
  font-size: 2rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--color-text-light);
  max-width: 700px;
  margin-bottom: 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header .section-title {
  margin: 0 auto 1rem;
  max-width: 800px;
}

.section-header .section-desc {
  margin: 0 auto;
}

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

/* Przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--border-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: var(--color-primary-light);
}

.btn--dark {
  background-color: var(--color-text);
  color: white;
  border-color: var(--color-text);
}

.btn--dark:hover {
  background-color: #111827;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ==========================================================================
   4. Announcement Bar
   ========================================================================== */
.announcement-bar {
  background-color: var(--color-primary);
  color: white;
  padding: 0.75rem 0;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
}

.announcement-bar p {
  color: white;
  margin: 0;
}

.announcement-bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.announcement-bar__close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.announcement-bar__close:hover {
  opacity: 1;
}

/* ==========================================================================
   5. Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  transition: box-shadow var(--transition);
}

.header--scrolled {
  box-shadow: var(--shadow-md);
}

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

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
}

.header__logo-icon {
  flex-shrink: 0;
}

/* Nawigacja — domyślnie ukryta (mobile) */
.header__nav {
  display: none;
  gap: 2rem;
  align-items: center;
}

.header__nav a {
  color: var(--color-text-light);
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
}

.header__nav a:hover,
.header__nav a.active {
  color: var(--color-primary);
}

.header__nav a.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

/* Mobile nav — overlay po otwarciu */
.header__nav.nav--open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-bg);
  padding: 2rem 1.5rem;
  gap: 1.5rem;
  overflow-y: auto;
  z-index: 99;
}

.header__nav.nav--open a {
  font-size: 1.125rem;
  padding: 0.5rem 0;
}

/* Hamburger */
.header__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.header__hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--color-text);
  transition: var(--transition);
  transform-origin: center;
}

.header__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.header__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */
.hero {
  padding: 3rem 0;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: 2rem;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero__desc {
  font-size: 1.125rem;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero__stats {
  display: flex;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.hero__stat {
  text-align: center;
}

.hero__stat strong {
  display: block;
  font-size: 1.75rem;
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.hero__stat span {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Prawa kolumna hero — visual z blobami */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.hero__blob {
  position: absolute;
  background: linear-gradient(135deg, var(--color-primary-light) 0%, rgba(249, 115, 22, 0.15) 100%);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: blob-morph 8s ease-in-out infinite;
  width: 80%;
  height: 80%;
}

.hero__blob--2 {
  animation-delay: 2s;
  opacity: 0.6;
  filter: blur(20px);
}

.hero__image {
  position: relative;
  z-index: 2;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

@keyframes blob-morph {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  50% { border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
  75% { border-radius: 60% 30% 60% 50% / 60% 40% 50% 70%; }
}

/* ==========================================================================
   7. About Section
   ========================================================================== */
.about__inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.about__image {
  position: relative;
  display: flex;
  justify-content: center;
}

.about__image-decor {
  position: absolute;
  width: 260px;
  height: 260px;
  background-color: var(--color-primary-light);
  border: 3px solid rgba(249, 115, 22, 0.2);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-46%, -46%);
  z-index: 1;
}

.about__image-frame {
  position: relative;
  z-index: 2;
}

.about__photo {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--color-bg);
  box-shadow: var(--shadow-lg);
}

.about__content .section-title {
  color: var(--color-text);
}

.about__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ==========================================================================
   8. Services Section
   ========================================================================== */
.services__grid {
  display: grid;
  gap: 2rem;
}

.service-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background-color: var(--color-primary);
  border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
  transition: height var(--transition);
}

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

.service-card:hover::before {
  height: 100%;
}

.service-card__icon {
  width: 60px;
  height: 60px;
  background-color: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.service-card__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.service-card__desc {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9375rem;
}

.service-card__link:hover {
  gap: 0.75rem;
}

/* ==========================================================================
   9. CTA Banner (Newsletter + Final CTA)
   ========================================================================== */
.cta-banner {
  padding: 4rem 0;
}

.cta-banner--primary {
  background-color: var(--color-primary);
  color: white;
}

.cta-banner--dark {
  background-color: var(--color-text);
  color: white;
}

.cta-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.cta-banner__inner--centered {
  max-width: 700px;
  margin: 0 auto;
}

.cta-banner__content h2 {
  color: inherit;
  margin-bottom: 0.75rem;
}

.cta-banner__content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
}

.cta-banner__form {
  width: 100%;
  max-width: 500px;
}

.cta-banner__form-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cta-banner__form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.875rem 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  transition: var(--transition);
}

.cta-banner__form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.cta-banner__form input[type="email"]:focus {
  outline: none;
  border-color: white;
  background-color: rgba(255, 255, 255, 0.2);
}

.cta-banner__form small {
  display: block;
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
}

/* ==========================================================================
   10. Cases / Realizacje
   ========================================================================== */
.cases__grid {
  display: grid;
  gap: 2rem;
}

.case-card {
  background-color: var(--color-bg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

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

.case-card__image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.case-card__content {
  padding: 1.5rem;
}

.case-card__tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.case-card__content h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.case-card__content > p {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.case-card__stats {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.case-card__stats > div {
  text-align: center;
  flex: 1;
}

.case-card__stats strong {
  display: block;
  font-size: 1.125rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.case-card__stats span {
  font-size: 0.6875rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   11. Blog
   ========================================================================== */
.blog__grid {
  display: grid;
  gap: 2rem;
}

.blog-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

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

.blog-card__image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.blog-card__content {
  padding: 1.25rem;
}

.blog-card__date {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.blog-card__content h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-card__content h3 a {
  color: var(--color-text);
}

.blog-card__content h3 a:hover {
  color: var(--color-primary);
}

.blog-card__content > p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.875rem;
}

.blog-card__link:hover {
  gap: 0.625rem;
}

/* ==========================================================================
   12. Footer
   ========================================================================== */
.footer {
  background-color: var(--color-text);
  color: rgba(255, 255, 255, 0.8);
  padding-top: 4rem;
}

.footer__inner {
  display: grid;
  gap: 2rem;
  padding-bottom: 3rem;
}

.footer__logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: white;
  display: inline-block;
  margin-bottom: 1rem;
}

.footer__brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
}

.footer__links h4,
.footer__contact h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
  transition: var(--transition);
}

.footer__links a:hover {
  color: var(--color-primary);
  padding-left: 0.25rem;
}

.footer__contact p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
}

.footer__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.footer__social a:hover {
  background-color: var(--color-primary);
  transform: translateY(-2px);
}

.footer__social a svg {
  width: 18px;
  height: 18px;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  text-align: center;
}

.footer__bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8125rem;
  margin: 0;
}

/* ==========================================================================
   13. Scroll Animations
   ========================================================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays dla kart */
.services__grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.services__grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }

.cases__grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.cases__grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }

.blog__grid .animate-on-scroll:nth-child(2) { transition-delay: 0.05s; }
.blog__grid .animate-on-scroll:nth-child(3) { transition-delay: 0.1s; }
.blog__grid .animate-on-scroll:nth-child(4) { transition-delay: 0.15s; }

/* ==========================================================================
   14. Responsive — Tablet (768px+)
   ========================================================================== */
@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
  .section { padding: 5rem 0; }
  .section-title { font-size: 2.5rem; }

  /* Header — pokaż nav desktop */
  .header__nav {
    display: flex;
  }

  .header__hamburger {
    display: none;
  }

  /* Hero — 2 kolumny */
  .hero {
    padding: 4rem 0;
  }

  .hero__inner {
    grid-template-columns: 55% 45%;
    gap: 3rem;
  }

  .hero__title {
    font-size: 2.75rem;
  }

  .hero__stat strong {
    font-size: 2rem;
  }

  /* About — 2 kolumny */
  .about__inner {
    grid-template-columns: 40% 1fr;
    gap: 4rem;
  }

  /* Services — 2 kolumny */
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* CTA banner — horizontal */
  .cta-banner__inner:not(.cta-banner__inner--centered) {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }

  .cta-banner__form-group {
    flex-wrap: nowrap;
  }

  /* Cases — 2 kolumny na tablecie */
  .cases__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Blog — 2 kolumny */
  .blog__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer — 2 kolumny */
  .footer__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

/* ==========================================================================
   15. Responsive — Desktop (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
  h1 { font-size: 3.5rem; }
  .section { padding: 6rem 0; }
  .section-title { font-size: 2.75rem; }

  .hero {
    padding: 5rem 0;
  }

  .hero__title {
    font-size: 3.25rem;
  }

  .hero__visual {
    min-height: 500px;
  }

  /* Services — 3 kolumny */
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Cases — 3 kolumny */
  .cases__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Blog — 4 kolumny */
  .blog__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Footer — 4 kolumny */
  .footer__inner {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

/* ==========================================================================
   16. Print Styles
   ========================================================================== */
@media print {
  .header,
  .announcement-bar,
  .footer,
  .cta-banner {
    display: none;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}
