@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

/* MevaSearch — Premium SaaS Landing */

:root {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --fg: #0f0f0f;
  --fg-muted: #6b6b6b;
  --fg-subtle: #9a9a9a;
  --border: #e8e8e8;
  --border-hover: #d0d0d0;
  --accent: #0f0f0f;
  --accent-hover: #262626;
  --accent-fg: #ffffff;
  --accent-soft: rgba(15, 15, 15, 0.04);
  --success: #10b981;
  --radius: 12px;
  --radius-sm: 8px;
  --nav-h: 64px;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.06);
}

html.dark {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --fg: #fafafa;
  --fg-muted: #a0a0a0;
  --fg-subtle: #6b6b6b;
  --border: #262626;
  --border-hover: #404040;
  --accent: #ffffff;
  --accent-hover: #e0e0e0;
  --accent-fg: #0a0a0a;
  --accent-soft: rgba(255, 255, 255, 0.05);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.3);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  overflow-anchor: none;
  /* zapobiega "scroll jump" podczas animacji wejścia */
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  letter-spacing: 0.3px;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 4.25rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
}

h3 {
  font-size: 1.125rem;
  font-weight: 500;
}

em {
  font-style: normal;
  font-weight: 500;
}

.overline {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}

.lead {
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  color: var(--fg-muted);
  max-width: 540px;
  line-height: 1.7;
}

/* Container */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 0.9375rem 1.5rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
}

html.dark .nav {
  background: transparent;
}

.nav.scrolled {
  background: rgba(250, 250, 250, 0.92);
  border-bottom-color: var(--border);
}

html.dark .nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
}

.nav-inner {
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--fg);
}

.logo svg {
  color: var(--accent);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--fg-muted);
  border-radius: var(--radius-sm);
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.nav-link-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  color: var(--fg-muted);
  transition: color 0.25s ease;
}

.nav-link-btn:hover {
  color: var(--fg);
}

.theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  transition: all 0.25s ease;
}

.theme-toggle:hover {
  color: var(--fg);
  background: var(--accent-soft);
}

.theme-toggle .sun {
  display: none;
}

.theme-toggle .moon {
  display: block;
}

html.dark .theme-toggle .sun {
  display: block;
}

html.dark .theme-toggle .moon {
  display: none;
}

@media (min-width: 768px) {

  .nav-links,
  .nav-actions {
    display: flex;
  }
}

/* Mobile toggle */
.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.5rem;
  color: var(--fg);
  transition: all 0.25s ease;
}

.mobile-toggle:hover {
  color: var(--fg-muted);
}

@media (min-width: 768px) {
  .mobile-toggle {
    display: none;
  }
}

/* Mobile nav */
.mobile-nav {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 99;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-nav a {
  padding: 1rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-sm);
}

.mobile-nav a:hover {
  background: var(--accent-soft);
}

.mobile-nav-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 4rem) 1.5rem 4rem;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  animation: slideUp 0.8s ease-out 0.1s both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  margin-bottom: 1.5rem;
  color: var(--fg);
}

.hero .lead {
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.hero-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.browser-frame {
  width: 100%;
  max-width: 900px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.8s ease-out 0.2s both;
}

html.dark .browser-frame {
  box-shadow: var(--shadow-lg);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.browser-dots span:nth-child(1) {
  background: #ff5f57;
}

.browser-dots span:nth-child(2) {
  background: #febc2e;
}

.browser-dots span:nth-child(3) {
  background: #28c840;
}

.browser-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--fg-muted);
}

.browser-url svg {
  color: var(--success);
}

.browser-screen {
  width: 100%;
  display: block;
}

/* Proof */
.proof {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.proof-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.proof-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.proof-label {
  font-size: 0.8125rem;
  color: var(--fg-muted);
}

.proof-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border);
}

@media (max-width: 480px) {
  .proof-divider {
    display: none;
  }

  .proof-inner {
    gap: 1.5rem;
  }
}

/* Section header */
.section-header {
  margin-bottom: 3.5rem;
}

.section-header.center {
  text-align: center;
}

.section-header.center .section-desc {
  margin: 1rem auto 0;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--fg-muted);
  max-width: 480px;
  line-height: 1.6;
}

/* Features */
.features {
  padding: 6rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  padding: 2rem;
  background: var(--bg-elevated);
  transition: all 0.4s ease;
  border-radius: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.4s ease;
}

.feature.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature:nth-child(1) {
  transition-delay: 0.05s;
}

.feature:nth-child(2) {
  transition-delay: 0.1s;
}

.feature:nth-child(3) {
  transition-delay: 0.15s;
}

.feature:nth-child(4) {
  transition-delay: 0.2s;
}

.feature:nth-child(5) {
  transition-delay: 0.25s;
}

.feature:nth-child(6) {
  transition-delay: 0.3s;
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-hover);
}

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  color: var(--fg);
  margin-bottom: 1.25rem;
  transition: all 0.4s ease;
}

.feature:hover .feature-icon {
  transform: scale(1.08);
  background: var(--accent-soft);
}

.feature h3 {
  margin-bottom: 0.5rem;
}

.feature p {
  font-size: 0.9375rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* Story */
.story {
  padding: 6rem 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .story-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
  }
}

.story-content h2 {
  margin-bottom: 1rem;
}

.story-text {
  font-size: 1.0625rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-date {
  flex-shrink: 0;
  width: 5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-subtle);
}

.timeline-event {
  font-size: 0.9375rem;
  color: var(--fg);
}

.story-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-card {
  padding: 1.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.stat-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-card:nth-child(1) {
  transition-delay: 0.05s;
}

.stat-card:nth-child(2) {
  transition-delay: 0.1s;
}

.stat-card:nth-child(3) {
  transition-delay: 0.15s;
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-hover);
}

.stat-card.accent {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.stat-card.accent .stat-value,
.stat-card.accent .stat-label {
  color: var(--accent-fg);
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* Pricing */
.pricing {
  padding: 6rem 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pricing-card {
  position: relative;
  padding: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.4s ease;
}

.pricing-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.pricing-card:nth-child(1) {
  transition-delay: 0.05s;
}

.pricing-card:nth-child(2) {
  transition-delay: 0.1s;
}

.pricing-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.pricing-card.featured.visible {
  transform: scale(1.005);
}

.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pricing-card.featured:hover {
  transform: scale(1.005) translateY(-1px);
  box-shadow: var(--shadow-md);
}

.pricing-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-fg);
  background: var(--accent);
  border-radius: 4px;
}

.pricing-header {
  margin-bottom: 1.5rem;
}

.pricing-header h3 {
  font-size: 1.25rem;
  margin-bottom: 0.375rem;
}

.pricing-header p {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.price-from {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.price-period {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--fg-muted);
}

.pricing-features li svg {
  flex-shrink: 0;
  color: var(--success);
  margin-top: 2px;
}

.pricing-note {
  text-align: center;
  font-size: 0.875rem;
  color: var(--fg-subtle);
  margin-top: 2rem;
}

/* CTA */
.cta {
  padding: 6rem 0;
  background: var(--accent-soft);
  border-top: 1px solid var(--border);
}

.cta-content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.cta h2 {
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.0625rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 2fr;
  }
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--fg-muted);
  max-width: 280px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--fg-muted);
  padding: 0.375rem 0;
  transition: color 0.25s ease;
}

.footer-col a:hover {
  color: var(--fg);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--fg-muted);
  transition: color 0.25s ease;
}

.footer-social a:hover {
  color: var(--fg);
}

.footer-social .theme-toggle {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social .theme-toggle:hover {
  background: none;
  color: var(--fg);
}
