/* ============================================
   PixBack - Website Styles
   Based on PixBack Website Design System
   ============================================ */

/* Design Tokens */
:root {
  /* Brand colors */
  --pb-purple: #7A3E9C;
  --pb-purple-dark: #5C2A79;
  --pb-purple-light: #F1DAFF;
  --pb-purple-text: #2E0050;
  --pb-mango: #8B5000;
  --pb-ink: #1D1B20;
  --pb-tint: #F7F3F9;
  --pb-paper: #FFFFFF;
  --pb-border: #ECE6EF;

  /* Text colors */
  --pb-text: #1D1B20;
  --pb-text-secondary: #4B454D;
  --pb-text-muted: #7C757E;
  --pb-text-label: #8a7699;

  /* Status colors */
  --pb-status-uploaded: #1E6B4F;
  --pb-status-syncing: #7A3E9C;
  --pb-status-failed: #BA1A1A;

  /* Dark footer */
  --pb-footer-text: #B9AFC0;
  --pb-footer-muted: #8a7699;

  /* Typography */
  --font-display: 'Nunito', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto Mono', monospace;

  /* Layout */
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(29, 27, 32, 0.06);
  --shadow-md: 0 4px 16px rgba(29, 27, 32, 0.08);
  --shadow-lg: 0 12px 32px rgba(29, 27, 32, 0.14);

  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--pb-text);
  background: var(--pb-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--pb-purple-dark);
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 64px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  text-align: center;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--pb-purple);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--pb-purple-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--pb-ink);
  color: var(--pb-ink);
  padding: 12.5px 26px;
}

.btn-outline:hover {
  background: var(--pb-tint);
  color: var(--pb-ink);
}

.btn-light {
  background: var(--pb-purple-light);
  color: var(--pb-purple-text);
}

.btn-light:hover {
  background: #E5C4F7;
  color: var(--pb-purple-text);
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-text {
  background: none;
  color: var(--pb-purple);
  padding: 14px 4px;
}

.btn-text:hover {
  color: var(--pb-purple-dark);
}

/* ============================================
   Header / Navigation
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pb-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--pb-text);
  font-weight: 800;
  font-size: 19px;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--pb-text);
  text-decoration: none;
}

.nav-logo-img {
  height: 28px;
  width: 28px;
}

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

.nav-links a {
  color: var(--pb-text-secondary);
  font-size: 14.5px;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--pb-text);
  text-decoration: none;
}

.nav-cta {
  padding: 10px 20px;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--pb-text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 88px 0 96px;
  background: linear-gradient(180deg, var(--pb-tint) 0%, var(--pb-paper) 100%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-self: flex-start;
  background: var(--pb-purple-light);
  color: var(--pb-purple-dark);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
}

.hero h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.15;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--pb-text);
}

.hero-subtitle {
  font-size: 17px;
  line-height: 1.65;
  color: var(--pb-text-secondary);
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.hero-image {
  position: relative;
}

.hero-illustration {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

/* ============================================
   Sections (Shared)
   ============================================ */
.section {
  padding: 96px 0;
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pb-text-label);
  margin-bottom: 12px;
}

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

.section h2 {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

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

.section-intro {
  font-size: 15.5px;
  color: var(--pb-text-secondary);
  max-width: 680px;
  margin-bottom: 48px;
}

.section-intro-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-tint {
  background: var(--pb-tint);
}

/* ============================================
   What is PixBack? Section
   ============================================ */
.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.what-illustration {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  background: var(--pb-tint);
}

.what-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 520px;
}

.what-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.what-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15.5px;
  color: var(--pb-text-secondary);
  line-height: 1.6;
}

.what-points li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pb-purple);
  margin-top: 9px;
  flex-shrink: 0;
}

/* ============================================
   Features Section
   ============================================ */
.features-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  margin-bottom: 64px;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 96px;
}

.feature-row:last-of-type {
  margin-bottom: 64px;
}

.feature-row-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
}

.feature-row-content h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--pb-text);
}

.feature-row-content p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--pb-text-secondary);
}

.feature-row-illustration {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

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

.feature-card {
  background: var(--pb-paper);
  padding: 26px;
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

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

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--pb-text);
}

.feature-card p {
  font-size: 14px;
  color: var(--pb-text-secondary);
  line-height: 1.55;
}

.tour-shot-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  display: block;
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing-header {
  text-align: center;
  margin-bottom: 40px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--pb-tint);
  padding: 36px 32px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: all var(--transition);
}

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

.pricing-card-featured {
  background: var(--pb-ink);
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 32px;
  background: var(--pb-mango);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  padding: 5px 14px;
}

.pricing-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--pb-text);
}

.pricing-card-featured h3 {
  color: var(--pb-purple-light);
}

.price {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.price-amount {
  font-size: 38px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--pb-text);
}

.pricing-card-featured .price-amount {
  color: #ffffff;
}

.price-currency {
  font-size: 13px;
  color: var(--pb-text-muted);
  padding-bottom: 8px;
}

.pricing-card-featured .price-currency {
  color: var(--pb-footer-text);
}

.price-description {
  font-size: 14px;
  color: var(--pb-text-secondary);
}

.pricing-card-featured .price-description {
  color: #D8CEE0;
}

.price-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}

.price-features li {
  font-size: 14px;
  color: var(--pb-text-secondary);
}

.pricing-card-featured .price-features li {
  color: #D8CEE0;
}

.pricing-note {
  text-align: center;
  font-size: 14px;
  color: var(--pb-text-secondary);
  margin-top: 32px;
}

.pricing-note-bold {
  font-weight: 600;
}


/* ============================================
   FAQ Section
   ============================================ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

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

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 4px;
  background: none;
  border: none;
  font-size: 15.5px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--pb-text);
  text-align: left;
  cursor: pointer;
  transition: color var(--transition);
}

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

.faq-question::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--pb-text-label);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}

.faq-answer p {
  font-size: 14.5px;
  color: var(--pb-text-secondary);
  line-height: 1.65;
  max-width: 680px;
}

.faq-answer a {
  color: var(--pb-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================
   Changelog Section
   ============================================ */
.changelog-list {
  max-width: 680px;
  margin: 0 auto;
}

.changelog-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--pb-border);
  font-size: 15px;
}

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

.changelog-date {
  font-weight: 600;
  color: var(--pb-text);
  white-space: nowrap;
  min-width: 100px;
}

.changelog-text {
  color: var(--pb-text-secondary);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-form {
  max-width: 520px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--pb-text);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1px solid var(--pb-border);
  border-radius: var(--radius-sm);
  background: var(--pb-paper);
  color: var(--pb-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--pb-purple);
  box-shadow: 0 0 0 3px rgba(122, 62, 156, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn {
  width: 100%;
  margin-top: 8px;
}

.contact-form .btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.turnstile-box {
  display: flex;
  justify-content: center;
}

.form-status {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  color: var(--pb-text-secondary);
}

.form-status.success {
  color: var(--pb-status-uploaded);
}

.form-status.error {
  color: var(--pb-status-failed);
}

.contact-alt {
  text-align: center;
  font-size: 15px;
  color: var(--pb-text-secondary);
  margin-top: 24px;
}

.contact-alt a {
  color: var(--pb-purple);
  font-weight: 500;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--pb-ink);
  padding: 32px 0;
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-img {
  height: 24px;
  width: 24px;
}

.footer-logo-text {
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-display);
  color: #ffffff;
}

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

.footer-links a {
  font-size: 13px;
  color: var(--pb-footer-text);
  transition: color var(--transition);
}

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

.footer-copyright {
  font-size: 12.5px;
  color: var(--pb-footer-muted);
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 0;
}

.legal-content h1 {
  font-size: 36px;
  font-weight: 800;
  font-family: var(--font-display);
  margin-bottom: 32px;
}

.legal-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
}

.legal-content p,
.legal-content li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--pb-text-secondary);
  margin-bottom: 16px;
}

.legal-content ul {
  padding-left: 24px;
  list-style: disc;
}

.legal-content li {
  margin-bottom: 8px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .container {
    padding: 0 32px;
  }

  .hero {
    padding: 64px 0;
  }

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

  .hero-content {
    text-align: center;
    max-width: 100%;
  }

  .hero-badge {
    align-self: center;
  }

  .hero h1 {
    font-size: 34px;
  }

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

  .hero-image {
    order: -1;
  }

  .what-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .what-illustration {
    order: -1;
  }

  .feature-row {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 64px;
  }

  .feature-row-illustration {
    order: -1;
  }

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .section {
    padding: 64px 0;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* Mobile nav open state */
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--pb-paper);
    border-bottom: 1px solid var(--pb-border);
    padding: 16px 24px;
    gap: 12px;
    box-shadow: var(--shadow-md);
  }

  .nav.open .nav-cta {
    display: block;
    position: absolute;
    top: calc(100% + 180px);
    left: 24px;
    right: 24px;
  }

  .hero {
    padding: 48px 0;
  }

  .hero h1 {
    font-size: 28px;
  }

  .section {
    padding: 48px 0;
  }

  .section h2 {
    font-size: 26px;
  }

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

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .changelog-item {
    flex-direction: column;
    gap: 4px;
  }

  .changelog-date {
    min-width: auto;
  }
}

/* ============================================
   PixBack - Language Selector & RTL Styles
   ============================================ */

.lang-selector-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 15px;
  background: var(--pb-tint);
  border: 1px solid var(--pb-border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  transition: border-color var(--transition), background-color var(--transition);
}

.lang-selector-wrapper:hover {
  border-color: var(--pb-purple);
  background-color: var(--pb-paper);
}

.lang-icon {
  width: 16px;
  height: 16px;
  color: var(--pb-text-secondary);
  margin-right: 6px;
  pointer-events: none;
}

.language-select {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--pb-text);
  cursor: pointer;
  outline: none;
  padding-right: 16px;
  appearance: none;
  -webkit-appearance: none;
}

.lang-selector-wrapper::after {
  content: "▾";
  font-size: 10px;
  color: var(--pb-text-muted);
  position: absolute;
  right: 10px;
  pointer-events: none;
}

/* RTL (Hebrew) Support */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .nav-links,
[dir="rtl"] .footer-links {
  direction: rtl;
}

[dir="rtl"] .lang-selector-wrapper {
  margin-right: 0;
  margin-left: 15px;
}

[dir="rtl"] .lang-icon {
  margin-right: 0;
  margin-left: 6px;
}

[dir="rtl"] .language-select {
  padding-right: 0;
  padding-left: 16px;
}

[dir="rtl"] .lang-selector-wrapper::after {
  right: auto;
  left: 10px;
}

[dir="rtl"] .hero-actions,
[dir="rtl"] .features-grid,
[dir="rtl"] .what-grid,
[dir="rtl"] .feature-row,
[dir="rtl"] .pricing-grid,
[dir="rtl"] .footer-bar {
  direction: rtl;
}

[dir="rtl"] .hero-content,
[dir="rtl"] .what-content,
[dir="rtl"] .feature-row-content {
  text-align: right;
}

[dir="rtl"] .faq-question {
  text-align: right;
}

[dir="rtl"] .pricing-card {
  text-align: right;
}

[dir="rtl"] .price-features li {
  text-align: right;
}

[dir="rtl"] .changelog-item {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .contact-form {
  text-align: right;
}

[dir="rtl"] .form-group label {
  text-align: right;
  display: block;
}

/* Responsive adjustment for Mobile view */
@media (max-width: 768px) {
  .lang-selector-wrapper {
    margin: 10px 0;
    width: fit-content;
  }
}