/* ============================================
   StablyPro Landing Page — Mobile-First
   ============================================ */

:root {
  --color-primary: #7c4dff;
  --color-primary-dark: #651fff;
  --color-primary-light: #b388ff;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f3ff;
  --color-text: #1a1a2e;
  --color-text-muted: #64648c;
  --color-border: #e8e5f0;
  --color-hero-bg: linear-gradient(135deg, #7c4dff 0%, #448aff 100%);
  --color-hero-text: #ffffff;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);

  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;

  --app-url: "https://app.stablypro.pl";
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-xl);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--outline {
  background: transparent;
  color: var(--color-hero-text);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
}

.btn--small {
  padding: 8px 16px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: var(--radius-lg);
}

.btn--small:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn--full {
  width: 100%;
}

/* ============================================
   Header
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(124, 77, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.header__logo-img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
}

.header__name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  background: var(--color-hero-bg);
  color: var(--color-hero-text);
  padding: 80px 20px 40px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--spacing-xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 500px;
}

.hero__title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: var(--spacing-md);
}

.hero__subtitle {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: var(--spacing-lg);
}

.hero__actions {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.hero__visual {
  position: relative;
  z-index: 1;
}

/* ============================================
   Phone Mockup (CSS-only iPhone frame)
   ============================================ */

.phone-mockup {
  width: 220px;
  background: #1a1a2e;
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 0 0 2px #333,
    0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.phone-mockup::before {
  /* Dynamic Island / Notch */
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #1a1a2e;
  border-radius: 20px;
  z-index: 2;
}

.phone-mockup__screen {
  border-radius: 24px;
  overflow: hidden;
  background: #f0f0f0;
  aspect-ratio: 9 / 19.5;
  position: relative;
}

.phone-mockup__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Placeholder when no screenshot */
.phone-mockup__screen img[src=""],
.phone-mockup__screen img:not([src]) {
  display: none;
}

.phone-mockup__screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 30%);
  pointer-events: none;
  border-radius: 24px;
}

.phone-mockup--hero {
  width: 200px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}

/* ============================================
   Section Title
   ============================================ */

.section-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-xl);
  letter-spacing: -0.3px;
  color: var(--color-text);
}

/* ============================================
   Features
   ============================================ */

.features {
  padding: var(--spacing-3xl) 20px;
  background: var(--color-surface);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
  max-width: 800px;
  margin: 0 auto;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--spacing-lg);
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-card__icon {
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
  background: rgba(124, 77, 255, 0.1);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.feature-card__title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text);
}

.feature-card__desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ============================================
   Screenshots Carousel
   ============================================ */

.screenshots {
  padding: var(--spacing-3xl) 0;
  background: var(--color-surface-alt);
  overflow: hidden;
}

.screenshots .section-title {
  padding: 0 20px;
}

.screenshots__carousel {
  position: relative;
}

.screenshots__track {
  display: flex;
  gap: var(--spacing-lg);
  padding: 0 calc(50% - 130px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.screenshots__track::-webkit-scrollbar {
  display: none;
}

.screenshots__slide {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
}

.screenshots__caption {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: center;
}

.screenshots__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--spacing-lg);
}

.screenshots__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.screenshots__dot--active {
  background: var(--color-primary);
  width: 24px;
  border-radius: 4px;
}

/* ============================================
   Contact
   ============================================ */

.contact {
  padding: var(--spacing-3xl) 20px;
  background: var(--color-surface);
}

.contact__subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--color-text-muted);
  margin-top: calc(-1 * var(--spacing-md));
  margin-bottom: var(--spacing-xl);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.contact__form {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.form-field input,
.form-field textarea {
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color 0.2s ease;
  outline: none;
  -webkit-appearance: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-primary);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #b0b0c0;
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: var(--spacing-xl) 20px;
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}

.footer__logo-img {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer__copy {
  font-size: 13px;
}

/* ============================================
   Animations (on scroll)
   ============================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive — Tablet & Desktop
   ============================================ */

@media (min-width: 600px) {
  .hero__title {
    font-size: 36px;
  }

  .hero__subtitle {
    font-size: 18px;
  }

  .features__grid {
    grid-template-columns: 1fr 1fr;
  }

  .phone-mockup--hero {
    width: 240px;
  }

  .section-title {
    font-size: 28px;
  }
}

@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    text-align: left;
    padding: 100px 40px 60px;
    gap: var(--spacing-3xl);
    justify-content: center;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  .hero__title {
    font-size: 42px;
  }

  .features__grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .phone-mockup--hero {
    width: 260px;
  }

  .screenshots__track {
    gap: var(--spacing-xl);
  }
}
