/* ===== FP AI Studio — Global Styles ===== */
/* Redesigned to match upperinc.com: flat modern B2B SaaS — deep navy + blue,
   white surfaces, subtle shadows, generous whitespace. Inter typeface.
   All original class names preserved so every page keeps working. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Brand */
  --ink: #0F1B2D;          /* deep navy — dark surfaces, primary buttons, footer */
  --ink-2: #1C2B45;        /* lighter navy for hovers */
  --primary: #2563EB;      /* bright blue — links, accents, focus */
  --primary-dark: #1D4ED8;
  --accent: #2563EB;

  /* Surfaces */
  --bg: #FFFFFF;
  --bg-alt: #F4F6FB;       /* light gray section band */
  --bg-white: #FFFFFF;
  --border: #E4E8F0;

  /* Text */
  --text: #0F1B2D;
  --text-light: #4B5667;
  --text-muted: #8A93A4;
  --tag-bg: #EEF2FA;

  /* Legacy gradient vars kept for any references — flattened to brand tones */
  --gradient-start: #1C2B45;
  --gradient-end: #2563EB;

  --shadow: 0 1px 2px rgba(15,27,45,0.04), 0 2px 8px rgba(15,27,45,0.06);
  --shadow-hover: 0 12px 32px rgba(15,27,45,0.12);
  --radius: 16px;
  --radius-sm: 8px;
  --max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

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

h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
h1 { font-size: 3rem; font-weight: 800; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ===== HEADER / NAV ===== */
.site-header {
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.logo span { color: var(--primary); }

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }

.nav-links a {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.45rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  text-decoration: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: var(--ink-2);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--bg-alt);
  color: var(--ink);
  border-color: var(--text-muted);
}

/* Mobile menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  background: var(--bg);
}

.hero h1 { margin: 0 auto 1.25rem; max-width: 900px; }
.hero h1 span { color: var(--primary); }

.hero p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-image {
  margin-top: 3.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  background: var(--ink);
  padding: 2rem;
  color: #fff;
  text-align: center;
  font-size: 1.25rem;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== FEATURES ===== */
.features { padding: 5.5rem 0; }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: transparent;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: var(--tag-bg);
  color: var(--primary);
}

.feature-card h3 { margin-bottom: 0.5rem; font-size: 1.2rem; }

.feature-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.7; }

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: 5.5rem 0;
  background: var(--bg-alt);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  text-align: center;
  padding: 1.5rem;
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step p { color: var(--text-light); font-size: 0.9rem; }

/* ===== BLOG SECTION ===== */
.blog-section { padding: 5.5rem 0; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 640px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}

.blog-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: transparent;
}

.blog-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--tag-bg);
}

.blog-card-content { padding: 1.5rem; }

.blog-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }

.tag {
  background: var(--tag-bg);
  color: var(--primary);
  font-size: 0.78rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-weight: 600;
}

.blog-card-content .date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.blog-card-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-content p {
  color: var(--text-light);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

.read-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

.read-more:hover { color: var(--primary-dark); }

.view-all-blogs {
  text-align: center;
  margin-top: 2.5rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 5.5rem 0;
  background: var(--bg);
}

.cta-box {
  background: var(--ink);
  border-radius: var(--radius);
  padding: 4.5rem 2rem;
  text-align: center;
  color: #fff;
}

.cta-box h2 { color: #fff; margin-bottom: 1rem; }

.cta-box p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.cta-box .btn-primary {
  background: #fff;
  color: var(--ink);
}

.cta-box .btn-primary:hover {
  background: var(--bg-alt);
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--ink);
  color: #AEB7C7;
  padding: 4rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; }
.footer-col p { font-size: 0.9rem; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul a { color: #AEB7C7; font-size: 0.9rem; }
.footer-col ul a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
}

/* ===== BLOG LISTING PAGE ===== */
.page-header {
  padding: 4rem 0 3rem;
  text-align: center;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.page-header p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0.75rem auto 0;
}

.blog-listing { padding: 3.5rem 0 5.5rem; }

.blog-search {
  max-width: 500px;
  margin: 0 auto 2.5rem;
  position: relative;
}

.blog-search input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg-white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.blog-search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ===== BLOG DETAIL PAGE ===== */
.blog-detail { padding: 2.5rem 0 5.5rem; }

.blog-detail-container { max-width: 750px; margin: 0 auto; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

.blog-detail h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.blog-meta .author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

.blog-meta .date, .blog-meta .read-time {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.featured-image {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--tag-bg);
  border: 1px solid var(--border);
}

/* Blog Content Styles */
.blog-content { font-size: 1.05rem; }

.blog-content h2 {
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  font-size: 1.65rem;
}

.blog-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
}

.blog-content p {
  margin-bottom: 1.25rem;
  color: var(--text-light);
}

.blog-content ul, .blog-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--text-light);
}

.blog-content li { margin-bottom: 0.5rem; }

.blog-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 1rem 1.5rem;
  background: var(--bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-light);
}

.blog-content code {
  background: var(--tag-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.blog-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(37,99,235,0.4);
  transition: text-decoration-color 0.2s, color 0.2s;
}

.blog-content a:hover { color: var(--primary-dark); text-decoration-color: var(--primary); }

/* Callout (used in newer posts) */
.callout {
  border-left: 3px solid var(--primary);
  background: var(--bg-alt);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.75rem 0;
}

.callout p { margin: 0; color: var(--text); }

/* Comparison tables (used in newer posts) */
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.blog-content th, .blog-content td {
  border: 1px solid var(--border);
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

.blog-content th {
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 600;
}

/* TOC */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.toc h4 { margin-bottom: 0.75rem; font-size: 1rem; }
.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: 0.4rem; font-size: 0.9rem; }
.toc a { color: var(--text-light); }
.toc a:hover { color: var(--primary); }

/* Author Bio Box */
.author-bio {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-top: 3rem;
}

.author-bio .author-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 auto 1rem;
}

.author-bio h4 { margin-bottom: 0.5rem; }
.author-bio p { font-size: 0.9rem; color: var(--text-light); }

/* Social Share */
.social-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.social-share span { font-weight: 500; font-size: 0.9rem; }

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-light);
  font-size: 0.85rem;
}

.share-btn:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Related Posts */
.related-posts { margin-top: 4rem; }
.related-posts h2 { margin-bottom: 1.5rem; font-size: 1.5rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }

  .nav-links { display: none; }
  .mobile-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .hero { padding: 3.5rem 0 2.5rem; }
  .features, .blog-section, .how-it-works, .cta-section { padding: 3.5rem 0; }
  .cta-box { padding: 2.5rem 1.5rem; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-detail h1 { font-size: 1.85rem; }

  .blog-meta { gap: 0.75rem; }
}
