/* ==========================================================================
   Flybit  -  (Bio-Aero Aerogel & Generative Quill)
   Design Tokens & Modern CSS Framework
   ========================================================================== */

:root {
  /* Color Palette - Aerogel & Bionic Quill */
  --bg-main: #F6F7F5;
  --bg-alt: #EBF0EF;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-hover: rgba(255, 255, 255, 0.96);
  --bg-glass: rgba(224, 242, 254, 0.65);
  
  --primary-cyan: #0284c7;
  --primary-sky: #38bdf8;
  --primary-light: #e0f2fe;
  --primary-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #06b6d4 100%);
  --quill-gradient: linear-gradient(135deg, rgba(224,242,254,0.9) 0%, rgba(186,230,253,0.5) 100%);
  --glow-cyan: rgba(56, 189, 248, 0.35);
  
  --text-dark: #0f172a;
  --text-muted: #334155;
  --text-light: #64748b;
  
  --border-subtle: rgba(14, 165, 233, 0.2);
  --border-glow: rgba(56, 189, 248, 0.5);
  
  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  
  /* Aerogel Quill Rounded Geometry */
  --radius-full: 9999px;
  --radius-quill: 36px;
  --radius-card: 24px;
  --radius-inner: 16px;
  
  /* Surface Tension Shadows */
  --shadow-quill: 0 20px 40px -15px rgba(2, 132, 199, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  --shadow-hover: 0 30px 60px -12px rgba(2, 132, 199, 0.22), 0 0 0 1.5px rgba(56, 189, 248, 0.6) inset;
  --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.4);
  
  --backdrop-blur: blur(20px);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(2, 132, 199, 0.06) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Canvas Particle Backdrop */
#aerogel-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

/* Main Layout Wrappers */
.app-container {
  position: relative;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header Navbar */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin-bottom: 24px;
}

.nav-glass {
  background: rgba(246, 247, 245, 0.88);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  transition: var(--transition-smooth);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.logo-quill-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px var(--glow-cyan);
  transition: transform 0.4s var(--transition-bounce);
}

.site-logo:hover .logo-quill-icon {
  transform: rotate(15deg) scale(1.1);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.98rem;
  transition: var(--transition-smooth);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-cyan);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 2px;
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 13px 30px;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.28);
  transition: all 0.3s var(--transition-bounce);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: 0.6s;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.42);
}

.cta-button.secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-cyan);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-quill);
}

.cta-button.secondary:hover {
  background: #ffffff;
  color: var(--primary-cyan);
  box-shadow: var(--shadow-hover);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-dark);
}

/* Hero Section */
.hero-section {
  padding: 60px 0 80px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px;
  background: rgba(224, 242, 254, 0.8);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  color: var(--primary-cyan);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
}

.hero-title {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text-dark);
}

.hero-title span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* Live Ping Ticker Card */
.live-ticker-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 18px 26px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: var(--shadow-quill);
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 12px #10b981;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.quill-card-main {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-quill);
  padding: 24px;
  box-shadow: var(--shadow-hover);
  animation: float-gentle 6s ease-in-out infinite;
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.6deg); }
}

.quill-image {
  width: 100%;
  height: auto;
  border-radius: 24px;
  display: block;
  box-shadow: 0 12px 35px rgba(0,0,0,0.06);
  background: #e0f2fe;
}

.floating-pill {
  position: absolute;
  bottom: -22px;
  left: -20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  padding: 14px 24px;
  border-radius: var(--radius-full);
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.18);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-dark);
}

/* Feature Cards Grid */
.section {
  padding: 80px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary-cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.08rem;
  color: var(--text-muted);
}

.quill-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.quill-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-quill);
  padding: 38px 32px;
  box-shadow: var(--shadow-quill);
  transition: all 0.4s var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.quill-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
}

.card-icon-wrap {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-cyan);
  font-size: 1.85rem;
  margin-bottom: 24px;
  transition: transform 0.4s var(--transition-bounce);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.18);
}

.quill-card:hover .card-icon-wrap {
  transform: scale(1.12) rotate(6deg);
  background: var(--primary-gradient);
  color: #fff;
}

.card-title {
  font-size: 1.38rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-dark);
}

.card-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.68;
}

/* Pricing Section */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 28px;
}

.price-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-quill);
  padding: 42px 30px;
  box-shadow: var(--shadow-quill);
  display: flex;
  flex-direction: column;
  transition: all 0.35s var(--transition-bounce);
  position: relative;
}

.price-card.featured {
  border: 2.5px solid var(--primary-sky);
  box-shadow: 0 28px 56px -12px rgba(2, 132, 199, 0.25);
  transform: scale(1.03);
  background: rgba(255, 255, 255, 0.95);
}

.price-card:hover {
  transform: translateY(-8px);
}

.price-badge {
  position: absolute;
  top: -16px;
  right: 28px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 5px 15px rgba(2, 132, 199, 0.3);
}

.price-header {
  margin-bottom: 24px;
}

.plan-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
}

.plan-price {
  font-size: 2.9rem;
  font-weight: 800;
  color: var(--primary-cyan);
  line-height: 1.2;
  margin: 12px 0 6px;
}

.plan-price span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
}

.plan-features {
  list-style: none;
  margin: 24px 0 36px;
  flex-grow: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 14px;
}

.plan-features li svg {
  color: var(--primary-cyan);
  flex-shrink: 0;
}

/* Tutorials Preview & Grid */
.tutorial-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 30px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-quill);
}

.tutorial-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
}

.tag-pill {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary-cyan);
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  width: fit-content;
}

/* Article List Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.article-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 32px;
  transition: all 0.35s var(--transition-smooth);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-quill);
}

.article-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-hover);
}

.article-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 14px 0;
  line-height: 1.45;
}

.article-card h3 a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.2s;
}

.article-card h3 a:hover {
  color: var(--primary-cyan);
}

.article-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 22px;
  flex-grow: 1;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-cyan);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.read-more-link:hover {
  text-decoration: underline;
}

/* FAQ Accordion */
.faq-accordion {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.faq-item {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-quill);
}

.faq-item.active {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-hover);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 24px 30px;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: inherit;
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  background: var(--primary-cyan);
  color: #fff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), padding 0.35s ease;
  padding: 0 30px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.faq-item.active .faq-answer {
  max-height: 1000px;
  padding: 0 30px 26px;
}

/* Article Single Layout & Breadcrumbs */
.article-header {
  padding: 40px 0 24px;
  max-width: 880px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 22px;
}

.breadcrumb a {
  color: var(--primary-cyan);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.article-content {
  max-width: 880px;
  margin: 0 auto 60px;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-quill);
  padding: 52px;
  box-shadow: var(--shadow-quill);
}

.article-content h1 {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 22px;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-light);
  font-size: 0.92rem;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 36px;
}

.article-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 40px 0 18px;
  padding-left: 16px;
  border-left: 4px solid var(--primary-sky);
}

.article-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 26px 0 14px;
}

.article-body p {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-body ul, .article-body ol {
  margin: 0 0 26px 26px;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.article-body li {
  margin-bottom: 10px;
}

.article-callout {
  background: rgba(224, 242, 254, 0.55);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-inner);
  padding: 26px;
  margin: 30px 0;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.1);
}

.article-callout h4 {
  color: var(--primary-cyan);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Related Recommendations & Internal Links */
.related-box {
  background: var(--bg-alt);
  border-radius: var(--radius-card);
  padding: 30px;
  margin: 44px 0;
  border: 1px solid var(--border-subtle);
}

.related-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text-dark);
}

.related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.related-list a {
  color: var(--primary-cyan);
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.related-list a:hover {
  text-decoration: underline;
}

/* Footer Section */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 80px 0 40px;
  margin-top: 100px;
  position: relative;
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand h2 {
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 350px;
}

.footer-title {
  color: #f8fafc;
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 22px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
}

/* Mobile Floating CTA Bar */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 999;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: var(--radius-full);
  padding: 12px 20px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.35);
  justify-content: space-between;
  align-items: center;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .live-ticker-card {
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .nav-menu {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .mobile-sticky-cta {
    display: flex;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .article-content {
    padding: 24px;
  }
}
