/* ===========================
   FOLDR.WEBSITE — MAIN STYLES
   Design: Deep Purple & White
   =========================== */

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

:root {
  --purple-50:  #faf5ff;
  --purple-100: #f3e8ff;
  --purple-200: #e9d5ff;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7c3aed;
  --purple-800: #6d28d9;
  --purple-900: #4c1d95;
  --bg:         #ffffff;
  --bg-soft:    #f8f7ff;
  --bg-card:    #ffffff;
  --text:       #0f0a1e;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border:     #ede9fe;
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 4px 24px rgba(124, 58, 237, 0.08);
  --shadow-lg:  0 20px 60px rgba(124, 58, 237, 0.14);
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Typography --- */
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem; }
p { color: var(--text-muted); }

/* --- Container --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section --- */
.section { padding: 96px 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 64px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { font-size: 1.1rem; }
.section-tag {
  display: inline-block;
  background: var(--purple-100);
  color: var(--purple-700);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 16px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple-700) 0%, var(--purple-500) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45); }
.btn-ghost { background: transparent; color: var(--purple-700); border: 2px solid var(--border); }
.btn-ghost:hover { background: var(--purple-50); }
.btn-outline { background: transparent; color: var(--purple-700); border: 2px solid var(--purple-200); }
.btn-outline:hover { background: var(--purple-50); border-color: var(--purple-500); }
.btn-nav { background: var(--purple-700); color: #fff; padding: 10px 20px; font-size: 0.88rem; }
.btn-nav:hover { background: var(--purple-800); }
.btn-large { padding: 17px 36px; font-size: 1.05rem; border-radius: 14px; }

/* ===========================
   HEADER / NAV
   =========================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: 0 2px 20px rgba(124, 58, 237, 0.08); }

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.logo img { border-radius: 8px; width: 36px; height: 36px; }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a:not(.btn) {
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav a:not(.btn):hover { color: var(--purple-700); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 40px;
  height: 40px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 80px 0 100px;
}
.hero-gradient {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-text { max-width: 560px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  background: var(--purple-100);
  color: var(--purple-700);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 24px;
}
.hero-text h1 { margin-bottom: 24px; color: var(--text); }
.hero-sub { font-size: 1.1rem; margin-bottom: 36px; max-width: 480px; line-height: 1.7; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-note { font-size: 0.82rem; color: var(--text-light); }

.hero-screens {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 540px;
}
.phone-frame {
  position: absolute;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid rgba(255,255,255,0.8);
  background: #fff;
}
.phone-frame img { width: 100%; height: 100%; object-fit: cover; }
.phone-front {
  width: 240px;
  height: 480px;
  z-index: 2;
  bottom: 0;
  left: 50%;
  transform: translateX(-55%);
}
.phone-back {
  width: 220px;
  height: 440px;
  z-index: 1;
  bottom: 30px;
  left: 50%;
  transform: translateX(5%);
  opacity: 0.85;
}

/* ===========================
   FEATURES
   =========================== */
.features { background: var(--bg-soft); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { margin-bottom: 8px; color: var(--text); }
.feature-card p { font-size: 0.9rem; line-height: 1.6; }

/* ===========================
   SHOWCASE
   =========================== */
.screens-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
}
.screen-item { text-align: center; }
.screen-item img {
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--border);
  max-width: 220px;
  width: 100%;
}
.screen-item p {
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ===========================
   USE CASES
   =========================== */
.usecases { background: var(--bg-soft); }
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.usecase-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: background var(--transition);
}
.usecase-item:hover { background: var(--purple-50); }
.usecase-item span { font-size: 1.4rem; }

/* ===========================
   PRICING
   =========================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
}
.pricing-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pricing-card--popular {
  border-color: var(--purple-500);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}
.pricing-card--value { border-color: #10b981; }

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--purple-700);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 14px;
  border-radius: 99px;
  white-space: nowrap;
}
.pricing-badge--green { background: #10b981; }

.pricing-name { font-weight: 600; font-size: 1rem; margin-bottom: 16px; color: var(--text); }
.pricing-price { margin-bottom: 4px; }
.price-amount { font-size: 2.4rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.pricing-period { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; }
.pricing-features { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.pricing-features li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}
.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--purple-600);
  font-weight: 700;
}
.pricing-card .btn { width: 100%; justify-content: center; }
.pricing-note { text-align: center; font-size: 0.8rem; margin-top: 28px; color: var(--text-light); max-width: 560px; margin-left: auto; margin-right: auto; }

/* ===========================
   CTA SECTION
   =========================== */
.cta {
  background: linear-gradient(135deg, var(--purple-700) 0%, var(--purple-500) 100%);
  text-align: center;
}
.cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.cta-container img {
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,0.8); font-size: 1.05rem; }
.cta .btn-primary {
  background: #fff;
  color: var(--purple-700);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.cta .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.25); }

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
}
.footer-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  padding-top: 64px;
  padding-bottom: 48px;
}
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand .logo img { border-radius: 8px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-nav { display: flex; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.88rem; transition: color var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
}
.footer-bottom a { transition: color var(--transition); }
.footer-bottom a:hover { color: #fff; }

/* ===========================
   BLOG PAGE
   =========================== */
.page-hero {
  background: var(--bg-soft);
  padding: 72px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 14px; }
.page-hero p { font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 80px 0;
}
.blog-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.blog-card-img {
  background: linear-gradient(135deg, var(--purple-100) 0%, var(--purple-200) 100%);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.blog-card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple-700);
}
.blog-card-body h3 { font-size: 1.05rem; color: var(--text); line-height: 1.4; }
.blog-card-body p { font-size: 0.88rem; flex: 1; }
.blog-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--purple-100);
  color: var(--purple-700);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 99px;
  margin-top: 8px;
  align-self: flex-start;
}

/* ===========================
   LEGAL / SUPPORT PAGES
   =========================== */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px 100px;
}
.legal-page h1 { font-size: 2rem; margin-bottom: 8px; }
.legal-page .updated { font-size: 0.85rem; color: var(--text-light); margin-bottom: 48px; }
.legal-page h2 { font-size: 1.2rem; color: var(--text); margin-top: 40px; margin-bottom: 12px; }
.legal-page p { font-size: 0.95rem; line-height: 1.8; margin-bottom: 14px; }
.legal-page ul { padding-left: 20px; margin-bottom: 14px; }
.legal-page ul li { font-size: 0.95rem; line-height: 1.8; color: var(--text-muted); list-style: disc; }
.legal-page a { color: var(--purple-700); text-decoration: underline; }
.legal-page a:hover { color: var(--purple-500); }

/* Support page */
.support-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 40px 0; }
.support-card {
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.support-card h3 { font-size: 1rem; margin-bottom: 8px; color: var(--text); }
.support-card p { font-size: 0.9rem; margin-bottom: 14px; }
.support-card a.btn { font-size: 0.88rem; }

/* ===========================
   MOBILE — RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Nav */
  .nav {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 99;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { font-size: 1.05rem; color: var(--text); }
  .nav .btn-nav { width: 100%; justify-content: center; }
  .hamburger { display: flex; }

  /* Hero */
  .hero { padding: 60px 0 80px; }
  .hero-container { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-text { max-width: 100%; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-screens { height: 420px; }
  .phone-front { width: 200px; height: 400px; }
  .phone-back { width: 180px; height: 360px; }

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

  /* Showcase */
  .screens-row { gap: 16px; }
  .screen-item img { max-width: 160px; }

  /* Use cases */
  .usecases-grid { grid-template-columns: repeat(2, 1fr); }

  /* Pricing */
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }

  /* Footer */
  .footer-container { grid-template-columns: 1fr; gap: 40px; }
  .footer-nav { flex-wrap: wrap; gap: 32px; }
  .footer-bottom .container { flex-direction: column; text-align: center; }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr; }

  /* Support */
  .support-cards { grid-template-columns: 1fr; }

  /* Section */
  .section { padding: 72px 0; }
}

@media (max-width: 480px) {
  .hero-screens { height: 360px; }
  .phone-front { width: 170px; height: 340px; border-radius: 28px; }
  .phone-back { width: 150px; height: 300px; border-radius: 28px; }
  .usecases-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  h1 { font-size: 2rem; }
}
