/* ========================================
   PiggyPulse Landing Page — Styles
   ======================================== */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Design Tokens ===== */
:root {
  --bg-deep: #0a0e17;
  --bg-base: #0d1117;
  --bg-card: #151d2b;
  --bg-card-hover: #1a2436;
  --border-subtle: #1e293b;
  --border-card: #253049;

  --accent-primary: #5e63e6;
  --accent-secondary: #8c6cfb;
  --accent-soft: rgba(94, 99, 230, 0.12);
  --accent-glow: rgba(94, 99, 230, 0.25);

  --blue: #4dabf7;
  --green: #40c057;
  --pink: #f472b6;
  --pink-soft: rgba(244, 114, 182, 0.08);
  --fuchsia: #d946ef;

  --text-bright: #f0f2f5;
  --text-primary: #c9d1d9;
  --text-muted: #6b7b8f;
  --text-dim: #3d4f65;

  --font-brand: 'Inter', system-ui, sans-serif;
  --font-title: 'Sora', 'Inter', system-ui, sans-serif;

  --max-width: 1120px;
  --nav-height: 72px;
}

/* ===== Utilities ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 40px; } }

/* ===== Brand Text ===== */
.brand-text {
  font-family: var(--font-brand);
  font-weight: 600;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ===== Subtle Grain Overlay ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 14, 23, 0.82);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (min-width: 768px) { .nav-inner { padding: 0 40px; } }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.2rem;
}
.nav-logo img {
  width: 34px;
  height: 34px;
}
.nav-logo .brand-text { font-size: 1.2rem; }

.nav-links {
  display: none;
  list-style: none;
  gap: 32px;
  align-items: center;
}
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: -0.005em;
}
.nav-links a:hover { color: var(--text-bright); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  letter-spacing: -0.005em;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
  background: #6b70f0;
}

/* Hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
@media (min-width: 768px) { .nav-hamburger { display: none; } }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: rgba(10, 14, 23, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 24px;
  z-index: 99;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 14px 0;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-subtle);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .nav-cta {
  margin-top: 16px;
  text-align: center;
  width: 100%;
  justify-content: center;
}

/* ========================================
   HERO
   ======================================== */
.hero {
  padding: 160px 0 100px;
  position: relative;
}
@media (max-width: 767px) { .hero { padding: 120px 0 64px; } }

.hero::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(94,99,230,0.07) 0%, rgba(140,108,251,0.03) 40%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--pink-soft);
  border: 1px solid rgba(244, 114, 182, 0.15);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--pink);
  font-weight: 500;
  margin-bottom: 28px;
}
.hero-badge img {
  width: 18px;
  height: 18px;
  vertical-align: -2px;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  color: var(--text-bright);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.hero-sub {
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  letter-spacing: -0.005em;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--accent-glow);
  background: #6b70f0;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  letter-spacing: -0.005em;
}
.btn-secondary:hover { border-color: var(--text-muted); color: var(--text-bright); }

/* Hero Screenshot */
.hero-screenshot {
  margin-top: 64px;
  position: relative;
}
.hero-screenshot img {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: block;
  border-radius: 16px;
  border: 1px solid var(--border-card);
  box-shadow:
    0 24px 80px rgba(0,0,0,0.5),
    0 0 0 1px rgba(94,99,230,0.05),
    0 0 80px rgba(94,99,230,0.04);
}
.hero-screenshot::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(to top, var(--bg-deep) 0%, transparent 100%);
  border-radius: 0 0 16px 16px;
  pointer-events: none;
}

/* ========================================
   SHARED SECTION STYLES
   ======================================== */
.section-label {
  font-family: var(--font-brand);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-secondary);
  font-weight: 600;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--text-bright);
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.section-header {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 56px;
}

.section-sub {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.section-divider {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  margin: 0 auto;
  border-radius: 2px;
  opacity: 0.4;
}

/* ========================================
   PHILOSOPHY
   ======================================== */
.philosophy {
  padding: 80px 0 100px;
}
@media (max-width: 767px) { .philosophy { padding: 48px 0 64px; } }

.philosophy-inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.philosophy-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.philosophy-manifesto {
  margin-top: 40px;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.philosophy-manifesto::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--fuchsia));
  opacity: 0.5;
}

.manifesto-line {
  font-size: 0.95rem;
  color: var(--text-primary);
  padding: 11px 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 14px;
}
.manifesto-line:last-child { border-bottom: none; }

.manifesto-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.manifesto-icon.no {
  background: rgba(244, 114, 182, 0.1);
  color: var(--pink);
}
.manifesto-icon.yes {
  background: rgba(64, 192, 87, 0.1);
  color: var(--green);
}

.manifesto-divider {
  height: 1px;
  background: var(--border-card);
  margin: 6px 0;
}

/* ========================================
   FEATURES
   ======================================== */
.features {
  padding: 80px 0 100px;
}
@media (max-width: 767px) { .features { padding: 48px 0 64px; } }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  transition: border-color 0.25s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--border-card);
  transform: translateY(-2px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.feature-icon.purple { background: var(--accent-soft); }
.feature-icon.blue { background: rgba(77, 171, 247, 0.1); }
.feature-icon.green { background: rgba(64, 192, 87, 0.1); }
.feature-icon.pink { background: var(--pink-soft); }

.feature-card h3 {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--text-bright);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ========================================
   HOW IT WORKS
   ======================================== */
.how-it-works {
  padding: 80px 0 100px;
}
@media (max-width: 767px) { .how-it-works { padding: 48px 0 64px; } }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; gap: 36px; } }

.steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(16.666% + 24px);
  right: calc(16.666% + 24px);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-card), transparent);
}
@media (max-width: 700px) { .steps::before { display: none; } }

.step { text-align: center; position: relative; }

.step-number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-secondary);
  position: relative;
  z-index: 2;
}

.step h3 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--text-bright);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 280px;
  margin: 0 auto;
}

/* ========================================
   APP PREVIEW
   ======================================== */
.preview {
  padding: 80px 0 100px;
}
@media (max-width: 767px) { .preview { padding: 48px 0 64px; } }

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 700px) { .preview-grid { grid-template-columns: 1fr; } }

.preview-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: border-color 0.3s;
}
.preview-item:hover { border-color: var(--border-card); }
.preview-item img {
  width: 100%;
  display: block;
}
.preview-label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 5px 12px;
  background: rgba(10, 14, 23, 0.88);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 500;
  border: 1px solid var(--border-subtle);
}

/* ========================================
   SECURITY
   ======================================== */
.security {
  padding: 80px 0;
}
@media (max-width: 767px) { .security { padding: 48px 0; } }

.security-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 44px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  display: flex;
  gap: 36px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.security-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0.4;
}
@media (max-width: 700px) {
  .security-card {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
    gap: 20px;
    align-items: center;
  }
}

.security-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.security-content h3 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  color: var(--text-bright);
  margin-bottom: 10px;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.security-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

.security-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 700px) { .security-tags { justify-content: center; } }

.security-tag {
  padding: 4px 12px;
  background: rgba(94,99,230,0.08);
  border: 1px solid rgba(94,99,230,0.12);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ========================================
   FINAL CTA
   ======================================== */
.final-cta {
  padding: 80px 0 100px;
  text-align: center;
}
@media (max-width: 767px) { .final-cta { padding: 48px 0 64px; } }

.final-cta p {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border-subtle);
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-logo img { width: 26px; height: 26px; }
.footer-logo .brand-text { font-size: 0.95rem; }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.83rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-muted); }

.footer-copy {
  width: 100%;
  text-align: center;
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }
.delay-5 { transition-delay: 0.40s; }
